type.str 1.4 KB

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