Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    r112b09 r68f03d  
    44 *
    55 */
    6 
    7 #include "Helpers/MemDebug.hpp"
    86
    97#include <stdio.h>
     
    1614#include "element.hpp"
    1715#include "helpers.hpp"
    18 #include "info.hpp"
    1916#include "lists.hpp"
    2017#include "log.hpp"
     
    9693    return;
    9794  } else
    98     buffer = new char *[NoLines];
     95    buffer = Malloc<char*>(NoLines, "ConfigFileBuffer::ConfigFileBuffer: **buffer");
    9996
    10097  // scan each line and put into buffer
     
    10299  int i;
    103100  do {
    104     buffer[lines] = new char[MAXSTRINGSIZE];
     101    buffer[lines] = Malloc<char>(MAXSTRINGSIZE, "ConfigFileBuffer::ConfigFileBuffer: *buffer[]");
    105102    file->getline(buffer[lines], MAXSTRINGSIZE-1);
    106103    i = strlen(buffer[lines]);
     
    122119{
    123120  for(int i=0;i<NoLines;++i)
    124     delete[](buffer[i]);
    125   delete[](buffer);
    126   delete[](LineMapping);
     121    Free(&buffer[i]);
     122  Free(&buffer);
     123  Free(&LineMapping);
    127124}
    128125
     
    132129void ConfigFileBuffer::InitMapping()
    133130{
    134   LineMapping = new int[NoLines];
     131  LineMapping = Malloc<int>(NoLines, "ConfigFileBuffer::InitMapping: *LineMapping");
    135132  for (int i=0;i<NoLines;i++)
    136133    LineMapping[i] = i;
     
    182179    MaxLevel(5), RiemannTensor(0), LevRFactor(0), RiemannLevel(0), Lev0Factor(2), RTActualUse(0), AddPsis(0), RCut(20.), StructOpt(0), IsAngstroem(1), RelativeCoord(0),
    183180    MaxTypes(0) {
    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];
     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");
    190187  strcpy(mainname,"pcp");
    191188  strcpy(defaultpath,"not specified");
     
    202199config::~config()
    203200{
    204   delete[](mainname);
    205   delete[](defaultpath);
    206   delete[](pseudopotpath);
    207   delete[](databasepath);
    208   delete[](configpath);
    209   delete[](configname);
    210   delete[](ThermostatImplemented);
     201  Free(&mainname);
     202  Free(&defaultpath);
     203  Free(&pseudopotpath);
     204  Free(&databasepath);
     205  Free(&configpath);
     206  Free(&configname);
     207  Free(&ThermostatImplemented);
    211208  for (int j=0;j<MaxThermostats;j++)
    212     delete[](ThermostatNames[j]);
    213   delete[](ThermostatNames);
     209    Free(&ThermostatNames[j]);
     210  Free(&ThermostatNames);
    214211
    215212  if (BG != NULL)
     
    221218void config::InitThermostats()
    222219{
    223   ThermostatImplemented = new int[MaxThermostats];
    224   ThermostatNames = new char *[MaxThermostats];
     220  ThermostatImplemented = Malloc<int>(MaxThermostats, "config constructor: *ThermostatImplemented");
     221  ThermostatNames = Malloc<char*>(MaxThermostats, "config constructor: *ThermostatNames");
    225222  for (int j=0;j<MaxThermostats;j++)
    226     ThermostatNames[j] = new char[12];
     223    ThermostatNames[j] = Malloc<char>(12, "config constructor: ThermostatNames[]");
    227224
    228225  strcpy(ThermostatNames[0],"None");
     
    245242void config::ParseThermostats(class ConfigFileBuffer * const fb)
    246243{
    247   char * const thermo = new char[12];
     244  char * const thermo = Malloc<char>(12, "IonsInitRead: thermo");
    248245  const int verbose = 0;
    249246
     
    312309    Thermostat = None;
    313310  }
    314   delete[](thermo);
     311  Free(thermo);
    315312};
    316313
     
    15501547  int AtomNo = -1;
    15511548  int MolNo = 0;
     1549  atom *Walker = NULL;
    15521550  FILE *f = NULL;
    15531551
     
    15621560  fprintf(f, "# Created by MoleCuilder\n");
    15631561
    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;
     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");
    15681565    AtomNo = 0;
    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
     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
    15721570      fprintf(f,
    15731571             "ATOM %6u %-4s %4s%c%4u    %8.3f%8.3f%8.3f%6.2f%6.2f      %4s%2s%2s\n",
    1574              (*iter)->nr,                /* atom serial number */
     1572             Walker->nr,                /* atom serial number */
    15751573             name,         /* atom name */
    1576              (*MolRunner)->name,      /* residue name */
     1574             (*Runner)->name,      /* residue name */
    15771575             'a'+(unsigned char)(AtomNo % 26),           /* letter for chain */
    15781576             MolNo,         /* residue sequence number */
    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 */
     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 */
    15841582             "0",            /* segment identifier */
    1585              (*iter)->type->symbol,    /* element symbol */
     1583             Walker->type->symbol,    /* element symbol */
    15861584             "0");           /* charge */
    15871585      AtomNo++;
    15881586    }
    1589     delete[](elementNo);
     1587    Free(&elementNo);
    15901588    MolNo++;
    15911589  }
     
    16031601{
    16041602  int AtomNo = -1;
     1603  atom *Walker = NULL;
    16051604  FILE *f = NULL;
    16061605
    1607   int *elementNo = new int[MAX_ELEMENTS];
    1608   for (int i=0;i<MAX_ELEMENTS;i++)
    1609     elementNo[i] = 0;
     1606  int *elementNo = Calloc<int>(MAX_ELEMENTS, "config::SavePDB - elementNo");
    16101607  char name[MAXSTRINGSIZE];
    16111608  strncpy(name, filename, MAXSTRINGSIZE-1);
     
    16141611  if (f == NULL) {
    16151612    DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl);
    1616     delete[](elementNo);
     1613    Free(&elementNo);
    16171614    return false;
    16181615  }
    16191616  fprintf(f, "# Created by MoleCuilder\n");
    16201617
     1618  Walker = mol->start;
    16211619  AtomNo = 0;
    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
     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
    16251624    fprintf(f,
    16261625           "ATOM %6u %-4s %4s%c%4u    %8.3f%8.3f%8.3f%6.2f%6.2f      %4s%2s%2s\n",
    1627            (*iter)->nr,                /* atom serial number */
     1626           Walker->nr,                /* atom serial number */
    16281627           name,         /* atom name */
    16291628           mol->name,      /* residue name */
    16301629           'a'+(unsigned char)(AtomNo % 26),           /* letter for chain */
    16311630           0,         /* residue sequence number */
    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 */
     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 */
    16371636           "0",            /* segment identifier */
    1638            (*iter)->type->symbol,    /* element symbol */
     1637           Walker->type->symbol,    /* element symbol */
    16391638           "0");           /* charge */
    16401639    AtomNo++;
    16411640  }
    16421641  fclose(f);
    1643   delete[](elementNo);
     1642  Free(&elementNo);
    16441643
    16451644  return true;
     
    16541653bool config::SaveTREMOLO(const char * const filename, const molecule * const mol) const
    16551654{
     1655  atom *Walker = NULL;
    16561656  ofstream *output = NULL;
    16571657  stringstream * const fname = new stringstream;
     
    16661666
    16671667  // scan maximum number of neighbours
     1668  Walker = mol->start;
    16681669  int MaxNeighbours = 0;
    1669   for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    1670     const int count = (*iter)->ListOfBonds.size();
     1670  while (Walker->next != mol->end) {
     1671    Walker = Walker->next;
     1672    const int count = Walker->ListOfBonds.size();
    16711673    if (MaxNeighbours < count)
    16721674      MaxNeighbours = count;
    16731675  }
    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";
     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";
    16791683    *output << mol->name << "\t";
    16801684    *output << 0 << "\t";
    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++)
     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++)
    16871691      *output << "-\t";
    16881692    *output << endl;
     
    17041708bool config::SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const
    17051709{
    1706   Info FunctionInfo(__func__);
     1710  atom *Walker = NULL;
    17071711  ofstream *output = NULL;
    17081712  stringstream * const fname = new stringstream;
     
    17191723  int MaxNeighbours = 0;
    17201724  for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) {
    1721     for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    1722       const int count = (*iter)->ListOfBonds.size();
     1725    Walker = (*MolWalker)->start;
     1726    while (Walker->next != (*MolWalker)->end) {
     1727      Walker = Walker->next;
     1728      const int count = Walker->ListOfBonds.size();
    17231729      if (MaxNeighbours < count)
    17241730        MaxNeighbours = count;
    17251731    }
    17261732  }
    1727   *output << "# ATOMDATA Id name resName resSeq x=3 Charge type neighbors=" << MaxNeighbours << endl;
     1733  *output << "# ATOMDATA Id name resName resSeq x=3 charge type neighbors=" << MaxNeighbours << endl;
    17281734
    17291735  // create global to local id map
    1730   map<int, int> LocalNotoGlobalNoMap;
     1736  int **LocalNotoGlobalNoMap = Calloc<int *>(MolList->ListOfMolecules.size(), "config::SaveTREMOLO - **LocalNotoGlobalNoMap");
    17311737  {
    1732     unsigned int MolCounter = 0;
    1733     int AtomNo = 1;
     1738    int MolCounter = 0;
     1739    int AtomNo = 0;
    17341740    for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) {
    1735       for(molecule::iterator AtomRunner = (*MolWalker)->begin(); AtomRunner != (*MolWalker)->end(); ++AtomRunner) {
    1736         LocalNotoGlobalNoMap.insert( pair<int,int>((*AtomRunner)->getId(), AtomNo++) );
    1737       }
     1741      LocalNotoGlobalNoMap[MolCounter] = Calloc<int>(MolList->CountAllAtoms(), "config::SaveTREMOLO - *LocalNotoGlobalNoMap[]");
     1742
     1743      (*MolWalker)->SetIndexedArrayForEachAtomTo( LocalNotoGlobalNoMap[MolCounter], &atom::nr, IncrementalAbsoluteValue, &AtomNo);
     1744
    17381745      MolCounter++;
    17391746    }
    1740     ASSERT(MolCounter == MolList->ListOfMolecules.size(), "SaveTREMOLO: LocalNotoGlobalNoMap[] has not been correctly initialized for each molecule");
    17411747  }
    17421748
     
    17461752    int AtomNo = 0;
    17471753    for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) {
    1748       for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) {
    1749         *output << LocalNotoGlobalNoMap[ (*iter)->getId() ] << "\t";
    1750         *output << (*iter)->getName() << "\t";
     1754      Walker = (*MolWalker)->start;
     1755      while (Walker->next != (*MolWalker)->end) {
     1756        Walker = Walker->next;
     1757        *output << AtomNo+1 << "\t";
     1758        *output << Walker->getName() << "\t";
    17511759        *output << (*MolWalker)->name << "\t";
    17521760        *output << MolCounter+1 << "\t";
    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++)
     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++)
    17591767          *output << "-\t";
    17601768        *output << endl;
     
    17701778  delete(output);
    17711779  delete(fname);
     1780  for(size_t i=0;i<MolList->ListOfMolecules.size(); i++)
     1781    Free(&LocalNotoGlobalNoMap[i]);
     1782  Free(&LocalNotoGlobalNoMap);
    17721783
    17731784  return true;
     
    17971808  if (output == NULL)
    17981809    strcpy(filename,"main_pcp_linux");
    1799   Log() << Verbose(0) << "Saving as pdb input ... " << endl;
     1810  Log() << Verbose(0) << "Saving as pdb input ";
    18001811  if (SavePDB(filename, molecules))
    1801     Log() << Verbose(0) << "\t... done." << endl;
     1812    Log() << Verbose(0) << "done." << endl;
    18021813  else
    1803     Log() << Verbose(0) << "\t... failed." << endl;
     1814    Log() << Verbose(0) << "failed." << endl;
    18041815
    18051816  // then save as tremolo data file
     
    18081819  if (output == NULL)
    18091820    strcpy(filename,"main_pcp_linux");
    1810   Log() << Verbose(0) << "Saving as tremolo data input ... " << endl;
     1821  Log() << Verbose(0) << "Saving as tremolo data input ";
    18111822  if (SaveTREMOLO(filename, molecules))
    1812     Log() << Verbose(0) << "\t... done." << endl;
     1823    Log() << Verbose(0) << "done." << endl;
    18131824  else
    1814     Log() << Verbose(0) << "\t... failed." << endl;
     1825    Log() << Verbose(0) << "failed." << endl;
    18151826
    18161827  // translate each to its center and merge all molecules in MoleculeListClass into this molecule
     
    18481859  output.close();
    18491860  output.clear();
    1850   Log() << Verbose(0) << "Saving of config file ... " << endl;
     1861  Log() << Verbose(0) << "Saving of config file ";
    18511862  if (Save(filename, periode, mol))
    1852     Log() << Verbose(0) << "\t... successful." << endl;
     1863    Log() << Verbose(0) << "successful." << endl;
    18531864  else
    1854     Log() << Verbose(0) << "\t... failed." << endl;
     1865    Log() << Verbose(0) << "failed." << endl;
    18551866
    18561867  // and save to xyz file
     
    18651876    output.open(filename, ios::trunc);
    18661877  }
    1867   Log() << Verbose(0) << "Saving of XYZ file ... " << endl;
     1878  Log() << Verbose(0) << "Saving of XYZ file ";
    18681879  if (mol->MDSteps <= 1) {
    18691880    if (mol->OutputXYZ(&output))
    1870       Log() << Verbose(0) << "\t... successful." << endl;
     1881      Log() << Verbose(0) << "successful." << endl;
    18711882    else
    1872       Log() << Verbose(0) << "\t... failed." << endl;
     1883      Log() << Verbose(0) << "failed." << endl;
    18731884  } else {
    18741885    if (mol->OutputTrajectoriesXYZ(&output))
    1875       Log() << Verbose(0) << "\t... successful." << endl;
     1886      Log() << Verbose(0) << "successful." << endl;
    18761887    else
    1877       Log() << Verbose(0) << "\t... failed." << endl;
     1888      Log() << Verbose(0) << "failed." << endl;
    18781889  }
    18791890  output.close();
     
    18851896  if (output == NULL)
    18861897    strcpy(filename,"main_pcp_linux");
    1887   Log() << Verbose(0) << "Saving as mpqc input .. " << endl;
     1898  Log() << Verbose(0) << "Saving as mpqc input ";
    18881899  if (SaveMPQC(filename, mol))
    1889     Log() << Verbose(0) << "\t... done." << endl;
     1900    Log() << Verbose(0) << "done." << endl;
    18901901  else
    1891     Log() << Verbose(0) << "\t... failed." << endl;
     1902    Log() << Verbose(0) << "failed." << endl;
    18921903
    18931904  if (!strcmp(configpath, GetDefaultPath())) {
     
    19271938  char *dummy1 = NULL;
    19281939  char *dummy = NULL;
    1929   char free_dummy[MAXSTRINGSIZE];    // pointers in the line that is read in per step
     1940  char * const free_dummy = Malloc<char>(256, "config::ParseForParameter: *free_dummy");    // pointers in the line that is read in per step
    19301941  dummy1 = free_dummy;
    19311942
     
    19431954      if (file->eof()) {
    19441955        if ((critical) && (found == 0)) {
     1956          Free(free_dummy);
    19451957          //Error(InitReading, name);
    19461958          fprintf(stderr,"Error:InitReading, critical %s not found\n", name);
     
    19501962          file->clear();
    19511963          file->seekg(file_position, ios::beg);  // rewind to start position
     1964          Free(free_dummy);
    19521965          return 0;
    19531966        }
     
    19801993        dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword)
    19811994        //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name);
     1995        //Free((void **)&free_dummy);
    19821996        //Error(FileOpenParams, NULL);
    19831997      } else {
     
    20002014              if (file->eof()) {
    20012015                if ((critical) && (found == 0)) {
     2016                  Free(free_dummy);
    20022017                  //Error(InitReading, name);
    20032018                  fprintf(stderr,"Error:InitReading, critical %s not found\n", name);
     
    20072022                  file->clear();
    20082023                  file->seekg(file_position, ios::beg);  // rewind to start position
     2024                  Free(free_dummy);
    20092025                  return 0;
    20102026                }
     
    20472063                  if (critical) {
    20482064                    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);
    20492066                    //return 0;
    20502067                    exit(255);
     
    20542071                    file->clear();
    20552072                    file->seekg(file_position, ios::beg);  // rewind to start position
     2073                    Free(free_dummy);
    20562074                    return 0;
    20572075                  }
     
    20662084                  file->seekg(file_position, ios::beg);  // rewind to start position
    20672085                }
     2086                Free(free_dummy);
    20682087                return 0;
    20692088              }
     
    21212140  if ((type >= row_int) && (verbose))
    21222141    fprintf(stderr,"\n");
     2142  Free(free_dummy);
    21232143  if (!sequential) {
    21242144    file->clear();
     
    22012221        dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword)
    22022222        //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name);
     2223        //Free(&free_dummy);
    22032224        //Error(FileOpenParams, NULL);
    22042225      } else {
Note: See TracChangeset for help on using the changeset viewer.