~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qtcsh/ed.term.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ed.term.h: Local terminal header
 
3
 */
 
4
/*-
 
5
 * Copyright (c) 1980, 1991 The Regents of the University of California.
 
6
 * All rights reserved.
 
7
 *
 
8
 * Redistribution and use in source and binary forms, with or without
 
9
 * modification, are permitted provided that the following conditions
 
10
 * are met:
 
11
 * 1. Redistributions of source code must retain the above copyright
 
12
 *    notice, this list of conditions and the following disclaimer.
 
13
 * 2. Redistributions in binary form must reproduce the above copyright
 
14
 *    notice, this list of conditions and the following disclaimer in the
 
15
 *    documentation and/or other materials provided with the distribution.
 
16
 * 3. All advertising materials mentioning features or use of this software
 
17
 *    must display the following acknowledgement:
 
18
 *      This product includes software developed by the University of
 
19
 *      California, Berkeley and its contributors.
 
20
 * 4. Neither the name of the University nor the names of its contributors
 
21
 *    may be used to endorse or promote products derived from this software
 
22
 *    without specific prior written permission.
 
23
 *
 
24
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 
25
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
26
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
27
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
28
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
29
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
30
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
31
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
32
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
33
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
34
 * SUCH DAMAGE.
 
35
 */
 
36
#ifndef _h_ed_term
 
37
#define _h_ed_term
 
38
 
 
39
#define TO_CONTROL(A)   ((A) & 037)
 
40
 
 
41
#if defined(TERMIO) || defined(POSIX)
 
42
/*
 
43
 * Aix compatible names
 
44
 */
 
45
# if defined(VWERSE) && !defined(VWERASE)
 
46
#  define VWERASE VWERSE
 
47
# endif /* VWERSE && !VWERASE */
 
48
 
 
49
# if defined(VDISCRD) && !defined(VDISCARD)
 
50
#  define VDISCARD VDISCRD
 
51
# endif /* VDISCRD && !VDISCARD */
 
52
 
 
53
# if defined(VFLUSHO) && !defined(VDISCARD)
 
54
#  define VDISCARD VFLUSHO
 
55
# endif  /* VFLUSHO && VDISCARD */
 
56
 
 
57
# if defined(VSTRT) && !defined(VSTART)
 
58
#  define VSTART VSTRT
 
59
# endif /* VSTRT && ! VSTART */
 
60
 
 
61
# if defined(VSTAT) && !defined(VSTATUS)
 
62
#  define VSTATUS VSTAT
 
63
# endif /* VSTAT && ! VSTATUS */
 
64
 
 
65
# ifndef ONLRET
 
66
#  define ONLRET 0
 
67
# endif /* ONLRET */
 
68
 
 
69
# ifndef TAB3
 
70
#  ifdef OXTABS
 
71
#   define TAB3 OXTABS
 
72
#  else
 
73
#   define TAB3 0
 
74
#  endif /* OXTABS */
 
75
# endif /* !TAB3 */
 
76
 
 
77
# if defined(OXTABS) && !defined(XTABS)
 
78
#  define XTABS OXTABS
 
79
# endif /* OXTABS && !XTABS */
 
80
 
 
81
# ifndef ONLCR
 
82
#  define ONLCR 0
 
83
# endif /* ONLCR */
 
84
 
 
85
# ifndef IEXTEN
 
86
#  define IEXTEN 0
 
87
# endif /* IEXTEN */
 
88
 
 
89
/*
 
90
 * emx garbage
 
91
 */
 
92
# ifndef IDEFAULT
 
93
#  define IDEFAULT 0
 
94
# endif /* IDEFAULT */
 
95
 
 
96
# ifndef IDELETE
 
97
#  define IDELETE 0
 
98
# endif /* IDELETE */
 
99
 
 
100
# ifndef ECHOCTL
 
101
#  define ECHOCTL 0
 
102
# endif /* ECHOCTL */
 
103
 
 
104
# ifndef PARENB
 
105
#  define PARENB 0
 
106
# endif /* PARENB */
 
107
 
 
108
# ifndef EXTPROC
 
