Mercurial > emacs
annotate src/s/irix5-0.h @ 4106:bfc21ea9a00f
(read_char_menu_prompt): If the user rejects a menu,
return t. This makes read_char also return t.
(read_key_sequence): If read_char returned t, return -1.
(Fread_key_sequence): If read_key_sequence returned -1, quit.
(command_loop_1): If read_key_sequence returned -1, loop around.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Jul 1993 06:56:17 +0000 |
parents | c10bb302a315 |
children | 589ab12dbe3d |
rev | line source |
---|---|
2891
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
1 #include "s-usg5-4.h" |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
2 #ifdef LIBS_SYSTEM |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
3 #undef LIBS_SYSTEM |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
4 #endif |
2890 | 5 |
2891
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
6 #ifdef SYSTEM_TYPE |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
7 #undef SYSTEM_TYPE |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
8 #endif |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
9 #define SYSTEM_TYPE "silicon-graphics-unix" |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
10 |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
11 #ifdef SETUP_SLAVE_PTY |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
12 #undef SETUP_SLAVE_PTY |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
13 #endif |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
14 |
2890 | 15 |
16 /* Define HAVE_ALLOCA to say that the system provides a properly | |
17 working alloca function and it should be used. */ | |
18 #define HAVE_ALLOCA | |
19 #undef C_ALLOCA | |
20 #define alloca __builtin_alloca | |
21 | |
22 /* use K&R C */ | |
23 #ifndef __GNUC__ | |
24 #define C_SWITCH_MACHINE -cckr | |
25 #endif | |
26 | |
27 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h | |
28 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead | |
29 we'll just define WNOHANG right here. | |
30 (An implicit decl is good enough for wait3.) */ | |
31 | |
2891
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
32 /* #define WNOHANG 0x1 */ |
2890 | 33 |
34 /* No need to use sprintf to get the tty name--we get that from _getpty. */ | |
2891
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
35 #ifdef PTY_TTY_NAME_SPRINTF |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
36 #undef PTY_TTY_NAME_SPRINTF |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
37 #endif |
2890 | 38 #define PTY_TTY_NAME_SPRINTF |
39 /* No need to get the pty name at all. */ | |
2891
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
40 #ifdef PTY_NAME_SPRINTF |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
41 #undef PTY_NAME_SPRINTF |
c10bb302a315
Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents:
2890
diff
changeset
|
42 #endif |
2890 | 43 #define PTY_NAME_SPRINTF |
44 #ifdef emacs | |
45 char *_getpty(); | |
46 #endif | |
47 /* We need only try once to open a pty. */ | |
48 #define PTY_ITERATION | |
49 /* Here is how to do it. */ | |
50 /* It is necessary to prevent SIGCHLD signals within _getpty. | |
51 So we block them. */ | |
52 #define PTY_OPEN \ | |
53 { \ | |
54 int mask = sigblock (sigmask (SIGCHLD)); \ | |
55 char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ | |
56 sigsetmask(mask); \ | |
57 if (name == 0) \ | |
58 return -1; \ | |
59 if (fd < 0) \ | |
60 return -1; \ | |
61 if (fstat (fd, &stb) < 0) \ | |
62 return -1; \ | |
63 strcpy (pty_name, name); \ | |
64 } |