home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / at_ansi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  3.2 KB  |  87 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /*    Copyright (c) 1987, 1988 Microsoft Corporation    */
  9. /*      All Rights Reserved    */
  10.  
  11. /*    This Module contains Proprietary Information of Microsoft  */
  12. /*    Corporation and should be treated as Confidential.       */
  13.  
  14. #ident    "@(#)head.sys:at_ansi.h    1.3.1.6"
  15.  
  16. /*
  17.  * definitions for PC AT x3.64 terminal emulator
  18.  */
  19.  
  20. #define ANSI_MAXPARAMS    5    /* maximum number of ANSI paramters */
  21. #define ANSI_MAXTAB    40    /* maximum number of tab stops */
  22. #define ANSI_MAXFKEY    30    /* max length of function key with <ESC>Q */
  23.  
  24. #define    ANSI_MOVEBASE    0x0001    /* if set move base when scrolling */
  25.  
  26. /*
  27.  * Font values for ansistate
  28.  */
  29. #define    ANSI_FONT0    0    /* Primary font (default) */
  30. #define    ANSI_FONT1    1    /* First alternate font */
  31. #define    ANSI_FONT2    2    /* Second alternate font */
  32.  
  33. /*
  34.  * directions for moving bytes in screen memory.
  35.  * UP means toward higher addresses.
  36.  * DOWN means toward lower addresses.
  37.  */
  38. #define UP     0
  39. #define DOWN     1
  40.  
  41. struct attrmask {
  42.     unchar attr;        /* new attribute to turn on */
  43.     unchar mask;        /* old attributes to leave on */
  44. };
  45.  
  46. struct ansistate {    /* state for ansi x3.64 emulator */
  47.     ushort    *scraddr;    /* pointer to char/attribute buffer */
  48.     short    ansiid;        /* unique id for this x3.64 terminal */
  49.     ushort    flags;        /* flags for this x3.64 terminal */
  50.     ushort    width;        /* number of characters horizontally */
  51.     ushort    height;        /* number of characters vertically */
  52.     ushort    scrsize;    /* number of characters on screen */
  53.     struct    attrmask    *attrmask; /* attribute masks/values ptr */
  54.     char    nattrmsks;    /* size of attrmask array */
  55.     unchar    normattr;    /* "normal" attribute */
  56.     unchar    undattr;    /* attribute to use when underlining */
  57.     unchar    font;        /* font type */
  58.     int     (*bell)();    /* ptr to bell function */
  59.     int     (*clrdisplay)(); /* ptr to clrdisplay function */
  60.     int     (*moveit)();    /* ptr to moveit function */
  61.     int     (*setcursor)();    /* ptr to setcursor function */
  62.     int     (*setbase)();    /* ptr to setbase function */
  63.     int     (*storeword)();    /* ptr to storeword function */
  64.     int     (*shiftset)();    /* ptr to shiftset function */
  65.     int    (*undattrset)(); /* ptr to undattrset function */
  66.     void    (*sendscreen)(); /* ptr to sendscreen function */
  67.     void    (*setlock)();    /* ptr to setlock function */
  68.     int    (*addstring)();    /* ptr to add function key string function */
  69.     caddr_t    dspec;        /* device specific information */
  70.     ushort    curbase;    /* upper left hand corner of screen in buffer */
  71.     short    line;        /* current line number */
  72.     short    column;        /* current column number */
  73.     ushort    cursor;        /* current address of cursor, 0-based */
  74.     unchar    state;        /* state in output esc seq processing */
  75.     unchar    undstate;    /* underline processing state */
  76.     unchar    attribute;    /* current attribute for characters */
  77.     unchar    gotparam;    /* does output esc seq have a param */
  78.     ushort    curparam;    /* current param # of output esc seq */
  79.     ushort    paramval;    /* value of current param */
  80.     short    params[ANSI_MAXPARAMS];    /* parameters of output esc seq */
  81.     unchar    ntabs;        /* number of tab stops set */
  82.     unchar    tabs[ANSI_MAXTAB];    /* list of tab stops */
  83.     char    fkey[ANSI_MAXFKEY];    /* work space for function key */
  84. };
  85.  
  86.  
  87.