diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-03-04 00:25:35 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-03-04 00:25:35 +0000 |
commit | d54bd0bd6b3f8683031aae0cbf0107779ca40b58 (patch) | |
tree | adc8f57b4cefa88b88ce35f476f4b456779cbd4b /wiretap/file_wrappers.h | |
parent | 7fef8be5ec6c35a80292f0d614f23dcb839a8397 (diff) | |
download | wireshark-d54bd0bd6b3f8683031aae0cbf0107779ca40b58.tar.gz wireshark-d54bd0bd6b3f8683031aae0cbf0107779ca40b58.tar.bz2 wireshark-d54bd0bd6b3f8683031aae0cbf0107779ca40b58.zip |
Check for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.
For file types where we allocate private data, add "close" routines
where they were missing, to free the private data. Also fix up the code
to clean up after some errors by freeing private data where that wasn't
being done.
Get rid of unused arguments to "wtap_dump_open_finish()".
Fix indentation.
svn path=/trunk/; revision=4857
Diffstat (limited to 'wiretap/file_wrappers.h')
-rw-r--r-- | wiretap/file_wrappers.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h index 97566e0ce4..efeb96e35a 100644 --- a/wiretap/file_wrappers.h +++ b/wiretap/file_wrappers.h @@ -1,6 +1,6 @@ /* file_wrappers.h * - * $Id: file_wrappers.h,v 1.7 2002/02/06 09:58:30 guy Exp $ + * $Id: file_wrappers.h,v 1.8 2002/03/04 00:25:35 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -25,6 +25,7 @@ #define __FILE_H__ #ifdef HAVE_LIBZ + #define file_open gzopen #define filed_open gzdopen extern long file_seek(void *stream, long offset, int whence); @@ -35,6 +36,7 @@ extern long file_tell(void *stream); #define file_getc gzgetc #define file_gets(buf, len, file) gzgets((file), (buf), (len)) extern int file_error(void *fh); +#define file_eof gzeof #else /* No zLib */ #define file_open fopen @@ -47,6 +49,8 @@ extern int file_error(FILE *fh); #define file_tell ftell #define file_getc fgetc #define file_gets fgets +#define file_eof feof + #endif /* HAVE_LIBZ */ #endif /* __FILE_H__ */ |