Diffstat (limited to 'noncore/apps/opie-reader/CRegExp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CRegExp.cpp | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/noncore/apps/opie-reader/CRegExp.cpp b/noncore/apps/opie-reader/CRegExp.cpp index 77dc2dc..6318d28 100644 --- a/noncore/apps/opie-reader/CRegExp.cpp +++ b/noncore/apps/opie-reader/CRegExp.cpp | |||
@@ -63,7 +63,7 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
63 | { | 63 | { |
64 | #ifdef _WINDOWS | 64 | #ifdef _WINDOWS |
65 | switch (pat.at(p).unicode()) | 65 | switch (pat.at(p).unicode()) |
66 | #else | 66 | #else |
67 | switch (pat[p].unicode()) | 67 | switch (pat[p].unicode()) |
68 | #endif | 68 | #endif |
69 | { | 69 | { |
@@ -87,8 +87,8 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
87 | { | 87 | { |
88 | p++; | 88 | p++; |
89 | #ifdef _WINDOWS | 89 | #ifdef _WINDOWS |
90 | while ('0' <= pat.at(p).unicode() && pat.at(p).unicode() <= '9') | 90 | while ('0' <= pat.at(p).unicode() && pat.at(p).unicode() <= '9') |
91 | #else | 91 | #else |
92 | while ('0' <= pat[p].unicode() && pat[p].unicode() <= '9') | 92 | while ('0' <= pat[p].unicode() && pat[p].unicode() <= '9') |
93 | #endif | 93 | #endif |
94 | { | 94 | { |
@@ -99,8 +99,8 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
99 | case '\\' : | 99 | case '\\' : |
100 | { | 100 | { |
101 | #ifdef _WINDOWS | 101 | #ifdef _WINDOWS |
102 | tchar c = escapedchar(pat.at(++p).unicode()); | 102 | tchar c = escapedchar(pat.at(++p).unicode()); |
103 | #else | 103 | #else |
104 | tchar c = escapedchar(pat[++p].unicode()); | 104 | tchar c = escapedchar(pat[++p].unicode()); |
105 | #endif | 105 | #endif |
106 | regchar(c, insens); | 106 | regchar(c, insens); |
@@ -113,8 +113,8 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
113 | bool invert = false; | 113 | bool invert = false; |
114 | tchar c; | 114 | tchar c; |
115 | #ifdef _WINDOWS | 115 | #ifdef _WINDOWS |
116 | if (pat.at(p+1).unicode() == '^') | 116 | if (pat.at(p+1).unicode() == '^') |
117 | #else | 117 | #else |
118 | if (pat[p+1].unicode() == '^') | 118 | if (pat[p+1].unicode() == '^') |
119 | #endif | 119 | #endif |
120 | { | 120 | { |
@@ -122,16 +122,16 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
122 | invert = true; | 122 | invert = true; |
123 | } | 123 | } |
124 | #ifdef _WINDOWS | 124 | #ifdef _WINDOWS |
125 | while ((c = pat.at(++p).unicode()) != ']') | 125 | while ((c = pat.at(++p).unicode()) != ']') |
126 | #else | 126 | #else |
127 | while ((c = pat[++p].unicode()) != ']') | 127 | while ((c = pat[++p].unicode()) != ']') |
128 | #endif | 128 | #endif |
129 | { | 129 | { |
130 | if (c == '\\') | 130 | if (c == '\\') |
131 | { | 131 | { |
132 | #ifdef _WINDOWS | 132 | #ifdef _WINDOWS |
133 | c = escapedchar(pat.at(++p).unicode()); | 133 | c = escapedchar(pat.at(++p).unicode()); |
134 | #else | 134 | #else |
135 | c = escapedchar(pat[++p].unicode()); | 135 | c = escapedchar(pat[++p].unicode()); |
136 | #endif | 136 | #endif |
137 | if (c == ']') break; | 137 | if (c == ']') break; |
@@ -139,8 +139,8 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
139 | if (c == '-') | 139 | if (c == '-') |
140 | { | 140 | { |
141 | #ifdef _WINDOWS | 141 | #ifdef _WINDOWS |
142 | c = pat.at(++p).unicode(); | 142 | c = pat.at(++p).unicode(); |
143 | #else | 143 | #else |
144 | c = pat[++p].unicode(); | 144 | c = pat[++p].unicode(); |
145 | #endif | 145 | #endif |
146 | for (tchar j = clast; j <= c; j++) | 146 | for (tchar j = clast; j <= c; j++) |
@@ -159,8 +159,8 @@ void CRegExpFilt::prepreprocessing(const QString& pat, bool insens) | |||
159 | default : | 159 | default : |
160 | { | 160 | { |
161 | #ifdef _WINDOWS | 161 | #ifdef _WINDOWS |
162 | regchar(pat.at(p).unicode(), insens); | 162 | regchar(pat.at(p).unicode(), insens); |
163 | #else | 163 | #else |
164 | regchar(pat[p].unicode(), insens); | 164 | regchar(pat[p].unicode(), insens); |
165 | #endif | 165 | #endif |
166 | break; | 166 | break; |
@@ -195,8 +195,8 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
195 | qDebug("m is %u", m); | 195 | qDebug("m is %u", m); |
196 | if (inkeep) keep |= bit[m]; | 196 | if (inkeep) keep |= bit[m]; |
197 | #ifdef _WINDOWS | 197 | #ifdef _WINDOWS |
198 | switch (pat.at(p).unicode()) | 198 | switch (pat.at(p).unicode()) |
199 | #else | 199 | #else |
200 | switch (pat[p].unicode()) | 200 | switch (pat[p].unicode()) |
201 | #endif | 201 | #endif |
202 | { | 202 | { |
@@ -230,14 +230,14 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
230 | p++; | 230 | p++; |
231 | int count = 0; | 231 | int count = 0; |
232 | #ifdef _WINDOWS | 232 | #ifdef _WINDOWS |
233 | while ('0' <= pat.at(p).unicode() && pat.at(p).unicode() <= '9') | 233 | while ('0' <= pat.at(p).unicode() && pat.at(p).unicode() <= '9') |
234 | #else | 234 | #else |
235 | while ('0' <= pat[p].unicode() && pat[p].unicode() <= '9') | 235 | while ('0' <= pat[p].unicode() && pat[p].unicode() <= '9') |
236 | #endif | 236 | #endif |
237 | { | 237 | { |
238 | #ifdef _WINDOWS | 238 | #ifdef _WINDOWS |
239 | count = 10*count + pat.at(p++).unicode() - '0'; | 239 | count = 10*count + pat.at(p++).unicode() - '0'; |
240 | #else | 240 | #else |
241 | count = 10*count + pat[p++].unicode() - '0'; | 241 | count = 10*count + pat[p++].unicode() - '0'; |
242 | #endif | 242 | #endif |
243 | } | 243 | } |
@@ -268,8 +268,8 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
268 | case '\\' : | 268 | case '\\' : |
269 | { | 269 | { |
270 | #ifdef _WINDOWS | 270 | #ifdef _WINDOWS |
271 | tchar c = escapedchar(pat.at(++p).unicode()); | 271 | tchar c = escapedchar(pat.at(++p).unicode()); |
272 | #else | 272 | #else |
273 | tchar c = escapedchar(pat[++p].unicode()); | 273 | tchar c = escapedchar(pat[++p].unicode()); |
274 | #endif | 274 | #endif |
275 | if (insens) | 275 | if (insens) |
@@ -290,8 +290,8 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
290 | tchar c, clast; | 290 | tchar c, clast; |
291 | bool invert = false; | 291 | bool invert = false; |
292 | #ifdef _WINDOWS | 292 | #ifdef _WINDOWS |
293 | if (pat.at(p+1).unicode() == '^') | 293 | if (pat.at(p+1).unicode() == '^') |
294 | #else | 294 | #else |
295 | if (pat[p+1].unicode() == '^') | 295 | if (pat[p+1].unicode() == '^') |
296 | #endif | 296 | #endif |
297 | { | 297 | { |
@@ -299,16 +299,16 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
299 | invert = true; | 299 | invert = true; |
300 | } | 300 | } |
301 | #ifdef _WINDOWS | 301 | #ifdef _WINDOWS |
302 | while ((c = pat.at(++p).unicode()) != ']') | 302 | while ((c = pat.at(++p).unicode()) != ']') |
303 | #else | 303 | #else |
304 | while ((c = pat[++p].unicode()) != ']') | 304 | while ((c = pat[++p].unicode()) != ']') |
305 | #endif | 305 | #endif |
306 | { | 306 | { |
307 | if (c == '\\') | 307 | if (c == '\\') |
308 | { | 308 | { |
309 | #ifdef _WINDOWS | 309 | #ifdef _WINDOWS |
310 | c = escapedchar(pat.at(++p).unicode()); | 310 | c = escapedchar(pat.at(++p).unicode()); |
311 | #else | 311 | #else |
312 | c = escapedchar(pat[++p].unicode()); | 312 | c = escapedchar(pat[++p].unicode()); |
313 | #endif | 313 | #endif |
314 | if (c == ']') break; | 314 | if (c == ']') break; |
@@ -316,8 +316,8 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
316 | if (c == '-') | 316 | if (c == '-') |
317 | { | 317 | { |
318 | #ifdef _WINDOWS | 318 | #ifdef _WINDOWS |
319 | c = pat.at(++p).unicode(); | 319 | c = pat.at(++p).unicode(); |
320 | #else | 320 | #else |
321 | c = pat[++p].unicode(); | 321 | c = pat[++p].unicode(); |
322 | #endif | 322 | #endif |
323 | for (tchar j = clast; j <= c; j++) | 323 | for (tchar j = clast; j <= c; j++) |
@@ -384,8 +384,8 @@ unsigned int CRegExpFilt::preprocessing(const QString& pat, bool insens) | |||
384 | default : | 384 | default : |
385 | { | 385 | { |
386 | #ifdef _WINDOWS | 386 | #ifdef _WINDOWS |
387 | tchar c = pat.at(p).unicode(); | 387 | tchar c = pat.at(p).unicode(); |
388 | #else | 388 | #else |
389 | tchar c = pat[p].unicode(); | 389 | tchar c = pat[p].unicode(); |
390 | #endif | 390 | #endif |
391 | if (insens) | 391 | if (insens) |