X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "arizvi" Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with read Date: 23 May 2005 11:59:00 -0700 Organization: http://groups.google.com Lines: 12 Message-ID: <1116874740.697631.74130@o13g2000cwo.googlegroups.com> References: <1116873108 DOT 011235 DOT 255970 AT g43g2000cwa DOT googlegroups DOT com> <200505231848 DOT j4NIm08Q021874 AT envy DOT delorie DOT com> NNTP-Posting-Host: 66.245.99.113 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1116874746 5945 127.0.0.1 (23 May 2005 18:59:06 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 23 May 2005 18:59:06 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse AT google DOT com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=66.245.99.113; posting-account=Se-Idg0AAAC00LEpjdiQS7ZeyWGDYpCA To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi DJ, 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. Thanks, Ahmad > DJ Delorie wrote: > Common problem. Open the file in binary mode (O_BINARY).