diff options
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -819,18 +819,25 @@ roff_man_free1(struct roff_man *man) free(man->meta.sodest); } +void +roff_state_reset(struct roff_man *man) +{ + man->last = man->meta.first; + man->last_es = NULL; + man->flags = 0; + man->lastsec = man->lastnamed = SEC_NONE; + man->next = ROFF_NEXT_CHILD; + roff_setreg(man->roff, "nS", 0, '='); +} + static void roff_man_alloc1(struct roff_man *man) { memset(&man->meta, 0, sizeof(man->meta)); man->meta.first = mandoc_calloc(1, sizeof(*man->meta.first)); man->meta.first->type = ROFFT_ROOT; - man->last = man->meta.first; - man->last_es = NULL; - man->flags = 0; man->meta.macroset = MACROSET_NONE; - man->lastsec = man->lastnamed = SEC_NONE; - man->next = ROFF_NEXT_CHILD; + roff_state_reset(man); } void |