Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: '\r' != '\n' Message-ID: <6276@brl-smoke.ARPA> Date: Wed, 12-Aug-87 12:13:28 EDT Article-I.D.: brl-smok.6276 Posted: Wed Aug 12 12:13:28 1987 Date-Received: Fri, 14-Aug-87 06:31:17 EDT References: <1158@copper.TEK.COM> <6858@auspyr.UUCP> <17171@cca.CCA.COM> <6242@brl-smoke.ARPA> <1847@ttrdc.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 26 Summary: '\r' != '\n' In article <1847@ttrdc.UUCP> levy@ttrdc.UUCP (Daniel R. Levy) writes: -In article <6242@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: -< In article <5193@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes: -< -... The test line should be: -< -#if '\n' != '\r' -< It's all wrong anyway -- in C, '\r' and '\n' represent distinct -< (whitespace) characters. - -What is an implementation of C supposed to do on an OS/machine/character-code -combination that doesn't have the foggiest that there is such a thing -as distinct "new line" and "carriage return" characters? From the looks of -the discussion here, I'd gather that OS9 is just such a beast and its C -compiler is making the best of this brain damaged situation that it can. - -[Or perhaps, as Guy Harris likes to say, it "ain't C." :-) ] As I said, it ISN'T C. Each of these escape sequences shall produce a unique implementation- defined value which can be stored in a single "char" object. The external representations in a text file need not be identical to the internal representations, ... -- from X3J11/87-140 (X3.159-198x draft), section 2.2.2. Notice the requirement, "unique".