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:
Dag-Erling Smørgrav 2001-12-09 15:05:19 +00:00
parent d1f21093cd
commit 7eb2f34d73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87560
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