type.str 1.4 KB

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