--- parser3/src/classes/string.C 2003/04/08 11:08:11 1.125.2.15.2.22 +++ parser3/src/classes/string.C 2003/09/29 10:09:35 1.127 @@ -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/09/29 10:09:35 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -111,7 +111,8 @@ static void _right(Request& r, MethodPar size_t n=(size_t)params.as_int(0, "n must be int", r); const String& string=GET_SELF(r, VString).string(); - r.write_assign_lang(string.mid(string.length()-n, string.length())); + size_t length=string.length(); + r.write_assign_lang(nkeyL; 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 +266,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 +283,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 +312,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 +379,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");