6 * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
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.
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.
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.
27 extern gint64 file_seek(void *stream, gint64 offset, int whence, int *err);
28 extern gint64 file_tell(void *stream);
29 extern int file_error(void *fh);
33 extern FILE_T file_open(const char *path);
34 #define filed_open(fildes) gzdopen(fildes, "rb")
35 #define file_read(buf, count, file) gzread((file),(buf),(unsigned)(count))
36 #define file_close gzclose
37 #define file_getc gzgetc
38 #define file_gets(buf, len, file) gzgets((file), (buf), (len))
39 #define file_eof gzeof
41 #ifdef HAVE_GZCLEARERR
42 #define file_clearerr gzclearerr
47 #define file_open(path) ws_fopen(path, "rb")
48 #define filed_open(fildes) fdopen(fildes, "rb")
49 #define file_read(buf, count, file) fread((buf), (1), (count), (file))
50 #define file_close fclose
51 #define file_getc fgetc
52 #define file_gets fgets
54 /* #define file_clearerr clearerr */
56 #endif /* HAVE_LIBZ */
58 #endif /* __FILE_H__ */