Message-Id: <200007021919.WAB26553@alpha.netvision.net.il> Date: Sun, 02 Jul 2000 22:20:52 +0200 To: April X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b From: "Eli Zaretskii" CC: djgpp AT delorie DOT com In-reply-to: <395E8D99.5FF683@user.rose.com> (message from April on Sat, 01 Jul 2000 19:32:25 -0500) Subject: Re: ftruncate function References: <395E8D99 DOT 5FF683 AT user DOT rose DOT com> Reply-To: djgpp AT delorie 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 Precedence: bulk > From: April > Newsgroups: comp.os.msdos.djgpp > Date: Sat, 01 Jul 2000 19:32:25 -0500 > > Using djgpp 2.9.5.2, I want to use the ftruncate() function to increase > the size of my file; according to the documentation, it is to return > non-zero on failure. > > I am testing with my ram-drive, and when all available space is > allocated, zero is still returned. > > I have also tested on my hard-drive (enlarging the file to a reasonable > size then an unreasonable size). > Both returned zero. > > Is this a bug? Feature? Please post a short test program that could be compiled and used to investigate this. It's possible that this is a feature (or misfeature) of DOS, since `ftruncate' simply calls a couple of DOS functions. Btw, in general, `ftruncate' is for truncating files, not extending them.