Changeset 6141 for trunk/ARBDB/adquery.c
- Timestamp:
- 14/08/09 16:29:27 (3 years ago)
- Files:
-
- 1 modified
-
trunk/ARBDB/adquery.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ARBDB/adquery.c
r6100 r6141 93 93 GB_STRING/GB_LINK: compares string (case_sensitive or not) 94 94 GB_INT: compares values 95 GB_FLOAT: dit o (val MUST be a 'double*')95 GB_FLOAT: ditto (val MUST be a 'double*') 96 96 others: not implemented yet 97 97 … … 283 283 case down_level: return GB_find_subcontent_by_quark((GBDATA*)gbc, key_quark, type, val, case_sens, after); 284 284 case down_2_level: return find_sub_sub_by_quark((GBDATA*)gbc, key, key_quark, type, val, case_sens, after); 285 default: GB_internal_errorf("Unknown sea ch type %li",gbs); return NULL;285 default: GB_internal_errorf("Unknown search type %li",gbs); return NULL; 286 286 } 287 287 } … … 316 316 317 317 GBDATA *GB_child(GBDATA *father) { 318 // return first child (or NULL if no child s)318 // return first child (or NULL if no children) 319 319 return GB_find(father, NULL, down_level); 320 320 } 321 321 GBDATA *GB_nextChild(GBDATA *child) { 322 // return next child after 'child' (or NULL if no more child s)322 // return next child after 'child' (or NULL if no more children) 323 323 return GB_find(child, NULL, this_level|search_next); 324 324 } … … 422 422 GBDATA *gbp, *gbsp; 423 423 int len; 424 int sep erator = 0;424 int separator = 0; 425 425 char buffer[GB_PATH_MAX]; 426 426 … … 477 477 s2 = gb_first_non_key_character(s1); 478 478 if (s2) { 479 sep erator = *s2;479 separator = *s2; 480 480 *(s2++) = 0; 481 if (sep erator == '-') {481 if (separator == '-') { 482 482 if ((*s2) != '>'){ 483 483 GB_export_errorf("Invalid key for gb_search '%s'",str); … … 493 493 } else { 494 494 gbsp = GB_entry(gbp, s1); 495 if (gbsp && sep erator == '-'){ /* follow link !!! */495 if (gbsp && separator == '-'){ /* follow link !!! */ 496 496 if (GB_TYPE(gbsp) != GB_LINK){ 497 497 if (create){ … … 502 502 } 503 503 gbsp = GB_follow_link(gbsp); 504 sep erator = 0;504 separator = 0; 505 505 if (!gbsp) return NULL; /* cannot resolve link */ 506 506 } … … 519 519 if (!gbsp) { 520 520 if(!create) return NULL; /* read only mode */ 521 if (sep erator == '-'){521 if (separator == '-'){ 522 522 GB_export_error("Cannot create linked objects"); 523 523 return NULL; /* do not create linked objects */ … … 771 771 772 772 773 char *gbs_search_next_sep erator(const char *source,const char *seps){774 /* search the next sep erator */773 char *gbs_search_next_separator(const char *source,const char *seps){ 774 /* search the next separator */ 775 775 static char tab[256]; 776 776 static int flag = 0; … … 980 980 /*** loop over all commands ***/ 981 981 for (s1 = s1; s1 ; s1 = s2) { 982 int sep erator;982 int separator; 983 983 GBL_COMMAND command; 984 s2= gbs_search_next_sep erator(s1,"|;,");984 s2= gbs_search_next_separator(s1,"|;,"); 985 985 if (s2) { 986 sep erator = *(s2);986 separator = *(s2); 987 987 *(s2++) = 0; 988 988 }else{ 989 sep erator = 0;989 separator = 0; 990 990 } 991 991 /* collect the parameters */ … … 1014 1014 bracket[slen-1] = 0; 1015 1015 for (p1 = bracket; p1 ; p1 = p2) { 1016 p2 = gbs_search_next_sep erator(p1,";,");1016 p2 = gbs_search_next_separator(p1,";,"); 1017 1017 if (p2) { 1018 1018 *(p2++) = 0; … … 1114 1114 if (error) break; 1115 1115 1116 if (sep erator == '|') { /* swap in and out in pipes */1116 if (separator == '|') { /* swap in and out in pipes */ 1117 1117 GBL *h; 1118 1118 for (i=0;i<argcinput;i++) {
