home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / imcomp / struct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-29  |  3.1 KB  |  103 lines

  1. /*
  2.     struct.h    rt1 structure definitions
  3.  
  4.     Copyright 1984 Terry Disz and Dan Sadowski
  5. */
  6.  
  7. #define CMD struct cmd        /*structure for command pointers*/
  8. #define MIB struct mib        /*structure for macro invocation block*/
  9. #define NBLOCK struct nblock    /*structure for name blocks*/
  10. #define OPRTAB struct optab    /*structure for expression operators*/
  11. #define TEMP struct tmp        /* structure for temp objects (string/array)*/
  12. #define UVAL union uval        /*union to hold values*/
  13. #define VAL struct valstk    /*structure for value stack*/
  14. #define TABDAT struct tabdat    /*tablet data structure */
  15.  
  16. UVAL                /* union to store values */
  17. {
  18.     ITYPE ival;        /*integer value*/
  19.     FTYPE fval;        /*floating point value*/
  20.     char ch;        /*single character*/
  21.     CMD *cmdptr;        /*pointer to command block*/
  22.     TEMP *tptr;        /*pointer to temp list structure*/
  23.     NBLOCK *nptr;        /*pointer to name block*/
  24.     VAL *vptr;        /*pointer to compile block*/
  25.     OPRTAB *optr;        /*pointer to operator table*/
  26.     char *cptr;        /*pointer to character string*/
  27. };
  28.  
  29. NBLOCK        /*  crt name and command block structure */
  30. {
  31.      TINY type;
  32.      UVAL nvalue;
  33.      BITS flags;
  34.      char *name;        /* pointer to the name */
  35.      NBLOCK *next;        /* link to next block */
  36. };
  37.  
  38.  
  39. CMD        /*  crt command name block  */
  40. {
  41.     char *(*funptr)();        /* pointer to the function */
  42.     char *switches;            /* ascii for switches*/
  43. };
  44.  
  45. OPRTAB        /*  operator table structure*/
  46. {
  47.     char opr0;        /*1st character of operator*/
  48.     char opr1;        /*2nd character of operator*/
  49.     TINY prec;        /*precedence*/
  50.     int (*oprfun)();    /*pointer to operator function*/
  51. };
  52.  
  53. VAL        /*  value/operand stack structure*/
  54. {
  55.     TINY valtype;        /*value type*/
  56.     TINY valsw;        /*bits for switches*/
  57.     UVAL value;        /*value*/
  58. };
  59.  
  60. MIB        /*   MIB STRUCTURE  */
  61. {
  62.     TINY miballoc;        /* alloc type - PERM or TEMP */
  63.     TINY mibtype;
  64.     TINY mibargnum;        /* arg error number */
  65.     BITS mibflags;
  66.     MIB *mibnext;        /* free mib list link */
  67.     TEMP *mibstrptr;    /* pointer to TEMP structure with macro */
  68.     char *miblinptr;    /* pointer to line in the macro */
  69.     NBLOCK *miblocptr;    /* list header for local variables */
  70.     MIB *mibcaller;        /* back pointer in mib list */
  71.     MIB *mibbgptr;        /* .b list pointer */
  72.     VAL *mibargptr;        /* pointer to arg list in calling mac*/
  73.     VAL *mibrv;        /* pointer to return value area*/
  74.     char *mibonelpt;    /* onerror line pointer */
  75.     char *mibonelab;    /* onerror label addr */
  76.     short mibfcount;    /* to be used by .f for timeout */
  77.     short mibfnow;        /* current foreground count */
  78.     short mibwcount;    /* count for wait command */
  79.     COORD mibxcurse;    /* old x for line cmd */
  80.     COORD mibycurse;    /* old y */
  81. };
  82.  
  83. TEMP        /*temp list structure*/
  84. {
  85.     TINY ttype;        /* type of data */
  86.     TINY atype;        /* type of array element */
  87.     TINY aflag;        /* flag for array */
  88.     short use;        /* use count */
  89.     TEMP *tnext;        /* pointer to next list item */
  90.     int size;        /* size of item (in bytes) */
  91.     char *adr;        /* pointer to actual string, array, compiled */
  92.     short dim[4];        /* array dimensions */
  93.     short nexti;        /* next available array element */
  94. };
  95.  
  96. TABDAT        /* tablet data structure */
  97. {
  98.     int x;            /* tablet x coordinate */
  99.     int y;            /* tablet y coordinate */
  100.     int fcn;        /* tablet function key */
  101. };
  102.  
  103.