SYNOPSIS
#include <stdio.h>
char *fparseln(FILE *stream, size_t *len, size_t *lineno, const char delim[3], int flags)
DESCRIPTION
The
By default, if a character is escaped, both it and the preceding escape character will be present in the returned string. Various flags alter this behaviour.
PARAMETERS
- stream
-
The stream to read from.
- len
-
If not NULL, the length of the string is stored in the memory location to which it points.
- lineno
-
If not NULL, the value of the memory location to which is pointed to, is incremented by the number of lines actually read from the file.
- delim
-
Contains the escape, continuation, and comment characters. If a character is NUL then processing for that character is disabled. If NULL, all characters default to values specified below. The contents of delim is as follows:
- delim[0]
-
The escape character, which defaults to \\, is used to remove any special meaning from the next character.
- delim[1]
-
The continuation character, which defaults to \\, is used to indicate that the next line should be concatenated with the current one if this character is the last character on the current line and is not escaped.
- delim[2]
-
The comment character, which defaults to #, if not escaped indicates the beginning of a comment that extends until the end of the current line.
- flags
-
If non-zero, alter the operation of
fparseln() . The various flags, which may be or-ed together, are:
RETURN VALUES
Upon successful completion a pointer to the parsed line is returned;
otherwise, NULL is returned.
The
CONFORMANCE
BSD UNIX
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
fgetln()
PTC MKS Toolkit 10.5 Documentation Build 40.