xref: /illumos-gate/usr/src/cmd/mandoc/mandoc_aux.h (revision c66b8046)
1*c66b8046SYuri Pankov /*	$Id: mandoc_aux.h,v 1.7 2017/06/12 19:05:47 schwarze Exp $ */
295c635efSGarrett D'Amore /*
3260e9a87SYuri Pankov  * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4*c66b8046SYuri Pankov  * Copyright (c) 2014, 2017 Ingo Schwarze <schwarze@openbsd.org>
595c635efSGarrett D'Amore  *
695c635efSGarrett D'Amore  * Permission to use, copy, modify, and distribute this software for any
795c635efSGarrett D'Amore  * purpose with or without fee is hereby granted, provided that the above
895c635efSGarrett D'Amore  * copyright notice and this permission notice appear in all copies.
995c635efSGarrett D'Amore  *
1095c635efSGarrett D'Amore  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1195c635efSGarrett D'Amore  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1295c635efSGarrett D'Amore  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1395c635efSGarrett D'Amore  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1495c635efSGarrett D'Amore  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1595c635efSGarrett D'Amore  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1695c635efSGarrett D'Amore  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1795c635efSGarrett D'Amore  */
1895c635efSGarrett D'Amore 
19a40ea1a7SYuri Pankov int		  mandoc_asprintf(char **, const char *, ...)
20a40ea1a7SYuri Pankov 			__attribute__((__format__ (__printf__, 2, 3)));
21260e9a87SYuri Pankov void		 *mandoc_calloc(size_t, size_t);
22260e9a87SYuri Pankov void		 *mandoc_malloc(size_t);
23260e9a87SYuri Pankov void		 *mandoc_realloc(void *, size_t);
24260e9a87SYuri Pankov void		 *mandoc_reallocarray(void *, size_t, size_t);
25*c66b8046SYuri Pankov void		 *mandoc_recallocarray(void *, size_t, size_t, size_t);
26260e9a87SYuri Pankov char		 *mandoc_strdup(const char *);
27260e9a87SYuri Pankov char		 *mandoc_strndup(const char *, size_t);
28