tobold.org

correct • elegant • free

△ Comp.lang.c △

◅ Problem with realloc()

Are nested functions legal in ANSI/ISO Standard C ▻

How to write an EOF in a file?

In article <2lq75v$hb0@bright.ecs.soton.ac.uk>, Jason Sadler
<jds@ecs.soton.ac.uk> wrote:
>I've reached a point where I would like to close the file and make the
>current file position the end of file.

C provides no way to do this, because there is no guarantee that the
underlying system is capable of it.

I suggest you repost your question to a group specific to the OS you are
using.  (If it's Unix, you might want to check out truncate(2), which
some systems have.)

Tim.
--
Tim Goodwin | "scanf()... usually does something almost but not
PIPEX Ltd   | completely unlike what you want" -- Chris Torek.

Original headers:

From: tim@pipex.net (Tim Goodwin)
Newsgroups: comp.lang.c
Subject: Re: How to write an EOF in a file?
Date: 11 Mar 1994 17:59:54 -0000
Organization: PIPEX Ltd, Cambridge, UK.
Message-ID: <2lqbiq$l1h@tank.pipex.net>
References: <2lq75v$hb0@bright.ecs.soton.ac.uk>

△ Comp.lang.c △

◅ Problem with realloc()

Are nested functions legal in ANSI/ISO Standard C ▻