Changeset 6811
- Timestamp:
- 09/09/10 13:03:26 (17 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
ARBDB/ad_config.cxx (modified) (1 diff)
-
ARBDB/ad_t_prot.h (modified) (1 diff)
-
ARBDB/adname.cxx (modified) (4 diffs)
-
SL/AW_NAME/AW_rename.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ARBDB/ad_config.cxx
r6421 r6811 195 195 } 196 196 197 switch (item->type) { 198 case CI_CLOSE_GROUP: 199 pos += 2; 200 break; 201 202 case CI_UNKNOWN: 203 error = GBS_global_string_copy("Unknown flag '%c'", label); 204 break; 205 206 default: { 207 const char *start_of_name = str+pos+2; 208 const char *behind_name = strchr(start_of_name, '\1'); 209 210 if (!behind_name) behind_name = strchr(start_of_name, '\0'); // eos 211 gb_assert(behind_name); 212 213 item->name = (char*)GB_calloc(1, behind_name-start_of_name+1); 214 memcpy(item->name, start_of_name, behind_name-start_of_name); 215 pos = behind_name-str; 216 break; 197 if (item->type == CI_CLOSE_GROUP) { 198 pos += 2; 199 } 200 else { 201 const char *start_of_name = str+pos+2; 202 const char *behind_name = strchr(start_of_name, '\1'); 203 204 if (!behind_name) behind_name = strchr(start_of_name, '\0'); // eos 205 gb_assert(behind_name); 206 207 char *data = GB_strpartdup(start_of_name, behind_name-1); 208 if (item->type == CI_UNKNOWN) { 209 error = GBS_global_string_copy("Unknown flag '%c' (followed by '%s')", label, data); 210 free(data); 211 } 212 else { 213 item->name = data; 214 pos = behind_name-str; 217 215 } 218 216 } -
trunk/ARBDB/ad_t_prot.h
r6646 r6811 79 79 GB_ERROR GBT_rename_species(const char *oldname, const char *newname, bool ignore_protection); 80 80 GB_ERROR GBT_abort_rename_session(void); 81 GB_ERROR GBT_commit_rename_session(int (*show_status)(double gauge), int (*show_status_text)(const char *)) ;81 GB_ERROR GBT_commit_rename_session(int (*show_status)(double gauge), int (*show_status_text)(const char *)) __ATTR__USERESULT; 82 82 83 83 /* adseqcompr.cxx */ -
trunk/ARBDB/adname.cxx
r6656 r6811 159 159 160 160 GB_ERROR GBT_commit_rename_session(int (*show_status)(double gauge), int (*show_status_text)(const char *)) { 161 // goes to header: __ATTR__USERESULT 161 162 GB_ERROR error = 0; 162 163 … … 228 229 229 230 if (!error) freeset(*configStrPtr, GBS_strclose(strstruct)); 231 else { 232 error = GBS_global_string("Failed to parse configuration '%s' (Reason: %s)", config_names[count], error); 233 } 230 234 231 235 GBT_free_config_item(item); … … 233 237 } 234 238 235 if (!error && need_save) error = GBT_save_configuration_data(config, NameSession.gb_main, config_names[count]); 239 if (!error && need_save) { 240 error = GBT_save_configuration_data(config, NameSession.gb_main, config_names[count]); 241 } 236 242 } 237 243 if (show_status) show_status((double)(count+1)/config_count); … … 262 268 gbt_free_rename_session_data(); 263 269 264 error = GB_ pop_transaction(NameSession.gb_main);270 error = GB_end_transaction(NameSession.gb_main, error); 265 271 return error; 266 272 } -
trunk/SL/AW_NAME/AW_rename.cxx
r6714 r6811 538 538 } 539 539 else { 540 GBT_commit_rename_session(aw_status, aw_status);540 err = GBT_commit_rename_session(aw_status, aw_status); 541 541 } 542 542
