Introduce a fetchDebug global. Change the DEBUG macro so it only runs the

debugging code if fetchDebug is set.

PR:		bin/32615
MFC after:	1 week
This commit is contained in:
des 2001-12-09 15:05:19 +00:00
parent fcc97a61ad
commit a9520ca9d7
3 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,7 @@ int _fetch_add_entry(struct url_ent **, int *, int *,
#define _url_seterr(n) _fetch_seterr(_url_errlist, n)
#ifndef NDEBUG
#define DEBUG(x) do x; while (0)
#define DEBUG(x) do { if (fetchDebug) { x; } } while (0)
#else
#define DEBUG(x) do { } while (0)
#endif

View File

@ -45,6 +45,7 @@ int fetchLastErrCode;
char fetchLastErrString[MAXERRSTRING];
int fetchTimeout;
int fetchRestartCalls = 1;
int fetchDebug;
/*** Local data **************************************************************/

View File

@ -136,4 +136,7 @@ extern char fetchLastErrString[MAXERRSTRING];
extern int fetchTimeout;
extern int fetchRestartCalls;
/* Extra verbosity */
extern int fetchDebug;
#endif