Skip to content
Snippets Groups Projects
Commit 8c4746f6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

missing header

parent d40e5ec7
No related branches found
No related tags found
No related merge requests found
// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
//
// Contribued by Alexis Salzman
#ifndef _GMSH_IO_H_
#define _GMSH_IO_H_
#include <stdio.h>
#include "GmshConfig.h"
#if defined(HAVE_COMPRESSED_IO) && defined(HAVE_LIBZ)
#include <zlib.h>
typedef gzFile gmshFILE;
typedef z_off_t gmshfpos_t;
#define gmshopen gzopen
#define gmshgets(a,b,c) gzgets((c),(a),(b))
#define gmshclose gzclose
#define gmsheof gzeof
#define gmshgetc gzgetc
#define gmshprintf gzprintf
#define gmsherror(a){ int ernum; char *gzerror(a,&ernum); return ernum; }
#define gmshsetpos(a, b){ return gzseek(a,*b,SEEK_SET); }
#define gmshgetpos(a, b){ *b=gztell(a); return 0; }
#else
typedef FILE *gmshFILE;
typedef fpos_t gmshfpos_t;
#define gmshopen Fopen
#define gmshgets fgets
#define gmshclose fclose
#define gmsheof feof
#define gmshgetc getc
#define gmshprintf fprintf
#define gmsherror ferror
#define gmshsetpos fsetpos
#define gmshgetpos fgetpos
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment