#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
#include <richedit.h>
#include "NanoMud.h"
Include dependency graph for nanomud-hash.c:

Go to the source code of this file.
Functions | |
| unsigned long int | get_hash (unsigned char *str) |
| void | init_hash (int hashes) |
Variables | |
| HASH ** | hash_table |
| BOOL | inited = FALSE |
| HASH * | mainhash |
| unsigned long int | nhash |
|
|
Definition at line 54 of file nanomud-hash.c. References LOG(). Referenced by ParseLines(), and WindowProcedure(). 00055 {
00056
00057 return;
00058 char temp[100000];
00059 char temp1[100000];
00060
00061 strcat(temp1, str);
00062 unsigned long int hash = 1;
00063 unsigned long int c;
00064 while (c = *str++) hash = ((((hash / 2) << 5) + (hash/2)) + c) / 2;
00065 sprintf(temp, "Hash: %-20u %20.20s", hash ,temp1);
00066 temp1[0] = '\0';
00067 LOG(temp);
00068
00069
00070
00071 return hash;
00072
00073 }
|
Here is the call graph for this function:

|
|
Definition at line 36 of file nanomud-hash.c. References give_term_debug(), HASH, hash_table, inited, mainhash, malloc, and nhash. 00037 {
00038 if (inited == TRUE)
00039 return;
00040 char temp[1000];
00041 HASH **hash_table_1;
00042
00043 hash_table_1 = malloc(hashes*sizeof(HASH));
00044 mainhash = malloc(sizeof(HASH));
00045 nhash = hashes;
00046
00047 hash_table = hash_table_1;
00048 sprintf(temp, "[%d] hash table entries created successfully.", hashes);
00049 give_term_debug(temp);
00050
00051 }
|
Here is the call graph for this function:

|
|
Definition at line 32 of file nanomud-hash.c. Referenced by init_hash(). |
|
|
Definition at line 34 of file nanomud-hash.c. Referenced by init_hash(). |
|
|
Definition at line 31 of file nanomud-hash.c. Referenced by init_hash(). |
|
|
Definition at line 33 of file nanomud-hash.c. Referenced by init_hash(). |
1.3.9.1