File: config.h

package info (click to toggle)
hztty 2.0-5.2woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,028 kB
  • ctags: 295
  • sloc: ansic: 26,960; makefile: 162; sh: 109
file content (189 lines) | stat: -rw-r--r-- 3,320 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* $Id: config.h,v 2.0 1995/01/29 08:10:04 ygz Exp $ */

#include "miniconf.h"

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/signal.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <pwd.h>
#include <stdio.h>
#include <errno.h>

#ifdef __STDC__
# include <stdlib.h>
#endif

#ifdef UNISTD
# include <unistd.h>
#endif

#ifdef __SVR4
# define SVR4
#endif

#ifdef SVR4
# define USE_SYS_UTMP
# define USE_TERMIOS
# define SYSV
# ifndef sgi
#  define ATT			/* no ATT for sgi */
# endif
# ifdef sun			/* Solaris 2 */
#  include <sys/strredir.h>
#  define HAS_UTMPX
# endif
#endif

#ifdef	SYSV386
# define USE_SYS_UTMP
# define ATT
#endif

#ifdef	POSIX
# define USE_TERMIOS
#endif

#ifdef TERMIO
# define USE_SYSV_TERMIO
#endif

#if !defined(sun) || !defined(SVR4) || !defined(__SUNPRO_C)
# include <sys/ioctl.h>		/* except Solaris sun cc */
#endif

#ifdef __linux__
#include <string.h>
#if 0
struct ltchars {
	char	t_suspc;
	char	t_dsuspc;
	char	t_rprntc;
	char	t_flushc;
	char	t_werasc;
	char	t_lnextc;
};
#endif
#endif
#ifdef USE_TERMIOS
# include <termios.h>
# define USE_SYSV_TERMIO
# ifndef _SEQUENT_
#  define termio termios
#  undef TCGETA
#  define TCGETA TCGETS
#  undef TCSETA
#  define TCSETA TCSETS
# endif /* _SEQUENT_ */
#else /* USE_TERMIOS */
# ifdef SYSV
#  define USE_SYSV_TERMIO
# endif 
# ifdef USE_SYSV_TERMIO
#  include <sys/termio.h>
# else
#  include <sgtty.h>
# endif
#endif /* USE_TERMIOS */

#ifdef	SVR4
# undef TIOCSLTC			/* defined, but not useable */
#endif

#ifdef	__linux__
# undef TIOCSLTC			/* defined, but not useable */
#endif

#if defined(sgi) && (IRIX >= 5)
# undef TIOCLSET			/* defined, but not useable */
#endif

#ifdef	ATT
# define USE_PTYS
#endif

#ifndef	SYSV                            /* BSD systems */
# include <sys/resource.h>
#endif  /* !SYSV */

#ifdef	SYSV
# define bcopy(a,b,c)		memcpy(b,a,c)
# define bzero(poi,len)		memset(poi,0,len)
# define killpg(pgrp,sig)	kill(-(pgrp),sig)
#endif

#ifdef	hpux
# include <sys/ptyio.h>
# include <sys/bsdtty.h>
#endif

#ifdef	__osf__
# define USE_SYS_UTMP
#endif

#ifdef  sgi
# include <sys/sysmacros.h>
#endif

#ifdef	macII
# include <sys/ttychars.h>
# define setpgrp2 setpgrp
# include <sgtty.h>
# include <sys/resource.h>
#endif

#if (! defined(SYSV)) || defined(sequent) || defined(pyr)
# include <strings.h>
#else /* BSD */
# include <string.h>
#endif /* BSD */

#if (defined(TIOCGWINSZ) || defined(TIOCSWINSZ)) && defined(M_UNIX)
# include <sys/stream.h>
# include <sys/ptem.h>
#endif

#ifdef	USE_PTYS
#include <sys/stropts.h>		/* for I_PUSH */
#endif

#ifndef SIG_RETURNS_INT
#define SIGNAL_T void
#define SIGNAL_RETURN return
#else
#define	SIGNAL_T int
#define SIGNAL_RETURN return 0
#endif

#ifdef	TIOCSWINSZ
#define		WINSIZE		winsize
#define		GETWINSZ	TIOCGWINSZ
#define		SETWINSZ	TIOCSWINSZ
#else   /* TIOCSWINSZ */
#if defined(sun) && !defined(SVR4)
#ifdef	    TIOCSSIZE
#define	 	WINSIZE		ttysize
#define		GETWINSZ	TIOCGSIZE
#define		SETWINSZ	TIOCSSIZE
#endif      /* TIOCSSIZE */
#endif    /* sun */
#endif  /* TIOCSWINSZ */

struct term_mode {
#ifdef	TIOCSLTC
		struct ltchars ltc;
#endif
#ifdef	TIOCLSET
		int lmode;
#endif
#ifdef	USE_SYSV_TERMIO
		struct termio tio;
#else	/* USE_SYSV_TERMIO */
		struct sgttyb sb;
		struct tchars tc;
		int ldis;
#endif	/* USE_SYSV_TERMIO */
};