diff options
-rw-r--r-- | cmd2.c | 7 | ||||
-rw-r--r-- | feature/regex.h | 11 | ||||
-rw-r--r-- | list.c | 7 | ||||
-rw-r--r-- | main.c | 20 |
4 files changed, 22 insertions, 23 deletions
@@ -26,17 +26,12 @@ #include <unistd.h> #include <errno.h> -#ifdef USE_PCREPOSIX -# include <pcreposix.h> -#elif defined(USE_REGEXP) -# include <regex.h> -#endif - int strcasecmp(); int select(); #include "defines.h" #include "main.h" +#include "feature/regex.h" #include "utils.h" #include "beam.h" #include "edit.h" diff --git a/feature/regex.h b/feature/regex.h new file mode 100644 index 0000000..d630b99 --- /dev/null +++ b/feature/regex.h @@ -0,0 +1,11 @@ +#ifndef _FEATURE_REGEX_H_ +#define _FEATURE_REGEX_H_ + +#ifdef USE_REGEXP_PCREPOSIX +# include <pcreposix.h> +#elif defined(USE_REGEXP) +# include <sys/types.h> +# include <regex.h> +#endif + +#endif /* _FEATURE_REGEX_H_ */ @@ -18,14 +18,9 @@ #include <sys/types.h> #include <sys/time.h> -#ifdef USE_PCREPOSIX -# include <pcreposix.h> -#elif defined(USE_REGEXP) -# include <regex.h> -#endif - #include "defines.h" #include "main.h" +#include "feature/regex.h" #include "utils.h" #include "cmd2.h" #include "tty.h" @@ -75,14 +75,9 @@ extern int errno; extern int select(); -#ifdef USE_PCREPOSIX -# include <pcreposix.h> -#elif defined(USE_REGEXP) -# include <regex.h> -#endif - #include "defines.h" #include "main.h" +#include "feature/regex.h" #include "utils.h" #include "beam.h" #include "cmd.h" @@ -435,12 +430,15 @@ void printver(void) " termios," #endif #ifdef USE_REGEXP - " regexp," + " regexp " + #ifdef USE_REGEXP_PCREPOSIX + "(pcreposix)" + #else + "(libc)" + #endif + "," #else - " no regexp," -#endif -#ifdef USE_PCREPOSIX - " pcreposix," + " no regexp," #endif #ifdef USE_LOCALE " locale," |