From: "Pavlos" Newsgroups: comp.os.msdos.djgpp Subject: ftruncate Date: Sat, 24 Jul 1999 07:17:35 +0300 Organization: An OTEnet S.A. customer Message-ID: <7nber9$3j4$1@newssrv.otenet.gr> NNTP-Posting-Host: dram-a09.otenet.gr X-Trace: newssrv.otenet.gr 932789929 3684 195.167.113.232 (24 Jul 1999 04:18:49 GMT) X-Complaints-To: abuse AT otenet DOT gr NNTP-Posting-Date: 24 Jul 1999 04:18:49 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Lines: 14 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm using ftruncate() to truncate the size of a file. It seems that ftruncate will work only if the file pointer is before the position that I'm going to truncate from. Is this true or am I missing something? for example if i do fseek to 1000, SEEK_SET and then ftruncate 500, it does nothing. I do close the file after ftruncate. Pavlos