Path: utzoo!mnetor!tmsoft!torsqnt!hybrid!scifi!bywater!uunet!ceco!garry From: garry@ceco.ceco.com (Garry Garrett) Newsgroups: comp.lang.c Subject: Re: writing a file byte by byte Message-ID: <421@ceco.ceco.com> Date: 2 Mar 91 00:03:22 GMT References: <9527@hub.ucsb.edu> Distribution: comp Organization: Commonwealth Edison Co., Chicago, IL Lines: 17 In article <9527@hub.ucsb.edu>, 6600bori@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?)