Mercurial > libpst
comparison src/define.h @ 34:07177825c91b
fix signed/unsigned to allow very small pst files with only leaf nodes
author | carl |
---|---|
date | Thu, 12 Jul 2007 14:59:13 -0700 |
parents | 12cac756bc05 |
children | 6fe121a971c9 |
comparison
equal
deleted
inserted
replaced
33:12cac756bc05 | 34:07177825c91b |
---|---|
51 #include <unistd.h> | 51 #include <unistd.h> |
52 #endif | 52 #endif |
53 | 53 |
54 | 54 |
55 void _pst_debug(char *fmt, ...); | 55 void _pst_debug(char *fmt, ...); |
56 void _pst_debug_hexdump(FILE* out, unsigned char* buf, size_t size, int col); | 56 void _pst_debug_hexdump(FILE* out, unsigned char* buf, size_t size, int col, int delta); |
57 void _pst_debug_hexprint(char *data, int size); | 57 void _pst_debug_hexprint(char *data, int size); |
58 | 58 |
59 void _debug_init(char *fname); | 59 void _debug_init(char *fname); |
60 void _debug_msg_info (int line, char *file, int type); | 60 void _debug_msg_info (int line, char *file, int type); |
61 void _debug_msg_text(char* fmt, ...); | 61 void _debug_msg_text(char* fmt, ...); |
62 void _debug_hexdump(unsigned char *x, int y, int cols); | 62 void _debug_hexdump(unsigned char *x, int y, int cols, int delta); |
63 void _debug_func(char *function); | 63 void _debug_func(char *function); |
64 void _debug_func_ret(); | 64 void _debug_func_ret(); |
65 void _debug_close(void); | 65 void _debug_close(void); |
66 void _debug_write(); | 66 void _debug_write(); |
67 | 67 |
101 #endif | 101 #endif |
102 | 102 |
103 #ifdef DEBUG_MODE_EMAIL | 103 #ifdef DEBUG_MODE_EMAIL |
104 #define DEBUG_EMAIL(x) MESSAGEPRINT(x, DEBUG_EMAIL_NO); | 104 #define DEBUG_EMAIL(x) MESSAGEPRINT(x, DEBUG_EMAIL_NO); |
105 #define DEBUG_EMAIL_HEXPRINT(x,y) {_debug_msg_info(__LINE__, __FILE__, 11);\ | 105 #define DEBUG_EMAIL_HEXPRINT(x,y) {_debug_msg_info(__LINE__, __FILE__, 11);\ |
106 _debug_hexdump(x, y, 0x10);} | 106 _debug_hexdump(x, y, 0x10, 0);} |
107 #else | 107 #else |
108 #define DEBUG_EMAIL(x) {} | 108 #define DEBUG_EMAIL(x) {} |
109 #define DEBUG_EMAIL_HEXPRINT(x,y) {} | 109 #define DEBUG_EMAIL_HEXPRINT(x,y) {} |
110 #endif | 110 #endif |
111 | 111 |
146 #endif | 146 #endif |
147 | 147 |
148 #ifdef DEBUG_MODE_HEXDUMP | 148 #ifdef DEBUG_MODE_HEXDUMP |
149 #define DEBUG_HEXDUMP(x, s)\ | 149 #define DEBUG_HEXDUMP(x, s)\ |
150 {_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ | 150 {_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ |
151 _debug_hexdump(x, s, 0x10);} | 151 _debug_hexdump(x, s, 0x10, 0);} |
152 #define DEBUG_HEXDUMPC(x, s, c)\ | 152 #define DEBUG_HEXDUMPC(x, s, c)\ |
153 {_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ | 153 {_debug_msg_info(__LINE__, __FILE__, DEBUG_HEXDUMP_NO);\ |
154 _debug_hexdump(x, s, c);} | 154 _debug_hexdump(x, s, c, 0);} |
155 #else | 155 #else |
156 #define DEBUG_HEXDUMP(x, s) {} | 156 #define DEBUG_HEXDUMP(x, s) {} |
157 #define DEBUG_HEXDUMPC(x, s, c) {} | 157 #define DEBUG_HEXDUMPC(x, s, c) {} |
158 #endif | 158 #endif |
159 | 159 |