Regexp/search fixes by Bill Soudan

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@82 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2000-07-07 04:25:00 +00:00
parent a408edd486
commit f6b13420d7
3 changed files with 5 additions and 2 deletions

View 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"

View File

@ -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();

View File

@ -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