home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / ttystate.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  3KB  |  110 lines

  1. /************************************************************************
  2.  * This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  *
  3.  * provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is *
  5.  * included in all the files.                                           *
  6.  ************************************************************************/
  7.  
  8. #ifdef UNIX
  9.  
  10. /* Various tty state structures.
  11.  * Each is an array, subscripted by one of "NO" or "YES".
  12.  * YES is set suitably for JOVE.
  13.  * NO is reset back to initial state.
  14.  */
  15.  
  16. # ifdef SGTTY
  17. #  include <sgtty.h>
  18. extern struct sgttyb    sg[2];
  19. #  ifdef TIOCSLTC
  20. #   define USE_TIOCSLTC    1
  21. #  endif
  22. # endif
  23.  
  24. # ifdef TERMIO
  25. #  include <termio.h>
  26. extern struct termio    sg[2];
  27. # endif
  28.  
  29. # ifdef TERMIOS
  30. #  include <termios.h>
  31. extern struct termios    sg[2];
  32. # endif
  33.  
  34. # if defined(TERMIO) || defined(TERMIOS)
  35.   /* JOVE needs to know about tab expansion to infer whether it should
  36.    * use tabs to optimize output (jove.c).
  37.    * It also must be able to turn tab expansion off for a pty (iproc.c).
  38.    * The "normal" way of signifying tab expansion in a termio or termios
  39.    * struct is to set the bits in c_oflag masked by TABDLY to TAB3.
  40.    * Instead, some systems (eg. 386BSD) have a single bit named OXTABS,
  41.    * from which we synthesize fake definitions of TABDLY and TAB3.
  42.    * Some other systems have no bit, so we must presume that tabs don't
  43.    * work and that we needn't change the setting.
  44.    */
  45. #  ifndef TABDLY
  46. #   ifdef OXTABS
  47. #    define TABDLY    OXTABS
  48. #    define TAB3    TABDLY
  49. #   else
  50. #    define TABDLY    0    /* tab expansion is unknown and uncontrollable */
  51. #   endif
  52. #  endif
  53. # endif
  54.  
  55. # ifdef USE_BSDTTYINCLUDE
  56. #  include <bsdtty.h>
  57. #  ifdef TIOCSLTC
  58. #   define USE_TIOCSLTC    1
  59. #  endif
  60. # endif
  61.  
  62. # ifdef USE_TIOCSLTC
  63. extern struct ltchars    ls[2];
  64. # endif /* USE_TIOCSLTC */
  65.  
  66. # ifdef SGTTY
  67.  
  68. #  ifdef TIOCGETC
  69. extern struct tchars    tc[2];
  70. #  endif
  71.  
  72. #  ifdef LPASS8    /* use 4.3BSD's LPASS8 instead of raw for meta-key */
  73. extern int    lmword[2];        /* local mode word */
  74. #  endif
  75.  
  76. # endif /* SGTTY */
  77.  
  78. #  if !defined(TIOCGWINSZ) || defined(BSDPOSIX)
  79.    /* In an attempt to get a definition for TIOCGWINSZ,
  80.     * we include <sys/ioctl.h>.  In a perfect world, we could always
  81.     * or never include it, but (1) at least SunOS 4.[01] <sys/ioctl.h>
  82.     * conflicts seriously with <termios.h>, and yet (2) at least BSDI
  83.     * requires <sys/ioctl.h> to define TIOCGWINSZ.  We hope that this
  84.     * compromise will work on all systems.
  85.     *
  86.     * Another reason to include this file is to get a definition for
  87.     * TIOCSCTTY under OSF and perhaps BSDPOSIX.
  88.     */
  89. #   include <sys/ioctl.h>
  90. #  endif
  91.  
  92. #  ifdef BTL_BLIT
  93. #   include <sys/jioctl.h>    /* get BTL window resizing definitions */
  94. #  endif
  95.  
  96. #  ifdef SCO
  97. #   undef TIOCGWINSZ    /* SCO ODT defines this but does not implement it!!! */
  98. #  endif
  99.  
  100. /* Variables: */
  101.  
  102. extern bool    OKXonXoff;        /* VAR: XON/XOFF can be used as ordinary chars */
  103. extern ZXchar    IntChar;        /* VAR: ttysetattr sets this to generate QUIT */
  104.  
  105. #endif /* UNIX */
  106.  
  107. #ifdef BIFF
  108. extern bool    DisBiff;        /* VAR: turn off/on biff with entering/exiting jove */
  109. #endif
  110.