K
Kevin Frey
Hello,
Can anyone suggest a way, that does not involve writing a temporary
file, that would permit me to discover whether writing:
output_file_stream << '\n';
will write either a LF (eg. under unix) or CR/LF (eg. under Win32).
The Adobe Acrobat specification (V1.3) has a section called a
cross-reference table which must be padded to exactly 20 bytes per
line. If the operating system writes LF-only then each line has a
space appended before the LF. If the operating system writes CR/LF
then no space is appended.
Taking an entirely lateral approach, my colleague has suggested to me
that only the Win32 platform actually writes CR/LF so I should just
conditionalise the code for Win32 and *assume* all other platforms are
LF. So as a separate question - can anyone think of any other
mainstream platform that uses CR/LF. I'm under the impression this
"hangover" came from CP/M but that O/S has pretty much gone the way of
the Dodo.
Thanks
Kevin.
Can anyone suggest a way, that does not involve writing a temporary
file, that would permit me to discover whether writing:
output_file_stream << '\n';
will write either a LF (eg. under unix) or CR/LF (eg. under Win32).
The Adobe Acrobat specification (V1.3) has a section called a
cross-reference table which must be padded to exactly 20 bytes per
line. If the operating system writes LF-only then each line has a
space appended before the LF. If the operating system writes CR/LF
then no space is appended.
Taking an entirely lateral approach, my colleague has suggested to me
that only the Win32 platform actually writes CR/LF so I should just
conditionalise the code for Win32 and *assume* all other platforms are
LF. So as a separate question - can anyone think of any other
mainstream platform that uses CR/LF. I'm under the impression this
"hangover" came from CP/M but that O/S has pretty much gone the way of
the Dodo.
Thanks
Kevin.