home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v92.tgz / v92.tar / v92 / src / h / rexterns.h < prev    next >
C/C++ Source or Header  |  1996-03-22  |  10KB  |  266 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 unsigned char allchars[];/* array for making one-character strings */
  9. #ifndef MultiThread
  10. extern struct region *curstring;
  11. extern struct region *curblock;
  12. #endif                /* MultiThread */
  13. extern char *blkname[];        /* print names for block types. */
  14. extern char *currend;        /* current end of memory region */
  15. extern dptr *quallist;        /* start of qualifier list */
  16. extern dptr argp;        /* argument pointer */
  17. extern int bsizes[];        /* sizes of blocks */
  18. extern int firstd[];        /* offset (words) of first descrip. */
  19. extern uword segsize[];        /* size of hash bucket segment */
  20. extern int k_level;        /* value of &level */
  21. extern struct b_coexpr *stklist;/* base of co-expression stack list */
  22. extern struct b_cset blankcs;   /* ' ' */
  23. extern struct b_cset lparcs;    /* '(' */
  24. extern struct b_cset rparcs;    /* ')' */
  25. extern struct b_cset fullcs;    /* cset containing all characters */
  26. extern struct descrip blank;    /* blank */
  27. extern struct descrip emptystr;    /* empty string */
  28. extern struct descrip k_current;/* ¤t */
  29.  
  30. #ifndef MultiThread
  31. extern char *k_errortext;    /* value of &errortext */
  32. extern int have_errval;        /* &errorvalue has a legal value */
  33. extern int k_errornumber;    /* value of &errornumber */
  34. extern int t_errornumber;    /* tentative k_errornumber value */
  35. extern int t_have_val;        /* tentative have_errval flag */
  36. extern struct b_file k_errout;    /* value of &errout */
  37. extern struct b_file k_input;    /* value of &input */
  38. extern struct b_file k_output;    /* value of &output */
  39. extern struct descrip k_errorvalue;    /* value of &errorvalue */
  40. extern struct descrip kywd_err; /* &error */
  41. extern struct descrip kywd_pos; /* descriptor for &pos */
  42. extern struct descrip kywd_prog; /* descriptor for &prog */
  43. extern struct descrip kywd_ran; /* descriptor for &random */
  44. extern struct descrip k_subject;/* &subject */
  45. extern struct descrip kywd_trc; /* descriptor for &trace */
  46. extern struct descrip k_eventcode; /* &eventcode */
  47. extern struct descrip k_eventsource; /* &eventsource */
  48. extern struct descrip k_eventvalue; /* &eventvalue */
  49. extern struct descrip k_main;    /* value of &main */
  50. #endif                /* MultiThread */
  51.  
  52. extern struct descrip kywd_dmp; /* descriptor for &dump */
  53.  
  54. #ifdef FncTrace
  55. extern struct descrip kywd_ftrc; /* descriptor for &ftrace */
  56. #endif                    /* FncTrace */
  57.  
  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.  
  66. #ifndef MultiThread
  67. extern struct descrip t_errorvalue; /* tentative k_errorvalue value */
  68. #endif                    /* MultiThread */
  69.  
  70. extern struct descrip ucase;    /* uppercase string */
  71. extern struct descrip zerodesc;    /* zero */
  72.  
  73. #ifndef MultiThread
  74. extern uword blktotal;        /* cumulative total of all block allocations */
  75. extern uword strtotal;        /* cumulative total of all string allocations */
  76. #endif                /* MultiThread */
  77.  
  78. extern uword stattotal;        /* cumulative total of all static allocations */
  79.                 /* N.B. not currently set */
  80.  
  81. #ifndef MultiThread
  82. extern word coll_tot;        /* total number of collections */
  83. extern word coll_stat;        /* number of collections from static reqests */
  84. extern word coll_str;        /* number of collections from string requests */
  85. extern word coll_blk;        /* number of collections from block requests */
  86. extern dptr globals;         /* start of global variables */
  87. extern dptr eglobals;        /* end of global variables */
  88. extern dptr gnames;        /* start of global variable names */
  89. extern dptr egnames;         /* end of global variable names */
  90. extern dptr estatics;        /* end of static variables */
  91. #endif                /* MultiThread */
  92.  
  93. extern word mstksize;        /* size of main stack in words */
  94. extern word qualsize;        /* size of string qualifier list */
  95.  
  96. extern word memcushion;        /* memory region cushion factor */
  97. extern word memgrowth;        /* memory region growth factor */
  98.  
  99. extern word stksize;        /* size of co-expression stacks in words */
  100. extern struct tend_desc *tend;  /* chain of tended descriptors */
  101.  
  102. #ifdef DosFncs
  103. extern char *zptr;
  104. #endif                    /* DosFncs */
  105.  
  106. #if EBCDIC == 2
  107. extern char ToEBCDIC[], FromEBCDIC[]; /* ASCII<->EBCDIC maps */
  108. #endif                    /* EBCDIC == 2 */
  109.  
  110. #ifdef StandardLib
  111. #ifdef MacGraph
  112. extern unsigned long starttime;    /* start time in milliseconds */
  113. #else                    /* MacGraph */
  114. extern clock_t starttime;    /* start time in milliseconds */
  115. #endif                    /* MacGraph */
  116. #else                    /* StandardLib */
  117. extern long starttime;        /* start time in milliseconds */
  118. #endif                    /* StandardLib */
  119.  
  120. #if !COMPILER
  121. /*
  122.  * External declarations for the interpreter.
  123.  */
  124.  
  125. extern inst ipc;        /* interpreter program counter */
  126. extern int ilevel;        /* interpreter level */
  127. extern int ntended;        /* number of active tended descriptors */
  128. extern struct b_cset k_ascii;    /* value of &ascii */
  129. extern struct b_cset k_cset;    /* value of &cset */
  130. extern struct b_cset k_digits;    /* value of &lcase */
  131. extern struct b_cset k_lcase;    /* value of &lcase */
  132. extern struct b_cset k_letters;    /* value of &letters */
  133. extern struct b_cset k_ucase;    /* value of &ucase */
  134. extern struct descrip tended[];    /* tended descriptors */
  135. extern struct ef_marker *efp;    /* expression frame pointer */
  136. extern struct gf_marker *gfp;    /* generator frame pointer */
  137. extern struct pf_marker *pfp;    /* procedure frame pointer */
  138. extern word *sp;        /* interpreter stack pointer */
  139. extern word *stack;        /* interpreter stack base */
  140. extern word *stackend;        /* end of evaluation stack */
  141.  
  142. #ifdef MultiThread
  143. extern struct progstate *curpstate;
  144. extern struct progstate rootpstate;
  145. extern int noMTevents;        /* no MT events during GC */
  146. #else                    /* MultiThread */
  147. extern char *code;        /* start of icode */
  148. extern dptr statics;         /* start of static variables */
  149. extern char *strcons;        /* start of the string constants */
  150. extern dptr fnames;        /* field names */
  151. extern dptr efnames;        /* end of field names */
  152. extern word *records;
  153. extern int *ftabp;        /* field table pointer */
  154. extern dptr xargp;
  155. extern word xnargs;
  156.  
  157. extern word lastop;
  158. #endif                    /* MultiThread */
  159.  
  160. #ifdef ExecImages
  161. extern int dumped;        /* the interpreter has been dumped */
  162. #endif                    /* ExecImages */
  163.  
  164.  
  165. extern struct pstrnm pntab[];
  166. extern int pnsize;
  167.  
  168. #else                    /* COMPILER */
  169. extern struct descrip statics[];/* array of static variables */
  170. extern struct b_proc *builtins[];/* array of pointers to builtin functions */
  171. extern int noerrbuf;        /* error buffering */
  172. extern struct p_frame *pfp;    /* procedure frame pointer */
  173. extern struct descrip trashcan; /* dummy descriptor that is never read */
  174. extern int largeints;        /* flag: large integers supported */
  175. #endif                    /* COMPILER */
  176.  
  177. extern struct b_proc *op_tbl;   /* operators available for string invocation */
  178. extern int op_tbl_sz;           /* number of operators in op_tbl */
  179. extern int debug_info;        /* flag: debugging information is available */
  180. extern int err_conv;        /* flag: error conversion is supported */
  181. extern int dodump;        /* termination dump */
  182. extern int line_info;        /* flag: line information is available */
  183. extern char *file_name;        /* source file for current execution point */
  184. extern int line_num;        /* line number for current execution point */
  185. #ifndef MultiThread
  186. extern int n_globals;        /* number of global variables */
  187. extern int n_statics;        /* number of static variables */
  188. extern struct b_coexpr *mainhead;    /* &main */
  189. #endif                /* MultiThread */
  190.  
  191. #ifdef Polling
  192. extern int pollctr;
  193. #endif                    /* Polling */
  194.  
  195. #ifdef Graphics
  196. extern wbp wbndngs;
  197. extern wcp wcntxts;
  198. extern wsp wstates;
  199. extern int GraphicsLeft, GraphicsUp, GraphicsRight, GraphicsDown;
  200. extern int GraphicsHome, GraphicsPrior, GraphicsNext, GraphicsEnd;
  201. extern int win_highwater, canvas_serial, context_serial;
  202. #ifndef MultiThread
  203. extern struct descrip kywd_xwin[];
  204. extern struct descrip lastEventWin;
  205. extern int lastEvFWidth, lastEvLeading, lastEvAscent;
  206. extern struct descrip amperCol;
  207. extern struct descrip amperRow;
  208. extern struct descrip amperX;
  209. extern struct descrip amperY;
  210. extern struct descrip amperInterval;
  211. extern uword xmod_control, xmod_shift, xmod_meta;
  212. #endif                    /* MultiThread */
  213.  
  214. extern stringint attribs[], drawops[];
  215. #ifdef XWindows
  216. extern struct _wdisplay * wdsplys;
  217. extern stringint cursorsyms[];
  218. #endif                    /* XWindows */
  219. #ifdef MSWindows
  220. extern HINSTANCE mswinInstance;
  221. extern int ncmdShow;
  222. #endif                    /* MSWindows */
  223. #ifdef PresentationManager
  224. /* this is the handle to the interpreter thread's anchor block */
  225. extern HAB HInterpAnchorBlock;
  226. extern HAB HMainAnchorBlock;
  227. extern HMQ HInterpMessageQueue;
  228. extern HMQ HMainMessageQueue;
  229. extern lclIdentifier *LocalIds;
  230. extern stringint siMixModes[];
  231. extern stringint siLineTypes[];
  232. extern stringint siColorNames[];
  233. extern stringint siCursorSyms[];
  234. extern LONG ScreenWidth;
  235. extern LONG ScreenHeight;
  236. extern LONG NumWindows;
  237. extern LONG MaxPSColors;
  238. extern colorEntry *ColorTable;
  239. extern ULONG areaAttrs;
  240. extern ULONG lineAttrs;
  241. extern ULONG charAttrs;
  242. extern ULONG imageAttrs;
  243. #endif                    /* PresentationManager */
  244. #ifdef ConsoleWindow
  245. extern FILE *ConsoleBinding;
  246. extern unsigned long ConsoleFlags;
  247. extern char ConsoleStringBuf[];
  248. extern char *ConsoleStringBufPtr;
  249. #endif                    /* ConsoleWindow */
  250. #endif                    /* Graphics */
  251.  
  252. #if UNIX
  253. #ifdef KeyboardFncs
  254. extern int keyboard_error;
  255. #endif                    /* KeyboardFncs */
  256. #endif                    /* UNIX */
  257.  
  258. #ifdef EventMon
  259. extern word oldsum;
  260. extern struct descrip csetdesc;        /* cset descriptor */
  261. extern struct descrip eventdesc;    /* event descriptor */
  262. extern struct b_iproc mt_llist;
  263. extern struct descrip rzerodesc;    /* real descriptor */
  264. extern struct b_real realzero;        /* real zero block */
  265. #endif                /* EventMon */
  266.