From e2ac9e68f602b205ba789ecbd7c9cb9bcf7429f1 Mon Sep 17 00:00:00 2001 From: Shane McCarron Date: Mon, 16 Nov 2015 11:16:43 -0600 Subject: [PATCH] Revert "Integrated portability changes and fixed version issues" This reverts commit 0beb6e0dffacf0b939cd1c2b29f44f1160065bac. --- src/attrs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/attrs.c b/src/attrs.c index a1b4159..3e67889 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -470,11 +470,12 @@ static uint AttributeVersions(Node* node, AttVal* attval) /* Override the settings on these attributes because * they are allowed everywhere by RDFa */ if (strcmp(attval->attribute,"content") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; + return (XH50 | HT50); if (strcmp(attval->attribute,"rel") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; + return (XH50 | HT50); if (strcmp(attval->attribute,"rev") == 0) - return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ; + return (XH50 | HT50); + } /* TODO: maybe this should return VERS_PROPRIETARY instead? */ if (!attval || !attval->dict) @@ -2218,8 +2219,6 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval) /* Copy the attribute value so we can split it */ if (attval->value) { - tmbstr t, tPtr ; - uint prefixCount = 0; /* isPrefix toggles - start at 1 and change to 0 as we * iterate over the components of the value */ @@ -2233,8 +2232,9 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval) TY_(tmbstrcpy)( s, attval->value ); /* iterate over value */ - tPtr = s; + tmbstr tPtr = s; + tmbstr t; while ( ( t = strtok(tPtr, " ") ) != NULL ) { tPtr = NULL; if (isPrefix) { @@ -2242,7 +2242,7 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval) /* prefix rules are that it can have any * character except a colon - that one must be * at the end */ - tmbstr i = strchr(t, ':') ; + tmbstr i = index(t, ':') ; if (i == NULL) { /* no colon - bad! */ TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);