mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 00:20:59 +00:00
Ludwig's 1st diff: Some 64bit fixes for x86_64. Also fixes Makefile build.
This commit is contained in:
parent
59cce31e75
commit
f46ede91fb
23 changed files with 150 additions and 84 deletions
|
@ -132,16 +132,16 @@ qboolean UI_OutOfMemory() {
|
|||
return a hash value for the string
|
||||
================
|
||||
*/
|
||||
static long hashForString(const char *str) {
|
||||
static unsigned hashForString(const char *str) {
|
||||
int i;
|
||||
long hash;
|
||||
unsigned hash;
|
||||
char letter;
|
||||
|
||||
hash = 0;
|
||||
i = 0;
|
||||
while (str[i] != '\0') {
|
||||
letter = tolower(str[i]);
|
||||
hash+=(long)(letter)*(i+119);
|
||||
hash+=(unsigned)(letter)*(i+119);
|
||||
i++;
|
||||
}
|
||||
hash &= (HASH_TABLE_SIZE-1);
|
||||
|
@ -162,7 +162,7 @@ static stringDef_t *strHandle[HASH_TABLE_SIZE];
|
|||
|
||||
const char *String_Alloc(const char *p) {
|
||||
int len;
|
||||
long hash;
|
||||
unsigned hash;
|
||||
stringDef_t *str, *last;
|
||||
static const char *staticNULL = "";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue