12.9.6 Foreign stream line endings
Text streams have a field newline
that controls the
handling of the newline convention. Note that inside Prolog all lines
end with a single newline (\u000a
, \n
) code
point. The values are described below. The default depends on the OS and
can be manipulated using the newline(Mode)
property of set_stream/2.
SIO_NL_DETECT
- This mode may be enabled on an input stream. It causes the stream to read up to the first newline to set the newline mode accordingly.
SIO_NL_POSIX
- Do not do any translation on input or output.
SIO_NL_DOS
- Emit a newline (
\n
) as\r\n
. Discard\r
from the input.239The current implementation does not check that the character is followed by
n.\