109
#  define EXTPROC 0
 
110
# endif /* EXTPROC */
 
111
 
 
112
# ifndef FLUSHO
 
113
#  define FLUSHO  0
 
114
# endif /* FLUSHO */
 
115
 
 
116
 
 
117
# if defined(VDISABLE) && !defined(_POSIX_VDISABLE)
 
118
#  define _POSIX_VDISABLE VDISABLE
 
119
# endif /* VDISABLE && ! _POSIX_VDISABLE */
 
120
 
 
121
/*
 
122
 * Work around ISC's definition of IEXTEN which is
 
123
 * XCASE!
 
124
 */
 
125
# ifdef ISC
 
126
#  if defined(IEXTEN) && defined(XCASE)
 
127
#   if IEXTEN == XCASE
 
128
#    undef IEXTEN
 
129
#    define IEXTEN 0
 
130
#   endif /* IEXTEN == XCASE */
 
131
#  endif /* IEXTEN && XCASE */
 
132
#  if defined(IEXTEN) && !defined(XCASE)
 
133
#   define XCASE IEXTEN
 
134
#   undef IEXTEN
 
135
#   define IEXTEN 0
 
136
#  endif /* IEXTEN && !XCASE */
 
137
# endif /* ISC */
 
138
 
 
139
/*
 
140
 * Work around convex weirdness where turning off IEXTEN makes us
 
141
 * lose all postprocessing!
 
142
 */
 
143
#ifdef convex
 
144
# if defined(IEXTEN) && IEXTEN != 0
 
145
#  undef IEXTEN
 
146
#  define IEXTEN 0
 
147
# endif /* IEXTEN != 0 */
 
148
#endif /* convex */
 
149
 
 
150
 
 
151
# else /* SGTTY */
 
152
 
 
153
# ifndef LPASS8
 
154
#  define LPASS8  0
 
155
# endif /* LPASS8 */
 
156
 
 
157
#endif /* TERMIO || POSIX */
 
158
 
 
159
#ifndef _POSIX_VDISABLE
 
160
# define _POSIX_VDISABLE ((unsigned char) -1)
 
161
#endif /* _POSIX_VDISABLE */
 
162
 
 
163
 
 
164
#if !defined(CREPRINT) && defined(CRPRNT)
 
165
# define CREPRINT CRPRNT
 
166
#endif /* !CREPRINT && CRPRNT */
 
167
#if !defined(CDISCARD) && defined(CFLUSH)
 
168
# define CDISCARD CFLUSH
 
169
#endif /* !CDISCARD && CFLUSH */
 
170
#if !defined(CDISCARD) && defined(CFLUSHO)
 
171
# define CDISCARD CFLUSHO
 
172
#endif /* !CDISCARD && CFLUSHO */
 
173
 
 
174
/*
 
175
 * IRIX4.0 control macro is broken!
 
176
 * Ignore and undef all default tty chars defined and redefine only
 
177
 * the ones that are different in the IRIX file.
 
178
 */
 
179
#if __STDC__ && defined(IRIS4D)
 
180
# undef  CINTR
 
181
# define CINTR          0177    /* ^? */
 
182
# undef  CQUIT
 
183
# undef  CERASE
 
184
# define CERASE         TO_CONTROL('h')
 
185
# undef  CKILL
 
186
# undef  CEOF
 
187
# undef  CEOL
 
188
# undef  CEOL2  
 
189
# undef  CSWTCH 
 
190
# define CSWTCH         TO_CONTROL('z')
 
191
# undef  CDSWTCH 
 
192
# undef  CERASE2
 
193
# undef  CSTART
 
194
# undef  CSTOP
 
195
# undef  CWERASE
 
196
# undef  CSUSP
 
197
# undef  CDSUSP
 
198
# undef  CREPRINT
 
199
# undef  CDISCARD
 
200
# undef  CLNEXT
 
201
# undef  CSTATUS
 
202
# undef  CPAGE
 
203
# undef  CPGOFF
 
204
# undef  CKILL2
 
205
# undef  CBRK
 
206
# undef  CMIN
 
207
# undef  CTIME
 
