From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kjs/ChangeLog | 2 +- kjs/DESIGN.ideas | 2 +- kjs/collector.cpp | 4 +- kjs/configure.in.in | 2 +- kjs/create_hash_table | 8 ++-- kjs/date_object.cpp | 8 ++-- kjs/dtoa.cpp | 116 +++++++++++++++++++++++++------------------------- kjs/function.cpp | 10 ++--- kjs/grammar.cpp | 2 +- kjs/internal.cpp | 6 +-- kjs/internal.h | 4 +- kjs/interpreter.h | 8 ++-- kjs/lexer.cpp | 4 +- kjs/lexer.h | 2 +- kjs/lookup.cpp | 6 +-- kjs/lookup.h | 4 +- kjs/nodes.cpp | 26 +++++------ kjs/number_object.cpp | 2 +- kjs/object.cpp | 8 ++-- kjs/object.h | 2 +- kjs/object_object.cpp | 2 +- kjs/reference.cpp | 2 +- kjs/regexp.cpp | 12 +++--- kjs/regexp_object.cpp | 10 ++--- kjs/simple_number.h | 4 +- kjs/string_object.cpp | 22 +++++----- kjs/ustring.cpp | 14 +++--- kjs/ustring.h | 14 +++--- 28 files changed, 153 insertions(+), 153 deletions(-) (limited to 'kjs') diff --git a/kjs/ChangeLog b/kjs/ChangeLog index e08ec6eed..c5f42ace2 100644 --- a/kjs/ChangeLog +++ b/kjs/ChangeLog @@ -408,7 +408,7 @@ 2001-01-04 Harri Porten - * ustring.h: pack bytes to avoid tqalignment problems (ARM) reported + * ustring.h: pack bytes to avoid alignment problems (ARM) reported by Stefan Hanske * nodes.cpp: typeof fix by Emmeran Seehuber * nodes.cpp: fixed order of function declaration proccessing diff --git a/kjs/DESIGN.ideas b/kjs/DESIGN.ideas index e493afe75..d7684b45b 100644 --- a/kjs/DESIGN.ideas +++ b/kjs/DESIGN.ideas @@ -31,7 +31,7 @@ Proposal for a new object model. Far from being complete. Garbage Collector Features: - - offers class static data (nice tqreplacement for pointers to member + - offers class static data (nice replacement for pointers to member function objects in the prototype object) - no more need to pass around ExecState pointers for the C++ user (substituted with the need for Object* in the type implementation) diff --git a/kjs/collector.cpp b/kjs/collector.cpp index d3de0352a..b8d233850 100644 --- a/kjs/collector.cpp +++ b/kjs/collector.cpp @@ -117,7 +117,7 @@ void* Collector::allocate(size_t s) heap.firstBlockWithPossibleSpace = i; if (targetBlock == NULL) { - // didn't tqfind one, need to allocate a new block + // didn't find one, need to allocate a new block if (heap.usedBlocks == heap.numBlocks) { static const size_t maxNumBlocks = ULONG_MAX / sizeof(CollectorBlock*) / GROWTH_FACTOR; @@ -133,7 +133,7 @@ void* Collector::allocate(size_t s) heap.usedBlocks++; } - // tqfind a free spot in the block and detach it from the free list + // find a free spot in the block and detach it from the free list CollectorCell *newCell = targetBlock->freeList; ValueImp *imp = (ValueImp*)newCell; diff --git a/kjs/configure.in.in b/kjs/configure.in.in index 5da8d1f84..fd23612e0 100644 --- a/kjs/configure.in.in +++ b/kjs/configure.in.in @@ -79,7 +79,7 @@ AC_DEFUN([AC_CHECK_PCREPOSIX], AC_DEFINE(HAVE_PCREPOSIX, 1, [Define if you have pcreposix libraries and header files.]) else AC_MSG_ERROR([You're missing libpcre. -Download libpcre from http://www.pcre.org or tqfind a binary package for your platform. +Download libpcre from http://www.pcre.org or find a binary package for your platform. Alternatively, you can specify --disable-pcre, but some web pages - using regular expressions in Javascript code - will not work correctly, the regexp support being quite limited if libpcre isn't present.]) diff --git a/kjs/create_hash_table b/kjs/create_hash_table index c8c4d1ff9..a7df5eddf 100755 --- a/kjs/create_hash_table +++ b/kjs/create_hash_table @@ -7,10 +7,10 @@ $file = $ARGV[0]; shift; -my $tqfindSize = 0; +my $findSize = 0; my $includelookup = 0; # Use -s as second argument to make it try many hash sizes -$tqfindSize = 1 if (defined($ARGV[0]) && $ARGV[0] eq "-s"); +$findSize = 1 if (defined($ARGV[0]) && $ARGV[0] eq "-s"); # Use -i as second argument to make it include "lookup.h" $includelookup = 1 if (defined($ARGV[0]) && $ARGV[0] eq "-i"); print STDERR "Creating hashtable for $file\n"; @@ -49,7 +49,7 @@ while () { } } elsif (/^\@end\s*$/ && $inside) { - if($tqfindSize) { + if($findSize) { my $entriesnum=@keys; print STDERR "Table: $name $entriesnum entries\n"; for( $i=3 ; $i<79 ; ++$i) { $hashsize=$i ; calcTable(); } @@ -114,7 +114,7 @@ sub calcTable() { } #print STDERR "After loop: size=$size table=".($#table+1)."\n"; - if ($tqfindSize) { + if ($findSize) { my $emptycount = 0; foreach $entry (@table) { $emptycount++ if (!defined($entry)); diff --git a/kjs/date_object.cpp b/kjs/date_object.cpp index 65be661f1..26635611d 100644 --- a/kjs/date_object.cpp +++ b/kjs/date_object.cpp @@ -844,7 +844,7 @@ double KJS::makeTime(struct tm *t, double ms, bool utc) } // returns 0-11 (Jan-Dec); -1 on failure -static int tqfindMonth(const char *monthStr) +static int findMonth(const char *monthStr) { assert(monthStr); static const char haystack[37] = "janfebmaraprmayjunjulaugsepoctnovdec"; @@ -911,7 +911,7 @@ double KJS::KRFCDate_parseDate(const UString &_date) { if (isSpaceLike(*dateString) && dateString - wordStart >= 3) { - month = tqfindMonth(wordStart); + month = findMonth(wordStart); while(*dateString && isSpaceLike(*dateString)) dateString++; wordStart = dateString; @@ -921,7 +921,7 @@ double KJS::KRFCDate_parseDate(const UString &_date) } // missing delimiter between month and day (like "January29")? if (month == -1 && dateString && wordStart != dateString) { - month = tqfindMonth(wordStart); + month = findMonth(wordStart); // TODO: emit warning about dubious format found } @@ -991,7 +991,7 @@ double KJS::KRFCDate_parseDate(const UString &_date) if ( month == -1 ) // not found yet { - month = tqfindMonth(dateString); + month = findMonth(dateString); if (month == -1) return invalidDate; diff --git a/kjs/dtoa.cpp b/kjs/dtoa.cpp index a4d86f208..054450f12 100644 --- a/kjs/dtoa.cpp +++ b/kjs/dtoa.cpp @@ -307,19 +307,19 @@ typedef union { double d; ULong L[2]; } U; #define Exp_shift1 20 #define Exp_msk1 0x100000 #define Exp_msk11 0x100000 -#define Exp_tqmask 0x7ff00000 +#define Exp_mask 0x7ff00000 #define P 53 #define Bias 1023 #define Emin (-1022) #define Exp_1 0x3ff00000 #define Exp_11 0x3ff00000 #define Ebits 11 -#define Frac_tqmask 0xfffff -#define Frac_tqmask1 0xfffff +#define Frac_mask 0xfffff +#define Frac_mask1 0xfffff #define Ten_pmax 22 #define Bletch 0x10 -#define Bndry_tqmask 0xfffff -#define Bndry_tqmask1 0xfffff +#define Bndry_mask 0xfffff +#define Bndry_mask1 0xfffff #define LSB 1 #define Sign_bit 0x80000000 #define Log2P 1 @@ -363,18 +363,18 @@ typedef union { double d; ULong L[2]; } U; #define Exp_shift1 24 #define Exp_msk1 0x1000000 #define Exp_msk11 0x1000000 -#define Exp_tqmask 0x7f000000 +#define Exp_mask 0x7f000000 #define P 14 #define Bias 65 #define Exp_1 0x41000000 #define Exp_11 0x41000000 #define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ -#define Frac_tqmask 0xffffff -#define Frac_tqmask1 0xffffff +#define Frac_mask 0xffffff +#define Frac_mask1 0xffffff #define Bletch 4 #define Ten_pmax 22 -#define Bndry_tqmask 0xefffff -#define Bndry_tqmask1 0xffffff +#define Bndry_mask 0xefffff +#define Bndry_mask1 0xffffff #define LSB 1 #define Sign_bit 0x80000000 #define Log2P 4 @@ -389,18 +389,18 @@ typedef union { double d; ULong L[2]; } U; #define Exp_shift1 7 #define Exp_msk1 0x80 #define Exp_msk11 0x800000 -#define Exp_tqmask 0x7f80 +#define Exp_mask 0x7f80 #define P 56 #define Bias 129 #define Exp_1 0x40800000 #define Exp_11 0x4080 #define Ebits 8 -#define Frac_tqmask 0x7fffff -#define Frac_tqmask1 0xffff007f +#define Frac_mask 0x7fffff +#define Frac_mask1 0xffff007f #define Ten_pmax 24 #define Bletch 2 -#define Bndry_tqmask 0xffff007f -#define Bndry_tqmask1 0xffff007f +#define Bndry_mask 0xffff007f +#define Bndry_mask1 0xffff007f #define LSB 0x10000 #define Sign_bit 0x8000 #define Log2P 1 @@ -424,7 +424,7 @@ extern double rnd_prod(double, double), rnd_quot(double, double); #define rounded_quotient(a,b) a /= b #endif -#define Big0 (Frac_tqmask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) +#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) #define Big1 0xffffffff #ifndef Pack_32 @@ -1039,7 +1039,7 @@ ulp U x, a; dval(x) = dx; - L = (word0(x) & Exp_tqmask) - (P-1)*Exp_msk1; + L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1; #ifndef Avoid_Underflow #ifndef Sudden_Underflow if (L > 0) { @@ -1166,7 +1166,7 @@ d2b #endif x = b->x; - z = d0 & Frac_tqmask; + z = d0 & Frac_mask; d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ #ifdef Sudden_Underflow de = (int)(d0 >> Exp_shift); @@ -1253,7 +1253,7 @@ d2b #endif #ifdef IBM *e = (de - Bias - (P-1) << 2) + k; - *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_tqmask); + *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask); #else *e = de - Bias - (P-1) + k; *bits = P - k; @@ -1423,7 +1423,7 @@ hexnan x[1] = (x[1] << 4) | c; } if ((x[0] &= 0xfffff) || x[1]) { - word0(*rvp) = Exp_tqmask | x[0]; + word0(*rvp) = Exp_mask | x[0]; word1(*rvp) = x[1]; } } @@ -1680,7 +1680,7 @@ strtod vax_ovfl_check: word0(rv) -= P*Exp_msk1; /* rv = */ rounded_product(dval(rv), tens[e]); - if ((word0(rv) & Exp_tqmask) + if ((word0(rv) & Exp_mask) > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) goto ovfl; word0(rv) += P*Exp_msk1; @@ -1747,11 +1747,11 @@ strtod word1(rv) = Big1; break; default: - word0(rv) = Exp_tqmask; + word0(rv) = Exp_mask; word1(rv) = 0; } #else /*Honor_FLT_ROUNDS*/ - word0(rv) = Exp_tqmask; + word0(rv) = Exp_mask; word1(rv) = 0; #endif /*Honor_FLT_ROUNDS*/ #ifdef SET_INEXACT @@ -1774,7 +1774,7 @@ strtod /* The last multiplication could overflow. */ word0(rv) -= P*Exp_msk1; dval(rv) *= bigtens[j]; - if ((z = word0(rv) & Exp_tqmask) + if ((z = word0(rv) & Exp_mask) > Exp_msk1*(DBL_MAX_EXP+Bias-P)) goto ovfl; if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { @@ -1800,7 +1800,7 @@ strtod for(j = 0; e1 > 0; j++, e1 >>= 1) if (e1 & 1) dval(rv) *= tinytens[j]; - if (scale && (j = 2*P + 1 - ((word0(rv) & Exp_tqmask) + if (scale && (j = 2*P + 1 - ((word0(rv) & Exp_mask) >> Exp_shift)) > 0) { /* scaled rv is denormal; zap j low bits */ if (j >= 32) { @@ -1948,8 +1948,8 @@ strtod else if (!dsign) { adj = -1.; if (!word1(rv) - && !(word0(rv) & Frac_tqmask)) { - y = word0(rv) & Exp_tqmask; + && !(word0(rv) & Frac_mask)) { + y = word0(rv) & Exp_mask; #ifdef Avoid_Underflow if (!scale || y > 2*P*Exp_msk1) #else @@ -1963,12 +1963,12 @@ strtod } apply_adj: #ifdef Avoid_Underflow - if (scale && (y = word0(rv) & Exp_tqmask) + if (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1) word0(adj) += (2*P+1)*Exp_msk1 - y; #else #ifdef Sudden_Underflow - if ((word0(rv) & Exp_tqmask) <= + if ((word0(rv) & Exp_mask) <= P*Exp_msk1) { word0(rv) += P*Exp_msk1; dval(rv) += adj*ulp(dval(rv)); @@ -1994,11 +1994,11 @@ strtod } } #ifdef Avoid_Underflow - if (scale && (y = word0(rv) & Exp_tqmask) <= 2*P*Exp_msk1) + if (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1) word0(adj) += (2*P+1)*Exp_msk1 - y; #else #ifdef Sudden_Underflow - if ((word0(rv) & Exp_tqmask) <= P*Exp_msk1) { + if ((word0(rv) & Exp_mask) <= P*Exp_msk1) { word0(rv) += P*Exp_msk1; adj *= ulp(dval(rv)); if (dsign) @@ -2023,12 +2023,12 @@ strtod /* Error is less than half an ulp -- check for * special case of mantissa a power of two. */ - if (dsign || word1(rv) || word0(rv) & Bndry_tqmask + if (dsign || word1(rv) || word0(rv) & Bndry_mask #ifdef IEEE_Arith #ifdef Avoid_Underflow - || (word0(rv) & Exp_tqmask) <= (2*P+1)*Exp_msk1 + || (word0(rv) & Exp_mask) <= (2*P+1)*Exp_msk1 #else - || (word0(rv) & Exp_tqmask) <= Exp_msk1 + || (word0(rv) & Exp_mask) <= Exp_msk1 #endif #endif ) { @@ -2053,15 +2053,15 @@ strtod if (i == 0) { /* exactly half-way between */ if (dsign) { - if ((word0(rv) & Bndry_tqmask1) == Bndry_tqmask1 + if ((word0(rv) & Bndry_mask1) == Bndry_mask1 && word1(rv) == ( #ifdef Avoid_Underflow - (scale && (y = word0(rv) & Exp_tqmask) <= 2*P*Exp_msk1) + (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1) ? (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) : #endif 0xffffffff)) { /*boundary case -- increment exponent*/ - word0(rv) = (word0(rv) & Exp_tqmask) + word0(rv) = (word0(rv) & Exp_mask) + Exp_msk1 #ifdef IBM | Exp_msk1 >> 4 @@ -2074,11 +2074,11 @@ strtod break; } } - else if (!(word0(rv) & Bndry_tqmask) && !word1(rv)) { + else if (!(word0(rv) & Bndry_mask) && !word1(rv)) { drop_down: /* boundary case -- decrement exponent */ #ifdef Sudden_Underflow /*{{*/ - L = word0(rv) & Exp_tqmask; + L = word0(rv) & Exp_mask; #ifdef IBM if (L < Exp_msk1) #else @@ -2093,7 +2093,7 @@ strtod #else /*Sudden_Underflow}{*/ #ifdef Avoid_Underflow if (scale) { - L = word0(rv) & Exp_tqmask; + L = word0(rv) & Exp_mask; if (L <= (2*P+1)*Exp_msk1) { if (L > (P+2)*Exp_msk1) /* round even ==> */ @@ -2104,9 +2104,9 @@ strtod } } #endif /*Avoid_Underflow*/ - L = (word0(rv) & Exp_tqmask) - Exp_msk1; + L = (word0(rv) & Exp_mask) - Exp_msk1; #endif /*Sudden_Underflow}}*/ - word0(rv) = L | Bndry_tqmask1; + word0(rv) = L | Bndry_mask1; word1(rv) = 0xffffffff; #ifdef IBM goto cont; @@ -2137,7 +2137,7 @@ strtod if ((aadj = ratio(delta, bs)) <= 2.) { if (dsign) aadj = aadj1 = 1.; - else if (word1(rv) || word0(rv) & Bndry_tqmask) { + else if (word1(rv) || word0(rv) & Bndry_mask) { #ifndef Sudden_Underflow if (word1(rv) == Tiny1 && !word0(rv)) goto undfl; @@ -2173,7 +2173,7 @@ strtod aadj1 += 0.5; #endif /*Check_FLT_ROUNDS*/ } - y = word0(rv) & Exp_tqmask; + y = word0(rv) & Exp_mask; /* Check for overflow */ @@ -2182,7 +2182,7 @@ strtod word0(rv) -= P*Exp_msk1; adj = aadj1 * ulp(dval(rv)); dval(rv) += adj; - if ((word0(rv) & Exp_tqmask) >= + if ((word0(rv) & Exp_mask) >= Exp_msk1*(DBL_MAX_EXP+Bias-P)) { if (word0(rv0) == Big0 && word1(rv0) == Big1) goto ovfl; @@ -2210,15 +2210,15 @@ strtod dval(rv) += adj; #else #ifdef Sudden_Underflow - if ((word0(rv) & Exp_tqmask) <= P*Exp_msk1) { + if ((word0(rv) & Exp_mask) <= P*Exp_msk1) { dval(rv0) = dval(rv); word0(rv) += P*Exp_msk1; adj = aadj1 * ulp(dval(rv)); dval(rv) += adj; #ifdef IBM - if ((word0(rv) & Exp_tqmask) < P*Exp_msk1) + if ((word0(rv) & Exp_mask) < P*Exp_msk1) #else - if ((word0(rv) & Exp_tqmask) <= P*Exp_msk1) + if ((word0(rv) & Exp_mask) <= P*Exp_msk1) #endif { if (word0(rv0) == Tiny0 @@ -2253,7 +2253,7 @@ strtod #endif /*Sudden_Underflow*/ #endif /*Avoid_Underflow*/ } - z = word0(rv) & Exp_tqmask; + z = word0(rv) & Exp_mask; #ifndef SET_INEXACT #ifdef Avoid_Underflow if (!scale) @@ -2263,7 +2263,7 @@ strtod L = (Long)aadj; aadj -= L; /* The tolerances below are conservative. */ - if (dsign || word1(rv) || word0(rv) & Bndry_tqmask) { + if (dsign || word1(rv) || word0(rv) & Bndry_mask) { if (aadj < .4999999 || aadj > .5000001) break; } @@ -2301,7 +2301,7 @@ strtod } #endif /* Avoid_Underflow */ #ifdef SET_INEXACT - if (inexact && !(word0(rv) & Exp_tqmask)) { + if (inexact && !(word0(rv) & Exp_mask)) { /* set underflow bit */ dval(rv0) = 1e-300; dval(rv0) *= dval(rv0); @@ -2595,7 +2595,7 @@ dtoa #if defined(IEEE_Arith) + defined(VAX) #ifdef IEEE_Arith - if ((word0(d) & Exp_tqmask) == Exp_tqmask) + if ((word0(d) & Exp_mask) == Exp_mask) #else if (word0(d) == 0x8000) #endif @@ -2633,15 +2633,15 @@ dtoa b = d2b(dval(d), &be, &bbits); #ifdef Sudden_Underflow - i = (int)(word0(d) >> Exp_shift1 & (Exp_tqmask>>Exp_shift1)); + i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)); #else - if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_tqmask>>Exp_shift1)))) { + if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)))) { #endif dval(d2) = dval(d); - word0(d2) &= Frac_tqmask1; + word0(d2) &= Frac_mask1; word0(d2) |= Exp_11; #ifdef IBM - if (j = 11 - hi0bits(word0(d2) & Frac_tqmask)) + if (j = 11 - hi0bits(word0(d2) & Frac_mask)) dval(d2) /= 1 << j; #endif @@ -2969,9 +2969,9 @@ dtoa && rounding == 1 #endif ) { - if (!word1(d) && !(word0(d) & Bndry_tqmask) + if (!word1(d) && !(word0(d) & Bndry_mask) #ifndef Sudden_Underflow - && word0(d) & (Exp_tqmask & ~Exp_msk1) + && word0(d) & (Exp_mask & ~Exp_msk1) #endif ) { /* The special case */ diff --git a/kjs/function.cpp b/kjs/function.cpp index 9827cbff7..ef5410cf8 100644 --- a/kjs/function.cpp +++ b/kjs/function.cpp @@ -55,7 +55,7 @@ UString encodeURI(ExecState *exec, UString string, UString unescapedSet) for (int k = 0; k < string.size(); k++) { UChar C = string[k]; - if (unescapedSet.tqfind(C) >= 0) { + if (unescapedSet.find(C) >= 0) { if (encbufLen+1 >= encbufAlloc) encbuf = (UChar*)realloc(encbuf,(encbufAlloc *= 2)*sizeof(UChar)); encbuf[encbufLen++] = C; @@ -244,7 +244,7 @@ UString decodeURI(ExecState *exec, UString string, UString reservedSet) } // UTF-8 transform - const unsigned long tqreplacementChar = 0xFFFD; + const unsigned long replacementChar = 0xFFFD; unsigned long V; if (n == 2) { unsigned long yyyyy = octets[0] & 0x1F; @@ -252,7 +252,7 @@ UString decodeURI(ExecState *exec, UString string, UString reservedSet) V = (yyyyy << 6) | zzzzzz; // 2-byte sequence overlong for this value? if (V < 0x80) - V = tqreplacementChar; + V = replacementChar; C = UChar((unsigned short)V); } else if (n == 3) { @@ -264,7 +264,7 @@ UString decodeURI(ExecState *exec, UString string, UString reservedSet) // an invalid value or UTF-16 surrogate? if (V < 0x800 || V == 0xFFFE || V == 0xFFFF || (V >= 0xD800 && V <= 0xDFFF)) - V = tqreplacementChar; + V = replacementChar; C = UChar((unsigned short)V); } else { @@ -289,7 +289,7 @@ UString decodeURI(ExecState *exec, UString string, UString reservedSet) } } - if (reservedSet.tqfind(C) < 0) { + if (reservedSet.find(C) < 0) { decbuf[decbufLen++] = C; } else { diff --git a/kjs/grammar.cpp b/kjs/grammar.cpp index ea524d5e1..03eb07876 100644 --- a/kjs/grammar.cpp +++ b/kjs/grammar.cpp @@ -1495,7 +1495,7 @@ yystpcpy (yydest, yysrc) /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string - tqcontains an apostrophe, a comma, or backslash (other than + contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ diff --git a/kjs/internal.cpp b/kjs/internal.cpp index 4e913c508..25f7b6e31 100644 --- a/kjs/internal.cpp +++ b/kjs/internal.cpp @@ -52,7 +52,7 @@ extern int kjsyyparse(); using namespace KJS; namespace KJS { - /* work around some strict tqalignment requirements + /* work around some strict alignment requirements for double variables on some architectures (e.g. PA-RISC) */ typedef union { unsigned char b[8]; double d; } kjs_double_t; @@ -320,7 +320,7 @@ LabelStack &LabelStack::operator=(const LabelStack &other) bool LabelStack::push(const Identifier &id) { - if (id.isEmpty() || tqcontains(id)) + if (id.isEmpty() || contains(id)) return false; StackElem *newtos = new StackElem; @@ -330,7 +330,7 @@ bool LabelStack::push(const Identifier &id) return true; } -bool LabelStack::tqcontains(const Identifier &id) const +bool LabelStack::contains(const Identifier &id) const { if (id.isEmpty()) return true; diff --git a/kjs/internal.h b/kjs/internal.h index 988b1a347..413fdaa52 100644 --- a/kjs/internal.h +++ b/kjs/internal.h @@ -175,7 +175,7 @@ namespace KJS { /** * Is the id in the stack? */ - bool tqcontains(const Identifier &id) const; + bool contains(const Identifier &id) const; /** * Removes from the stack the last pushed id (what else?) */ @@ -318,7 +318,7 @@ namespace KJS { Debugger *dbg; // Built-in properties of the object prototype. These are accessible - // from here even if they are tqreplaced by js code (e.g. assigning to + // from here even if they are replaced by js code (e.g. assigning to // Array.prototype) Object b_Object; diff --git a/kjs/interpreter.h b/kjs/interpreter.h index f7fee0727..e8f4f84f3 100644 --- a/kjs/interpreter.h +++ b/kjs/interpreter.h @@ -56,7 +56,7 @@ namespace KJS { * Represents an execution context, as specified by section 10 of the ECMA * spec. * - * An execution context tqcontains information about the current state of the + * An execution context contains information about the current state of the * script - the scope for variable lookup, the value of "this", etc. A new * execution context is entered whenever global code is executed (e.g. with * Interpreter::evaluate()), a function is called (see @@ -86,7 +86,7 @@ namespace KJS { const ScopeChain &scopeChain() const; /** - * Returns the variable object for the execution context. This tqcontains a + * Returns the variable object for the execution context. This contains a * property for each variable declared in the execution context. * * @return The execution context's variable object @@ -211,7 +211,7 @@ namespace KJS { * Returns the execution state object which can be used to execute * scripts using this interpreter at a the "global" level, i.e. one * with a execution context that has the global object as the "this" - * value, and who's scope chain tqcontains only the global object. + * value, and who's scope chain contains only the global object. * * Note: this pointer remains constant for the life of the interpreter * and should not be manually deleted. @@ -266,7 +266,7 @@ namespace KJS { /** * Returns the builtin "Object" object. This is the object that was set * as a property of the global object during construction; if the property - * is tqreplaced by script code, this method will still return the original + * is replaced by script code, this method will still return the original * object. * * @return The builtin "Object" object diff --git a/kjs/lexer.cpp b/kjs/lexer.cpp index 09842c883..054defb88 100644 --- a/kjs/lexer.cpp +++ b/kjs/lexer.cpp @@ -542,7 +542,7 @@ int Lexer::lex() } break; case IdentifierOrKeyword: - if ((token = Lookup::tqfind(&mainTable, buffer16, pos16)) < 0) { + if ((token = Lookup::find(&mainTable, buffer16, pos16)) < 0) { case Identifier: // Lookup for keyword failed, means this is an identifier // Apply anonymous-function hack below (convert the identifier) @@ -604,7 +604,7 @@ bool Lexer::isIdentLetter(unsigned short c) // Uppercase letter (Lu), Lowercase letter (Ll), // Titlecase letter (Lt)", Modifier letter (Lm), // Other letter (Lo), or Letter number (Nl). - // Also see: http://www.tqunicode.org/Public/UNIDATA/UnicodeData.txt */ + // Also see: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */ return (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || // A with grave - O with diaeresis diff --git a/kjs/lexer.h b/kjs/lexer.h index da7c5ac7e..c6cb6aa88 100644 --- a/kjs/lexer.h +++ b/kjs/lexer.h @@ -144,7 +144,7 @@ namespace KJS { int bol; // begin of line #endif - // current and following tqunicode characters (int to allow for -1 for end-of-file marker) + // current and following unicode characters (int to allow for -1 for end-of-file marker) int current, next1, next2, next3; UString **strings; diff --git a/kjs/lookup.cpp b/kjs/lookup.cpp index 30ea46eef..899238949 100644 --- a/kjs/lookup.cpp +++ b/kjs/lookup.cpp @@ -75,7 +75,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table, return findEntry( table, s.data(), s.size() ); } -int Lookup::tqfind(const struct HashTable *table, +int Lookup::find(const struct HashTable *table, const UChar *c, unsigned int len) { const HashEntry *entry = findEntry( table, c, len ); @@ -84,9 +84,9 @@ int Lookup::tqfind(const struct HashTable *table, return -1; } -int Lookup::tqfind(const struct HashTable *table, const Identifier &s) +int Lookup::find(const struct HashTable *table, const Identifier &s) { - return tqfind(table, s.data(), s.size()); + return find(table, s.data(), s.size()); } unsigned int Lookup::hash(const UChar *c, unsigned int len) diff --git a/kjs/lookup.h b/kjs/lookup.h index d1b3cc594..a77b0b633 100644 --- a/kjs/lookup.h +++ b/kjs/lookup.h @@ -104,8 +104,8 @@ namespace KJS { /** * Find an entry in the table, and return its value (i.e. the value field of HashEntry) */ - static int tqfind(const struct HashTable *table, const Identifier &s); - static int tqfind(const struct HashTable *table, + static int find(const struct HashTable *table, const Identifier &s); + static int find(const struct HashTable *table, const UChar *c, unsigned int len); /** diff --git a/kjs/nodes.cpp b/kjs/nodes.cpp index 9e6c22535..c6ee18bf1 100644 --- a/kjs/nodes.cpp +++ b/kjs/nodes.cpp @@ -408,7 +408,7 @@ Reference ResolveNode::evaluateReference(ExecState *exec) const // identifier not found #ifdef KJS_VERBOSE - cerr << "Resolve::evaluateReference: didn't tqfind '" << ident.ustring().ascii() << "'" << endl; + cerr << "Resolve::evaluateReference: didn't find '" << ident.ustring().ascii() << "'" << endl; #endif return Reference(Null(), ident); } @@ -2072,8 +2072,8 @@ Completion DoWhileNode::execute(ExecState *exec) exec->context().imp()->seenLabels()->pushIteration(); c = statement->execute(exec); exec->context().imp()->seenLabels()->popIteration(); - if (!((c.complType() == Continue) && ls.tqcontains(c.target()))) { - if ((c.complType() == Break) && ls.tqcontains(c.target())) + if (!((c.complType() == Continue) && ls.contains(c.target()))) { + if ((c.complType() == Break) && ls.contains(c.target())) return Completion(Normal, value); if (c.complType() != Normal) return c; @@ -2134,9 +2134,9 @@ Completion WhileNode::execute(ExecState *exec) if (c.isValueCompletion()) value = c.value(); - if ((c.complType() == Continue) && ls.tqcontains(c.target())) + if ((c.complType() == Continue) && ls.contains(c.target())) continue; - if ((c.complType() == Break) && ls.tqcontains(c.target())) + if ((c.complType() == Break) && ls.contains(c.target())) return Completion(Normal, value); if (c.complType() != Normal) return c; @@ -2200,8 +2200,8 @@ Completion ForNode::execute(ExecState *exec) exec->context().imp()->seenLabels()->popIteration(); if (c.isValueCompletion()) cval = c.value(); - if (!((c.complType() == Continue) && ls.tqcontains(c.target()))) { - if ((c.complType() == Break) && ls.tqcontains(c.target())) + if (!((c.complType() == Continue) && ls.contains(c.target()))) { + if ((c.complType() == Break) && ls.contains(c.target())) return Completion(Normal, cval); if (c.complType() != Normal) return c; @@ -2308,8 +2308,8 @@ Completion ForInNode::execute(ExecState *exec) if (c.isValueCompletion()) retval = c.value(); - if (!((c.complType() == Continue) && ls.tqcontains(c.target()))) { - if ((c.complType() == Break) && ls.tqcontains(c.target())) + if (!((c.complType() == Continue) && ls.contains(c.target()))) { + if ((c.complType() == Break) && ls.contains(c.target())) break; if (c.complType() != Normal) { return c; @@ -2342,7 +2342,7 @@ Completion ContinueNode::execute(ExecState *exec) if (ident.isEmpty() && !exec->context().imp()->seenLabels()->inIteration()) return Completion(Throw, throwError(exec, SyntaxError, "continue used outside of iteration statement")); - else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->tqcontains(ident)) + else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->contains(ident)) return Completion(Throw, throwError(exec, SyntaxError, "Label %s not found in containing block. Can't continue.", ident)); else @@ -2362,7 +2362,7 @@ Completion BreakNode::execute(ExecState *exec) !exec->context().imp()->seenLabels()->inSwitch()) return Completion(Throw, throwError(exec, SyntaxError, "break used outside of iteration or switch statement")); - else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->tqcontains(ident)) + else if (!ident.isEmpty() && !exec->context().imp()->seenLabels()->contains(ident)) return Completion(Throw, throwError(exec, SyntaxError, "Label %s not found in containing block. Can't break.", ident)); else @@ -2680,7 +2680,7 @@ Completion SwitchNode::execute(ExecState *exec) Completion res = block->evalBlock(exec,v); exec->context().imp()->seenLabels()->popSwitch(); - if ((res.complType() == Break) && ls.tqcontains(res.target())) + if ((res.complType() == Break) && ls.contains(res.target())) return Completion(Normal, res.value()); else return res; @@ -2998,7 +2998,7 @@ void FuncDeclNode::processFuncDecl(ExecState *exec) if (body) { // hack the scope so that the function gets put as a property of func, and it's scope - // tqcontains the func as well as our current scope + // contains the func as well as our current scope Object oldVar = ctx->variableObject(); ctx->setVariableObject(func); ctx->pushScope(func); diff --git a/kjs/number_object.cpp b/kjs/number_object.cpp index b7d20a299..0d6698142 100644 --- a/kjs/number_object.cpp +++ b/kjs/number_object.cpp @@ -156,7 +156,7 @@ Value NumberProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg const char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; // INT_MAX results in 1024 characters left of the dot with radix 2 // give the same space on the right side. safety checks are in place - // unless someone tqfinds a precise rule. + // unless someone finds a precise rule. char s[2048 + 3]; double x = v.toNumber(exec); if (isNaN(x) || isInf(x)) diff --git a/kjs/object.cpp b/kjs/object.cpp index 0e0d0f966..fba1e0257 100644 --- a/kjs/object.cpp +++ b/kjs/object.cpp @@ -234,7 +234,7 @@ bool ObjectImp::canPut(ExecState *, const Identifier &propertyName) const return!(attributes & ReadOnly); // Look in the static hashtable of properties - const HashEntry* e = tqfindPropertyHashEntry(propertyName); + const HashEntry* e = findPropertyHashEntry(propertyName); if (e) return !(e->attr & ReadOnly); @@ -250,7 +250,7 @@ bool ObjectImp::hasProperty(ExecState *exec, const Identifier &propertyName) con return true; // Look in the static hashtable of properties - if (tqfindPropertyHashEntry(propertyName)) + if (findPropertyHashEntry(propertyName)) return true; // non-standard netscape extension @@ -280,7 +280,7 @@ bool ObjectImp::deleteProperty(ExecState * /*exec*/, const Identifier &propertyN } // Look in the static hashtable of properties - const HashEntry* entry = tqfindPropertyHashEntry(propertyName); + const HashEntry* entry = findPropertyHashEntry(propertyName); if (entry && entry->attr & DontDelete) return false; // this builtin property can't be deleted return true; @@ -351,7 +351,7 @@ Value ObjectImp::defaultValue(ExecState *exec, Type hint) const return err; } -const HashEntry* ObjectImp::tqfindPropertyHashEntry( const Identifier& propertyName ) const +const HashEntry* ObjectImp::findPropertyHashEntry( const Identifier& propertyName ) const { const ClassInfo *info = classInfo(); while (info) { diff --git a/kjs/object.h b/kjs/object.h index 49c637866..ca795460c 100644 --- a/kjs/object.h +++ b/kjs/object.h @@ -602,7 +602,7 @@ namespace KJS { protected: PropertyMap _prop; private: - const HashEntry* tqfindPropertyHashEntry( const Identifier& propertyName ) const; + const HashEntry* findPropertyHashEntry( const Identifier& propertyName ) const; ObjectImpPrivate *_od; ValueImp *_proto; ValueImp *_internalValue; diff --git a/kjs/object_object.cpp b/kjs/object_object.cpp index c429b96a0..e17835df6 100644 --- a/kjs/object_object.cpp +++ b/kjs/object_object.cpp @@ -119,7 +119,7 @@ Value ObjectProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg if (propertyName == specialPrototypePropertyName) return Value(BooleanImp::staticFalse); - const HashEntry *entry = obj->tqfindPropertyHashEntry(propertyName); + const HashEntry *entry = obj->findPropertyHashEntry(propertyName); return Value((entry && !(entry->attr & DontEnum)) ? BooleanImp::staticTrue : BooleanImp::staticFalse); } diff --git a/kjs/reference.cpp b/kjs/reference.cpp index fdb4dea3b..778db8a53 100644 --- a/kjs/reference.cpp +++ b/kjs/reference.cpp @@ -124,7 +124,7 @@ Value Reference::getValue(ExecState *exec) const Value o = getBase(exec); if (!o.isValid() || o.type() == NullType) { - UString m = I18N_NOOP("Can't tqfind variable: ") + getPropertyName(exec).ustring(); + UString m = I18N_NOOP("Can't find variable: ") + getPropertyName(exec).ustring(); Object err = Error::create(exec, ReferenceError, m.ascii()); exec->setException(err); return err; diff --git a/kjs/regexp.cpp b/kjs/regexp.cpp index 446cc7d3d..06defcc53 100644 --- a/kjs/regexp.cpp +++ b/kjs/regexp.cpp @@ -38,7 +38,7 @@ RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown; RegExp::RegExp(const UString &p, int f) : pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(0), originalPos(0) { - // Determine whether libpcre has tqunicode support if need be.. + // Determine whether libpcre has unicode support if need be.. #ifdef PCRE_CONFIG_UTF8 if (utf8Support == Unknown) { int supported; @@ -56,7 +56,7 @@ RegExp::RegExp(const UString &p, int f) // expects null termination.. UString intern; const char* const nil = "\\x00"; - if (p.tqfind('\\') >= 0 || p.tqfind(KJS::UChar('\0')) >= 0) { + if (p.find('\\') >= 0 || p.find(KJS::UChar('\0')) >= 0) { bool escape = false; for (int i = 0; i < p.size(); ++i) { UChar c = p[i]; @@ -64,13 +64,13 @@ RegExp::RegExp(const UString &p, int f) escape = false; // we only care about \u if (c == 'u') { - // standard tqunicode escape sequence looks like \uxxxx but + // standard unicode escape sequence looks like \uxxxx but // other browsers also accept less then 4 hex digits unsigned short u = 0; int j = 0; for (j = 0; j < 4; ++j) { - if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].tqunicode())) { - u = (u << 4) + Lexer::convertHex(p[i + 1].tqunicode()); + if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].unicode())) { + u = (u << 4) + Lexer::convertHex(p[i + 1].unicode()); ++i; } else { // sequence incomplete. restore index. @@ -222,7 +222,7 @@ void RegExp::prepareUtf8(const UString& s) int *posOut = originalPos; const UChar *d = s.data(); for (int i = 0; i != length; ++i) { - unsigned short c = d[i].tqunicode(); + unsigned short c = d[i].unicode(); int sequenceLen; if (c < 0x80) { diff --git a/kjs/regexp_object.cpp b/kjs/regexp_object.cpp index 4b8064644..edd2bbeca 100644 --- a/kjs/regexp_object.cpp +++ b/kjs/regexp_object.cpp @@ -234,7 +234,7 @@ int **RegExpObjectImp::registerRegexp( const RegExp* re, const UString& s ) Object RegExpObjectImp::arrayOfMatches(ExecState *exec, const UString &result) const { List list; - // The returned array tqcontains 'result' as first item, followed by the list of matches + // The returned array contains 'result' as first item, followed by the list of matches list.append(String(result)); if ( lastOvector ) for ( unsigned int i = 1 ; i < lastNrSubPatterns + 1 ; ++i ) @@ -292,7 +292,7 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val // Check for validity of flags for (int pos = 0; pos < flags.size(); ++pos) { - switch (flags[pos].tqunicode()) { + switch (flags[pos].unicode()) { case 'g': case 'i': case 'm': @@ -306,9 +306,9 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val } } - bool global = (flags.tqfind("g") >= 0); - bool ignoreCase = (flags.tqfind("i") >= 0); - bool multiline = (flags.tqfind("m") >= 0); + bool global = (flags.find("g") >= 0); + bool ignoreCase = (flags.find("i") >= 0); + bool multiline = (flags.find("m") >= 0); int reflags = RegExp::None; if (global) diff --git a/kjs/simple_number.h b/kjs/simple_number.h index cf5d91ef3..1f5830dff 100644 --- a/kjs/simple_number.h +++ b/kjs/simple_number.h @@ -33,9 +33,9 @@ namespace KJS { class SimpleNumber { public: - enum { tag = 1, shift = 2, tqmask = (1 << shift) - 1, sign = 1L << (sizeof(long) * 8 - 1 ), max = (1L << ((sizeof(long) * 8 - 1) - shift)) - 1, min = -max - 1, imax = (1L << ((sizeof(int) * 8 - 1) - shift)) - 1, imin = -imax - 1 }; + enum { tag = 1, shift = 2, mask = (1 << shift) - 1, sign = 1L << (sizeof(long) * 8 - 1 ), max = (1L << ((sizeof(long) * 8 - 1) - shift)) - 1, min = -max - 1, imax = (1L << ((sizeof(int) * 8 - 1) - shift)) - 1, imin = -imax - 1 }; - static inline bool is(const ValueImp *imp) { return ((long)imp & tqmask) == tag; } + static inline bool is(const ValueImp *imp) { return ((long)imp & mask) == tag; } static inline long value(const ValueImp *imp) { return ((long)imp >> shift) | (((long)imp & sign) ? ~max : 0); } static inline bool fits(int i) { return i <= imax && i >= imin; } diff --git a/kjs/string_object.cpp b/kjs/string_object.cpp index e7cc22242..b56620a8c 100644 --- a/kjs/string_object.cpp +++ b/kjs/string_object.cpp @@ -136,7 +136,7 @@ const ClassInfo StringPrototypeImp::info = {"String", &StringInstanceImp::info, indexOf StringProtoFuncImp::IndexOf DontEnum|Function 1 lastIndexOf StringProtoFuncImp::LastIndexOf DontEnum|Function 1 match StringProtoFuncImp::Match DontEnum|Function 1 - tqreplace StringProtoFuncImp::Replace DontEnum|Function 2 + replace StringProtoFuncImp::Replace DontEnum|Function 2 search StringProtoFuncImp::Search DontEnum|Function 1 slice StringProtoFuncImp::Slice DontEnum|Function 2 split StringProtoFuncImp::Split DontEnum|Function 2 @@ -266,7 +266,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg pos = 0; else pos = a1.toInteger(exec); - d = s.tqfind(u2, pos); + d = s.find(u2, pos); result = Number(d); break; case LastIndexOf: @@ -281,7 +281,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg else if (dpos > len) dpos = len; } - result = Number(s.rtqfind(u2, int(dpos))); + result = Number(s.rfind(u2, int(dpos))); break; case Match: case Search: { @@ -296,7 +296,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg { /* * ECMA 15.5.4.12 String.prototype.search (regexp) * If regexp is not an object whose [[Class]] property is "RegExp", it is - * tqreplaced with the result of the expression new RegExp(regexp). + * replaced with the result of the expression new RegExp(regexp). */ reg = tmpReg = new RegExp(a0.toString(exec), RegExp::None); } @@ -352,7 +352,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg if ( a1.type() == ObjectType && a1.toObject(exec).implementsCall() ) o1 = a1.toObject(exec); else - u3 = a1.toString(exec); // 2nd arg is the tqreplacement string + u3 = a1.toString(exec); // 2nd arg is the replacement string UString out; @@ -368,13 +368,13 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg len = mstr.size(); UString rstr; - // Prepare tqreplacement + // Prepare replacement if (!o1.isValid()) { rstr = u3; bool ok; // check if u3 matches $1 or $2 etc - for (int i = 0; (i = rstr.tqfind(UString("$"), i)) != -1; i++) { + for (int i = 0; (i = rstr.find(UString("$"), i)) != -1; i++) { if (i+1 "$" rstr = rstr.substr(0,i) + "$" + rstr.substr(i+2); continue; @@ -408,7 +408,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg if (pos != lastIndex) out += s.substr(lastIndex, pos - lastIndex); - // Append the tqreplacement.. + // Append the replacement.. out += rstr; lastIndex = pos + len; // Skip over the matched stuff... @@ -425,9 +425,9 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg result = String(out); } else { // First arg is a string u2 = a0.toString(exec); - pos = s.tqfind(u2); + pos = s.find(u2); len = u2.size(); - // Do the tqreplacement + // Do the replacement if (pos == -1) result = String(s); else { @@ -505,7 +505,7 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg res.put(exec,i++, String(s.substr(p0++, 1))); } } else { - while (static_cast(i) != limit && (pos = s.tqfind(u2, p0)) >= 0) { + while (static_cast(i) != limit && (pos = s.find(u2, p0)) >= 0) { res.put(exec,i, String(s.substr(p0, pos-p0))); p0 = pos + u2.size(); i++; diff --git a/kjs/ustring.cpp b/kjs/ustring.cpp index 92644d009..36f201863 100644 --- a/kjs/ustring.cpp +++ b/kjs/ustring.cpp @@ -134,7 +134,7 @@ static int statBufferSize = 0; UChar UChar::toLower() const { - // ### properly support tqunicode tolower + // ### properly support unicode tolower if (uc >= 256) return *this; @@ -746,7 +746,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const if (len == 0) return 0; const UChar *p = rep->dat; - unsigned short c = p->tqunicode(); + unsigned short c = p->unicode(); // If the first digit is 0, only 0 itself is OK. if (c == '0') { @@ -782,7 +782,7 @@ unsigned int UString::toStrictUInt32(bool *ok) const } // Get next character. - c = (++p)->tqunicode(); + c = (++p)->unicode(); } } @@ -796,7 +796,7 @@ unsigned UString::toArrayIndex(bool *ok) const return i; } -int UString::tqfind(const UString &f, int pos) const +int UString::find(const UString &f, int pos) const { int sz = size(); int fsz = f.size(); @@ -818,7 +818,7 @@ int UString::tqfind(const UString &f, int pos) const return -1; } -int UString::tqfind(UChar ch, int pos) const +int UString::find(UChar ch, int pos) const { if (pos < 0) pos = 0; @@ -830,7 +830,7 @@ int UString::tqfind(UChar ch, int pos) const return -1; } -int UString::rtqfind(const UString &f, int pos) const +int UString::rfind(const UString &f, int pos) const { int sz = size(); int fsz = f.size(); @@ -852,7 +852,7 @@ int UString::rtqfind(const UString &f, int pos) const return -1; } -int UString::rtqfind(UChar ch, int pos) const +int UString::rfind(UChar ch, int pos) const { if (isEmpty()) return -1; diff --git a/kjs/ustring.h b/kjs/ustring.h index f681a726e..0cdfa3f0f 100644 --- a/kjs/ustring.h +++ b/kjs/ustring.h @@ -79,7 +79,7 @@ namespace KJS { /** * @return the 16 bit Unicode value of the character */ - unsigned short tqunicode() const { return uc; } + unsigned short unicode() const { return uc; } public: /** * @return The character converted to lower case. @@ -132,7 +132,7 @@ namespace KJS { /** * @return Unicode value. */ - unsigned short tqunicode() const { return ref().uc; } + unsigned short unicode() const { return ref().uc; } /** * @return Lower byte. */ @@ -158,7 +158,7 @@ namespace KJS { int offset; }; - inline UChar::UChar(const UCharReference &c) : uc(c.tqunicode()) { } + inline UChar::UChar(const UCharReference &c) : uc(c.unicode()) { } /** * @short 8 bit char based string class @@ -410,15 +410,15 @@ namespace KJS { * @return Position of first occurrence of f starting at position pos. * -1 if the search was not successful. */ - int tqfind(const UString &f, int pos = 0) const; - int tqfind(UChar, int pos = 0) const; + int find(const UString &f, int pos = 0) const; + int find(UChar, int pos = 0) const; /** * @return Position of first occurrence of f searching backwards from * position pos. * -1 if the search was not successful. */ - int rtqfind(const UString &f, int pos) const; - int rtqfind(UChar, int pos) const; + int rfind(const UString &f, int pos) const; + int rfind(UChar, int pos) const; /** * @return The sub string starting at position pos and length len. */ -- cgit v1.2.1