writing a file byte by byte

Garry Garrett garry at ceco.ceco.com
Sat Mar 2 11:03:22 AEST 1991


In article <9527 at hub.ucsb.edu>, 6600bori at ucsbuxa.ucsb.edu (Boris Burtin) writes:
> I'm using Turbo C 2.0 and DOS 3.3, and I'm attempting to write 8166 bytes
> to a file (for those who know what I'm talking about, this is a MIDI sysex
> file).  By the MIDIEX standard, this file should be 8166 bytes long, but
> when I write it, it turns out to be some 8300 or so bytes long.  Does anyone
> know how to solve this problem?  Thanks...
> 
> 	- Boris Burtin


	Can you give us the exact size?  I suspect that DOS is rounding
up to the next full block.  I am not sure how big a block is for DOS, I
think that it is 512 bytes (1/2 K)  People in comp.os.msdos.programmer
might know better than the folks here.

(There, isn't that much nicer than flamming the guy for being in the
"Wrong" group?)



More information about the Comp.lang.c mailing list