208
#endif /* __STDC__ && IRIS4D */
 
209
 
 
210
 
 
211
#ifndef CINTR
 
212
# define CINTR          TO_CONTROL('c')
 
213
#endif /* CINTR */
 
214
#ifndef CQUIT
 
215
# define CQUIT          034     /* ^\ */
 
216
#endif /* CQUIT */
 
217
#ifndef CERASE
 
218
# define CERASE         0177    /* ^? */
 
219
#endif /* CERASE */
 
220
#ifndef CKILL
 
221
# define CKILL          TO_CONTROL('u')
 
222
#endif /* CKILL */
 
223
#ifndef CEOF
 
224
# define CEOF           TO_CONTROL('d')
 
225
#endif /* CEOF */
 
226
#ifndef CEOL
 
227
# define CEOL           _POSIX_VDISABLE
 
228
#endif /* CEOL */
 
229
#ifndef CEOL2
 
230
# define CEOL2          _POSIX_VDISABLE
 
231
#endif /* CEOL2 */
 
232
#ifndef CSWTCH
 
233
# define CSWTCH         _POSIX_VDISABLE
 
234
#endif /* CSWTCH */
 
235
#ifndef CDSWTCH
 
236
# define CDSWTCH        _POSIX_VDISABLE
 
237
#endif /* CDSWTCH */
 
238
#ifndef CERASE2
 
239
# define CERASE2        _POSIX_VDISABLE
 
240
#endif /* CERASE2 */
 
241
#ifndef CSTART
 
242
# define CSTART         TO_CONTROL('q')
 
243
#endif /* CSTART */
 
244
#ifndef CSTOP
 
245
# define CSTOP          TO_CONTROL('s')
 
246
#endif /* CSTOP */
 
247
#ifndef CSUSP
 
248
# define CSUSP          TO_CONTROL('z')
 
249
#endif /* CSUSP */
 
250
#ifndef CDSUSP
 
251
# define CDSUSP         TO_CONTROL('y')
 
252
#endif /* CDSUSP */
 
253
 
 
254
#ifdef hpux
 
255
 
 
256
# ifndef CREPRINT
 
257
#  define CREPRINT      _POSIX_VDISABLE
 
258
# endif /* CREPRINT */
 
259
# ifndef CDISCARD
 
260
#  define CDISCARD      _POSIX_VDISABLE
 
261
# endif /* CDISCARD */
 
262
# ifndef CLNEXT
 
263
#  define CLNEXT        _POSIX_VDISABLE
 
264
# endif /* CLNEXT */
 
265
# ifndef CWERASE
 
266
#  define CWERASE       _POSIX_VDISABLE
 
267
# endif /* CWERASE */
 
268
 
 
269
#else /* !hpux */
 
270
 
 
271
# ifndef CREPRINT
 
272
#  define CREPRINT      TO_CONTROL('r')
 
273
# endif /* CREPRINT */
 
274
# ifndef CDISCARD
 
275
#  define CDISCARD      TO_CONTROL('o')
 
276
# endif /* CDISCARD */
 
277
# ifndef CLNEXT
 
278
#  define CLNEXT        TO_CONTROL('v')
 
279
# endif /* CLNEXT */
 
280
# ifndef CWERASE
 
281
#  define CWERASE       TO_CONTROL('w')
 
282
# endif /* CWERASE */
 
283
 
 
284
#endif /* hpux */
 
285
 
 
286
#ifndef CSTATUS
 
287
# define CSTATUS        TO_CONTROL('t')
 
288
#endif /* CSTATUS */
 
289
#ifndef CPAGE
 
290
# define CPAGE          ' '
 
291
#endif /* CPAGE */
 
292
#ifndef CPGOFF
 
293
# define CPGOFF         TO_CONTROL('m')
 
294
#endif /* CPGOFF */
 
295
#ifndef CKILL2
 
296
# define CKILL2         _POSIX_VDISABLE
 
297
#endif /* CKILL2 */
 
298
#ifndef CBRK
 
299
# ifndef masscomp
 
300
#  define CBRK          0377
 
301
# else
 
302
#  define CBRK          '\0'
 
