From 405da5f84b072ea97b69359454899f45d92d24b6 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 22 May 2024 00:00:29 +0200 Subject: 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. --- src/dged/hash.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/dged/hash.h') 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 -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 -- cgit v1.2.3