home *** CD-ROM | disk | FTP | other *** search
- /*
- * $Header: qterm.h,v 3.0 87/06/30 19:09:04 mcooper Release $
- *------------------------------------------------------------------
- *
- * $Source: /big/src/usc/bin/qterm/RCS/qterm.h,v $
- * $Revision: 3.0 $
- * $Date: 87/06/30 19:09:04 $
- * $State: Release $
- * $Author: mcooper $
- * $Locker: $
- *
- *------------------------------------------------------------------
- *
- * Michael A. Cooper
- * Research and Development Group
- * University Computing Services
- * University of Southern California
- * (mcooper@oberon.USC.EDU)
- *
- *------------------------------------------------------------------
- * $Log: qterm.h,v $
- * Revision 3.0 87/06/30 19:09:04 mcooper
- * Release of version 3.
- *
- * Revision 2.4 87/06/30 19:02:28 mcooper
- * WAIT changed to 2 for slow systems.
- *
- *------------------------------------------------------------------
- */
-
-
-
- #ifndef TABFILE
- # define TABFILE "/usr/local/lib/qtermtab"
- #endif
-
- #define ALTSEND "\033[c" /* alternate string */
- #define STRFILE ".qterm" /* file containing terminal strings */
-
- #define WAIT 2 /* Number of seconds for alarms */
- #define MAXTERMS 50 /* Maximum # of terminals for qterm */
-
- #define SIZE 512
- #define CMASK 0377
- #define ESC '\033'
-
- #define TRUE 1
- #define FALSE 0
-
- #ifdef USG5
- # define crmode() (_ntty.c_lflag &= ~ICANON,\
- _ntty.c_cc[VMIN] = 1, _ntty.c_cc[VTIME] = 0,\
- ioctl(_tty_ch, TCSETAF, &_ntty))
- # define nocrmode() (_ntty.c_lflag |= ICANON,\
- _ntty.c_cc[VMIN] = _otty.c_cc[VMIN],\
- _ntty.c_cc[VTIME] = _otty.c_cc[VTIME],\
- ioctl(_tty_ch, TCSETAF, &_ntty))
- # define echo() (_ntty.c_lflag |= ECHO,\
- ioctl(_tty_ch, TCSETAF, &_ntty))
- # define noecho() (_ntty.c_lflag &= ~ECHO,\
- ioctl(_tty_ch, TCSETAF, &_ntty))
- #else
- # define crmode() (_tty.sg_flags |= CBREAK,\
- ioctl(_tty_ch, TIOCSETP, &_tty))
- # define nocrmode() (_tty.sg_flags &= ~CBREAK,\
- ioctl(_tty_ch, TIOCSETP, &_tty))
- # define echo() (_tty.sg_flags |= ECHO, \
- ioctl(_tty_ch, TIOCSETP, &_tty))
- # define noecho() (_tty.sg_flags &= ~ECHO, \
- ioctl(_tty_ch, TIOCSETP, &_tty))
- #endif
-
- #define dprintf if(debug)printf
-
- struct qt {
- char qt_sendstr[BUFSIZ]; /* String to send to terminal */
- char qt_recvstr[BUFSIZ]; /* String expected in response */
- char qt_termname[BUFSIZ]; /* Terminal name */
- char qt_fullname[BUFSIZ]; /* Full terminal name & description */
- };
-