U_DEL - delete a record from a UFAS file.

Usage:

#include <ufas.h>
stat = u_del( fp[, keyinfo] );
stat = u_del( fp, keynum, keyptr );

Where:

U_FILE fp;
specifies the file whose record is to be deleted.
unsigned keyinfo;
is the Relative key when the file is a UFF Relative file.
char *keyinfo;
 
char *keyptr;
is a pointer to the Prime key value when the file is a UFF Indexed or ISP file.
int keynum;
is the key number to which "keyptr" refers. Since UFAS only allows deletion according to Prime key (key number 0), this argument should always be zero.
int stat;
is zero on success, and EOF on failure. The latter usually indicates that the record selected by the given key did not exist in the file.

Description:

"u_del" deletes one record from the named file. If the file is open for sequential access, the optional key arguments should be omitted; in this case, the last record obtained by calling "u_gxt" is deleted. Otherwise, the record identified by the given key is deleted.

Since "keynum" must always be zero, it may be omitted, and the routine will determine the type of the second argument according to the file organization. The second calling sequence is actually only provided for the sake of type matching across calls.

Copyright © 1996, Thinkage Ltd.