* mdocml: Fix a quirk with respect to empty .HP.
@ 2015-04-04 11:45 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-04-04 11:45 UTC (permalink / raw)
To: source
Log Message:
-----------
Fix a quirk with respect to empty .HP.
Found while writing a regression test for man_macro.c rev. 1.66.
Incidentally, this brings rendering of XFreeEventData(3) closer to groff.
Modified Files:
--------------
mdocml:
man_term.c
Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_term.c,v
retrieving revision 1.173
retrieving revision 1.174
diff -Lman_term.c -Lman_term.c -u -p -r1.173 -r1.174
--- man_term.c
+++ man_term.c
@@ -533,6 +533,17 @@ post_HP(DECL_ARGS)
switch (n->type) {
case ROFFT_BODY:
term_newln(p);
+
+ /*
+ * Compatibility with a groff bug.
+ * The .HP macro uses the undocumented .tag request
+ * which causes a line break and cancels no-space
+ * mode even if there isn't any output.
+ */
+
+ if (n->child == NULL)
+ term_vspace(p);
+
p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND);
p->trailspace = 0;
p->offset = mt->offset;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-04 11:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-04 11:45 mdocml: Fix a quirk with respect to empty .HP schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).