head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.40; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.57; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.04; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.01; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# sg_zlib.h

Go to the documentation of this file.

    00001
    00009 /*
    00010  * Written by Curtis Olson, started April 1998.
    00011  *
    00012  * Copyright (C) 1998  Curtis L. Olson  - curt@@me.umn.edu
    00013  *
    00014  * This library is free software; you can redistribute it and/or
    00015  * modify it under the terms of the GNU Library General Public
    00016  * License as published by the Free Software Foundation; either
    00017  * version 2 of the License, or (at your option) any later version.
    00018  *
    00019  * This library is distributed in the hope that it will be useful,
    00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00022  * Library General Public License for more details.
    00023  *
    00024  * You should have received a copy of the GNU Library General Public
    00025  * License along with this library; if not, write to the
    00026  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00027  * Boston, MA  02111-1307, USA.
    00028  *
    00029  * $Id: sg_zlib.h,v 1.2 2001/12/29 00:35:34 curt Exp $
    00030  **************************************************************************/
    00031
    00032
    00033 #ifndef _SG_ZLIB_H
    00034 #define _SG_ZLIB_H
    00035
    00036
    00037 #ifdef HAVE_CONFIG_H
    00038 #  include <config.h>
    00039 #endif
    00040
    00041
    00042 #ifdef AVOID_USING_ZLIB
    00043
    00044   #include <stdio.h>
    00045
    00046   #define sgFile FILE *
    00047
    00048   /* sgFile sgopen(char *filename, const char *flags) */
    00049   #define sgopen(P, F)  (fopen((P), (F)))
    00050
    00051   /* int sgseek(sgFile *file, long offset, int whence) */
    00052   #define sgseek(F, O, W)  (fseek((F), (O), (W)))
    00053
    00054   /* sgread(sgFile file, void *buf, int size); */
    00055   #define sgread(F, B, S)  (fread((B), (S), 1, (F)))
    00056
    00057   /* int sggets(sgFile fd, char *buffer, int len) */
    00058   #define sggets(F, B, L)  (sgets((B), (L), (F)))
    00059
    00060   /* int sgclose(sgFile fd) */
    00061   #define sgclose(F)  (fclose((F)))
    00062 #else
    00063
    00064   #include <zlib.h>
    00065
    00066   #define sgFile gzFile
    00067
    00068   /* sgFile sgopen(char *filename, const char *flags) */
    00069   #define sgopen(P, F)  (gzopen((P), (F)))
    00070
    00071   /* int sgseek(sgFile *file, long offset, int whence) */
    00072   #define sgseek(F, O, W)  (gzseek((F), (O), (W)))
    00073
    00074   /* sgread(sgFile file, void *buf, int size); */
    00075   #define sgread(F, B, S)  (gzread((F), (B), (S)))
    00076
    00077   /* int sggets(sgFile fd, char *buffer, int len) */
    00078   #define sggets(F, B, L)  (gzgets((F), (B), (L)))
    00079
    00080   /* int sgclose(sgFile fd) */
    00081   #define sgclose(F)  (gzclose((F)))
    00082
    00083 #endif /* #ifdef AVOID_USING_ZLIB #else #endif */
    00084
    00085
    00086 #endif /* _SG_ZLIB_H */
    00087
    00088

@ 1.3 log @Oops, try again. @ text @d90 1 a90 1