beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / fofi / FoFiBase.h
blobd613acd2bb1186045a4cb411a19b35af83566ad6
1 //========================================================================
2 //
3 // FoFiBase.h
4 //
5 // Copyright 1999-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef FOFIBASE_H
10 #define FOFIBASE_H
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
16 #include "goo/gtypes.h"
18 //------------------------------------------------------------------------
20 typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len);
22 //------------------------------------------------------------------------
23 // FoFiBase
24 //------------------------------------------------------------------------
26 class FoFiBase {
27 public:
29 virtual ~FoFiBase();
31 protected:
33 FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
34 static char *readFile(char *fileName, int *fileLen);
36 // S = signed / U = unsigned
37 // 8/16/32/Var = word length, in bytes
38 // BE = big endian
39 int getS8(int pos, GBool *ok);
40 int getU8(int pos, GBool *ok);
41 int getS16BE(int pos, GBool *ok);
42 int getU16BE(int pos, GBool *ok);
43 int getS32BE(int pos, GBool *ok);
44 Guint getU32BE(int pos, GBool *ok);
45 Guint getU32LE(int pos, GBool *ok);
46 Guint getUVarBE(int pos, int size, GBool *ok);
48 GBool checkRegion(int pos, int size);
50 Guchar *fileData;
51 Guchar *file;
52 int len;
53 GBool freeFileData;
56 #endif