--- parser3/src/main/pa_string.C 2004/04/02 13:57:07 1.197 +++ parser3/src/main/pa_string.C 2004/07/28 13:43:58 1.199 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_STRING_C="$Date: 2004/04/02 13:57:07 $"; +static const char * const IDENT_STRING_C="$Date: 2004/07/28 13:43:58 $"; #include "pcre.h" @@ -21,7 +21,7 @@ int pa_atoi(const char* str, const Strin if(!str) return 0; - while(*str && isspace(*str)) + while(*str && isspace((unsigned char)*str)) str++; if(!*str) return 0; @@ -41,7 +41,7 @@ int pa_atoi(const char* str, const Strin result=(int)strtol(str, &error_pos, 0); while(char c=*error_pos++) - if(!isspace(c)) + if(!isspace((unsigned char)c)) throw Exception("number.format", problem_source, problem_source?"invalid number (int)": "'%s' is invalid number (int)", str); @@ -53,7 +53,7 @@ double pa_atod(const char* str, const St if(!str) return 0; - while(*str && isspace(*str)) + while(*str && isspace((unsigned char)*str)) str++; if(!*str) return 0; @@ -70,7 +70,7 @@ double pa_atod(const char* str, const St result=(double)strtod(str, &error_pos); while(char c=*error_pos++) - if(!isspace(c)) + if(!isspace((unsigned char)c)) throw Exception("number.format", problem_source, problem_source?"invalid number (double)": "'%s' is invalid number (double)", str); @@ -152,7 +152,6 @@ String::Body String::Body::trim(String:: return *this; if(!chars) chars=" \t\n"; // white space - Body result=*this; size_t start=0; size_t end=our_length; @@ -673,7 +672,7 @@ const char* String::Languages::v() const return (const char*)&langs; } const char* String::v() const { - const int LIMIT_VIEW=20; + const uint LIMIT_VIEW=20; char* buf=(char*)malloc(MAX_STRING); const char*body_view=body.v(); const char*langs_view=langs.v(); @@ -709,4 +708,4 @@ const String& String::trim(String::Trim_ ASSERT_STRING_INVARIANT(result); return result; -} \ No newline at end of file +}