Changeset 36b128 for molecuilder/src


Ignore:
Timestamp:
Apr 29, 2008, 6:57:59 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
7b1cea
Parents:
dac5c5
Message:

Comply with test again: help and version command options exit at once

This had been changed to just flag=2 for this, as molecule and periodentafel structures were not free'd, but this broke the test, so we changed it back and added some delete()s.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    rdac5c5 r36b128  
    725725  output.close();
    726726  output.clear();
     727  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
     728    cerr << "WARNING: config is found under different path then stated in config file::defaultpath!" << endl;
     729  }
    727730};
    728731
     
    773776          case 'H':
    774777          case '?':
    775             flag=2;
    776778            cout << "MoleCuilder suite" << endl << "==================" << endl << endl;
    777779            cout << "Usage: " << argv[0] << "[-{acepsthH?vfrp}] [further arguments] [config file]" << endl;
     
    787789            cout << "\t-v/-V\t\tGives version information." << endl;
    788790            cout << "Note: config files must not begin with '-' !" << endl;
     791            delete(mol);
     792            delete(periode);
     793            return (0);
    789794            break;
    790795          case 'v':
    791796          case 'V':
    792             flag=2;
    793797            cout << argv[0] << " " << VERSIONSTRING << endl;
    794798            cout << "Build your own molecule position set." << endl;
     799            delete(mol);
     800            delete(periode);
     801            return (0);
    795802            break;
    796803          case 'e':
     
    10051012          } else argptr++;
    10061013        } while (argptr < (argc-1));
    1007     if (flag == 1) // 1 means save and exit
     1014    if (flag == 1) { // 1 means save and exit
    10081015      SaveConfig(ConfigFileName, &configuration, periode, mol);
    1009     if (flag > 1) { // 2 means just exit
    10101016      delete(mol);
    10111017      delete(periode);
Note: See TracChangeset for help on using the changeset viewer.