How do I SHORTEN a file without rewriting it?
Al Dunbar
userAKDU at mts.ucs.UAlberta.CA
Mon Oct 29 09:49:36 AEST 1990
In article <5289 at crash.cts.com>, lairdb at crash.cts.com (Laird Broadfield) writes:
>In article <2830 at lectroid.sw.stratus.com> bad at atrain.sw.stratus.com (Bruce Dumes) writes:
>>In article <1162 at bilver.UUCP> alex at bilver.UUCP (Alex Matulich) writes:
>>>
>>>Is there a way to shorten a file, that is, chop some data off the end of
>> <<< deletions >>>
>>Have you thought about using ftruncate()?
>
>Okay, tell us where in K&R you find ftruncate. I don't see it in
> <<< deletions >>>
>As long as we're on the subject, does anyone have a neat-o method for
>getting rid of records from the _beginning_ of a file? (Standard preferred,
>but if there's an MSDOS way, I'll accept it....)
>
Have you thought about using f_pre_truncate()? I think you'll find
it with ftruncate(), but in smiley.lib, not in funky.lib. :-)
-------------------+-------------------------------------------
Al Dunbar |
Edmonton, Alberta | this space for rent
CANADA |
-------------------+-------------------------------------------
More information about the Comp.lang.c
mailing list