home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Commun⁄Network / Telnet 2.5.src.ThinkC / source / vsdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-17  |  4.0 KB  |  104 lines  |  [TEXT/MPS ]

  1. /*
  2.  *        %W%    (NCSA)    %G%
  3.  *
  4.  *      Virtual Screen Kernel Data/Structure Definitions
  5.  *                          (vsdata.h)
  6.  *  
  7.  *    National Center for Supercomputing Applications
  8.  *      by Gaige B. Paulsen
  9.  *
  10.  *    This file contains the control and interface calls for the NCSA
  11.  *  Virtual Screen Kernel.
  12.  *
  13.  *      Version Date    Notes
  14.  *      ------- ------  ---------------------------------------------------
  15.  *      0.01    861102  Initial coding -GBP
  16.  *        2.1        871130    NCSA Telnet 2.1 -GBP
  17.  *        2.2     880715    NCSA Telnet 2.2 -GBP
  18.  *
  19.  */
  20.  
  21. #define MAXWID 132      /* The absolute maximum number of chars/line */
  22.  
  23. struct VSline
  24.   {
  25.     struct VSline
  26.       /* doubly-linked list of lines */
  27.         *next,          /* Pointer to next line */
  28.         *prev;          /* Pointer to previous line */
  29.     char                  /* Text for the line -- may be part of a block */
  30.         *text;          /* of memory containing more than one line */
  31.     int                 /* flag for memory allocation coordination */
  32.         mem;            /* nonzero for first line in memory block */
  33.   };
  34.  
  35. typedef struct VSline
  36.     VSline;
  37. typedef VSline
  38.     *VSlinePtr;
  39. typedef VSlinePtr
  40.     *VSlineArray;
  41.  
  42. #define maxparms 16
  43.  
  44. struct VSscrn {
  45.     VSlinePtr
  46.          scrntop,           /* topmost line of the current screen (= linest[0]) */
  47.          buftop,            /* top (i e oldest line) of scrollback buffer     */
  48.          vistop;            /* topmost line within visible region (may be in screen or scrollback area) */
  49.     VSlineArray
  50.         attrst,             /* pointer to array of screen attribute lines   */
  51.         linest;             /* pointer to array of screen text lines        */
  52.     int  lines,                /* How many lines are in the screen arrays      */
  53.          maxlines,          /* maximum number of lines to save off top      */
  54.          numlines,          /* number of lines currently saved off top      */
  55.          allwidth,          /* allocated width of screen lines              */
  56.          maxwidth,          /* current screen width setting (<= allwidth)   */
  57.          savelines,         /* save lines off top? 0=no                     */
  58.          ESscroll,            /* Scroll screen when ES received                */
  59.          attrib,            /* current character writing attributes         */
  60.          x,y,               /* current cursor positon                       */
  61.          Px,Py,Pattrib,     /* saved cursor position and writing attributes */
  62.          VSIDC,             /* Insert/delete character mode 0=draw line     */
  63.          DECAWM,            /* Auto Wrap Mode 0=off                         */
  64.          DECCKM,            /* Cursor Key Mode                              */
  65.          DECPAM,            /* keyPad Application Mode                        */
  66.          DECORG,            /* origin mode                                  */
  67.          G0,G1,                /* Character set identifiers                     */
  68.          charset,            /* Character set mode                             */
  69.          IRM,               /* Insert/Replace Mode                          */
  70.          escflg,            /* Current Escape level                            */
  71.          top, bottom,       /* Vertical bounds of scrolling region             */
  72.          Rtop,Rbottom,        /* Vertical bounds of visible region             */
  73.          Rleft,Rright,        /* Horizontal bounds of visible region             */
  74.          parmptr;           /* index of current parm                         */
  75.     int  parms[maxparms];   /* Ansi Parameters                             */
  76.     char *tabs;             /* pointer to array for tab settings             */
  77.                             /* contains 'x' at each tab position, blanks elsewhere */
  78.     };
  79.  
  80. typedef struct VSscrn VSscrn;
  81.  
  82. struct VSscrndata {
  83.     VSscrn *loc;            /* Location of the Screen record for this scrn */
  84.     short
  85.         captureRN,    /* capture file's RefNum                       */    /* BYU 2.4.18 */
  86.         stat;        /* status of this screen (0=Uninitialized,     */    /* BYU 2.4.18 */
  87.                     /*                        1=In Use             */    /* BYU 2.4.18 */
  88.                     /*                        2=Inited, but not IU */    /* BYU 2.4.18 */
  89.     };
  90.  
  91. typedef struct VSscrndata VSscrndata;
  92.  
  93. #ifdef VSMASTER
  94. VSscrn  *VSIw;
  95. int      VSIwn;
  96. #else
  97. extern VSscrn   *VSIw;
  98. extern int       VSIwn;
  99. #endif
  100.  
  101. #define    VSPBOTTOM    (VSIw->lines)
  102.  
  103. #include <stdio.h>
  104.