[semi-OT] stdio question
Adam D. Moss
adam at gimp.org
Sat Dec 20 12:44:46 EST 2003
Hi.
I was wondering whether there's a way (ideally ANSI C) to get
the size of an already-open FILE*. fstat and friends require
an int fd or (ick) a file name, neither of which I believe can
in any remotely standard way be derived from the FILE*.
This is a bit of a sticking point in the abs-file.h contrib,
where I want to provide a way to get a file's size from its handle
(primarily but not exclusively to implement full fseek() semantics
for a seekable vorbis callback) from both PhysicsFS and buffered
stdio via the same thin API. If not then I simply have to mildly
break the abs-file API (likely not a real problem).
Thanks,
--Adam
--
Adam D. Moss . ,,^^ adam at gimp.org http://www.foxbox.org/ co:3
More information about the physfs
mailing list