1: /*
   2:  * Copyright (c) 1990 Michael A. Cooper.
   3:  * This software may be freely distributed provided it is not sold for
   4:  * profit and the author is credited appropriately.
   5:  */
   6: 
   7: /*
   8:  * $Header: /src/common/usc/bin/qterm/RCS/qterm.h,v 5.1 1991/03/12 00:46:24 mcooper Exp $
   9:  *------------------------------------------------------------------
  10:  *
  11:  * $Source: /src/common/usc/bin/qterm/RCS/qterm.h,v $
  12:  * $Revision: 5.1 $
  13:  * $Date: 1991/03/12 00:46:24 $
  14:  * $State: Exp $
  15:  * $Author: mcooper $
  16:  * $Locker:  $
  17:  *
  18:  *------------------------------------------------------------------
  19:  *
  20:  * Michael A. Cooper
  21:  * Research and Development Group
  22:  * University Computing Services
  23:  * University of Southern California
  24:  * (mcooper@usc.edu)
  25:  *
  26:  *------------------------------------------------------------------
  27:  * $Log: qterm.h,v $
  28:  * Revision 5.1  1991/03/12  00:46:24  mcooper
  29:  * - Changed CMASK to CHAR_CMASK to avoid conflict
  30:  *   under AIX 3.1.
  31:  * - Expand tabs.
  32:  *
  33:  * Revision 5.0	 1990/12/15  18:30:45  mcooper
  34:  * Version 5.
  35:  *
  36:  * Revision 4.1	 90/12/15  18:14:27  mcooper
  37:  * Add copywrite.
  38:  *
  39:  * Revision 4.0	 88/03/08  19:31:23  mcooper
  40:  * Version 4.
  41:  *
  42:  * Revision 3.2	 88/03/08  19:28:52  mcooper
  43:  * Major rewrite.
  44:  *
  45:  * Revision 3.1	 88/03/08  15:32:16  mcooper
  46:  * Changed around user's qtermtab
  47:  * file names.
  48:  *
  49:  * Revision 3.0	 87/06/30  19:09:04  mcooper
  50:  * Release of version 3.
  51:  *
  52:  * Revision 2.4	 87/06/30  19:02:28  mcooper
  53:  * WAIT changed to 2 for slow systems.
  54:  *
  55:  *------------------------------------------------------------------
  56:  */
  57: 
  58: 
  59: 
  60: #ifndef TABFILE
  61: # define TABFILE    "/usr/local/lib/qtermtab" /* Default qtermtab file */
  62: #endif
  63: #define USRFILE     ".qtermtab"     /* User's qtermtab file */
  64: #define OLDUSRFILE  ".qterm"        /* Old user qtermtab file */
  65: #define ALTSEND     "\033[c"        /* Alternate query string */
  66: #define WAIT        2           /* Timeout (in seconds) */
  67: #define SIZE        512         /* Receive buffer size */
  68: #define CHAR_MASK   0377            /* Character mask */
  69: #define ESC     '\033'          /* ESCAPE */
  70: 
  71: #ifdef TRUE
  72: #undef TRUE
  73: #endif
  74: #ifdef FALSE
  75: #undef FALSE
  76: #endif
  77: #define TRUE        1
  78: #define FALSE       0
  79: 
  80: #ifdef USG5
  81: # define crmode()   (_ntty.c_lflag &= ~ICANON,\
  82:             _ntty.c_cc[VMIN] = 1, _ntty.c_cc[VTIME] = 0,\
  83:             ioctl(_tty_ch, TCSETAF, &_ntty))
  84: # define nocrmode() (_ntty.c_lflag |= ICANON,\
  85:             _ntty.c_cc[VMIN] = _otty.c_cc[VMIN],\
  86:             _ntty.c_cc[VTIME] = _otty.c_cc[VTIME],\
  87:             ioctl(_tty_ch, TCSETAF, &_ntty))
  88: # define echo()     (_ntty.c_lflag |= ECHO,\
  89:             ioctl(_tty_ch, TCSETAF, &_ntty))
  90: # define noecho()   (_ntty.c_lflag &= ~ECHO,\
  91:             ioctl(_tty_ch, TCSETAF, &_ntty))
  92: #else /* !USG5 */
  93: # define crmode()   (_tty.sg_flags |= CBREAK,\
  94:             ioctl(_tty_ch, TIOCSETP, &_tty))
  95: # define nocrmode() (_tty.sg_flags &= ~CBREAK,\
  96:             ioctl(_tty_ch, TIOCSETP, &_tty))
  97: # define echo()     (_tty.sg_flags |= ECHO,   \
  98:             ioctl(_tty_ch, TIOCSETP, &_tty))
  99: # define noecho()   (_tty.sg_flags &= ~ECHO,  \
 100:             ioctl(_tty_ch, TIOCSETP, &_tty))
 101: #endif /* USG5 */
 102: 
 103: /*
 104:  * Terminal table structure
 105:  */
 106: struct termtable {
 107:     char        *qt_sendstr;    /* String to send to terminal */
 108:     char        *qt_recvstr;    /* String expected in response */
 109:     char        *qt_termname;   /* Terminal name */
 110:     char        *qt_fullname;   /* Full terminal name & description */
 111:     struct termtable    *nxt;       /* Next structure */
 112: };
 113: struct termtable *termtab = NULL;

Defined variables

termtab defined in line 113; used 5 times

Defined struct's

termtable defined in line 106; used 30 times

Defined macros

ALTSEND defined in line 65; used 1 times
CHAR_MASK defined in line 68; used 1 times
ESC defined in line 69; used 1 times
FALSE defined in line 78; used 2 times
OLDUSRFILE defined in line 64; used 1 times
SIZE defined in line 67; used 1 times
TABFILE defined in line 61; used 2 times
TRUE defined in line 77; used 2 times
USRFILE defined in line 63; used 1 times
WAIT defined in line 66; used 1 times
crmode defined in line 93; used 1 times
echo defined in line 97; used 1 times
nocrmode defined in line 95; used 1 times
noecho defined in line 99; used 1 times

Usage of this include

Last modified: 1995-11-22
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2560
Valid CSS Valid XHTML 1.0 Strict