aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-09-27 23:03:44 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-09-27 23:03:44 +0000
commitddb8c20e76ca162b2fbfbf7131f5b2a6ee36eea5 (patch)
tree850f634b9ed52a3a3e9dcf091903b7dd2b7a3055
parent135b549aba3a1fea5a49906e6abbac96e0683569 (diff)
downloadmandoc-ddb8c20e76ca162b2fbfbf7131f5b2a6ee36eea5.tar.gz
mandoc-ddb8c20e76ca162b2fbfbf7131f5b2a6ee36eea5.tar.zst
mandoc-ddb8c20e76ca162b2fbfbf7131f5b2a6ee36eea5.zip
Merge from OpenBSD right after 1.10.6; now back to full sync.
* mdoc.c: blank lines outside literal mode are more similar to .sp than .Pp * backslashes do not terminate macros; partial revert of mdoc.c 1.164; the intention of that commit is fully achieved in roff.c * mdoc_term.c: no need to list the same prototype twice * mdoc_validate.c: drop .Pp before .sp just like .Pp before .Pp * fix off-by-one found by jsg@ with parfait, OpenBSD term_ps.c 1.12 ok kristaps@
-rw-r--r--mdoc.c13
-rw-r--r--mdoc_term.c3
-rw-r--r--mdoc_validate.c4
-rw-r--r--term_ps.c4
4 files changed, 10 insertions, 14 deletions
diff --git a/mdoc.c b/mdoc.c
index bee01503..103a8a88 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.164 2010/08/29 11:29:51 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.165 2010/09/27 23:03:44 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -691,11 +691,11 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)
return(0);
/*
- * Insert a `Pp' in the case of a blank line. Technically,
+ * Insert a `sp' in the case of a blank line. Technically,
* blank lines aren't allowed, but enough manuals assume this
* behaviour that we want to work around it.
*/
- if ( ! mdoc_elem_alloc(m, line, offs, MDOC_Pp, NULL))
+ if ( ! mdoc_elem_alloc(m, line, offs, MDOC_sp, NULL))
return(0);
m->next = MDOC_NEXT_SIBLING;
@@ -758,14 +758,11 @@ mdoc_pmacro(struct mdoc *m, int ln, char *buf, int offs)
/*
* Copy the first word into a nil-terminated buffer.
- * Stop copying when a tab, space, backslash, or eoln is encountered.
+ * Stop copying when a tab, space, or eoln is encountered.
*/
j = 0;
- while (j < 4 && '\0' != buf[i] &&
- ' ' != buf[i] &&
- '\t' != buf[i] &&
- '\\' != buf[i])
+ while (j < 4 && '\0' != buf[i] && ' ' != buf[i] && '\t' != buf[i])
mac[j++] = buf[i++];
mac[j] = '\0';
diff --git a/mdoc_term.c b/mdoc_term.c
index d57eacd9..2bdb85a0 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.190 2010/09/27 11:21:39 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.191 2010/09/27 23:03:44 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -81,7 +81,6 @@ static void termp_lb_post(DECL_ARGS);
static void termp_nm_post(DECL_ARGS);
static void termp_pf_post(DECL_ARGS);
static void termp_quote_post(DECL_ARGS);
-static void termp_quote_post(DECL_ARGS);
static void termp_sh_post(DECL_ARGS);
static void termp_ss_post(DECL_ARGS);
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 881fd860..654b344f 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.118 2010/09/27 11:25:03 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.119 2010/09/27 23:03:44 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -265,7 +265,7 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, NULL }, /* Dx */
{ NULL, posts_text }, /* %Q */
{ NULL, posts_notext }, /* br */
- { NULL, posts_sp }, /* sp */
+ { pres_pp, posts_sp }, /* sp */
{ NULL, posts_text1 }, /* %U */
{ NULL, NULL }, /* Ta */
};
diff --git a/term_ps.c b/term_ps.c
index f3b77766..fa2f68fe 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1,4 +1,4 @@
-/* $Id: term_ps.c,v 1.44 2010/09/04 20:18:53 kristaps Exp $ */
+/* $Id: term_ps.c,v 1.45 2010/09/27 23:03:44 schwarze Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -908,7 +908,7 @@ ps_pletter(struct termp *p, int c)
f = (int)p->engine.ps.lastf;
- if (c <= 32 || (c - 32 > MAXCHAR)) {
+ if (c <= 32 || (c - 32 >= MAXCHAR)) {
ps_putchar(p, ' ');
p->engine.ps.pscol += (size_t)fonts[f].gly[0].wx;
return;