home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / ex / ex_tty.h < prev    next >
C/C++ Source or Header  |  1980-02-17  |  4KB  |  98 lines

  1. /* Copyright (c) 1979 Regents of the University of California */
  2. /*
  3.  * Capabilities from termcap
  4.  *
  5.  * The description of terminals is a difficult business, and we only
  6.  * attempt to summarize the capabilities here;  for a full description
  7.  * see the paper describing termcap.
  8.  *
  9.  * Capabilities from termcap are of three kinds - string valued options,
  10.  * numeric valued options, and boolean options.  The string valued options
  11.  * are the most complicated, since they may include padding information,
  12.  * which we describe now.
  13.  *
  14.  * Intelligent terminals often require padding on intelligent operations
  15.  * at high (and sometimes even low) speed.  This is specified by
  16.  * a number before the string in the capability, and has meaning for the
  17.  * capabilities which have a P at the front of their comment.
  18.  * This normally is a number of milliseconds to pad the operation.
  19.  * In the current system which has no true programmible delays, we
  20.  * do this by sending a sequence of pad characters (normally nulls, but
  21.  * specifiable as "pc").  In some cases, the pad is better computed
  22.  * as some number of milliseconds times the number of affected lines
  23.  * (to bottom of screen usually, except when terminals have insert modes
  24.  * which will shift several lines.)  This is specified as '12*' e.g.
  25.  * before the capability to say 12 milliseconds per affected whatever
  26.  * (currently always line).  Capabilities where this makes sense say P*.
  27.  */
  28. char    tspace[128];        /* Space for capability strings */
  29. char    *aoftspace;        /* Address of tspace for relocation */
  30.  
  31. char    *AL;            /* P* Add new blank line */
  32. char    *BC;            /*    Back cursor */
  33. char    *CD;            /* P* Clear to end of display */
  34. char    *CE;            /* P  Clear to end of line */
  35. char    *CL;            /* P* Clear screen */
  36. char    *CM;            /* P  Cursor motion */
  37. char    *DC;            /* P* Delete character */
  38. char    *DL;            /* P* Delete line sequence */
  39. char    *DM;            /*    Delete mode (enter)  */
  40. char    *DO;            /*    Down line sequence */
  41. char    *ED;            /*    End delete mode */
  42. char    *EI;            /*    End insert mode */
  43. char    *HO;            /*    Home cursor */
  44. char    *IC;            /* P  Insert character */
  45. char    *IM;            /*    Insert mode (give as ':im=:' if 'ic' */
  46. char    *IP;            /* P* Insert pad after char ins'd using IM+IE */
  47. char    *LL;            /*    Quick to last line, column 0 */
  48. char    *MA;            /*    Control character map for cmd mode */
  49. char    *ND;            /*    Non-destructive space */
  50. char    PC;            /*    Pad character */
  51. char    *SE;            /*    Standout end (may leave space) */
  52. char    *SF;            /* P  Scroll forwards */
  53. char    *SO;            /*    Stand out begin (may leave space) */
  54. char    *SR;            /* P  Scroll backwards */
  55. char    *TA;            /* P  Tab (other than ^I or with padding) */
  56. char    *UP;            /*    Upline */
  57. char    *VB;            /*    Visible bell */
  58. char    *VE;            /*    Visual end sequence */
  59. char    *VS;            /*    Visual start sequence */
  60. bool    AM;            /* Automatic margins */
  61. bool    BS;            /* Backspace works */
  62. bool    CA;            /* Cursor addressible */
  63. bool    DA;            /* Display may be retained above */
  64. bool    DB;            /* Display may be retained below */
  65. bool    EO;            /* Can erase overstrikes with ' ' */
  66. bool    GT;            /* Gtty indicates tabs */
  67. bool    HZ;            /* Hazeltine ~ braindamage */
  68. bool    IN;            /* Insert-null blessing */
  69. bool    MI;            /* can move in insert mode */
  70. bool    NC;            /* No Cr - \r snds \r\n then eats \n (dm2500) */
  71. bool    OS;            /* Overstrike works */
  72. bool    UL;            /* Underlining works even though !os */
  73. bool    XN;            /* A newline gets eaten after wrap (concept) */
  74.     /* X? is reserved for severely nauseous glitches */
  75.     /* If there are enough of these we may need bit masks! */
  76.  
  77. /*
  78.  * From the tty modes...
  79.  */
  80. bool    NONL;            /* Terminal can't hack linefeeds doing a CR */
  81. bool    UPPERCASE;        /* Ick! */
  82. short    LINES;            /* Number of lines on screen */
  83. short    COLUMNS;
  84. short    OCOLUMNS;        /* Save COLUMNS for a hack in open mode */
  85.  
  86. short    outcol;            /* Where the cursor is */
  87. short    outline;
  88.  
  89. short    destcol;        /* Where the cursor should be */
  90. short    destline;
  91.  
  92. struct    sgttyb tty;        /* Always stty/gtty using this one structure */
  93. bool    normtty;        /* Have to restor normal mode from normf */
  94. int    normf;            /* Restore tty flags to this (someday) */
  95.  
  96. short    WBOT;
  97. short    WECHO;
  98.