1 //Copyright Paul Reiche, Fred Ford. 1992-2002 2 3 /* 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef LIBS_DECLIB_H_ 20 #define LIBS_DECLIB_H_ 21 22 #include "libs/compiler.h" 23 24 #if defined(__cplusplus) 25 extern "C" { 26 #endif 27 28 typedef struct _LZHCODE_DESC* DECODE_REF; 29 30 enum 31 { 32 FILE_STREAM = 0, 33 MEMORY_STREAM 34 }; 35 typedef BYTE STREAM_TYPE; 36 37 enum 38 { 39 STREAM_READ = 0, 40 STREAM_WRITE 41 }; 42 typedef BYTE STREAM_MODE; 43 44 extern DECODE_REF copen (void *InStream, STREAM_TYPE SType, 45 STREAM_MODE SMode); 46 extern DWORD cclose (DECODE_REF DecodeRef); 47 extern void cfilelength (DECODE_REF DecodeRef, DWORD *pfilelen); 48 extern COUNT cread (void *pStr, COUNT size, COUNT count, 49 DECODE_REF DecodeRef); 50 extern COUNT cwrite (const void *pStr, COUNT size, COUNT count, 51 DECODE_REF DecodeRef); 52 53 #if defined(__cplusplus) 54 } 55 #endif 56 57 #endif /* LIBS_DECLIB_H_ */ 58