aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 08:49:34 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 08:49:34 +0000
commit92c367a844f2f26d325d4ee6ca032894e94f7a06 (patch)
tree8c7d641577d7b35e6831d1f5756bed740c14c362 /mandoc.h
parentcc5eaab1fc61af7bb315ef9938831121ef7ad4bc (diff)
downloadmandoc-92c367a844f2f26d325d4ee6ca032894e94f7a06.tar.gz
mandoc-92c367a844f2f26d325d4ee6ca032894e94f7a06.tar.zst
mandoc-92c367a844f2f26d325d4ee6ca032894e94f7a06.zip
Move mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.h
so that everybody can use them. This follows the convention of libXXXX.h being internal to a library and XXXX.h being the external interface. Not only does this allow the removal of lots of redundant NULL-checking code, it also sets the tone for adding new mandoc-global routines.
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/mandoc.h b/mandoc.h
index b5984b26..ad0345db 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.58 2011/03/07 01:35:51 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.59 2011/03/17 08:49:34 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -312,14 +312,14 @@ struct regset {
struct reg regs[REG__MAX];
};
+typedef int (*mandocmsg)(enum mandocerr, void *,
+ int, int, const char *);
+
__BEGIN_DECLS
-/*
- * Callback function for warnings, errors, and fatal errors as they
- * occur in the compilers libroff, libmdoc, and libman.
- */
-typedef int (*mandocmsg)(enum mandocerr, void *,
- int, int, const char *);
+void *mandoc_calloc(size_t, size_t);
+void *mandoc_malloc(size_t);
+void *mandoc_realloc(void *, size_t);
__END_DECLS