"ssn_range" needs to be a copy of "global_ssn_range", so that it's not
[obnox/wireshark/wip.git] / wiretap / file_wrappers.h
1 /* file_wrappers.h
2  *
3  * $Id$
4  *
5  * Wiretap Library
6  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21  *
22  */
23
24 #ifndef __FILE_H__
25 #define __FILE_H__
26
27 #ifdef HAVE_LIBZ
28
29 #define file_open gzopen
30 #define filed_open gzdopen
31 extern long file_seek(void *stream, long offset, int whence, int *err);
32 #define file_read(buf, bsize, count, file) gzread((file),(buf),((count)*(bsize)))
33 #define file_write(buf, bsize, count, file) gzwrite((file),(buf),((count)*(bsize)))
34 #define file_close gzclose
35 extern long file_tell(void *stream);
36 #define file_getc gzgetc
37 #define file_gets(buf, len, file) gzgets((file), (buf), (len))
38 extern int file_error(void *fh);
39 #define file_eof gzeof
40
41 #else /* No zLib */
42 #define file_open fopen
43 #define filed_open fdopen
44 extern long file_seek(void *stream, long offset, int whence, int *err);
45 #define file_read fread
46 #define file_write fwrite
47 #define file_close fclose
48 extern int file_error(FILE *fh);
49 #define file_tell ftell
50 #define file_getc fgetc
51 #define file_gets fgets
52 #define file_eof feof
53
54 #endif /* HAVE_LIBZ */
55
56 #endif /* __FILE_H__ */