Changeset 499cea
- Timestamp:
 - Aug 28, 2012, 5:34:09 PM (13 years ago)
 - Children:
 - 2d0bba
 - Parents:
 - 4dfef04
 - File:
 - 
      
- 1 edited
 
- 
          
  src/bin/mpqc/mpqc.cc (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/bin/mpqc/mpqc.cc
r4dfef04 r499cea 451 451 if (output) basename_source = output; 452 452 else basename_source = input; 453 int nfilebase = (int) (::strrchr(basename_source, '.') - basename_source); 453 const char *baseprefix = ::strrchr(basename_source, '.'); 454 int nfilebase = 1; 455 if (baseprefix == NULL) { 456 std::cerr << "setOutputBaseName() - ERROR: basename_source " 457 << basename_source << " contains no dot (.)." << std::endl; 458 nfilebase = ::strlen(basename_source); 459 } else 460 nfilebase = (int) (baseprefix - basename_source); 454 461 char *basename = new char[nfilebase + 1]; 455 462 strncpy(basename, basename_source, nfilebase); … … 1844 1851 std::ifstream test; 1845 1852 do { 1846 char filename_template[] = "mpqc_temp_XXXXXX ";1853 char filename_template[] = "mpqc_temp_XXXXXX.in"; 1847 1854 output = mktemp(filename_template); 1848 1855 test.open(output); … … 1893 1900 const char *generic_input = 0; 1894 1901 getInputFileNames(object_input, generic_input, options, optind, argc, argv); 1895 const char *input ;1902 const char *input = 0; 1896 1903 if (object_input) input = object_input; 1897 1904 if (generic_input) input = generic_input;  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  