Index: nano/src/rcfile.c IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- nano/src/rcfile.c (revision 5734) +++ nano/src/rcfile.c (revision ) @@ -830,7 +830,7 @@ return; /* If the regex string is malformed, skip it. */ - if (!nregcomp(regexstring, REG_EXTENDED | REG_NOSUB)) + if (!nregcomp(regexstring, NANO_REG_EXTENDED | REG_NOSUB)) continue; /* Copy the regex into a struct, and hook this in at the end. */ @@ -1009,9 +1009,9 @@ ; #endif else if (strcasecmp(keyword, "color") == 0) - parse_colors(ptr, REG_EXTENDED); + parse_colors(ptr, NANO_REG_EXTENDED); else if (strcasecmp(keyword, "icolor") == 0) - parse_colors(ptr, REG_EXTENDED | REG_ICASE); + parse_colors(ptr, NANO_REG_EXTENDED | REG_ICASE); else if (strcasecmp(keyword, "linter") == 0) pick_up_name("linter", ptr, &live_syntax->linter); else if (strcasecmp(keyword, "formatter") == 0) Index: nano/src/search.c IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- nano/src/search.c (revision 5734) +++ nano/src/search.c (revision ) @@ -48,7 +48,7 @@ assert(!regexp_compiled); - rc = regcomp(&search_regexp, fixbounds(regexp), REG_EXTENDED + rc = regcomp(&search_regexp, fixbounds(regexp), NANO_REG_EXTENDED #ifndef NANO_TINY | (ISSET(CASE_SENSITIVE) ? 0 : REG_ICASE) #endif Index: nano/src/nano.c IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- nano/src/nano.c (revision 5734) +++ nano/src/nano.c (revision ) @@ -2423,7 +2423,7 @@ #endif ); #ifdef HAVE_REGEX_H - quoterc = regcomp("ereg, quotestr, REG_EXTENDED); + quoterc = regcomp("ereg, quotestr, NANO_REG_EXTENDED); if (quoterc == 0) { /* We no longer need quotestr, just quotereg. */ Index: nano/configure.ac IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- nano/configure.ac (revision 5734) +++ nano/configure.ac (revision ) @@ -572,6 +572,25 @@ fi fi +AC_MSG_CHECKING([for REG_ENHANCED flag support]) +nano_reg_extended="REG_EXTENDED" +AC_TRY_RUN([ +#include +int main(void) +{ +#ifdef REG_ENHANCED + return 0; +#else + return 1; +#endif +}], + AC_MSG_RESULT(yes) + nano_reg_extended="REG_EXTENDED | REG_ENHANCED", + AC_MSG_RESULT(no), + AC_MSG_WARN([*** Can't check for REG_ENHANCED flag support when cross-compiling]) +) +AC_DEFINE_UNQUOTED(NANO_REG_EXTENDED, $nano_reg_extended, [Flag for full range of extended regular expressions]) + if test x$color_support = xyes; then # Now check for the end-of-word boundary support (/< and />). AC_MSG_CHECKING([for GNU-style word boundary regex support]) @@ -601,7 +620,7 @@ size_t nmatch; regmatch_t pmatch; - if (regcomp(&r, "\\\\>", REG_EXTENDED|REG_NOSUB)) + if (regcomp(&r, "\\\\>", $nano_reg_extended|REG_NOSUB)) return 1; if (regexec(&r, "word boundary", nmatch, &pmatch, 0)) return 1; @@ -639,8 +658,8 @@ AC_MSG_WARN([*** Couldn't successfully compile basic color test with or without _XOPEN_SOURCE_EXTENDED]) AC_MSG_WARN([*** This build may not compile. Consider configuring with --disable-color or installing ncurses])), AC_MSG_WARN([*** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling])) - fi -#fi +# fi +fi AC_MSG_CHECKING([whether LINES and COLS can be redefined]) AC_TRY_RUN([ Index: nano/src/color.c IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- nano/src/color.c (revision 5734) +++ nano/src/color.c (revision ) @@ -147,7 +147,7 @@ regex_t rgx; for (item = head; item != NULL; item = item->next) { - regcomp(&rgx, fixbounds(item->full_regex), REG_EXTENDED); + regcomp(&rgx, fixbounds(item->full_regex), NANO_REG_EXTENDED); if (regexec(&rgx, shibboleth, 0, NULL, 0) == 0) { regfree(&rgx);