Module Name:    src
Committed By:   joerg
Date:           Wed Oct 12 14:11:25 UTC 2011

Modified Files:
        src/external/bsd/mdocml/dist: roff.c

Log Message:
Revert incorrect last change and redo it in a way that doesn't violate
strict aliasing rules.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/roff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/mdocml/dist/roff.c
diff -u src/external/bsd/mdocml/dist/roff.c:1.4 src/external/bsd/mdocml/dist/roff.c:1.5
--- src/external/bsd/mdocml/dist/roff.c:1.4	Wed Oct 12 13:44:33 2011
+++ src/external/bsd/mdocml/dist/roff.c	Wed Oct 12 14:11:25 2011
@@ -21,9 +21,11 @@
 
 #include <assert.h>
 #include <ctype.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
+#include "main.h"
 #include "mandoc.h"
 #include "libroff.h"
 #include "libmandoc.h"
@@ -559,6 +561,7 @@ roff_parsetext(char *p)
 	size_t		 sz;
 	const char	*start;
 	enum mandoc_esc	 esc;
+	const char	*const_p;
 
 	start = p;
 
@@ -571,7 +574,10 @@ roff_parsetext(char *p)
 
 		if ('\\' == *p) {
 			/* Skip over escapes. */
-			esc = mandoc_escape((void *)&p, NULL, NULL);
+			p++;
+			const_p = p;
+			esc = mandoc_escape(&const_p, NULL, NULL);
+			p = UNCONST(const_p);
 			if (ESCAPE_ERROR == esc)
 				break;
 			continue;

Reply via email to