X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Wed, 7 Mar 2007 12:24:01 -0500 Message-Id: <200703071724.l27HO1ua014362@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <45EEEB0C.2070109@mainstreetsoftworks.com> (message from Brad House on Wed, 07 Mar 2007 11:40:44 -0500) Subject: Re: line feed References: <45EEEB0C DOT 2070109 AT mainstreetsoftworks DOT com> Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > #if defined(_WIN32) || defined(__DJGPP__) > # define NEWLINE "\r\n" > #else > # define NEWLINE "\n" > #endif > > printf("Hello World" NEWLINE); > > And get the proper behavior on your expected systems. No, this is wrong on DJGPP and Windows. You'll get \r\r\n in your output. Please use just "\n" for newlines, on all systems, and use text vs binary mode as appropriate.