|
|
|
|
@ -82,6 +82,15 @@ const char* utilBaseName(const char* path_str);
|
|
|
|
|
// NOTE: returns true if the first 'sz' characters from each string match
|
|
|
|
|
bool utilMatchPrefix(const char* lhs, const char* rhs, int sz); |
|
|
|
|
|
|
|
|
|
//-----------------
|
|
|
|
|
// Hashing
|
|
|
|
|
|
|
|
|
|
// NOTE: FNV1a hashing algorithm http://www.isthe.com/chongo/tech/comp/fnv/
|
|
|
|
|
#define FNV1_64_INIT ((uint64_t) 0xcbf29ce484222325ULL) |
|
|
|
|
#define FNV_64_PRIME ((uint64_t) 0x100000001b3ULL) |
|
|
|
|
uint64_t |
|
|
|
|
utilFNV64a_str(char *str, uint64_t hval = FNV1_64_INIT); |
|
|
|
|
|
|
|
|
|
//-----------------
|
|
|
|
|
// Memory allocation
|
|
|
|
|
|
|
|
|
|
|