From 3a893fb581eb6130b6f93f519885edba4a196d5d Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 30 Jun 2011 08:05:13 +0000 Subject: Ouch: predefined strings moved into roff.c weren't being reinitalised after the first parse. Do this, but note there are more efficient ways just waiting for a table of macros. --- roff.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'roff.c') diff --git a/roff.c b/roff.c index 92a4a9b3..8f74edf0 100644 --- a/roff.c +++ b/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.142 2011/05/26 11:58:25 kristaps Exp $ */ +/* $Id: roff.c,v 1.143 2011/06/30 08:05:13 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -347,8 +347,12 @@ roff_free1(struct roff *r) void roff_reset(struct roff *r) { + int i; roff_free1(r); + + for (i = 0; i < PREDEFS_MAX; i++) + roff_setstr(r, predefs[i].name, predefs[i].str, 0); } -- cgit v1.2.3