diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-14 16:43:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-14 16:43:43 +0000 |
commit | bddcaddd71aa306d9c5a606bc7ece6e2812925c5 (patch) | |
tree | cacfd28f1b6b5861bfa32dfeb9551fabcb76bf3c /man_macro.c | |
parent | 525559c24a4e02693f443d611b8920564a497f85 (diff) | |
download | mandoc-bddcaddd71aa306d9c5a606bc7ece6e2812925c5.tar.gz |
support for hunting memory leaks;
designed and written last autumn, polished today
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/man_macro.c b/man_macro.c index e16a6a74..9157ee65 100644 --- a/man_macro.c +++ b/man_macro.c @@ -26,6 +26,9 @@ #include <stdlib.h> #include <string.h> +#if DEBUG_MEMORY +#include "mandoc_dbg.h" +#endif #include "mandoc.h" #include "roff.h" #include "man.h" @@ -394,6 +397,11 @@ in_line_eoln(MACRO_PROT_ARGS) else if (tok == MAN_EE) man->flags &= ~ROFF_NOFILL; +#if DEBUG_MEMORY + if (tok == MAN_TH) + mandoc_dbg_name(buf); +#endif + for (;;) { if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) { mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos, |