Bash 2022 day 12 (parts 1 & 2), before cleaning code

This commit is contained in:
2022-12-22 21:33:29 +01:00
parent 11cb3c5c64
commit 6d4a8dd85b
10 changed files with 601 additions and 0 deletions

View File

@@ -24,6 +24,16 @@
#define _pjw_inline static inline
#endif
/**
* unsigned int pjwhash - PJW hash function
* @key: the key address.
* @length: the length of key.
*
* This hash was created by Peter Jay Weinberger (AT&T Bell Labs):
* https://en.wikipedia.org/wiki/PJW_hash_function
*
* Return: the PJW hash.
*/
_pjw_inline unsigned int pjwhash(const void* key, uint length)
{
uint hash = 0, high;