Ignore:
Timestamp:
Apr 11, 2018, 10:27:58 AM (18 months ago)
Author:
cameron
Message:

Restructuring in preparation for command-line file include/exclude GLOBs

File:
1 edited

Legend:

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

    r5945 r5964  
    2424#include <re/re_toolchain.h>
    2525#include <pablo/pablo_toolchain.h>
     26#include <boost/filesystem.hpp>
    2627#include <util/file_select.h>
    2728#include <sys/stat.h>
     
    105106}
    106107
     108namespace fs = boost::filesystem;
    107109
    108110int main(int argc, char *argv[]) {
     
    112114    auto REs = readExpressions();
    113115
    114     std::vector<std::string> allFiles = argv::getFullFileList(inputFiles);
    115     if (allFiles.empty()) {
    116         allFiles = { "-" };
     116    std::vector<fs::path> allFiles = argv::getFullFileList(inputFiles);
     117    if (inputFiles.empty()) {
     118        argv::UseStdIn = true;
    117119    }
    118120    else if ((allFiles.size() > 1) && !argv::NoFilenameFlag) {
     
    153155    }
    154156    grepEngine->setStdinLabel(argv::LabelFlag);
     157    if (argv::UseStdIn) grepEngine->setGrepStdIn();
    155158    if (argv::NoMessagesFlag) grepEngine->suppressFileMessages();
    156159    if (argv::MmapFlag) grepEngine->setPreferMMap();
Note: See TracChangeset for help on using the changeset viewer.