Message-ID: <395FD105.832B3B@user.rose.com> From: April X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {TLC;RETAIL} (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: ftruncate function References: <395E8D99 DOT 5FF683 AT user DOT rose DOT com> <200007021919 DOT WAB26553 AT alpha DOT netvision DOT net DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 25 Date: Sun, 02 Jul 2000 18:32:22 -0500 NNTP-Posting-Host: 205.189.215.24 X-Trace: client 962576890 205.189.215.24 (Sun, 02 Jul 2000 18:28:10 EDT) NNTP-Posting-Date: Sun, 02 Jul 2000 18:28:10 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > Please post a short test program that could be compiled and used to For the second call to ftruncate(), redefine MY_MAX. My HD has 320MB free, so it should fail at 400 #include #include #include #define MY_MAX 400 int main( int argc, char *argv[] ) { int h = _creat( "testtr.fil", 0 ); printf( "file len : %ld\n", filelength( h ) ); printf( "ftruncate: %d\n", ftruncate( h, 1024 * 1024 ) ); printf( "file len : %ld\n", filelength( h ) ); printf( "ftruncate: %d\n", ftruncate( h, 1024 * 1024 * MY_MAX ) ); printf( "file len : %ld\n", filelength( h ) ); _close( h ); return 0; }