Ignore:
Timestamp:
Aug 18, 2008, 8:35:11 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
e6971b
Parents:
d24e8f0
Message:

Splitting MatrrixContainer::ParseMatrix in ParseMatrix

ParseMatrix just parses only a given matrix into a given part of the MatrixContainer::matrix array).
ParseFragmentMatrix calls ParseMatrix for a sequence of numbered files containing the matrices.
ForceMatrix::ParseFragmentMatrix overrides the routine from MatrixContainer in order to handle the parsing of the last and one ma
trix in a special way
EnergyMatrix::ParseFragmentMatrix overrides the routine from MatrixContainer in order to handle the parsing of the last and one matrix in a special way
Realloc() was fixed: ReAlloc would break if given oldptr is NULL, but now we simply switch to doing a malloc instead and only admonishing the wrong call to ReAlloc instead of Malloc
analyser.cpp and joiner.cpp have been adapted to these new calling schemes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/helpers.cpp

    rd24e8f0 r7b67a3  
    7373  void *buffer = NULL;
    7474  if (OldPointer == NULL)
    75         cout << Verbose(0) << "ReAlloc impossible - old is NULL: " << output << endl;
    76   buffer = (void *)realloc(OldPointer, size); // alloc
     75        //cout << Verbose(0) << "ReAlloc impossible - old is NULL: " << output << endl;
     76    buffer = (void *)malloc(size); // malloc
     77  else
     78    buffer = (void *)realloc(OldPointer, size); // realloc
    7779  if (buffer == NULL)
    7880    cout << Verbose(0) << "ReAlloc failed - new is NULL: " << output << endl;
Note: See TracChangeset for help on using the changeset viewer.