Changeset 11259
- Timestamp:
- 2006-02-15T16:38:22+13:00 (18 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/browsefilter.cpp
r9937 r11259 57 57 filtopt.type = FilterOption_t::stringt; 58 58 filtopt.repeatable = FilterOption_t::onePerQuery; 59 filtopt.defaultValue = "";59 filtopt.defaultValue = g_EmptyText; 60 60 filterOptions["ParentNode"] = filtopt; 61 61 } -
trunk/gsdl/src/mgpp/text/GSDLQueryLex.cpp
r8691 r11259 43 43 // this version of end is used in unitool 44 44 // UCArray::const_iterator endMinus1 = end-1; 45 const unsigned char* endMinus1 = & (*end)-1;45 const unsigned char* endMinus1 = &*(end - 1); 46 46 47 47 int charLen; … … 83 83 // this version of end is used in unitool 84 84 //UCArray::const_iterator endMinus1 = end-1; 85 const unsigned char* endMinus1 = & (*end)-1;85 const unsigned char* endMinus1 = &*(end - 1); 86 86 87 87 int charLen=0; … … 123 123 UCArray::const_iterator end, 124 124 UCArray &text) { 125 if (here == end) 126 return false; 127 125 128 //UCArray::const_iterator endMinus1 = end-1; 126 const unsigned char* endMinus1 = & (*end)-1;129 const unsigned char* endMinus1 = &*(end - 1); 127 130 const unsigned char* new_here = ParseIndexWord (&*here, endMinus1, text); 128 131 here += (new_here - &*here); // advance iterator by number of chars advanced … … 137 140 138 141 // strange things can happen if here == end == 0 139 if (here == end) return false; 142 if (here == end) 143 return false; 140 144 141 145 // this version of end is used in unitool 142 146 //UCArray::const_iterator endMinus1 = end-1; 143 const unsigned char* endMinus1 = & (*end)-1;147 const unsigned char* endMinus1 = &*(end - 1); 144 148 145 149 // ignore all white space -
trunk/gsdl/src/recpt/OIDtools.cpp
r9620 r11259 229 229 // get_parent returns the parent of the document or classification 230 230 // specified by OID 231 text_t get_parent ( text_t OID) {232 233 if (OID.empty() || is_top (OID)) return "";231 text_t get_parent (const text_t& OID) 232 { 233 if (OID.empty() || is_top (OID)) return g_EmptyText; 234 234 235 235 text_t::const_iterator begin = OID.begin(); … … 237 237 238 238 while (here >= begin) { 239 OID.pop_back(); 240 if (*here == '.') break; 239 if (*here == '.') 240 break; 241 if (here == begin) 242 break; 241 243 --here; 242 244 } 243 return OID; 245 246 if (here != begin) { 247 text_t parentOID; 248 parentOID.appendrange(begin, here); 249 return parentOID; 250 } 251 252 return g_EmptyText; 244 253 } 245 254 -
trunk/gsdl/src/recpt/OIDtools.h
r7414 r11259 93 93 // get_parent returns the parent of the document or classification 94 94 // specified by OID 95 text_t get_parent ( text_tOID);95 text_t get_parent (const text_t& OID); 96 96 97 97 // takes an OID like ".2.3 and replaces the " with parent -
trunk/gsdl/src/recpt/cgiutils.cpp
r9674 r11259 374 374 text_t::const_iterator saveconfend = saveconf.end(); 375 375 376 text_t::iterator arg_e here= arg_e->begin();376 text_t::iterator arg_ebegin = arg_e->begin(); 377 377 text_t::iterator arg_eend = arg_e->end(); 378 text_t::iterator arg_ehere = arg_ebegin; 378 379 while (saveconfhere != saveconfend && arg_ehere != arg_eend) { 379 380 saveconfhere = get_next_save_arg (saveconfhere, saveconfend, argname); … … 399 400 text_t::const_iterator sav = arg_ehere; 400 401 arg_ehere = getdelimitstr (arg_ehere, arg_eend, '-', argvalue); 401 // replace any '-' chars escaped with 'Zz' 402 bool first = true; 403 while ((*(arg_ehere-3) == 'Z') && (*(arg_ehere-2) == 'z')) { 404 if (first) argvalue.clear(); 405 arg_ehere = (findchar (arg_ehere, arg_eend, '-')) + 1; 406 while (sav != (arg_ehere-1)) { 407 if (!((*sav == 'Z') && (*(sav+1) == 'z') && (*(sav+2) == '-')) && 408 !((*(sav-1) == 'Z') && (*sav == 'z') && (*(sav+1) == '-'))) argvalue.push_back (*sav); 409 ++sav; 402 if (distance(arg_ebegin, arg_ehere) > 2) { 403 // replace any '-' chars escaped with 'Zz' 404 bool first = true; 405 while ((*(arg_ehere-3) == 'Z') && (*(arg_ehere-2) == 'z')) { 406 if (first) argvalue.clear(); 407 arg_ehere = (findchar (arg_ehere, arg_eend, '-')) + 1; 408 while (sav != (arg_ehere-1)) { 409 if (!((*sav == 'Z') && (*(sav+1) == 'z') && (*(sav+2) == '-')) && 410 !((*(sav-1) == 'Z') && (*sav == 'z') && (*(sav+1) == '-'))) argvalue.push_back (*sav); 411 ++sav; 412 } 413 first = false; 410 414 } 411 first = false;412 415 } 413 414 416 argvalue.setencoding(1); // other encoding 415 417 if (!argvalue.empty()) args.setdefaultarg (argname, argvalue, cgiarg_t::compressed_arg); -
trunk/gsdl/src/recpt/comtypes.cpp
r10789 r11259 65 65 numBytes=0; 66 66 format.erase(format.begin(), format.end()); 67 building.erase( format.begin(), format.end());67 building.erase(building.begin(), building.end()); 68 68 httpdomain.clear(); 69 69 httpprefix.clear(); -
trunk/gsdl/src/recpt/infodbclass.cpp
r9620 r11259 384 384 } 385 385 386 if ( !tailarray.size()) return inOID;386 if (tailarray.empty()) return inOID; 387 387 text_tarray::const_iterator begin = tailarray.begin(); 388 388 text_tarray::const_iterator here = tailarray.end() - 1; … … 401 401 get_previous_sibling (OID, info); 402 402 403 if (here == begin) 404 break; 403 405 --here; 404 406 } -
trunk/gsdl/src/w32server/httpreq.cpp
r9636 r11259 299 299 RequestInfo.ThreadNum) != 0) 300 300 return GH_ERROR; 301 if (NextLine.empty()) 302 break; 301 303 if ((*(NextLine.begin()) == ' ') || (*(NextLine.begin()) == '\t')) { 302 304 CurLine += NextLine;
Note:
See TracChangeset
for help on using the changeset viewer.