delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/03/17:30:43

From: "Henry Churchyard" <churchh AT crossmyt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ANNOUNCE: DJGPP port of GNU Sed 3.02.80 uploaded
Date: 3 Aug 2001 16:18:41 -0500
Organization: The University of Texas at Austin
Lines: 37
Message-ID: <9kf4fh$tn8@moe.cc.utexas.edu>
References: <200107241624 DOT MAA22074 AT delorie DOT com>
NNTP-Posting-Host: moe.cc.utexas.edu
X-Trace: geraldo.cc.utexas.edu 996873474 14455 128.83.42.2 (3 Aug 2001 21:17:54 GMT)
X-Complaints-To: abuse AT cc DOT utexas DOT edu
NNTP-Posting-Date: 3 Aug 2001 21:17:54 GMT
X-Face: #O!B,S1Ez(T##W$f`}BIPR<(7B_Kb*R^`A]0!UTex^Vz&bKso8|LZKD1ZGGKl%(K%.H`&
zY:olOCo^cwkY-twSfiB%Tj9ZH_|z|P*AMq=9s{B8R}:rzJLZRIYC AT Q@b>UH\L.NNy*Q
X-Newsreader: trn 4.0-test69 (20 September 1998)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <200107241624 DOT MAA22074 AT delorie DOT com>,
Juan Manuel Guerrero <djgpp AT delorie DOT com> wrote:

> This is a port of GNU Sed 3.02.80 to MSDOS/DJGPP.
> This port is based on the alpha release of GNU Sed available as:
>   <ftp://alpha.gnu.org/gnu/sed/sed-3.02.80.tar.gz>
>
> DJGPP specific changes.
> =======================
> - Eli Zaretskii contributed a patch to open the input stream in
>   binary mode on platforms, like DOS/WIN95, that distinguish between
>   text and binary files.  This will allow to process files that
>   contain embedded ^Z and lone ^M characters.  This patch has already
>   been submitted by him to the sed maintainer, so this feature may
>   become a standard feature in the next official sed release.  Thanks
>   to Eli Zaretskii for contributing this.

That's completely the wrong way around; DOS doesn't make any
distinction whatsoever between binary and text files at the
file-system level.  What happened was that way back when, Unix adopted
a somewhat non-standard and idiosyncratic definition of "text"
(i.e. delimited by LF only), while MS-DOS fully followed the relevant
standards and adopted a standard definition of text (delimited by
CR-LF).  (If you don't believe me, look at all the RFC's governing
Internet protocols -- if they're text-based, such as SMTP, then they
specify CR-LF line endings.)  So this means that when a C compiler is
moved over to MS-DOS, it has to have two clunky file-handling modes,
one of which translates from standard MS-DOS text format to the
compiler's internal non-standard C/Unix text format -- but this is
completely internal to the "C" environment (not a feature of DOS
itself; look at the documentation for DOS file open/read function
calls such as INT 21H AH=3DH, AH=3FH etc. and you won't see any binary
vs. text differentiation), and so is caused by peculiarities of
Unix/C, not peculiarities of DOS.

--
Henry Churchyard   churchh AT crossmyt DOT com   http://www.crossmyt.com/hc/

- Raw text -


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