| 1716 | } |
| 1717 | |
| 1718 | char * cFileConfigReader::loadFileIntoCache(const char *filename, |
| 1719 | /*FILE *f,*/ int *bufSize) { |
| 1720 | std::string s(filename); |
| 1721 | if (cacheMap_.find(s) == cacheMap_.end()) { |
| 1722 | // not in cache, need to create and load |
| 1723 | cConfigFileBuffer b(1024); |
| 1724 | // load file |
| 1725 | if (!b.loadFile(filename)) |
| 1726 | return NULL; |
| 1727 | cacheMap_[s] = b; |
| 1728 | if (bufSize != NULL) |
| 1729 | *bufSize = cacheMap_[s].getSize(); |
| 1730 | return cacheMap_[s].getPointer(); |
| 1731 | } |
| 1732 | // file was already in cache, use getConfigFileBufferFromCache |
| 1733 | // to retrieve a pointer to the buffer |
| 1734 | return NULL; |
| 1735 | } |
| 1736 | |
| 1737 | char* cFileConfigReader::addAudExtensionIfNeeded(const char * fname) { |
| 1738 | bool addAudExt = false; |
nothing calls this directly
no test coverage detected