#include <sys/types.h>
#include "../include/db.h"
#include "hash.h"
#include "page.h"
#include "extern.h"
Go to the source code of this file.
◆ HASH4
◆ HASH4_TOREK
◆ HASH4a
#define HASH4a h = (h << 5) - h + *key++; |
◆ HASH4b
#define HASH4b h = (h << 5) + h + *key++; |
◆ __P()
◆ hashfunc()
static u_int32_t hashfunc |
( |
void * |
keyarg, |
|
|
size_t |
len |
|
) |
| const |
|
static |
Definition at line 178 of file hash_func.c.
181{
182 register const u_char *key;
183 register size_t loop;
185
186#define HASH4a h = (h << 5) - h + *key++;
187#define HASH4b h = (h << 5) + h + *key++;
188#define HASH4 HASH4b
189
190 h = 0;
191 key = keyarg;
193 loop = (
len + 8 - 1) >> 3;
194
195 switch (
len & (8 - 1)) {
196 case 0:
197 do {
199
200 case 7:
202
203 case 6:
205
206 case 5:
208
209 case 4:
211
212 case 3:
214
215 case 2:
217
218 case 1:
220 } while (--loop);
221 }
222 }
223 return (h);
224}
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
References HASH4, and len().