* dir.cc (readdir): Use strcasematch for consistency.

* path.cc (symlink_info): Eliminate known_suffix.
(path_conv::check): Always copy ext_here to end of buffer, if found.
(suffix_scan): Eliminate ext_here, add suffixes_start.
(suffix_scan::has): Eliminate an argument.  Reorganize.  Always return pointer
to end of input path.
(suffix_scan::next): Take a second pass through the suffix list looking for
.lnk.
(symlink_info::check): Eliminate known_suffix usage.
This commit is contained in:
Christopher Faylor
2001-03-17 07:09:41 +00:00
parent 92f4bf9725
commit b63a3f55a7
3 changed files with 66 additions and 49 deletions

View File

@ -181,7 +181,7 @@ readdir (DIR * dir)
{
char *c = dir->__d_dirent->d_name;
int len = strlen (c);
if (!strcasecmp (c + len - 4, ".lnk"))
if (strcasematch (c + len - 4, ".lnk"))
{
char fbuf[MAX_PATH + 1];
strcpy (fbuf, dir->__d_dirname);