diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 05:10:59 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 05:10:59 +0000 |
commit | 997f13ec4791adcda91cd4db41cdb5962b73d47d (patch) | |
tree | 8207c21db09f988e58684d70629d2405dc844eda /src/old/hashfunctioncasestring.cpp | |
parent | c884da672645231b5ec47706c886381dab1b391a (diff) | |
download | libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.gz libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.bz2 libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.xz libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.zip |
Just deleted a few things from old that definately have to go.
Diffstat (limited to '')
-rw-r--r-- | src/old/hashfunctioncasestring.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/old/hashfunctioncasestring.cpp b/src/old/hashfunctioncasestring.cpp deleted file mode 100644 index 6361f45..0000000 --- a/src/old/hashfunctioncasestring.cpp +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #include <stdlib.h> | ||
2 | #include <string.h> | ||
3 | #include <ctype.h> | ||
4 | #include "hashfunctioncasestring.h" | ||
5 | |||
6 | HashFunctionCaseString::HashFunctionCaseString() | ||
7 | { | ||
8 | } | ||
9 | |||
10 | HashFunctionCaseString::~HashFunctionCaseString() | ||
11 | { | ||
12 | } | ||
13 | |||
14 | unsigned long int HashFunctionCaseString::hash( const void *id ) | ||
15 | { | ||
16 | const char *str = (const char *)id; | ||
17 | unsigned long int nPos = 0; | ||
18 | for( int j = 0; str[j] != '\0'; j++ ) | ||
19 | { | ||
20 | nPos = tolower(str[j]) + (nPos << 6) + (nPos << 16) - nPos; | ||
21 | // nPos += nPos<<16|(((unsigned long int)tolower(str[j]))<<((j*7)%24)); | ||
22 | } | ||
23 | return nPos; | ||
24 | } | ||
25 | |||
26 | bool HashFunctionCaseString::cmpIDs( const void *id1, const void *id2 ) | ||
27 | { | ||
28 | const char *str1 = (const char *)id1; | ||
29 | const char *str2 = (const char *)id2; | ||
30 | |||
31 | int j; | ||
32 | for( j = 0; str1[j] != '\0' && str2[j] != '\0'; j++ ) | ||
33 | { | ||
34 | if( tolower(str1[j]) != tolower(str2[j]) ) | ||
35 | return false; | ||
36 | } | ||
37 | return (str1[j]==str2[j]); | ||
38 | } | ||
39 | |||