This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ^M and GNU indent

I got this from the cynus website I believe the user guide.  It may be
helpful to you.

The Cygwin system gives us some flexibility in deciding how files are to be
opened when the mode is not specified explicitly. The rules are evolving,
this section gives
the design goals.

   a.If the file appears to reside on a file system that is mounted (i.e. if
its pathname starts with a directory displayed by mount), then the default
is specified by the
     mount flag. If the file is a symbolic link, the mode of the target file
system applies.

   b.If the file appears to reside on a file system that is not mounted (as
can happen when the path contains a drive letter), the default is text.

   c.Pipes and non-file devices are opened in binary mode, except if the
CYGWIN environment variable contains nobinmode.

   d.When a Cygwin program is launched by a shell, its standard input,
output and error are in binary mode if the CYGWIN variable contains tty,
else in text mode,
     except if they are piped or redirected.

     When redirecting, the Cygwin shells uses rules (a-c). For these shells
the relevant value of CYGWIN is that at the time the shell was launched and
not that at the   time the program is executed. Non-Cygwin shells always
pipe and redirect with binary mode. With non-Cygwin shells the commands cat
filename program and program < filename are not equivalent when filename is
on a text-mounted partition.

the url is:


-----Original Message-----
From: Tim Prince <>
To: Tuffli, Charles <>;
Date: Wednesday, June 28, 2000 7:20 PM
Subject: Re: ^M and GNU indent

>You must be processing a file containing \r characters via a binary
>mount.  I always run binary mounts, and the same thing happened in B20.
>Tim Prince
>----- Original Message -----
>From: "Tuffli, Charles" <>
>To: <>
>Sent: Wednesday, June 28, 2000 3:54 PM
>Subject: ^M and GNU indent
>> Hi -
>> I recently upgraded from B20 to the latest cygwin including the 1.1.2
>dll. I
>> compiled the GNU tool indent, but when I run the program on a file, it
>> inserts ^M at the end of every line. This didn't happen using the the
>> cygwin (B20). Any one know what's going on? Thanks!
>> ---chuck
>> --
>> Want to unsubscribe from this list?
>> Send a message to
>Want to unsubscribe from this list?
>Send a message to

Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]