From 7cf6cf3188b89f455a9082e19ccac02c375b286f Mon Sep 17 00:00:00 2001 From: James Clark Date: Mon, 2 Feb 1998 11:15:15 +0000 Subject: [PATCH] Change containsRef field in ATTRIBUTE to normalized --- expat/xmltok/xmltok.h | 2 +- expat/xmltok/xmltok_impl.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/expat/xmltok/xmltok.h b/expat/xmltok/xmltok.h index 2d22275b..3018cac9 100755 --- a/expat/xmltok/xmltok.h +++ b/expat/xmltok/xmltok.h @@ -92,7 +92,7 @@ typedef struct { const char *name; const char *valuePtr; const char *valueEnd; - char containsRef; + char normalized; } ATTRIBUTE; struct encoding; diff --git a/expat/xmltok/xmltok_impl.c b/expat/xmltok/xmltok_impl.c index 3be525c6..cd621cb7 100755 --- a/expat/xmltok/xmltok_impl.c +++ b/expat/xmltok/xmltok_impl.c @@ -1186,7 +1186,7 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr, if (state == other) { \ if (nAtts < attsMax) { \ atts[nAtts].name = ptr; \ - atts[nAtts].containsRef = 0; \ + atts[nAtts].normalized = 1; \ } \ state = inName; \ } @@ -1223,13 +1223,15 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr, } break; case BT_AMP: - atts[nAtts].containsRef = 1; + atts[nAtts].normalized = 0; break; case BT_S: case BT_CR: case BT_LF: /* This case ensures that the first attribute name is counted Apart from that we could just change state on the quote. */ if (state == inName) state = other; + if (state == inValue) + atts[nAtts].normalized = 0; break; case BT_GT: case BT_SOL: