-.Dd April 7, 2010
+.Dd August 21, 2014
.Dt AR-PUNCT 1
.Os OpenBSD
.Sh NAME
.Ar a ) z
start
.Ar ) z
+dot
+.Ar . z
+comma
+.Ar , z
+semicolon
+.Ar ; z
+colon
+.Ar : z
+quest
+.Ar ? z
+excl
+.Ar ! z
+paren
+.Ar ) z
+bracket
+.Ar ] z
+bar
+.Ar | m
+op paren
+.Ar ( a
+op bracket
+.Ar [ a
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
closing punctuation _\ba) only one _\bf_\bi_\bl_\be _\b._\b._\b.) only more than one _\bf_\bi_\bl_\be _\b._\b._\b.))
- middle _\ba) _\bz start _\bf_\bi_\bl_\be _\b._\b._\b.) _\bz
+ middle _\ba) _\bz start _\bf_\bi_\bl_\be _\b._\b._\b.) _\bz dot _\bf_\bi_\bl_\be _\b._\b._\b.. _\bz comma _\bf_\bi_\bl_\be _\b._\b._\b., _\bz semicolon
+ _\bf_\bi_\bl_\be _\b._\b._\b.; _\bz colon _\bf_\bi_\bl_\be _\b._\b._\b.: _\bz quest _\bf_\bi_\bl_\be _\b._\b._\b.? _\bz excl _\bf_\bi_\bl_\be _\b._\b._\b.! _\bz paren
+ _\bf_\bi_\bl_\be _\b._\b._\b.) _\bz bracket _\bf_\bi_\bl_\be _\b._\b._\b.] _\bz bar | _\bm op paren (_\ba op bracket [_\ba
-OpenBSD April 7, 2010 OpenBSD
+OpenBSD August 21, 2014 OpenBSD
-# $OpenBSD: Makefile,v 1.7 2012/07/09 17:52:09 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2014/08/21 12:56:24 schwarze Exp $
REGRESS_TARGETS = noarg multiarg parsed punct font
-# Do not regenerate the punct output file for now,
-# because groff-1.15 and groff-1.20.1 handle
-# the bar differently as a .Fl argument.
-
-SKIP_GROFF ?= punct
-
.include <bsd.regress.mk>
-.Dd April 7, 2010
+.Dd August 21, 2014
.Dt FL-NOARG 1
.Os OpenBSD
.Sh NAME
.Fl
a dash.
.Pp
-This is true even before punctuation
+This is true even before middle
+.Fl | and
+trailing punctuation
.Fl .
.Pp
Following macros
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
Without an argument, it yields -\b- a dash.
- This is true even before punctuation -\b-.
+ This is true even before middle -\b- | -\b-a\ban\bnd\bd trailing punctuation -\b-.
Following macros -\b-[flag] follow without white space.
-OpenBSD April 7, 2010 OpenBSD
+OpenBSD August 21, 2014 OpenBSD
-.Dd April 7, 2010
+.Dd August 21, 2014
.Dt FL-PUNCT 1
.Os OpenBSD
.Sh NAME
.Fl ) )
middle
.Fl a ) z
+start
+.Fl ) z
dot
.Fl . z
comma
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
closing punctuation -\b-a\ba) only one -\b-) only more than one -\b-)) middle -\b-a\ba) -\b-z\bz
- dot -\b-. -\b-z\bz comma -\b-, -\b-z\bz semicolon -\b-; -\b-z\bz colon -\b-: -\b-z\bz quest -\b-? -\b-z\bz excl -\b-! -\b-z\bz
- paren -\b-) -\b-z\bz bracket -\b-] -\b-z\bz bar | -\b-m\bm op paren (-\b-a\ba op bracket [-\b-a\ba
+ start -\b-) -\b-z\bz dot -\b-. -\b-z\bz comma -\b-, -\b-z\bz semicolon -\b-; -\b-z\bz colon -\b-: -\b-z\bz quest -\b-? -\b-z\bz
+ excl -\b-! -\b-z\bz paren -\b-) -\b-z\bz bracket -\b-] -\b-z\bz bar -\b- | -\b-m\bm op paren (-\b-a\ba op bracket
+ [-\b-a\ba
-OpenBSD April 7, 2010 OpenBSD
+OpenBSD August 21, 2014 OpenBSD
-# $OpenBSD: Makefile,v 1.9 2014/08/17 18:42:07 schwarze Exp $
+# $OpenBSD: Makefile,v 1.10 2014/08/21 12:56:24 schwarze Exp $
REGRESS_TARGETS = badNAME badNAMEuse break empty emptyNAME emptyNAMEuse
-REGRESS_TARGETS += font long
+REGRESS_TARGETS += font long punct
LINT_TARGETS = badNAME badNAMEuse break
--- /dev/null
+.Dd August 21, 2014
+.Dt NM-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-punct
+.Nd punctuation handling by the Nm macro
+.Sh DESCRIPTION
+closing punctuation
+.Nm a )
+only one
+.Nm )
+only more than one
+.Nm ) )
+middle
+.Nm a ) z
+start
+.Nm ) z
+dot
+.Nm . z
+comma
+.Nm , z
+semicolon
+.Nm ; z
+colon
+.Nm : z
+quest
+.Nm ? z
+excl
+.Nm ! z
+paren
+.Nm ) z
+bracket
+.Nm ] z
+bar
+.Nm | m
+op paren
+.Nm ( a
+op bracket
+.Nm [ a
--- /dev/null
+NM-PUNCT(1) OpenBSD Reference Manual NM-PUNCT(1)
+
+N\bNA\bAM\bME\bE
+ N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt - punctuation handling by the Nm macro
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ closing punctuation a\ba) only one N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt) only more than one N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt))
+ middle a\ba) z\bz start N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt) z dot N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt. z comma N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt, z semicolon
+ N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt; z colon N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt: z quest N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt? z excl N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt! z paren
+ N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt) z bracket N\bNm\bm-\b-p\bpu\bun\bnc\bct\bt] z bar | m\bm op paren (a\ba op bracket [a\ba
+
+OpenBSD August 21, 2014 OpenBSD
-# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2014/08/21 12:56:24 schwarze Exp $
-REGRESS_TARGETS = font
+REGRESS_TARGETS = font punct
# XXX The FILES target doesn't currently work.
--- /dev/null
+.Dd August 21, 2014
+.Dt PA-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pa-punct
+.Nd punctuation handling by the Pa macro
+.Sh DESCRIPTION
+closing punctuation
+.Pa a )
+only one
+.Pa )
+only more than one
+.Pa ) )
+middle
+.Pa a ) z
+start
+.Pa ) z
+dot
+.Pa . z
+comma
+.Pa , z
+semicolon
+.Pa ; z
+colon
+.Pa : z
+quest
+.Pa ? z
+excl
+.Pa ! z
+paren
+.Pa ) z
+bracket
+.Pa ] z
+bar
+.Pa | m
+op paren
+.Pa ( a
+op bracket
+.Pa [ a
--- /dev/null
+PA-PUNCT(1) OpenBSD Reference Manual PA-PUNCT(1)
+
+N\bNA\bAM\bME\bE
+ P\bPa\ba-\b-p\bpu\bun\bnc\bct\bt - punctuation handling by the Pa macro
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ closing punctuation _\ba) only one _\b~) only more than one _\b~)) middle _\ba) _\bz
+ start _\b~) _\bz dot _\b~. _\bz comma _\b~, _\bz semicolon _\b~; _\bz colon _\b~: _\bz quest _\b~? _\bz excl
+ _\b~! _\bz paren _\b~) _\bz bracket _\b~] _\bz bar | _\bm op paren (_\ba op bracket [_\ba
+
+OpenBSD August 21, 2014 OpenBSD
-/* $Id: mdoc_html.c,v 1.80 2014/08/14 00:29:12 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.81 2014/08/21 12:56:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
print_text(h, "\\-");
- if (n->child)
- h->flags |= HTML_NOSPACE;
- else if (n->next && n->next->line == n->line)
+ if ( ! (n->nchild == 0 &&
+ (n->next == NULL ||
+ n->next->type == MDOC_TEXT ||
+ n->next->flags & MDOC_LINE)))
h->flags |= HTML_NOSPACE;
return(1);
-/* $Id: mdoc_macro.c,v 1.97 2014/08/16 19:47:17 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.98 2014/08/21 12:56:24 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
static int
in_line(MACRO_PROT_ARGS)
{
- int la, scope, cnt, nc, nl;
+ int la, scope, cnt, mayopen, nc, nl;
enum margverr av;
enum mdoct ntok;
enum margserr ac;
return(0);
}
+ mayopen = 1;
for (cnt = scope = 0;; ) {
la = *pos;
ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
* If we encounter closing punctuation, no word
* has been omitted, no scope is open, and we're
* allowed to have an empty element, then start
- * a new scope. `Ar', `Fl', and `Li', only do
- * this once per invocation. There may be more
- * of these (all of them?).
+ * a new scope.
*/
- if (0 == cnt && (nc || MDOC_Li == tok) &&
- DELIM_CLOSE == d && ! scope) {
+ if ((d == DELIM_CLOSE ||
+ (d == DELIM_MIDDLE && tok == MDOC_Fl)) &&
+ (nc || tok == MDOC_Li) &&
+ !scope && !cnt && mayopen) {
if ( ! mdoc_elem_alloc(mdoc,
line, ppos, tok, arg))
return(0);
- if (MDOC_Ar == tok || MDOC_Li == tok ||
- MDOC_Fl == tok)
- cnt++;
scope = 1;
+ cnt++;
+ if (MDOC_Li == tok || MDOC_Nm == tok)
+ mayopen = 0;
}
/*
* Close out our scope, if one is open, before
if (scope && ! rew_elem(mdoc, tok))
return(0);
scope = 0;
- } else if ( ! scope) {
+ } else if (mayopen && !scope) {
if ( ! mdoc_elem_alloc(mdoc, line, ppos, tok, arg))
return(0);
scope = 1;
- }
-
- if (DELIM_NONE == d)
cnt++;
+ }
if ( ! dword(mdoc, line, la, p, d,
MDOC_JOIN & mdoc_macros[tok].flags))
-/* $Id: mdoc_man.c,v 1.67 2014/08/08 16:17:09 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.68 2014/08/21 12:56:24 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
font_push('B');
print_word("\\-");
- outflags &= ~MMAN_spc;
+ if (n->nchild)
+ outflags &= ~MMAN_spc;
return(1);
}
{
font_pop();
- if (0 == n->nchild && NULL != n->next &&
- n->next->line == n->line)
+ if ( ! (n->nchild ||
+ n->next == NULL ||
+ n->next->type == MDOC_TEXT ||
+ n->next->flags & MDOC_LINE))
outflags &= ~MMAN_spc;
}
-/* $Id: mdoc_term.c,v 1.178 2014/08/17 18:42:07 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.179 2014/08/21 12:56:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
term_fontpush(p, TERMFONT_BOLD);
term_word(p, "\\-");
- if (n->child)
- p->flags |= TERMP_NOSPACE;
- else if (n->next && n->next->line == n->line)
+ if ( ! (n->nchild == 0 &&
+ (n->next == NULL ||
+ n->next->type == MDOC_TEXT ||
+ n->next->flags & MDOC_LINE)))
p->flags |= TERMP_NOSPACE;
return(1);