diff options
| author | Jim Blandy | 1993-03-19 17:28:14 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-03-19 17:28:14 +0000 |
| commit | 210b2b4f058671a18e3f087fd696766ea8a23025 (patch) | |
| tree | 60d5242427a63c887dd8fd58f7e25de19689d047 /src/sysdep.c | |
| parent | 7b9cd64c8bddc083cc59a4291f1d3b85b64800c7 (diff) | |
| download | emacs-210b2b4f058671a18e3f087fd696766ea8a23025.tar.gz emacs-210b2b4f058671a18e3f087fd696766ea8a23025.zip | |
Some VMS changes from Richard Levitte <levitte@e.kth.se>:
* [VMS] systime.h: Include vmstime.h. VMS has the timezone
variable and the tzname array.
* s/vms.h: VMS does have select.
mth$dmod is the same as Unix's drem.
Use the time functions in vmstime.c.
No need to rename the malloc routines if we're using GNU malloc.
PURESIZE needs to be 330000.
* vmstime.c, vmstime.h: New files.
* systty.h: Don't try to initialize extern declarations under VAX C.
* vmspaths.h (PATH_LOADSEARCH): Include EMACS_LIBRARY:[LOCAL-LISP]
in PATH_LOADSEARCH.
(PATH_EXEC): Use EMACS_LIBRARY:[LIB-SRC] instead of [ETC].
* sysdep.c [VMS] (init_sys_modes): Don't allocate process_ef.
[VMS] (queue_kbd_input): Build events structure correctly.
[VMS] (gethostname): New function.
[VMS] (getwd): Don't get the PATH environment variable; that's
dumb. Call getcwd.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 6a05e9ca2fe..901edb85e67 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -746,6 +746,7 @@ init_sys_modes () | |||
| 746 | timer_ef = get_timer_event_flag (); | 746 | timer_ef = get_timer_event_flag (); |
| 747 | /* LIB$GET_EF (&timer_ef); */ | 747 | /* LIB$GET_EF (&timer_ef); */ |
| 748 | SYS$CLREF (timer_ef); | 748 | SYS$CLREF (timer_ef); |
| 749 | #if 0 | ||
| 749 | if (!process_ef) | 750 | if (!process_ef) |
| 750 | { | 751 | { |
| 751 | LIB$GET_EF (&process_ef); | 752 | LIB$GET_EF (&process_ef); |
| @@ -753,10 +754,13 @@ init_sys_modes () | |||
| 753 | } | 754 | } |
| 754 | if (input_ef / 32 != process_ef / 32) | 755 | if (input_ef / 32 != process_ef / 32) |
| 755 | croak ("Input and process event flags in different clusters."); | 756 | croak ("Input and process event flags in different clusters."); |
| 757 | #endif | ||
| 756 | if (input_ef / 32 != timer_ef / 32) | 758 | if (input_ef / 32 != timer_ef / 32) |
| 757 | croak ("Input and process event flags in different clusters."); | 759 | croak ("Input and timer event flags in different clusters."); |
| 760 | #if 0 | ||
| 758 | input_eflist = ((unsigned) 1 << (input_ef % 32)) | | 761 | input_eflist = ((unsigned) 1 << (input_ef % 32)) | |
| 759 | ((unsigned) 1 << (process_ef % 32)); | 762 | ((unsigned) 1 << (process_ef % 32)); |
| 763 | #endif | ||
| 760 | timer_eflist = ((unsigned) 1 << (input_ef % 32)) | | 764 | timer_eflist = ((unsigned) 1 << (input_ef % 32)) | |
| 761 | ((unsigned) 1 << (timer_ef % 32)); | 765 | ((unsigned) 1 << (timer_ef % 32)); |
| 762 | #ifndef VMS4_4 | 766 | #ifndef VMS4_4 |
| @@ -1188,6 +1192,8 @@ short input_buffer; | |||
| 1188 | queue_kbd_input () | 1192 | queue_kbd_input () |
| 1189 | { | 1193 | { |
| 1190 | int status; | 1194 | int status; |
| 1195 | extern kbd_input_ast (); | ||
| 1196 | |||
| 1191 | waiting_for_ast = 0; | 1197 | waiting_for_ast = 0; |
| 1192 | stop_input = 0; | 1198 | stop_input = 0; |
| 1193 | status = SYS$QIO (0, input_fd, IO$_READVBLK, | 1199 | status = SYS$QIO (0, input_fd, IO$_READVBLK, |
| @@ -1232,17 +1238,18 @@ kbd_input_ast () | |||
| 1232 | #endif | 1238 | #endif |
| 1233 | if (! stop_input) | 1239 | if (! stop_input) |
| 1234 | queue_kbd_input (); | 1240 | queue_kbd_input (); |
| 1235 | /* I don't know what this is doing! The variables buf, cbuf and i are | ||
| 1236 | not declared. This is new from version 18, what does it do? | ||
| 1237 | if (c >= 0) | 1241 | if (c >= 0) |
| 1238 | { | 1242 | { |
| 1239 | struct input_event e; | 1243 | struct input_event e; |
| 1240 | e.kind = ascii_keystroke; | 1244 | e.kind = ascii_keystroke; |
| 1241 | XSET (buf[i].code, Lisp_Int, cbuf[i]); | 1245 | XSET (e.code, Lisp_Int, c); |
| 1242 | e.frame = selected_frame; | 1246 | #ifdef MULTI_FRAME |
| 1247 | XSET(e.frame_or_window, Lisp_Frame, selected_frame); | ||
| 1248 | #else | ||
| 1249 | e.frame_or_window = Qnil; | ||
| 1250 | #endif | ||
| 1243 | kbd_buffer_store_event (&e); | 1251 | kbd_buffer_store_event (&e); |
| 1244 | } | 1252 | } |
| 1245 | */ | ||
| 1246 | if (input_available_clear_time) | 1253 | if (input_available_clear_time) |
| 1247 | EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); | 1254 | EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); |
| 1248 | errno = old_errno; | 1255 | errno = old_errno; |
| @@ -1567,6 +1574,25 @@ get_system_name () | |||
| 1567 | #endif /* not USG, not 4.1 */ | 1574 | #endif /* not USG, not 4.1 */ |
| 1568 | #endif /* not USG */ | 1575 | #endif /* not USG */ |
| 1569 | } | 1576 | } |
| 1577 | |||
| 1578 | #ifdef VMS | ||
| 1579 | #ifndef HAVE_GETHOSTNAME | ||
| 1580 | void gethostname(buf, len) | ||
| 1581 | char *buf; | ||
| 1582 | int len; | ||
| 1583 | { | ||
| 1584 | char *s; | ||
| 1585 | s = getenv ("SYS$NODE"); | ||
| 1586 | if (s == NULL) | ||
| 1587 | buf[0] = '\0'; | ||
| 1588 | else { | ||
| 1589 | strncpy (buf, s, len - 2); | ||
| 1590 | buf[len - 1] = '\0'; | ||
| 1591 | } /* else */ | ||
| 1592 | } /* static void gethostname */ | ||
| 1593 | #endif /* ! HAVE_GETHOSTNAME */ | ||
| 1594 | #endif /* VMS */ | ||
| 1595 | |||
| 1570 | 1596 | ||
| 1571 | #ifndef VMS | 1597 | #ifndef VMS |
| 1572 | #ifndef HAVE_SELECT | 1598 | #ifndef HAVE_SELECT |
| @@ -3084,16 +3110,16 @@ getwd (pathname) | |||
| 3084 | char *pathname; | 3110 | char *pathname; |
| 3085 | { | 3111 | { |
| 3086 | char *ptr; | 3112 | char *ptr; |
| 3087 | strcpy (pathname, egetenv ("PATH")); | 3113 | extern char *getcwd (); |
| 3088 | 3114 | ||
| 3089 | ptr = pathname; | 3115 | #define MAXPATHLEN 1024 |
| 3090 | while (*ptr) | 3116 | |
| 3091 | { | 3117 | ptr = malloc (MAXPATHLEN); |
| 3092 | if ('a' <= *ptr && *ptr <= 'z') | 3118 | getcwd (ptr, MAXPATHLEN); |
| 3093 | *ptr -= 040; | 3119 | strcpy (pathname, ptr); |
| 3094 | ptr++; | 3120 | free (ptr); |
| 3095 | } | 3121 | |
| 3096 | return pathname; | 3122 | return pathname; |
| 3097 | } | 3123 | } |
| 3098 | 3124 | ||
| 3099 | getppid () | 3125 | getppid () |