Regexp/search fixes by Bill Soudan
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@82 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
a408edd486
commit
f6b13420d7
|
@ -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"
|
||||
|
|
2
search.c
2
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();
|
||||
|
|
3
utils.c
3
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
|
||||
|
|
Loading…
Reference in New Issue