home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / Screens / vsdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-25  |  4.9 KB  |  118 lines  |  [TEXT/CWIE]

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