--- parser3/src/main/pa_string.C 2003/03/24 15:26:03 1.172.2.21.2.23 +++ parser3/src/main/pa_string.C 2003/03/24 16:43:27 1.172.2.21.2.27 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/03/24 15:26:03 $"; +static const char* IDENT_STRING_C="$Date: 2003/03/24 16:43:27 $"; #include "pcre.h" @@ -49,7 +49,10 @@ void String::ArrayFragment::append_posit const element_type& fragment=i.next(); fragment_end=fragment_begin+fragment.length; - if(fragment_beginfragment_end) // not reached fragments which may include 'substr'? continue; // found first fragment including piece of 'substr' @@ -73,10 +76,6 @@ void String::ArrayFragment::append_posit break; } } -/* -void String::ArrayFragment::mid(ArrayFragment& result, size_t substr_begin, size_t substr_end) { -} -*/ // StringSimple methods @@ -172,7 +171,7 @@ size_t String::pos(const StringBody subs "searching for '%s' starting from %ud problem: found begin in one fragment, but end in another", substr.cstr(), this_offset); - if(fragment.lang==lang) + if(fragment.lang<=lang) return substr_begin; else { // bad lang... /// WARNING: this possibly skips assert (*), but it's fast @@ -284,7 +283,7 @@ Table* String::match(Charset& source_cha const char* errptr; int erroffset; bool need_pre_post_match=false; - int option_bits[2]; regex_options(options, option_bits, need_pre_post_match); + int option_bits[2]={0}; regex_options(options, option_bits, need_pre_post_match); bool global=option_bits[1]!=0; pcre *code=pcre_compile(pattern, option_bits[0], &errptr, &erroffset,