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 | |
| 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')
| -rw-r--r-- | src/sysdep.c | 56 | ||||
| -rw-r--r-- | src/systime.h | 10 | ||||
| -rw-r--r-- | src/systty.h | 6 | ||||
| -rw-r--r-- | src/vmspaths.h | 4 |
4 files changed, 57 insertions, 19 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 () |
diff --git a/src/systime.h b/src/systime.h index 8b6718a8747..d6b1898c7f1 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -45,6 +45,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 45 | extern long timezone; | 45 | extern long timezone; |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #ifdef VMS | ||
| 49 | #ifdef VAXC | ||
| 50 | #include "vmstime.h" | ||
| 51 | #endif | ||
| 52 | #endif | ||
| 53 | |||
| 48 | 54 | ||
| 49 | /* EMACS_TIME is the type to use to represent temporal intervals - | 55 | /* EMACS_TIME is the type to use to represent temporal intervals - |
| 50 | struct timeval on some systems, int on others. It can be passed as | 56 | struct timeval on some systems, int on others. It can be passed as |
| @@ -190,7 +196,7 @@ extern long timezone; | |||
| 190 | #ifndef EMACS_CURRENT_TIME_ZONE | 196 | #ifndef EMACS_CURRENT_TIME_ZONE |
| 191 | 197 | ||
| 192 | /* System V derivatives have a timezone global variable. */ | 198 | /* System V derivatives have a timezone global variable. */ |
| 193 | #ifdef USG | 199 | #if defined(USG) || defined(VMS) |
| 194 | #define EMACS_GET_TZ_OFFSET(offset) \ | 200 | #define EMACS_GET_TZ_OFFSET(offset) \ |
| 195 | do { \ | 201 | do { \ |
| 196 | tzset (); \ | 202 | tzset (); \ |
| @@ -213,7 +219,7 @@ extern long timezone; | |||
| 213 | /* The following sane systems have a tzname array. The timezone() function | 219 | /* The following sane systems have a tzname array. The timezone() function |
| 214 | is a stupid idea; timezone names can only be determined geographically, | 220 | is a stupid idea; timezone names can only be determined geographically, |
| 215 | not by Greenwich offset. */ | 221 | not by Greenwich offset. */ |
| 216 | #if defined (ultrix) || defined (hpux) || defined (_AIX) || defined (USG) | 222 | #if defined (ultrix) || defined (hpux) || defined (_AIX) || defined (USG) || defined(VMS) |
| 217 | 223 | ||
| 218 | #define EMACS_GET_TZ_NAMES(standard, savings) \ | 224 | #define EMACS_GET_TZ_NAMES(standard, savings) \ |
| 219 | do { \ | 225 | do { \ |
diff --git a/src/systty.h b/src/systty.h index 3d49b2dd878..7e5efa0946d 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -45,9 +45,15 @@ static struct iosb | |||
| 45 | 45 | ||
| 46 | extern int waiting_for_ast; | 46 | extern int waiting_for_ast; |
| 47 | extern int stop_input; | 47 | extern int stop_input; |
| 48 | #if 0 /* VAX C doeasn't understand initializing declarations */ | ||
| 48 | extern int input_ef = 0; | 49 | extern int input_ef = 0; |
| 49 | extern int timer_ef = 0; | 50 | extern int timer_ef = 0; |
| 50 | extern int process_ef = 0; | 51 | extern int process_ef = 0; |
| 52 | #else | ||
| 53 | extern int input_ef; | ||
| 54 | extern int timer_ef; | ||
| 55 | extern int process_ef; | ||
| 56 | #endif | ||
| 51 | extern int input_eflist; | 57 | extern int input_eflist; |
| 52 | extern int timer_eflist; | 58 | extern int timer_eflist; |
| 53 | 59 | ||
diff --git a/src/vmspaths.h b/src/vmspaths.h index 5992bf151ec..ae2d9ba4a5c 100644 --- a/src/vmspaths.h +++ b/src/vmspaths.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | /* The default search path for Lisp function "load". | 3 | /* The default search path for Lisp function "load". |
| 4 | This sets load-path. */ | 4 | This sets load-path. */ |
| 5 | #define PATH_LOADSEARCH "EMACS_LIBRARY:[LISP]" | 5 | #define PATH_LOADSEARCH "EMACS_LIBRARY:[LOCAL-LISP],EMACS_LIBRARY:[LISP]" |
| 6 | 6 | ||
| 7 | /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This | 7 | /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This |
| 8 | path is usually identical to PATH_LOADSEARCH except that the entry | 8 | path is usually identical to PATH_LOADSEARCH except that the entry |
| @@ -15,7 +15,7 @@ | |||
| 15 | variable exec-path and the first file name in it sets the Lisp | 15 | variable exec-path and the first file name in it sets the Lisp |
| 16 | variable exec-directory. exec-directory is used for finding | 16 | variable exec-directory. exec-directory is used for finding |
| 17 | executables and other architecture-dependent files. */ | 17 | executables and other architecture-dependent files. */ |
| 18 | #define PATH_EXEC "EMACS_LIBRARY:[ETC]" | 18 | #define PATH_EXEC "EMACS_LIBRARY:[LIB-SRC]" |
| 19 | 19 | ||
| 20 | /* Where Emacs should look for its architecture-independent data | 20 | /* Where Emacs should look for its architecture-independent data |
| 21 | files, like the docstring file. The lisp variable data-directory | 21 | files, like the docstring file. The lisp variable data-directory |