diff options
| author | Albert Cervin <albert@acervin.com> | 2024-05-22 00:00:29 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-09-12 20:17:56 +0200 |
| commit | 405da5f84b072ea97b69359454899f45d92d24b6 (patch) | |
| tree | 20525b4bc44a5d8cbab4d62abe8413e174731db6 /src/dged/hash.h | |
| parent | 4ab7e453e26afc6e9f4938c65f89463fbba9e267 (diff) | |
| download | dged-405da5f84b072ea97b69359454899f45d92d24b6.tar.gz dged-405da5f84b072ea97b69359454899f45d92d24b6.tar.xz dged-405da5f84b072ea97b69359454899f45d92d24b6.zip | |
WIP LSP client
This contains the start of an LSP client.
Nothing (except starting the LSP server) works
at the moment and the feature is disabled by default.
Diffstat (limited to 'src/dged/hash.h')
| -rw-r--r-- | src/dged/hash.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dged/hash.h b/src/dged/hash.h index 0fd689b..60b6d6a 100644 --- a/src/dged/hash.h +++ b/src/dged/hash.h @@ -1,11 +1,11 @@ +#ifndef _HASH_H +#define _HASH_H + #include <stdint.h> -static uint32_t hash_name(const char *s) { - unsigned long hash = 5381; - int c; +#include "s8.h" - while ((c = *s++)) - hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ +uint32_t hash_name(const char *s); +uint32_t hash_name_s8(struct s8 s); - return hash; -} +#endif |
