The values of the character constants
\n was the exact same in Classic Mac OS environments as it was everywhere else:
\r was CR was ASCII 13 (
\n was LF was ASCII 10 (
0x0a). The only thing that was different on Classic Mac OS was that
\r was used as the “standard” line ending in text editors, just like
\n is used on UNIX systems, or
\r\n on DOS and Windows systems.
Here’s a screenshot of a simple test program running in Metrowerks CodeWarrior on Mac OS 9, for instance:
Keep in mind that Classic Mac OS systems didn’t have a system-wide standard C library! Functions like
printf() were only present as part of compiler-specific libraries like SIOUX for CodeWarrior, which implemented C standard I/O by writing output to a window with a text field in it. As such, some implementations of standard file I/O may have performed some automatic translation between
\n, which may be what you’re thinking of. (Many Windows systems do similar things for
\r\n if you don’t pass the
"b" flag to
fopen(), for instance.) There was certainly nothing like that in the Mac OS Toolbox, though.