]> sjero.net Git - wget/commitdiff
[svn] Better document DEBUGP.
authorhniksic <devnull@localhost>
Sun, 26 Jun 2005 21:48:39 +0000 (14:48 -0700)
committerhniksic <devnull@localhost>
Sun, 26 Jun 2005 21:48:39 +0000 (14:48 -0700)
src/wget.h

index 21fa88104c7c5be5ea4b1215d8c37aa9da00ee3b..d598cccb7578aa118c0e267ab9a11960e746838a 100644 (file)
@@ -107,7 +107,12 @@ so, delete this exception statement from your version.  */
 # define IF_DEBUG if (0)
 #endif
 
-#define DEBUGP(x) do { IF_DEBUG { debug_logprintf x; } } while (0)
+/* Print ARGS if debugging is enabled and requested, otherwise do
+   nothing.  This must be called with an extra level of parentheses
+   because it's not possible to pass a variable number of arguments to
+   a macro (in portable C89).  ARGS are like arguments to printf.  */
+
+#define DEBUGP(args) do { IF_DEBUG { debug_logprintf args; } } while (0)
 
 /* Define an integer type that works for file sizes, content lengths,
    and such.  Normally we could just use off_t, but off_t is always