home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / X_PROLOG.LZH / X_PROLOG / SOURCES / EXTERN.H < prev    next >
C/C++ Source or Header  |  1990-08-13  |  4KB  |  114 lines

  1. /*
  2.  *        X PROLOG  Vers. 2.0
  3.  *
  4.  *
  5.  *    Written by :     Andreas Toenne
  6.  *            CS Dept. , IRB
  7.  *            University of Dortmund, W-Germany
  8.  *            <at@unido.uucp>
  9.  *            <....!seismo!unido!at>
  10.  *            <at@unido.bitnet>
  11.  *
  12.  *    Copyright :    This software is copyrighted by Andreas Toenne.
  13.  *            Permission is granted hereby to copy the entire
  14.  *            package including this copyright notice without fee.
  15.  *
  16.  */
  17.  
  18. /* global stack (env, backlog, frame) */
  19.  
  20. extern char *stack;            /* pointer to the stack */
  21. extern char *stacktop;            /* top of stack */
  22. extern char *stackfull;            /* hightide */
  23.  
  24. /* backtrack stack (embedded in the stack) */
  25.  
  26. extern backlog    *Backpoint;        /* the topmost backtrack point */
  27.  
  28. /* enviroment stack (embedded in the stack) */
  29.  
  30. extern env    *Topenv;        /* the topmost enviroment */
  31. extern env    *Preenv;        /* the previous enviroment */
  32.  
  33. /* prototyp stack(area) */
  34.  
  35. extern char     *protostack;        /* the prototypes stack */
  36. extern term     *prototop;        /* the current top element */
  37. extern term    *protonext;        /* the next to be used element */
  38. extern char     *protofull;        /* the highest element */
  39. extern term    *protofree[];        /* list of free terms */
  40.  
  41. /* copyterm stack */
  42.  
  43. extern char     *copystack;        /* the copystack */
  44. extern term     *copytop;        /* the current top element */
  45. extern term    *copynext;        /* the next to be used element */
  46. extern char     *copyfull;        /* the highest element */
  47.  
  48. /* trail stack */
  49.  
  50. extern term    **trailstack;        /* the stack base */
  51. extern long    trailtop;        /* the index of the next free element */
  52. extern long    trailfull;        /* the highest possible index */
  53.  
  54. /* clause area */
  55.  
  56. extern clause    *clausesp;        /* room for clauses */
  57. extern clause    *clausefree;        /* pointer to next free clause */
  58. extern long    clausefull;
  59. extern clause    *clausenext;
  60.  
  61. /* functor area */
  62.  
  63. extern char  *functorsp;        /* room for functors */
  64. extern char  *functorfull;
  65. extern char  *functornext;        /* next functor */
  66.  
  67. extern functor *functors;        /* the root of the AVL tree */
  68.  
  69. /* io data */
  70.  
  71. extern stream     streams[MAXSTREAMS];    /* list of open streams */
  72. extern stream    *in;            /* current input stream */
  73. extern stream    *out;            /* current output stream */
  74.  
  75. /* standard data */
  76.  
  77. extern functor    *stdfunctor[];        /* list of standard functors */
  78.  
  79. /* error values */
  80.  
  81. extern short c_errno;            /* the number of the last soft error */
  82. extern short io_errors;            /* signal io errors ? */
  83.  
  84. /* enviroment data (from executing shell) */
  85.  
  86. extern char *shell;            /* the path of the default shell */
  87. extern char *enviroment[];        /* the program's enviroment */
  88.  
  89. /* reader data */
  90.  
  91. extern lookup    l_table[];        /* the lookup table */
  92. extern short     tide;            /* end-of-table */
  93. extern char     line[];            /* buffer for the current line */
  94. extern char     name[];            /* temp. name space */
  95. extern char    *p;            /* pointer to current character */
  96. extern char     c;            /* the current character */
  97. extern char     lastc;            /* low io */
  98. extern short    c_type;            /* the type of the current character */
  99. extern char    *token;            /* the currently read token */
  100. extern short    token_type;        /* it's type */
  101. extern short    valid_token;        /* token is unused */
  102.  
  103. extern term *prompt;            /* the prompt */
  104.  
  105. /* misc data */
  106.  
  107. extern short dodebug;
  108. #ifdef ATARI
  109. extern long s_time;            /* timer tic at prolog's start */
  110. #endif
  111. extern long *abortpoint;        /* save point of abort */
  112. extern short booting;            /* true while booting */
  113. extern long lastconsult;        /* last consulted clause */
  114.