X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/7f5403eed95da4350dcc03d817eb8468dab07142..3db2602cfe30c61445e89cc334541ebb4ff76ed8:/hypercache.cpp?ds=sidebyside diff --git a/hypercache.cpp b/hypercache.cpp index b025ba6..2d38b21 100644 --- a/hypercache.cpp +++ b/hypercache.cpp @@ -71,10 +71,12 @@ string hypercache::fileOfPath(const string& dressedfile) { return dressedfile.substr(dressedfile.find_last_of("\\/")+1); } -bool hypercache::readC() { - bool readret; +int hypercache::readC() { + int readret; - if ( readret = C->readConfig(&parentConfigs) ) + readret = C->readConfig(&parentConfigs); + + if ( readret == -1 ) activeCFile = fileOfPath(C->getInFileName()); else activeCFile = ""; @@ -96,15 +98,17 @@ void hypercache::writeO() { O->writeConfig(); } -bool hypercache::readO() { - bool readret; +int hypercache::readO() { + int readret; + + readret = O->readConfig(); - if ( readret = O->readConfig() ) { + if ( readret == -1 ) { unsigned long *parentconfig = (unsigned long*)O->getHeader("concurrent_cfile"); if ( parentconfig != NULL ) addParentConfig(parentconfig); } - + return readret; }