|
|
1.1 ! root 1: /* lzh.h */ ! 2: ! 3: /* Synchronet LZH compression library */ ! 4: ! 5: /* $Id: lzh.h,v 1.10 2002/10/13 09:44:18 rswindell Exp $ */ ! 6: ! 7: /**************************************************************************** ! 8: * @format.tab-size 4 (Plain Text/Source Code File Header) * ! 9: * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * ! 10: * * ! 11: * Rob Swindell's conversion of 1988 LZH (LHarc) encoding functions * ! 12: * Based on Japanese version 29-NOV-1988 * ! 13: * LZSS coded by Haruhiko Okumura * ! 14: * Adaptive Huffman Coding coded by Haruyasu Yoshizaki * ! 15: * * ! 16: * Anonymous FTP access to the most recent released source is available at * ! 17: * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * ! 18: * * ! 19: * Anonymous CVS access to the development source and modification history * ! 20: * is available at cvs.synchro.net:/cvsroot/sbbs, example: * ! 21: * cvs -d :pserver:[email protected]:/cvsroot/sbbs login * ! 22: * (just hit return, no password is necessary) * ! 23: * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src * ! 24: * * ! 25: * For Synchronet coding style and modification guidelines, see * ! 26: * http://www.synchro.net/source.html * ! 27: * * ! 28: * You are encouraged to submit any modifications (preferably in Unix diff * ! 29: * format) via e-mail to [email protected] * ! 30: * * ! 31: * Note: If this box doesn't appear square, then you need to fix your tabs. * ! 32: ****************************************************************************/ ! 33: ! 34: #ifdef LZHEXPORT ! 35: #undef LZHEXPORT ! 36: #endif ! 37: ! 38: #ifdef _WIN32 ! 39: #ifdef __BORLANDC__ ! 40: #define LZHCALL __stdcall ! 41: #else ! 42: #define LZHCALL ! 43: #endif ! 44: #ifdef LZHDLL /* LZH functions in DLL */ ! 45: #ifdef LZH_EXPORTS ! 46: #define LZHEXPORT __declspec( dllexport ) ! 47: #else ! 48: #define LZHEXPORT __declspec( dllimport ) ! 49: #endif ! 50: #else /* self-contained executable */ ! 51: #define LZHEXPORT ! 52: #endif ! 53: #else /* !_WIN32 */ ! 54: #define LZHCALL ! 55: #define LZHEXPORT ! 56: #endif ! 57: ! 58: #ifndef uchar ! 59: #if defined(TYPEDEF_UCHAR) ! 60: typedef unsigned char uchar; ! 61: #else ! 62: #define uchar unsigned char ! 63: #endif ! 64: #endif ! 65: ! 66: #ifdef __cplusplus ! 67: extern "C" { ! 68: #endif ! 69: LZHEXPORT long LZHCALL lzh_encode(uchar *inbuf, long inlen, uchar *outbuf); ! 70: LZHEXPORT long LZHCALL lzh_decode(uchar *inbuf, long inlen, uchar *outbuf); ! 71: #ifdef __cplusplus ! 72: } ! 73: #endif ! 74: ! 75: #ifdef __WATCOMC__ /* Use MSC standard (prepended underscore) */ ! 76: #pragma aux lzh_encode "_*" ! 77: #pragma aux lzh_decode "_*" ! 78: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.