Patch level : 2.0 668

Files correlati     : ef0
Ricompilazione Demo : [ ]
Commento            :

GF20117
La stampa cartacea della distinta ordinata per scadenze non funziona più.
Così come anche la relativa stampa di controllo per distinte.


git-svn-id: svn://10.65.10.50/trunk@11707 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-01-15 10:54:10 +00:00
parent 0007dd0423
commit 306f8356ab
2 changed files with 19 additions and 10 deletions

View File

@ -526,9 +526,19 @@ void TFile_cache::test_firm()
}
}
/*
if (_limit > 0 && items() > _limit)
flush_needed = TRUE;
flush_needed = TRUE; // Perche' buttare via tutto?
*/
//
if (_limit > 0 && items() > _limit)
{
const THash_object* rand = _cache.random_hash_object();
if (rand != NULL)
discard(rand->key()); // Butta via un elemento a caso per fare posto
}
if (flush_needed)
{
flush();
@ -610,7 +620,7 @@ bool TFile_cache::discard(const char* victim)
{
if (victim && *victim)
return _cache.remove(victim);
destroy();
// destroy(); // ???
return TRUE;
}

View File

@ -1731,17 +1731,18 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
{
check_expr(s); // Toglie l'eventuale operatore UPPER(), in modo che l'ultimo carattere
// indichi eventualmente la direzione dell'ordinamento
char versus = (s.right(1)=="-") ? 'd' : 'a';
if (s.right(1) == "-" || s.right(1) == "+")
const char last = s.right(1)[0];
const char versus = (last=='-') ? 'd' : 'a';
if (last == '-' || last == '+')
s.rtrim(1);
TFieldref f(s,0);
// Il controllo del file e' automatico in f.len()
const int n = f.file();
const int flen = f.len(relation()->curr(n));
const TRectype& r = relation()->curr(n);
const int flen = f.len(r);
sort.addsortkey(abspos,flen,versus);
CHECKS(flen!=0,"Field can not have null length: ",(const char *) s);
const TRectype& r = relation()->curr(n);
abspos += flen;
CHECKD(abspos<=256, "Sort key too long: ", abspos);
}
@ -1767,11 +1768,9 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
break; // means that no more keys are available
oldrecno=recno;
bool to_be_added = TRUE;
if (filtered)
to_be_added = filtercursor(recno);
// Attenzione: la filtercursor non si silita a filtrare ma avanza anche il cursore!!!!
const bool to_be_added = filtercursor(recno);
if (to_be_added)
{
El_To_Sort Element;