p By default, if a character is escaped, both it and the preceding escape character will be present in the returned string. Various .Fa flags alter this behaviour.
p The meaning of the arguments is as follows: l -tag -width "lineno" t Fa stream The stream to read from. t Fa len If not .Dv NULL , the length of the string is stored in the memory location to which it points. t Fa lineno If not .Dv NULL , the value of the memory location to which is pointed to, is incremented by the number of lines actually read from the file. t Fa delim Contains the escape, continuation, and comment characters. If a character is .Dv NUL then processing for that character is disabled. If .Dv NULL , all characters default to values specified below. The contents of .Fa delim is as follows: l -tag -width "delim[0]" t Fa delim[0] The escape character, which defaults to .Cm \e , is used to remove any special meaning from the next character. t Fa delim[1] The continuation character, which defaults to .Cm \e , 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. t Fa delim[2] The comment character, which defaults to .Cm # , if not escaped indicates the beginning of a comment that extends until the end of the current line. .El t Fa flags If non-zero, alter the operation of .Fn fparseln . The various flags, which may be .Em or Ns -ed together, are: l -tag -width "FPARSELN_UNESCCOMM" t Dv FPARSELN_UNESCCOMM Remove escape preceding an escaped comment. t Dv FPARSELN_UNESCCONT Remove escape preceding an escaped continuation. t Dv FPARSELN_UNESCESC Remove escape preceding an escaped escape. t Dv FPARSELN_UNESCREST Remove escape preceding any other character. t Dv FPARSELN_UNESCALL All of the above. .El .El .Sh RETURN VALUES Upon successful completion a pointer to the parsed line is returned; otherwise, .Dv NULL is returned.
p The .Fn fparseln function uses internally .Xr fgetln 3 , so all error conditions that apply to .Xr fgetln 3 , apply to .Fn fparseln . In addition .Fn fparseln may set .Va errno to q Er ENOMEM and return .Dv NULL if it runs out of memory. .Sh SEE ALSO .Xr fgetln 3 .Sh HISTORY The .Fn fparseln function first appeared in .Nx 1.4 .