* filename_cmp.c: Replace include of ctype.h by include of

safe-ctype.h.
        (filename_cmp): Use TOLOWER instead of tolower for conversions
        that are locale-independent.
        * Makefile.in (filename_cmp.o): Add dependency on safe-ctype.h.
This commit is contained in:
Joel Brobecker
2007-05-03 23:40:11 +00:00
parent 20592a94ff
commit 73bdefcfe0
3 changed files with 13 additions and 4 deletions

View File

@@ -24,8 +24,8 @@
#include <string.h>
#endif
#include <ctype.h>
#include "filenames.h"
#include "safe-ctype.h"
/*
@@ -55,8 +55,8 @@ filename_cmp (const char *s1, const char *s2)
#else
for (;;)
{
int c1 = tolower (*s1);
int c2 = tolower (*s2);
int c1 = TOLOWER (*s1);
int c2 = TOLOWER (*s2);
/* On DOS-based file systems, the '/' and the '\' are equivalent. */
if (c1 == '/')