Mail Archives: cygwin/2002/10/01/15:58:21
Nick, please refer to:
"How is the DOS/Unix CR/LF thing handled?" in the cygwin faq:
http://cygwin.com/faq/faq_4.html#SEC72
Also, read the documentation for the "mount" utility and the CYGWIN
environment variable setting.
If you want to make sure that the input to your "cpp" is translated no
matter the file access mode (which depends on the mount mode for files and
CYGWIN variable for pipes), I believe you need to make sure that the input
is set to text mode:
- when opening a file, add the text mode to the open calls:
o fopen(..., "rt")
o open(..., O_..... | O_TEXT)
- when reading text from stdin:
o setmode (0, O_TEXT) // 0 is the file descriptor for stdin
.
Dan
-----Original Message-----
From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
Of Kris Warkentin
Sent: Tuesday, October 01, 2002 8:47 PM
To: cygwin AT cygwin DOT com
Subject: Re: CR/NL problem with cpp.exe
> printf("This is a long string across\
> multiple lines");
>
> or a backslashified #define is being concatenated. Now, if I use the
Cygwin
> cpp.exe, I get the following (expected) behaviour:
Correction: I meant NOT being concatenated.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -