=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.377 retrieving revision 1.381 diff -u -p -r1.377 -r1.381 --- mandoc/roff.c 2021/06/27 17:57:55 1.377 +++ mandoc/roff.c 2022/04/13 13:19:34 1.381 @@ -1,6 +1,6 @@ -/* $Id: roff.c,v 1.377 2021/06/27 17:57:55 schwarze Exp $ */ +/* $Id: roff.c,v 1.381 2022/04/13 13:19:34 schwarze Exp $ */ /* - * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze + * Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any @@ -861,6 +861,7 @@ void roff_man_free(struct roff_man *man) { roff_man_free1(man); + free(man->os_r); free(man); } @@ -1400,7 +1401,7 @@ roff_expand(struct roff *r, struct buf *buf, int ln, i term = '\0'; cp = stesc + 1; - if (*cp == 'E') + while (*cp == 'E') cp++; esct = cp; switch (*esct) { @@ -3667,7 +3668,9 @@ roff_char(ROFF_ARGS) case ESCAPE_FONTITALIC: case ESCAPE_FONTBOLD: case ESCAPE_FONTBI: - case ESCAPE_FONTCW: + case ESCAPE_FONTCR: + case ESCAPE_FONTCB: + case ESCAPE_FONTCI: case ESCAPE_FONTPREV: font++; break; @@ -3947,9 +3950,7 @@ roff_userdef(ROFF_ARGS) r->mstacksz += 8; } ctx = r->mstack + r->mstackpos; - ctx->argsz = 0; ctx->argc = 0; - ctx->argv = NULL; /* * Collect pointers to macro argument strings,