Revert "Integrated portability changes and fixed version issues"
This reverts commit 0beb6e0dff
.
This commit is contained in:
parent
0beb6e0dff
commit
e2ac9e68f6
14
src/attrs.c
14
src/attrs.c
|
@ -470,11 +470,12 @@ static uint AttributeVersions(Node* node, AttVal* attval)
|
||||||
/* Override the settings on these attributes because
|
/* Override the settings on these attributes because
|
||||||
* they are allowed everywhere by RDFa */
|
* they are allowed everywhere by RDFa */
|
||||||
if (strcmp(attval->attribute,"content") == 0)
|
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)
|
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)
|
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? */
|
/* TODO: maybe this should return VERS_PROPRIETARY instead? */
|
||||||
if (!attval || !attval->dict)
|
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 */
|
/* Copy the attribute value so we can split it */
|
||||||
if (attval->value) {
|
if (attval->value) {
|
||||||
tmbstr t, tPtr ;
|
|
||||||
|
|
||||||
uint prefixCount = 0;
|
uint prefixCount = 0;
|
||||||
/* isPrefix toggles - start at 1 and change to 0 as we
|
/* isPrefix toggles - start at 1 and change to 0 as we
|
||||||
* iterate over the components of the value */
|
* iterate over the components of the value */
|
||||||
|
@ -2233,8 +2232,9 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval)
|
||||||
TY_(tmbstrcpy)( s, attval->value );
|
TY_(tmbstrcpy)( s, attval->value );
|
||||||
|
|
||||||
/* iterate over value */
|
/* iterate over value */
|
||||||
tPtr = s;
|
tmbstr tPtr = s;
|
||||||
|
|
||||||
|
tmbstr t;
|
||||||
while ( ( t = strtok(tPtr, " ") ) != NULL ) {
|
while ( ( t = strtok(tPtr, " ") ) != NULL ) {
|
||||||
tPtr = NULL;
|
tPtr = NULL;
|
||||||
if (isPrefix) {
|
if (isPrefix) {
|
||||||
|
@ -2242,7 +2242,7 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval)
|
||||||
/* prefix rules are that it can have any
|
/* prefix rules are that it can have any
|
||||||
* character except a colon - that one must be
|
* character except a colon - that one must be
|
||||||
* at the end */
|
* at the end */
|
||||||
tmbstr i = strchr(t, ':') ;
|
tmbstr i = index(t, ':') ;
|
||||||
if (i == NULL) {
|
if (i == NULL) {
|
||||||
/* no colon - bad! */
|
/* no colon - bad! */
|
||||||
TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);
|
TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);
|
||||||
|
|
Loading…
Reference in a new issue