delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/22/08:45:52

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3014618CD@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Screen copy
Date: Tue, 22 Jun 1999 13:44:21 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Bart Alewijnse writes:
> How can you determine where in a file you are (declared by eg. 
> FILE *infile;)

See "info libc alpha ftell".

> but I can't find the definition of FILE, nor the code for fseek().

This is where a search program comes in handy. Eg:

   e:\djgpp\src\libc> grep fseek .../*.c

gives the results:

   ansi/stdio/filbuf.c:   we read here, and reset it to 512 ...
   ansi/stdio/fseek.c:fseek(FILE *f, long offset, int ptrname)
   ansi/stdio/fsetpos.c:    fseek(stream, (long)(*pos), SEEK_SET);

For the FILE structure, check the headers in the include directory
(it is in stdio.h).


	Shawn Hargreaves.

- Raw text -


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