3 * $Id: file_wrappers.h,v 1.4 2000/01/26 19:22:04 guy Exp $
6 * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
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.
28 #define file_open gzopen
29 #define filed_open gzdopen
30 extern long file_seek(void *stream, long offset, int whence);
31 #define file_read(buf, bsize, count, file) gzread((file),(buf),((count)*(bsize)))
32 #define file_write(buf, bsize, count, file) gzwrite((file),(buf),((count)*(bsize)))
33 #define file_close gzclose
34 extern long file_tell(void *stream);
35 #define file_getc gzgetc
36 #define file_gets(buf, len, file) gzgets((file), (buf), (len))
37 extern int file_error(void *fh);
40 #define file_open fopen
41 #define filed_open fdopen
42 #define file_seek fseek
43 #define file_read fread
44 #define file_write fwrite
45 #define file_close fclose
46 extern int file_error(FILE *fh);
47 #define file_tell ftell
48 #define file_getc fgetc
49 #define file_gets fgets
50 #endif /* HAVE_LIBZ */
52 #endif /* __FILE_H__ */