cosmetic and formatting fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-01-22 20:49:14 +00:00
parent 17b8a36d17
commit 3ee4cf3027
3 changed files with 8 additions and 8 deletions

View File

@ -635,7 +635,7 @@ const char *mbstrcasestr(const char *haystack, const char *needle)
break;
}
haystack += parse_mbchar(haystack, NULL, NULL, NULL);
haystack += move_mbright(haystack, 0);
}
free(r_mb);
@ -654,7 +654,7 @@ const char *mbstrcasestr(const char *haystack, const char *needle)
#ifndef NANO_SMALL
/* This function is equivalent to strstr(), except in that it scans the
* string in reverse. */
* string in reverse, starting at rev_start. */
const char *revstrstr(const char *haystack, const char *needle, const
char *rev_start)
{
@ -663,7 +663,7 @@ const char *revstrstr(const char *haystack, const char *needle, const
for (; rev_start >= haystack; rev_start--) {
const char *r, *q;
for (r = rev_start, q = needle; *q == *r && *q != '\0'; r++, q++)
for (r = rev_start, q = needle; *r == *q && *q != '\0'; r++, q++)
;
if (*q == '\0')
@ -674,7 +674,7 @@ const char *revstrstr(const char *haystack, const char *needle, const
}
/* This function is equivalent to strcasestr(), except in that it scans
* the string in reverse. */
* the string in reverse, starting at rev_start. */
const char *revstrcasestr(const char *haystack, const char *needle,
const char *rev_start)
{
@ -683,7 +683,7 @@ const char *revstrcasestr(const char *haystack, const char *needle,
for (; rev_start >= haystack; rev_start--) {
const char *r = rev_start, *q = needle;
for (; tolower(*q) == tolower(*r) && *q != '\0'; r++, q++)
for (; tolower(*r) == tolower(*q) && *q != '\0'; r++, q++)
;
if (*q == '\0')

View File

@ -197,8 +197,8 @@ const char *mbstrcasestr(const char *haystack, const char *needle);
#ifndef NANO_SMALL
const char *revstrstr(const char *haystack, const char *needle, const
char *rev_start);
const char *revstrcasestr(const char *haystack, const char *needle, const
char *rev_start);
const char *revstrcasestr(const char *haystack, const char *needle,
const char *rev_start);
#endif
#ifndef HAVE_STRNLEN
size_t nstrnlen(const char *s, size_t maxlen);

View File

@ -222,7 +222,7 @@ const char *strstrwrapper(const char *haystack, const char *needle,
} else
#endif /* !NANO_SMALL */
if (regexec(&search_regexp, start, 10, regmatches,
start > haystack ? REG_NOTBOL : 0) == 0) {
(start > haystack) ? REG_NOTBOL : 0) == 0) {
const char *retval = start + regmatches[0].rm_so;
regexec(&search_regexp, retval, 10, regmatches, 0);