00001 /* liqbase 00002 * Copyright (C) 2008 Gary Birkett 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License version 2 00006 * as published by the Free Software Foundation. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00017 00018 /* 00019 * 00020 * header for filebuffer routines 00021 * 00022 */ 00023 00024 00025 00026 #ifndef FILEBUF_H 00027 #define FILEBUF_H 00028 00029 00030 00031 00032 00033 //########################################################################## 00034 //########################################################################## filebuf class. quick and dirty way to load a named file 00035 //########################################################################## 00036 00037 struct filebuf 00038 { 00039 char *filename; // original filename of the document 00040 int filelength; // actual filesize 00041 char *filedata; // malloced memory 00042 }; 00043 00044 //########################################################################## 00045 00046 int filebuf_open(struct filebuf *self,char *filename); 00047 00048 //########################################################################## 00049 00050 int filebuf_close(struct filebuf *self); 00051 00052 00053 00054 00055 00056 #endif