source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: In groff, when the .SY block macro occurs in no-fill mode, the
Date: Sat, 5 Jan 2019 16:18:59 -0500 (EST)	[thread overview]
Message-ID: <05f9afaa29d12f97@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2019-01-05 21:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05f9afaa29d12f97@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).