I BELIEVE this is the proper structure for it.. so play if you want, but let
us know if you make it work! :)
I BELIEVE this is the right structure. Be careful, but definitely let us
know if you make it work! :)
#ifndef _FILE_DEFINED
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
#define _FILE_DEFINED
#endif
- Valnir
----- Original Message -----
From: "Richard Lindsey" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 28, 2004 12:23 PM
Subject: Quick question about FILE * variables...
Is there a field anywhere in that file structure that keeps track of the
file's name? In db.c where it's loading area data, it's got its various
functions like fread_string and fread_word, and if something's screwy
with the area file then they'll bug with something like "Word too long"
but not tell you which file or where in the file, and I'd like to be
able to log the file and the line and offset of what it was trying to
read when that happened (I just happen to be going to db.c right now and
the idea hit me, but I've no idea if that structure holds the filename
info)... so that's my question... I don't think it does, or else a lot
of coding examples I see on the internet, and probably the whole design
of those functions originally would have included that kind of info, but
there's no harm in asking :D Thanks in advance :)
Richard Lindsey.
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom