source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Merge from OpenBSD right after 1.10.6; now back to full sync.
@ 2010-09-27 23:03 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2010-09-27 23:03 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@

Modified Files:
--------------
    mdocml:
        mdoc.c
        mdoc_term.c
        mdoc_validate.c
        term_ps.c

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.118 -r1.119
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -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 */
 };
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.190 -r1.191
--- mdoc_term.c
+++ mdoc_term.c
@@ -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);
 
Index: term_ps.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ps.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.44 -r1.45
--- term_ps.c
+++ term_ps.c
@@ -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;
Index: mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -Lmdoc.c -Lmdoc.c -u -p -r1.164 -r1.165
--- mdoc.c
+++ mdoc.c
@@ -691,11 +691,11 @@ mdoc_ptext(struct mdoc *m, int line, cha
 			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
 
 	/* 
 	 * 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';
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

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

only message in thread, other threads:[~2010-09-27 23:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-27 23:03 mdocml: Merge from OpenBSD right after 1.10.6; now back to full sync 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).