return;
}
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_SET:
m2_short_set(type, stream, show, level);
fprintf_filtered (stream, "PROCEDURE ");
m2_type_name (type, stream);
if (TYPE_TARGET_TYPE (type) == NULL
- || TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+ || TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID)
{
int i, len = TYPE_NFIELDS (type);
int len, i;
struct type *range;
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
{
/* check if all fields of the RECORD are consecutive sets. */
{
if (TYPE_FIELD_TYPE (type, i) == NULL)
return 0;
- if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) != TYPE_CODE_SET)
+ if (TYPE_FIELD_TYPE (type, i)->code () != TYPE_CODE_SET)
return 0;
if (TYPE_FIELD_NAME (type, i) != NULL
&& (strcmp (TYPE_FIELD_NAME (type, i), "") != 0))
m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
{
type = check_typedef (type);
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_CHAR:
if (TYPE_LENGTH (type) < sizeof (LONGEST))
LONGEST l1, l2;
LONGEST h1, h2;
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
{
len = TYPE_NFIELDS (type);
i = TYPE_N_BASECLASSES (type);
int
m2_is_unbounded_array (struct type *type)
{
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
{
/*
* check if we have a structure with exactly two fields named
return 0;
if (strcmp (TYPE_FIELD_NAME (type, 1), "_m2_high") != 0)
return 0;
- if (TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) != TYPE_CODE_PTR)
+ if (TYPE_FIELD_TYPE (type, 0)->code () != TYPE_CODE_PTR)
return 0;
return 1;
}
wrap_here (" ");
if (show < 0)
{
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
fprintf_filtered (stream, "RECORD ... END ");
- else if (TYPE_CODE (type) == TYPE_CODE_UNION)
+ else if (type->code () == TYPE_CODE_UNION)
fprintf_filtered (stream, "CASE ... END ");
}
else if (show > 0)
int i;
int len = TYPE_NFIELDS (type);
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
fprintf_filtered (stream, "RECORD\n");
- else if (TYPE_CODE (type) == TYPE_CODE_UNION)
+ else if (type->code () == TYPE_CODE_UNION)
/* i18n: Do not translate "CASE" and "OF". */
fprintf_filtered (stream, _("CASE <variant> OF\n"));