Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Helpful Internal Functions

The following internal functions may be of use to developers. Although they are not part of the formal FairCom DB API, they demonstrate useful methods of accomplishing specific tasks. Developers may be interested in them as examples.

File System First/Next

FairCom DB reads file names from a disk volume with the internal function ct_findfile() using ‘findfirst/findnext’ type operations. Although not a formal FairCom DB API call, this “file names on disk list” function could be of low-level use to developers. The various implementation are controlled with #define’s for specific platforms.

Look for the following function declaration in ctinod_a.c for more information.

LONG ct_findfile(pctOS_FILE_FIND_INFO ctOsFindFile);

Internal Disk Space Available Function

FairCom has created an internal function, ct_diskavl(), to determine the available disk space on a volume. Although not a formal part of the API, this cross-platform implementation may be of use to some developers working at a low level on several platforms. The various implementations are controlled by #defines. See the following function declaration in ctinod_a.c for more information.

ULONG ct_diskavl(pTEXT fn);

Internal Wildcard Matching Logic

Although not a formal FairCom DB API call, ctmatch() is a useful wildcard pattern matching function of low-level use to developers. This is the same wildcard logic used for years in FairCom’s r-tree report engine product.

NINT ctmatch(pp,ep,tp,et,casen)

pTEXTpp;/* startingptr to the pattern */

pTEXTep;/* endingptr to pattern */

pTEXTtp;/* startingptr to target */

pTEXTet;/* ending ptr to target*/

NINTcasen;/* YES => case sensitivity*/

For more information, see ctmatch() in ctsstr_a.c.

Date Routine Added to ctsadm

The r-tree date out routines are in the ctsadm.c modules. This gives developer access to this routine, because the r-tree date format is used in the SystemLog() logic and for the FairCom Driver date fields.

TOCIndex