--- parser3/src/include/pa_string.h 2003/09/24 08:02:09 1.145.4.6 +++ parser3/src/include/pa_string.h 2003/09/24 11:52:05 1.145.4.8 @@ -8,7 +8,7 @@ #ifndef PA_STRING_H #define PA_STRING_H -static const char* IDENT_STRING_H="$Date: 2003/09/24 08:02:09 $"; +static const char* IDENT_STRING_H="$Date: 2003/09/24 11:52:05 $"; // includes @@ -20,10 +20,6 @@ extern "C" { // cord's author forgot to #include "cord.h" }; -/// must use simple version, without optimization for short pieces -/// it's much more convinient for iterating. we rely on this here: CORD_block_iter -#define CORD_chars(c, i) CORD_chars_block((c), (i)) - // cord extension /* Returns true if x does contain */ /* char not_c at positions i..i+n. Value i,i+n must be < CORD_len(x). */ @@ -148,7 +144,7 @@ public: enum Language { L_UNSPECIFIED=0, ///< no real string has parts of this lange: it's just convinient to check when string's empty // these two must go before others, there are checks for >L_AS_IS - L_CLEAN, ///< clean + L_CLEAN='1', ///< clean L_AS_IS, ///< leave all characters intact L_PASS_APPENDED, @@ -200,11 +196,11 @@ public: assert(langs); if(is_not_just_lang) - langs=CORD_cat(langs, to_nonempty_target_langs); + langs=CORD_append_blocks(langs, to_nonempty_target_langs); else { // we were "just lang" size_t current_size=get_length(current); assert(current_size); - langs=CORD_cat( + langs=CORD_append_blocks( CORD_chars((char)lang, current_size), // first piece [making from just 'lang'] to_nonempty_target_langs); // new piece } @@ -290,7 +286,7 @@ public: if(!langs) return current_length==0; if(is_not_just_lang) - return !*langs && CORD_len(langs)==current_length; + return CORD_len(langs)==current_length; return true; // uncheckable, actually } };