TBLT_RETC TBLT_CALLBACK BltFuncIx4Reindex(TBLT_KH *khPtr, TBLT_FNCHAR *workFilePtr, ULONG nodePackPct, VOID *keyPtr, ULONG *recNoPtr); khPtr I:index file control structure workFilePtr I:pathname of temporary file to create nodePackPct I:node pack percentage, 50 to 100 keyPtr O:key value at time of error (eg, the duplicate key) recNoPtr O:recNo at time of error (eg, recNo of duplicate record)This routine reindexes the open index file.
The workFilePtr is to be a unique filename, and must not already exist. The nodePackPct is the percentage that nodes are to be packed. The default (when packPct is 0) is 100% (as many keys as possible are placed on a node). If there is an error, keyPtr and recNoPtr will have the values at the time of the error. This is useful for locating duplicate records, for example.
TBLT_KH.xCallBackPtr may have a pointer to a callback function that is called periodically by the reindex routine, otherwise, if 0, no callback is made.
To exclude certain records, such as deleted records, or to include only certain records in
the index, see BltIx4Insert()
.
See the supplemental documentation for more on tuning this routine.
Return: Non-zero indicates an error, otherwise the index file is reindexed.