diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:58:52 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:58:52 +0800 |
commit | 4404826b6a3baa886cace4a173ff61d72ccc20c2 (patch) | |
tree | 18cbb827f6468f3a28d8e22b3763a7ac11d4b34c /include | |
parent | a83cd092223f8efd9cd6bd8cd3d02134ad26c372 (diff) | |
download | pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar.gz pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar.bz2 pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar.lz pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar.xz pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.tar.zst pttbbs-4404826b6a3baa886cace4a173ff61d72ccc20c2.zip |
support DETECT_CLIENT, hash telnet sequence.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3298 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r-- | include/bbs.h | 1 | ||||
-rw-r--r-- | include/fnv_hash.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/bbs.h b/include/bbs.h index 4931ef99..43352242 100644 --- a/include/bbs.h +++ b/include/bbs.h @@ -53,6 +53,7 @@ typedef time_t time4_t; #include "modes.h" #include "chess.h" #include "proto.h" +#include "fnv_hash.h" #ifdef ASSESS #include "assess.h" diff --git a/include/fnv_hash.h b/include/fnv_hash.h index 9d8851bd..837fd66c 100644 --- a/include/fnv_hash.h +++ b/include/fnv_hash.h @@ -1,3 +1,5 @@ +#ifndef _FNV_HASH_H_ +#define _FNV_HASH_H_ /* * Fowler / Noll / Vo Hash (FNV Hash) * http://www.isthe.com/chongo/tech/comp/fnv/ @@ -105,3 +107,6 @@ fnv1a_64_strcase(const char *str, Fnv64_t hval) } return hval; } + +#define FNV1A_CHAR(c,hval) do { hval^=(unsigned char)c; hval*=FNV_32_PRIME; } while(0) +#endif |