weird place. Move it to the obviously correct place.
Surprisingly, this didn't cause any misformatting in the test suite
or in any base system manuals, but i cannot believe the code was
really correct for all conceivable input, and it would be very hard
to verify. At the very least, it cannot have worked for man(7).
-/* $OpenBSD: mdoc_macro.c,v 1.154 2015/05/01 15:27:17 schwarze Exp $ */
+/* $OpenBSD: mdoc_macro.c,v 1.155 2015/05/01 16:01:53 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
static void
rew_last(struct roff_man *mdoc, const struct roff_node *to)
{
- struct roff_node *n, *np;
+ struct roff_node *np;
if (to->flags & MDOC_VALID)
return;
*/
np = mdoc->last->parent;
mdoc_valid_post(mdoc);
- n = mdoc->last;
mdoc->last = np;
assert(mdoc->last);
- mdoc->last->last = n;
}
mdoc_valid_post(mdoc);
}
-/* $OpenBSD: roff.c,v 1.141 2015/04/23 16:17:04 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.142 2015/05/01 16:01:53 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
/* NOTREACHED */
}
n->parent->nchild++;
+ n->parent->last = n;
/*
* Copy over the normalised-data pointer of our parent. Not