Big space and tab cleanup

Remove all space before tabs and space and tabs at end of lines.
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 4518499..a9edc03 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -40,7 +40,7 @@
 extern double xmlXPathNINF;
 #endif
 
-#define TODO 								\
+#define TODO								\
     xmlGenericError(xmlGenericErrorContext,				\
 	    "Unimplemented block at %s:%d\n",				\
             __FILE__, __LINE__);
@@ -75,7 +75,7 @@
 typedef xmlSchemaValDuration *xmlSchemaValDurationPtr;
 struct _xmlSchemaValDuration {
     long	        mon;		/* mon stores years also */
-    long        	day;
+    long	day;
     double		sec;            /* sec stores min and hour also */
 };
 
@@ -189,7 +189,7 @@
 
 /************************************************************************
  *									*
- * 			Datatype error handlers				*
+ *			Datatype error handlers				*
  *									*
  ************************************************************************/
 /**
@@ -206,7 +206,7 @@
 
 /************************************************************************
  *									*
- * 			Base types support				*
+ *			Base types support				*
  *									*
  ************************************************************************/
 
@@ -254,7 +254,7 @@
  * Initialize one primitive built-in type
  */
 static xmlSchemaTypePtr
-xmlSchemaInitBasicType(const char *name, xmlSchemaValType type, 
+xmlSchemaInitBasicType(const char *name, xmlSchemaValType type,
 		       xmlSchemaTypePtr baseType) {
     xmlSchemaTypePtr ret;
 
@@ -267,31 +267,31 @@
     ret->name = (const xmlChar *)name;
     ret->targetNamespace = XML_SCHEMAS_NAMESPACE_NAME;
     ret->type = XML_SCHEMA_TYPE_BASIC;
-    ret->baseType = baseType;	
+    ret->baseType = baseType;
     ret->contentType = XML_SCHEMA_CONTENT_BASIC;
     /*
     * Primitive types.
     */
-    switch (type) {		
-	case XML_SCHEMAS_STRING:            
-	case XML_SCHEMAS_DECIMAL:    
-	case XML_SCHEMAS_DATE:    
-	case XML_SCHEMAS_DATETIME:    
-	case XML_SCHEMAS_TIME:    
-	case XML_SCHEMAS_GYEAR:    
-	case XML_SCHEMAS_GYEARMONTH:    
-	case XML_SCHEMAS_GMONTH:    
-	case XML_SCHEMAS_GMONTHDAY:    
-	case XML_SCHEMAS_GDAY:    
-	case XML_SCHEMAS_DURATION:    
-	case XML_SCHEMAS_FLOAT:    
-	case XML_SCHEMAS_DOUBLE:    
-	case XML_SCHEMAS_BOOLEAN:    
-	case XML_SCHEMAS_ANYURI:    
-	case XML_SCHEMAS_HEXBINARY:    
-	case XML_SCHEMAS_BASE64BINARY:	
-	case XML_SCHEMAS_QNAME:	
-	case XML_SCHEMAS_NOTATION:	
+    switch (type) {
+	case XML_SCHEMAS_STRING:
+	case XML_SCHEMAS_DECIMAL:
+	case XML_SCHEMAS_DATE:
+	case XML_SCHEMAS_DATETIME:
+	case XML_SCHEMAS_TIME:
+	case XML_SCHEMAS_GYEAR:
+	case XML_SCHEMAS_GYEARMONTH:
+	case XML_SCHEMAS_GMONTH:
+	case XML_SCHEMAS_GMONTHDAY:
+	case XML_SCHEMAS_GDAY:
+	case XML_SCHEMAS_DURATION:
+	case XML_SCHEMAS_FLOAT:
+	case XML_SCHEMAS_DOUBLE:
+	case XML_SCHEMAS_BOOLEAN:
+	case XML_SCHEMAS_ANYURI:
+	case XML_SCHEMAS_HEXBINARY:
+	case XML_SCHEMAS_BASE64BINARY:
+	case XML_SCHEMAS_QNAME:
+	case XML_SCHEMAS_NOTATION:
 	    ret->flags |= XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE;
 	    break;
 	default:
@@ -309,7 +309,7 @@
 	case XML_SCHEMAS_ENTITIES:
 	    ret->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
 	    ret->facets = xmlSchemaNewMinLengthFacet(1);
-	    ret->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;	    
+	    ret->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;
 	    break;
 	default:
 	    ret->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
@@ -390,19 +390,19 @@
         return;
     xmlSchemaTypesBank = xmlHashCreate(40);
 
-    
+
     /*
     * 3.4.7 Built-in Complex Type Definition
     */
     xmlSchemaTypeAnyTypeDef = xmlSchemaInitBasicType("anyType",
-                                                     XML_SCHEMAS_ANYTYPE, 
+                                                     XML_SCHEMAS_ANYTYPE,
 						     NULL);
     xmlSchemaTypeAnyTypeDef->baseType = xmlSchemaTypeAnyTypeDef;
     xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
     /*
     * Init the content type.
     */
-    xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;    
+    xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
     {
 	xmlSchemaParticlePtr particle;
 	xmlSchemaModelGroupPtr sequence;
@@ -420,7 +420,7 @@
 	    return;
 	}
 	memset(sequence, 0, sizeof(xmlSchemaModelGroup));
-	sequence->type = XML_SCHEMA_TYPE_SEQUENCE;	
+	sequence->type = XML_SCHEMA_TYPE_SEQUENCE;
 	particle->children = (xmlSchemaTreeItemPtr) sequence;
 	/* Second particle. */
 	particle = xmlSchemaAddParticle();
@@ -437,9 +437,9 @@
 	}
 	memset(wild, 0, sizeof(xmlSchemaWildcard));
 	wild->type = XML_SCHEMA_TYPE_ANY;
-	wild->any = 1;	
-	wild->processContents = XML_SCHEMAS_ANY_LAX;	
-	particle->children = (xmlSchemaTreeItemPtr) wild;    
+	wild->any = 1;
+	wild->processContents = XML_SCHEMAS_ANY_LAX;
+	particle->children = (xmlSchemaTreeItemPtr) wild;
 	/*
 	* Create the attribute wildcard.
 	*/
@@ -451,10 +451,10 @@
 	}
 	memset(wild, 0, sizeof(xmlSchemaWildcard));
 	wild->any = 1;
-	wild->processContents = XML_SCHEMAS_ANY_LAX;	
+	wild->processContents = XML_SCHEMAS_ANY_LAX;
 	xmlSchemaTypeAnyTypeDef->attributeWildcard = wild;
     }
-    xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType", 
+    xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType",
                                                            XML_SCHEMAS_ANYSIMPLETYPE,
 							   xmlSchemaTypeAnyTypeDef);
     /*
@@ -513,7 +513,7 @@
 	xmlSchemaTypeAnySimpleTypeDef);
     xmlSchemaTypeNotationDef = xmlSchemaInitBasicType("NOTATION",
                                                     XML_SCHEMAS_NOTATION,
-						    xmlSchemaTypeAnySimpleTypeDef);    
+						    xmlSchemaTypeAnySimpleTypeDef);
     xmlSchemaTypeQNameDef = xmlSchemaInitBasicType("QName",
                                                    XML_SCHEMAS_QNAME,
 						   xmlSchemaTypeAnySimpleTypeDef);
@@ -583,7 +583,7 @@
 						    xmlSchemaTypeNCNameDef);
     xmlSchemaTypeIdrefDef = xmlSchemaInitBasicType("IDREF",
                                                    XML_SCHEMAS_IDREF,
-						   xmlSchemaTypeNCNameDef);        
+						   xmlSchemaTypeNCNameDef);
     xmlSchemaTypeEntityDef = xmlSchemaInitBasicType("ENTITY",
                                                     XML_SCHEMAS_ENTITY,
 						    xmlSchemaTypeNCNameDef);
@@ -615,7 +615,7 @@
  *
  * Cleanup the default XML Schemas type library
  */
