diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-28 13:47:36 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-28 13:47:36 +0000 |
commit | f1be851316db6766465ba5fa434d98d9d17394d4 (patch) | |
tree | 1c289fced2bbca2b75490376acf02e80e879a391 /xstd.c | |
parent | 298505dc44c0dc7c7349e4cc246e6cf76c55b5e5 (diff) | |
download | mandoc-f1be851316db6766465ba5fa434d98d9d17394d4.tar.gz |
Added support for dynamic -width detection for -tag lists.
Diffstat (limited to 'xstd.c')
-rw-r--r-- | xstd.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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; |