comm1.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* @(#)comm1.h 1.5 */
  7. /*
  8. * variable declarations
  9. */
  10. #ifdef extern
  11. #define INIT(x) = x
  12. #else
  13. #define INIT(x) /* empty */
  14. #endif
  15. extern short pass INIT(PASS_1);
  16. /* PASS 1, 2 or 3 */
  17. extern short peekc; /* push back symbol (PASS_1) */
  18. extern short unresolved; /* number of unresolved references */
  19. extern long lineno; /* input line number */
  20. extern short hllino; /* high-level language line number */
  21. extern short nerrors; /* terminate at end of pass if set */
  22. extern short sflag INIT(SYM_DEF);
  23. /* -s option (symbol table info) */
  24. extern char *progname; /* for error messages */
  25. extern char *modulename; /* for error messages */
  26. extern common_t *commons; /* header of commons list */
  27. #ifdef ASLD
  28. extern short archmode; /* scanning archives */
  29. extern long archsize; /* size of individual archive entries */
  30. #else
  31. extern short uflag; /* if 1 make undefineds extern */
  32. /* symbol table index for last S_UND */
  33. #endif
  34. #ifdef LISTING
  35. extern short dflag; /* -d option (list mode) */
  36. #endif
  37. #ifdef ASLD
  38. #ifdef RELOCATION
  39. extern short rflag; /* -r option (relocation info) */
  40. #endif /* RELOCATION */
  41. #else
  42. #define rflag 1
  43. extern valu_t relonami;
  44. #endif /* ASLD */
  45. #ifdef THREE_PASS
  46. extern short bflag; /* -b option (no optimizations) */
  47. #endif
  48. extern char *aoutpath INIT("a.out");
  49. extern char temppath[50];
  50. extern FILE *input;
  51. extern FILE *tempfile;
  52. extern char *stringbuf; /* contains last string value */
  53. extern int stringlen; /* contains length of last string value */
  54. extern sect_t sect[SECTMAX];
  55. /*
  56. * specials for the location counter
  57. */
  58. extern sect_t *DOTSCT; /* &sect[DOTTYP-S_MIN] or NULL */
  59. extern ADDR_T DOTVAL; /* DOTSCT->s_size + DOTSCT->s_base */
  60. extern short DOTTYP; /* S_MIN..S_MAX or S_UND */
  61. extern unsigned short nname; /* Counts name table index in PASS_3 */
  62. extern item_t *hashtab[H_TOTAL];
  63. extern short hashindex; /* see item_search() */
  64. extern item_t *fb_ptr[4*FB_SIZE];
  65. #ifdef THREE_PASS
  66. #define BITCHUNK (8 * MEMINCR)
  67. extern int nbits;
  68. extern int bitindex; /* bitindex * MEMINCR * 8 + nbits gives
  69. number of decisions so far
  70. */
  71. #endif
  72. #ifdef LISTING
  73. extern short listmode; /* -d option for current pass */
  74. extern short listtemp; /* listmode if .list seen */
  75. extern short listflag; /* copied from listtemp at '\n' */
  76. extern short listcolm; /* column on output */
  77. extern short listeoln INIT(1);
  78. /* set by endline, tested by emit1 */
  79. extern FILE *listfile; /* copy of source text */
  80. extern char listpath[50];
  81. #endif
  82. #ifndef extern
  83. extern item_t keytab[];
  84. extern struct outhead outhead;
  85. #endif
  86. extern int curr_token;
  87. /* forward function declarations */
  88. #ifdef ASLD
  89. extern char *readident();
  90. #endif
  91. extern char *remember();
  92. extern item_t *fb_shift();
  93. extern item_t *fb_alloc();
  94. extern item_t *item_alloc();
  95. extern item_t *item_search();
  96. extern valu_t load();
  97. extern FILE *ffcreat();
  98. extern FILE *fftemp();
  99. /* ========== Machine dependent C declarations ========== */
  100. #include "mach1.c"