diff options
| author | Jim Blandy | 1991-08-02 02:24:35 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-08-02 02:24:35 +0000 |
| commit | bfb612994fe2d6dfb42919842c5f40059cd08135 (patch) | |
| tree | bbdafb923b90f3d6f5ce3096a233d10224df8e30 /src | |
| parent | f7be7f78a51fbe2c9f6cfd559b47fd2d815b2756 (diff) | |
| download | emacs-bfb612994fe2d6dfb42919842c5f40059cd08135.tar.gz emacs-bfb612994fe2d6dfb42919842c5f40059cd08135.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 6 | ||||
| -rw-r--r-- | src/emacs.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 43 | ||||
| -rw-r--r-- | src/filelock.c | 6 |
4 files changed, 51 insertions, 6 deletions
diff --git a/src/editfns.c b/src/editfns.c index efdf7f74e8d..368727619c0 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -19,7 +19,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include "config.h" | 21 | #include "config.h" |
| 22 | |||
| 23 | #ifdef VMS | ||
| 24 | #include "pwd.h" | ||
| 25 | #else | ||
| 22 | #include <pwd.h> | 26 | #include <pwd.h> |
| 27 | #endif | ||
| 28 | |||
| 23 | #include "lisp.h" | 29 | #include "lisp.h" |
| 24 | #include "buffer.h" | 30 | #include "buffer.h" |
| 25 | #include "window.h" | 31 | #include "window.h" |
diff --git a/src/emacs.c b/src/emacs.c index 3757d5ae6b2..cbdc2a2f748 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -379,8 +379,10 @@ main (argc, argv, envp) | |||
| 379 | signal (22, fatal_error_signal); | 379 | signal (22, fatal_error_signal); |
| 380 | signal (23, fatal_error_signal); | 380 | signal (23, fatal_error_signal); |
| 381 | signal (24, fatal_error_signal); | 381 | signal (24, fatal_error_signal); |
| 382 | #ifdef SIGIO | ||
| 382 | signal (SIGAIO, fatal_error_signal); | 383 | signal (SIGAIO, fatal_error_signal); |
| 383 | signal (SIGPTY, fatal_error_signal); | 384 | signal (SIGPTY, fatal_error_signal); |
| 385 | #endif | ||
| 384 | signal (SIGIOINT, fatal_error_signal); | 386 | signal (SIGIOINT, fatal_error_signal); |
| 385 | signal (SIGGRANT, fatal_error_signal); | 387 | signal (SIGGRANT, fatal_error_signal); |
| 386 | signal (SIGRETRACT, fatal_error_signal); | 388 | signal (SIGRETRACT, fatal_error_signal); |
diff --git a/src/fileio.c b/src/fileio.c index b6035656d09..a99b77b0687 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -20,12 +20,27 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 20 | 20 | ||
| 21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
| 22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
| 23 | |||
| 24 | #ifdef VMS | ||
| 25 | #include "pwd.h" | ||
| 26 | #else | ||
| 23 | #include <pwd.h> | 27 | #include <pwd.h> |
| 28 | #endif | ||
| 29 | |||
| 24 | #include <ctype.h> | 30 | #include <ctype.h> |
| 31 | |||
| 32 | #ifdef VMS | ||
| 33 | #include "dir.h" | ||
| 34 | #include <perror.h> | ||
| 35 | #include <stddef.h> | ||
| 36 | #include <string.h> | ||
| 37 | #else | ||
| 25 | #include <sys/dir.h> | 38 | #include <sys/dir.h> |
| 39 | #endif | ||
| 40 | |||
| 26 | #include <errno.h> | 41 | #include <errno.h> |
| 27 | 42 | ||
| 28 | #ifndef VMS | 43 | #ifndef vax11c |
| 29 | extern int errno; | 44 | extern int errno; |
| 30 | extern char *sys_errlist[]; | 45 | extern char *sys_errlist[]; |
| 31 | extern int sys_nerr; | 46 | extern int sys_nerr; |
| @@ -46,7 +61,6 @@ extern int sys_nerr; | |||
| 46 | #include "window.h" | 61 | #include "window.h" |
| 47 | 62 | ||
| 48 | #ifdef VMS | 63 | #ifdef VMS |
| 49 | #include <perror.h> | ||
| 50 | #include <file.h> | 64 | #include <file.h> |
| 51 | #include <rmsdef.h> | 65 | #include <rmsdef.h> |
| 52 | #include <fab.h> | 66 | #include <fab.h> |
| @@ -217,7 +231,8 @@ file_name_as_directory (out, in) | |||
| 217 | brack = ']'; | 231 | brack = ']'; |
| 218 | strcpy (out, "[."); | 232 | strcpy (out, "[."); |
| 219 | } | 233 | } |
| 220 | if (dot = index (p, '.')) | 234 | dot = index (p, '.'); |
| 235 | if (dot) | ||
| 221 | { | 236 | { |
| 222 | /* blindly remove any extension */ | 237 | /* blindly remove any extension */ |
| 223 | size = strlen (out) + (dot - p); | 238 | size = strlen (out) + (dot - p); |
| @@ -348,7 +363,8 @@ directory_file_name (src, dst) | |||
| 348 | 363 | ||
| 349 | /* If bracket is ']' or '>', bracket - 2 is the corresponding | 364 | /* If bracket is ']' or '>', bracket - 2 is the corresponding |
| 350 | opening bracket. */ | 365 | opening bracket. */ |
| 351 | if (!(ptr = index (src, bracket - 2))) | 366 | ptr = index (src, bracket - 2); |
| 367 | if (ptr == 0) | ||
| 352 | { /* no opening bracket */ | 368 | { /* no opening bracket */ |
| 353 | strcpy (dst, src); | 369 | strcpy (dst, src); |
| 354 | return 0; | 370 | return 0; |
| @@ -648,9 +664,24 @@ See also the function `substitute-in-file-name'.") | |||
| 648 | newdir = XSTRING (defalt)->data; | 664 | newdir = XSTRING (defalt)->data; |
| 649 | } | 665 | } |
| 650 | 666 | ||
| 651 | /* Now concatenate the directory and name to new space in the stack frame */ | 667 | if (newdir != 0) |
| 668 | { | ||
| 669 | /* Get rid of any slash at the end of newdir. */ | ||
| 670 | int length = strlen (newdir); | ||
| 671 | if (newdir[length - 1] == '/') | ||
| 672 | { | ||
| 673 | unsigned char *temp = (unsigned char *) alloca (length); | ||
| 674 | bcopy (newdir, temp, length - 1); | ||
| 675 | temp[length - 1] = 0; | ||
| 676 | newdir = temp; | ||
| 677 | } | ||
| 678 | tlen = length + 1; | ||
| 679 | } | ||
| 680 | else | ||
| 681 | tlen = 0; | ||
| 652 | 682 | ||
| 653 | tlen = (newdir ? strlen (newdir) + 1 : 0) + strlen (nm) + 1; | 683 | /* Now concatenate the directory and name to new space in the stack frame */ |
| 684 | tlen += strlen (nm) + 1; | ||
| 654 | target = (unsigned char *) alloca (tlen); | 685 | target = (unsigned char *) alloca (tlen); |
| 655 | *target = 0; | 686 | *target = 0; |
| 656 | 687 | ||
diff --git a/src/filelock.c b/src/filelock.c index 81e72432c06..df1794cf6bc 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -20,7 +20,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 20 | #include <sys/types.h> | 20 | #include <sys/types.h> |
| 21 | #include <sys/stat.h> | 21 | #include <sys/stat.h> |
| 22 | #include "config.h" | 22 | #include "config.h" |
| 23 | |||
| 24 | #ifdef VMS | ||
| 25 | #include "pwd.h" | ||
| 26 | #else | ||
| 23 | #include <pwd.h> | 27 | #include <pwd.h> |
| 28 | #endif | ||
| 29 | |||
| 24 | #include <errno.h> | 30 | #include <errno.h> |
| 25 | #include <sys/file.h> | 31 | #include <sys/file.h> |
| 26 | #ifdef USG | 32 | #ifdef USG |