www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/12/20:30:59

Date: Mon, 12 Dec 94 14:38:00 EST
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
To: IBBT0 AT cc DOT uab DOT es
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Help about truncating files
Reply-To: babcock AT cfa DOT harvard DOT edu

> In other words, I am asking you for a instruction, if possible working in
> ANSI C and using streams (fopen(),...), not file handles, to inform the
> operating system and the File Allocation Table I want truncate the file.

The usual method of truncating a file under DOS is to position to the desired
end of file and then write 0 bytes to the file.  I think this should work
with djgpp but I haven't tried it.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019