diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-09-27 23:03:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-09-27 23:03:44 +0000 |
commit | 605947a26498b333ec8366a8567d08cd999dc5d9 (patch) | |
tree | 8dbfcc0c59693264d7b9ed77ee9e90cd88c2ee69 /mdoc.c | |
parent | 769e83f0d5d5a1e497dde635834dc228cfa2936c (diff) | |
download | mandoc-605947a26498b333ec8366a8567d08cd999dc5d9.tar.gz |
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@
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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'; |