]> sjero.net Git - wget/commitdiff
[svn] Renamed DEBUG to ENABLE_DEBUG.
authorhniksic <devnull@localhost>
Wed, 8 Oct 2003 00:05:51 +0000 (17:05 -0700)
committerhniksic <devnull@localhost>
Wed, 8 Oct 2003 00:05:51 +0000 (17:05 -0700)
12 files changed:
ChangeLog
configure.in
src/ChangeLog
src/config.h.in
src/host.c
src/http.c
src/init.c
src/log.c
src/main.c
src/options.h
src/wget.h
windows/Makefile.src

index dfd420463b6d374ce8710b621cd334381b0ae79e..1d16804df8d760c47408fd9f101c37c5dbbb0f5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * configure.in: Renamed DEBUG to ENABLE_DEBUG.
+
 2003-10-04  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * libtool.m4: New file with contents imported from libtool.
index 681b157b27677016bfae2a9739863f3445793f0b..3476f89ecbb8c8e25297863bc31e84aa91fd61d3 100644 (file)
@@ -71,8 +71,8 @@ test x"${USE_DIGEST}" = xyes && AC_DEFINE(USE_DIGEST)
 
 AC_ARG_ENABLE(debug,
 [  --disable-debug         disable support for debugging output],
-DEBUG=$enableval, DEBUG=yes)
-test x"${DEBUG}" = xyes && AC_DEFINE(DEBUG)
+ENABLE_DEBUG=$enableval, ENABLE_DEBUG=yes)
+test x"${ENABLE_DEBUG}" = xyes && AC_DEFINE(ENABLE_DEBUG)
 
 wget_need_md5=no
 
index 91905e6ea8f1adde30fcce967147b28f0740a8ec..bc2d75730631b9e0a07e6539f11991522a698c59 100644 (file)
@@ -1,3 +1,10 @@
+2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * config.h.in: Renamed DEBUG to ENABLE_DEBUG.  ENABLE_DEBUG is, I
+       think, a better name, because it implies that debugging output is
+       merely possible, not "on by default", as might be construed from
+       just DEBUG.
+
 2003-10-08  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * ftp.c (has_insecure_name_p): Define it here.
index 46807377f80bf9001778c1c83b6feb4d35ee77a7..b9fc24b8ec1f34b46461e60e4cf2277a639444b9 100644 (file)
@@ -101,7 +101,7 @@ char *alloca ();
 #undef USE_DIGEST
 
 /* Define if you want the debug output support compiled in.  */
-#undef DEBUG
+#undef ENABLE_DEBUG
 
 /* Define if you have sys/time.h header.  */
 #undef HAVE_SYS_TIME_H
index 489adbcc700211a25476f0fcbfa3c67adc9788e1..601487aeecabb6e25209f80a867813102d90543f 100644 (file)
@@ -585,7 +585,7 @@ cache_host_lookup (const char *host, struct address_list *al)
   ++al->refcount;
   hash_table_put (host_name_addresses_map, xstrdup_lower (host), al);
 
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
   if (opt.debug)
     {
       int i;
index cd48d9b9d94c2d01a1f1b1070b59a26ea7077e43..20010de013199f43069ab120af1412df5e69fbd0 100644 (file)
@@ -1136,7 +1136,7 @@ Accept: %s\r\n\
            hs->error = xstrdup (error);
 
          if ((statcode != -1)
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
              && !opt.debug
 #endif
              )
index 8d586b172db999bd4f0d3fe0222f4f152dd09fed..0cd65ae5f1c6ce3c8ab3dff9653b47dd2d86fa83 100644 (file)
@@ -128,7 +128,7 @@ static struct {
   { "convertlinks",    &opt.convert_links,     cmd_boolean },
   { "cookies",         &opt.cookies,           cmd_boolean },
   { "cutdirs",         &opt.cut_dirs,          cmd_number },
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
   { "debug",           &opt.debug,             cmd_boolean },
 #endif
   { "deleteafter",     &opt.delete_after,      cmd_boolean },
index 578b0c1f5520e7e5b666473eed6426169fced05e..8ef12520e84304e2e700750f07ebe726dd81c87a 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -509,7 +509,7 @@ logprintf (enum log_options o, const char *fmt, ...)
   while (!done);
 }
 
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
 /* The same as logprintf(), but does anything only if opt.debug is
    non-zero.  */
 void
@@ -535,7 +535,7 @@ debug_logprintf (const char *fmt, ...)
       while (!done);
     }
 }
