PROF_stop(xstrdup);
return p;
return (char *)p;
}
/*
xstrndup(const char *s, size_t n)
{
size_t sz;
void *p;
char *p;
PROF_start(xstrndup);
assert(s != NULL);
assert(n);
if (sz > n)
sz = n;
p = xstrncpy(xmalloc(sz), s, sz);
p = xstrncpy((char *)xmalloc(sz), s, sz);
PROF_stop(xstrndup);
xint64toa(int64_t num)
static char buf[24]; /* 2^64 = 18446744073709551616 */
snprintf(buf, sizeof(buf), "%" PRId64, num);
snprintf(buf, sizeof(buf), "%" PRId64, (long long int)num);
return buf;