X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=grep.cpp;h=68ecf874f46b919306c703f5e6fc07c2af4b5249;hp=eaf1663e7cf1098b42aabd4b9dc454b5f09f61e6;hb=refs%2Fheads%2Fstrings-master;hpb=df1a66180655104af15f9bb6067b4eaa1421f5ff diff --git a/grep.cpp b/grep.cpp index eaf1663..68ecf87 100644 --- a/grep.cpp +++ b/grep.cpp @@ -2,19 +2,19 @@ #include #include #include -#include "regex.h" +#include using namespace std; using namespace Msp; int main(int argc, char **argv) { - bool debug=false; + bool debug = false; GetOpt getopt; getopt.add_option('d', "debug", debug, GetOpt::NO_ARG); getopt(argc, argv); - const list &args=getopt.get_args(); + const vector &args = getopt.get_args(); if(args.empty()) { @@ -22,13 +22,13 @@ int main(int argc, char **argv) return 1; } - Regex regex(argv[1]); + Regex regex(args[0]); if(debug) cout<