mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* path.cc (hash_path_name): Replace hash algorithm with SDBM.
This commit is contained in:
parent
a9a5b2eab0
commit
6eee18ea6e
@ -1,4 +1,8 @@
|
||||
2004-04-07 Corinna Vinschen <corinna@vinschen.de>
|
||||
2004-04-08 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (hash_path_name): Replace hash algorithm with SDBM.
|
||||
|
||||
2004-04-08 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.cc (fhandler_base::open): Set query access mode according
|
||||
to query_open setting.
|
||||
|
@ -3262,7 +3262,7 @@ hash_path_name (__ino64_t hash, const char *name)
|
||||
hash = cygheap->cwd.get_hash ();
|
||||
if (name[0] == '.' && name[1] == '\0')
|
||||
return hash;
|
||||
hash = (hash << 5) - hash + '\\';
|
||||
hash = '\\' + (hash << 6) + (hash << 16) - hash;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3272,7 +3272,7 @@ hashit:
|
||||
do
|
||||
{
|
||||
int ch = cyg_tolower (*name);
|
||||
hash = (hash << 5) - hash + ch;
|
||||
hash = ch + (hash << 6) + (hash << 16) - hash;
|
||||
}
|
||||
while (*++name != '\0' &&
|
||||
!(*name == '\\' && (!name[1] || (name[1] == '.' && !name[2]))));
|
||||
|
Loading…
x
Reference in New Issue
Block a user