summaryrefslogtreecommitdiff
blob: 35f3dcf100ae700d1f7f8db2a2bbbd2826ee36bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
--- qcc_pr_comp.c
+++ qcc_pr_comp.c
@@ -7322,7 +7322,7 @@
 	QCC_def_t		*def, *d;
 	QCC_function_t	*f;
 	QCC_dfunction_t	*df;
-	int			i;
+	int			i = 0;
 	pbool shared=false;
 	pbool externfnc=false;
 	pbool isconstant = false;
@@ -8541,8 +8545,6 @@
 	struct qcc_includechunk_s *oldcurrentchunk;
 	extern struct qcc_includechunk_s *currentchunk;
 
-	extern char qccmsourcedir[];
-
 	ocompilingfile = compilingfile;
 	os_file = s_file;
 	os_file2 = s_file2;
--- hash.h
+++ hash.h
@@ -19,12 +19,12 @@
 int Hash_Key(char *name, int modulus);
 void *Hash_Get(hashtable_t *table, char *name);
 void *Hash_GetInsensative(hashtable_t *table, char *name);
-void *Hash_GetKey(hashtable_t *table, int key);
+void *Hash_GetKey(hashtable_t *table, long key);
 void *Hash_GetNext(hashtable_t *table, char *name, void *old);
 void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old);
 void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck);
 void *Hash_AddInsensative(hashtable_t *table, char *name, void *data, bucket_t *buck);
 void Hash_Remove(hashtable_t *table, char *name);
 void Hash_RemoveData(hashtable_t *table, char *name, void *data);
-void Hash_RemoveKey(hashtable_t *table, int key);
-void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck);
+void Hash_RemoveKey(hashtable_t *table, long key);
+void *Hash_AddKey(hashtable_t *table, long key, void *data, bucket_t *buck);
--- hash.c
+++ hash.c
@@ -68,7 +68,7 @@
 	}
 	return NULL;
 }
-void *Hash_GetKey(hashtable_t *table, int key)
+void *Hash_GetKey(hashtable_t *table, long key)
 {
 	int bucknum = key%table->numbuckets;
 	bucket_t *buck;
@@ -77,7 +77,7 @@
 
 	while(buck)
 	{
-		if ((int)buck->keystring == key)
+		if ((long)buck->keystring == key)
 			return buck->data;
 
 		buck = buck->next;
@@ -168,7 +168,7 @@
 
 	return buck;
 }
-void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck)
+void *Hash_AddKey(hashtable_t *table, long key, void *data, bucket_t *buck)
 {
 	int bucknum = key%table->numbuckets;
 
@@ -237,14 +237,14 @@
 }
 
 
-void Hash_RemoveKey(hashtable_t *table, int key)
+void Hash_RemoveKey(hashtable_t *table, long key)
 {
 	int bucknum = key%table->numbuckets;
 	bucket_t *buck;	
 
 	buck = table->bucket[bucknum];
 
-	if ((int)buck->keystring == key)
+	if ((long)buck->keystring == key)
 	{
 		table->bucket[bucknum] = buck->next;
 		return;
@@ -253,7 +253,7 @@
 
 	while(buck->next)
 	{
-		if ((int)buck->next->keystring == key)
+		if ((long)buck->next->keystring == key)
 		{
 			buck->next = buck->next->next;
 			return;