303
# endif /* masscomp */
 
304
#endif /* CBRK */
 
305
#ifndef CMIN
 
306
# define CMIN           CEOF
 
307
#endif /* CMIN */
 
308
#ifndef CTIME
 
309
# define CTIME          CEOL
 
310
#endif /* CTIME */
 
311
 
 
312
/*
 
313
 * Fix for sun inconsistency. On termio VSUSP and the rest of the
 
314
 * ttychars > NCC are defined. So we undefine them.
 
315
 */
 
316
#if defined(TERMIO) || defined(POSIX)
 
317
# if defined(POSIX) && defined(NCCS)
 
318
#  define NUMCC         NCCS
 
319
# else
 
320
#  ifdef NCC
 
321
#   define NUMCC        NCC
 
322
#  endif /* NCC */
 
323
# endif /* POSIX && NCCS */
 
324
# ifdef NUMCC
 
325
#  ifdef VINTR
 
326
#   if NUMCC <= VINTR
 
327
#    undef VINTR
 
328
#   endif /* NUMCC <= VINTR */
 
329
#  endif /* VINTR */
 
330
#  ifdef VQUIT
 
331
#   if NUMCC <= VQUIT
 
332
#    undef VQUIT
 
333
#   endif /* NUMCC <= VQUIT */
 
334
#  endif /* VQUIT */
 
335
#  ifdef VERASE
 
336
#   if NUMCC <= VERASE
 
337
#    undef VERASE
 
338
#   endif /* NUMCC <= VERASE */
 
339
#  endif /* VERASE */
 
340
#  ifdef VKILL
 
341
#   if NUMCC <= VKILL
 
342
#    undef VKILL
 
343
#   endif /* NUMCC <= VKILL */
 
344
#  endif /* VKILL */
 
345
#  ifdef VEOF
 
346
#   if NUMCC <= VEOF
 
347
#    undef VEOF
 
348
#   endif /* NUMCC <= VEOF */
 
349
#  endif /* VEOF */
 
350
#  ifdef VEOL
 
351
#   if NUMCC <= VEOL
 
352
#    undef VEOL
 
353
#   endif /* NUMCC <= VEOL */
 
354
#  endif /* VEOL */
 
355
#  ifdef VEOL2
 
356
#   if NUMCC <= VEOL2
 
357
#    undef VEOL2
 
358
#   endif /* NUMCC <= VEOL2 */
 
359
#  endif /* VEOL2 */
 
360
#  ifdef VSWTCH
 
361
#   if NUMCC <= VSWTCH
 
362
#    undef VSWTCH
 
363
#   endif /* NUMCC <= VSWTCH */
 
364
#  endif /* VSWTCH */
 
365
#  ifdef VDSWTCH
 
366
#   if NUMCC <= VDSWTCH
 
367
#    undef VDSWTCH
 
368
#   endif /* NUMCC <= VDSWTCH */
 
369
#  endif /* VDSWTCH */
 
370
#  ifdef VERASE2
 
371
#   if NUMCC <= VERASE2
 
372
#    undef VERASE2
 
373
#   endif /* NUMCC <= VERASE2 */
 
374
#  endif /* VERASE2 */
 
375
#  ifdef VSTART
 
376
#   if NUMCC <= VSTART
 
377
#    undef VSTART
 
378
#   endif /* NUMCC <= VSTART */
 
379
#  endif /* VSTART */
 
380
#  ifdef VSTOP
 
381
#   if NUMCC <= VSTOP
 
382
#    undef VSTOP
 
383
#   endif /* NUMCC <= VSTOP */
 
384
#  endif /* VSTOP */
 
385
#  ifdef VWERASE
 
386
#   if NUMCC <= VWERASE
 
387
#    undef VWERASE
 
388
#   endif /* NUMCC <= VWERASE */
 
389
#  endif /* VWERASE */
 
390
#  ifdef VSUSP
 
391
#   if NUMCC <= VSUSP
 
392
#    undef VSUSP
 
393
#   endif /* NUMCC <= VSUSP */
 
394
#  endif /* VSUSP */
 
395
#  ifdef VDSUSP
 
