www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/10/13:18:47

X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f
Date: Tue, 10 Apr 2001 12:20:51 -0500
From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp AT delorie DOT com
Subject: open
Message-ID: <20010410122051.C8540@kendall.sfbr.org>
Mail-Followup-To: djgpp AT delorie DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
Reply-To: djgpp AT delorie DOT com

In the docs for DJGPP lib.c `open':

O_TEXT 
The file is opened in text mode, meaning that Ctrl-M characters are
stripped on reading and added on writing as needed. The default mode
is specified by the _fmode variable section _fmode.

The effect I want, however, is to strip ^M on reading and _do not_
add them back when writing (i.e., always write text files with unix
NL line endings).

Should I open in text mode and then write in binary mode?

-- 
TIA/jtw

- Raw text -


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