home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / icon / dos / src / h / rexterns.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-10  |  8.3 KB  |  190 lines

  1. /*
  2.  * External declarations for the run-time system.
  3.  */
  4.  
  5. /*
  6.  * External declarations common to the compiler and interpreter.
  7.  */
  8. extern char allchars[];        /* array for making one-character strings */
  9. #ifndef MultiRegion
  10. extern char *blkbase;        /* base of allocated block region */
  11. extern char *blkend;        /* maximum address in allocated block region */
  12. extern char *blkfree;        /* first free word in allocated block region */
  13. #else                /* MultiRegion */
  14. extern struct region *curstring;
  15. extern struct region *curblock;
  16. #endif                /* MultiRegion */
  17. extern char *blkname[];        /* print names for block types. */
  18. extern char *currend;        /* current end of memory region */
  19. extern char *k_errortext;    /* value of &errortext */
  20. extern char *statbase;        /* start of static space */
  21. extern char *statend;        /* end of static space */
  22. extern char *statfree;        /* static space free list header */
  23. #ifndef MultiRegion
  24. extern char *strbase;        /* start of string space */
  25. extern char *strend;        /* end of string space */
  26. extern char *strfree;        /* string space free pointer */
  27. #endif                /* MultiRegion */
  28. extern dptr *quallist;        /* start of qualifier list */
  29. extern dptr argp;        /* argument pointer */
  30. extern int bsizes[];        /* sizes of blocks */
  31. extern int firstd[];        /* offset (words) of first descrip. */
  32. extern uword segsize[];        /* size of hash bucket segment */
  33. extern int have_errval;        /* &errorvalue has a legal value */
  34. extern int k_errornumber;    /* value of &errornumber */
  35. extern int k_level;        /* value of &level */
  36. extern int t_errornumber;    /* tentitive k_errornumber value */
  37. extern int t_have_val;        /* tentitive have_errval flag */
  38. extern struct b_coexpr *stklist;/* base of co-expression stack list */
  39. extern struct b_cset blankcs;   /* ' ' */
  40. extern struct b_cset lparcs;    /* '(' */
  41. extern struct b_cset rparcs;    /* ')' */
  42. extern struct b_cset fullcs;    /* cset containing all characters */
  43. extern struct b_file k_errout;    /* value of &errout */
  44. extern struct b_file k_input;    /* value of &input */
  45. extern struct b_file k_output;    /* value of &output */
  46. extern struct descrip blank;    /* blank */
  47. extern struct descrip emptystr;    /* empty string */
  48. extern struct descrip errout;    /* &errout */
  49. extern struct descrip input;    /* &input */
  50. extern struct descrip k_current;/* ¤t */
  51. extern struct descrip k_errorvalue;    /* value of &errorvalue */
  52. extern struct descrip kywd_err; /* descriptor for &error */
  53. extern struct descrip kywd_pos; /* descriptor for &pos */
  54. extern struct descrip kywd_ran; /* descriptor for &random */
  55. extern struct descrip k_subject;/* &subject */
  56. extern struct descrip kywd_trc; /* descriptor for &trace */
  57. extern struct descrip k_main;    /* value of &main */
  58. extern struct descrip nullptr;    /* descriptor with null block pointer */
  59. extern struct descrip lcase;    /* lowercase string */
  60. extern struct descrip letr;    /* letter "r" */
  61. extern struct descrip maps2;    /* second argument to map() */
  62. extern struct descrip maps3;    /* third argument to map() */
  63. extern struct descrip nulldesc;    /* null value */
  64. extern struct descrip onedesc;    /* one */
  65. extern struct descrip t_errorvalue; /* tentative k_errorvalue value */
  66. extern struct descrip ucase;    /* uppercase string */
  67. extern struct descrip zerodesc;    /* zero */
  68. extern uword blkneed;        /* stated need for block space */
  69. extern uword statneed;        /* stated need for static space */
  70. extern uword strneed;        /* stated need for string space */
  71. extern uword blktotal;        /* cumulative total of all block allocations */
  72. extern uword stattotal;        /* cumulative total of all static allocations */
  73. extern uword strtotal;        /* cumulative total of all string allocations */
  74. #ifndef MultiRegion
  75. extern word abrsize;        /* size of allocated block region (words) */
  76. #endif                /* MultiRegion */
  77. extern word coll_tot;        /* total number of collections */
  78. extern word coll_stat;        /* number of collections from static reqests */
  79. extern word coll_str;        /* number of collections from string requests */
  80. extern word coll_blk;        /* number of collections from block requests */
  81. extern word mstksize;        /* size of main stack in words */
  82. extern word qualsize;
  83. #ifndef MultiRegion
  84. extern word ssize;        /* size of string space (bytes) */
  85. #endif                /* MultiRegion */
  86. extern word statincr;        /* size of increment for static space */
  87. extern word statsize;        /* size of static space */
  88. extern word stksize;        /* size of co-expression stacks in words */
  89. extern struct tend_desc *tend;  /* chain of tended descriptors */
  90.  
  91. #ifdef DosFncs
  92. extern char *zptr;
  93. #endif                    /* DosFncs */
  94.  
  95. #if EBCDIC == 2
  96. extern char ToEBCDIC[], FromEBCDIC[]; /* ASCII<->EBCDIC maps */
  97. #endif                    /* EBCDIC == 2 */
  98.  
  99. #ifdef StandardLib
  100. extern clock_t starttime;    /* start time in milliseconds */
  101. #else                    /* StandardLib */
  102. extern long starttime;        /* start time in milliseconds */
  103. #endif                    /* StandardLib */
  104.  
  105. #if !COMPILER
  106. /*
  107.  * External declarations for the interpreter.
  108.  */
  109.  
  110. extern inst ipc;        /* interpreter program counter */
  111. extern int ilevel;        /* interpreter level */
  112. extern int ntended;        /* number of active tended descriptors */
  113. extern struct b_cset k_ascii;    /* value of &ascii */
  114. extern struct b_cset k_cset;    /* value of &cset */
  115. extern struct b_cset k_digits;    /* value of &lcase */
  116. extern struct b_cset k_lcase;    /* value of &lcase */
  117. extern struct b_cset k_letters;    /* value of &letters */
  118. extern struct b_cset k_ucase;    /* value of &ucase */
  119. extern struct descrip tended[];    /* tended descriptors */
  120. extern struct ef_marker *efp;    /* expression frame pointer */
  121. extern struct gf_marker *gfp;    /* generator frame pointer */
  122. extern struct pf_marker *pfp;    /* procedure frame pointer */
  123. extern word *sp;        /* interpreter stack pointer */
  124. extern word *stack;        /* interpreter stack base */
  125. extern word *stackend;        /* end of evaluation stack */
  126.  
  127. extern char *code;        /* start of icode */
  128. extern dptr globals;         /* start of global variables */
  129. extern dptr eglobals;        /* end of global variables */
  130. extern dptr gnames;        /* start of global variable names */
  131. extern dptr egnames;         /* end of global variable names */
  132. extern dptr statics;         /* start of static variables */
  133. extern dptr estatics;        /* end of static variables */
  134. extern char *strcons;        /* start of the string constants */
  135. extern dptr fnames;        /* field names */
  136. extern dptr efnames;        /* end of field names */
  137.  
  138. #ifdef ExecImages
  139. extern int dumped;        /* the interpreter has been dumped */
  140. #endif                    /* ExecImages */
  141.  
  142.  
  143. extern struct pstrnm pntab[];
  144. extern int pnsize;
  145.  
  146. #else                    /* COMPILER */
  147. extern dptr globals; /* array of global variables */
  148. extern dptr gnames;    /* array of global variable names */
  149. extern struct descrip statics[];/* array of static variables */
  150. extern int noerrbuf;        /* error buffering */
  151. extern struct p_frame *pfp;    /* procedure frame pointer */
  152. extern struct descrip trashcan; /* dummy descriptor that is never read */
  153. extern int largeints;        /* flag: large integers supported */
  154. #endif                    /* COMPILER */
  155.  
  156. extern struct b_proc *op_tbl;   /* operators available for string invocation */
  157. extern int op_tbl_sz;           /* number of operators in op_tbl */
  158. extern int debug_info;        /* flag: debugging information is available */
  159. extern int err_conv;        /* flag: error conversion is supported */
  160. extern int dodump;        /* termination dump */
  161. extern int line_info;        /* flag: line information is available */
  162. extern char *file_name;        /* source file for current execution point */
  163. extern int line_num;        /* line number for current execution point */
  164. extern int n_globals;        /* number of global variables */
  165. extern int n_statics;        /* number of static variables */
  166. extern struct b_coexpr *mainhead;    /* &main */
  167.  
  168. #ifdef Polling
  169. extern int pollctr;
  170. #endif                    /* Polling */
  171.  
  172.  
  173. #ifdef EventMon
  174. extern FILE *evfile;        /* input file */
  175.  
  176. extern word evctx;        /* current event context */
  177. extern word wantctx;    /* nonzero if this context is selected */
  178. extern word evdepth;        /* current nesting depth */
  179. extern word evstk[];    /* nesting stack */
  180.  
  181. extern int nevsel;        /* number of event contexts */
  182. extern char *evsel;        /* nonzero entry for each context selected */
  183.  
  184. extern word evhist[];    /* history of previous values */
  185. extern dptr EvContext;        /* pointer to EvContext global */
  186. extern dptr EvCode;        /* pointer to EvCode global */
  187. extern dptr EvValue;        /* pointer to EvValue global */
  188. extern dptr EvGivenValue;    /* pointer to EvGivenValue global */
  189. #endif                /* EventMon */
  190.