Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/mdocml/dist Revert incorrect last change and re...
details: https://anonhg.NetBSD.org/src/rev/92d8fd7c8a11
branches: trunk
changeset: 770322:92d8fd7c8a11
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Oct 12 14:11:25 2011 +0000
description:
Revert incorrect last change and redo it in a way that doesn't violate
strict aliasing rules.
diffstat:
external/bsd/mdocml/dist/roff.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r 92e0b363aca4 -r 92d8fd7c8a11 external/bsd/mdocml/dist/roff.c
--- a/external/bsd/mdocml/dist/roff.c Wed Oct 12 13:44:33 2011 +0000
+++ b/external/bsd/mdocml/dist/roff.c Wed Oct 12 14:11:25 2011 +0000
@@ -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 @@
size_t sz;
const char *start;
enum mandoc_esc esc;
+ const char *const_p;
start = p;
@@ -571,7 +574,10 @@
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;
Home |
Main Index |
Thread Index |
Old Index