source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: In groff, when the .SY block macro occurs in no-fill mode, the
@ 2019-01-05 21:18 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-01-05 21:18 UTC (permalink / raw)
  To: source

Log Message:
-----------
In groff, when the .SY block macro occurs in no-fill mode,
the output line gets broken after the head.  Do the same.

Modified Files:
--------------
    mandoc:
        man_term.c
    mandoc/regress/man:
        Makefile

Added Files:
-----------
    mandoc/regress/man/SY:
        Makefile
        literal.in
        literal.out_ascii

Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_term.c,v
retrieving revision 1.227
retrieving revision 1.228
diff -Lman_term.c -Lman_term.c -u -p -r1.227 -r1.228
--- man_term.c
+++ man_term.c
@@ -833,7 +833,9 @@ pre_SY(DECL_ARGS)
 	case ROFFT_HEAD:
 		p->tcol->offset = mt->offset;
 		p->tcol->rmargin = mt->offset + len;
-		p->flags |= TERMP_NOBREAK;
+		if (n->next->child == NULL ||
+		    (n->next->child->flags & NODE_NOFILL) == 0)
+			p->flags |= TERMP_NOBREAK;
 		term_fontrepl(p, TERMFONT_BOLD);
 		break;
 	case ROFFT_BODY:
Index: Makefile
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/Makefile -Lregress/man/Makefile -u -p -r1.2 -r1.3
--- regress/man/Makefile
+++ regress/man/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.17 2015/03/20 16:09:25 schwarze Exp $
+# $OpenBSD: Makefile,v 1.19 2019/01/05 21:13:55 schwarze Exp $
 
-SUBDIR = B BI EX HP IP MT OP PD PP RS SH SS TH TP TS UR nf blank
+SUBDIR = B BI EX HP IP MT OP PD PP RS SH SS SY TH TP TS UR nf blank
 
 .include "../Makefile.sub"
 .include <bsd.subdir.mk>
--- /dev/null
+++ regress/man/SY/literal.in
@@ -0,0 +1,32 @@
+.\" $OpenBSD: literal.in,v 1.1 2019/01/05 21:13:55 schwarze Exp $
+.TH SY-LITERAL 1 "January 5, 2019"
+.SH NAME
+SY-literal \- synopsis block in literal context
+.SH DESCRIPTION
+BEGINTEST
+.br
+initial
+regular
+text
+.SY command
+.I arguments
+.YS
+middle
+regular
+text
+.nf
+literal text
+before display
+.SY command
+.I arguments
+.YS
+literal text
+after display
+.fi
+final
+regular
+text
+.br
+ENDTEST
+.br
+end of file
--- /dev/null
+++ regress/man/SY/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2019/01/05 21:13:55 schwarze Exp $
+
+REGRESS_TARGETS	 = literal
+
+.include <bsd.regress.mk>
--- /dev/null
+++ regress/man/SY/literal.out_ascii
@@ -0,0 +1,27 @@
+SY-LITERAL(1)               General Commands Manual              SY-LITERAL(1)
+
+
+
+N\bNA\bAM\bME\bE
+       SY-literal - synopsis block in literal context
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       BEGINTEST
+       initial regular text
+
+       c\bco\bom\bmm\bma\ban\bnd\bd _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+       middle regular text
+       literal text
+       before display
+
+       c\bco\bom\bmm\bma\ban\bnd\bd
+               _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+       literal text
+       after display
+       final regular text
+       ENDTEST
+       end of file
+
+
+
+OpenBSD                         January 5, 2019                  SY-LITERAL(1)
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-05 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-05 21:18 mandoc: In groff, when the .SY block macro occurs in no-fill mode, the 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).