home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / ifp / part06 / interp / inob.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-07-06  |  2.7 KB  |  64 lines

  1.  
  2. /****** inob.h ********************************************************/
  3. /**                                                                  **/
  4. /**                    University of Illinois                        **/
  5. /**                                                                  **/
  6. /**                Department of Computer Science                    **/
  7. /**                                                                  **/
  8. /**   Tool: IFP                         Version: 0.5                 **/
  9. /**                                                                  **/
  10. /**   Author:  Arch D. Robison          Date:   May 1, 1985          **/
  11. /**                                                                  **/
  12. /**   Revised by: Arch D. Robison       Date:  Sept 9, 1986          **/
  13. /**                                                                  **/
  14. /**   Principal Investigators: Prof. R. H. Campbell                  **/
  15. /**                            Prof. W. J. Kubitz                    **/
  16. /**                                                                  **/
  17. /**                                                                  **/
  18. /**------------------------------------------------------------------**/
  19. /**   (C) Copyright 1987  University of Illinois Board of Trustees   **/
  20. /**                       All Rights Reserved.                       **/
  21. /**********************************************************************/
  22.  
  23. #define INBUFSIZE 255     /* 65 <= INBUFSIZE <= 255 for DOS */
  24.  
  25. /*
  26.  * InDesc
  27.  *
  28.  * Input descriptor.
  29.  *
  30.  * Currently, there are three forms of IFP input:
  31.  *
  32.  *    1. Definition files
  33.  *    2. Import files
  34.  *    3. Terminal input
  35.  *
  36.  * All three forms are managed by input descriptors.  An input descriptor
  37.  * buffers the file, and keeps track of context (e.g. line number).
  38.  */
  39.  
  40. typedef struct {
  41.    char *InPtr;           /* Pointer to current character being scanned   */
  42.    int InLineNum;         /* Line number of line being read [1]           */
  43.    int ComLevel;      /* Current comment nesting level [2]          */
  44.    NodePtr InDefMod;      /* Module node of current definition being read */
  45.    StrPtr InDefFun;       /* Name of current definition                   */
  46.    FILE *InFile;          /* File descriptor of file being read           */
  47.    char InBuf[INBUFSIZE]; /* Buffer for current line being scanned        */
  48. } InDesc;
  49.  
  50. /*
  51.  * Footnotes
  52.  *
  53.  * [1] A line number of -1 indicates unnumbered lines, i.e. terminal input. 
  54.  *
  55.  * [2] ComLevel should always be zero outside of function "InBlanks".
  56.  *     A non-zero value indicates an "open comment" error.
  57.  */
  58.  
  59. extern StrPtr InString ();
  60. extern char NodeDelim[];
  61.  
  62. /******************************* end of inob.h *******************************/
  63.  
  64.