summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/chat.h b/chat.h
index a2da9bf..1e28bad 100644
--- a/chat.h
+++ b/chat.h
@@ -58,6 +58,18 @@ static inline size_t idFor(const char *name) {
 	return idNext++;
 }
 
+extern uint32_t hashInit;
+static inline enum Color hash(const char *str) {
+	if (*str == '~') str++;
+	uint32_t hash = hashInit;
+	for (; *str; ++str) {
+		hash = (hash << 5) | (hash >> 27);
+		hash ^= *str;
+		hash *= 0x27220A95;
+	}
+	return 2 + hash % 74;
+}
+
 #define ENUM_CAP \
 	X("extended-join", CapExtendedJoin) \
 	X("sasl", CapSASL) \
@@ -195,18 +207,6 @@ int getopt_config(
 	const char *optstring, const struct option *longopts, int *longindex
 );
 
-extern uint32_t hashInit;
-static inline enum Color hash(const char *str) {
-	if (*str == '~') str++;
-	uint32_t hash = hashInit;
-	for (; *str; ++str) {
-		hash = (hash << 5) | (hash >> 27);
-		hash ^= *str;
-		hash *= 0x27220A95;
-	}
-	return 2 + hash % 74;
-}
-
 // Defined in libcrypto if missing from libc:
 void explicit_bzero(void *b, size_t len);
 #ifndef strlcat
20:57:39 -0500'>2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe