struct.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* $Header$ */
  2. /* SELECTOR DESCRIPTOR */
  3. struct sdef { /* for selectors */
  4. struct sdef *next;
  5. int sd_level;
  6. struct idf *sd_idf; /* its name */
  7. struct sdef *sd_sdef; /* the next selector */
  8. struct type *sd_stype; /* the struct it belongs to */
  9. struct type *sd_type; /* its type */
  10. arith sd_offset;
  11. };
  12. extern char *st_alloc();
  13. /* allocation definitions of struct sdef */
  14. /* ALLOCDEF "sdef" */
  15. extern char *st_alloc();
  16. extern struct sdef *h_sdef;
  17. #define new_sdef() ((struct sdef *) \
  18. st_alloc((char **)&h_sdef, sizeof(struct sdef)))
  19. #define free_sdef(p) st_free(p, h_sdef, sizeof(struct sdef))
  20. struct tag { /* for struct-, union- and enum tags */
  21. struct tag *next;
  22. int tg_level;
  23. int tg_busy; /* non-zero during declaration of struct/union pack */
  24. struct type *tg_type;
  25. };
  26. /* allocation definitions of struct tag */
  27. /* ALLOCDEF "tag" */
  28. extern char *st_alloc();
  29. extern struct tag *h_tag;
  30. #define new_tag() ((struct tag *) \
  31. st_alloc((char **)&h_tag, sizeof(struct tag)))
  32. #define free_tag(p) st_free(p, h_tag, sizeof(struct tag))
  33. struct sdef *idf2sdef();