delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Date: | Mon, 23 May 2005 15:02:35 -0400 |
Message-Id: | <200505231902.j4NJ2ZBO022436@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp AT delorie DOT com |
In-reply-to: | <1116874740.697631.74130@o13g2000cwo.googlegroups.com> |
(ahmadwaris AT hotmail DOT com) | |
Subject: | Re: Problems with read |
References: | <1116873108 DOT 011235 DOT 255970 AT g43g2000cwa DOT googlegroups DOT com> |
<200505231848 DOT j4NIm08Q021874 AT envy DOT delorie DOT com> <1116874740 DOT 697631 DOT 74130 AT o13g2000cwo DOT googlegroups DOT com> | |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> It works now, as you said. For my understanding, why did it not work > earlier? Does the read call not 'default' to binary mode? What was at > work here to prevent read from returning the full length requested. File I/O defaults to text mode. Reading from text files will (1) remove all carriage returns (#13, 0x0d, '\r'), and (2) stop reading at a Ctrl-Z (#27, 0x1a).
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |