Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
_fnlinserted - Test for inserted newline
&pagelevel(4)&pagelevel
Syntax | #include <stdio.h> int _fnlinserted (FILE *stream); |
Description | _fnlinserted checks whether, after calling one of the getc , fgetc or fgets functions for a BS2000 file with file pointer fp, a (terminating) newline character (\n) was read from the file or whether it was inserted by the CRTE .
|
Return val. | != 0
| A newline character was inserted by the CRTE. |
| 0 | All characters where read from the file. |
Notes | _fnlinserted only returns a defined value immediately after calling clearerr , getc , fgetc or fgets .
_fnlinserted always returns 0 for POSIX-files.
BS2000 UTF16 files can contain characters with one byte encoded as 0X15 (equivalent to \n). On the other hand, the functions getc , fgetc or fgets for text files with the access type SAM or ISAM return an additional newline character at the end of a data record.
_fnlinserted can be used to distinguish these two cases. (End) |
See also | clearerr() , getc() , fgetc() , fgets() , stdio.h .
|