]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] Move extern declarations to .h files.
[wget] / src / wget.h
index 21fa88104c7c5be5ea4b1215d8c37aa9da00ee3b..6a0756b0acdda251c883b57e009cc2ff2ba7810e 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
@@ -242,7 +247,7 @@ typedef double SUM_SIZE_INT;
    using printf ("%0*lx", PTR_FORMAT (p)).  (%p is too unpredictable;
    some implementations prepend 0x, while some don't, and most don't
    0-pad the address.)  */
-#define PTR_FORMAT(p) 2 * sizeof (void *), (unsigned long) (p)
+#define PTR_FORMAT(p) (int) (2 * sizeof (void *)), (unsigned long) (p)
 
 extern const char *exec_name;
 \f