OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [exp_tty_in.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* exp_tty_in.h - internal tty support definitions */
2
 
3
/* Definitions for handling termio inclusion are localized here */
4
/* This file should be included only if direct access to tty structures are */
5
/* required.  This file is necessary to avoid  mismatch between gcc's and */
6
/* vendor's include files */
7
 
8
/* Written by Rob Savoye <rob@cygnus.com>. Mon Feb 22 11:16:53 RMT 1993 */
9
 
10
#ifndef __EXP_TTY_IN_H__
11
#define __EXP_TTY_IN_H__
12
 
13
#include "expect_cf.h"
14
 
15
#ifdef __MACHTEN__
16
#include "sys/types.h"
17
#endif
18
 
19
/*
20
 * Set up some macros to isolate tty differences
21
 */
22
 
23
/* On some hosts, termio is incomplete (broken) and sgtty is a better
24
choice.  At the same time, termio has some definitions for modern
25
stuff like window sizes that sgtty lacks - that's why termio.h
26
is included even when we claim the basic style is sgtty
27
*/
28
 
29
/* test for pyramid may be unnecessary, but only Pyramid people have */
30
/* complained - notably pclink@qus102.qld.npb.telecom.com.au (Rick) */
31
#if defined(pyr) && defined(HAVE_TERMIO) && defined(HAVE_SGTTYB)
32
#undef HAVE_SGTTYB
33
#endif
34
 
35
/* on ISC SVR3.2, termios is skeletal and termio is a better choice.  */
36
/* sgttyb must also be avoided because it redefines same things that */
37
/* termio does */
38
/* note that both SVR3.2 and AIX lacks TCGETS or TCGETA in termios.h */
39
/* but SVR3.2 lacks both TCSETATTR and TCGETS/A */
40
#if defined(HAVE_TERMIO) && defined(HAVE_TERMIOS) && !defined(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H) && !defined(HAVE_TCSETATTR)
41
# undef HAVE_TERMIOS
42
# undef HAVE_SGTTYB
43
#endif
44
 
45
#if defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS)
46
#  include <termio.h>
47
#  undef POSIX
48
#  define TERMINAL termio
49
#  ifndef TCGETS
50
#    define TCGETS      TCGETA
51
#    define TCSETS      TCSETA
52
#    define TCSETSW     TCSETAW
53
#    define TCSETSF     TCSETAF
54
#  endif
55
#endif
56
 
57
#if defined(HAVE_SGTTYB) && !defined(HAVE_TERMIOS)
58
#  undef HAVE_TERMIO
59
#  undef POSIX
60
#ifndef TCGETS
61
#  define TCGETS        TIOCGETP
62
#  define TCSETS        TIOCSETP
63
#endif
64
#ifndef TCSETSW
65
#  define TCSETSW       TIOCSETN
66
#endif
67
#  define TERMINAL sgttyb
68
#  ifdef HAVE_SYS_FCNTL_H
69
#    include <sys/fcntl.h>
70
#  else
71
#    include <fcntl.h>
72
#  endif
73
#  include <sgtty.h>
74
#  include <sys/ioctl.h>
75
#endif
76
 
77
 
78
#if defined(HAVE_TERMIOS)
79
#  undef HAVE_TERMIO
80
#  undef HAVE_SGTTYB
81
#  include <termios.h>
82
#  define TERMINAL termios
83
#  if !defined(TCGETS) || !defined(TCSETS)
84
#    define TCGETS      TCGETA
85
#    define TCSETS      TCSETA
86
#    define TCSETSW     TCSETAW
87
#    define TCSETSF     TCSETAF
88
#  endif
89
#endif
90
 
91
/* This section was written by: Don Libes, NIST, 2/6/90 */
92
 
93
typedef struct TERMINAL exp_tty;
94
extern exp_tty exp_tty_original;
95
extern exp_tty exp_tty_current;
96
extern exp_tty exp_tty_cooked;
97
 
98
#include "exp_tty.h"
99
 
100
#endif  /* __EXP_TTY_IN_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.