better progs access error checking and cleanups resulting from it. Fixes

mega2k and nq.
This commit is contained in:
Bill Currie 2001-03-27 03:57:17 +00:00
parent 5e993575a4
commit f6073d756f
15 changed files with 181 additions and 142 deletions

View file

@ -150,15 +150,15 @@ typedef struct
int alpha;
int scale;
int glowsize;
int glowcolor;
int glow_size;
int glow_color;
int colormod;
} sv_fields_t;
extern sv_fields_t sv_fields;
#if 1
#define SVFIELD(e,f,t) ((ED_FindField (&sv_pr_state, #f)->type == ev_##t) ? E_var (e, sv_fields.f, t) : PR_Error (&sv_pr_state, "bad type access %s:%d", __FILE__, __LINE__), E_var (e, sv_fields.f, t))
#define SVFIELD(e,f,t) E_var (e, PR_AccessField (&sv_pr_state, #f, ev_##t, __FILE__, __LINE__), t)
#else
#define SVFIELD(e,f,t) E_var (e, sv_fields.f, t)
#endif