debug.h (98121) | debug.h (132943) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. | 2 * Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers. |
3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * | 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * |
9 * $Id: debug.h,v 1.15 2001/03/08 03:23:07 ca Exp $ | 9 * $Id: debug.h,v 1.16 2003/01/10 00:26:06 ca Exp $ |
10 */ 11 12/* 13** libsm debugging and tracing 14** See libsm/debug.html for documentation. 15*/ 16 17#ifndef SM_DEBUG_H --- 5 unchanged lines hidden (view full) --- 23/* 24** abstractions for printing trace messages 25*/ 26 27extern SM_FILE_T * 28sm_debug_file __P((void)); 29 30extern void | 10 */ 11 12/* 13** libsm debugging and tracing 14** See libsm/debug.html for documentation. 15*/ 16 17#ifndef SM_DEBUG_H --- 5 unchanged lines hidden (view full) --- 23/* 24** abstractions for printing trace messages 25*/ 26 27extern SM_FILE_T * 28sm_debug_file __P((void)); 29 30extern void |
31sm_debug_setfile __P(( 32 SM_FILE_T *)); | 31sm_debug_setfile __P(( SM_FILE_T *)); |
33 34extern void PRINTFLIKE(1, 2) | 32 33extern void PRINTFLIKE(1, 2) |
35sm_dprintf __P(( 36 char *_fmt, 37 ...)); | 34sm_dprintf __P((char *_fmt, ...)); |
38 39extern void 40sm_dflush __P((void)); 41 | 35 36extern void 37sm_dflush __P((void)); 38 |
39extern void 40sm_debug_close __P((void)); 41 |
|
42/* 43** abstractions for setting and testing debug activation levels 44*/ 45 46extern void | 42/* 43** abstractions for setting and testing debug activation levels 44*/ 45 46extern void |
47sm_debug_addsettings_x __P(( 48 const char *)); | 47sm_debug_addsettings_x __P((const char *)); |
49 50extern void | 48 49extern void |
51sm_debug_addsetting_x __P(( 52 const char *, 53 int)); | 50sm_debug_addsetting_x __P((const char *, int)); |
54 55# define SM_DEBUG_UNKNOWN ((SM_ATOMIC_UINT_T)(-1)) 56 57extern const char SmDebugMagic[]; 58 59typedef struct sm_debug SM_DEBUG_T; 60struct sm_debug 61{ --- 56 unchanged lines hidden (view full) --- 118# define sm_debug_unknown(debug) ((debug)->debug_level == SM_DEBUG_UNKNOWN) 119# else /* SM_DEBUG_CHECK */ 120# define sm_debug_active(debug, level) 0 121# define sm_debug_level(debug) 0 122# define sm_debug_unknown(debug) 0 123# endif /* SM_DEBUG_CHECK */ 124 125extern bool | 51 52# define SM_DEBUG_UNKNOWN ((SM_ATOMIC_UINT_T)(-1)) 53 54extern const char SmDebugMagic[]; 55 56typedef struct sm_debug SM_DEBUG_T; 57struct sm_debug 58{ --- 56 unchanged lines hidden (view full) --- 115# define sm_debug_unknown(debug) ((debug)->debug_level == SM_DEBUG_UNKNOWN) 116# else /* SM_DEBUG_CHECK */ 117# define sm_debug_active(debug, level) 0 118# define sm_debug_level(debug) 0 119# define sm_debug_unknown(debug) 0 120# endif /* SM_DEBUG_CHECK */ 121 122extern bool |
126sm_debug_loadactive __P(( 127 SM_DEBUG_T *, 128 int)); | 123sm_debug_loadactive __P((SM_DEBUG_T *, int)); |
129 130extern int | 124 125extern int |
131sm_debug_loadlevel __P(( 132 SM_DEBUG_T *)); | 126sm_debug_loadlevel __P((SM_DEBUG_T *)); |
133 134# define SM_DEBUG_INITIALIZER(name, desc) { \ 135 SmDebugMagic, \ 136 SM_DEBUG_UNKNOWN, \ 137 name, \ 138 desc, \ 139 NULL} 140 141#endif /* ! SM_DEBUG_H */ | 127 128# define SM_DEBUG_INITIALIZER(name, desc) { \ 129 SmDebugMagic, \ 130 SM_DEBUG_UNKNOWN, \ 131 name, \ 132 desc, \ 133 NULL} 134 135#endif /* ! SM_DEBUG_H */ |