/*
- * $Id: util.h,v 1.61 2001/10/08 16:18:31 hno Exp $
+ * $Id: util.h,v 1.62 2001/10/17 01:36:07 hno Exp $
*
* AUTHOR: Harvest Derived
*
extern char *xstrncpy(char *, const char *, size_t);
extern size_t xcountws(const char *str);
extern time_t parse_rfc1123(const char *str);
-extern void *xcalloc(int, size_t);
+extern void *xcalloc(size_t, size_t);
extern void *xmalloc(size_t);
extern void *xrealloc(void *, size_t);
extern void Tolower(char *);
/*
- * $Id: util.c,v 1.79 2001/06/29 14:48:06 hno Exp $
+ * $Id: util.c,v 1.80 2001/10/17 01:36:05 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
* Never returns NULL; fatal on error.
*/
void *
-xcalloc(int n, size_t sz)
+xcalloc(size_t n, size_t sz)
{
void *p;
sz = 1;
if ((p = calloc(n, sz)) == NULL) {
if (failure_notify) {
- snprintf(msg, 128, "xcalloc: Unable to allocate %d blocks of %d bytes!\n",
- (int) n, (int) sz);
+ snprintf(msg, 128, "xcalloc: Unable to allocate %u blocks of %u bytes!\n",
+ (unsigned int) n, (unsigned int) sz);
(*failure_notify) (msg);
} else {
perror("xcalloc");
#endif
#if MEM_GEN_TRACE
if (tracefp)
- fprintf(tracefp, "c:%d:%d:%p\n", n, sz, p);
+ fprintf(tracefp, "c:%u:%u:%p\n", (unsigned int)n, (unsigned int)sz, p);
#endif
return (p);
}