mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
(str_8bit_casecmp, str_8bit_ncasecmp): reduce variable scope.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
43a398d76f
commit
771f6911a0
@ -677,13 +677,14 @@ str_8bit_casecmp (const char *s1, const char *s2)
|
|||||||
|
|
||||||
return strcasecmp (s1, s2);
|
return strcasecmp (s1, s2);
|
||||||
#else
|
#else
|
||||||
gint c1, c2;
|
|
||||||
|
|
||||||
g_return_val_if_fail (s1 != NULL, 0);
|
g_return_val_if_fail (s1 != NULL, 0);
|
||||||
g_return_val_if_fail (s2 != NULL, 0);
|
g_return_val_if_fail (s2 != NULL, 0);
|
||||||
|
|
||||||
while (*s1 != '\0' && *s2 != '\0')
|
while (*s1 != '\0' && *s2 != '\0')
|
||||||
{
|
{
|
||||||
|
gint c1, c2;
|
||||||
|
|
||||||
/* According to A. Cox, some platforms have islower's that
|
/* According to A. Cox, some platforms have islower's that
|
||||||
* don't work right on non-uppercase
|
* don't work right on non-uppercase
|
||||||
*/
|
*/
|
||||||
@ -716,10 +717,11 @@ str_8bit_ncasecmp (const char *s1, const char *s2)
|
|||||||
#ifdef HAVE_STRNCASECMP
|
#ifdef HAVE_STRNCASECMP
|
||||||
return strncasecmp (s1, s2, n);
|
return strncasecmp (s1, s2, n);
|
||||||
#else
|
#else
|
||||||
gint c1, c2;
|
|
||||||
|
|
||||||
while (n != 0 && *s1 != '\0' && *s2 != '\0')
|
while (n != 0 && *s1 != '\0' && *s2 != '\0')
|
||||||
{
|
{
|
||||||
|
gint c1, c2;
|
||||||
|
|
||||||
n -= 1;
|
n -= 1;
|
||||||
/* According to A. Cox, some platforms have islower's that
|
/* According to A. Cox, some platforms have islower's that
|
||||||
* don't work right on non-uppercase
|
* don't work right on non-uppercase
|
||||||
|
Loading…
Reference in New Issue
Block a user