123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- #ifndef OPC_CONFIG_H
- #define OPC_CONFIG_H
- #include <libxml/xmlstring.h>
- #include <plib/plib.h>
- #include <assert.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define OPC_ASSERT(e) assert(e)
- #ifdef NDEBUG
- #define OPC_ENSURE(e) (void)(e)
- #else
- #define OPC_ENSURE(e) assert(e)
- #endif
- #define OPC_TRUE (0==0)
- #define OPC_FALSE (0==1)
-
- typedef pbool_t opc_bool_t;
-
- typedef pofs_t opc_ofs_t;
-
- typedef puint8_t opc_uint8_t;
-
- typedef puint16_t opc_uint16_t;
-
- typedef puint32_t opc_uint32_t;
-
- typedef puint64_t opc_uint64_t;
-
- typedef pint8_t opc_int8_t;
-
- typedef pint16_t opc_int16_t;
-
- typedef pint32_t opc_int32_t;
-
- typedef pint64_t opc_int64_t;
- #define OPC_DEFLATE_BUFFER_SIZE 4096
- #define OPC_MAX_PATH 512
-
- typedef enum OPC_ERROR_ENUM {
- OPC_ERROR_NONE,
- OPC_ERROR_STREAM,
- OPC_ERROR_SEEK,
- OPC_ERROR_UNSUPPORTED_DATA_DESCRIPTOR,
- OPC_ERROR_UNSUPPORTED_COMPRESSION,
- OPC_ERROR_DEFLATE,
- OPC_ERROR_HEADER,
- OPC_ERROR_MEMORY,
- OPC_ERROR_XML,
- OPC_ERROR_USER
- } opc_error_t;
-
-
- typedef enum OPC_COMPRESSIONOPTION_ENUM {
- OPC_COMPRESSIONOPTION_NONE,
- OPC_COMPRESSIONOPTION_NORMAL,
- OPC_COMPRESSIONOPTION_MAXIMUM,
- OPC_COMPRESSIONOPTION_FAST,
- OPC_COMPRESSIONOPTION_SUPERFAST
- } opcCompressionOption_t;
- #define opc_logf printf
- #define opc_bzero_mem(m,s) memset(m, 0, s)
- #ifdef __cplusplus
- }
- #endif
- #endif
|