=================================================================== RCS file: /cvs/mandoc/mandocd.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- mandoc/mandocd.c 2020/06/14 23:40:31 1.12 +++ mandoc/mandocd.c 2022/04/14 16:43:44 1.13 @@ -1,7 +1,7 @@ -/* $Id: mandocd.c,v 1.12 2020/06/14 23:40:31 schwarze Exp $ */ +/* $Id: mandocd.c,v 1.13 2022/04/14 16:43:44 schwarze Exp $ */ /* * Copyright (c) 2017 Michael Stapelberg - * Copyright (c) 2017, 2019 Ingo Schwarze + * Copyright (c) 2017, 2019, 2021 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -35,6 +35,10 @@ #include #include "mandoc.h" +#if DEBUG_MEMORY +#define DEBUG_NODEF 1 +#include "mandoc_dbg.h" +#endif #include "roff.h" #include "mdoc.h" #include "man.h" @@ -129,6 +133,10 @@ main(int argc, char *argv[]) int state, opt; enum outt outtype; +#if DEBUG_MEMORY + mandoc_dbg_init(argc, argv); +#endif + defos = NULL; outtype = OUTT_ASCII; while ((opt = getopt(argc, argv, "I:T:")) != -1) { @@ -240,6 +248,9 @@ main(int argc, char *argv[]) } mparse_free(parser); mchars_free(); +#if DEBUG_MEMORY + mandoc_dbg_finish(); +#endif return state == -1 ? 1 : 0; }