Metrologic Optimus S Programming Manual page 198

"c" programming guide
Table of Contents

Advertisement

192
"C" Programming Guide For Optimus S/R
eof
Removal of data starts at the beginning-of-file position of the file, and the
file pointer position is adjusted accordingly.
This routine will resize the file size automatically.
Return
If successful, it returns the number of bytes actually removed from the file,
including the null character.
On error, it returns -1.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
2
4
7
8
delete_top
See Also
Purpose
To check if the file pointer of a DAT file reaches the end of file.
Syntax
int eof (int fd);
int fd;
if (eof (fd)) puts ("end of file is reached!\n");
Example
Description
This routine checks if the file pointer of a DAT file (fd) points to the end-of-file
position.
The return value can be one of the following:
Return
If EOF is reached, it returns 1.
If EOF is not reached, it returns 0.
On error, it returns -1.
An error code is set to the global variable fErrorCode to indicate the error
condition encountered. Below are possible error codes and their interpretation.
Error Code
2
4
7
8
Interpretation
File specified by fd does not exist.
File specified by fd is not a DAT file.
Invalid file handle.
File not opened.
/* file handle of the target DAT file */
Interpretation
File specified by fd does not exist.
File specified by fd is not a DAT file.
Invalid file handle.
File not opened.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents