]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
TR1: check in cmake for GCC version, fallback in checktr1.h for other build systems...
[lyx.git] / src / support / filetools.cpp
index 94a9f78c953a6bcf1550ea81ff5e64167df3e25b..b0b9d169a08153fa020c16dc9345b31d7df8cca1 100644 (file)
 #include <QDir>
 
 #include "support/lassert.h"
-#include <boost/regex.hpp>
+#include "support/regex.h"
 
 #include <fcntl.h>
-#include <io.h>
 
 #include <cerrno>
 #include <cstdlib>
@@ -50,6 +49,7 @@
 #include <sstream>
 
 #if defined (_WIN32)
+#include <io.h>
 #include <windows.h>
 #endif
 
@@ -537,9 +537,9 @@ string const replaceEnvironmentPath(string const & path)
        // $\{[A-Za-z_][A-Za-z_0-9]*\}
        static string const envvar = "[$]([A-Za-z_][A-Za-z_0-9]*)";
 
-       static boost::regex envvar_br_re("(.*)" + envvar_br + "(.*)");
-       static boost::regex envvar_re("(.*)" + envvar + "(.*)");
-       boost::smatch what;
+        static regex envvar_br_re("(.*)" + envvar_br + "(.*)");
+        static regex envvar_re("(.*)" + envvar + "(.*)");
+        smatch what;
        string result;
        string remaining = path;
        while (1) {
@@ -921,13 +921,13 @@ string const readBB_from_PSFile(FileName const & file)
                return string();
        }
 
-       static boost::regex bbox_re(
+       static lyx::regex bbox_re(
                "^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)");
        ifstream is(file_.toFilesystemEncoding().c_str());
        while (is) {
                string s;
                getline(is,s);
-               boost::smatch what;
+               lyx::smatch what;
                if (regex_match(s, what, bbox_re)) {
                        // Our callers expect the tokens in the string
                        // separated by single spaces.