U_GET - get a random record from a UFAS file.

Usage:

#include <ufas.h>
stat = u_get( buffer, maxbytes, fp[, relkey] );
stat = u_get(buffer, maxbytes, fp[, keynum[, keyptr ]])

Where:

char *buffer;
is a pointer to the buffer into which the record should be placed.
int maxbytes;
is the maximum number of characters to read.
U_FILE fp;
is the file from which to read.
unsigned relkey;
is the relative key of the record to be read. The default is the key of the last record read, written, or positioned to.
int keynum;
is the key number of the key by which the record should be located. The default is the last key of reference, from a previous call to "u_pos" or "u_get".
char *keyptr;
is a pointer to the key to search for. The default is the key of the last record read or written.
int stat;
is the number of characters actually read, or EOF on error.

Description:

"u_get" reads a specified record from a UFAS relative or indexed file open in random or dynamic mode. (I.e. "b" or "bl" actions were specified on open.)

Notes:

If this is used on a file opened for sequential access, the program will probably be aborted with "illegal call on file XX".

See Also:

expl c ufas u_gxt
expl c ufas u_open

Copyright © 1996, Thinkage Ltd.