Mercurial > emacs
annotate src/s/usg5-4.h @ 50149:5d83d663737a
(struct glyph): Reduce face_id member from 22 to
21 bits (this reduces number of faces from 4M to 2M).
Replace W32 specific w32_font_type member (2 bits) by generic
font_type member (3 bits) for portability.
(FONT_TYPE_UNKNOWN): New define, default for font_type member.
(enum draw_glyphs_face): Define here.
(struct glyph_string): Define here. Merge W32 and X versions.
(struct redisplay_interface): New members per_char_metric,
encode_char, compute_glyph_string_overhangs, draw_glyph_string.
(VCENTER_BASELINE_OFFSET): Define here.
(dump_glyph_string, x_get_glyph_overhangs, x_produce_glyphs)
(x_draw_glyphs, notice_overwritten_cursor): Declare prototypes here.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 16 Mar 2003 20:45:20 +0000 |
parents | 02e59b2006cd |
children | 695cf19ef79e d7ddb3e565de |
rev | line source |
---|---|
456 | 1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4 |
34613
d4c7ac767031
(bcopy) [IRIX6]: Don't special-case definition of
Gerd Moellmann <gerd@gnu.org>
parents:
26678
diff
changeset
|
2 Copyright (C) 1987, 1990, 1999, 2000 Free Software Foundation, Inc. |
456 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
1039 | 6 GNU Emacs is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | |
3699 | 8 the Free Software Foundation; either version 2, or (at your option) |
1039 | 9 any later version. |
456 | 10 |
1039 | 11 GNU Emacs is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
13529
diff
changeset
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
13529
diff
changeset
|
19 Boston, MA 02111-1307, USA. */ |
456 | 20 |
21 /* This file written by James Van Artsdalen of Dell Computer Corporation. | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
22 * james@bigtex.cactus.org. Subsequently improved for Dell 2.2 by Eric |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
23 * S. Raymond <esr@snark.thyrsus.com>. |
456 | 24 */ |
25 | |
26 /* Use the SysVr3 file for at least base configuration. */ | |
27 | |
1868
f84d4b4b53da
* s/usg5-4.h: #include "usg5-3.h", not "s-usg5-3.h".
Jim Blandy <jimb@redhat.com>
parents:
1179
diff
changeset
|
28 #include "usg5-3.h" |
456 | 29 |
30 #define USG5_4 | |
31 | |
32 /* We do have multiple jobs. Handle ^Z. */ | |
33 | |
34 #undef NOMULTIPLEJOBS | |
35 | |
26678
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
36 /* Motif needs -lgen. */ |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
37 #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen |
1179 | 38 #define ORDINARY_LINK |
456 | 39 |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
40 #if 0 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
41 #ifdef ORDINARY_LINK |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
42 #define LIB_STANDARD -lc /usr/ucblib/libucb.a |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
43 #else |
1179 | 44 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
45 #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o | |
46 #endif | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
47 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
48 |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
49 #ifdef ORDINARY_LINK |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
50 #define LIB_STANDARD |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
51 #else |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
52 #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
53 #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
54 #endif |
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
55 #endif |
456 | 56 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
57 /* there are no -lg libraries on this system, and no libPW */ |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
58 |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
59 #define LIBS_DEBUG |
456 | 60 |
61 /* Undump with ELF */ | |
62 | |
63 #undef COFF | |
64 | |
65 #define UNEXEC unexelf.o | |
66 | |
8300
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
67 /* <sys/stat.h> *defines* stat(2) as a static function. If "static" |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
68 * is blank, then many files will have a public definition for stat(2). |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
69 */ |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
70 |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
71 #undef static |
95b09cdfc59d
Move #undef static before the includes.
Richard M. Stallman <rms@gnu.org>
parents:
8283
diff
changeset
|
72 |
456 | 73 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct |
74 * tchars. But get <termio.h> first to make sure ttold.h doesn't | |
75 * interfere. And don't try to use SIGIO yet. | |
76 */ | |
77 | |
13466
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
78 #ifndef NOT_C_CODE |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
79 #include <sys/wait.h> |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
80 #endif |
e31afd8b6355
Always include sys/wait.h unless NOT_C_CODE;
Richard M. Stallman <rms@gnu.org>
parents:
12734
diff
changeset
|
81 |
456 | 82 #ifdef emacs |
15844
090728aee80a
Don't include filio.h if NO_FILIO_H.
Richard M. Stallman <rms@gnu.org>
parents:
14186
diff
changeset
|
83 #ifndef NO_FILIO_H |
456 | 84 #include <sys/filio.h> |
15844
090728aee80a
Don't include filio.h if NO_FILIO_H.
Richard M. Stallman <rms@gnu.org>
parents:
14186
diff
changeset
|
85 #endif |
456 | 86 #include <termio.h> |
87 #include <sys/ttold.h> | |
88 #include <signal.h> | |
1039 | 89 #include <sys/stream.h> |
90 #include <sys/stropts.h> | |
91 #include <sys/termios.h> | |
26090 | 92 #define BROKEN_SIGIO |
456 | 93 #endif |
94 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
95 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
96 * instead, there's a system variable _sys_nsig. Unfortunately, we need the |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
97 * constant to dimension an array. So wire in the appropriate value here. |
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
98 */ |
26090 | 99 #define NSIG_MINIMUM 32 |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
100 |
456 | 101 /* We need bss_end from emacs.c for undumping */ |
102 | |
103 #ifndef USG_SHARED_LIBRARIES | |
104 #define USG_SHARED_LIBRARIES | |
105 #endif | |
106 | |
107 /* We can support this */ | |
108 | |
109 #define CLASH_DETECTION | |
110 | |
111 #define HAVE_PTYS | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
112 #define HAVE_TERMIOS |
4295
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
113 #undef BROKEN_TIOCGWINSZ |
04801cc935e6
(BROKEN_TIOCGETC, BROKEN_TIOCGWINSZ): Add #undefs.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
114 #undef BROKEN_TIOCGETC |
456 | 115 |
116 /* It is possible to receive SIGCHLD when there are no children | |
117 waiting, because a previous waitsys(2) cleaned up the carcass of child | |
118 without clearing the SIGCHLD pending info. So, use a non-blocking | |
119 wait3 instead, which maps to waitpid(2) in SysVr4. */ | |
120 | |
121 #define HAVE_WAIT_HEADER | |
122 #define WAITTYPE int | |
123 #define wait3(status, options, rusage) \ | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
124 waitpid ((pid_t) -1, (status), (options)) |
456 | 125 #define WRETCODE(w) (w >> 8) |
126 | |
127 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY | |
128 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and | |
129 this is all we need. */ | |
130 | |
131 #define TIOCSIGSEND TIOCSIGNAL | |
132 | |
133 /* This change means that we don't loop through allocate_pty too many | |
134 times in the (rare) event of a failure. */ | |
135 | |
136 #undef FIRST_PTY_LETTER | |
137 #define FIRST_PTY_LETTER 'z' | |
138 | |
139 /* This sets the name of the master side of the PTY. */ | |
140 | |
141 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
142 | |
143 /* This sets the name of the slave side of the PTY. On SysVr4, | |
144 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
145 intercepting that death. If any child but grantpt's should die | |
146 within, it should be caught after sigrelse(2). */ | |
147 | |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
148 #define PTY_TTY_NAME_SPRINTF \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
149 { \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
150 char *ptsname (), *ptyname; \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
151 \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
152 sighold (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
153 if (grantpt (fd) == -1) \ |
26090 | 154 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
155 sigrelse (SIGCLD); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
156 if (unlockpt (fd) == -1) \ |
26090 | 157 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
158 if (!(ptyname = ptsname (fd))) \ |
26090 | 159 { emacs_close (fd); return -1; } \ |
8283
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
160 strncpy (pty_name, ptyname, sizeof (pty_name)); \ |
32427329c42c
(PTY_TTY_NAME_SPRINTF): Fail smoothly if cannot get pty.
Richard M. Stallman <rms@gnu.org>
parents:
7947
diff
changeset
|
161 pty_name[sizeof (pty_name) - 1] = 0; \ |
456 | 162 } |
163 | |
164 /* Push various streams modules onto a PTY channel. */ | |
165 | |
166 #define SETUP_SLAVE_PTY \ | |
167 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | |
168 fatal ("ioctl I_PUSH ptem", errno); \ | |
169 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | |
170 fatal ("ioctl I_PUSH ldterm", errno); \ | |
171 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | |
172 fatal ("ioctl I_PUSH ttcompat", errno); | |
173 | |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
174 /* Undo the SVr3 X11 library definition */ |
2165
c84b2198f633
* s/usg5-4.h: Remove extraneous text after #undef LIB_X11_LIB.
Jim Blandy <jimb@redhat.com>
parents:
2116
diff
changeset
|
175 #undef LIB_X11_LIB |
2116
76df2de3dd55
* s/usg5-4.h: Changes from Eric Raymond:
Jim Blandy <jimb@redhat.com>
parents:
1868
diff
changeset
|
176 |
1039 | 177 /* The definition of this in s-usg5-3.h is not needed in 5.4. */ |
178 /* liblnsl_s should never be used. The _s suffix implies a shared | |
179 library, as opposed to a DLL. Share libraries were used in SVR3, and are | |
180 available only in order to allow SVR3 binaries to run. They should not be | |
181 linked in to new binaries. -- caraway!pinkas@caraway.intel.com. */ | |
182 #undef LIBX10_SYSTEM | |
183 #undef LIBX11_SYSTEM | |
456 | 184 |
1039 | 185 /* Tell x11term.c and keyboard.c we have the system V streams feature. */ |
186 #define SYSV_STREAMS | |
187 | |
188 /* This definition was suggested for next release. | |
189 So give it a try. */ | |
190 #define HAVE_SOCKETS | |
4336
96d3869ae231
(bzero, bcmp, bcopy): New macros.
Richard M. Stallman <rms@gnu.org>
parents:
4295
diff
changeset
|
191 |
26678
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
192 /* Markus Weiand <weiand@khof.com> says this is needed for Motif on |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
193 SINIX. */ |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
194 #undef LIBS_SYSTEM |
54fc79fa7000
(LIBS_SYSTEM): Add -lgen because that's needed
Gerd Moellmann <gerd@gnu.org>
parents:
26090
diff
changeset
|
195 #define LIBS_SYSTEM -lgen |