annotate src/s/dgux4.h @ 19860:c17fd465ea95 libc-970911 libc-970912 libc-970913 libc-970914 libc-970915 libc-970916 libc-970917 libc-970918 libc-970919 libc-970920 libc-970921 libc-970922 libc-970923 libc-970924 libc-970925 libc-970926 libc-970927 libc-970928 libc-970929 libc-970930 libc-971001 libc-971018 libc-971019 libc-971020 libc-971021 libc-971022 libc-971023 libc-971024 libc-971025 libc-971026 libc-971027 libc-971028 libc-971029 libc-971030 libc-971031 libc-971101 libc-971102 libc-971103 libc-971104 libc-971105 libc-971106 libc-971107 libc-971108 libc-971109 libc-971110 libc-971111 libc-971112 libc-971113 libc-971114 libc-971115 libc-971116 libc-971117 libc-971118 libc-971120 libc-971121 libc-971122 libc-971123 libc-971124 libc-971125 libc-971126 libc-971127 libc-971128 libc-971129 libc-971130 libc-971201 libc-971203 libc-971204 libc-971205 libc-971206 libc-971207 libc-971208 libc-971209 libc-971210 libc-971211 libc-971212 libc-971213 libc-971214 libc-971217 libc-971218 libc-971219 libc-971220 libc-971221 libc-971222 libc-971223 libc-971224 libc-971225 libc-971226 libc-971227 libc-971228 libc-971229 libc-971230 libc-971231 libc-980103 libc-980104 libc-980105 libc-980106 libc-980107 libc-980108 libc-980109 libc-980110 libc-980111 libc-980112 libc-980114 libc-980115 libc-980116 libc-980117 libc-980118 libc-980119 libc-980120 libc-980121 libc-980122 libc-980123 libc-980124 libc-980125 libc-980126 libc-980127 libc-980128