396
#   if NUMCC <= VDSUSP
 
397
#    undef VDSUSP
 
398
#   endif /* NUMCC <= VDSUSP */
 
399
#  endif /* VDSUSP */
 
400
#  ifdef VREPRINT
 
401
#   if NUMCC <= VREPRINT
 
402
#    undef VREPRINT
 
403
#   endif /* NUMCC <= VREPRINT */
 
404
#  endif /* VREPRINT */
 
405
#  ifdef VDISCARD
 
406
#   if NUMCC <= VDISCARD
 
407
#    undef VDISCARD
 
408
#   endif /* NUMCC <= VDISCARD */
 
409
#  endif /* VDISCARD */
 
410
#  ifdef VLNEXT
 
411
#   if NUMCC <= VLNEXT
 
412
#    undef VLNEXT
 
413
#   endif /* NUMCC <= VLNEXT */
 
414
#  endif /* VLNEXT */
 
415
#  ifdef VSTATUS
 
416
#   if NUMCC <= VSTATUS
 
417
#    undef VSTATUS
 
418
#   endif /* NUMCC <= VSTATUS */
 
419
#  endif /* VSTATUS */
 
420
#  ifdef VPAGE
 
421
#   if NUMCC <= VPAGE
 
422
#    undef VPAGE
 
423
#   endif /* NUMCC <= VPAGE */
 
424
#  endif /* VPAGE */
 
425
#  ifdef VPGOFF
 
426
#   if NUMCC <= VPGOFF
 
427
#    undef VPGOFF
 
428
#   endif /* NUMCC <= VPGOFF */
 
429
#  endif /* VPGOFF */
 
430
#  ifdef VKILL2
 
431
#   if NUMCC <= VKILL2
 
432
#    undef VKILL2
 
433
#   endif /* NUMCC <= VKILL2 */
 
434
#  endif /* VKILL2 */
 
435
#  ifdef VBRK
 
436
#   if NUMCC <= VBRK
 
437
#    undef VBRK
 
438
#   endif /* NUMCC <= VBRK */
 
439
#  endif /* VBRK */
 
440
#  ifdef VMIN
 
441
#   if NUMCC <= VMIN
 
442
#    undef VMIN
 
443
#   endif /* NUMCC <= VMIN */
 
444
#  endif /* VMIN */
 
445
#  ifdef VTIME
 
446
#   if NUMCC <= VTIME
 
447
#    undef VTIME
 
448
#   endif /* NUMCC <= VTIME */
 
449
#  endif /* VTIME */
 
450
# endif /* NUMCC */
 
451
#endif /* !POSIX */
 
452
 
 
453
/*
 
454
 * fix for hpux10 inconsistency: it has VWERASE, but TIOCSLTC returns
 
455
 * EINVAL if one tries to change it
 
456
 */
 
457
#if defined(hpux) && defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && d
 
458
efined(VLNEXT)
 
459
# undef TIOCGLTC       /* not really needed */
 
460
# undef TIOCSLTC
 
461
#endif
 
462
 
 
463
#define C_INTR           0
 
464
#define C_QUIT           1
 
465
#define C_ERASE          2
 
466
#define C_KILL           3
 
467
#define C_EOF            4
 
468
#define C_EOL            5
 
469
#define C_EOL2           6
 
470
#define C_SWTCH          7
 
471
#define C_DSWTCH         8
 
472
#define C_ERASE2         9
 
473
#define C_START         10
 
474
#define C_STOP          11
 
475
#define C_WERASE        12
 
476
#define C_SUSP          13
 
477
#define C_DSUSP         14
 
478
#define C_REPRINT       15
 
479
#define C_DISCARD       16
 
480
#define C_LNEXT         17
 
481
#define C_STATUS        18
 
482
#define C_PAGE          19
 
483
#define C_PGOFF         20
 
484
#define C_KILL2         21
 
485
#define C_BRK           22
 
486
#define C_MIN           23
 
487
#define C_TIME          24
 
488
#define C_NCC           25
 
489
#define C_SH(A)         (1 << (A))
 
490
 
 
491
#endif /* _h_ed_term */