mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-25 13:51:36 +00:00
[gamecode] Clean up string_t and pointer_t
They are both gone, and pr_pointer_t is now pr_ptr_t (pointer may be a little clearer than ptr, but ptr is consistent with things like intptr, and keeps the type name short).
This commit is contained in:
parent
9348f7b89c
commit
2df64384c1
50 changed files with 338 additions and 340 deletions
|
@ -265,7 +265,7 @@ int PR_RunPostLoadFuncs (progs_t *pr);
|
|||
*/
|
||||
int PR_Check_Opcodes (progs_t *pr);
|
||||
|
||||
void PR_BoundsCheckSize (progs_t *pr, pointer_t addr, unsigned size);
|
||||
void PR_BoundsCheckSize (progs_t *pr, pr_ptr_t addr, unsigned size);
|
||||
void PR_BoundsCheck (progs_t *pr, int addr, etype_t type);
|
||||
|
||||
///@}
|
||||
|
@ -336,10 +336,10 @@ void ED_EntityParseFunction (progs_t *pr);
|
|||
*/
|
||||
///@{
|
||||
|
||||
pr_def_t *PR_SearchDefs (pr_def_t *defs, unsigned num_defs, pointer_t offset)
|
||||
pr_def_t *PR_SearchDefs (pr_def_t *defs, unsigned num_defs, pr_ptr_t offset)
|
||||
__attribute__((pure));
|
||||
pr_def_t *PR_FieldAtOfs (progs_t *pr, pointer_t ofs) __attribute__((pure));
|
||||
pr_def_t *PR_GlobalAtOfs (progs_t *pr, pointer_t ofs) __attribute__((pure));
|
||||
pr_def_t *PR_FieldAtOfs (progs_t *pr, pr_ptr_t ofs) __attribute__((pure));
|
||||
pr_def_t *PR_GlobalAtOfs (progs_t *pr, pr_ptr_t ofs) __attribute__((pure));
|
||||
|
||||
pr_def_t *PR_FindField (progs_t *pr, const char *name);
|
||||
pr_def_t *PR_FindGlobal (progs_t *pr, const char *name);
|
||||
|
@ -470,7 +470,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c string
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\param o offset into global data space
|
||||
\return string_t lvalue
|
||||
\return pr_string_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -494,7 +494,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c void *
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\param o offset into global data space
|
||||
\return pointer_t lvalue
|
||||
\return pr_ptr_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -686,7 +686,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c string
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\param n parameter number (0-7)
|
||||
\return string_t lvalue
|
||||
\return pr_string_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -710,7 +710,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c void *
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\param n parameter number (0-7)
|
||||
\return pointer_t lvalue
|
||||
\return pr_ptr_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -891,12 +891,12 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
*/
|
||||
#define R_QUAT(p) (&R_var (p, quat))
|
||||
|
||||
/** Access the VM function return value as a ::string_t (a VM string reference).
|
||||
/** Access the VM function return value as a ::pr_string_t (a VM string reference).
|
||||
|
||||
\par QC type:
|
||||
\c string
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\return ::string_t lvalue
|
||||
\return ::pr_string_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -913,12 +913,12 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
*/
|
||||
#define R_FUNCTION(p) R_var (p, func)
|
||||
|
||||
/** Access the VM function return value as a ::pointer_t (a VM "pointer")
|
||||
/** Access the VM function return value as a ::pr_ptr_t (a VM "pointer")
|
||||
|
||||
\par QC type:
|
||||
\c void *
|
||||
\param p pointer to ::progs_t VM struct
|
||||
\return ::pointer_t lvalue
|
||||
\return ::pr_ptr_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -1091,7 +1091,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c string
|
||||
\param e pointer to the entity
|
||||
\param o field offset into entity data space
|
||||
\return string_t lvalue
|
||||
\return pr_string_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -1115,7 +1115,7 @@ void PR_Undefined (progs_t *pr, const char *type, const char *name) __attribute_
|
|||
\c void *
|
||||
\param e pointer to the entity
|
||||
\param o field offset into entity data space
|
||||
\return pointer_t lvalue
|
||||
\return pr_ptr_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
@ -1282,28 +1282,28 @@ int PR_LoadStrings (progs_t *pr);
|
|||
\param num string index to be validated
|
||||
\return true if the index is valid, false otherwise
|
||||
*/
|
||||
qboolean PR_StringValid (progs_t *pr, string_t num) __attribute__((pure));
|
||||
qboolean PR_StringValid (progs_t *pr, pr_string_t num) __attribute__((pure));
|
||||
|
||||
/** Check if a string is valid and mutable.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param num string index to be checked
|
||||
\return true if the string is valid and mutable, false otherwise
|
||||
*/
|
||||
qboolean PR_StringMutable (progs_t *pr, string_t num) __attribute__((pure));
|
||||
qboolean PR_StringMutable (progs_t *pr, pr_string_t num) __attribute__((pure));
|
||||
|
||||
/** Convert a string index to a C string.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param num string index to be converted
|
||||
\return C pointer to the string.
|
||||
*/
|
||||
const char *PR_GetString(progs_t *pr, string_t num) __attribute__((pure));
|
||||
const char *PR_GetString(progs_t *pr, pr_string_t num) __attribute__((pure));
|
||||
|
||||
/** Retrieve the dstring_t associated with a mutable string.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param num string index of the mutable string
|
||||
\return the dstring implementing the mutable string
|
||||
*/
|
||||
struct dstring_s *PR_GetMutableString(progs_t *pr, string_t num) __attribute__((pure));
|
||||
struct dstring_s *PR_GetMutableString(progs_t *pr, pr_string_t num) __attribute__((pure));
|
||||
|
||||
/** Make a permanent progs string from the given C string. Will not create a
|
||||
duplicate permanent string (temporary and mutable strings are not checked).
|
||||
|
@ -1311,7 +1311,7 @@ struct dstring_s *PR_GetMutableString(progs_t *pr, string_t num) __attribute__((
|
|||
\param s C string to be made into a permanent progs string
|
||||
\return string index of the progs string
|
||||
*/
|
||||
string_t PR_SetString(progs_t *pr, const char *s);
|
||||
pr_string_t PR_SetString(progs_t *pr, const char *s);
|
||||
|
||||
/** Get the progs string if it exists.
|
||||
Only static strings are searched.
|
||||
|
@ -1320,7 +1320,7 @@ string_t PR_SetString(progs_t *pr, const char *s);
|
|||
\return string index of the progs string if it exists, otherwise
|
||||
0 (ambiguous with "").
|
||||
*/
|
||||
string_t PR_FindString(progs_t *pr, const char *s);
|
||||
pr_string_t PR_FindString(progs_t *pr, const char *s);
|
||||
|
||||
/** Make a temporary progs string that will survive across function returns.
|
||||
Will not duplicate a permanent string. If a new progs string is created,
|
||||
|
@ -1330,7 +1330,7 @@ string_t PR_FindString(progs_t *pr, const char *s);
|
|||
\param s C string to be returned to the progs code
|
||||
\return string index of the progs string
|
||||
*/
|
||||
string_t PR_SetReturnString(progs_t *pr, const char *s);
|
||||
pr_string_t PR_SetReturnString(progs_t *pr, const char *s);
|
||||
|
||||
/** Make a temporary progs string that will be freed when the current progs
|
||||
stack frame is exited. Will not duplicate a permantent string.
|
||||
|
@ -1338,7 +1338,7 @@ string_t PR_SetReturnString(progs_t *pr, const char *s);
|
|||
\param s C string
|
||||
\return string index of the progs string
|
||||
*/
|
||||
string_t PR_SetTempString(progs_t *pr, const char *s);
|
||||
pr_string_t PR_SetTempString(progs_t *pr, const char *s);
|
||||
|
||||
/** Make a temporary memory block that will be freed when the current progs
|
||||
stack frame is exited. The contents may be anything and a new block is
|
||||
|
@ -1350,7 +1350,7 @@ string_t PR_SetTempString(progs_t *pr, const char *s);
|
|||
\param size size of block in bytes
|
||||
\return string index of the block
|
||||
*/
|
||||
string_t PR_AllocTempBlock (progs_t *pr, size_t size);
|
||||
pr_string_t PR_AllocTempBlock (progs_t *pr, size_t size);
|
||||
|
||||
/** Push a temporary string to the callee stack frame
|
||||
|
||||
|
@ -1361,7 +1361,7 @@ string_t PR_AllocTempBlock (progs_t *pr, size_t size);
|
|||
\param pr pointer to ::progs_t VM struct
|
||||
\param num string index of the temp string
|
||||
*/
|
||||
void PR_PushTempString (progs_t *pr, string_t num);
|
||||
void PR_PushTempString (progs_t *pr, pr_string_t num);
|
||||
|
||||
/** Make a temporary progs string that is the concatenation of two C strings.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
|
@ -1370,19 +1370,19 @@ void PR_PushTempString (progs_t *pr, string_t num);
|
|||
\return string index of the progs string that represents the
|
||||
concatenation of strings a and b
|
||||
*/
|
||||
string_t PR_CatStrings (progs_t *pr, const char *a, const char *b);
|
||||
pr_string_t PR_CatStrings (progs_t *pr, const char *a, const char *b);
|
||||
|
||||
/** Convert a mutable string to a temporary string.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param str string index of the mutable string to be converted
|
||||
*/
|
||||
void PR_MakeTempString(progs_t *pr, string_t str);
|
||||
void PR_MakeTempString(progs_t *pr, pr_string_t str);
|
||||
|
||||
/** Create a new mutable string.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\return string index of the newly created mutable string
|
||||
*/
|
||||
string_t PR_NewMutableString (progs_t *pr);
|
||||
pr_string_t PR_NewMutableString (progs_t *pr);
|
||||
|
||||
/** Make a dynamic progs string from the given C string. Will not create a
|
||||
duplicate permanent string (temporary, dynamic and mutable strings are
|
||||
|
@ -1391,7 +1391,7 @@ string_t PR_NewMutableString (progs_t *pr);
|
|||
\param s C string to be made into a permanent progs string
|
||||
\return string index of the progs string
|
||||
*/
|
||||
string_t PR_SetDynamicString (progs_t *pr, const char *s);
|
||||
pr_string_t PR_SetDynamicString (progs_t *pr, const char *s);
|
||||
|
||||
/** Convert an ephemeral string to a dynamic string.
|
||||
|
||||
|
@ -1403,13 +1403,13 @@ string_t PR_SetDynamicString (progs_t *pr, const char *s);
|
|||
\param str The string to be "held" (made non-ephemeral). Safe to call
|
||||
on any valid string, but affects only ephemeral strings.
|
||||
*/
|
||||
void PR_HoldString (progs_t *pr, string_t str);
|
||||
void PR_HoldString (progs_t *pr, pr_string_t str);
|
||||
|
||||
/** Destroy a mutable, dynamic or temporary string.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param str string index of the string to be destroyed
|
||||
*/
|
||||
void PR_FreeString (progs_t *pr, string_t str);
|
||||
void PR_FreeString (progs_t *pr, pr_string_t str);
|
||||
|
||||
/** Free all the temporary strings allocated in the current stack frame.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
|
@ -1765,7 +1765,7 @@ pr_uint_t PR_FindSourceLineAddr (progs_t *pr, const char *file, pr_uint_t line)
|
|||
const char *PR_Get_Source_File (progs_t *pr, pr_lineno_t *lineno) __attribute__((pure));
|
||||
const char *PR_Get_Source_Line (progs_t *pr, pr_uint_t addr);
|
||||
pr_def_t *PR_Get_Param_Def (progs_t *pr, dfunction_t *func, unsigned parm) __attribute__((pure));
|
||||
pr_def_t *PR_Get_Local_Def (progs_t *pr, pointer_t *offs) __attribute__((pure));
|
||||
pr_def_t *PR_Get_Local_Def (progs_t *pr, pr_ptr_t *offs) __attribute__((pure));
|
||||
void PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents);
|
||||
void PR_DumpState (progs_t *pr);
|
||||
void PR_StackTrace (progs_t *pr);
|
||||
|
@ -1935,7 +1935,7 @@ struct progs_s {
|
|||
/// stack.
|
||||
///@{
|
||||
pr_type_t *stack;
|
||||
pointer_t stack_bottom;
|
||||
pr_ptr_t stack_bottom;
|
||||
int stack_size; ///< set by user
|
||||
///@}
|
||||
|
||||
|
@ -1970,7 +1970,7 @@ struct progs_s {
|
|||
double *dtime; ///< required for OP_STATE d
|
||||
float *ftime; ///< required for OP_STATE f
|
||||
pr_uint_t *self; ///< required for OP_STATE
|
||||
pointer_t *stack; ///< required for OP_(PUSH|POP)*
|
||||
pr_ptr_t *stack; ///< required for OP_(PUSH|POP)*
|
||||
} globals;
|
||||
struct {
|
||||
pr_int_t nextthink; ///< required for OP_STATE
|
||||
|
@ -1991,7 +1991,7 @@ struct progs_s {
|
|||
\return C pointer represented by the parameter. 0 offset -> NULL
|
||||
*/
|
||||
static inline pr_type_t *
|
||||
PR_GetPointer (const progs_t *pr, pointer_t o)
|
||||
PR_GetPointer (const progs_t *pr, pr_ptr_t o)
|
||||
{
|
||||
return o ? pr->pr_globals + o : 0;
|
||||
}
|
||||
|
@ -2001,7 +2001,7 @@ PR_GetPointer (const progs_t *pr, pointer_t o)
|
|||
\param p C pointer to be converted.
|
||||
\return Progs offset/pointer represented by \c p. NULL -> 0 offset
|
||||
*/
|
||||
static inline pointer_t
|
||||
static inline pr_ptr_t
|
||||
PR_SetPointer (const progs_t *pr, const void *p)
|
||||
{
|
||||
return p ? (const pr_type_t *) p - pr->pr_globals : 0;
|
||||
|
|
|
@ -33,9 +33,7 @@ typedef int64_t pr_long_t;
|
|||
typedef uint64_t pr_ulong_t;
|
||||
typedef pr_uint_t func_t;
|
||||
typedef pr_int_t pr_string_t;
|
||||
typedef pr_string_t string_t;//FIXME
|
||||
typedef pr_uint_t pr_pointer_t;
|
||||
typedef pr_pointer_t pointer_t;//FIXME
|
||||
typedef pr_uint_t pr_ptr_t;
|
||||
|
||||
#define PR_VEC_TYPE(t,n,s) \
|
||||
typedef t n __attribute__ ((vector_size (s*sizeof (t))))
|
||||
|
@ -489,25 +487,25 @@ typedef struct ddef_s {
|
|||
pr_ushort_t type; // if DEF_SAVEGLOBAL bit is set
|
||||
// the variable needs to be saved in savegames
|
||||
pr_ushort_t ofs;
|
||||
string_t name;
|
||||
pr_string_t name;
|
||||
} ddef_t;
|
||||
|
||||
typedef struct xdef_s {
|
||||
pointer_t type; ///< pointer to type definition
|
||||
pointer_t ofs; ///< 32-bit version of ddef_t.ofs
|
||||
pr_ptr_t type; ///< pointer to type definition
|
||||
pr_ptr_t ofs; ///< 32-bit version of ddef_t.ofs
|
||||
} xdef_t;
|
||||
|
||||
typedef struct pr_xdefs_s {
|
||||
pointer_t xdefs;
|
||||
pr_ptr_t xdefs;
|
||||
pr_int_t num_xdefs;
|
||||
} pr_xdefs_t;
|
||||
|
||||
typedef struct pr_def_s {
|
||||
pr_ushort_t type;
|
||||
pr_ushort_t size; ///< may not be correct
|
||||
pointer_t ofs;
|
||||
string_t name;
|
||||
pointer_t type_encoding;
|
||||
pr_ptr_t ofs;
|
||||
pr_string_t name;
|
||||
pr_ptr_t type_encoding;
|
||||
} pr_def_t;
|
||||
|
||||
typedef struct dparmsize_s {
|
||||
|
@ -526,8 +524,8 @@ typedef struct dfunction_s {
|
|||
|
||||
pr_uint_t profile; // runtime
|
||||
|
||||
string_t name; // source function name
|
||||
string_t file; // source file defined in
|
||||
pr_string_t name; // source function name
|
||||
pr_string_t file; // source file defined in
|
||||
|
||||
pr_int_t numparms; // -ve is varargs (1s comp of real count)
|
||||
dparmsize_t parm_size[MAX_PARMS];
|
||||
|
@ -535,19 +533,19 @@ typedef struct dfunction_s {
|
|||
|
||||
typedef union pr_type_u {
|
||||
float float_var;
|
||||
string_t string_var;
|
||||
pr_string_t string_var;
|
||||
func_t func_var;
|
||||
pr_uint_t entity_var;
|
||||
float vector_var; // really [3], but this structure must be 32 bits
|
||||
float quat_var; // really [4], but this structure must be 32 bits
|
||||
pr_int_t integer_var;
|
||||
pointer_t pointer_var;
|
||||
pr_ptr_t pointer_var;
|
||||
pr_uint_t uinteger_var;
|
||||
} pr_type_t;
|
||||
|
||||
typedef struct pr_va_list_s {
|
||||
pr_int_t count;
|
||||
pointer_t list; // pr_type_t
|
||||
pr_ptr_t list; // pr_type_t
|
||||
} pr_va_list_t;
|
||||
|
||||
#define PROG_VERSION_ENCODE(a,b,c) \
|
||||
|
|
|
@ -77,58 +77,58 @@
|
|||
| (num) << (PR_BITS_PER_INT / 2))
|
||||
|
||||
typedef struct pr_sel_s {
|
||||
pointer_t sel_id;
|
||||
string_t sel_types;
|
||||
pr_ptr_t sel_id;
|
||||
pr_string_t sel_types;
|
||||
} pr_sel_t;
|
||||
|
||||
typedef struct pr_id_s {
|
||||
pointer_t class_pointer; // pr_class_t
|
||||
pr_ptr_t class_pointer; // pr_class_t
|
||||
} pr_id_t;
|
||||
|
||||
typedef struct pr_class_s {
|
||||
pointer_t class_pointer; // pr_class_t
|
||||
pointer_t super_class; // pr_class_t
|
||||
string_t name;
|
||||
pr_ptr_t class_pointer; // pr_class_t
|
||||
pr_ptr_t super_class; // pr_class_t
|
||||
pr_string_t name;
|
||||
pr_int_t version;
|
||||
pr_uint_t info;
|
||||
pr_int_t instance_size;
|
||||
pointer_t ivars; // pr_ivar_list_t
|
||||
pointer_t methods; // pr_method_list_t
|
||||
pointer_t dtable; // resource index
|
||||
pointer_t subclass_list; // pr_class_t
|
||||
pointer_t sibling_class; // pr_class_t
|
||||
pointer_t protocols; // pr_protocol_list_t
|
||||
pointer_t gc_object_type;
|
||||
pr_ptr_t ivars; // pr_ivar_list_t
|
||||
pr_ptr_t methods; // pr_method_list_t
|
||||
pr_ptr_t dtable; // resource index
|
||||
pr_ptr_t subclass_list; // pr_class_t
|
||||
pr_ptr_t sibling_class; // pr_class_t
|
||||
pr_ptr_t protocols; // pr_protocol_list_t
|
||||
pr_ptr_t gc_object_type;
|
||||
} pr_class_t;
|
||||
|
||||
typedef struct pr_protocol_s {
|
||||
pointer_t class_pointer; // pr_class_t
|
||||
string_t protocol_name;
|
||||
pointer_t protocol_list; // pr_protocol_list_t
|
||||
pointer_t instance_methods; // pr_method_description_list_t
|
||||
pointer_t class_methods; // pr_method_description_list_t
|
||||
pr_ptr_t class_pointer; // pr_class_t
|
||||
pr_string_t protocol_name;
|
||||
pr_ptr_t protocol_list; // pr_protocol_list_t
|
||||
pr_ptr_t instance_methods; // pr_method_description_list_t
|
||||
pr_ptr_t class_methods; // pr_method_description_list_t
|
||||
} pr_protocol_t;
|
||||
|
||||
typedef struct pr_category_s {
|
||||
string_t category_name;
|
||||
string_t class_name;
|
||||
pointer_t instance_methods; // pr_method_list_t
|
||||
pointer_t class_methods; // pr_method_list_t
|
||||
pointer_t protocols; // pr_protocol_list_t
|
||||
pr_string_t category_name;
|
||||
pr_string_t class_name;
|
||||
pr_ptr_t instance_methods; // pr_method_list_t
|
||||
pr_ptr_t class_methods; // pr_method_list_t
|
||||
pr_ptr_t protocols; // pr_protocol_list_t
|
||||
} pr_category_t;
|
||||
|
||||
typedef struct pr_protocol_list_s {
|
||||
pointer_t next;
|
||||
pr_ptr_t next;
|
||||
pr_int_t count;
|
||||
pointer_t list[1]; // pr_protocol_t
|
||||
pr_ptr_t list[1]; // pr_protocol_t
|
||||
} pr_protocol_list_t;
|
||||
|
||||
typedef struct pr_method_list_s {
|
||||
pointer_t method_next;
|
||||
pr_ptr_t method_next;
|
||||
pr_int_t method_count;
|
||||
struct pr_method_s {
|
||||
pointer_t method_name; // pr_sel_t
|
||||
string_t method_types;
|
||||
pr_ptr_t method_name; // pr_sel_t
|
||||
pr_string_t method_types;
|
||||
func_t method_imp; // typedef id (id, SEL, ...) IMP
|
||||
} method_list[1];
|
||||
} pr_method_list_t;
|
||||
|
@ -137,8 +137,8 @@ typedef struct pr_method_s pr_method_t;
|
|||
typedef struct pr_method_description_list_s {
|
||||
pr_int_t count;
|
||||
struct pr_method_description_s {
|
||||
pointer_t name; // pr_sel_t
|
||||
string_t types;
|
||||
pr_ptr_t name; // pr_sel_t
|
||||
pr_string_t types;
|
||||
} list[1];
|
||||
} pr_method_description_list_t;
|
||||
typedef struct pr_method_description_s pr_method_description_t;
|
||||
|
@ -146,8 +146,8 @@ typedef struct pr_method_description_s pr_method_description_t;
|
|||
typedef struct pr_ivar_list_s {
|
||||
pr_int_t ivar_count;
|
||||
struct pr_ivar_s {
|
||||
string_t ivar_name;
|
||||
string_t ivar_type;
|
||||
pr_string_t ivar_name;
|
||||
pr_string_t ivar_type;
|
||||
pr_int_t ivar_offset;
|
||||
} ivar_list[1];
|
||||
} pr_ivar_list_t;
|
||||
|
@ -157,16 +157,16 @@ typedef struct pr_static_instances_s {
|
|||
// one per staticly instanced class per module (eg, 3 instances of Object
|
||||
// will produce one of these structs with 3 pointers to those instances in
|
||||
// instances[]
|
||||
string_t class_name;
|
||||
pointer_t instances[1]; // null terminated array of pr_id_t
|
||||
pr_string_t class_name;
|
||||
pr_ptr_t instances[1]; // null terminated array of pr_id_t
|
||||
} pr_static_instances_t;
|
||||
|
||||
typedef struct pr_symtab_s {
|
||||
pr_int_t sel_ref_cnt;
|
||||
pointer_t refs; // pr_sel_t
|
||||
pr_ptr_t refs; // pr_sel_t
|
||||
pr_int_t cls_def_cnt;
|
||||
pr_int_t cat_def_cnt;
|
||||
pointer_t defs[1]; // variable array of cls_def_cnt class
|
||||
pr_ptr_t defs[1]; // variable array of cls_def_cnt class
|
||||
// pointers then cat_def_cnt category
|
||||
// pointers followed by a null terminated
|
||||
// array of pr_static_instances (not yet
|
||||
|
@ -176,13 +176,13 @@ typedef struct pr_symtab_s {
|
|||
typedef struct pr_module_s {
|
||||
pr_int_t version;
|
||||
pr_int_t size;
|
||||
string_t name;
|
||||
pointer_t symtab; // pr_symtab_t
|
||||
pr_string_t name;
|
||||
pr_ptr_t symtab; // pr_symtab_t
|
||||
} pr_module_t;
|
||||
|
||||
typedef struct pr_super_s {
|
||||
pointer_t self;
|
||||
pointer_t class;
|
||||
pr_ptr_t self;
|
||||
pr_ptr_t class;
|
||||
} pr_super_t;
|
||||
|
||||
#endif//__QF_pr_obj_h
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/** \defgroup qfcc_qfo_type Object file type encoding
|
||||
\ingroup progs
|
||||
|
||||
All \c pointer_t \c type fields are pointers within the type qfo_space.
|
||||
All \c pr_ptr_t \c type fields are pointers within the type qfo_space.
|
||||
*/
|
||||
///@{
|
||||
|
||||
|
@ -52,43 +52,43 @@ typedef enum {
|
|||
|
||||
typedef struct qfot_alias_s {
|
||||
etype_t type; ///< type at end of alias chain
|
||||
pointer_t aux_type; ///< referenced type: stripped of aliases
|
||||
pointer_t full_type; ///< includes full alias info
|
||||
string_t name; ///< alias name, may be null
|
||||
pr_ptr_t aux_type; ///< referenced type: stripped of aliases
|
||||
pr_ptr_t full_type; ///< includes full alias info
|
||||
pr_string_t name; ///< alias name, may be null
|
||||
} qfot_alias_t;
|
||||
|
||||
typedef struct qfot_fldptr_s {
|
||||
etype_t type; ///< ev_field or ev_pointer
|
||||
pointer_t aux_type; ///< referenced type
|
||||
pr_ptr_t aux_type; ///< referenced type
|
||||
} qfot_fldptr_t;
|
||||
|
||||
typedef struct qfot_func_s {
|
||||
etype_t type; ///< always ev_func
|
||||
pointer_t return_type; ///< return type of the function
|
||||
pr_ptr_t return_type; ///< return type of the function
|
||||
pr_int_t num_params; ///< ones compliment count of the
|
||||
///< parameters. -ve values indicate the
|
||||
///< number of real parameters before the
|
||||
///< ellipsis
|
||||
pointer_t param_types[1]; ///< variable length list of parameter
|
||||
pr_ptr_t param_types[1]; ///< variable length list of parameter
|
||||
///< types
|
||||
} qfot_func_t;
|
||||
|
||||
typedef struct qfot_var_s {
|
||||
pointer_t type; ///< type of field or self reference for
|
||||
pr_ptr_t type; ///< type of field or self reference for
|
||||
///< enum
|
||||
string_t name; ///< name of field/enumerator
|
||||
pr_string_t name; ///< name of field/enumerator
|
||||
pr_int_t offset; ///< value for enum, 0 for union
|
||||
} qfot_var_t;
|
||||
|
||||
typedef struct qfot_struct_s {
|
||||
string_t tag; ///< struct/union/enum tag
|
||||
pr_string_t tag; ///< struct/union/enum tag
|
||||
pr_int_t num_fields; ///< number of fields/enumerators
|
||||
qfot_var_t fields[1]; ///< variable length list of
|
||||
///< fields/enumerators
|
||||
} qfot_struct_t;
|
||||
|
||||
typedef struct qfot_array_s {
|
||||
pointer_t type; ///< element type
|
||||
pr_ptr_t type; ///< element type
|
||||
pr_int_t base; ///< start index of array
|
||||
pr_int_t size; ///< number of elements in array
|
||||
} qfot_array_t;
|
||||
|
@ -103,20 +103,20 @@ typedef struct qfot_array_s {
|
|||
typedef struct qfot_type_s {
|
||||
ty_meta_e meta; ///< meta type
|
||||
pr_uint_t size; ///< total word size of this encoding
|
||||
string_t encoding; ///< Objective-QC encoding
|
||||
pr_string_t encoding; ///< Objective-QC encoding
|
||||
union {
|
||||
etype_t type; ///< ty_basic: etype_t
|
||||
qfot_fldptr_t fldptr; ///< ty_basic, ev_pointer/ev_field
|
||||
qfot_func_t func; ///< ty_basic, ev_func
|
||||
qfot_struct_t strct; ///< ty_struct/ty_union/ty_enum
|
||||
qfot_array_t array; ///< ty_array
|
||||
string_t class; ///< ty_class
|
||||
pr_string_t class; ///< ty_class
|
||||
qfot_alias_t alias; ///< ty_alias
|
||||
};
|
||||
} qfot_type_t;
|
||||
|
||||
typedef struct qfot_type_encodings_s {
|
||||
pointer_t types;
|
||||
pr_ptr_t types;
|
||||
pr_uint_t size;
|
||||
} qfot_type_encodings_t;
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ struct cbuf_s;
|
|||
|
||||
void RUA_Init (struct progs_s *pr, int secure);
|
||||
void RUA_Cbuf_SetCbuf (struct progs_s *pr, struct cbuf_s *cbuf);
|
||||
func_t RUA_Obj_msg_lookup (struct progs_s *pr, pointer_t _self,
|
||||
pointer_t __cmd);
|
||||
func_t RUA_Obj_msg_lookup (struct progs_s *pr, pr_ptr_t _self,
|
||||
pr_ptr_t __cmd);
|
||||
|
||||
void RUA_Game_Init (struct progs_s *pr, int secure);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef struct il_data_s {
|
|||
inputline_t *line;
|
||||
progs_t *pr;
|
||||
func_t enter; // enter key callback
|
||||
pointer_t data[2]; // allow two data params for the callback
|
||||
pr_ptr_t data[2]; // allow two data params for the callback
|
||||
int method; // true if method rather than function
|
||||
} il_data_t;
|
||||
|
||||
|
|
|
@ -557,7 +557,7 @@ PR_DebugSetSym (progs_t *pr, pr_debug_header_t *debug)
|
|||
}
|
||||
|
||||
qfot_type_encodings_t *encodings = 0;
|
||||
pointer_t type_encodings = 0;
|
||||
pr_ptr_t type_encodings = 0;
|
||||
res->type_encodings_def = PR_FindGlobal (pr, ".type_encodings");
|
||||
if (res->type_encodings_def) {
|
||||
encodings = &G_STRUCT (pr, qfot_type_encodings_t,
|
||||
|
@ -581,7 +581,7 @@ PR_DebugSetSym (progs_t *pr, pr_debug_header_t *debug)
|
|||
}
|
||||
}
|
||||
|
||||
string_t compunit_str = PR_FindString (pr, ".compile_unit");
|
||||
pr_string_t compunit_str = PR_FindString (pr, ".compile_unit");
|
||||
for (pr_uint_t i = 0; i < debug->num_debug_defs; i++) {
|
||||
pr_def_t *def = &res->debug_defs[i];
|
||||
if (type_encodings) {
|
||||
|
@ -595,7 +595,7 @@ PR_DebugSetSym (progs_t *pr, pr_debug_header_t *debug)
|
|||
|
||||
if (encodings) {
|
||||
qfot_type_t *type;
|
||||
for (pointer_t type_ptr = 4; type_ptr < encodings->size;
|
||||
for (pr_ptr_t type_ptr = 4; type_ptr < encodings->size;
|
||||
type_ptr += type->size) {
|
||||
type = &G_STRUCT (pr, qfot_type_t, type_encodings + type_ptr);
|
||||
if (type->meta == ty_basic
|
||||
|
@ -968,12 +968,12 @@ get_type (prdeb_resources_t *res, int typeptr)
|
|||
}
|
||||
|
||||
pr_def_t *
|
||||
PR_Get_Local_Def (progs_t *pr, pointer_t *offset)
|
||||
PR_Get_Local_Def (progs_t *pr, pr_ptr_t *offset)
|
||||
{
|
||||
prdeb_resources_t *res = pr->pr_debug_resources;
|
||||
dfunction_t *func;
|
||||
pr_auxfunction_t *aux_func;
|
||||
pointer_t offs = *offset;
|
||||
pr_ptr_t offs = *offset;
|
||||
pr_def_t *def;
|
||||
|
||||
if (!pr->pr_xfunction)
|
||||
|
@ -1102,7 +1102,7 @@ value_string (pr_debug_data_t *data, qfot_type_t *type, pr_type_t *value)
|
|||
}
|
||||
|
||||
static pr_def_t *
|
||||
pr_debug_find_def (progs_t *pr, pointer_t *ofs)
|
||||
pr_debug_find_def (progs_t *pr, pr_ptr_t *ofs)
|
||||
{
|
||||
prdeb_resources_t *res = pr->pr_debug_resources;
|
||||
pr_def_t *def = 0;
|
||||
|
@ -1123,7 +1123,7 @@ pr_debug_find_def (progs_t *pr, pointer_t *ofs)
|
|||
}
|
||||
|
||||
static const char *
|
||||
global_string (pr_debug_data_t *data, pointer_t offset, qfot_type_t *type,
|
||||
global_string (pr_debug_data_t *data, pr_ptr_t offset, qfot_type_t *type,
|
||||
int contents)
|
||||
{
|
||||
progs_t *pr = data->pr;
|
||||
|
@ -1132,7 +1132,7 @@ global_string (pr_debug_data_t *data, pointer_t offset, qfot_type_t *type,
|
|||
pr_def_t *def = NULL;
|
||||
qfot_type_t dummy_type = { };
|
||||
const char *name = 0;
|
||||
pointer_t offs = offset;
|
||||
pr_ptr_t offs = offset;
|
||||
|
||||
dstring_clearstr (dstr);
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ pr_debug_string_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
|||
{
|
||||
__auto_type data = (pr_debug_data_t *) _data;
|
||||
dstring_t *dstr = data->dstr;
|
||||
string_t string = value->string_var;
|
||||
pr_string_t string = value->string_var;
|
||||
if (PR_StringValid (data->pr, string)) {
|
||||
const char *str = PR_GetString (data->pr, string);
|
||||
|
||||
|
@ -1316,8 +1316,8 @@ pr_debug_pointer_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
|||
__auto_type data = (pr_debug_data_t *) _data;
|
||||
progs_t *pr = data->pr;
|
||||
dstring_t *dstr = data->dstr;
|
||||
pointer_t offset = value->integer_var;
|
||||
pointer_t offs = offset;
|
||||
pr_ptr_t offset = value->integer_var;
|
||||
pr_ptr_t offs = offset;
|
||||
pr_def_t *def = 0;
|
||||
|
||||
def = pr_debug_find_def (pr, &offs);
|
||||
|
|
|
@ -220,7 +220,7 @@ PR_EnterFunction (progs_t *pr, bfunction_t *f)
|
|||
{
|
||||
pr_int_t i;
|
||||
pr_type_t *dstParams[MAX_PARMS];
|
||||
pointer_t paramofs = 0;
|
||||
pr_ptr_t paramofs = 0;
|
||||
|
||||
if (pr->pr_trace && !pr->debug_handler) {
|
||||
Sys_Printf ("Entering function %s\n",
|
||||
|
@ -338,9 +338,9 @@ PR_LeaveFunction (progs_t *pr, int to_engine)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_BoundsCheckSize (progs_t *pr, pointer_t addr, unsigned size)
|
||||
PR_BoundsCheckSize (progs_t *pr, pr_ptr_t addr, unsigned size)
|
||||
{
|
||||
if (addr < (pointer_t) (pr->pr_return - pr->pr_globals))
|
||||
if (addr < (pr_ptr_t) (pr->pr_return - pr->pr_globals))
|
||||
PR_RunError (pr, "null pointer access");
|
||||
if (addr >= pr->globals_size
|
||||
|| size > (unsigned) (pr->globals_size - addr))
|
||||
|
@ -447,7 +447,7 @@ PR_CallFunction (progs_t *pr, func_t fnum, pr_type_t *return_ptr)
|
|||
}
|
||||
|
||||
static void
|
||||
check_stack_pointer (progs_t *pr, pointer_t stack, int size)
|
||||
check_stack_pointer (progs_t *pr, pr_ptr_t stack, int size)
|
||||
{
|
||||
if (stack < pr->stack_bottom) {
|
||||
PR_RunError (pr, "Progs stack overflow");
|
||||
|
@ -1070,7 +1070,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_PUSH_I_v6p:
|
||||
case OP_PUSH_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 1;
|
||||
pr_ptr_t stack = *pr->globals.stack - 1;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 1);
|
||||
|
@ -1081,7 +1081,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSH_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 3;
|
||||
pr_ptr_t stack = *pr->globals.stack - 3;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 3);
|
||||
|
@ -1092,7 +1092,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSH_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 4;
|
||||
pr_ptr_t stack = *pr->globals.stack - 4;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
|
@ -1110,7 +1110,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_PUSHB_I_v6p:
|
||||
case OP_PUSHB_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 1;
|
||||
pr_ptr_t stack = *pr->globals.stack - 1;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1127,7 +1127,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSHB_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 3;
|
||||
pr_ptr_t stack = *pr->globals.stack - 3;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1144,7 +1144,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSHB_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 4;
|
||||
pr_ptr_t stack = *pr->globals.stack - 4;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1168,7 +1168,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_PUSHBI_I_v6p:
|
||||
case OP_PUSHBI_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 1;
|
||||
pr_ptr_t stack = *pr->globals.stack - 1;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1185,7 +1185,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSHBI_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 3;
|
||||
pr_ptr_t stack = *pr->globals.stack - 3;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1202,7 +1202,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_PUSHBI_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack - 4;
|
||||
pr_ptr_t stack = *pr->globals.stack - 4;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1226,7 +1226,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_POP_I_v6p:
|
||||
case OP_POP_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 1);
|
||||
|
@ -1237,7 +1237,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POP_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 3);
|
||||
|
@ -1248,7 +1248,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POP_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
|
@ -1266,7 +1266,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_POPB_I_v6p:
|
||||
case OP_POPB_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1283,7 +1283,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POPB_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1300,7 +1300,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POPB_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + OPB(int);
|
||||
|
@ -1324,7 +1324,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_POPBI_I_v6p:
|
||||
case OP_POPBI_P_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1341,7 +1341,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POPBI_V_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1358,7 +1358,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
break;
|
||||
case OP_POPBI_Q_v6p:
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
|
||||
pointer = OPA(int) + st->b;
|
||||
|
@ -1670,16 +1670,16 @@ op_call:
|
|||
break;
|
||||
case OP_MEMSETP_v6p:
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheckSize (pr, OPC(pointer), OPB(int));
|
||||
PR_BoundsCheckSize (pr, OPC(ptr), OPB(int));
|
||||
}
|
||||
pr_memset (pr->pr_globals + OPC(pointer), OPA(int),
|
||||
pr_memset (pr->pr_globals + OPC(ptr), OPA(int),
|
||||
OPB(int));
|
||||
break;
|
||||
case OP_MEMSETPI_v6p:
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheckSize (pr, OPC(pointer), st->b);
|
||||
PR_BoundsCheckSize (pr, OPC(ptr), st->b);
|
||||
}
|
||||
pr_memset (pr->pr_globals + OPC(pointer), OPA(int),
|
||||
pr_memset (pr->pr_globals + OPC(ptr), OPA(int),
|
||||
st->b);
|
||||
break;
|
||||
case OP_GE_D_v6p:
|
||||
|
@ -1754,7 +1754,7 @@ pr_address_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
{
|
||||
pr_type_t *op_a = pr->pr_globals + st->a + PR_BASE (pr, st, A);
|
||||
pr_type_t *op_b = pr->pr_globals + st->b + PR_BASE (pr, st, B);
|
||||
pointer_t mm_offs = 0;
|
||||
pr_ptr_t mm_offs = 0;
|
||||
|
||||
switch (mm_ind) {
|
||||
case 0:
|
||||
|
@ -1775,7 +1775,7 @@ pr_address_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
break;
|
||||
case 4:
|
||||
// entity.field (equivalent to OP_LOAD_t_v6p)
|
||||
pointer_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
pr_ptr_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
mm_offs = edict_area + OPA(uint) + OPB(uint);
|
||||
break;
|
||||
}
|
||||
|
@ -1787,7 +1787,7 @@ pr_return_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
{
|
||||
pr_type_t *op_a = pr->pr_globals + st->a + PR_BASE (pr, st, A);
|
||||
pr_type_t *op_b = pr->pr_globals + st->b + PR_BASE (pr, st, B);
|
||||
pointer_t mm_offs = 0;
|
||||
pr_ptr_t mm_offs = 0;
|
||||
|
||||
switch (mm_ind) {
|
||||
case 0:
|
||||
|
@ -1808,7 +1808,7 @@ pr_return_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
break;
|
||||
case 4:
|
||||
// entity.field (equivalent to OP_LOAD_t_v6p)
|
||||
pointer_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
pr_ptr_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
mm_offs = edict_area + OPA(uint) + OPB(uint);
|
||||
break;
|
||||
}
|
||||
|
@ -1820,7 +1820,7 @@ pr_call_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
{
|
||||
pr_type_t *op_a = pr->pr_globals + st->a + PR_BASE (pr, st, A);
|
||||
pr_type_t *op_b = pr->pr_globals + st->b + PR_BASE (pr, st, B);
|
||||
pointer_t mm_offs = 0;
|
||||
pr_ptr_t mm_offs = 0;
|
||||
|
||||
switch (mm_ind) {
|
||||
case 1:
|
||||
|
@ -1837,19 +1837,19 @@ pr_call_mode (progs_t *pr, const dstatement_t *st, int mm_ind)
|
|||
break;
|
||||
case 4:
|
||||
// entity.field (equivalent to OP_LOAD_t_v6p)
|
||||
pointer_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
pr_ptr_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
mm_offs = edict_area + OPA(uint) + OPB(uint);
|
||||
break;
|
||||
}
|
||||
return pr->pr_globals + mm_offs;
|
||||
}
|
||||
|
||||
static pr_pointer_t __attribute__((pure))
|
||||
static pr_ptr_t __attribute__((pure))
|
||||
pr_jump_mode (progs_t *pr, const dstatement_t *st, int jump_ind)
|
||||
{
|
||||
pr_type_t *op_a = pr->pr_globals + st->a + PR_BASE (pr, st, A);
|
||||
pr_type_t *op_b = pr->pr_globals + st->b + PR_BASE (pr, st, B);
|
||||
pointer_t jump_offs = pr->pr_xstatement;
|
||||
pr_ptr_t jump_offs = pr->pr_xstatement;
|
||||
|
||||
switch (jump_ind) {
|
||||
case 0:
|
||||
|
@ -1879,7 +1879,7 @@ static pr_type_t *
|
|||
pr_stack_push (progs_t *pr)
|
||||
{
|
||||
// keep the stack 16-byte aligned
|
||||
pointer_t stack = *pr->globals.stack - 4;
|
||||
pr_ptr_t stack = *pr->globals.stack - 4;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
|
@ -1891,7 +1891,7 @@ pr_stack_push (progs_t *pr)
|
|||
static pr_type_t *
|
||||
pr_stack_pop (progs_t *pr)
|
||||
{
|
||||
pointer_t stack = *pr->globals.stack;
|
||||
pr_ptr_t stack = *pr->globals.stack;
|
||||
pr_type_t *stk = pr->pr_globals + stack;
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
|
@ -1904,7 +1904,7 @@ pr_stack_pop (progs_t *pr)
|
|||
static void
|
||||
pr_with (progs_t *pr, const dstatement_t *st)
|
||||
{
|
||||
pointer_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
pr_ptr_t edict_area = pr->pr_edict_area - pr->pr_globals;
|
||||
pr_type_t *op_b = pr->pr_globals + PR_BASE (pr, st, B) + st->b;
|
||||
pr_type_t *stk;
|
||||
pr_uint_t *base = &pr->pr_bases[st->c & 3];
|
||||
|
@ -1933,7 +1933,7 @@ pr_with (progs_t *pr, const dstatement_t *st)
|
|||
*base = pr->pr_globals[st->b].pointer_var;
|
||||
return;
|
||||
case 5:
|
||||
*base = OPB(pointer);
|
||||
*base = OPB(ptr);
|
||||
return;
|
||||
case 6:
|
||||
// relative to stack (-ve offset)
|
||||
|
@ -2755,9 +2755,9 @@ pr_exec_ruamoko (progs_t *pr, int exitdepth)
|
|||
}
|
||||
}
|
||||
|
||||
pointer_t st_a = st->a + PR_BASE (pr, st, A);
|
||||
pointer_t st_b = st->b + PR_BASE (pr, st, B);
|
||||
pointer_t st_c = st->c + PR_BASE (pr, st, C);
|
||||
pr_ptr_t st_a = st->a + PR_BASE (pr, st, A);
|
||||
pr_ptr_t st_b = st->b + PR_BASE (pr, st, B);
|
||||
pr_ptr_t st_c = st->c + PR_BASE (pr, st, C);
|
||||
|
||||
|
||||
pr_type_t *op_a = pr->pr_globals + st_a;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
static const char param_str[] = ".param_0";
|
||||
|
||||
pr_def_t *
|
||||
PR_SearchDefs (pr_def_t *defs, unsigned num_defs, pointer_t offset)
|
||||
PR_SearchDefs (pr_def_t *defs, unsigned num_defs, pr_ptr_t offset)
|
||||
{
|
||||
// fuzzy bsearh
|
||||
unsigned left = 0;
|
||||
|
@ -69,13 +69,13 @@ PR_SearchDefs (pr_def_t *defs, unsigned num_defs, pointer_t offset)
|
|||
}
|
||||
|
||||
pr_def_t *
|
||||
PR_GlobalAtOfs (progs_t * pr, pointer_t ofs)
|
||||
PR_GlobalAtOfs (progs_t * pr, pr_ptr_t ofs)
|
||||
{
|
||||
return PR_SearchDefs (pr->pr_globaldefs, pr->progs->numglobaldefs, ofs);
|
||||
}
|
||||
|
||||
VISIBLE pr_def_t *
|
||||
PR_FieldAtOfs (progs_t * pr, pointer_t ofs)
|
||||
PR_FieldAtOfs (progs_t * pr, pr_ptr_t ofs)
|
||||
{
|
||||
return PR_SearchDefs (pr->pr_fielddefs, pr->progs->numfielddefs, ofs);
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ free_string_ref (prstr_resources_t *res, strref_t *sr)
|
|||
res->free_string_refs = sr;
|
||||
}
|
||||
|
||||
static __attribute__((pure)) string_t
|
||||
static __attribute__((pure)) pr_string_t
|
||||
string_index (prstr_resources_t *res, strref_t *sr)
|
||||
{
|
||||
long o = (long) (sr - res->static_strings);
|
||||
|
@ -309,7 +309,7 @@ requeue_strref (prstr_resources_t *res, strref_t *sr)
|
|||
}
|
||||
|
||||
static inline strref_t *
|
||||
get_strref (prstr_resources_t *res, string_t num)
|
||||
get_strref (prstr_resources_t *res, pr_string_t num)
|
||||
{
|
||||
if (num < 0) {
|
||||
strref_t *ref;
|
||||
|
@ -328,7 +328,7 @@ get_strref (prstr_resources_t *res, string_t num)
|
|||
}
|
||||
|
||||
static inline __attribute__((pure)) const char *
|
||||
get_string (progs_t *pr, string_t num)
|
||||
get_string (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
__auto_type res = pr->pr_string_resources;
|
||||
if (num < 0) {
|
||||
|
@ -356,7 +356,7 @@ get_string (progs_t *pr, string_t num)
|
|||
}
|
||||
|
||||
VISIBLE qboolean
|
||||
PR_StringValid (progs_t *pr, string_t num)
|
||||
PR_StringValid (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
if (num >= 0) {
|
||||
return num < pr->pr_stringsize;
|
||||
|
@ -365,7 +365,7 @@ PR_StringValid (progs_t *pr, string_t num)
|
|||
}
|
||||
|
||||
VISIBLE qboolean
|
||||
PR_StringMutable (progs_t *pr, string_t num)
|
||||
PR_StringMutable (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
strref_t *sr;
|
||||
if (num >= 0) {
|
||||
|
@ -376,7 +376,7 @@ PR_StringMutable (progs_t *pr, string_t num)
|
|||
}
|
||||
|
||||
VISIBLE const char *
|
||||
PR_GetString (progs_t *pr, string_t num)
|
||||
PR_GetString (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
const char *str;
|
||||
|
||||
|
@ -387,7 +387,7 @@ PR_GetString (progs_t *pr, string_t num)
|
|||
}
|
||||
|
||||
VISIBLE dstring_t *
|
||||
PR_GetMutableString (progs_t *pr, string_t num)
|
||||
PR_GetMutableString (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
strref_t *ref = get_strref (pr->pr_string_resources, num);
|
||||
if (ref) {
|
||||
|
@ -424,7 +424,7 @@ pr_strdup (progs_t *pr, const char *s)
|
|||
return new;
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_SetString (progs_t *pr, const char *s)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -443,7 +443,7 @@ PR_SetString (progs_t *pr, const char *s)
|
|||
return string_index (res, sr);
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_FindString (progs_t *pr, const char *s)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -459,7 +459,7 @@ PR_FindString (progs_t *pr, const char *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_SetReturnString (progs_t *pr, const char *s)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -499,7 +499,7 @@ PR_SetReturnString (progs_t *pr, const char *s)
|
|||
return string_index (res, sr);
|
||||
}
|
||||
|
||||
static inline string_t
|
||||
static inline pr_string_t
|
||||
pr_settempstring (progs_t *pr, prstr_resources_t *res, char *s)
|
||||
{
|
||||
strref_t *sr;
|
||||
|
@ -512,7 +512,7 @@ pr_settempstring (progs_t *pr, prstr_resources_t *res, char *s)
|
|||
return string_index (res, sr);
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_CatStrings (progs_t *pr, const char *a, const char *b)
|
||||
{
|
||||
size_t lena;
|
||||
|
@ -528,7 +528,7 @@ PR_CatStrings (progs_t *pr, const char *a, const char *b)
|
|||
return pr_settempstring (pr, pr->pr_string_resources, c);
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_SetTempString (progs_t *pr, const char *s)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -544,7 +544,7 @@ PR_SetTempString (progs_t *pr, const char *s)
|
|||
return pr_settempstring (pr, res, pr_strdup (pr, s));
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_AllocTempBlock (progs_t *pr, size_t size)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -552,7 +552,7 @@ PR_AllocTempBlock (progs_t *pr, size_t size)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_PushTempString (progs_t *pr, string_t num)
|
||||
PR_PushTempString (progs_t *pr, pr_string_t num)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
strref_t *ref = get_strref (res, num);
|
||||
|
@ -572,7 +572,7 @@ PR_PushTempString (progs_t *pr, string_t num)
|
|||
PR_Error (pr, "attempt to push stale temp string");
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_SetDynamicString (progs_t *pr, const char *s)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -592,7 +592,7 @@ PR_SetDynamicString (progs_t *pr, const char *s)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_MakeTempString (progs_t *pr, string_t str)
|
||||
PR_MakeTempString (progs_t *pr, pr_string_t str)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
strref_t *sr = get_strref (res, str);
|
||||
|
@ -613,7 +613,7 @@ PR_MakeTempString (progs_t *pr, string_t str)
|
|||
pr->pr_xtstr = sr;
|
||||
}
|
||||
|
||||
VISIBLE string_t
|
||||
VISIBLE pr_string_t
|
||||
PR_NewMutableString (progs_t *pr)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
|
@ -624,7 +624,7 @@ PR_NewMutableString (progs_t *pr)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_HoldString (progs_t *pr, string_t str)
|
||||
PR_HoldString (progs_t *pr, pr_string_t str)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
strref_t *sr = get_strref (res, str);
|
||||
|
@ -654,7 +654,7 @@ PR_HoldString (progs_t *pr, string_t str)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_FreeString (progs_t *pr, string_t str)
|
||||
PR_FreeString (progs_t *pr, pr_string_t str)
|
||||
{
|
||||
prstr_resources_t *res = pr->pr_string_resources;
|
||||
strref_t *sr = get_strref (res, str);
|
||||
|
|
|
@ -29,8 +29,8 @@ static int verbose = 0;
|
|||
|
||||
typedef struct {
|
||||
const char *desc;
|
||||
pointer_t edict_area;
|
||||
pointer_t stack_size;
|
||||
pr_ptr_t edict_area;
|
||||
pr_uint_t stack_size;
|
||||
pr_uint_t extra_globals;
|
||||
pr_uint_t num_globals;
|
||||
pr_uint_t num_statements;
|
||||
|
|
|
@ -109,9 +109,9 @@ setup_test (test_t *test)
|
|||
memset (test_pr.pr_globals + test->num_globals, 0,
|
||||
test->extra_globals * sizeof (pr_type_t));
|
||||
if (test->stack_size) {
|
||||
pointer_t stack = num_globals - test->stack_size;
|
||||
pr_ptr_t stack = num_globals - test->stack_size;
|
||||
test_pr.stack_bottom = stack + 4;
|
||||
test_pr.globals.stack = (pointer_t *) (test_pr.pr_globals + stack);
|
||||
test_pr.globals.stack = (pr_ptr_t *) (test_pr.pr_globals + stack);
|
||||
*test_pr.globals.stack = num_globals;
|
||||
}
|
||||
if (test->edict_area) {
|
||||
|
|
|
@ -53,7 +53,7 @@ typedef struct bi_hashtab_s {
|
|||
func_t gh;
|
||||
func_t cmp;
|
||||
func_t f;
|
||||
pointer_t ud;
|
||||
pr_ptr_t ud;
|
||||
} bi_hashtab_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef struct rua_in_cookie_s {
|
|||
size_t users;
|
||||
progs_t *pr;
|
||||
func_t func;
|
||||
pointer_t data;
|
||||
pr_ptr_t data;
|
||||
} rua_in_cookie_t;
|
||||
|
||||
typedef struct input_resources_s {
|
||||
|
@ -193,7 +193,7 @@ bi_IN_GetButtonInfo (progs_t *pr)
|
|||
}
|
||||
|
||||
static rua_in_cookie_t *
|
||||
make_cookie (progs_t *pr, func_t func, pointer_t data)
|
||||
make_cookie (progs_t *pr, func_t func, pr_ptr_t data)
|
||||
{
|
||||
input_resources_t *res = PR_Resources_Find (pr, "input");
|
||||
rua_in_cookie_t search = {
|
||||
|
@ -212,7 +212,7 @@ make_cookie (progs_t *pr, func_t func, pointer_t data)
|
|||
}
|
||||
|
||||
static rua_in_cookie_t *
|
||||
find_cookie (progs_t *pr, func_t func, pointer_t data)
|
||||
find_cookie (progs_t *pr, func_t func, pr_ptr_t data)
|
||||
{
|
||||
input_resources_t *res = PR_Resources_Find (pr, "input");
|
||||
rua_in_cookie_t search = {
|
||||
|
|
|
@ -76,7 +76,7 @@ typedef struct probj_resources_s {
|
|||
unsigned selector_index;
|
||||
unsigned selector_index_max;
|
||||
obj_list **selector_sels;
|
||||
string_t *selector_names;
|
||||
pr_string_t *selector_names;
|
||||
PR_RESMAP (dtable_t) dtables;
|
||||
dtable_t *dtable_list;
|
||||
func_t obj_forward;
|
||||
|
@ -423,7 +423,7 @@ object_is_instance (probj_t *probj, pr_id_t *object)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static string_t
|
||||
static pr_string_t
|
||||
object_get_class_name (probj_t *probj, pr_id_t *object)
|
||||
{
|
||||
progs_t *pr = probj->pr;
|
||||
|
@ -446,7 +446,7 @@ object_get_class_name (probj_t *probj, pr_id_t *object)
|
|||
//====================================================================
|
||||
|
||||
static void
|
||||
finish_class (probj_t *probj, pr_class_t *class, pointer_t object_ptr)
|
||||
finish_class (probj_t *probj, pr_class_t *class, pr_ptr_t object_ptr)
|
||||
{
|
||||
progs_t *pr = probj->pr;
|
||||
pr_class_t *meta = &G_STRUCT (pr, pr_class_t, class->class_pointer);
|
||||
|
@ -463,7 +463,7 @@ finish_class (probj_t *probj, pr_class_t *class, pointer_t object_ptr)
|
|||
meta->super_class = val->class_pointer;
|
||||
class->super_class = PR_SetPointer (pr, val);
|
||||
} else {
|
||||
pointer_t *ml = &meta->methods;
|
||||
pr_ptr_t *ml = &meta->methods;
|
||||
while (*ml)
|
||||
ml = &G_STRUCT (pr, pr_method_list_t, *ml).method_next;
|
||||
*ml = class->methods;
|
||||
|
@ -485,7 +485,7 @@ add_sel_name (probj_t *probj, const char *name)
|
|||
probj->selector_sels = realloc (probj->selector_sels,
|
||||
size * sizeof (obj_list *));
|
||||
probj->selector_names = realloc (probj->selector_names,
|
||||
size * sizeof (string_t));
|
||||
size * sizeof (pr_string_t));
|
||||
for (i = probj->selector_index_max; i < size; i++) {
|
||||
probj->selector_sels[i] = 0;
|
||||
probj->selector_names[i] = 0;
|
||||
|
@ -805,7 +805,7 @@ obj_find_message (probj_t *probj, pr_class_t *class, pr_sel_t *selector)
|
|||
pr_sel_t *sel;
|
||||
int i;
|
||||
int dev = developer->int_val;
|
||||
string_t *names;
|
||||
pr_string_t *names;
|
||||
|
||||
if (dev & SYS_rua_msg) {
|
||||
names = probj->selector_names;
|
||||
|
@ -1041,7 +1041,7 @@ obj_verror (probj_t *probj, pr_id_t *object, int code, const char *fmt, int coun
|
|||
}
|
||||
|
||||
static void
|
||||
dump_ivars (probj_t *probj, pointer_t _ivars)
|
||||
dump_ivars (probj_t *probj, pr_ptr_t _ivars)
|
||||
{
|
||||
progs_t *pr = probj->pr;
|
||||
pr_ivar_list_t *ivars;
|
||||
|
@ -1063,8 +1063,8 @@ obj_init_statics (probj_t *probj)
|
|||
{
|
||||
progs_t *pr = probj->pr;
|
||||
obj_list **cell = &probj->uninitialized_statics;
|
||||
pointer_t *ptr;
|
||||
pointer_t *inst;
|
||||
pr_ptr_t *ptr;
|
||||
pr_ptr_t *inst;
|
||||
|
||||
Sys_MaskPrintf (SYS_rua_obj, "Initializing statics\n");
|
||||
while (*cell) {
|
||||
|
@ -1110,7 +1110,7 @@ rua___obj_exec_class (progs_t *pr)
|
|||
pr_module_t *module = &P_STRUCT (pr, pr_module_t, 0);
|
||||
pr_symtab_t *symtab;
|
||||
pr_sel_t *sel;
|
||||
pointer_t *ptr;
|
||||
pr_ptr_t *ptr;
|
||||
int i;
|
||||
obj_list **cell;
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ rua___obj_exec_class (progs_t *pr)
|
|||
if (*ptr) {
|
||||
Sys_MaskPrintf (SYS_rua_obj, "Static instances lists: %x\n", *ptr);
|
||||
probj->uninitialized_statics
|
||||
= list_cons (&G_STRUCT (pr, pointer_t, *ptr),
|
||||
= list_cons (&G_STRUCT (pr, pr_ptr_t, *ptr),
|
||||
probj->uninitialized_statics);
|
||||
}
|
||||
if (probj->uninitialized_statics) {
|
||||
|
@ -1275,7 +1275,7 @@ rua___obj_forward (progs_t *pr)
|
|||
//FIXME oh for a stack
|
||||
size_t parm_size = pr->pr_param_size * sizeof(pr_type_t);
|
||||
size_t size = pr->pr_argc * parm_size;
|
||||
string_t args_block = PR_AllocTempBlock (pr, size);
|
||||
pr_string_t args_block = PR_AllocTempBlock (pr, size);
|
||||
|
||||
int argc = pr->pr_argc;
|
||||
__auto_type argv = (pr_type_t *) PR_GetString (pr, args_block);
|
||||
|
@ -1402,9 +1402,9 @@ static void
|
|||
rua_obj_msg_sendv (progs_t *pr)
|
||||
{
|
||||
probj_t *probj = pr->pr_objective_resources;
|
||||
pointer_t obj = P_POINTER (pr, 0);
|
||||
pr_ptr_t obj = P_POINTER (pr, 0);
|
||||
pr_id_t *receiver = &P_STRUCT (pr, pr_id_t, 0);
|
||||
pointer_t sel = P_POINTER (pr, 1);
|
||||
pr_ptr_t sel = P_POINTER (pr, 1);
|
||||
pr_sel_t *op = &P_STRUCT (pr, pr_sel_t, 1);
|
||||
func_t imp = obj_msg_lookup (probj, receiver, op);
|
||||
|
||||
|
@ -1679,12 +1679,12 @@ rua_class_pose_as (progs_t *pr)
|
|||
{
|
||||
pr_class_t *impostor = &P_STRUCT (pr, pr_class_t, 0);
|
||||
pr_class_t *superclass = &P_STRUCT (pr, pr_class_t, 1);
|
||||
pointer_t *subclass;
|
||||
pr_ptr_t *subclass;
|
||||
|
||||
subclass = &superclass->subclass_list;
|
||||
while (*subclass) {
|
||||
pr_class_t *sub = &P_STRUCT (pr, pr_class_t, *subclass);
|
||||
pointer_t nextSub = sub->sibling_class;
|
||||
pr_ptr_t nextSub = sub->sibling_class;
|
||||
if (sub != impostor) {
|
||||
sub->sibling_class = impostor->subclass_list;
|
||||
sub->super_class = P_POINTER (pr, 0); // impostor
|
||||
|
@ -2157,7 +2157,7 @@ rua_init_finish (progs_t *pr)
|
|||
class_list = (pr_class_t **) Hash_GetList (probj->classes);
|
||||
if (*class_list) {
|
||||
pr_class_t *object_class;
|
||||
pointer_t object_ptr;
|
||||
pr_ptr_t object_ptr;
|
||||
|
||||
object_class = Hash_Find (probj->classes, "Object");
|
||||
if (object_class && !object_class->super_class)
|
||||
|
@ -2249,7 +2249,7 @@ RUA_Obj_Init (progs_t *pr, int secure)
|
|||
}
|
||||
|
||||
func_t
|
||||
RUA_Obj_msg_lookup (progs_t *pr, pointer_t _self, pointer_t __cmd)
|
||||
RUA_Obj_msg_lookup (progs_t *pr, pr_ptr_t _self, pr_ptr_t __cmd)
|
||||
{
|
||||
probj_t *probj = pr->pr_objective_resources;
|
||||
pr_id_t *self = &G_STRUCT (pr, pr_id_t, _self);
|
||||
|
|
|
@ -213,7 +213,7 @@ bi_Qreadstring (progs_t *pr)
|
|||
int handle = P_INT (pr, 0);
|
||||
int len = P_INT (pr, 1);
|
||||
qfile_t *h = get_handle (pr, __FUNCTION__, handle);
|
||||
string_t str = PR_NewMutableString (pr);
|
||||
pr_string_t str = PR_NewMutableString (pr);
|
||||
dstring_t *dstr = PR_GetMutableString (pr, str);
|
||||
|
||||
dstr->size = len + 1;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
typedef struct {
|
||||
int count;
|
||||
pointer_t list;
|
||||
pr_ptr_t list;
|
||||
} qfslist_t;
|
||||
|
||||
static void
|
||||
|
@ -155,7 +155,7 @@ bi_QFS_Filelist (progs_t *pr)
|
|||
{
|
||||
filelist_t *filelist = QFS_FilelistNew ();
|
||||
qfslist_t *list;
|
||||
string_t *strings;
|
||||
pr_string_t *strings;
|
||||
int i;
|
||||
|
||||
QFS_FilelistFill (filelist, P_GSTRING (pr, 0), P_GSTRING (pr, 1),
|
||||
|
@ -163,7 +163,7 @@ bi_QFS_Filelist (progs_t *pr)
|
|||
|
||||
list = PR_Zone_Malloc (pr, sizeof (list) + filelist->count * 4);
|
||||
list->count = filelist->count;
|
||||
strings = (string_t *) (list + 1);
|
||||
strings = (pr_string_t *) (list + 1);
|
||||
list->list = PR_SetPointer (pr, strings);
|
||||
for (i = 0; i < filelist->count; i++)
|
||||
strings[i] = PR_SetDynamicString (pr, filelist->list[i]);
|
||||
|
@ -174,7 +174,7 @@ static void
|
|||
bi_QFS_FilelistFree (progs_t *pr)
|
||||
{
|
||||
qfslist_t *list = &P_STRUCT (pr, qfslist_t, 0);
|
||||
string_t *strings = &G_STRUCT (pr, string_t, list->list);
|
||||
pr_string_t *strings = &G_STRUCT (pr, pr_string_t, list->list);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < list->count; i++)
|
||||
|
|
|
@ -56,7 +56,7 @@ bi_va_copy (progs_t *pr)
|
|||
__auto_type src_list = &G_STRUCT (pr, pr_type_t, src_args->list);
|
||||
size_t parm_size = pr->pr_param_size * sizeof(pr_type_t);
|
||||
size_t size = src_args->count * parm_size;
|
||||
string_t dst_list_block = 0;
|
||||
pr_string_t dst_list_block = 0;
|
||||
pr_type_t *dst_list = 0;
|
||||
|
||||
if (size) {
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
typedef struct {
|
||||
script_t script;
|
||||
string_t dstr;
|
||||
pr_string_t dstr;
|
||||
progs_t *pr;
|
||||
} rua_script_t;
|
||||
|
||||
|
|
|
@ -432,8 +432,8 @@ bi_i_SetIterator__element (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__add_ (progs_t *pr)
|
||||
{
|
||||
pointer_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
pr_ptr_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = set_obj->set;
|
||||
|
@ -445,8 +445,8 @@ bi_i_Set__add_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__remove_ (progs_t *pr)
|
||||
{
|
||||
pointer_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
pr_ptr_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = set_obj->set;
|
||||
|
@ -458,8 +458,8 @@ bi_i_Set__remove_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__invert (progs_t *pr)
|
||||
{
|
||||
pointer_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
pr_ptr_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = set_obj->set;
|
||||
|
@ -470,8 +470,8 @@ bi_i_Set__invert (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__union_ (progs_t *pr)
|
||||
{
|
||||
pointer_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_ptr_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
|
@ -484,9 +484,9 @@ bi_i_Set__union_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__intersection_ (progs_t *pr)
|
||||
{
|
||||
pointer_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
pr_ptr_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = dst_obj->set;
|
||||
|
@ -498,9 +498,9 @@ bi_i_Set__intersection_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__difference_ (progs_t *pr)
|
||||
{
|
||||
pointer_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
pr_ptr_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = dst_obj->set;
|
||||
|
@ -512,9 +512,9 @@ bi_i_Set__difference_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__reverse_difference_ (progs_t *pr)
|
||||
{
|
||||
pointer_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
pr_ptr_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = dst_obj->set;
|
||||
|
@ -526,9 +526,9 @@ bi_i_Set__reverse_difference_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__assign_ (progs_t *pr)
|
||||
{
|
||||
pointer_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
pr_ptr_t dst_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *dst_obj = &G_STRUCT (pr, pr_set_t, dst_ptr);
|
||||
pr_set_t *src_obj = &P_STRUCT (pr, pr_set_t, 2);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = dst_obj->set;
|
||||
|
@ -540,8 +540,8 @@ bi_i_Set__assign_ (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__empty (progs_t *pr)
|
||||
{
|
||||
pointer_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
pr_ptr_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = set_obj->set;
|
||||
|
@ -552,8 +552,8 @@ bi_i_Set__empty (progs_t *pr)
|
|||
static void
|
||||
bi_i_Set__everything (progs_t *pr)
|
||||
{
|
||||
pointer_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
pr_ptr_t set_ptr = P_POINTER (pr, 0);
|
||||
pr_set_t *set_obj = &G_STRUCT (pr, pr_set_t, set_ptr);
|
||||
|
||||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = set_obj->set;
|
||||
|
|
|
@ -108,7 +108,7 @@ bi_str_free (progs_t *pr)
|
|||
static void
|
||||
bi_str_hold (progs_t *pr)
|
||||
{
|
||||
string_t str = P_STRING (pr, 0);
|
||||
pr_string_t str = P_STRING (pr, 0);
|
||||
PR_HoldString (pr, str);
|
||||
R_STRING (pr) = str;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ typedef struct {
|
|||
float *time;
|
||||
float *frametime;
|
||||
float *force_retouch;
|
||||
string_t *mapname;
|
||||
string_t *startspot;
|
||||
pr_string_t *mapname;
|
||||
pr_string_t *startspot;
|
||||
float *deathmatch;
|
||||
float *coop;
|
||||
float *teamplay;
|
||||
|
@ -68,7 +68,7 @@ typedef struct {
|
|||
float *trace_inopen;
|
||||
float *trace_inwater;
|
||||
pr_uint_t *msg_entity;
|
||||
string_t *null;
|
||||
pr_string_t *null;
|
||||
|
||||
pr_uint_t *newmis;
|
||||
} sv_globals_t;
|
||||
|
@ -106,8 +106,8 @@ typedef struct
|
|||
pr_int_t angles; //vec3_t
|
||||
pr_int_t avelocity; //vec3_t
|
||||
pr_int_t punchangle; //vec3_t
|
||||
pr_int_t classname; //string_t
|
||||
pr_int_t model; //string_t
|
||||
pr_int_t classname; //pr_string_t
|
||||
pr_int_t model; //pr_string_t
|
||||
pr_int_t frame; //float
|
||||
pr_int_t skin; //float
|
||||
pr_int_t effects; //float
|
||||
|
@ -123,7 +123,7 @@ typedef struct
|
|||
pr_int_t health; //float
|
||||
pr_int_t frags; //float
|
||||
pr_int_t weapon; //float
|
||||
pr_int_t weaponmodel; //string_t
|
||||
pr_int_t weaponmodel; //pr_string_t
|
||||
pr_int_t weaponframe; //float
|
||||
pr_int_t currentammo; //float
|
||||
pr_int_t ammo_shells; //float
|
||||
|
@ -142,7 +142,7 @@ typedef struct
|
|||
pr_int_t fixangle; //float
|
||||
pr_int_t v_angle; //vec3_t
|
||||
pr_int_t idealpitch; //float
|
||||
pr_int_t netname; //string_t
|
||||
pr_int_t netname; //pr_string_t
|
||||
pr_int_t enemy; //int
|
||||
pr_int_t flags; //float
|
||||
pr_int_t colormap; //float
|
||||
|
@ -160,7 +160,7 @@ typedef struct
|
|||
pr_int_t dmg_inflictor; //int
|
||||
pr_int_t owner; //int
|
||||
pr_int_t movedir; //vec3_t
|
||||
pr_int_t message; //string_t
|
||||
pr_int_t message; //pr_string_t
|
||||
pr_int_t sounds; //float
|
||||
|
||||
pr_int_t rotated_bbox; //int
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct {
|
|||
float *frametime;
|
||||
pr_uint_t *newmis;
|
||||
float *force_retouch;
|
||||
string_t *mapname;
|
||||
pr_string_t *mapname;
|
||||
float *serverflags;
|
||||
float *total_secrets;
|
||||
float *total_monsters;
|
||||
|
@ -108,8 +108,8 @@ typedef struct
|
|||
pr_int_t velocity; //vec3_t
|
||||
pr_int_t angles; //vec3_t
|
||||
pr_int_t avelocity; //vec3_t
|
||||
pr_int_t classname; //string_t
|
||||
pr_int_t model; //string_t
|
||||
pr_int_t classname; //pr_string_t
|
||||
pr_int_t model; //pr_string_t
|
||||
pr_int_t frame; //float
|
||||
pr_int_t skin; //float
|
||||
pr_int_t effects; //float
|
||||
|
@ -124,7 +124,7 @@ typedef struct
|
|||
pr_int_t health; //float
|
||||
pr_int_t frags; //float
|
||||
pr_int_t weapon; //float
|
||||
pr_int_t weaponmodel; //string_t
|
||||
pr_int_t weaponmodel; //pr_string_t
|
||||
pr_int_t weaponframe; //float
|
||||
pr_int_t currentammo; //float
|
||||
pr_int_t ammo_shells; //float
|
||||
|
@ -141,7 +141,7 @@ typedef struct
|
|||
pr_int_t impulse; //float
|
||||
pr_int_t fixangle; //float
|
||||
pr_int_t v_angle; //vec3_t
|
||||
pr_int_t netname; //string_t
|
||||
pr_int_t netname; //pr_string_t
|
||||
pr_int_t enemy; //int
|
||||
pr_int_t flags; //float
|
||||
pr_int_t colormap; //float
|
||||
|
@ -158,7 +158,7 @@ typedef struct
|
|||
pr_int_t dmg_save; //float
|
||||
pr_int_t dmg_inflictor; //int
|
||||
pr_int_t owner; //int
|
||||
pr_int_t message; //string_t
|
||||
pr_int_t message; //pr_string_t
|
||||
pr_int_t sounds; //float
|
||||
pr_int_t rotated_bbox; //int
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ PF_putsaytime (progs_t *pr)
|
|||
static void
|
||||
PF_makestr (progs_t *pr)
|
||||
{
|
||||
string_t res = PR_NewMutableString (pr);
|
||||
pr_string_t res = PR_NewMutableString (pr);
|
||||
dstring_t *dst = PR_GetMutableString (pr, res);
|
||||
const char *src = P_GSTRING (pr, 0);
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ static void
|
|||
qdb_set_trace (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
int state = P_INT (pr, 1);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
@ -216,7 +216,7 @@ static void
|
|||
qdb_set_breakpoint (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
unsigned staddr = P_INT (pr, 1);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
@ -234,7 +234,7 @@ static void
|
|||
qdb_clear_breakpoint (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
unsigned staddr = P_UINT (pr, 1);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
@ -251,8 +251,8 @@ static void
|
|||
qdb_set_watchpoint (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pointer_t offset = P_UINT (pr, 1);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t offset = P_UINT (pr, 1);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
||||
|
@ -268,7 +268,7 @@ static void
|
|||
qdb_clear_watchpoint (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
||||
|
@ -280,7 +280,7 @@ static void
|
|||
qdb_continue (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
|
||||
pthread_mutex_lock (&target->run_cond.mut);
|
||||
|
@ -293,12 +293,12 @@ static void
|
|||
qdb_get_state (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
pr_lineno_t *lineno;
|
||||
pr_auxfunction_t *f;
|
||||
string_t file = 0;
|
||||
pr_string_t file = 0;
|
||||
unsigned line = 0;
|
||||
unsigned staddr = tpr->pr_xstatement;
|
||||
func_t func = 0;
|
||||
|
@ -331,7 +331,7 @@ static void
|
|||
qdb_get_stack_depth (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
|
||||
|
@ -342,7 +342,7 @@ static void
|
|||
qdb_get_stack (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
int count = tpr->pr_depth;
|
||||
|
@ -350,7 +350,7 @@ qdb_get_stack (progs_t *pr)
|
|||
R_POINTER (pr) = 0;
|
||||
if (count > 0) {
|
||||
size_t size = count * sizeof (qdb_stack_t);
|
||||
string_t stack_block = PR_AllocTempBlock (pr, size);
|
||||
pr_string_t stack_block = PR_AllocTempBlock (pr, size);
|
||||
__auto_type stack = (qdb_stack_t *) PR_GetString (pr, stack_block);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -366,7 +366,7 @@ static void
|
|||
qdb_get_event (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
__auto_type event = &P_STRUCT (pr, qdb_event_t, 1);
|
||||
|
||||
|
@ -400,12 +400,12 @@ static void
|
|||
qdb_get_data (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
pointer_t srcoff = P_POINTER (pr, 1);
|
||||
pr_ptr_t srcoff = P_POINTER (pr, 1);
|
||||
unsigned length = P_UINT (pr, 2);
|
||||
pointer_t dstoff = P_POINTER(pr, 3);
|
||||
pr_ptr_t dstoff = P_POINTER(pr, 3);
|
||||
|
||||
pr_type_t *src = PR_GetPointer(tpr, srcoff);
|
||||
pr_type_t *dst = PR_GetPointer(pr, dstoff);
|
||||
|
@ -426,10 +426,10 @@ static void
|
|||
qdb_get_string (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
string_t string = P_STRING (pr, 1);
|
||||
pr_string_t string = P_STRING (pr, 1);
|
||||
|
||||
R_STRING (pr) = 0;
|
||||
if (PR_StringValid (tpr, string)) {
|
||||
|
@ -441,7 +441,7 @@ static void
|
|||
qdb_get_file_path (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *file = P_GSTRING (pr, 1);
|
||||
|
@ -466,7 +466,7 @@ static void
|
|||
qdb_find_string (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *str = P_GSTRING (pr, 1);
|
||||
|
@ -478,7 +478,7 @@ static void
|
|||
qdb_find_global (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *name = P_GSTRING (pr, 1);
|
||||
|
@ -498,7 +498,7 @@ static void
|
|||
qdb_find_field (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *name = P_GSTRING (pr, 1);
|
||||
|
@ -536,7 +536,7 @@ static void
|
|||
qdb_find_function (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *name = P_GSTRING (pr, 1);
|
||||
|
@ -549,7 +549,7 @@ static void
|
|||
qdb_get_function (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
pr_uint_t fnum = P_INT (pr, 1);
|
||||
|
@ -583,7 +583,7 @@ static void
|
|||
qdb_find_auxfunction (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *name = P_GSTRING (pr, 1);
|
||||
|
@ -601,7 +601,7 @@ static void
|
|||
qdb_get_auxfunction (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
pr_uint_t fnum = P_UINT (pr, 1);
|
||||
|
@ -614,7 +614,7 @@ static void
|
|||
qdb_get_local_defs (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
pr_uint_t fnum = P_UINT (pr, 1);
|
||||
|
@ -640,7 +640,7 @@ static void
|
|||
qdb_get_source_line_addr (progs_t *pr)
|
||||
{
|
||||
__auto_type debug = PR_Resources_Find (pr, "qwaq-debug");
|
||||
pointer_t handle = P_INT (pr, 0);
|
||||
pr_ptr_t handle = P_INT (pr, 0);
|
||||
qwaq_target_t *target = get_target (debug, __FUNCTION__, handle);
|
||||
progs_t *tpr = target->pr;
|
||||
const char *file = P_GSTRING (pr, 1);
|
||||
|
|
|
@ -239,7 +239,7 @@ spawn_progs (qwaq_thread_t *thread)
|
|||
{
|
||||
dfunction_t *dfunc;
|
||||
const char *name = 0;
|
||||
string_t *pr_argv;
|
||||
pr_string_t *pr_argv;
|
||||
int pr_argc = 1, i;
|
||||
progs_t *pr;
|
||||
|
||||
|
|
|
@ -16,14 +16,14 @@ typedef enum {
|
|||
#define umax 0x7fffffff
|
||||
#endif
|
||||
|
||||
typedef string string_t;
|
||||
typedef string pr_string_t;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct qdb_event_s {
|
||||
prdebug_t what;
|
||||
union {
|
||||
string_t message;
|
||||
pr_string_t message;
|
||||
unsigned function;
|
||||
int exit_code;
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ typedef struct qdb_event_s {
|
|||
typedef struct qdb_state_s {
|
||||
unsigned staddr;
|
||||
unsigned func;
|
||||
string_t file;
|
||||
pr_string_t file;
|
||||
unsigned line;
|
||||
} qdb_state_t;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ typedef struct eb_color_s {
|
|||
|
||||
typedef struct qwaq_editbuffer_s {
|
||||
pr_id_t isa;
|
||||
pointer_t buffer;
|
||||
pr_ptr_t buffer;
|
||||
} qwaq_editbuffer_t;
|
||||
|
||||
#endif//!__QFCC__
|
||||
|
|
|
@ -9,20 +9,20 @@ typedef struct qwaq_devinfo_s {
|
|||
string name;
|
||||
string id;
|
||||
#else
|
||||
string_t name;
|
||||
string_t id;
|
||||
pr_string_t name;
|
||||
pr_string_t id;
|
||||
#endif
|
||||
int numaxes;
|
||||
#ifdef __QFCC__
|
||||
in_axisinfo_t *axes;
|
||||
#else
|
||||
pointer_t axes;
|
||||
pr_ptr_t axes;
|
||||
#endif
|
||||
int numbuttons;
|
||||
#ifdef __QFCC__
|
||||
in_axisinfo_t *buttons;
|
||||
#else
|
||||
pointer_t buttons;
|
||||
pr_ptr_t buttons;
|
||||
#endif
|
||||
} qwaq_devinfo_t;
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ typedef union qwaq_message_s {
|
|||
void *pointer_val;
|
||||
string string_val;
|
||||
#else
|
||||
pointer_t pointer_val;
|
||||
string_t string_val;
|
||||
pr_ptr_t pointer_val;
|
||||
pr_string_t string_val;
|
||||
#endif
|
||||
} qwaq_message_t;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
typedef struct qwaq_textcontext_s {
|
||||
pr_id_t isa;
|
||||
pointer_t window;
|
||||
pr_ptr_t window;
|
||||
union {
|
||||
Rect rect;
|
||||
struct {
|
||||
|
|
|
@ -98,7 +98,7 @@ typedef struct def_s {
|
|||
unsigned system:1; ///< system def
|
||||
unsigned nosave:1; ///< don't set DEF_SAVEGLOBAL
|
||||
|
||||
string_t file; ///< declaring/defining source file
|
||||
pr_string_t file; ///< declaring/defining source file
|
||||
int line; ///< declaring/defining source line
|
||||
|
||||
int qfo_def; ///< index to def in qfo defs
|
||||
|
|
|
@ -243,7 +243,7 @@ typedef struct expr_s {
|
|||
struct expr_s *next; ///< the next expression in a block expression
|
||||
expr_type type; ///< the type of the result of this expression
|
||||
int line; ///< source line that generated this expression
|
||||
string_t file; ///< source file that generated this expression
|
||||
pr_string_t file; ///< source file that generated this expression
|
||||
int printid; ///< avoid duplicate output when printing
|
||||
unsigned paren:1; ///< the expression is enclosed in ()
|
||||
unsigned rvalue:1; ///< the expression is on the right side of =
|
||||
|
|
|
@ -53,7 +53,7 @@ typedef struct overloaded_function_s {
|
|||
///< encoding
|
||||
const struct type_s *type; ///< type of this function
|
||||
int overloaded; ///< is this function overloaded
|
||||
string_t file; ///< source file of the function
|
||||
pr_string_t file; ///< source file of the function
|
||||
int line; ///< source line of this function
|
||||
} overloaded_function_t;
|
||||
|
||||
|
@ -66,8 +66,8 @@ typedef struct function_s {
|
|||
int function_num;
|
||||
int line_info;
|
||||
int local_defs;
|
||||
string_t s_file; ///< source file with definition
|
||||
string_t s_name; ///< name of function in output
|
||||
pr_string_t s_file; ///< source file with definition
|
||||
pr_string_t s_name; ///< name of function in output
|
||||
const struct type_s *type; ///< function's type without aliases
|
||||
int temp_num; ///< number for next temp var
|
||||
struct def_s *temp_defs[4]; ///< freed temp vars (by size)
|
||||
|
|
|
@ -97,16 +97,16 @@ typedef struct qfo_space_s {
|
|||
/** Representation of a def in the object file.
|
||||
*/
|
||||
typedef struct qfo_def_s {
|
||||
pointer_t type; ///< offset in type space
|
||||
string_t name; ///< def name
|
||||
pointer_t offset; ///< def offset (address)
|
||||
pr_ptr_t type; ///< offset in type space
|
||||
pr_string_t name; ///< def name
|
||||
pr_ptr_t offset; ///< def offset (address)
|
||||
|
||||
pr_uint_t relocs; ///< index of first reloc record
|
||||
pr_uint_t num_relocs; ///< number of reloc records
|
||||
|
||||
pr_uint_t flags; ///< \ref qfcc_qfo_QFOD "QFOD flags"
|
||||
|
||||
string_t file; ///< source file name
|
||||
pr_string_t file; ///< source file name
|
||||
pr_uint_t line; ///< source line number
|
||||
} qfo_def_t;
|
||||
///@}
|
||||
|
@ -180,9 +180,9 @@ typedef struct qfo_def_s {
|
|||
/** Representation of a function in the object file.
|
||||
*/
|
||||
typedef struct qfo_func_s {
|
||||
string_t name; ///< function name
|
||||
pointer_t type; ///< function type (in type data space)
|
||||
string_t file; ///< source file name
|
||||
pr_string_t name; ///< function name
|
||||
pr_ptr_t type; ///< function type (in type data space)
|
||||
pr_string_t file; ///< source file name
|
||||
pr_uint_t line; ///< source line number
|
||||
|
||||
/** \name Function code location.
|
||||
|
@ -367,7 +367,7 @@ enum {
|
|||
\param q pointer to ::qfo_t struct
|
||||
\param s space index
|
||||
\param o offset into object file data space
|
||||
\return string_t lvalue
|
||||
\return pr_string_t lvalue
|
||||
|
||||
\hideinitializer
|
||||
*/
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
typedef struct srcline_s srcline_t;
|
||||
struct srcline_s {
|
||||
srcline_t *next;
|
||||
string_t source_file;
|
||||
pr_string_t source_file;
|
||||
int source_line;
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ typedef struct pr_info_s {
|
|||
struct symtab_s *entity_fields;
|
||||
|
||||
srcline_t *srcline_stack;
|
||||
string_t source_file;
|
||||
pr_string_t source_file;
|
||||
int source_line;
|
||||
int error_count;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct reloc_s {
|
|||
///< adjustment
|
||||
reloc_type type; ///< type type of relocation to perform
|
||||
int line; ///< current source line when creating reloc
|
||||
string_t file; ///< current source file when creating reloc
|
||||
pr_string_t file; ///< current source file when creating reloc
|
||||
const void *return_address; ///< for debugging
|
||||
} reloc_t;
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ emit_static_instances_list (void)
|
|||
type_t *instance_lists_type;
|
||||
symbol_t *instance_lists_sym;
|
||||
def_t *instance_lists_def;
|
||||
pointer_t *list;
|
||||
pr_ptr_t *list;
|
||||
defspace_t *space;
|
||||
|
||||
if (!static_instance_classes || !static_instances) {
|
||||
|
@ -309,7 +309,7 @@ emit_static_instances_list (void)
|
|||
instance_lists_def->initialized = instance_lists_def->constant = 1;
|
||||
instance_lists_def->nosave = 1;
|
||||
|
||||
list = D_POINTER (pointer_t, instance_lists_def);
|
||||
list = D_POINTER (pr_ptr_t, instance_lists_def);
|
||||
space = instance_lists_def->space;
|
||||
for (int i = 0; i < num_classes; i++, list++) {
|
||||
EMIT_DEF (space, *list, instance_lists[i]);
|
||||
|
|
|
@ -50,8 +50,8 @@ static void
|
|||
report_function (const expr_t *e)
|
||||
{
|
||||
static function_t *last_func = (function_t *)-1L;
|
||||
static string_t last_file;
|
||||
string_t file = pr.source_file;
|
||||
static pr_string_t last_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
srcline_t *srcline;
|
||||
|
||||
if (e)
|
||||
|
@ -81,7 +81,7 @@ static __attribute__((format(PRINTF, 4, 0))) void
|
|||
format_message (dstring_t *message, const char *msg_type, const expr_t *e,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
string_t file = pr.source_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
int line = pr.source_line;
|
||||
const char *colon = fmt ? ": " : "";
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ dump_def (progs_t *pr, pr_def_t *def, int indent)
|
|||
const char *type;
|
||||
pr_uint_t offset;
|
||||
const char *comment;
|
||||
string_t string;
|
||||
pr_string_t string;
|
||||
const char *str;
|
||||
int saveglobal;
|
||||
|
||||
|
@ -86,7 +86,7 @@ dump_def (progs_t *pr, pr_def_t *def, int indent)
|
|||
break;
|
||||
case ev_string:
|
||||
string = G_INT (pr, offset);
|
||||
// at runtime, strings can be negative (thus string_t is
|
||||
// at runtime, strings can be negative (thus pr_string_t is
|
||||
// signed), but negative strings means they have been
|
||||
// dynamically allocated, thus a negative string index should
|
||||
// never appear in compiled code
|
||||
|
@ -241,7 +241,7 @@ dump_functions (progs_t *pr)
|
|||
int start;
|
||||
const char *comment;
|
||||
pr_def_t *encodings_def;
|
||||
pointer_t type_encodings = 0;
|
||||
pr_ptr_t type_encodings = 0;
|
||||
|
||||
encodings_def = PR_FindGlobal (pr, ".type_encodings");
|
||||
if (encodings_def) {
|
||||
|
@ -516,7 +516,7 @@ static const char *ty_meta_names[] = {
|
|||
static void
|
||||
dump_qfo_types (qfo_t *qfo, int base_address)
|
||||
{
|
||||
pointer_t type_ptr;
|
||||
pr_ptr_t type_ptr;
|
||||
qfot_type_t *type;
|
||||
const char *meta;
|
||||
int i, count;
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct {
|
|||
const char *source_file;
|
||||
pr_uint_t source_line;
|
||||
pr_int_t first_statement;
|
||||
pointer_t return_type;
|
||||
pr_ptr_t return_type;
|
||||
pr_uint_t local_defs;
|
||||
pr_uint_t num_locals;
|
||||
pr_uint_t line_info;
|
||||
|
|
|
@ -130,7 +130,7 @@ dump_protocol (progs_t *pr, pr_protocol_t *proto)
|
|||
{
|
||||
const char *protocol_name = "<invalid string>";
|
||||
printf (" %x %x ",
|
||||
(pointer_t) ((pr_int_t *) proto - (pr_int_t *) pr->pr_globals),
|
||||
(pr_ptr_t) ((pr_int_t *) proto - (pr_int_t *) pr->pr_globals),
|
||||
proto->class_pointer);
|
||||
if (PR_StringValid (pr, proto->protocol_name))
|
||||
protocol_name = PR_GetString (pr, proto->protocol_name);
|
||||
|
@ -216,9 +216,9 @@ dump_category (progs_t *pr, pr_category_t *category)
|
|||
}
|
||||
|
||||
static void
|
||||
dump_static_instance_lists (progs_t *pr, pointer_t instance_lists)
|
||||
dump_static_instance_lists (progs_t *pr, pr_ptr_t instance_lists)
|
||||
{
|
||||
pointer_t *ptr = &G_STRUCT (pr, pointer_t, instance_lists);
|
||||
pr_ptr_t *ptr = &G_STRUCT (pr, pr_ptr_t, instance_lists);
|
||||
|
||||
printf (" static instance lists @ %x\n", instance_lists);
|
||||
while (*ptr) {
|
||||
|
@ -245,7 +245,7 @@ static void
|
|||
dump_module (progs_t *pr, pr_module_t *module)
|
||||
{
|
||||
pr_symtab_t *symtab = &G_STRUCT (pr, pr_symtab_t, module->symtab);
|
||||
pointer_t *ptr = symtab->defs;
|
||||
pr_ptr_t *ptr = symtab->defs;
|
||||
pr_sel_t *sel = &G_STRUCT (pr, pr_sel_t, symtab->refs);
|
||||
int i;
|
||||
const char *module_name = "<invalid string>";
|
||||
|
|
|
@ -2551,7 +2551,7 @@ expr_t *
|
|||
build_if_statement (int not, expr_t *test, expr_t *s1, expr_t *els, expr_t *s2)
|
||||
{
|
||||
int line = pr.source_line;
|
||||
string_t file = pr.source_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
expr_t *if_expr;
|
||||
expr_t *tl = new_label_expr ();
|
||||
expr_t *fl = new_label_expr ();
|
||||
|
@ -2610,7 +2610,7 @@ build_while_statement (int not, expr_t *test, expr_t *statement,
|
|||
expr_t *break_label, expr_t *continue_label)
|
||||
{
|
||||
int line = pr.source_line;
|
||||
string_t file = pr.source_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
expr_t *l1 = new_label_expr ();
|
||||
expr_t *l2 = break_label;
|
||||
expr_t *while_expr;
|
||||
|
@ -2650,7 +2650,7 @@ build_do_while_statement (expr_t *statement, int not, expr_t *test,
|
|||
{
|
||||
expr_t *l1 = new_label_expr ();
|
||||
int line = pr.source_line;
|
||||
string_t file = pr.source_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
expr_t *do_while_expr;
|
||||
|
||||
if (!statement) {
|
||||
|
@ -2696,7 +2696,7 @@ build_for_statement (expr_t *init, expr_t *test, expr_t *next,
|
|||
expr_t *l1 = 0;
|
||||
expr_t *t;
|
||||
int line = pr.source_line;
|
||||
string_t file = pr.source_file;
|
||||
pr_string_t file = pr.source_file;
|
||||
expr_t *for_expr;
|
||||
|
||||
if (next)
|
||||
|
|
|
@ -245,7 +245,7 @@ defs_get_key (const void *_r, void *unused)
|
|||
int
|
||||
linker_add_string (const char *str)
|
||||
{
|
||||
string_t new;
|
||||
pr_string_t new;
|
||||
new = strpool_addstr (work_strings, str);
|
||||
work->spaces[qfo_strings_space].strings = work_strings->strings;
|
||||
work->spaces[qfo_strings_space].data_size = work_strings->size;
|
||||
|
@ -875,7 +875,7 @@ process_type_space (qfo_t *qfo, qfo_mspace_t *space, int pass)
|
|||
// while we're at it, relocate all references in the type encoding
|
||||
// space so the type encodings are always correct.
|
||||
if (reloc->type == rel_def_string) {
|
||||
string_t str;
|
||||
pr_string_t str;
|
||||
str = linker_add_string (QFOSTR (qfo, reloc->target));
|
||||
QFO_STRING (work, reloc->space, reloc->offset) = str;
|
||||
} else if (reloc->type == rel_def_def || reloc->type == -1) {
|
||||
|
|
|
@ -678,7 +678,7 @@ qfo_delete (qfo_t *qfo)
|
|||
}
|
||||
|
||||
static etype_t
|
||||
get_def_type (qfo_t *qfo, pointer_t type)
|
||||
get_def_type (qfo_t *qfo, pr_ptr_t type)
|
||||
{
|
||||
qfot_type_t *type_def;
|
||||
if (type >= qfo->spaces[qfo_type_space].data_size)
|
||||
|
@ -705,7 +705,7 @@ get_def_type (qfo_t *qfo, pointer_t type)
|
|||
}
|
||||
|
||||
static __attribute__((pure)) int
|
||||
get_type_size (qfo_t *qfo, pointer_t type)
|
||||
get_type_size (qfo_t *qfo, pr_ptr_t type)
|
||||
{
|
||||
qfot_type_t *type_def;
|
||||
int i, size;
|
||||
|
@ -755,7 +755,7 @@ qfo_log2 (unsigned x)
|
|||
}
|
||||
|
||||
static __attribute__((pure)) int
|
||||
get_type_alignment_log (qfo_t *qfo, pointer_t type)
|
||||
get_type_alignment_log (qfo_t *qfo, pr_ptr_t type)
|
||||
{
|
||||
qfot_type_t *type_def;
|
||||
int i, alignment;
|
||||
|
@ -791,7 +791,7 @@ get_type_alignment_log (qfo_t *qfo, pointer_t type)
|
|||
}
|
||||
|
||||
static __attribute__((pure)) dparmsize_t
|
||||
get_parmsize (qfo_t *qfo, pointer_t type)
|
||||
get_parmsize (qfo_t *qfo, pr_ptr_t type)
|
||||
{
|
||||
dparmsize_t parmsize = {
|
||||
get_type_size (qfo, type),
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
typedef def_t *(*encode_f) (type_t *type, defspace_t *space);
|
||||
|
||||
static string_t
|
||||
static pr_string_t
|
||||
encoding_string (const char *string)
|
||||
{
|
||||
int str;
|
||||
|
|
|
@ -32,7 +32,7 @@ pr_info_t pr;
|
|||
type_t type_Class;
|
||||
type_t type_SEL;
|
||||
type_t type_id;
|
||||
__attribute__((const)) string_t ReuseString (const char *str) {return 0;}
|
||||
__attribute__((const)) pr_string_t ReuseString (const char *str) {return 0;}
|
||||
__attribute__((const)) codespace_t *codespace_new (void) {return 0;}
|
||||
void codespace_addcode (codespace_t *codespace, struct dstatement_s *code, int size) {}
|
||||
__attribute__((const)) int function_parms (function_t *f, byte *parm_size) {return 0;}
|
||||
|
|
|
@ -408,7 +408,7 @@ switch_expr (switch_block_t *switch_block, expr_t *break_label,
|
|||
expr_t *default_expr;
|
||||
int num_labels = 0;
|
||||
int saved_line = pr.source_line;
|
||||
string_t saved_file = pr.source_file;
|
||||
pr_string_t saved_file = pr.source_file;
|
||||
|
||||
pr.source_line = sw_val->line = switch_block->test->line;
|
||||
pr.source_file = sw_val->file = switch_block->test->file;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
typedef struct {
|
||||
def_t *def;
|
||||
union {
|
||||
string_t string_val;
|
||||
pr_string_t string_val;
|
||||
float float_val;
|
||||
float vector_val[3];
|
||||
int entity_val;
|
||||
|
|
|
@ -261,7 +261,7 @@ main (int argc, char **argv)
|
|||
dfunction_t *dfunc;
|
||||
func_t main_func = 0;
|
||||
const char *name = "progs.dat";
|
||||
string_t *pr_argv;
|
||||
pr_string_t *pr_argv;
|
||||
int pr_argc = 1, i;
|
||||
|
||||
i = parse_options (argc, argv);
|
||||
|
|
Loading…
Reference in a new issue