comparison dbutil.h @ 241:c5d3ef11155f

* use own assertions which should get logged properly
author Matt Johnston <matt@ucc.asn.au>
date Mon, 05 Sep 2005 15:16:10 +0000
parents 65585699d980
children 044bc108b9b3
comparison
equal deleted inserted replaced
238:e923801a7678 241:c5d3ef11155f
37 extern void (*_dropbear_log)(int priority, const char* format, va_list param); 37 extern void (*_dropbear_log)(int priority, const char* format, va_list param);
38 38
39 void dropbear_exit(const char* format, ...); 39 void dropbear_exit(const char* format, ...);
40 void dropbear_close(const char* format, ...); 40 void dropbear_close(const char* format, ...);
41 void dropbear_log(int priority, const char* format, ...); 41 void dropbear_log(int priority, const char* format, ...);
42 void fail_assert(const char* expr, const char* file, int line);
42 #ifdef DEBUG_TRACE 43 #ifdef DEBUG_TRACE
43 void dropbear_trace(const char* format, ...); 44 void dropbear_trace(const char* format, ...);
44 void printhex(const char * label, const unsigned char * buf, int len); 45 void printhex(const char * label, const unsigned char * buf, int len);
45 extern int debug_trace; 46 extern int debug_trace;
46 #endif 47 #endif
64 void setnonblocking(int fd); 65 void setnonblocking(int fd);
65 66
66 /* Used to force mp_ints to be initialised */ 67 /* Used to force mp_ints to be initialised */
67 #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL} 68 #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}
68 69
70 /* Dropbear assertion */
71 #define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0)
72
69 #endif /* _DBUTIL_H_ */ 73 #endif /* _DBUTIL_H_ */