-void	
+void
 xmlSchemaCleanupTypes(void) {
     if (xmlSchemaTypesInitialized == 0)
 	return;
@@ -629,13 +629,13 @@
 	/* Content type. */
 	particle = (xmlSchemaParticlePtr) xmlSchemaTypeAnyTypeDef->subtypes;
 	/* Wildcard. */
-	xmlSchemaFreeWildcard((xmlSchemaWildcardPtr) 
+	xmlSchemaFreeWildcard((xmlSchemaWildcardPtr)
 	    particle->children->children->children);
 	xmlFree((xmlSchemaParticlePtr) particle->children->children);
 	/* Sequence model group. */
 	xmlFree((xmlSchemaModelGroupPtr) particle->children);
 	xmlFree((xmlSchemaParticlePtr) particle);
-	xmlSchemaTypeAnyTypeDef->subtypes = NULL;	
+	xmlSchemaTypeAnyTypeDef->subtypes = NULL;
     }
     xmlHashFree(xmlSchemaTypesBank, (xmlHashDeallocator) xmlSchemaFreeType);
     xmlSchemaTypesInitialized = 0;
@@ -665,12 +665,12 @@
 		(facetType == XML_SCHEMA_FACET_WHITESPACE))
 		return (1);
 	    else
-		return (0);	
+		return (0);
 	case XML_SCHEMAS_STRING:
 	case XML_SCHEMAS_NOTATION:
 	case XML_SCHEMAS_QNAME:
