From: Chris Allegretta Date: Tue, 2 Oct 2001 03:54:40 +0000 (+0000) Subject: Take out the unneeded case sensitive and reverse stuff from -tiny X-Git-Tag: v1.1.2~19 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e10f389e9c63f7f2aa340dc06583bbe400a2deb1;p=nano.git Take out the unneeded case sensitive and reverse stuff from -tiny git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@813 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 8b42c41e..c81ce09d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ CVS code - - Readded DISABLE_CURPOS because in certain instances (like all the "Search Wrapper" lines) the cursor position will be different yet we don't want the cursor position displayed. + - Take control-space out of -tiny build, unneeded. - cut.c: cut_marked_segment() - Add magic line when cutting a selection including filebot diff --git a/search.c b/search.c index 64cbb327..a10ebbea 100644 --- a/search.c +++ b/search.c @@ -233,7 +233,7 @@ filestruct *findnextstr(int quiet, int bracket_mode, filestruct * begin, int beg { filestruct *fileptr; char *searchstr, *rev_start = NULL, *found = NULL; - int current_x_find; + int current_x_find = 0; fileptr = current; @@ -297,7 +297,9 @@ filestruct *findnextstr(int quiet, int bracket_mode, filestruct * begin, int beg return NULL; } #endif - } else { /* reverse search */ + } +#ifndef NANO_SMALL + else { /* reverse search */ current_x_find = current_x - 1; @@ -359,6 +361,7 @@ filestruct *findnextstr(int quiet, int bracket_mode, filestruct * begin, int beg } #endif } +#endif /* NANO_SMALL */ /* Set globals now that we are sure we found something */ current = fileptr; diff --git a/utils.c b/utils.c index 112e8c45..2c59711b 100644 --- a/utils.c +++ b/utils.c @@ -74,7 +74,6 @@ char *revstrcasestr(char *haystack, char *needle, char *rev_start) } return 0; } -#endif /* NANO_SMALL */ /* This is now mutt's version (called mutt_stristr) because it doesn't use memory allocation to do a simple search (yuck). */ @@ -96,6 +95,7 @@ char *strcasestr(char *haystack, char *needle) } return NULL; } +#endif /* NANO_SMALL */ char *strstrwrapper(char *haystack, char *needle, char *rev_start) { @@ -130,22 +130,22 @@ char *strstrwrapper(char *haystack, char *needle, char *rev_start) return 0; } #endif - if (ISSET(CASE_SENSITIVE)) { #ifndef NANO_SMALL + if (ISSET(CASE_SENSITIVE)) { if (ISSET(REVERSE_SEARCH)) return revstrstr(haystack, needle, rev_start); else -#endif return strstr(haystack,needle); } else { -#ifndef NANO_SMALL if (ISSET(REVERSE_SEARCH)) return revstrcasestr(haystack, needle, rev_start); else #endif return strcasestr(haystack, needle); +#ifndef NANO_SMALL } +#endif } /* Thanks BG, many ppl have been asking for this... */