home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / EDITOR / NVI179B / NVI179B.ZIP / cl / cl.h < prev    next >
C/C++ Source or Header  |  1997-06-27  |  3KB  |  104 lines

  1. /*-
  2.  * Copyright (c) 1993, 1994
  3.  *    The Regents of the University of California.  All rights reserved.
  4.  * Copyright (c) 1993, 1994, 1995, 1996
  5.  *    Keith Bostic.  All rights reserved.
  6.  *
  7.  * See the LICENSE file for redistribution information.
  8.  *
  9.  *    @(#)cl.h    10.19 (Berkeley) 9/24/96
  10.  */
  11.  
  12. typedef struct _cl_private {
  13.     CHAR_T     ibuf[256];    /* Input keys. */
  14.  
  15.     int     eof_count;    /* EOF count. */
  16.  
  17.     struct termios orig;    /* Original terminal values. */
  18.     struct termios ex_enter;/* Terminal values to enter ex. */
  19.     struct termios vi_enter;/* Terminal values to enter vi. */
  20.  
  21.     char    *el;        /* Clear to EOL terminal string. */
  22.     char    *cup;        /* Cursor movement terminal string. */
  23.     char    *cuu1;        /* Cursor up terminal string. */
  24.     char    *rmso, *smso;    /* Inverse video terminal strings. */
  25.     char    *smcup, *rmcup;    /* Terminal start/stop strings. */
  26.  
  27.     int     killersig;    /* Killer signal. */
  28. #define    INDX_HUP    0
  29. #define    INDX_INT    1
  30. #define    INDX_TERM    2
  31. #define    INDX_WINCH    3
  32. #define    INDX_MAX    4    /* Original signal information. */
  33.     struct sigaction oact[INDX_MAX];
  34.  
  35.     enum {            /* Tty group write mode. */
  36.         TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;
  37.  
  38.     enum {            /* Terminal initialization strings. */
  39.         TE_SENT=0, TI_SENT } ti_te;
  40.  
  41. #define    CL_IN_EX    0x0001    /* Currently running ex. */
  42. #define    CL_RENAME    0x0002    /* X11 xterm icon/window renamed. */
  43. #define    CL_RENAME_OK    0x0004    /* User wants the windows renamed. */
  44. #define    CL_SCR_EX_INIT    0x0008    /* Ex screen initialized. */
  45. #define    CL_SCR_VI_INIT    0x0010    /* Vi screen initialized. */
  46. #define    CL_SIGHUP    0x0020    /* SIGHUP arrived. */
  47. #define    CL_SIGINT    0x0040    /* SIGINT arrived. */
  48. #define    CL_SIGTERM    0x0080    /* SIGTERM arrived. */
  49. #define    CL_SIGWINCH    0x0100    /* SIGWINCH arrived. */
  50. #define    CL_STDIN_TTY    0x0200    /* Talking to a terminal. */
  51.     u_int32_t flags;
  52. #ifdef __EMX__
  53. #ifdef EMX_MOUSE
  54.     int mou_pipe;        /* Pipe to mouse event thread. */
  55.     int mou_thr;        /* Mouse thread ID for shutdown. */
  56. #endif
  57. #ifdef EMX_CURSOR
  58.     short cs1;        /* original cursor start scan line */
  59.     short cs2;        /* original cursor end scan line */
  60.     short csa;        /* original cursor attribute */
  61. #endif
  62. #endif
  63. } CL_PRIVATE;
  64.  
  65. #define    CLP(sp)        ((CL_PRIVATE *)((sp)->gp->cl_private))
  66. #define    GCLP(gp)    ((CL_PRIVATE *)gp->cl_private)
  67.  
  68. /* Return possibilities from the keyboard read routine. */
  69. typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;
  70.  
  71. /* The screen line relative to a specific window. */
  72. #define    RLNO(sp, lno)    (sp)->woff + (lno)
  73.  
  74. /* X11 xterm escape sequence to rename the icon/window. */
  75. #define    XTERM_RENAME    "\033]0;%s\007"
  76.  
  77. /*
  78.  * XXX
  79.  * Some implementations of curses.h don't define these for us.  Used for
  80.  * compatibility only.
  81.  */
  82. #ifndef TRUE
  83. #define    TRUE    1
  84. #endif
  85. #ifndef FALSE
  86. #define    FALSE    0
  87. #endif
  88.  
  89. #ifdef __EMX__
  90. #ifdef EMX_MOUSE
  91. struct msev
  92. {
  93.     unsigned short button;
  94. #define MEV_B1        0x01
  95. #define MEV_B2        0x02
  96. #define MEV_B3        0x04
  97.     unsigned short x;
  98.     unsigned short y;
  99. };
  100. #endif
  101. #endif
  102.  
  103. #include "cl_extern.h"
  104.