--- parser3/src/classes/string.C 2003/04/08 11:08:11 1.125.2.15.2.22 +++ parser3/src/classes/string.C 2003/07/24 11:31:20 1.126 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/04/08 11:08:11 $"; +static const char* IDENT_STRING_C="$Date: 2003/07/24 11:31:20 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -128,7 +128,7 @@ static void _pos(Request& r, MethodParam Value& substr=params.as_no_junction(0, "substr must not be code"); const String& string=GET_SELF(r, VString).string(); - r.write_assign_lang(*new VInt(string.pos(substr.as_string()))); + r.write_assign_lang(*new VInt((int)string.pos(substr.as_string()))); } static void split_list(Request& r, @@ -163,8 +163,8 @@ static int split_options(const String* o int result=0; if(options) { for(Split_option *o=split_option; o->keyL; o++) - if(options->pos(o->keyL)>=0 - || (o->keyU && options->pos(o->keyU)>=0)) { + if(options->pos(o->keyL)!=STRING_NOT_FOUND + || (o->keyU && options->pos(o->keyU)!=STRING_NOT_FOUND)) { if(result & o->checkBit) throw Exception("parser.runtime", options, @@ -265,7 +265,6 @@ static void replace_action(Table& table, int prestart, int prefinish, int poststart, int postfinish, void *info) { - fprintf(stderr, "+"); Replace_action_info& ai=*static_cast(info); if(row) { // begin&middle // piece from last match['prestart'] to beginning of this match['prefinish'] @@ -283,7 +282,6 @@ static void replace_action(Table& table, } } else // end *ai.dest << ai.src->mid(poststart, postfinish); - fprintf(stderr, "-"); } /// @todo use pcre:study somehow @@ -313,7 +311,7 @@ static void _match(Request& r, MethodPar String result; VTable* vtable=new VTable; - Replace_action_info info; + Replace_action_info info={0}; info.request=&r; info.src=&src; info.dest=&result; @@ -380,7 +378,7 @@ public: try { got_cell=true; - result.append_help_length(str, length, String::L_TAINTED); + result.append_know_length(str, length, String::L_TAINTED); return false; } catch(...) { error=SQL_Error("exception occured in String_sql_event_handlers::add_row_cell");