]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] Don't cast return type of malloc/realloc. Assume ANSI C signal handlers.
[wget] / src / wget.h
index d2f207eb51f1fc33ade282ca9b51b75509ea095b..d382d3da91f2225aa6db3c36b298e78c1a7f00f7 100644 (file)
@@ -40,21 +40,15 @@ so, delete this exception statement from your version.  */
 # define NDEBUG
 #endif
 
-#ifndef PARAMS
-# if PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* `gettext (FOO)' is long to write, so we use `_(FOO)'.  If NLS is
    unavailable, _(STRING) simply returns STRING.  */
 #ifdef HAVE_NLS
 # define _(string) gettext (string)
 # ifdef HAVE_LIBINTL_H
 #  include <libintl.h>
-# endif /* HAVE_LIBINTL_H */
+# else  /* not HAVE_LIBINTL_H */
+   const char *gettext ();
+# endif /* not HAVE_LIBINTL_H */
 #else  /* not HAVE_NLS */
 # define _(string) (string)
 #endif /* not HAVE_NLS */
@@ -219,9 +213,15 @@ typedef off_t wgint;
     (sizevar) = DR_newsize;                                            \
   }                                                                    \
   if (DR_newsize)                                                      \
-    basevar = (type *)xrealloc (basevar, DR_newsize * sizeof (type));  \
+    basevar = xrealloc (basevar, DR_newsize * sizeof (type));          \
 } while (0)
 
+/* Used to print pointers (usually for debugging).  Print pointers
+   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)
+
 extern const char *exec_name;
 \f
 /* Document type ("dt") flags */
@@ -252,8 +252,7 @@ typedef enum
   CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED, READERR, TRYLIMEXC,
   URLBADPATTERN, FILEBADFILE, RANGEERR, RETRBADPATTERN,
   RETNOTSUP, ROBOTSOK, NOROBOTS, PROXERR, AUTHFAILED,
-  QUOTEXC, WRITEFAILED,
-  SSLERRCERTFILE,SSLERRCERTKEY,SSLERRCTXCREATE
+  QUOTEXC, WRITEFAILED, SSLINITFAILED
 } uerr_t;
 
 #endif /* WGET_H */