debug.c (132943) | debug.c (141858) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers. | 2 * Copyright (c) 2000, 2001, 2003, 2004 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 */ 9 10#include <sm/gen.h> | 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 10#include <sm/gen.h> |
11SM_RCSID("@(#)$Id: debug.c,v 1.29 2003/01/10 00:26:06 ca Exp $") | 11SM_RCSID("@(#)$Id: debug.c,v 1.30 2004/08/03 20:10:26 ca Exp $") |
12 13/* 14** libsm debugging and tracing 15** For documentation, see debug.html. 16*/ 17 18#include <ctype.h> 19#include <stdlib.h> 20#include <setjmp.h> 21#include <sm/io.h> 22#include <sm/assert.h> 23#include <sm/conf.h> 24#include <sm/debug.h> 25#include <sm/string.h> 26#include <sm/varargs.h> 27#include <sm/heap.h> 28 | 12 13/* 14** libsm debugging and tracing 15** For documentation, see debug.html. 16*/ 17 18#include <ctype.h> 19#include <stdlib.h> 20#include <setjmp.h> 21#include <sm/io.h> 22#include <sm/assert.h> 23#include <sm/conf.h> 24#include <sm/debug.h> 25#include <sm/string.h> 26#include <sm/varargs.h> 27#include <sm/heap.h> 28 |
29static void sm_debug_reset __P((void)); 30static const char *parse_named_setting_x __P((const char *)); 31 |
|
29/* 30** Abstractions for printing trace messages. 31*/ 32 33/* 34** The output file to which trace output is directed. 35** There is a controversy over whether this variable 36** should be process global or thread local. --- 145 unchanged lines hidden (view full) --- 182** 183** Parameters: 184** none. 185** 186** Returns: 187** none. 188*/ 189 | 32/* 33** Abstractions for printing trace messages. 34*/ 35 36/* 37** The output file to which trace output is directed. 38** There is a controversy over whether this variable 39** should be process global or thread local. --- 145 unchanged lines hidden (view full) --- 185** 186** Parameters: 187** none. 188** 189** Returns: 190** none. 191*/ 192 |
190void | 193static void |
191sm_debug_reset() 192{ 193 SM_DEBUG_T *debug; 194 195 for (debug = SmDebugInitialized; 196 debug != NULL; 197 debug = debug->debug_next) 198 { --- 50 unchanged lines hidden (view full) --- 249** F:sm.heap -- out of memory. 250** 251** Side Effects: 252** adds the setting to the database. 253*/ 254 255static const char * 256parse_named_setting_x(s) | 194sm_debug_reset() 195{ 196 SM_DEBUG_T *debug; 197 198 for (debug = SmDebugInitialized; 199 debug != NULL; 200 debug = debug->debug_next) 201 { --- 50 unchanged lines hidden (view full) --- 252** F:sm.heap -- out of memory. 253** 254** Side Effects: 255** adds the setting to the database. 256*/ 257 258static const char * 259parse_named_setting_x(s) |
257 register const char *s; | 260 const char *s; |
258{ 259 const char *pat, *endpat; 260 int level; 261 262 pat = s; 263 while (*s != '\0' && *s != ',' && *s != '.') 264 ++s; 265 endpat = s; --- 44 unchanged lines hidden (view full) --- 310** F:sm.heap -- out of memory 311** 312** Side Effects: 313** updates the database of debug settings. 314*/ 315 316void 317sm_debug_addsettings_x(s) | 261{ 262 const char *pat, *endpat; 263 int level; 264 265 pat = s; 266 while (*s != '\0' && *s != ',' && *s != '.') 267 ++s; 268 endpat = s; --- 44 unchanged lines hidden (view full) --- 313** F:sm.heap -- out of memory 314** 315** Side Effects: 316** updates the database of debug settings. 317*/ 318 319void 320sm_debug_addsettings_x(s) |
318 register const char *s; | 321 const char *s; |
319{ 320 for (;;) 321 { 322 if (*s == '\0') 323 return; 324 if (*s == ',') 325 { 326 ++s; --- 65 unchanged lines hidden --- | 322{ 323 for (;;) 324 { 325 if (*s == '\0') 326 return; 327 if (*s == ',') 328 { 329 ++s; --- 65 unchanged lines hidden --- |