mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
finally get around to renaming type_name to pr_type_name
This commit is contained in:
parent
cc34e5954f
commit
f9149a0d6c
6 changed files with 14 additions and 13 deletions
|
@ -45,7 +45,7 @@ typedef enum {
|
||||||
} etype_t;
|
} etype_t;
|
||||||
|
|
||||||
extern int pr_type_size[ev_type_count];
|
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_NULL 0
|
||||||
#define OFS_RETURN 1
|
#define OFS_RETURN 1
|
||||||
|
|
|
@ -73,7 +73,7 @@ int pr_type_size[ev_type_count] = {
|
||||||
1, // variable
|
1, // variable
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *type_name[ev_type_count] = {
|
const char *pr_type_name[ev_type_count] = {
|
||||||
"void",
|
"void",
|
||||||
"string",
|
"string",
|
||||||
"float",
|
"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);
|
PR_Error (pr, "undefined field %s accessed at %s:%d", name, file, line);
|
||||||
if (def->type != type)
|
if (def->type != type)
|
||||||
PR_Error (pr, "bad type access to %s as %s (should be %s) at %s:%d",
|
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;
|
return def->ofs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,7 @@ type_mismatch (expr_t *e1, expr_t *e2, int op)
|
||||||
t2 = extract_type (e2);
|
t2 = extract_type (e2);
|
||||||
|
|
||||||
return error (e1, "type mismatch: %s %s %s",
|
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
|
void
|
||||||
|
@ -510,7 +510,7 @@ print_expr (expr_t *e)
|
||||||
} else {
|
} else {
|
||||||
printf ("<>");
|
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);
|
e->e.temp.users);
|
||||||
break;
|
break;
|
||||||
case ex_nil:
|
case ex_nil:
|
||||||
|
@ -535,7 +535,7 @@ print_expr (expr_t *e)
|
||||||
printf (" %g'", e->e.quaternion_val[3]);
|
printf (" %g'", e->e.quaternion_val[3]);
|
||||||
break;
|
break;
|
||||||
case ex_pointer:
|
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);
|
e->e.pointer.val);
|
||||||
break;
|
break;
|
||||||
case ex_entity:
|
case ex_entity:
|
||||||
|
@ -1714,7 +1714,7 @@ assign_expr (expr_t *e1, expr_t *e2)
|
||||||
type = t1;
|
type = t1;
|
||||||
//print_expr (e1); printf(" %d\n", e1->line);
|
//print_expr (e1); printf(" %d\n", e1->line);
|
||||||
//print_expr (e2); printf("\n");
|
//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)) {
|
if (is_indirect (e1) && is_indirect (e2)) {
|
||||||
expr_t *temp = new_temp_def_expr (t1);
|
expr_t *temp = new_temp_def_expr (t1);
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,7 @@ PR_FreeTempDefs (void)
|
||||||
|
|
||||||
if (d->users < 0)
|
if (d->users < 0)
|
||||||
printf ("%s:%d: warning: %s %3d %3d\n", strings + d->file,
|
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];
|
size = pr_type_size[d->type->type];
|
||||||
if (d->expr)
|
if (d->expr)
|
||||||
d->expr->e.temp.def = 0;
|
d->expr->e.temp.def = 0;
|
||||||
|
@ -328,7 +328,7 @@ PR_ResetTempDefs (void)
|
||||||
|
|
||||||
for (d = temp_scope.next; d; d = d->next)
|
for (d = temp_scope.next; d; d = d->next)
|
||||||
printf ("%s:%d: warning: %s %3d %3d\n", strings + d->file, d->line,
|
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;
|
temp_scope.next = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,8 @@ fix_missing_globals (progs_t *pr, def_t *globals)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"global def %s at %d has mismatched type (%s, %s)\n",
|
"global def %s at %d has mismatched type (%s, %s)\n",
|
||||||
def->name, def->offset,
|
def->name, def->offset,
|
||||||
type_name[def->type & ~DEF_SAVEGLOBAL],
|
pr_type_name[def->type & ~DEF_SAVEGLOBAL],
|
||||||
type_name[d->type & ~DEF_SAVEGLOBAL]);
|
pr_type_name[d->type & ~DEF_SAVEGLOBAL]);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
if (strcmp (def->name, PR_GetString (pr, d->s_name)) == 0)
|
if (strcmp (def->name, PR_GetString (pr, d->s_name)) == 0)
|
||||||
|
|
|
@ -122,14 +122,14 @@ main ()
|
||||||
for (i = 0; i < progs.progs->numglobaldefs; i++) {
|
for (i = 0; i < progs.progs->numglobaldefs; i++) {
|
||||||
ddef_t *def = &progs.pr_globaldefs[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");
|
printf ("\n");
|
||||||
#if 0
|
#if 0
|
||||||
for (i = 0; i < progs.progs->numfielddefs; i++) {
|
for (i = 0; i < progs.progs->numfielddefs; i++) {
|
||||||
ddef_t *def = &progs.pr_fielddefs[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");
|
printf ("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue