Changeset bd86e8 for molecuilder/src/builder.cpp
- Timestamp:
- Jul 9, 2009, 11:01:08 AM (16 years ago)
- Children:
- ab7b5e7
- Parents:
- c12297
- git-author:
- Frederik Heber <heber@…> (07/09/09 10:59:00)
- git-committer:
- Frederik Heber <heber@…> (07/09/09 11:01:08)
- File:
-
- 1 edited
-
molecuilder/src/builder.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
rc12297 rbd86e8 1208 1208 * \return exit code (0 - successful, all else - something's wrong) 1209 1209 */ 1210 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, config& configuration, char *&ConfigFileName , char *&PathToDatabases)1210 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, config& configuration, char *&ConfigFileName) 1211 1211 { 1212 1212 Vector x,y,z,n; // coordinates for absolute point in cell volume … … 1223 1223 clock_t start,end; 1224 1224 int argptr; 1225 PathToDatabases = LocalPath;1225 strncpy(configuration.databasepath, LocalPath, MAXSTRINGSIZE-1); 1226 1226 1227 1227 // simply create a new molecule, wherein the config file is loaded and the manipulation takes place … … 1285 1285 } else { 1286 1286 cout << "Using " << argv[argptr] << " as elements database." << endl; 1287 PathToDatabases = argv[argptr];1287 strncpy (configuration.databasepath, argv[argptr], MAXSTRINGSIZE-1); 1288 1288 argptr+=1; 1289 1289 } … … 1302 1302 1303 1303 // 2. Parse the element database 1304 if (periode->LoadPeriodentafel( PathToDatabases)) {1304 if (periode->LoadPeriodentafel(configuration.databasepath)) { 1305 1305 cout << Verbose(0) << "Element list loaded successfully." << endl; 1306 1306 //periode->Output((ofstream *)&cout); … … 1771 1771 } 1772 1772 } else { // no arguments, hence scan the elements db 1773 if (periode->LoadPeriodentafel( PathToDatabases))1773 if (periode->LoadPeriodentafel(configuration.databasepath)) 1774 1774 cout << Verbose(0) << "Element list loaded successfully." << endl; 1775 1775 else … … 1794 1794 string line; 1795 1795 char *ConfigFileName = NULL; 1796 char *ElementsFileName = NULL;1797 1796 int j, count; 1798 1797 1799 1798 // =========================== PARSE COMMAND LINE OPTIONS ==================================== 1800 j = ParseCommandLineOptions(argc, argv, molecules, periode, configuration, ConfigFileName , ElementsFileName);1799 j = ParseCommandLineOptions(argc, argv, molecules, periode, configuration, ConfigFileName); 1801 1800 if (j == 1) return 0; // just for -v and -h options 1802 1801 if (j) return j; // something went wrong … … 1889 1888 1890 1889 // save element data base 1891 if (periode->StorePeriodentafel( ElementsFileName)) //ElementsFileName1890 if (periode->StorePeriodentafel(configuration.databasepath)) //ElementsFileName 1892 1891 cout << Verbose(0) << "Saving of elements.db successful." << endl; 1893 1892 else
Note:
See TracChangeset
for help on using the changeset viewer.
