chars.c), is_cntrl_char() (moved to chars.c), nstricmp()
(renamed nstrcasecmp() and moved to chars.c), nstrnicmp()
(renamed nstrncasecmp() and moved to chars.c), nstristr()
- (renamed nstrcasestr() and moved to chars.c), revstrstr()
- (moved to chars.c), revstristr() (renamed revstrcasestr() and
- moved to chars.c), nstrnlen() (moved to chars.c),
- parse_char() (renamed parse_mbchar() and moved to chars.c),
- move_left() (renamed move_mbleft() and moved to chars.c),
- move_right() (renamed move_mbright() and moved to chars.c),
- do_home(), do_verbatim_input(), do_delete(), do_tab(),
- do_next_word(), do_prev_word(), do_input(), do_output(),
- get_buffer(), unget_input(), unget_kbinput(), get_input(),
- parse_kbinput(), unparse_kbinput(), parse_verbatim_kbinput(),
+ (renamed nstrcasestr() and moved to chars.c), revstristr()
+ (renamed revstrcasestr() and moved to chars.c), nstrnlen()
+ (moved to chars.c), parse_char() (renamed parse_mbchar() and
+ moved to chars.c), move_left() (renamed move_mbleft() and
+ moved to chars.c), move_right() (renamed move_mbright() and
+ moved to chars.c), do_home(), do_verbatim_input(),
+ do_delete(), do_tab(), do_next_word(), do_prev_word(),
+ do_input(), do_output(), get_buffer(), unget_input(),
+ unget_kbinput(), get_input(), parse_kbinput(),
+ unparse_kbinput(), parse_verbatim_kbinput(),
do_statusbar_input(), do_statusbar_home(),
do_statusbar_verbatim_kbinput(), do_statusbar_output(), and
display_string(); removal of buffer_to_keys() and
}
#endif
-/* None of this is needed if we're using NANO_SMALL! */
#ifndef NANO_SMALL
-const char *revstrstr(const char *haystack, const char *needle, const
- char *rev_start)
-{
- assert(haystack != NULL && needle != NULL && rev_start != NULL);
-
- for (; rev_start >= haystack; rev_start--) {
- const char *r, *q;
-
- for (r = rev_start, q = needle; *q == *r && *q != '\0'; r++, q++)
- ;
-
- if (*q == '\0')
- return rev_start;
- }
-
- return NULL;
-}
-
const char *revstrcasestr(const char *haystack, const char *needle,
const char *rev_start)
{
return NULL;
}
-#endif /* !NANO_SMALL */
+#endif
#ifndef HAVE_STRNLEN
/* This function is equivalent to strnlen(). */
}
}
-#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
+#ifndef NANO_SMALL
+const char *revstrstr(const char *haystack, const char *needle, const
+ char *rev_start)
+{
+ assert(haystack != NULL && needle != NULL && rev_start != NULL);
+
+ for (; rev_start >= haystack; rev_start--) {
+ const char *r, *q;
+
+ for (r = rev_start, q = needle; *q == *r && *q != '\0'; r++, q++)
+ ;
+
+ if (*q == '\0')
+ return rev_start;
+ }
+
+ return NULL;
+}
+
+#ifdef ENABLE_NANORC
#ifndef HAVE_GETLINE
/* This function is equivalent to getline(). It was adapted from
* GNU mailutils' getline() function. */
return (c == EOF && (indx - 1) == 0) ? -1 : indx - 1;
}
#endif
-#endif /* !NANO_SMALL && ENABLE_NANORC */
+#endif /* ENABLE_NANORC */
+#endif /* !NANO_SMALL */
/* If we are searching backwards, we will find the last match that
* starts no later than start. Otherwise we find the first match