#include #include #include "JSystem/JGlob.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * Example program for JGlob. */ int main(int argc, char **argv) { using namespace std; using namespace JPP; string pattern; int debug; try { JParser<> zap("Example program for JGlob."); zap['p'] = make_field(pattern) = "*"; zap['d'] = make_field(debug) = 1; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } DEBUG("pattern <" << pattern << ">." << endl); try { JGlob g1(pattern); for (const auto& i : g1) { cout << i << endl; } } catch(const exception& error) { FATAL(error.what() << endl); } }