delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/01/15:58:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dan Vasaru" <dvasaru AT broadpark DOT no>
To: <cygwin AT cygwin DOT com>
Subject: RE: CR/NL problem with cpp.exe
Date: Tue, 1 Oct 2002 21:58:14 +0200
Message-ID: <CHEDKHJJDLOCCOFLMGEAMEPPCMAA.dvasaru@broadpark.no>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
In-Reply-To: <015d01c2697a$ed9644d0$b6010c0a@catdog>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Importance: Normal

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019