[net.unix-wizards] CR vs. LF

gwyn@Brl@sri-unix (09/05/82)

From:     Doug Gwyn <gwyn@Brl>
Date:     2 Sep 82 7:51:17-EDT (Thu)
A carriage return '\r' returns the carriage without advancing the line;
a line feed '\n' advances the line without returning the carriage.

I think UNIX is on the right track when it stores text lines with a
single terminating character rather than two (CR, LF).

There is no defined constant for '\n' in <stdio.h> for the same reason
that there is no defined constant for '\0': conventions have been
established and observed throughout the C language.

The best solution is to map internal '\n' to/from whatever external
representation you're stuck with, inside your system interface primitives.