defines



Key Values
Format Values
When Functions
Show Values
Field Copy

Key Values


The dataman header defines two values for accessing system keys. They are KEY, and KEY_LEN. The first is a buffer containing the internal key that dataman last accessed, and KEY_LEN is the internal length of that key. When generating keys with the move function, always use KEY_LEN as the length. A related #define is FILE. This is a pointer to the name of the file currently referred to.

Format Values


MFMT and WFMT are both defined to display and test the format numbers of the master and work files. MFMT displays the master file format, while WFMT displays the work file format. DO NOT CHANGE THESE VALUES. Serious database errors will result if the user alters the values in these variables.

When Functions


Next are the WHEN functions. These are when_mfmt(x), when_wfmt(x), and when_file. The when_fmt functions test if the current work or master format number equals the value x. The when_file is used in sort routines. This is a true value when a new file is opened, and set to false when the first release is performed thereafter.

Show Values


There are two strings defined named TOP and EOL. These may be passed as the string arguments to show to do screen clearing. TOP will clear the entire screen from the point that the cursor is positioned in the row and column. EOL will clear from the cursor position to the end of the line.

Field Copy


Last are the field copy #defines. They are named mstrcpy, mstrncpy, wstrcpy, and wstrncpy. These copy one string into another like the strcpy routines of similar name, but these also set a flag for the master record (mstrcpy, and mstrncpy), or the work record (wstrcpy, and wstrncpy) to inform the system that the record has been updated since last retrieved or flushed and that when moving to a new record, or flushing the current record, to write the record to the database. If the user would rather, he/she may use dirty_m, or dirty_w to manually set these flags. If the flag isn't set the record will not be written to the database.

«previous  up»