]> git.lyx.org Git - lyx.git/blobdiff - src/support/LRegex.C
use more explicit on constructors use the pimpl idom to reduce size with about 500k
[lyx.git] / src / support / LRegex.C
index 6f7af728ac64cbe5c0aa77f50bb797992e61c22b..1babf22127d05f10c34ca5c56d3c190345f04a5d 100644 (file)
@@ -5,13 +5,21 @@
 #include <config.h>
 
 #include <sys/types.h>
+
+#ifdef HAVE_REGEX_H
 #include <regex.h>
+#else
+#include "lyxregex.h"
+#endif
+
 #include "LRegex.h"
 
+using std::make_pair;
+
 ///
 struct LRegex::Impl {
        ///
-       re_pattern_buffer * preg;
+       regex_t * preg;
        
        ///
        int error_code;
@@ -21,7 +29,7 @@ struct LRegex::Impl {
        
        ///
        Impl(string const & regex) 
-               : preg(new re_pattern_buffer), error_code(0)
+               : preg(new regex_t), error_code(0)
        {
                error_code = regcomp(preg, regex.c_str(), REG_EXTENDED);
        }