]> git.tdb.fi Git - libs/core.git/blobdiff - grep.cpp
Move files around to prepare for assimilation into core
[libs/core.git] / grep.cpp
index 07743072be997253e83356cd5704ea414be7c282..68ecf874f46b919306c703f5e6fc07c2af4b5249 100644 (file)
--- a/grep.cpp
+++ b/grep.cpp
@@ -2,19 +2,19 @@
 #include <iostream>
 #include <string>
 #include <msp/core/getopt.h>
 #include <iostream>
 #include <string>
 #include <msp/core/getopt.h>
-#include "regex.h"
+#include <msp/strings/regex.h>
 
 using namespace std;
 using namespace Msp;
 
 int main(int argc, char **argv)
 {
 
 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);
 
        GetOpt getopt;
        getopt.add_option('d', "debug", debug, GetOpt::NO_ARG);
        getopt(argc, argv);
 
-       const vector<string> &args=getopt.get_args();
+       const vector<string> &args = getopt.get_args();
 
        if(args.empty())
        {
 
        if(args.empty())
        {
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
        string line;
        while(getline(cin, line))
        {
        string line;
        while(getline(cin, line))
        {
-               if(RegMatch match=regex.match(line))
+               if(RegMatch match = regex.match(line))
                        cout<<line<<'\n';
        }
 
                        cout<<line<<'\n';
        }