00001 00002 00003 /*--------------------------------------------------------------------------- 00004 E.S.O. 00005 ---------------------------------------------------------------------------- 00006 File name : gzip_i.h 00007 Author : N. Devillard 00008 Created on : August 1999 00009 Language : ANSI C 00010 Part of ECLIPSE library for Adonis 00011 Description : interfaces to gzip through popen() 00012 *--------------------------------------------------------------------------*/ 00013 00014 /* 00015 00016 $Id: gzip_i.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $ 00017 $Author: amodigli $ 00018 $Date: 2003/09/03 12:50:47 $ 00019 $Revision: 1.1 $ 00020 00021 */ 00022 00023 #ifndef _GZIP_I_H_ 00024 #define _GZIP_I_H_ 00025 00026 00027 /*--------------------------------------------------------------------------- 00028 Includes 00029 ---------------------------------------------------------------------------*/ 00030 00031 #include <stdio.h> 00032 #include <stdlib.h> 00033 #include <string.h> 00034 00035 00036 /*--------------------------------------------------------------------------- 00037 Function codes 00038 ---------------------------------------------------------------------------*/ 00039 00040 00041 /*--------------------------------------------------------------------------- 00042 Function : is_gzipped_file() 00043 In : a filename 00044 Out : int 1 if the file is gzipped, 0 if not, -1 if error 00045 Job : find out if a file is gzipped 00046 Notice : uses gzip magic number: 1f8b 00047 ---------------------------------------------------------------------------*/ 00048 00049 int is_gzipped_file(char * filename); 00050 00051 /*--------------------------------------------------------------------------- 00052 Function : gzopen() 00053 In : file name 00054 Out : FILE * 00055 Job : open a gzipped file in read-only mode as a normal file 00056 Notice : unzipping is done on the fly through a pipe 00057 needs gzip installed on the local system 00058 ---------------------------------------------------------------------------*/ 00059 00060 FILE * gzopen(char * name); 00061 00062 /*--------------------------------------------------------------------------- 00063 Function : gzclose() 00064 In : FILE * 00065 Out : void 00066 Job : close out unnamed pipe associated to a gzipped open file 00067 Notice : 00068 ---------------------------------------------------------------------------*/ 00069 00070 void gzclose(FILE * p); 00071 00072 00073 #endif 00074 /*--------------------------------------------------------------------------*/
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001