Changeset 8363
- Timestamp:
- 04/02/12 16:28:09 (4 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
ARBDB/ad_load.cxx (modified) (3 diffs)
-
EDIT4/ED4_main.cxx (modified) (1 diff)
-
EDIT4/ED4_root.cxx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ARBDB/ad_load.cxx
r8319 r8363 1358 1358 * - 's' read only ??? 1359 1359 * - 'D' looks for default in $ARBHOME/lib/arb_default if file is not found in ~/.arb_prop 1360 * (only work combined with mode 'c')1360 * (only works combined with mode 'c') 1361 1361 * - memory usage: 1362 1362 * - 't' small memory usage … … 1516 1516 } 1517 1517 else { 1518 fprintf(stderr, "Using properties from '%s'\n", found_path);1519 1518 freeset(path, found_path); 1520 1519 input = fopen(path, "rb"); … … 1533 1532 } 1534 1533 if (input) { 1534 if (strchr(opent, 'D')) { // we are loading properties -> be verboose 1535 fprintf(stderr, "Using properties from '%s'\n", path); 1536 } 1535 1537 time_of_main_file = GB_time_of_file(path); 1536 1538 -
trunk/EDIT4/ED4_main.cxx
r8313 r8363 460 460 e4_assert(mode >= 0 && mode <= 2); 461 461 462 if (mode == 2) return "edit4.arb"; 463 464 static char *ali_name = 0; 465 static char *ali_type = 0; 466 static char *result = 0; 467 468 if (!ali_name) { 469 GB_transaction dummy(GLOBAL_gb_main); 470 ali_name = GBT_get_default_alignment(GLOBAL_gb_main); 471 ali_type = GBT_get_alignment_type_string(GLOBAL_gb_main, ali_name); 472 result = new char[21+strlen(ali_name)]; 473 } 474 475 sprintf(result, "edit4_%s.arb", mode == 0 ? ali_name : ali_type); 462 const char *result; 463 if (mode == 2) { 464 result = "edit4.arb"; 465 } 466 else { 467 static char *ali_name = 0; 468 static char *ali_type = 0; 469 static char *result_copy = 0; 470 471 if (!ali_name) { 472 GB_transaction dummy(GLOBAL_gb_main); 473 ali_name = GBT_get_default_alignment(GLOBAL_gb_main); 474 ali_type = GBT_get_alignment_type_string(GLOBAL_gb_main, ali_name); 475 result_copy = new char[21+strlen(ali_name)]; 476 } 477 478 sprintf(result_copy, "edit4_%s.arb", mode == 0 ? ali_name : ali_type); 479 result = result_copy; 480 } 476 481 477 482 return result; -
trunk/EDIT4/ED4_root.cxx
r8360 r8363 1560 1560 } 1561 1561 } 1562 e4_assert(default_mode != -1);1562 if (default_mode == -1) default_mode = 2; // no properties yet -> use 'edit4.arb' 1563 1563 1564 1564 const char *entry = GBS_global_string("Save loaded Properties (%s)", ED4_propertyName(default_mode)); … … 1873 1873 // if not, use 'mode 2', i.e. "edit4.arb" 1874 1874 // (no full path, we want to load default from arb_defaults) 1875 if (!propname) { 1876 freedup(propname, ED4_propertyName(2)); 1877 } 1878 1879 GB_informationf("Using properties from '%s'", propname); 1875 if (!propname) propname = strdup(ED4_propertyName(2)); 1876 1880 1877 return propname; 1881 1878 }
