aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/xstd.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 13:47:36 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 13:47:36 +0000
commit144a953361b31d61aa5ffd0785aad13f5469f3d6 (patch)
tree67406a99e3d01a2d8c36f7a241304074a4afc3c5 /xstd.c
parent7539dc2101f097466da8b895b680b64f5015d3ef (diff)
downloadmandoc-144a953361b31d61aa5ffd0785aad13f5469f3d6.tar.gz
mandoc-144a953361b31d61aa5ffd0785aad13f5469f3d6.tar.zst
mandoc-144a953361b31d61aa5ffd0785aad13f5469f3d6.zip
Added support for dynamic -width detection for -tag lists.
Diffstat (limited to 'xstd.c')
-rw-r--r--xstd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xstd.c b/xstd.c
index 6442da41..29f52117 100644
--- a/xstd.c
+++ b/xstd.c
@@ -1,4 +1,4 @@
-/* $Id: xstd.c,v 1.5 2009/01/20 22:55:46 kristaps Exp $ */
+/* $Id: xstd.c,v 1.6 2009/02/28 13:47:36 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -63,6 +63,16 @@ xstrlcpy(char *dst, const char *src, size_t 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)
{
void *p;