diff --git a/include/QF/pr_comp.h b/include/QF/pr_comp.h index 32e4450ea..89f10bd85 100644 --- a/include/QF/pr_comp.h +++ b/include/QF/pr_comp.h @@ -45,7 +45,7 @@ typedef enum { } etype_t; extern int pr_type_size[ev_type_count]; -extern const char *type_name[ev_type_count]; +extern const char *pr_type_name[ev_type_count]; #define OFS_NULL 0 #define OFS_RETURN 1 diff --git a/libs/gamecode/engine/pr_edict.c b/libs/gamecode/engine/pr_edict.c index 953e3d6e1..3fc67acba 100644 --- a/libs/gamecode/engine/pr_edict.c +++ b/libs/gamecode/engine/pr_edict.c @@ -73,7 +73,7 @@ int pr_type_size[ev_type_count] = { 1, // variable }; -const char *type_name[ev_type_count] = { +const char *pr_type_name[ev_type_count] = { "void", "string", "float", @@ -1398,6 +1398,7 @@ PR_AccessField (progs_t *pr, const char *name, etype_t type, PR_Error (pr, "undefined field %s accessed at %s:%d", name, file, line); if (def->type != type) PR_Error (pr, "bad type access to %s as %s (should be %s) at %s:%d", - name, type_name[type], type_name[def->type], file, line); + name, pr_type_name[type], pr_type_name[def->type], + file, line); return def->ofs; } diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index a78728e8e..260dbbf1f 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -275,7 +275,7 @@ type_mismatch (expr_t *e1, expr_t *e2, int op) t2 = extract_type (e2); return error (e1, "type mismatch: %s %s %s", - type_name[t1], get_op_string (op), type_name[t2]); + pr_type_name[t1], get_op_string (op), pr_type_name[t2]); } void @@ -510,7 +510,7 @@ print_expr (expr_t *e) } else { printf ("<>"); } - printf (":%s:%d)@", type_name[e->e.temp.type->type], + printf (":%s:%d)@", pr_type_name[e->e.temp.type->type], e->e.temp.users); break; case ex_nil: @@ -535,7 +535,7 @@ print_expr (expr_t *e) printf (" %g'", e->e.quaternion_val[3]); break; case ex_pointer: - printf ("(%s)[%d]", type_name[e->e.pointer.type->type], + printf ("(%s)[%d]", pr_type_name[e->e.pointer.type->type], e->e.pointer.val); break; case ex_entity: @@ -1714,7 +1714,7 @@ assign_expr (expr_t *e1, expr_t *e2) type = t1; //print_expr (e1); printf(" %d\n", e1->line); //print_expr (e2); printf("\n"); -//printf ("%s %s\n", type_name[t1->type], type_name[t2->type]); +//printf ("%s %s\n", pr_type_name[t1->type], pr_type_name[t2->type]); if (is_indirect (e1) && is_indirect (e2)) { expr_t *temp = new_temp_def_expr (t1); diff --git a/tools/qfcc/source/pr_def.c b/tools/qfcc/source/pr_def.c index c93a0f020..e5b51d60f 100644 --- a/tools/qfcc/source/pr_def.c +++ b/tools/qfcc/source/pr_def.c @@ -300,7 +300,7 @@ PR_FreeTempDefs (void) if (d->users < 0) printf ("%s:%d: warning: %s %3d %3d\n", strings + d->file, - d->line, type_name[d->type->type], d->ofs, d->users); + d->line, pr_type_name[d->type->type], d->ofs, d->users); size = pr_type_size[d->type->type]; if (d->expr) d->expr->e.temp.def = 0; @@ -328,7 +328,7 @@ PR_ResetTempDefs (void) for (d = temp_scope.next; d; d = d->next) printf ("%s:%d: warning: %s %3d %3d\n", strings + d->file, d->line, - type_name[d->type->type], d->ofs, d->users); + pr_type_name[d->type->type], d->ofs, d->users); temp_scope.next = 0; } diff --git a/tools/qfdefs/source/fix_globals.c b/tools/qfdefs/source/fix_globals.c index 2d80cf89b..32b7be407 100644 --- a/tools/qfdefs/source/fix_globals.c +++ b/tools/qfdefs/source/fix_globals.c @@ -82,8 +82,8 @@ fix_missing_globals (progs_t *pr, def_t *globals) fprintf (stderr, "global def %s at %d has mismatched type (%s, %s)\n", def->name, def->offset, - type_name[def->type & ~DEF_SAVEGLOBAL], - type_name[d->type & ~DEF_SAVEGLOBAL]); + pr_type_name[def->type & ~DEF_SAVEGLOBAL], + pr_type_name[d->type & ~DEF_SAVEGLOBAL]); exit (1); } if (strcmp (def->name, PR_GetString (pr, d->s_name)) == 0) diff --git a/tools/qwaq/main.c b/tools/qwaq/main.c index 125436495..d8c997e5a 100644 --- a/tools/qwaq/main.c +++ b/tools/qwaq/main.c @@ -122,14 +122,14 @@ main () for (i = 0; i < progs.progs->numglobaldefs; i++) { ddef_t *def = &progs.pr_globaldefs[i]; - printf ("%s %d %d %s\n", type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); + printf ("%s %d %d %s\n", pr_type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); } printf ("\n"); #if 0 for (i = 0; i < progs.progs->numfielddefs; i++) { ddef_t *def = &progs.pr_fielddefs[i]; - printf ("%s %d %d %s\n", type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); + printf ("%s %d %d %s\n", pr_type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); } printf ("\n"); #endif