rename some get_key functions so they're all uniqely named (matters only for

profiling purposes thanks to static:)
This commit is contained in:
Bill Currie 2001-11-05 03:21:42 +00:00
parent f91abcb3d5
commit 9f4a565523
4 changed files with 9 additions and 9 deletions

View file

@ -203,7 +203,7 @@ opcode_t pr_opcodes[] = {
static const char * static const char *
get_key (void *_op, void *unused) opcode_get_key (void *_op, void *unused)
{ {
static char rep[4]; static char rep[4];
char *r = rep; char *r = rep;
@ -223,7 +223,7 @@ PR_Opcode (short opcode)
opcode_t op; opcode_t op;
op.opcode = opcode; op.opcode = opcode;
strcpy (rep, get_key (&op, 0)); strcpy (rep, opcode_get_key (&op, 0));
return Hash_Find (opcode_table, rep); return Hash_Find (opcode_table, rep);
} }
@ -232,7 +232,7 @@ PR_Opcode_Init (void)
{ {
opcode_t *op; opcode_t *op;
opcode_table = Hash_NewTable (1021, get_key, 0, 0); opcode_table = Hash_NewTable (1021, opcode_get_key, 0, 0);
for (op = pr_opcodes; op->name; op++) { for (op = pr_opcodes; op->name; op++) {
Hash_Add (opcode_table, op); Hash_Add (opcode_table, op);

View file

@ -185,7 +185,7 @@ Info_Print (info_t *info)
} }
static const char * static const char *
get_key (void *k, void *unused) info_get_key (void *k, void *unused)
{ {
return ((info_key_t *)k)->key; return ((info_key_t *)k)->key;
} }
@ -207,7 +207,7 @@ Info_ParseString (const char *s, int maxsize)
char *key, *value, *end; char *key, *value, *end;
info = malloc (sizeof (info_t)); info = malloc (sizeof (info_t));
info->tab = Hash_NewTable (61, get_key, free_key, 0); info->tab = Hash_NewTable (61, info_get_key, free_key, 0);
info->maxsize = maxsize; info->maxsize = maxsize;
info->cursize = 0; info->cursize = 0;

View file

@ -66,7 +66,7 @@ cvar_t *fs_pluginpath;
hashtab_t *registered_plugins; hashtab_t *registered_plugins;
static const char * static const char *
get_key (void *pl, void *unused) plugin_get_key (void *pl, void *unused)
{ {
return ((plugin_list_t *)pl)->name; return ((plugin_list_t *)pl)->name;
} }
@ -88,7 +88,7 @@ void
PI_Init (void) PI_Init (void)
{ {
PI_InitCvars (); PI_InitCvars ();
registered_plugins = Hash_NewTable (253, get_key, 0, 0); registered_plugins = Hash_NewTable (253, plugin_get_key, 0, 0);
} }
void void

View file

@ -213,7 +213,7 @@ old_keyname_t old_keynames[] = {
hashtab_t *old_key_table; hashtab_t *old_key_table;
static const char * static const char *
get_key (void *_ok, void *unused) ok_get_key (void *_ok, void *unused)
{ {
old_keyname_t *ok = (old_keyname_t *)_ok; old_keyname_t *ok = (old_keyname_t *)_ok;
return ok->old_name; return ok->old_name;
@ -224,7 +224,7 @@ OK_Init (void)
{ {
old_keyname_t *ok; old_keyname_t *ok;
old_key_table = Hash_NewTable (1021, get_key, 0, 0); old_key_table = Hash_NewTable (1021, ok_get_key, 0, 0);
for (ok = old_keynames; ok->old_name; ok++) for (ok = old_keynames; ok->old_name; ok++)
Hash_Add (old_key_table, ok); Hash_Add (old_key_table, ok);
} }