00001
00016
00017
00018 #ifndef RNC_DERNC_H
00019 #define RNC_DERNC_H
00020
00021 typedef long (*rnc_callback)(long done,long total);
00022
00023
00024
00025
00026 long rnc_plen (void *packed);
00027 long rnc_ulen (void *packed);
00028 #ifndef COMPRESSOR
00029 long rnc_unpack (const void *packed, void *unpacked, const unsigned int flags);
00030 #else
00031 long rnc_unpack (const void *packed, void *unpacked, const unsigned int flags, long *leeway);
00032 #endif
00033
00034 long rnc_nocallback(long done,long total);
00035 long rnc_printcallback(long done,long total);
00036
00037 char *rnc_error (long errcode);
00038 long rnc_crc (const void *data, unsigned long len);
00039
00040
00041
00042
00043
00044 #define RNC_FILE_IS_NOT_RNC -1
00045 #define RNC_HUF_DECODE_ERROR -2
00046 #define RNC_FILE_SIZE_MISMATCH -3
00047 #define RNC_PACKED_CRC_ERROR -4
00048 #define RNC_UNPACKED_CRC_ERROR -5
00049 #define RNC_HEADER_VAL_ERROR -6
00050 #define RNC_HUF_EXCEEDS_RANGE -7
00051
00055 enum EXTRA_OBJ_LOAD {
00056 RNC_IGNORE_NONE = 0x0000,
00057 RNC_IGNORE_FILE_IS_NOT_RNC = 0x0001,
00058 RNC_IGNORE_HUF_DECODE_ERROR = 0x0002,
00059 RNC_IGNORE_FILE_SIZE_MISMATCH = 0x0004,
00060 RNC_IGNORE_PACKED_CRC_ERROR = 0x0008,
00061 RNC_IGNORE_UNPACKED_CRC_ERROR = 0x0010,
00062 RNC_IGNORE_HEADER_VAL_ERROR = 0x0020,
00063 RNC_IGNORE_HUF_EXCEEDS_RANGE = 0x0040,
00064 };
00065
00066 #ifdef INTERNAL
00067
00070 #define RNC_SIGNATURE_INT 0x524E4301
00071 #endif
00072
00076 #define RNC_MAX_FILESIZE 1<<30
00077
00081 #define SIZEOF_RNC_HEADER 18
00082
00083 #endif