Modificata la funzione len(int) in reset(int)
git-svn-id: svn://10.65.10.50/trunk@490 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5ca5c84738
commit
7393952fab
@ -41,6 +41,7 @@ void TSort::init()
|
|||||||
|
|
||||||
{
|
{
|
||||||
CHECK(_sortvar->rc_len && nsortkey, "Attempt to initialize undefined sort");
|
CHECK(_sortvar->rc_len && nsortkey, "Attempt to initialize undefined sort");
|
||||||
|
while (retrieve() != NULL);
|
||||||
init_sort(_sortvar);
|
init_sort(_sortvar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,10 +82,11 @@ int TSort::length() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TSort::length(int len)
|
void TSort::reset(int len)
|
||||||
|
|
||||||
{
|
{
|
||||||
_sortvar->rc_len = len ;
|
_sortvar->rc_len = len ;
|
||||||
|
nsortkey = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -106,6 +108,3 @@ void TSort::addsortkey(TRecfield& f, char direction)
|
|||||||
_sortvar->s_fld[nsortkey].f_len = f.len();
|
_sortvar->s_fld[nsortkey].f_len = f.len();
|
||||||
_sortvar->s_fld[nsortkey++].ad = direction;
|
_sortvar->s_fld[nsortkey++].ad = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ public:
|
|||||||
void stats(); // Chiama sort_stats
|
void stats(); // Chiama sort_stats
|
||||||
|
|
||||||
int length() const; // Ritorna la lunghezza del record di sort
|
int length() const; // Ritorna la lunghezza del record di sort
|
||||||
void length(int len); // Imposta la lunghezza del record di sort
|
void reset(int len); // Imposta la lunghezza del record di sort
|
||||||
|
// e inizializza il sort
|
||||||
void addsortkey(int pos, int len, char direction = 'a');
|
void addsortkey(int pos, int len, char direction = 'a');
|
||||||
void addsortkey(TRecfield& f, char direction = 'a');
|
void addsortkey(TRecfield& f, char direction = 'a');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user