diff options
Diffstat (limited to 'rt_struct.h')
-rw-r--r-- | rt_struct.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/rt_struct.h b/rt_struct.h index 891443d..2e14ad3 100644 --- a/rt_struct.h +++ b/rt_struct.h @@ -7,6 +7,7 @@ #include <time.h> typedef enum rts_type_tag rts_type_tag; +typedef enum rts_member_type rts_member_type; typedef struct rts_type rts_type; typedef struct rts_member rts_member; @@ -46,6 +47,19 @@ enum rts_type_tag { NUM_TAG }; +enum rts_member_type { + MBR_NORMAL, + MBR_ARRAY, + MBR_ARRAY_NEG1, + MBR_ARRAY_ZERO, + MBR_ARRAY_NULL, + MBR_PTR, + MBR_PTR_ARRAY, + MBR_PTR_ARRAY_NEG1, + MBR_PTR_ARRAY_ZERO, + MBR_PTR_ARRAY_NULL, +}; + struct rts_type { rts_type_tag tag; /* Type Tag. */ char *name; /* Name of type. */ @@ -57,10 +71,11 @@ struct rts_type { }; struct rts_member { - char *name; /* Name of member. */ - int ptr_count; /* Pointer count of member. */ - int arr_count; /* Array dimension count of member. */ - rts_type *type; /* Type of member. */ + char *name; /* Name of member. */ + rts_member_type mbr_type; /* Member type. */ + int dim_count; /* Dimension count (used by all types except MBR_NORMAL). */ + size_t *dim_sizes; /* Size of each dimension (used by MBR_ARRAY, and MBR_PTR_ARRAY). */ + rts_type *type; /* Type of member. */ }; #define TYPEDEF_RTS(name, type) \ |