=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.367 retrieving revision 1.369 diff -u -p -r1.367 -r1.369 --- mandoc/roff.c 2019/11/09 14:39:49 1.367 +++ mandoc/roff.c 2020/01/19 18:02:00 1.369 @@ -1,7 +1,7 @@ -/* $Id: roff.c,v 1.367 2019/11/09 14:39:49 schwarze Exp $ */ +/* $Id: roff.c,v 1.369 2020/01/19 18:02:00 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons - * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze + * Copyright (c) 2010-2015, 2017-2020 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 @@ -355,7 +355,7 @@ const char *__roff_name[MAN_MAX + 1] = { "Lk", "Mt", "Brq", "Bro", "Brc", "%C", "Es", "En", "Dx", "%Q", "%U", "Ta", - NULL, + "Tg", NULL, "TH", "SH", "SS", "TP", "TQ", "LP", "PP", "P", "IP", @@ -2294,12 +2294,24 @@ roff_cond_sub(ROFF_ARGS) } } + t = roff_parse(r, buf->buf, &pos, ln, ppos); + + /* For now, let high level macros abort .ce mode. */ + + if (roffce_node != NULL && + (t == TOKEN_NONE || t == ROFF_Dd || t == ROFF_EQ || + t == ROFF_TH || t == ROFF_TS)) { + r->man->last = roffce_node; + r->man->next = ROFF_NEXT_SIBLING; + roffce_lines = 0; + roffce_node = NULL; + } + /* * Fully handle known macros when they are structurally * required or when the conditional evaluated to true. */ - t = roff_parse(r, buf->buf, &pos, ln, ppos); if (t == ROFF_break) { if (irc & ROFF_LOOPMASK) irc = ROFF_IGN | ROFF_LOOPEXIT;