From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/eina/src/lib/eina_simple_xml_parser.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'libraries/eina/src/lib/eina_simple_xml_parser.c') diff --git a/libraries/eina/src/lib/eina_simple_xml_parser.c b/libraries/eina/src/lib/eina_simple_xml_parser.c index 08a8259..4e357ba 100644 --- a/libraries/eina/src/lib/eina_simple_xml_parser.c +++ b/libraries/eina/src/lib/eina_simple_xml_parser.c @@ -38,7 +38,10 @@ extern "C" void *alloca (size_t); #endif -#include +#ifdef HAVE_STRINGS_H +# include +#endif +#include #include #include @@ -121,7 +124,7 @@ static inline const char * _eina_simple_xml_whitespace_find(const char *itr, const char *itr_end) { for (; itr < itr_end; itr++) - if (isspace(*itr)) break; + if (isspace((unsigned char)*itr)) break; return itr; } @@ -129,7 +132,7 @@ static inline const char * _eina_simple_xml_whitespace_skip(const char *itr, const char *itr_end) { for (; itr < itr_end; itr++) - if (!isspace(*itr)) break; + if (!isspace((unsigned char)*itr)) break; return itr; } @@ -137,7 +140,7 @@ static inline const char * _eina_simple_xml_whitespace_unskip(const char *itr, const char *itr_start) { for (itr--; itr > itr_start; itr--) - if (!isspace(*itr)) break; + if (!isspace((unsigned char)*itr)) break; return itr + 1; } @@ -309,7 +312,7 @@ eina_simple_xml_parse(const char *buf, unsigned buflen, Eina_Bool strip, Eina_Si (!memcmp(itr + 2, "DOCTYPE", sizeof("DOCTYPE") - 1)) && ((itr[2 + sizeof("DOCTYPE") - 1] == '>') || - (isspace(itr[2 + sizeof("DOCTYPE") - 1])))) + (isspace((unsigned char)itr[2 + sizeof("DOCTYPE") - 1])))) { type = EINA_SIMPLE_XML_DOCTYPE; toff = sizeof("!DOCTYPE") - 1; @@ -455,7 +458,7 @@ eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen) for (; itr < itr_end; itr++) { - if (!isspace(*itr)) + if (!isspace((unsigned char)*itr)) { /* user skip tagname and already gave it the attributes */ if (*itr == '=') @@ -492,7 +495,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X key = p; for (key_end = key; key_end < itr_end; key_end++) - if ((*key_end == '=') || (isspace(*key_end))) break; + if ((*key_end == '=') || (isspace((unsigned char)*key_end))) break; if (key_end == itr_end) return EINA_FALSE; if (key_end == key) continue; @@ -504,7 +507,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X value++; } for (; value < itr_end; value++) - if (!isspace(*value)) break; + if (!isspace((unsigned char)*value)) break; if (value == itr_end) return EINA_FALSE; if ((*value == '"') || (*value == '\'')) -- cgit v1.1