Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    r68f03d r112b09  
    44 *
    55 */
     6
     7#include "Helpers/MemDebug.hpp"
    68
    79#include <stdio.h>
     
    1416#include "element.hpp"
    1517#include "helpers.hpp"
     18#include "info.hpp"
    1619#include "lists.hpp"
    1720#include "log.hpp"
     
    9396    return;
    9497  } else
    95     buffer = Malloc<char*>(NoLines, "ConfigFileBuffer::ConfigFileBuffer: **buffer");
     98    buffer = new char *[NoLines];
    9699
    97100  // scan each line and put into buffer
     
    99102  int i;
    100103  do {
    101     buffer[lines] = Malloc<char>(MAXSTRINGSIZE, "ConfigFileBuffer::ConfigFileBuffer: *buffer[]");
     104    buffer[lines] = new char[MAXSTRINGSIZE];
    102105    file->getline(buffer[lines], MAXSTRINGSIZE-1);
    103106    i = strlen(buffer[lines]);
     
    119122{
    120123  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);
    124127}
    125128
     
    129132void ConfigFileBuffer::InitMapping()
    130133{
    131   LineMapping = Malloc<int>(NoLines, "ConfigFileBuffer::InitMapping: *LineMapping");
     134  LineMapping = new int[NoLines];
    132135  for (int i=0;i<NoLines;i++)
    133136    LineMapping[i] = i;
     
    179182    MaxLevel(5), RiemannTensor(0), LevRFactor(0), RiemannLevel(0), Lev0Factor(2), RTActualUse(0), AddPsis(0), RCut(20.), StructOpt(0), IsAngstroem(1), RelativeCoord(0),
    180183    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];
    187190  strcpy(mainname,"pcp");
    188191  strcpy(defaultpath,"not specified");
     
    199202config::~config()
    200203{
    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);
    208211  for (int j=0;j<MaxThermostats;j++)
    209     Free(&ThermostatNames[j]);
    210   Free(&ThermostatNames);
     212    delete[](ThermostatNames[j]);
     213  delete[](ThermostatNames);
    211214
    212215  if (BG != NULL)
     
    218221void config::InitThermostats()
    219222{
    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];
    222225  for (int j=0;j<MaxThermostats;j++)
    223     ThermostatNames[j] = Malloc<char>(12, "config constructor: ThermostatNames[]");
     226    ThermostatNames[j] = new char[12];
    224227
    225228  strcpy(ThermostatNames[0],"None");
     
    242245void config::ParseThermostats(class ConfigFileBuffer * const fb)
    243246{
    244   char * const thermo = Malloc<char>(12, "IonsInitRead: thermo");
     247  char * const thermo = new char[12];
    245248  const int verbose = 0;
    246249
     
    309312    Thermostat = None;
    310313  }
    311   Free(thermo);
     314  delete[](thermo);
    312315};
    313316
     
    15471550  int AtomNo = -1;
    15481551  int MolNo = 0;
    1549   atom *Walker = NULL;
    15501552  FILE *f = NULL;
    15511553
     
    15601562  fprintf(f, "# Created by MoleCuilder\n");
    15611563
    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;
    15651568    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
    15701572      fprintf(f,
    15711573             "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 */
    15731575             name,         /* atom name */
    1574              (*Runner)->name,      /* residue name */
     1576             (*MolRunner)->name,      /* residue name */
    15751577             'a'+(unsigned char)(AtomNo % 26),           /* letter for chain */
    15761578             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 */
    15821584             "0",            /* segment identifier */
    1583              Walker->type->symbol,    /* element symbol */
     1585             (*iter)->type->symbol,    /* element symbol */
    15841586             "0");           /* charge */
    15851587      AtomNo++;
    15861588    }
    1587     Free(&elementNo);
     1589    delete[](elementNo);
    15881590    MolNo++;
    15891591  }
     
    16011603{
    16021604  int AtomNo = -1;
    1603   atom *Walker = NULL;
    16041605  FILE *f = NULL;
    16051606
    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;
    16071610  char name[MAXSTRINGSIZE];
    16081611  strncpy(name, filename, MAXSTRINGSIZE-1);
     
    16111614  if (f == NULL) {
    16121615    DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl);
    1613     Free(&elementNo);
     1616    delete[](elementNo);
    16141617    return false;
    16151618  }
    16161619  fprintf(f, "# Created by MoleCuilder\n");
    16171620
    1618   Walker = mol->start;
    16191621  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
    16241625    fprintf(f,
    16251626           "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 */
    16271628           name,         /* atom name */
    16281629           mol->name,      /* residue name */
    16291630           'a'+(unsigned char)(AtomNo % 26),           /* letter for chain */
    16301631           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 */
    16361637           "0",            /* segment identifier */
    1637            Walker->type->symbol,    /* element symbol */
     1638           (*iter)->type->symbol,    /* element symbol */
    16381639           "0");           /* charge */
    16391640    AtomNo++;
    16401641  }
    16411642  fclose(f);
    1642   Free(&elementNo);
     1643  delete[](elementNo);
    16431644
    16441645  return true;
     
    16531654bool config::SaveTREMOLO(const char * const filename, const molecule * const mol) const
    16541655{
    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;
    16691668  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();
    16731671    if (MaxNeighbours < count)
    16741672      MaxNeighbours = count;
    16751673  }
    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";
    16831679    *output << mol->name << "\t";
    16841680    *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++)
    16911687      *output << "-\t";
    16921688    *output << endl;
     
    17081704bool config::SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const
    17091705{
    1710   atom *Walker = NULL;
     1706  Info FunctionInfo(__func__);
    17111707  ofstream *output = NULL;
    17121708  stringstream * const fname = new stringstream;
     
    17231719  int MaxNeighbours = 0;
    17241720  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();
    17291723      if (MaxNeighbours < count)
    17301724        MaxNeighbours = count;
    17311725    }
    17321726  }
    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;
    17341728
    17351729  // create global to local id map
    1736   int **LocalNotoGlobalNoMap = Calloc<int *>(MolList->ListOfMolecules.size(), "config::SaveTREMOLO - **LocalNotoGlobalNoMap");
     1730  map<int, int> LocalNotoGlobalNoMap;
    17371731  {
    1738     int MolCounter = 0;
    1739     int AtomNo = 0;
     1732    unsigned int MolCounter = 0;
     1733    int AtomNo = 1;
    17401734    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      }
    17451738      MolCounter++;
    17461739    }
     1740    ASSERT(MolCounter == MolList->ListOfMolecules.size(), "SaveTREMOLO: LocalNotoGlobalNoMap[] has not been correctly initialized for each molecule");
    17471741  }
    17481742
     
    17521746    int AtomNo = 0;
    17531747    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";
    17591751        *output << (*MolWalker)->name << "\t";
    17601752        *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++)
    17671759          *output << "-\t";
    17681760        *output << endl;
     
    17781770  delete(output);
    17791771  delete(fname);
    1780   for(size_t i=0;i<MolList->ListOfMolecules.size(); i++)
    1781     Free(&LocalNotoGlobalNoMap[i]);
    1782   Free(&LocalNotoGlobalNoMap);
    17831772
    17841773  return true;
     
    18081797  if (output == NULL)
    18091798    strcpy(filename,"main_pcp_linux");
    1810   Log() << Verbose(0) << "Saving as pdb input ";
     1799  Log() << Verbose(0) << "Saving as pdb input ... " << endl;
    18111800  if (SavePDB(filename, molecules))
    1812     Log() << Verbose(0) << "done." << endl;
     1801    Log() << Verbose(0) << "\t... done." << endl;
    18131802  else
    1814     Log() << Verbose(0) << "failed." << endl;
     1803    Log() << Verbose(0) << "\t... failed." << endl;
    18151804
    18161805  // then save as tremolo data file
     
    18191808  if (output == NULL)
    18201809    strcpy(filename,"main_pcp_linux");
    1821   Log() << Verbose(0) << "Saving as tremolo data input ";
     1810  Log() << Verbose(0) << "Saving as tremolo data input ... " << endl;
    18221811  if (SaveTREMOLO(filename, molecules))
    1823     Log() << Verbose(0) << "done." << endl;
     1812    Log() << Verbose(0) << "\t... done." << endl;
    18241813  else
    1825     Log() << Verbose(0) << "failed." << endl;
     1814    Log() << Verbose(0) << "\t... failed." << endl;
    18261815
    18271816  // translate each to its center and merge all molecules in MoleculeListClass into this molecule
     
    18591848  output.close();
    18601849  output.clear();
    1861   Log() << Verbose(0) << "Saving of config file ";
     1850  Log() << Verbose(0) << "Saving of config file ... " << endl;
    18621851  if (Save(filename, periode, mol))
    1863     Log() << Verbose(0) << "successful." << endl;
     1852    Log() << Verbose(0) << "\t... successful." << endl;
    18641853  else
    1865     Log() << Verbose(0) << "failed." << endl;
     1854    Log() << Verbose(0) << "\t... failed." << endl;
    18661855
    18671856  // and save to xyz file
     
    18761865    output.open(filename, ios::trunc);
    18771866  }
    1878   Log() << Verbose(0) << "Saving of XYZ file ";
     1867  Log() << Verbose(0) << "Saving of XYZ file ... " << endl;
    18791868  if (mol->MDSteps <= 1) {
    18801869    if (mol->OutputXYZ(&output))
    1881       Log() << Verbose(0) << "successful." << endl;
     1870      Log() << Verbose(0) << "\t... successful." << endl;
    18821871    else
    1883       Log() << Verbose(0) << "failed." << endl;
     1872      Log() << Verbose(0) << "\t... failed." << endl;
    18841873  } else {
    18851874    if (mol->OutputTrajectoriesXYZ(&output))
    1886       Log() << Verbose(0) << "successful." << endl;
     1875      Log() << Verbose(0) << "\t... successful." << endl;
    18871876    else
    1888       Log() << Verbose(0) << "failed." << endl;
     1877      Log() << Verbose(0) << "\t... failed." << endl;
    18891878  }
    18901879  output.close();
     
    18961885  if (output == NULL)
    18971886    strcpy(filename,"main_pcp_linux");
    1898   Log() << Verbose(0) << "Saving as mpqc input ";
     1887  Log() << Verbose(0) << "Saving as mpqc input .. " << endl;
    18991888  if (SaveMPQC(filename, mol))
    1900     Log() << Verbose(0) << "done." << endl;
     1889    Log() << Verbose(0) << "\t... done." << endl;
    19011890  else
    1902     Log() << Verbose(0) << "failed." << endl;
     1891    Log() << Verbose(0) << "\t... failed." << endl;
    19031892
    19041893  if (!strcmp(configpath, GetDefaultPath())) {
     
    19381927  char *dummy1 = NULL;
    19391928  char *dummy = NULL;
    1940   char * const free_dummy = Malloc<char>(256, "config::ParseForParameter: *free_dummy");    // pointers in the line that is read in per step
     1929  char free_dummy[MAXSTRINGSIZE];    // pointers in the line that is read in per step
    19411930  dummy1 = free_dummy;
    19421931
     
    19541943      if (file->eof()) {
    19551944        if ((critical) && (found == 0)) {
    1956           Free(free_dummy);
    19571945          //Error(InitReading, name);
    19581946          fprintf(stderr,"Error:InitReading, critical %s not found\n", name);
     
    19621950          file->clear();
    19631951          file->seekg(file_position, ios::beg);  // rewind to start position
    1964           Free(free_dummy);
    19651952          return 0;
    19661953        }
     
    19931980        dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword)
    19941981        //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name);
    1995         //Free((void **)&free_dummy);
    19961982        //Error(FileOpenParams, NULL);
    19971983      } else {
     
    20142000              if (file->eof()) {
    20152001                if ((critical) && (found == 0)) {
    2016                   Free(free_dummy);
    20172002                  //Error(InitReading, name);
    20182003                  fprintf(stderr,"Error:InitReading, critical %s not found\n", name);
     
    20222007                  file->clear();
    20232008                  file->seekg(file_position, ios::beg);  // rewind to start position
    2024                   Free(free_dummy);
    20252009                  return 0;
    20262010                }
     
    20632047                  if (critical) {
    20642048                    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);
    20662049                    //return 0;
    20672050                    exit(255);
     
    20712054                    file->clear();
    20722055                    file->seekg(file_position, ios::beg);  // rewind to start position
    2073                     Free(free_dummy);
    20742056                    return 0;
    20752057                  }
     
    20842066                  file->seekg(file_position, ios::beg);  // rewind to start position
    20852067                }
    2086                 Free(free_dummy);
    20872068                return 0;
    20882069              }
     
    21402121  if ((type >= row_int) && (verbose))
    21412122    fprintf(stderr,"\n");
    2142   Free(free_dummy);
    21432123  if (!sequential) {
    21442124    file->clear();
     
    22212201        dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword)
    22222202        //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name);
    2223         //Free(&free_dummy);
    22242203        //Error(FileOpenParams, NULL);
    22252204      } else {
Note: See TracChangeset for help on using the changeset viewer.