[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-users] More patch 2.5.9 hacking

From: Benjamin Riefenstahl
Subject: Re: [Mingw-users] More patch 2.5.9 hacking
Date: Thu, 23 Oct 2003 12:52:15 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux)

Hi Eli,

"Eli Zaretskii" <address@hidden> writes:
> I disagree.  To be a good Windows citizen, the ported Patch must be
> able to work on files with both Unix- and DOS-style end-of-line
> (EOL) format alike.

The test case that was presented on mingw-users for that runtime
problem did have CRLF at most lines and LF at one.  It wasn't
consistent about it.  Which also just happens in real life, I have to

(Most of you probably know the rest of what I am going to say, but I'd
like to state my train of thoughts here anyway for completeness.)

The C runtime library of course isn't required to support "both Unix-
and DOS-style end-of-line" as long as you just argue from the C specs.
You are either on Unix or on DOS/Windows, and the runtime only needs
to handle the native convention.  Actually it would be hard for the C
runtime to know all other generally interesting conventions that may
be out there.  You can define more requirements for a specific runtime
implementation, but you can not expect other compilers' runtime to
conform to your additional requirements.

So, to be portable, every application has to define it's own technique
to do this.  Actually in most cases using binary input and simple
wrappers for fgetc(), fgets() and possibly fread() can do it, I

Then there is the problem of tools that need to support text and
binary on the same channel (like e.g. cat), because for some use cases
binary files are processed and at other times text files.  For these
tools you need to add (and use) command line switches to the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]