diff options
author | Miles Bader <miles@gnu.org> | 2006-02-01 10:07:17 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-02-01 10:07:17 +0000 |
commit | 06eb776d8e80eaed0f6b04349dbd4df9292131d9 (patch) | |
tree | f8f308fcd75d052e99c7e176efc100c8488fda7f /src/callproc.c | |
parent | db856169c248b363fe3dc5ee4e8b1dd18c3a05a2 (diff) | |
parent | 46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6 (diff) | |
download | emacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.tar.gz emacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.tar.bz2 emacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.zip |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-9
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 16-33)
- Update from CVS
- Install ERC.
- Fix ERC compiler warnings.
- Use utf-8 encoding in ERC ChangeLogs.
- Merge ERC-related Viper hacks into Viper.
- Merge from erc--main--0
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 8-13)
- Merge from emacs--devo--0
- Update from CVS
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/callproc.c b/src/callproc.c index 128bf8825e6..9e7ab915a97 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -355,11 +355,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) protected by the caller, so all we really have to worry about is buffer. */ { - struct gcpro gcpro1, gcpro2, gcpro3; + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; current_dir = current_buffer->directory; - GCPRO3 (infile, buffer, current_dir); + GCPRO4 (infile, buffer, current_dir, error_file); current_dir = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), @@ -368,6 +368,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) report_file_error ("Setting current directory", Fcons (current_buffer->directory, Qnil)); + if (STRING_MULTIBYTE (infile)) + infile = ENCODE_FILE (infile); + if (STRING_MULTIBYTE (current_dir)) + current_dir = ENCODE_FILE (current_dir); + if (STRINGP (error_file) && STRING_MULTIBYTE (error_file)) + error_file = ENCODE_FILE (error_file); UNGCPRO; } @@ -376,6 +382,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) filefd = emacs_open (SDATA (infile), O_RDONLY, 0); if (filefd < 0) { + infile = DECODE_FILE (infile); report_file_error ("Opening process input file", Fcons (infile, Qnil)); } /* Search for program; barf if not found. */ @@ -529,14 +536,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) #ifdef MSDOS unlink (tempfile); #endif - report_file_error ("Cannot redirect stderr", - Fcons ((NILP (error_file) - ? build_string (NULL_DEVICE) : error_file), - Qnil)); + if (NILP (error_file)) + error_file = build_string (NULL_DEVICE); + else if (STRINGP (error_file)) + error_file = DECODE_FILE (error_file); + report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); } - current_dir = ENCODE_FILE (current_dir); - #ifdef MAC_OS8 { /* Call run_mac_command in sysdep.c here directly instead of doing |