Ignore:
Timestamp:
Apr 29, 2016, 4:05:57 PM (3 years ago)
Author:
lindanl
Message:

Passing file index instead of file name as internal state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.cpp

    r5001 r5017  
    6969}
    7070
    71 void GrepEngine::doGrep(const std::string & fileName) {
     71void GrepEngine::doGrep(const std::string & fileName, const int fileIdx) {
    7272    const path file(fileName);
    7373    if (exists(file)) {
     
    8989        }
    9090        char * const fileBuffer = file.data();
    91         mGrepFunction(fileBuffer, fileSize, fileName.c_str(), finalLineIsUnterminated(fileBuffer, fileSize));
     91        mGrepFunction(fileBuffer, fileSize, fileIdx, finalLineIsUnterminated(fileBuffer, fileSize));
    9292        file.close();
    9393    }
     
    135135    if(finalLineIsUnterminated(mFileBuffer, mFileSize))
    136136        finalLineUnterminated = 1;   
    137     mGrepFunction(mFileBuffer, mFileSize, mFileName.c_str(), finalLineUnterminated);
     137    mGrepFunction(mFileBuffer, mFileSize, 0, finalLineUnterminated);
    138138
    139139    return getParsedCodePointSet();
Note: See TracChangeset for help on using the changeset viewer.