diff options
| author | Karoly Lorentey | 2006-01-30 18:06:22 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-01-30 18:06:22 +0000 |
| commit | e31331e5cb40d3e56e4160229b33f2dad9d5e4ab (patch) | |
| tree | 29d504a565260e6ba5d2972ec742a25574b7357a /src/callproc.c | |
| parent | 9688ff534500a278871366f699cd0ead3524b68a (diff) | |
| parent | 75e49434a5b90f797fe9b0250d426793793fb8e7 (diff) | |
| download | emacs-e31331e5cb40d3e56e4160229b33f2dad9d5e4ab.tar.gz emacs-e31331e5cb40d3e56e4160229b33f2dad9d5e4ab.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 187, 704)
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704
* emacs@sv.gnu.org/emacs--devo--0--patch-1
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-2
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-3
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-4
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-5
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-6
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-7
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-8
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-9
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-10
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-11
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-12
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-13
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-14
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-15
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-16
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-17
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-18
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-19
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-20
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-21
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-22
Install ERC.
* emacs@sv.gnu.org/emacs--devo--0--patch-23
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-24
Fix ERC compiler warnings.
* emacs@sv.gnu.org/emacs--devo--0--patch-25
Use utf-8 encoding in ERC ChangeLogs.
* emacs@sv.gnu.org/emacs--devo--0--patch-26
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-27
Merge ERC-related Viper hacks into Viper.
* emacs@sv.gnu.org/emacs--devo--0--patch-28
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-29
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-30
Merge from erc--main--0
* emacs@sv.gnu.org/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187
* emacs@sv.gnu.org/gnus--rel--5.10--patch-1
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-2
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-3
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-4
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-5
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-6
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-7
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-501
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 eebbabb2739..71071217208 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -362,11 +362,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 362 | protected by the caller, so all we really have to worry about is | 362 | protected by the caller, so all we really have to worry about is |
| 363 | buffer. */ | 363 | buffer. */ |
| 364 | { | 364 | { |
| 365 | struct gcpro gcpro1, gcpro2, gcpro3; | 365 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 366 | 366 | ||
| 367 | current_dir = current_buffer->directory; | 367 | current_dir = current_buffer->directory; |
| 368 | 368 | ||
| 369 | GCPRO3 (infile, buffer, current_dir); | 369 | GCPRO4 (infile, buffer, current_dir, error_file); |
| 370 | 370 | ||
| 371 | current_dir | 371 | current_dir |
| 372 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), | 372 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), |
| @@ -375,6 +375,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 375 | report_file_error ("Setting current directory", | 375 | report_file_error ("Setting current directory", |
| 376 | Fcons (current_buffer->directory, Qnil)); | 376 | Fcons (current_buffer->directory, Qnil)); |
| 377 | 377 | ||
| 378 | if (STRING_MULTIBYTE (infile)) | ||
| 379 | infile = ENCODE_FILE (infile); | ||
| 380 | if (STRING_MULTIBYTE (current_dir)) | ||
| 381 | current_dir = ENCODE_FILE (current_dir); | ||
| 382 | if (STRINGP (error_file) && STRING_MULTIBYTE (error_file)) | ||
| 383 | error_file = ENCODE_FILE (error_file); | ||
| 378 | UNGCPRO; | 384 | UNGCPRO; |
| 379 | } | 385 | } |
| 380 | 386 | ||
| @@ -383,6 +389,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 383 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); | 389 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); |
| 384 | if (filefd < 0) | 390 | if (filefd < 0) |
| 385 | { | 391 | { |
| 392 | infile = DECODE_FILE (infile); | ||
| 386 | report_file_error ("Opening process input file", Fcons (infile, Qnil)); | 393 | report_file_error ("Opening process input file", Fcons (infile, Qnil)); |
| 387 | } | 394 | } |
| 388 | /* Search for program; barf if not found. */ | 395 | /* Search for program; barf if not found. */ |
| @@ -540,14 +547,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 540 | #ifdef MSDOS | 547 | #ifdef MSDOS |
| 541 | unlink (tempfile); | 548 | unlink (tempfile); |
| 542 | #endif | 549 | #endif |
| 543 | report_file_error ("Cannot redirect stderr", | 550 | if (NILP (error_file)) |
| 544 | Fcons ((NILP (error_file) | 551 | error_file = build_string (NULL_DEVICE); |
| 545 | ? build_string (NULL_DEVICE) : error_file), | 552 | else if (STRINGP (error_file)) |
| 546 | Qnil)); | 553 | error_file = DECODE_FILE (error_file); |
| 554 | report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); | ||
| 547 | } | 555 | } |
| 548 | 556 | ||
| 549 | current_dir = ENCODE_FILE (current_dir); | ||
| 550 | |||
| 551 | #ifdef MAC_OS8 | 557 | #ifdef MAC_OS8 |
| 552 | { | 558 | { |
| 553 | /* Call run_mac_command in sysdep.c here directly instead of doing | 559 | /* Call run_mac_command in sysdep.c here directly instead of doing |