Changeset 25526 for main/trunk/greenstone2/common-src/indexers
- Timestamp:
- 2012-05-04T17:43:56+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mgpp/text/GSDLQueryLex.cpp
r24099 r25526 94 94 el.num = 0; 95 95 el.lexType = IntegerE; 96 96 97 /* stop integers at 4 digits */ 97 while (c >= '0' && c <= '9'&& ++numeric<=MAXNUMERIC) { 98 el.num = el.num*10 + c - '0'; 99 AddNChar (here, el.text, charLen); 100 length += charLen; 101 if(numeric < MAXNUMERIC) { // server crash bugfix: don't go past the end with the endMinus1 pointer 102 charLen = parse_utf8_char (&*here, endMinus1, &c); 103 } 104 } 98 while (here != end) { 99 100 charLen = parse_utf8_char (&*here, endMinus1, &c); 101 if (c < '0' || c > '9') { 102 // reached a non-digit character 103 break; 104 } 105 el.num = el.num*10 + c - '0'; 106 AddNChar (here, el.text, charLen); // advances 'here' by 'charLen' 107 length += charLen; 108 109 numeric++; 110 111 if (numeric == MAXNUMERIC) { 112 // reached the max length of a number 113 break; 114 } 115 116 } 117 118 105 119 // check the next character -if it is a letter, then have a term, not an integer 106 120 if (!is_unicode_letter(c)) {
Note:
See TracChangeset
for help on using the changeset viewer.