home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / at_ansi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.3 KB  |  87 lines

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