typos.
author Jeff Law <law@redhat.com>
date Wed, 10 Sep 1997 21:16:20 +0000
parents ce2004da4ccd
children e89847e2df84
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18097
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 /* Definitions file for GNU Emacs running on Data General's DG/UX
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 Release 4.10 and above.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 Copyright (C) 1996 Free Software Foundation, Inc.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 This file is part of GNU Emacs.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 GNU Emacs is free software; you can redistribute it and/or modify
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 any later version.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 GNU General Public License for more details.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 along with GNU Emacs; see the file COPYING. If not, write to
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 /* This file was written by Roderick Schertler <roderick@ibcinc.com>,
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 contact me if you have problems with or comments about running Emacs
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 on dgux.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 A number of things in the older dgux*.h files don't make sense to me,
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 but since I'm relying on memory and I don't have any older dgux
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 systems installed on which to test changes I'm undoing or fixing them
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 here rather than fixing them at the source. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 /* In dgux.h it says "Can't use sys_signal because then etc/server.c
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 would need sysdep.o." and then it #defines signal() to be
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 berk_signal(), but emacsserver.c does `#undef signal' anyway, so that
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 doesn't make sense.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 Further, sys_signal() in sysdep.c already had a special case for
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 #ifdef DGUX, it called berk_signal() explicitly. I've removed that
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 special case because it also didn't make sense: All versions of dgux
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 which the dgux*.h headers take into account have POSIX signals
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 (POSIX_SIGNALS is #defined in dgux.h). The comments in sys_signal()
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 even acknowledged this (saying that the special berk_signal() case
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 wasn't really necessary), they said that sys_signal() was using
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 berk_signal() instead of sigaction() for efficiency. Since both give
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 reliable signals neither has to be invoked within the handler. If
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 the efficiency that the comments were talking about is the overhead
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 of setting up the sigaction struct rather than just passing the
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 function pointer in (which is the only efficiency I can think of)
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 then that's a needless optimization, the Emacs sources do better
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 without the special case.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 The following definition will prevent dgux.h from re-defining
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 signal(). I can't just say `#undef signal' after including dgux.h
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 because signal() is already a macro, defined in <sys/signal.h>, and
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 the original definition would be lost. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 #define NO_DGUX_SIGNAL_REDEF
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 #include "dgux5-4r3.h"
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 #define LIBS_DEBUG /* nothing, -lg doesn't exist */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 #ifndef NOT_C_CODE
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 /* dgux.h defines _setjmp() to be sigsetjmp(), but it defines _longjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 to be longjmp() rather than siglongjmp(). Further, it doesn't define
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 jmp_buf, so sigsetjmp() is being called with a jmp_buf rather than a
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 sigjmp_buf, and the buffer is then passed to vanilla longjmp(). This
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 provides a more complete emulation of the Berkeley semantics. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 #include <setjmp.h>
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 #undef jmp_buf
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 #undef _setjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 #undef setjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 #undef _longjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 #undef longjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 #define jmp_buf sigjmp_buf
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 #define _setjmp(env) sigsetjmp(env, 0)
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 #define setjmp(env) sigsetjmp(env, 1)
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 #define _longjmp siglongjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 #define longjmp siglongjmp
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 /* The BAUD_CONVERT definition in dgux.h is wrong with this version
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 of dgux, but I'm not sure when it changed.
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 With the current system Emacs' standard handling of ospeed and
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 baud_rate don't work. The baud values (B9600 and so on) returned by
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 cfgetospeed() aren't compatible with those used by ospeed. speed_t,
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 the type returned by cfgetospeed(), is unsigned long and speed_t
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 values are large. Further, it isn't possible to get at both the
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 SysV3 (ospeed) and POSIX (cfgetospeed()) values through symbolic
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 constants simultaneously because they both use the same names
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 (B9600). To get both baud_rate and ospeed right at the same time
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 it's necessary to hardcode the values for one set of values, here I'm
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 hardcoding ospeed. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 #undef BAUD_CONVERT
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 #define INIT_BAUD_RATE() \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 struct termios sg; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 tcgetattr (input_fd, &sg); \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 switch (cfgetospeed (&sg)) { \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 case B50: baud_rate = 50; ospeed = 0x1; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 case B75: baud_rate = 75; ospeed = 0x2; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 case B110: baud_rate = 110; ospeed = 0x3; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 case B134: baud_rate = 134; ospeed = 0x4; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 case B150: baud_rate = 150; ospeed = 0x5; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 case B200: baud_rate = 200; ospeed = 0x6; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 case B300: baud_rate = 300; ospeed = 0x7; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 case B600: baud_rate = 600; ospeed = 0x8; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 default: \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 case B1200: baud_rate = 1200; ospeed = 0x9; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 case B1800: baud_rate = 1800; ospeed = 0xa; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 case B2400: baud_rate = 2400; ospeed = 0xb; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 case B4800: baud_rate = 4800; ospeed = 0xc; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 case B9600: baud_rate = 9600; ospeed = 0xd; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 case B19200: baud_rate = 19200; ospeed = 0xe; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 case B38400: baud_rate = 38400; ospeed = 0xf; break; \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 } \
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 return;
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 /* The `stop on tty output' problem which occurs when using
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 INTERRUPT_INPUT and when Emacs is invoked under X11 using a job
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 control shell (csh, ksh, etc.) in the background doesn't look to be
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 present in R4.11. (At least, I can't reproduce it using jsh, csh,
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 ksh or zsh.) */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 #undef BROKEN_FIONREAD
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 #define INTERRUPT_INPUT
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 /* In R4.11 (or maybe R4.10, I don't have a system with that version
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 loaded) some of the internal stdio semantics were changed. One I
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 found while working on MH is that _cnt has to be 0 before _filbuf()
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 is called. Another is that (_ptr - _base) doesn't indicate how many
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 characters are waiting to be sent. I can't spot a good way to get
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 that info from the FILE internals. */
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 #define PENDING_OUTPUT_COUNT(FILE) (1)
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
ce2004da4ccd Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 #endif /* NOT_C_CODE */