Mercurial > emacs
diff src/sysdep.c @ 2264:87934d212841
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.
| author | Jim Blandy <jimb@redhat.com> |
|---|---|
| date | Fri, 19 Mar 1993 17:28:14 +0000 |
| parents | ebc56bb13048 |
| children | 907efc217cfe |
line wrap: on
line diff
--- a/src/sysdep.c Fri Mar 19 08:08:04 1993 +0000 +++ b/src/sysdep.c Fri Mar 19 17:28:14 1993 +0000 @@ -746,6 +746,7 @@ timer_ef = get_timer_event_flag (); /* LIB$GET_EF (&timer_ef); */ SYS$CLREF (timer_ef); +#if 0 if (!process_ef) { LIB$GET_EF (&process_ef); @@ -753,10 +754,13 @@ } if (input_ef / 32 != process_ef / 32) croak ("Input and process event flags in different clusters."); +#endif if (input_ef / 32 != timer_ef / 32) - croak ("Input and process event flags in different clusters."); + croak ("Input and timer event flags in different clusters."); +#if 0 input_eflist = ((unsigned) 1 << (input_ef % 32)) | ((unsigned) 1 << (process_ef % 32)); +#endif timer_eflist = ((unsigned) 1 << (input_ef % 32)) | ((unsigned) 1 << (timer_ef % 32)); #ifndef VMS4_4 @@ -1188,6 +1192,8 @@ queue_kbd_input () { int status; + extern kbd_input_ast (); + waiting_for_ast = 0; stop_input = 0; status = SYS$QIO (0, input_fd, IO$_READVBLK, @@ -1232,17 +1238,18 @@ #endif if (! stop_input) queue_kbd_input (); -/* I don't know what this is doing! The variables buf, cbuf and i are - not declared. This is new from version 18, what does it do? if (c >= 0) { struct input_event e; e.kind = ascii_keystroke; - XSET (buf[i].code, Lisp_Int, cbuf[i]); - e.frame = selected_frame; + XSET (e.code, Lisp_Int, c); +#ifdef MULTI_FRAME + XSET(e.frame_or_window, Lisp_Frame, selected_frame); +#else + e.frame_or_window = Qnil; +#endif kbd_buffer_store_event (&e); } -*/ if (input_available_clear_time) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); errno = old_errno; @@ -1567,6 +1574,25 @@ #endif /* not USG, not 4.1 */ #endif /* not USG */ } + +#ifdef VMS +#ifndef HAVE_GETHOSTNAME +void gethostname(buf, len) + char *buf; + int len; +{ + char *s; + s = getenv ("SYS$NODE"); + if (s == NULL) + buf[0] = '\0'; + else { + strncpy (buf, s, len - 2); + buf[len - 1] = '\0'; + } /* else */ +} /* static void gethostname */ +#endif /* ! HAVE_GETHOSTNAME */ +#endif /* VMS */ + #ifndef VMS #ifndef HAVE_SELECT @@ -3084,16 +3110,16 @@ char *pathname; { char *ptr; - strcpy (pathname, egetenv ("PATH")); - - ptr = pathname; - while (*ptr) - { - if ('a' <= *ptr && *ptr <= 'z') - *ptr -= 040; - ptr++; - } - return pathname; + extern char *getcwd (); + +#define MAXPATHLEN 1024 + + ptr = malloc (MAXPATHLEN); + getcwd (ptr, MAXPATHLEN); + strcpy (pathname, ptr); + free (ptr); + + return pathname; } getppid ()
