]> git.wh0rd.org Git - nano.git/commitdiff
Regexp/search fixes by Bill Soudan
authorChris Allegretta <chrisa@asty.org>
Fri, 7 Jul 2000 04:25:00 +0000 (04:25 +0000)
committerChris Allegretta <chrisa@asty.org>
Fri, 7 Jul 2000 04:25:00 +0000 (04:25 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@82 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

po/nano.pot
search.c
utils.c

index be130d8ad4b69bab2b7a1cfa54964c9e245be8aa..4b05bc5f6110b4bd8b00af568833a9e5cc79943b 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-07-06 22:35-0400\n"
+"POT-Creation-Date: 2000-07-07 00:29-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 0773124f1488661143443b237a29d6525f52914e..4756cc7d3f7d2f79f6df167e3377aafd0eadba4d 100644 (file)
--- a/search.c
+++ b/search.c
@@ -405,7 +405,7 @@ int do_replace(void)
 
            do_replace();
            return 0;
-       } else {                /* First page, last page, for example could get here */
+       } else if (i != -2 ) {          /* First page, last page, for example could get here */
 
            do_early_abort();
            replace_abort();
diff --git a/utils.c b/utils.c
index a4fa95420c3292aa3ba2cd6038211a0d660b5d4f..53e9bddb06f423c34a83ed1d0e1a1b063c4c4f11 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -18,6 +18,7 @@
  *                                                                        *
  **************************************************************************/
 
+#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -80,12 +81,14 @@ char *strcasestr(char *haystack, char *needle)
 
 char *strstrwrapper(char *haystack, char *needle)
 {
+#ifdef _POSIX_VERSION
     if (ISSET(USE_REGEXP)) {
       int result=regexec(&search_regexp, haystack, 10, regmatches, 0);
       if (!result)
           return haystack+regmatches[0].rm_so;
       return 0;
     }  
+#endif
     if (ISSET(CASE_SENSITIVE))
        return strstr(haystack, needle);
     else