-/* $Id: xstd.c,v 1.5 2009/01/20 22:55:46 kristaps Exp $ */
+/* $Id: xstd.c,v 1.7 2009/03/06 14:13:47 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
return(strlcpy(dst, src, sz) < sz);
}
+void *
+xrealloc(void *ptr, size_t sz)
+{
+ void *p;
+
+ if (NULL == (p = realloc(ptr, sz)))
+ err(EXIT_FAILURE, "realloc");
+ return(p);
+}
+
void *
xcalloc(size_t num, size_t sz)
{
}
int
-xstrlcats(char *buf, const struct mdoc_node *n, size_t sz)
+xstrlcpys(char *buf, const struct mdoc_node *n, size_t sz)
{
char *p;