-	case XML_SCHEMAS_ANYURI:	    
-	case XML_SCHEMAS_BASE64BINARY:    
+	case XML_SCHEMAS_ANYURI:
+	case XML_SCHEMAS_BASE64BINARY:
 	case XML_SCHEMAS_HEXBINARY:
 	    if ((facetType == XML_SCHEMA_FACET_LENGTH) ||
 		(facetType == XML_SCHEMA_FACET_MINLENGTH) ||
@@ -693,12 +693,12 @@
 		(facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
 		return (1);
 	    else
-		return (0); 
+		return (0);
 	case XML_SCHEMAS_TIME:
-	case XML_SCHEMAS_GDAY: 
+	case XML_SCHEMAS_GDAY:
 	case XML_SCHEMAS_GMONTH:
-	case XML_SCHEMAS_GMONTHDAY: 
-	case XML_SCHEMAS_GYEAR: 
+	case XML_SCHEMAS_GMONTHDAY:
+	case XML_SCHEMAS_GYEAR:
 	case XML_SCHEMAS_GYEARMONTH:
 	case XML_SCHEMAS_DATE:
 	case XML_SCHEMAS_DATETIME:
@@ -714,7 +714,7 @@
 		(facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
 		return (1);
 	    else
-		return (0);	    				 
+		return (0);
 	default:
 	    break;
     }
@@ -736,7 +736,7 @@
     if (xmlSchemaTypesInitialized == 0)
 	xmlSchemaInitTypes();
     switch (type) {
-	
+
 	case XML_SCHEMAS_ANYSIMPLETYPE:
 	    return (xmlSchemaTypeAnySimpleTypeDef);
 	case XML_SCHEMAS_STRING:
@@ -752,7 +752,7 @@
 	case XML_SCHEMAS_GMONTH:
 	    return (xmlSchemaTypeGMonthDef);
 	case XML_SCHEMAS_GMONTHDAY:
-    	    return (xmlSchemaTypeGMonthDayDef);
+	    return (xmlSchemaTypeGMonthDayDef);
 	case XML_SCHEMAS_GYEAR:
 	    return (xmlSchemaTypeGYearDef);
 	case XML_SCHEMAS_GYEARMONTH:
@@ -828,7 +828,7 @@
 	case XML_SCHEMAS_BASE64BINARY:
 	    return (xmlSchemaTypeBase64BinaryDef);
 	case XML_SCHEMAS_ANYTYPE:
-	    return (xmlSchemaTypeAnyTypeDef);	    
+	    return (xmlSchemaTypeAnyTypeDef);
 	default:
 	    return (NULL);
     }
@@ -880,7 +880,7 @@
  */
 const xmlChar *
 xmlSchemaValueGetAsString(xmlSchemaValPtr val)
-{    
+{
     if (val == NULL)
 	return (NULL);
     switch (val->type) {
@@ -913,7 +913,7 @@
  */
 int
 xmlSchemaValueGetAsBoolean(xmlSchemaValPtr val)
-{    
+{
     if ((val == NULL) || (val->type != XML_SCHEMAS_BOOLEAN))
 	return (0);
     return (val->value.b);
@@ -924,8 +924,8 @@
  * @type:  the value type
  * @value:  the value
  *
- * Allocate a new simple type value. The type can be 
- * of XML_SCHEMAS_STRING. 
+ * Allocate a new simple type value. The type can be
+ * of XML_SCHEMAS_STRING.
  * WARNING: This one is intended to be expanded for other
  * string based types. We need this for anySimpleType as well.
  * The given value is consumed and freed with the struct.
@@ -1007,11 +1007,11 @@
  *
  * Cleanup the default XML Schemas type library
  */
-void	
+void
 xmlSchemaFreeValue(xmlSchemaValPtr value) {
     xmlSchemaValPtr prev;
 
-    while (value != NULL) {	
+    while (value != NULL) {
 	switch (value->type) {
 	    case XML_SCHEMAS_STRING:
 	    case XML_SCHEMAS_NORMSTRING:
@@ -1025,7 +1025,7 @@
 	    case XML_SCHEMAS_IDREF:
 	    case XML_SCHEMAS_IDREFS:
 	    case XML_SCHEMAS_ENTITY:
-	    case XML_SCHEMAS_ENTITIES:        
+	    case XML_SCHEMAS_ENTITIES:
 	    case XML_SCHEMAS_ANYURI:
 	    case XML_SCHEMAS_ANYSIMPLETYPE:
 		if (value->value.str != NULL)
@@ -1052,7 +1052,7 @@
 	prev = value;
 	value = value->next;
 	xmlFree(prev);
-    }    
+    }
 }
 
 /**
@@ -1088,9 +1088,9 @@
     if ((type == NULL) || (type->type != XML_SCHEMA_TYPE_BASIC))
 	return (NULL);
     switch (type->builtInType) {
-	case XML_SCHEMAS_NMTOKENS: 
+	case XML_SCHEMAS_NMTOKENS:
 	    return (xmlSchemaTypeNmtokenDef );
-	case XML_SCHEMAS_IDREFS: 
+	case XML_SCHEMAS_IDREFS:
 	    return (xmlSchemaTypeIdrefDef);
 	case XML_SCHEMAS_ENTITIES:
 	    return (xmlSchemaTypeEntityDef);
@@ -1342,13 +1342,13 @@
  */
 static int
 _xmlSchemaParseTime (xmlSchemaValDatePtr dt, const xmlChar **str) {
-    const xmlChar *cur = *str;    
+    const xmlChar *cur = *str;
     int ret = 0;
     int value = 0;
 
     PARSE_2_DIGITS(value, cur, ret);
     if (ret != 0)
-	return ret;    
+	return ret;
     if (*cur != ':')
 	return 1;
     if (!VALID_HOUR(value))
@@ -1614,7 +1614,7 @@
             const xmlChar *rewnd = cur;
             cur++;
 
-  	    ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
+	    ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
             if ((ret == 0) && ((*cur == 0) || (*cur != ':'))) {
 
                 /*
@@ -1852,7 +1852,7 @@
         }
 	cur++;
 	if (collapse)
-	    while IS_WSP_BLANK_CH(*cur) cur++;        
+	    while IS_WSP_BLANK_CH(*cur) cur++;
     }
 
     if (isneg) {
@@ -1908,13 +1908,13 @@
  */
 xmlChar *
 xmlSchemaWhiteSpaceReplace(const xmlChar *value) {
-    const xmlChar *cur = value;    
-    xmlChar *ret = NULL, *mcur; 
+    const xmlChar *cur = value;
+    xmlChar *ret = NULL, *mcur;
 
-    if (value == NULL) 
+    if (value == NULL)
 	return(NULL);
-    
-    while ((*cur != 0) && 
+
+    while ((*cur != 0) &&
 	(((*cur) != 0xd) && ((*cur) != 0x9) && ((*cur) != 0xa))) {
 	cur++;
     }
@@ -1927,7 +1927,7 @@
 	if ( ((*mcur) == 0xd) || ((*mcur) == 0x9) || ((*mcur) == 0xa) )
 	    *mcur = ' ';
 	mcur++;
-    } while (*mcur != 0);	    
+    } while (*mcur != 0);
     return(ret);
 }
 
@@ -2072,7 +2072,7 @@
     const xmlChar *tmp, *cur = *str;
     int ret = 0, i = 0;
 
-    if (!((*cur >= '0') && (*cur <= '9'))) 
+    if (!((*cur >= '0') && (*cur <= '9')))
         return(-2);
 
     while (*cur == '0') {        /* ignore leading zeroes */
@@ -2148,7 +2148,7 @@
     if ((flags == 0) && (value != NULL)) {
 
         if ((type->builtInType != XML_SCHEMAS_STRING) &&
-	  (type->builtInType != XML_SCHEMAS_ANYTYPE) && 
+	  (type->builtInType != XML_SCHEMAS_ANYTYPE) &&
 	  (type->builtInType != XML_SCHEMAS_ANYSIMPLETYPE)) {
 	    if (type->builtInType == XML_SCHEMAS_NORMSTRING)
 		norm = xmlSchemaWhiteSpaceReplace(value);
@@ -2160,7 +2160,7 @@
     }
 
     switch (type->builtInType) {
-        case XML_SCHEMAS_UNKNOWN:            
+        case XML_SCHEMAS_UNKNOWN:
             goto error;
 	case XML_SCHEMAS_ANYTYPE:
 	case XML_SCHEMAS_ANYSIMPLETYPE:
@@ -2171,10 +2171,10 @@
 		    *val = v;
 		} else {
 		    goto error;
-		}		
+		}
 	    }
 	    goto return0;
-        case XML_SCHEMAS_STRING:		
+        case XML_SCHEMAS_STRING:
 	    if (! normOnTheFly) {
 		const xmlChar *cur = value;
 
@@ -2253,7 +2253,7 @@
                 const xmlChar *cur = value;
                 unsigned int len, neg, integ, hasLeadingZeroes;
 		xmlChar cval[25];
-		xmlChar *cptr = cval;		
+		xmlChar *cptr = cval;
 
                 if ((cur == NULL) || (*cur == 0))
                     goto return1;
@@ -2327,10 +2327,10 @@
                     v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL);
                     if (v != NULL) {
 			/*
-		 	* Now evaluate the significant digits of the number
-		 	*/
+			* Now evaluate the significant digits of the number
+			*/
 			if (len != 0) {
-			    
+
 			    if (integ != ~0u) {
 				/*
 				* Get rid of trailing zeroes in the
@@ -2604,8 +2604,8 @@
 			} else {
 			    cur++;
 			}
-		    }		    
-		}                
+		    }
+		}
                 if (val != NULL) {
                     v = xmlSchemaNewValue(XML_SCHEMAS_TOKEN);
                     if (v != NULL) {
@@ -2618,7 +2618,7 @@
                 goto return0;
             }
         case XML_SCHEMAS_LANGUAGE:
-	    if (normOnTheFly) {		    
+	    if (normOnTheFly) {
 		norm = xmlSchemaCollapseString(value);
 		if (norm != NULL)
 		    value = norm;
@@ -2903,11 +2903,11 @@
                 }
                 goto done;
             }
-        case XML_SCHEMAS_ANYURI:{		
+        case XML_SCHEMAS_ANYURI:{
                 if (*value != 0) {
 		    xmlURIPtr uri;
 		    xmlChar *tmpval, *cur;
-		    if (normOnTheFly) {		    
+		    if (normOnTheFly) {
 			norm = xmlSchemaCollapseString(value);
 			if (norm != NULL)
 			    value = norm;
@@ -2996,12 +2996,12 @@
             }
         case XML_SCHEMAS_BASE64BINARY:{
                 /* ISSUE:
-                 * 
+                 *
                  * Ignore all stray characters? (yes, currently)
                  * Worry about long lines? (no, currently)
-                 * 
+                 *
                  * rfc2045.txt:
-                 * 
+                 *
                  * "The encoded output stream must be represented in lines of
                  * no more than 76 characters each.  All line breaks or other
                  * characters not found in Table 1 must be ignored by decoding
@@ -3412,7 +3412,7 @@
     /*
      * First test: If x is -ve and not zero
      */
-    if ((x->value.decimal.sign) && 
+    if ((x->value.decimal.sign) &&
 	((x->value.decimal.lo != 0) ||
 	 (x->value.decimal.mi != 0) ||
 	 (x->value.decimal.hi != 0))) {
@@ -3653,7 +3653,7 @@
     xmlSchemaValPtr ret = xmlSchemaNewValue(v->type);
     if (ret == NULL)
         return NULL;
-    
+
     memcpy(ret, v, sizeof(xmlSchemaVal));
     ret->next = NULL;
     return ret;
@@ -3699,7 +3699,7 @@
 		if (val->value.str != NULL)
 		    cur->value.str = xmlStrdup(BAD_CAST val->value.str);
 		break;
-	    case XML_SCHEMAS_QNAME:        
+	    case XML_SCHEMAS_QNAME:
 	    case XML_SCHEMAS_NOTATION:
 		cur = xmlSchemaDupVal(val);
 		if (val->value.qname.name != NULL)
@@ -3841,7 +3841,7 @@
             if (tyr == 0)
                 tyr--;
 	    /*
-	     * Coverity detected an overrun in daysInMonth 
+	     * Coverity detected an overrun in daysInMonth
 	     * of size 12 at position 12 with index variable "((r)->mon - 1)"
 	     */
 	    if (tmon < 0)
@@ -3866,7 +3866,7 @@
                 r->year++;
 	}
     }
-    
+
     r->day = tempdays;
 
     /*
@@ -3931,7 +3931,7 @@
  * _xmlSchemaDateCastYMToDays:
  * @dt: an #xmlSchemaValPtr
  *
- * Convert mon and year of @dt to total number of days. Take the 
+ * Convert mon and year of @dt to total number of days. Take the
  * number of years since (or before) 1 AD and add the number of leap
  * years. This is a function  because negative
  * years must be handled a little differently and there is no zero year.
@@ -4111,7 +4111,7 @@
                 ret = -1;
             else if (sec > 0.0)
                 ret = 1;
-            
+
         }
 	xmlSchemaFreeValue(p1);
 	xmlSchemaFreeValue(q1);
@@ -4252,7 +4252,7 @@
 				       int invert)
 {
     int tmp;
-    
+
     while ((*x != 0) && (*y != 0)) {
 	if (IS_WSP_REPLACE_CH(*y)) {
 	    if (! IS_WSP_SPACE_CH(*x)) {
@@ -4267,7 +4267,7 @@
 		    else
 			return(1);
 		}
-	    }	    
+	    }
 	} else {
 	    tmp = *x - *y;
 	    if (tmp < 0) {
@@ -4321,7 +4321,7 @@
 {
     int tmp;
 
-    /* 
+    /*
     * Skip leading blank chars of the collapsed string.
     */
     while IS_WSP_BLANK_CH(*y)
@@ -4410,12 +4410,12 @@
 {
     int tmp;
 
-    /* 
+    /*
     * Skip leading blank chars of the collapsed string.
     */
     while IS_WSP_BLANK_CH(*y)
 	y++;
-    
+
     while ((*x != 0) && (*y != 0)) {
 	if IS_WSP_BLANK_CH(*y) {
 	    if (! IS_WSP_BLANK_CH(*x)) {
@@ -4435,8 +4435,8 @@
 		}
 	    }
 	    x++;
-	    y++;	    
-	    /* 
+	    y++;
+	    /*
 	    * Skip contiguous blank chars of the collapsed string.
 	    */
 	    while IS_WSP_BLANK_CH(*y)
@@ -4470,7 +4470,7 @@
 	     return(-1);
 	 else
 	     return(1);
-    }   
+    }
     if (*y != 0) {
 	/*
 	* Skip trailing blank chars of the collapsed string.
@@ -4503,27 +4503,27 @@
 				const xmlChar *y)
 {
     int tmp;
-   
+
     while ((*x != 0) && (*y != 0)) {
 	if IS_WSP_BLANK_CH(*y) {
 	    if (! IS_WSP_BLANK_CH(*x)) {
 		if ((*x - 0x20) < 0)
-    		    return(-1);
+		    return(-1);
 		else
 		    return(1);
-	    }	    
+	    }
 	} else {
 	    if IS_WSP_BLANK_CH(*x) {
 		if ((0x20 - *y) < 0)
-    		    return(-1);
+		    return(-1);
 		else
 		    return(1);
 	    }
 	    tmp = *x - *y;
 	    if (tmp < 0)
-    		return(-1);
+		return(-1);
 	    if (tmp > 0)
-    		return(1);
+		return(1);
 	}
 	x++;
 	y++;
@@ -4549,7 +4549,7 @@
 xmlSchemaCompareNormStrings(const xmlChar *x,
 			    const xmlChar *y) {
     int tmp;
-    
+
     while (IS_BLANK_CH(*x)) x++;
     while (IS_BLANK_CH(*y)) y++;
     while ((*x != 0) && (*y != 0)) {
@@ -4742,13 +4742,13 @@
                 (ytype == XML_SCHEMAS_GYEARMONTH))
                 return (xmlSchemaCompareDates(x, y));
             return (-2);
-	/* 
+	/*
 	* Note that we will support comparison of string types against
 	* anySimpleType as well.
 	*/
 	case XML_SCHEMAS_ANYSIMPLETYPE:
 	case XML_SCHEMAS_STRING:
-        case XML_SCHEMAS_NORMSTRING:		
+        case XML_SCHEMAS_NORMSTRING:
         case XML_SCHEMAS_TOKEN:
         case XML_SCHEMAS_LANGUAGE:
         case XML_SCHEMAS_NMTOKEN:
@@ -4772,10 +4772,10 @@
 	    /*
 	    * TODO: Compare those against QName.
 	    */
-	    if (ytype == XML_SCHEMAS_QNAME) {		
+	    if (ytype == XML_SCHEMAS_QNAME) {
 		TODO
 		if (y == NULL)
-		    return(-2);    
+		    return(-2);
 		return (-2);
 	    }
             if ((ytype == XML_SCHEMAS_ANYSIMPLETYPE) ||
@@ -4797,7 +4797,7 @@
 			/* TODO: What about x < y or x > y. */
 			if (xmlStrEqual(xv, yv))
 			    return (0);
-			else 
+			else
 			    return (2);
 		    } else if (yws == XML_SCHEMA_WHITESPACE_REPLACE)
 			return (xmlSchemaComparePreserveReplaceStrings(xv, yv, 0));
@@ -4823,7 +4823,7 @@
 			return (xmlSchemaCompareNormStrings(xv, yv));
 		} else
 		    return (-2);
-                
+
 	    }
             return (-2);
 	}
@@ -4894,7 +4894,7 @@
                 else
                     return(-1);
             }
-            return (-2);    
+            return (-2);
         case XML_SCHEMAS_IDREFS:
         case XML_SCHEMAS_ENTITIES:
         case XML_SCHEMAS_NMTOKENS:
@@ -5082,7 +5082,7 @@
 	    if (expectedLen != NULL)
 		*expectedLen = facet->val->value.decimal.lo;
 	    return (XML_SCHEMAV_CVC_LENGTH_VALID);
-	}	
+	}
     } else if (facet->type == XML_SCHEMA_FACET_MINLENGTH) {
 	if (actualLen < facet->val->value.decimal.lo) {
 	    if (expectedLen != NULL)
@@ -5096,12 +5096,12 @@
 	    return (XML_SCHEMAV_CVC_MAXLENGTH_VALID);
 	}
     } else
-	/* 
-	* NOTE: That we can pass NULL as xmlSchemaValPtr to 
+	/*
+	* NOTE: That we can pass NULL as xmlSchemaValPtr to
 	* xmlSchemaValidateFacet, since the remaining facet types
-	* are: XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION. 
+	* are: XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION.
 	*/
-	return(xmlSchemaValidateFacet(NULL, facet, value, NULL));   
+	return(xmlSchemaValidateFacet(NULL, facet, value, NULL));
     return (0);
 }
 
@@ -5114,7 +5114,7 @@
  * @ws: the whitespace type of the value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * Checka a value against a "length", "minLength" and "maxLength"
  * facet; sets @length to the computed length of @value.
  *
  * Returns 0 if the value is valid, a positive error code
@@ -5126,7 +5126,7 @@
 				     const xmlChar *value,
 				     xmlSchemaValPtr val,
 				     unsigned long *length,
-				     xmlSchemaWhitespaceValueType ws)  
+				     xmlSchemaWhitespaceValueType ws)
 {
     unsigned int len = 0;
 
@@ -5137,7 +5137,7 @@
 	(facet->type != XML_SCHEMA_FACET_MAXLENGTH) &&
 	(facet->type != XML_SCHEMA_FACET_MINLENGTH))
 	return (-1);
-	
+
     /*
     * TODO: length, maxLength and minLength must be of type
     * nonNegativeInteger only. Check if decimal is used somehow.
@@ -5171,7 +5171,7 @@
 		    if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
 			len = xmlSchemaNormLen(value);
 		    else
-		    /* 
+		    /*
 		    * Should be OK for "preserve" as well.
 		    */
 		    len = xmlUTF8Strlen(value);
@@ -5183,7 +5183,7 @@
 	    case XML_SCHEMAS_NMTOKEN:
 	    case XML_SCHEMAS_NAME:
 	    case XML_SCHEMAS_NCNAME:
-	    case XML_SCHEMAS_ID:		
+	    case XML_SCHEMAS_ID:
 		/*
 		* FIXME: What exactly to do with anyURI?
 		*/
@@ -5192,11 +5192,11 @@
 		    len = xmlSchemaNormLen(value);
 		break;
 	    case XML_SCHEMAS_QNAME:
- 	    case XML_SCHEMAS_NOTATION:
- 		/*
+	    case XML_SCHEMAS_NOTATION:
+		/*
 		* For QName and NOTATION, those facets are
 		* deprecated and should be ignored.
- 		*/
+		*/
 		return (0);
 	    default:
 		TODO
@@ -5216,7 +5216,7 @@
 	if (len > facet->val->value.decimal.lo)
 	    return(XML_SCHEMAV_CVC_MAXLENGTH_VALID);
     }
-    
+
     return (0);
 }
 
@@ -5228,18 +5228,18 @@
  * @val:  the precomputed value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * Checka a value against a "length", "minLength" and "maxLength"
  * facet; sets @length to the computed length of @value.
  *
  * Returns 0 if the value is valid, a positive error code
  * otherwise and -1 in case of an internal or API error.
  */
 int
-xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type, 
+xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type,
 			     xmlSchemaFacetPtr facet,
 			     const xmlChar *value,
 			     xmlSchemaValPtr val,
-			     unsigned long *length)  
+			     unsigned long *length)
 {
     if (type == NULL)
         return(-1);
@@ -5249,7 +5249,7 @@
 }
 
 /**
- * xmlSchemaValidateLengthFacetWhtsp: 
+ * xmlSchemaValidateLengthFacetWhtsp:
  * @facet:  the facet to check
  * @valType:  the built-in type
  * @value:  the lexical repr. of the value to be validated
@@ -5257,7 +5257,7 @@
  * @ws: the whitespace type of the value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * Checka a value against a "length", "minLength" and "maxLength"
  * facet; sets @length to the computed length of @value.
  *
  * Returns 0 if the value is valid, a positive error code
@@ -5292,7 +5292,7 @@
 static int
 xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
 			       xmlSchemaWhitespaceValueType fws,
-			       xmlSchemaValType valType,			       
+			       xmlSchemaValType valType,
 			       const xmlChar *value,
 			       xmlSchemaValPtr val,
 			       xmlSchemaWhitespaceValueType ws)
@@ -5304,7 +5304,7 @@
 
     switch (facet->type) {
 	case XML_SCHEMA_FACET_PATTERN:
-	    /* 
+	    /*
 	    * NOTE that for patterns, the @value needs to be the normalized
 	    * value, *not* the lexical initial value or the canonical value.
 	    */
