X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=grep.cpp;h=0a3cd8d236bb7ebd8c96c7953fc5ad6d2ebff339;hp=eaf1663e7cf1098b42aabd4b9dc454b5f09f61e6;hb=7735d609f5ecc2ae924d82c1395f028df9cfabd9;hpb=df1a66180655104af15f9bb6067b4eaa1421f5ff diff --git a/grep.cpp b/grep.cpp index eaf1663..0a3cd8d 100644 --- a/grep.cpp +++ b/grep.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "regex.h" +#include using namespace std; using namespace Msp; @@ -14,7 +14,7 @@ int main(int argc, char **argv) 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,7 +22,7 @@ int main(int argc, char **argv) return 1; } - Regex regex(argv[1]); + Regex regex(args[0]); if(debug) cout<