delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/08/27/09:08:36

From: rpj AT ise DOT canberra DOT edu DOT au (Ross Johnson)
Subject: Re: B19: How to read dos (crlf) text files?
27 Aug 1998 09:08:36 -0700 :
Message-ID: <Pine.LNX.3.95.980827140121.2594E-100000.cygnus.gnu-win32@swan.canberra.edu.au>
References: <199808250754 DOT JAA20747 AT fz-juelich DOT de>
Mime-Version: 1.0
To: Wilfried Hennings <W DOT Hennings AT fz-juelich DOT de>
Cc: gnu-win32 AT cygnus DOT com

What about doing this:

tr -d '\015' < infile | html2rtf > outfile

I'm assuming that tr.exe is the GNU version the same as in Linux.

Ross

On Tue, 25 Aug 1998, Wilfried Hennings wrote:

> Hello,
> I'm running cygwin32 B19.1 under win95a.
> I take part in developing the latex2rtf converter package
> (previously under the BSD license, now under the GNU license)
> which is being developed under Linux 
> and also compiles and runs ok on a DEC Alpha under DEC OSF/1.
> I now want to get a win32 port of it. 
> It successfully compiles with cygwin32, but if I feed it with
> a dos/win-formatted file (end-of-line = crlf) 
> I get a "read error in line 2".
> If I save the input file in Unix mode (end-of-line = lf),
> it is successfully read.
> Input is via stdin, call is "latex2rtf <infile >outfile"
> 
> YES, I have read the mailing list archive AND also the FAQ.
> 
> NO, I don't want to renew the discussion whether 
> it makes sense to distinguish between text mode and binary.
> 
> I JUST want to get it working.
> 
> The FAQ sais as follows:
> >How is the DOS/Unix CR/LF thing handled?
> >
> >By default, tools that deal with binaries (e.g. objdump) 
> >operate in unix binary mode and tools that
> >deal with text files (e.g. bash) operate in text mode. 
> >
> >You can enable the DOS CR/LF end of line in a text file mode 
> >by setting fmode_binary setting in the registry to 0. 
> 
> I did not find this key. I instead found (among others):
> [HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\
> b15.0\mounts\04]
> "native"="C:"
> "unix"="/"
> "fbinary"=dword:00000000
> "fsilent"=dword:00000000
> 
> Now IS this the required key (obviously it IS set to 0) or not?
> 
> >I've tried to keep the file types 'natural'. 
> >By default a file is opened in text mode.
> >This can be changed by adding O_BINARY 
> >to the second argument of an open call, 
> >or "b" to second argument of an fopen call. 
> >You can also call setmode (fd, O_BINARY). 
> 
> The fopens ARE without the "b" switch.
> 
> What is wrong?
> 
> Thanks for any help,
> 
> Dipl.-Ing. Wilfried Hennings c./o. 
> Forschungszentrum (Research Center) Juelich GmbH, ISR 
> D-52425 Juelich, Germany 
> Tel. (+49) 2461 61 5570 ; Fax (G3+G4) (+49) 2461 61 8254
> email: <W DOT Hennings AT fz-juelich DOT de>
> my pgp (2.6.3i) public key: <ftp://isr016.isr.kfa-juelich.de/wh.asc>
> ISR homepage: <http://www.kfa-juelich.de/isr/>
> Join the fight against spam!  details at <http://www.cauce.org>
> All opinions mentioned are strictly my own, not my employer's
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
> 

+----------------------+---+
| Ross Johnson         |   | E-Mail: rpj AT ise DOT canberra DOT edu DOT au
| Info Sciences and Eng|___|
| University of Canberra   | FAX:    +61 6 2015227
| PO Box 1                 |
| Belconnen  ACT    2616   | WWW:    http://willow.canberra.edu.au/~rpj/
| AUSTRALIA                |
+--------------------------+


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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