@@ -5405,7 +5405,7 @@
 	    else {
 		switch (valType) {
 		    case XML_SCHEMAS_STRING:
-		    case XML_SCHEMAS_NORMSTRING:			
+		    case XML_SCHEMAS_NORMSTRING:
 			if (ws == XML_SCHEMA_WHITESPACE_UNKNOWN) {
 			    /*
 			    * This is to ensure API compatibility with the old
@@ -5421,13 +5421,13 @@
 			    if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
 				len = xmlSchemaNormLen(value);
 			    else
-				/* 
+				/*
 				* Should be OK for "preserve" as well.
 				*/
 				len = xmlUTF8Strlen(value);
 			}
 			break;
-	    	    case XML_SCHEMAS_IDREF:		    
+		    case XML_SCHEMAS_IDREF:
 		    case XML_SCHEMAS_TOKEN:
 		    case XML_SCHEMAS_LANGUAGE:
 		    case XML_SCHEMAS_NMTOKEN:
@@ -5436,11 +5436,11 @@
 		    case XML_SCHEMAS_ID:
 		    case XML_SCHEMAS_ANYURI:
 			if (value != NULL)
-		    	    len = xmlSchemaNormLen(value);
-		    	break;		   
+			    len = xmlSchemaNormLen(value);
+			break;
 		    default:
 		        TODO
-	    	}
+		}
 	    }
 	    if (facet->type == XML_SCHEMA_FACET_LENGTH) {
 		if (len != facet->val->value.decimal.lo)
@@ -5550,7 +5550,7 @@
 int
 xmlSchemaValidateFacetWhtsp(xmlSchemaFacetPtr facet,
 			    xmlSchemaWhitespaceValueType fws,
-			    xmlSchemaValType valType,			    
+			    xmlSchemaValType valType,
 			    const xmlChar *value,
 			    xmlSchemaValPtr val,
 			    xmlSchemaWhitespaceValueType ws)
@@ -5611,13 +5611,13 @@
 	    /*
 	     * Result is in work, and after_fraction points
 	     * just past the fractional part.
-	     * Use scientific notation 
+	     * Use scientific notation
 	    */
 	    integer_place = DBL_DIG + EXPONENT_DIGITS + 1;
 	    fraction_place = DBL_DIG - 1;
 	    snprintf(work, sizeof(work),"%*.*e",
 		integer_place, fraction_place, number);
-	    after_fraction = strchr(work + DBL_DIG, 'e');	    
+	    after_fraction = strchr(work + DBL_DIG, 'e');
 	    /* Remove fractional trailing zeroes */
 	    ptr = after_fraction;
 	    while (*(--ptr) == '0')
@@ -5649,7 +5649,7 @@
  *
  * WARNING: Some value types are not supported yet, resulting
  * in a @retValue of "???".
- * 
+ *
  * TODO: XML Schema 1.0 does not define canonical representations
  * for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay,
  * anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.
@@ -5669,7 +5669,7 @@
 	    if (val->value.str == NULL)
 		*retValue = BAD_CAST xmlStrdup(BAD_CAST "");
 	    else
-		*retValue = 
+		*retValue =
 		    BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
 	    break;
 	case XML_SCHEMAS_NORMSTRING:
@@ -5686,7 +5686,7 @@
 	case XML_SCHEMAS_TOKEN:
 	case XML_SCHEMAS_LANGUAGE:
 	case XML_SCHEMAS_NMTOKEN:
-	case XML_SCHEMAS_NAME:	
+	case XML_SCHEMAS_NAME:
 	case XML_SCHEMAS_NCNAME:
 	case XML_SCHEMAS_ID:
 	case XML_SCHEMAS_IDREF:
@@ -5695,10 +5695,10 @@
 	case XML_SCHEMAS_ANYURI:   /* Unclear */
 	    if (val->value.str == NULL)
 		return (-1);
-	    *retValue = 
+	    *retValue =
 		BAD_CAST xmlSchemaCollapseString(BAD_CAST val->value.str);
 	    if (*retValue == NULL)
-		*retValue = 
+		*retValue =
 		    BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
 	    break;
 	case XML_SCHEMAS_QNAME:
@@ -5720,7 +5720,7 @@
 	    /*
 	    * TODO: Lookout for a more simple implementation.
 	    */
-	    if ((val->value.decimal.total == 1) && 
+	    if ((val->value.decimal.total == 1) &&
 		(val->value.decimal.lo == 0)) {
 		*retValue = xmlStrdup(BAD_CAST "0.0");
 	    } else {
@@ -5754,7 +5754,7 @@
 		else
 		    snprintf(offs, bufsize - (offs - buf),
 			"%lu", dec.lo);
-			
+
 		if (dec.frac != 0) {
 		    if (dec.frac != dec.total) {
 			int diff = dec.total - dec.frac;
@@ -5767,7 +5767,7 @@
 			unsigned int i = 0;
 			/*
 			* Insert missing zeroes behind the decimal point.
-			*/			
+			*/
 			while (*(offs + i) != 0)
 			    i++;
 			if (i < dec.total) {
@@ -5904,7 +5904,7 @@
 		snprintf((char *) *retValue, 6, "---%02u",
 		    val->value.date.day);
 	    }
-	    break;        
+	    break;
         case XML_SCHEMAS_GMONTHDAY: {
 		/* TODO: Unclear in XML Schema 1.0 */
 		/* TODO: What to do with the timezone? */
@@ -5921,14 +5921,14 @@
 		/* TODO: What to do with the timezone? */
 		if (val->value.date.year < 0)
 		    snprintf(buf, 35, "-%04ld-%02u",
-			labs(val->value.date.year), 
+			labs(val->value.date.year),
 			val->value.date.mon);
 		else
 		    snprintf(buf, 35, "%04ld-%02u",
 			val->value.date.year, val->value.date.mon);
 		*retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
 	    }
-	    break;		
+	    break;
 	case XML_SCHEMAS_TIME:
 	    {
 		char buf[30];
@@ -5939,8 +5939,8 @@
 		    norm = xmlSchemaDateNormalize(val, 0);
 		    if (norm == NULL)
 			return (-1);
-		    /* 
-		    * TODO: Check if "%.14g" is portable.		    
+		    /*
+		    * TODO: Check if "%.14g" is portable.
 		    */
 		    snprintf(buf, 30,
 			"%02u:%02u:%02.14gZ",
@@ -5956,7 +5956,7 @@
 			val->value.date.sec);
 		}
 		*retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
-	    }	    
+	    }
 	    break;
         case XML_SCHEMAS_DATE:
 	    {
@@ -5984,7 +5984,7 @@
 			val->value.date.day);
 		}
 		*retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
-	    }	    
+	    }
 	    break;
         case XML_SCHEMAS_DATETIME:
 	    {
@@ -6028,8 +6028,8 @@
 	    *retValue = BAD_CAST xmlStrdup(BAD_CAST val->value.base64.str);
 	    break;
 	case XML_SCHEMAS_FLOAT: {
-		char buf[30];		
-		/* 
+		char buf[30];
+		/*
 		* |m| < 16777216, -149 <= e <= 104.
 		* TODO: Handle, NaN, INF, -INF. The format is not
 		* yet conformant. The c type float does not cover
@@ -6050,7 +6050,7 @@
 		snprintf(buf, 40, "%01.14e", val->value.d);
 		*retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
 	    }
-	    break;	
+	    break;
 	default:
 	    *retValue = BAD_CAST xmlStrdup(BAD_CAST "???");
 	    return (1);
@@ -6109,7 +6109,7 @@
 	    break;
 	default:
 	    return (xmlSchemaGetCanonValue(val, retValue));
-    }    
+    }
     return (0);
 }