Mercurial > libpst
comparison src/define.h @ 36:6fe121a971c9 stable-0-5-7
valgrind fixes
author | carl |
---|---|
date | Thu, 09 Aug 2007 15:46:34 -0700 |
parents | 07177825c91b |
children | f6db1f060a95 |
comparison
equal
deleted
inserted
replaced
35:b2f247463b83 | 36:6fe121a971c9 |
---|---|
27 // #endif | 27 // #endif |
28 | 28 |
29 //number of items to save in memory between writes | 29 //number of items to save in memory between writes |
30 #define DEBUG_MAX_ITEMS 0 | 30 #define DEBUG_MAX_ITEMS 0 |
31 | 31 |
32 #define DEBUG_FILE_NO 1 | 32 #define DEBUG_FILE_NO 1 |
33 #define DEBUG_INDEX_NO 2 | 33 #define DEBUG_INDEX_NO 2 |
34 #define DEBUG_EMAIL_NO 3 | 34 #define DEBUG_EMAIL_NO 3 |
35 #define DEBUG_WARN_NO 4 | 35 #define DEBUG_WARN_NO 4 |
36 #define DEBUG_READ_NO 5 | 36 #define DEBUG_READ_NO 5 |
37 #define DEBUG_INFO_NO 6 | 37 #define DEBUG_INFO_NO 6 |
38 #define DEBUG_MAIN_NO 7 | 38 #define DEBUG_MAIN_NO 7 |
39 #define DEBUG_DECRYPT_NO 8 | 39 #define DEBUG_DECRYPT_NO 8 |
40 #define DEBUG_FUNC_NO 10 | 40 #define DEBUG_FUNCENT_NO 9 |
41 #define DEBUG_FUNCRET_NO 10 | |
41 #define DEBUG_HEXDUMP_NO 11 | 42 #define DEBUG_HEXDUMP_NO 11 |
42 | 43 |
43 //variable number of arguments to this macro. will expand them into | 44 //variable number of arguments to this macro. will expand them into |
44 // ## args, then exit with status of 1 | 45 // ## args, then exit with status of 1 |
45 #include <stdio.h> | 46 #include <stdio.h> |
159 | 160 |
160 #define DEBUG_FILE(x) {_debug_msg_info(__LINE__, __FILE__, DEBUG_FILE_NO);\ | 161 #define DEBUG_FILE(x) {_debug_msg_info(__LINE__, __FILE__, DEBUG_FILE_NO);\ |
161 _debug_msg_text x;} | 162 _debug_msg_text x;} |
162 | 163 |
163 #ifdef DEBUG_MODE_FUNC | 164 #ifdef DEBUG_MODE_FUNC |
164 # define DEBUG_ENT(x) \ | 165 # define DEBUG_ENT(x) \ |
165 {MESSAGEPRINT(("Entering function %s\n",x),DEBUG_FUNC_NO);\ | 166 { \ |
166 _debug_func(x);} | 167 _debug_func(x); \ |
167 # define DEBUG_RET() {MESSAGEPRINT(("Leaving function\n"),DEBUG_FUNC_NO);\ | 168 MESSAGEPRINT(("Entering function\n"),DEBUG_FUNCENT_NO); \ |
168 _debug_func_ret();} | 169 } |
170 # define DEBUG_RET() \ | |
171 { \ | |
172 MESSAGEPRINT(("Leaving function\n"),DEBUG_FUNCRET_NO); \ | |
173 _debug_func_ret(); \ | |
174 } | |
169 #else | 175 #else |
170 # define DEBUG_ENT(x) {} | 176 # define DEBUG_ENT(x) {} |
171 # define DEBUG_RET() {} | 177 # define DEBUG_RET() {} |
172 #endif | 178 #endif |
173 | 179 |