type.str 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* $Header$ */
  2. /* TYPE DESCRIPTOR */
  3. #include "nofloat.h"
  4. #include "nobitfield.h"
  5. struct type {
  6. struct type *next; /* used only with ARRAY */
  7. short tp_fund; /* fundamental type */
  8. char tp_unsigned;
  9. int tp_align;
  10. arith tp_size; /* -1 if declared but not defined */
  11. struct idf *tp_idf; /* name of STRUCT, UNION or ENUM */
  12. struct sdef *tp_sdef; /* to first selector */
  13. struct type *tp_up; /* from FIELD, POINTER, ARRAY
  14. or FUNCTION to fund. */
  15. struct field *tp_field; /* field descriptor if fund == FIELD */
  16. struct type *tp_pointer;/* to POINTER */
  17. struct type *tp_array; /* to ARRAY */
  18. struct type *tp_function;/* to FUNCTION */
  19. };
  20. extern struct type
  21. *create_type(), *standard_type(), *construct_type(), *pointer_to(),
  22. *array_of(), *function_of();
  23. #ifndef NOBITFIELD
  24. extern struct type *field_of();
  25. #endif NOBITFIELD
  26. extern struct type
  27. *char_type, *uchar_type,
  28. *short_type, *ushort_type,
  29. *word_type, *uword_type,
  30. *int_type, *uint_type,
  31. *long_type, *ulong_type,
  32. #ifndef NOFLOAT
  33. *float_type, *double_type,
  34. #endif NOFLOAT
  35. *void_type, *label_type,
  36. *string_type, *funint_type, *error_type;
  37. extern struct type *pa_type; /* type.c */
  38. extern arith size_of_type(), align();
  39. /* ALLOCDEF "type" 50 */