-#endif /* DEBUG */
+#endif /* ENABLE_DEBUG */
 \f
 /* Open FILE and set up a logging stream.  If FILE cannot be opened,
    exit with status of 1.  */
index 42ba42d2ae557da46cd28ff59560d1d7707a6861..b69fb002671f0ae437f012dd358ece6a18afe767 100644 (file)
@@ -459,12 +459,12 @@ hpVqvdkKsxmNWrHSLcFbEY:G:g:T:U:O:l:n:i:o:a:t:D:A:R:P:B:e:Q:X:I:w:C:",
          setoptval ("continue", "on");
          break;
        case 'd':
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
          setoptval ("debug", "on");
-#else  /* not DEBUG */
+#else
          fprintf (stderr, _("%s: debug support not compiled in.\n"),
                   exec_name);
-#endif /* not DEBUG */
+#endif
          break;
        case 'E':
          setoptval ("htmlextension", "on");
index 9df52f0a8aeefa0c8247d4e035e24c5e8091d20d..9895e825c2826b09e0719874f9ee6479a6152633 100644 (file)
@@ -130,9 +130,9 @@ struct options
   int save_headers;            /* Do we save headers together with
                                   file? */
 
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
   int debug;                   /* Debugging on/off */
-#endif /* DEBUG */
+#endif
 
   int timestamping;            /* Whether to use time-stamping. */
 
index 4dfe86bd7d6fd15a27da1ebc69597a0db60ab7dc..e742d47abffe09848e239a2a4ffe893a89a1cd39 100644 (file)
@@ -34,9 +34,10 @@ so, delete this exception statement from your version.  */
 #ifndef WGET_H
 #define WGET_H
 
-#ifndef DEBUG
-# define NDEBUG /* To kill off assertions */
-#endif /* not DEBUG */
+/* Disable assertions when debug support is not compiled in. */
+#ifndef ENABLE_DEBUG
+# define NDEBUG
+#endif
 
 /* Define this if you want primitive but extensive malloc debugging.
    It will make Wget extremely slow, so only do it in development
@@ -65,7 +66,7 @@ so, delete this exception statement from your version.  */
 /* No-op version of gettext, used for constant strings. */
 #define N_(string) (string)
 
-/* I18N NOTE: You will notice that none of the DEBUG messages are
+/* I18N NOTE: You will notice that none of the DEBUGP messages are
    marked as translatable.  This is intentional, for a few reasons:
 
    1) The debug messages are not meant for the users to look at, but
@@ -90,11 +91,11 @@ so, delete this exception statement from your version.  */
 #define DO_NOTHING do {} while (0)
 
 /* Print X if debugging is enabled; a no-op otherwise.  */
-#ifdef DEBUG
+#ifdef ENABLE_DEBUG
 # define DEBUGP(x) do { if (opt.debug) { debug_logprintf x; } } while (0)
-#else  /* not DEBUG */
+#else  /* not ENABLE_DEBUG */
 # define DEBUGP(x) DO_NOTHING
-#endif /* not DEBUG */
+#endif /* not ENABLE_DEBUG */
 
 /* Make gcc check for the format of logmsg() and debug_logmsg().  */
 #ifdef __GNUC__
index 98e3b13242527e79ba09809b044ec62a9c213619..c881c7f7d963e80e74089d891662953363462e5f 100644 (file)
@@ -46,7 +46,7 @@ CC       = cl
 LD       = link
 
 CFLAGS   = /nologo /MT /W0 /O2
-#DEBUGCF  = /DDEBUG /Zi /Od #/Fd /FR
+#DEBUGCF  = /DENABLE_DEBUG /Zi /Od #/Fd /FR
 CPPFLAGS = 
 DEFS     = /DWINDOWS /D_CONSOLE /DHAVE_CONFIG_H /DSYSTEM_WGETRC=\"wgetrc\"
 LDFLAGS  = /subsystem:console /incremental:no /warn:3