X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "MikeC" Newsgroups: comp.os.msdos.djgpp References: <200709210020 DOT l8L0KG9G026658 AT envy DOT delorie DOT com> Subject: Re: How to copy a file? Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Message-ID: Date: Fri, 21 Sep 2007 00:39:10 GMT NNTP-Posting-Host: 86.13.147.52 X-Complaints-To: http://netreport.virginmedia.com X-Trace: newsfe6-win.ntli.net 1190335150 86.13.147.52 (Fri, 21 Sep 2007 01:39:10 BST) NNTP-Posting-Date: Fri, 21 Sep 2007 01:39:10 BST Organization: ntl Cablemodem News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com DJ, now that you've got me thinking in that direction, I have just noticed _dos_read and _dos_write. They say they don't do any conversion, so that suggests that fread and fwrite does. Would they be preferable to read/write, or _read and _write? Thanks again, Mike. "DJ Delorie" wrote in message news:200709210020 DOT l8L0KG9G026658 AT envy DOT delorie DOT com... > > I think you're doing it the right way, just keep in mind that DJGPP > programs have to move all that data back and forth between DOS memory > and DPMI memory. > > You might want to use open/read/write/close instead of > fopen/fread/fwrite/fclose though. > > Or, even faster, _read and _write, although then you have to deal with > all the odd DOS border cases. That does bypass the CRLF code, even > though you've disabled it there's still a check to see if it's enabled > for each read/write.