Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
fdelrec - Delete record in ISAM file (record I/O)
&pagelevel(4)&pagelevel
Definition | #include <stdio.h> int fdelrec(FILE *fp, void *key); fdelrec deletes the record with the key value key from an ISAM file with record I/O.
|
Parameters | FILE *fp File pointer of an ISAM file which was opened in the mode “type=record,forg=key” (cf. fopen /fopen64 , freopen /freopen64 ). void *key Pointer to an area which contains the key value of the record to be deleted in its complete length or NULL. If key is equal to NULL, the last record read is deleted. The record must have been read immediately prior to the fdelrec call. |
Returnwert | 0 | If the record with the specified key was deleted. |
| >0 | If the record to be deleted does not exist. |
| EOF | If an error has occurred. |
Notes | If the call was error-free (return values 0 or > 0) the EOF flag of the file is reset. If the specified key value is not present in the file (return value > 0) the current position of the read/write pointer remains unchanged. Sole exception: if, at the time of the fdelrec call, the file is positioned on the second or higher key of a group of records with identical keys, then fdelrec positions the file on the first record after this group. In ISAM files with key duplication fdelrec deletes the first record with the specified key. The file is then positioned on the next record (with the same key or the next higher key). |
See also | flocate, fopen, fopen64, freopen, freopen64 |