aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorMiles Bader2006-02-01 10:07:17 +0000
committerMiles Bader2006-02-01 10:07:17 +0000
commit06eb776d8e80eaed0f6b04349dbd4df9292131d9 (patch)
treef8f308fcd75d052e99c7e176efc100c8488fda7f /src/callproc.c
parentdb856169c248b363fe3dc5ee4e8b1dd18c3a05a2 (diff)
parent46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6 (diff)
downloademacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.tar.gz
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.c22
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) */)
355 protected by the caller, so all we really have to worry about is 355 protected by the caller, so all we really have to worry about is
356 buffer. */ 356 buffer. */
357 { 357 {
358 struct gcpro gcpro1, gcpro2, gcpro3; 358 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
359 359
360 current_dir = current_buffer->directory; 360 current_dir = current_buffer->directory;
361 361
362 GCPRO3 (infile, buffer, current_dir); 362 GCPRO4 (infile, buffer, current_dir, error_file);
363 363
364 current_dir 364 current_dir
365 = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), 365 = 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) */)
368 report_file_error ("Setting current directory", 368 report_file_error ("Setting current directory",
369 Fcons (current_buffer->directory, Qnil)); 369 Fcons (current_buffer->directory, Qnil));
370 370
371 if (STRING_MULTIBYTE (infile))
372 infile = ENCODE_FILE (infile);
373 if (STRING_MULTIBYTE (current_dir))
374 current_dir = ENCODE_FILE (current_dir);
375 if (STRINGP (error_file) && STRING_MULTIBYTE (error_file))
376 error_file = ENCODE_FILE (error_file);
371 UNGCPRO; 377 UNGCPRO;
372 } 378 }
373 379
@@ -376,6 +382,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
376 filefd = emacs_open (SDATA (infile), O_RDONLY, 0); 382 filefd = emacs_open (SDATA (infile), O_RDONLY, 0);
377 if (filefd < 0) 383 if (filefd < 0)
378 { 384 {
385 infile = DECODE_FILE (infile);
379 report_file_error ("Opening process input file", Fcons (infile, Qnil)); 386 report_file_error ("Opening process input file", Fcons (infile, Qnil));
380 } 387 }
381 /* Search for program; barf if not found. */ 388 /* Search for program; barf if not found. */
@@ -529,14 +536,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
529#ifdef MSDOS 536#ifdef MSDOS
530 unlink (tempfile); 537 unlink (tempfile);
531#endif 538#endif
532 report_file_error ("Cannot redirect stderr", 539 if (NILP (error_file))
533 Fcons ((NILP (error_file) 540 error_file = build_string (NULL_DEVICE);
534 ? build_string (NULL_DEVICE) : error_file), 541 else if (STRINGP (error_file))
535 Qnil)); 542 error_file = DECODE_FILE (error_file);
543 report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil));
536 } 544 }
537 545
538 current_dir = ENCODE_FILE (current_dir);
539
540#ifdef MAC_OS8 546#ifdef MAC_OS8
541 { 547 {
542 /* Call run_mac_command in sysdep.c here directly instead of doing 548 /* Call run_mac_command in sysdep.c here directly instead of doing