Changes in src/config.cpp [68f03d:112b09]
- File:
-
- 1 edited
-
src/config.cpp (modified) (37 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/config.cpp
r68f03d r112b09 4 4 * 5 5 */ 6 7 #include "Helpers/MemDebug.hpp" 6 8 7 9 #include <stdio.h> … … 14 16 #include "element.hpp" 15 17 #include "helpers.hpp" 18 #include "info.hpp" 16 19 #include "lists.hpp" 17 20 #include "log.hpp" … … 93 96 return; 94 97 } else 95 buffer = Malloc<char*>(NoLines, "ConfigFileBuffer::ConfigFileBuffer: **buffer");98 buffer = new char *[NoLines]; 96 99 97 100 // scan each line and put into buffer … … 99 102 int i; 100 103 do { 101 buffer[lines] = Malloc<char>(MAXSTRINGSIZE, "ConfigFileBuffer::ConfigFileBuffer: *buffer[]");104 buffer[lines] = new char[MAXSTRINGSIZE]; 102 105 file->getline(buffer[lines], MAXSTRINGSIZE-1); 103 106 i = strlen(buffer[lines]); … … 119 122 { 120 123 for(int i=0;i<NoLines;++i) 121 Free(&buffer[i]);122 Free(&buffer);123 Free(&LineMapping);124 delete[](buffer[i]); 125 delete[](buffer); 126 delete[](LineMapping); 124 127 } 125 128 … … 129 132 void ConfigFileBuffer::InitMapping() 130 133 { 131 LineMapping = Malloc<int>(NoLines, "ConfigFileBuffer::InitMapping: *LineMapping");134 LineMapping = new int[NoLines]; 132 135 for (int i=0;i<NoLines;i++) 133 136 LineMapping[i] = i; … … 179 182 MaxLevel(5), RiemannTensor(0), LevRFactor(0), RiemannLevel(0), Lev0Factor(2), RTActualUse(0), AddPsis(0), RCut(20.), StructOpt(0), IsAngstroem(1), RelativeCoord(0), 180 183 MaxTypes(0) { 181 mainname = Malloc<char>(MAXSTRINGSIZE,"config constructor: mainname");182 defaultpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: defaultpath");183 pseudopotpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: pseudopotpath");184 databasepath = Malloc<char>(MAXSTRINGSIZE,"config constructor: databasepath");185 configpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: configpath");186 configname = Malloc<char>(MAXSTRINGSIZE,"config constructor: configname");184 mainname = new char[MAXSTRINGSIZE]; 185 defaultpath = new char[MAXSTRINGSIZE]; 186 pseudopotpath = new char[MAXSTRINGSIZE]; 187 databasepath = new char[MAXSTRINGSIZE]; 188 configpath = new char[MAXSTRINGSIZE]; 189 configname = new char[MAXSTRINGSIZE]; 187 190 strcpy(mainname,"pcp"); 188 191 strcpy(defaultpath,"not specified"); … … 199 202 config::~config() 200 203 { 201 Free(&mainname);202 Free(&defaultpath);203 Free(&pseudopotpath);204 Free(&databasepath);205 Free(&configpath);206 Free(&configname);207 Free(&ThermostatImplemented);204 delete[](mainname); 205 delete[](defaultpath); 206 delete[](pseudopotpath); 207 delete[](databasepath); 208 delete[](configpath); 209 delete[](configname); 210 delete[](ThermostatImplemented); 208 211 for (int j=0;j<MaxThermostats;j++) 209 Free(&ThermostatNames[j]);210 Free(&ThermostatNames);212 delete[](ThermostatNames[j]); 213 delete[](ThermostatNames); 211 214 212 215 if (BG != NULL) … … 218 221 void config::InitThermostats() 219 222 { 220 ThermostatImplemented = Malloc<int>(MaxThermostats, "config constructor: *ThermostatImplemented");221 ThermostatNames = Malloc<char*>(MaxThermostats, "config constructor: *ThermostatNames");223 ThermostatImplemented = new int[MaxThermostats]; 224 ThermostatNames = new char *[MaxThermostats]; 222 225 for (int j=0;j<MaxThermostats;j++) 223 ThermostatNames[j] = Malloc<char>(12, "config constructor: ThermostatNames[]");226 ThermostatNames[j] = new char[12]; 224 227 225 228 strcpy(ThermostatNames[0],"None"); … … 242 245 void config::ParseThermostats(class ConfigFileBuffer * const fb) 243 246 { 244 char * const thermo = Malloc<char>(12, "IonsInitRead: thermo");247 char * const thermo = new char[12]; 245 248 const int verbose = 0; 246 249 … … 309 312 Thermostat = None; 310 313 } 311 Free(thermo);314 delete[](thermo); 312 315 }; 313 316 … … 1547 1550 int AtomNo = -1; 1548 1551 int MolNo = 0; 1549 atom *Walker = NULL;1550 1552 FILE *f = NULL; 1551 1553 … … 1560 1562 fprintf(f, "# Created by MoleCuilder\n"); 1561 1563 1562 for (MoleculeList::const_iterator Runner = MolList->ListOfMolecules.begin(); Runner != MolList->ListOfMolecules.end(); Runner++) { 1563 Walker = (*Runner)->start; 1564 int *elementNo = Calloc<int>(MAX_ELEMENTS, "config::SavePDB - elementNo"); 1564 for (MoleculeList::const_iterator MolRunner = MolList->ListOfMolecules.begin(); MolRunner != MolList->ListOfMolecules.end(); MolRunner++) { 1565 int *elementNo = new int[MAX_ELEMENTS]; 1566 for (int i=0;i<MAX_ELEMENTS;i++) 1567 elementNo[i] = 0; 1565 1568 AtomNo = 0; 1566 while (Walker->next != (*Runner)->end) { 1567 Walker = Walker->next; 1568 sprintf(name, "%2s%2d",Walker->type->symbol, elementNo[Walker->type->Z]); 1569 elementNo[Walker->type->Z] = (elementNo[Walker->type->Z]+1) % 100; // confine to two digits 1569 for (molecule::const_iterator iter = (*MolRunner)->begin(); iter != (*MolRunner)->end(); ++iter) { 1570 sprintf(name, "%2s%2d",(*iter)->type->symbol, elementNo[(*iter)->type->Z]); 1571 elementNo[(*iter)->type->Z] = (elementNo[(*iter)->type->Z]+1) % 100; // confine to two digits 1570 1572 fprintf(f, 1571 1573 "ATOM %6u %-4s %4s%c%4u %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%2s\n", 1572 Walker->nr, /* atom serial number */1574 (*iter)->nr, /* atom serial number */ 1573 1575 name, /* atom name */ 1574 (* Runner)->name, /* residue name */1576 (*MolRunner)->name, /* residue name */ 1575 1577 'a'+(unsigned char)(AtomNo % 26), /* letter for chain */ 1576 1578 MolNo, /* residue sequence number */ 1577 Walker->node->at(0), /* position X in Angstroem */1578 Walker->node->at(1), /* position Y in Angstroem */1579 Walker->node->at(2), /* position Z in Angstroem */1580 (double) Walker->type->Valence, /* occupancy */1581 (double) Walker->type->NoValenceOrbitals, /* temperature factor */1579 (*iter)->node->at(0), /* position X in Angstroem */ 1580 (*iter)->node->at(1), /* position Y in Angstroem */ 1581 (*iter)->node->at(2), /* position Z in Angstroem */ 1582 (double)(*iter)->type->Valence, /* occupancy */ 1583 (double)(*iter)->type->NoValenceOrbitals, /* temperature factor */ 1582 1584 "0", /* segment identifier */ 1583 Walker->type->symbol, /* element symbol */1585 (*iter)->type->symbol, /* element symbol */ 1584 1586 "0"); /* charge */ 1585 1587 AtomNo++; 1586 1588 } 1587 Free(&elementNo);1589 delete[](elementNo); 1588 1590 MolNo++; 1589 1591 } … … 1601 1603 { 1602 1604 int AtomNo = -1; 1603 atom *Walker = NULL;1604 1605 FILE *f = NULL; 1605 1606 1606 int *elementNo = Calloc<int>(MAX_ELEMENTS, "config::SavePDB - elementNo"); 1607 int *elementNo = new int[MAX_ELEMENTS]; 1608 for (int i=0;i<MAX_ELEMENTS;i++) 1609 elementNo[i] = 0; 1607 1610 char name[MAXSTRINGSIZE]; 1608 1611 strncpy(name, filename, MAXSTRINGSIZE-1); … … 1611 1614 if (f == NULL) { 1612 1615 DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl); 1613 Free(&elementNo);1616 delete[](elementNo); 1614 1617 return false; 1615 1618 } 1616 1619 fprintf(f, "# Created by MoleCuilder\n"); 1617 1620 1618 Walker = mol->start;1619 1621 AtomNo = 0; 1620 while (Walker->next != mol->end) { 1621 Walker = Walker->next; 1622 sprintf(name, "%2s%2d",Walker->type->symbol, elementNo[Walker->type->Z]); 1623 elementNo[Walker->type->Z] = (elementNo[Walker->type->Z]+1) % 100; // confine to two digits 1622 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 1623 sprintf(name, "%2s%2d",(*iter)->type->symbol, elementNo[(*iter)->type->Z]); 1624 elementNo[(*iter)->type->Z] = (elementNo[(*iter)->type->Z]+1) % 100; // confine to two digits 1624 1625 fprintf(f, 1625 1626 "ATOM %6u %-4s %4s%c%4u %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s%2s\n", 1626 Walker->nr, /* atom serial number */1627 (*iter)->nr, /* atom serial number */ 1627 1628 name, /* atom name */ 1628 1629 mol->name, /* residue name */ 1629 1630 'a'+(unsigned char)(AtomNo % 26), /* letter for chain */ 1630 1631 0, /* residue sequence number */ 1631 Walker->node->at(0), /* position X in Angstroem */1632 Walker->node->at(1), /* position Y in Angstroem */1633 Walker->node->at(2), /* position Z in Angstroem */1634 (double) Walker->type->Valence, /* occupancy */1635 (double) Walker->type->NoValenceOrbitals, /* temperature factor */1632 (*iter)->node->at(0), /* position X in Angstroem */ 1633 (*iter)->node->at(1), /* position Y in Angstroem */ 1634 (*iter)->node->at(2), /* position Z in Angstroem */ 1635 (double)(*iter)->type->Valence, /* occupancy */ 1636 (double)(*iter)->type->NoValenceOrbitals, /* temperature factor */ 1636 1637 "0", /* segment identifier */ 1637 Walker->type->symbol, /* element symbol */1638 (*iter)->type->symbol, /* element symbol */ 1638 1639 "0"); /* charge */ 1639 1640 AtomNo++; 1640 1641 } 1641 1642 fclose(f); 1642 Free(&elementNo);1643 delete[](elementNo); 1643 1644 1644 1645 return true; … … 1653 1654 bool config::SaveTREMOLO(const char * const filename, const molecule * const mol) const 1654 1655 { 1655 atom *Walker = NULL;1656 1656 ofstream *output = NULL; 1657 1657 stringstream * const fname = new stringstream; … … 1666 1666 1667 1667 // scan maximum number of neighbours 1668 Walker = mol->start;1669 1668 int MaxNeighbours = 0; 1670 while (Walker->next != mol->end) { 1671 Walker = Walker->next; 1672 const int count = Walker->ListOfBonds.size(); 1669 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 1670 const int count = (*iter)->ListOfBonds.size(); 1673 1671 if (MaxNeighbours < count) 1674 1672 MaxNeighbours = count; 1675 1673 } 1676 *output << "# ATOMDATA Id name resName resSeq x=3 charge type neighbors=" << MaxNeighbours << endl; 1677 1678 Walker = mol->start; 1679 while (Walker->next != mol->end) { 1680 Walker = Walker->next; 1681 *output << Walker->nr << "\t"; 1682 *output << Walker->getName() << "\t"; 1674 *output << "# ATOMDATA Id name resName resSeq x=3 Charge type neighbors=" << MaxNeighbours << endl; 1675 1676 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 1677 *output << (*iter)->nr << "\t"; 1678 *output << (*iter)->getName() << "\t"; 1683 1679 *output << mol->name << "\t"; 1684 1680 *output << 0 << "\t"; 1685 *output << Walker->node->at(0) << "\t" << Walker->node->at(1) << "\t" << Walker->node->at(2) << "\t";1686 *output << static_cast<double>( Walker->type->Valence) << "\t";1687 *output << Walker->type->symbol << "\t";1688 for (BondList::iterator runner = Walker->ListOfBonds.begin(); runner != Walker->ListOfBonds.end(); runner++)1689 *output << (*runner)->GetOtherAtom( Walker)->nr << "\t";1690 for(int i= Walker->ListOfBonds.size(); i < MaxNeighbours; i++)1681 *output << (*iter)->node->at(0) << "\t" << (*iter)->node->at(1) << "\t" << (*iter)->node->at(2) << "\t"; 1682 *output << static_cast<double>((*iter)->type->Valence) << "\t"; 1683 *output << (*iter)->type->symbol << "\t"; 1684 for (BondList::iterator runner = (*iter)->ListOfBonds.begin(); runner != (*iter)->ListOfBonds.end(); runner++) 1685 *output << (*runner)->GetOtherAtom(*iter)->nr << "\t"; 1686 for(int i=(*iter)->ListOfBonds.size(); i < MaxNeighbours; i++) 1691 1687 *output << "-\t"; 1692 1688 *output << endl; … … 1708 1704 bool config::SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const 1709 1705 { 1710 atom *Walker = NULL;1706 Info FunctionInfo(__func__); 1711 1707 ofstream *output = NULL; 1712 1708 stringstream * const fname = new stringstream; … … 1723 1719 int MaxNeighbours = 0; 1724 1720 for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) { 1725 Walker = (*MolWalker)->start; 1726 while (Walker->next != (*MolWalker)->end) { 1727 Walker = Walker->next; 1728 const int count = Walker->ListOfBonds.size(); 1721 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 1722 const int count = (*iter)->ListOfBonds.size(); 1729 1723 if (MaxNeighbours < count) 1730 1724 MaxNeighbours = count; 1731 1725 } 1732 1726 } 1733 *output << "# ATOMDATA Id name resName resSeq x=3 charge type neighbors=" << MaxNeighbours << endl;1727 *output << "# ATOMDATA Id name resName resSeq x=3 Charge type neighbors=" << MaxNeighbours << endl; 1734 1728 1735 1729 // create global to local id map 1736 int **LocalNotoGlobalNoMap = Calloc<int *>(MolList->ListOfMolecules.size(), "config::SaveTREMOLO - **LocalNotoGlobalNoMap");1730 map<int, int> LocalNotoGlobalNoMap; 1737 1731 { 1738 int MolCounter = 0;1739 int AtomNo = 0;1732 unsigned int MolCounter = 0; 1733 int AtomNo = 1; 1740 1734 for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) { 1741 LocalNotoGlobalNoMap[MolCounter] = Calloc<int>(MolList->CountAllAtoms(), "config::SaveTREMOLO - *LocalNotoGlobalNoMap[]"); 1742 1743 (*MolWalker)->SetIndexedArrayForEachAtomTo( LocalNotoGlobalNoMap[MolCounter], &atom::nr, IncrementalAbsoluteValue, &AtomNo); 1744 1735 for(molecule::iterator AtomRunner = (*MolWalker)->begin(); AtomRunner != (*MolWalker)->end(); ++AtomRunner) { 1736 LocalNotoGlobalNoMap.insert( pair<int,int>((*AtomRunner)->getId(), AtomNo++) ); 1737 } 1745 1738 MolCounter++; 1746 1739 } 1740 ASSERT(MolCounter == MolList->ListOfMolecules.size(), "SaveTREMOLO: LocalNotoGlobalNoMap[] has not been correctly initialized for each molecule"); 1747 1741 } 1748 1742 … … 1752 1746 int AtomNo = 0; 1753 1747 for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) { 1754 Walker = (*MolWalker)->start; 1755 while (Walker->next != (*MolWalker)->end) { 1756 Walker = Walker->next; 1757 *output << AtomNo+1 << "\t"; 1758 *output << Walker->getName() << "\t"; 1748 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 1749 *output << LocalNotoGlobalNoMap[ (*iter)->getId() ] << "\t"; 1750 *output << (*iter)->getName() << "\t"; 1759 1751 *output << (*MolWalker)->name << "\t"; 1760 1752 *output << MolCounter+1 << "\t"; 1761 *output << Walker->node->at(0) << "\t" << Walker->node->at(1) << "\t" << Walker->node->at(2) << "\t";1762 *output << (double) Walker->type->Valence << "\t";1763 *output << Walker->type->symbol << "\t";1764 for (BondList::iterator runner = Walker->ListOfBonds.begin(); runner != Walker->ListOfBonds.end(); runner++)1765 *output << LocalNotoGlobalNoMap[ MolCounter][ (*runner)->GetOtherAtom(Walker)->nr ]+1<< "\t";1766 for(int i= Walker->ListOfBonds.size(); i < MaxNeighbours; i++)1753 *output << (*iter)->node->at(0) << "\t" << (*iter)->node->at(1) << "\t" << (*iter)->node->at(2) << "\t"; 1754 *output << (double)(*iter)->type->Valence << "\t"; 1755 *output << (*iter)->type->symbol << "\t"; 1756 for (BondList::iterator runner = (*iter)->ListOfBonds.begin(); runner != (*iter)->ListOfBonds.end(); runner++) 1757 *output << LocalNotoGlobalNoMap[ (*runner)->GetOtherAtom((*iter))->getId() ] << "\t"; 1758 for(int i=(*iter)->ListOfBonds.size(); i < MaxNeighbours; i++) 1767 1759 *output << "-\t"; 1768 1760 *output << endl; … … 1778 1770 delete(output); 1779 1771 delete(fname); 1780 for(size_t i=0;i<MolList->ListOfMolecules.size(); i++)1781 Free(&LocalNotoGlobalNoMap[i]);1782 Free(&LocalNotoGlobalNoMap);1783 1772 1784 1773 return true; … … 1808 1797 if (output == NULL) 1809 1798 strcpy(filename,"main_pcp_linux"); 1810 Log() << Verbose(0) << "Saving as pdb input ";1799 Log() << Verbose(0) << "Saving as pdb input ... " << endl; 1811 1800 if (SavePDB(filename, molecules)) 1812 Log() << Verbose(0) << " done." << endl;1801 Log() << Verbose(0) << "\t... done." << endl; 1813 1802 else 1814 Log() << Verbose(0) << " failed." << endl;1803 Log() << Verbose(0) << "\t... failed." << endl; 1815 1804 1816 1805 // then save as tremolo data file … … 1819 1808 if (output == NULL) 1820 1809 strcpy(filename,"main_pcp_linux"); 1821 Log() << Verbose(0) << "Saving as tremolo data input ";1810 Log() << Verbose(0) << "Saving as tremolo data input ... " << endl; 1822 1811 if (SaveTREMOLO(filename, molecules)) 1823 Log() << Verbose(0) << " done." << endl;1812 Log() << Verbose(0) << "\t... done." << endl; 1824 1813 else 1825 Log() << Verbose(0) << " failed." << endl;1814 Log() << Verbose(0) << "\t... failed." << endl; 1826 1815 1827 1816 // translate each to its center and merge all molecules in MoleculeListClass into this molecule … … 1859 1848 output.close(); 1860 1849 output.clear(); 1861 Log() << Verbose(0) << "Saving of config file ";1850 Log() << Verbose(0) << "Saving of config file ... " << endl; 1862 1851 if (Save(filename, periode, mol)) 1863 Log() << Verbose(0) << " successful." << endl;1852 Log() << Verbose(0) << "\t... successful." << endl; 1864 1853 else 1865 Log() << Verbose(0) << " failed." << endl;1854 Log() << Verbose(0) << "\t... failed." << endl; 1866 1855 1867 1856 // and save to xyz file … … 1876 1865 output.open(filename, ios::trunc); 1877 1866 } 1878 Log() << Verbose(0) << "Saving of XYZ file ";1867 Log() << Verbose(0) << "Saving of XYZ file ... " << endl; 1879 1868 if (mol->MDSteps <= 1) { 1880 1869 if (mol->OutputXYZ(&output)) 1881 Log() << Verbose(0) << " successful." << endl;1870 Log() << Verbose(0) << "\t... successful." << endl; 1882 1871 else 1883 Log() << Verbose(0) << " failed." << endl;1872 Log() << Verbose(0) << "\t... failed." << endl; 1884 1873 } else { 1885 1874 if (mol->OutputTrajectoriesXYZ(&output)) 1886 Log() << Verbose(0) << " successful." << endl;1875 Log() << Verbose(0) << "\t... successful." << endl; 1887 1876 else 1888 Log() << Verbose(0) << " failed." << endl;1877 Log() << Verbose(0) << "\t... failed." << endl; 1889 1878 } 1890 1879 output.close(); … … 1896 1885 if (output == NULL) 1897 1886 strcpy(filename,"main_pcp_linux"); 1898 Log() << Verbose(0) << "Saving as mpqc input ";1887 Log() << Verbose(0) << "Saving as mpqc input .. " << endl; 1899 1888 if (SaveMPQC(filename, mol)) 1900 Log() << Verbose(0) << " done." << endl;1889 Log() << Verbose(0) << "\t... done." << endl; 1901 1890 else 1902 Log() << Verbose(0) << " failed." << endl;1891 Log() << Verbose(0) << "\t... failed." << endl; 1903 1892 1904 1893 if (!strcmp(configpath, GetDefaultPath())) { … … 1938 1927 char *dummy1 = NULL; 1939 1928 char *dummy = NULL; 1940 char * const free_dummy = Malloc<char>(256, "config::ParseForParameter: *free_dummy"); // pointers in the line that is read in per step1929 char free_dummy[MAXSTRINGSIZE]; // pointers in the line that is read in per step 1941 1930 dummy1 = free_dummy; 1942 1931 … … 1954 1943 if (file->eof()) { 1955 1944 if ((critical) && (found == 0)) { 1956 Free(free_dummy);1957 1945 //Error(InitReading, name); 1958 1946 fprintf(stderr,"Error:InitReading, critical %s not found\n", name); … … 1962 1950 file->clear(); 1963 1951 file->seekg(file_position, ios::beg); // rewind to start position 1964 Free(free_dummy);1965 1952 return 0; 1966 1953 } … … 1993 1980 dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword) 1994 1981 //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name); 1995 //Free((void **)&free_dummy);1996 1982 //Error(FileOpenParams, NULL); 1997 1983 } else { … … 2014 2000 if (file->eof()) { 2015 2001 if ((critical) && (found == 0)) { 2016 Free(free_dummy);2017 2002 //Error(InitReading, name); 2018 2003 fprintf(stderr,"Error:InitReading, critical %s not found\n", name); … … 2022 2007 file->clear(); 2023 2008 file->seekg(file_position, ios::beg); // rewind to start position 2024 Free(free_dummy);2025 2009 return 0; 2026 2010 } … … 2063 2047 if (critical) { 2064 2048 if (verbose) fprintf(stderr,"Error: EoL at %i and still missing %i value(s) for parameter %s\n", line, yth-j, name); 2065 Free(free_dummy);2066 2049 //return 0; 2067 2050 exit(255); … … 2071 2054 file->clear(); 2072 2055 file->seekg(file_position, ios::beg); // rewind to start position 2073 Free(free_dummy);2074 2056 return 0; 2075 2057 } … … 2084 2066 file->seekg(file_position, ios::beg); // rewind to start position 2085 2067 } 2086 Free(free_dummy);2087 2068 return 0; 2088 2069 } … … 2140 2121 if ((type >= row_int) && (verbose)) 2141 2122 fprintf(stderr,"\n"); 2142 Free(free_dummy);2143 2123 if (!sequential) { 2144 2124 file->clear(); … … 2221 2201 dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword) 2222 2202 //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name); 2223 //Free(&free_dummy);2224 2203 //Error(FileOpenParams, NULL); 2225 2204 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
