diff options
| author | Kenichi Handa | 2006-05-15 02:47:05 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-05-15 02:47:05 +0000 |
| commit | 76d812bb69858985591eec05cfb2f1e1ea30dd91 (patch) | |
| tree | 300c09a1228cd41f2e8d1a9d8d42b83cf212d26a /src | |
| parent | 6f90170c47942c8b3b1ae09e8264f7eaadf89d4c (diff) | |
| download | emacs-76d812bb69858985591eec05cfb2f1e1ea30dd91.tar.gz emacs-76d812bb69858985591eec05cfb2f1e1ea30dd91.zip | |
(setup_process_coding_systems): Fix synching with
HEAD.
(read_process_output): Likewise.
(Fset_process_coding_system): Inherit system's eol format if
necessary.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/process.c b/src/process.c index 4e2717577cd..1960e6a914c 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -696,8 +696,6 @@ setup_process_coding_systems (process) | |||
| 696 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); | 696 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); |
| 697 | setup_coding_system (p->encode_coding_system, | 697 | setup_coding_system (p->encode_coding_system, |
| 698 | proc_encode_coding_system[outch]); | 698 | proc_encode_coding_system[outch]); |
| 699 | if (proc_encode_coding_system[outch]->eol_type == CODING_EOL_UNDECIDED) | ||
| 700 | proc_encode_coding_system[outch]->eol_type = system_eol_type; | ||
| 701 | } | 699 | } |
| 702 | 700 | ||
| 703 | DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, | 701 | DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, |
| @@ -5066,13 +5064,10 @@ read_process_output (proc, channel) | |||
| 5066 | if (NILP (p->encode_coding_system) | 5064 | if (NILP (p->encode_coding_system) |
| 5067 | && proc_encode_coding_system[XINT (p->outfd)]) | 5065 | && proc_encode_coding_system[XINT (p->outfd)]) |
| 5068 | { | 5066 | { |
| 5069 | p->encode_coding_system = Vlast_coding_system_used; | 5067 | p->encode_coding_system |
| 5068 | = coding_inherit_eol_type (Vlast_coding_system_used, Qnil); | ||
| 5070 | setup_coding_system (p->encode_coding_system, | 5069 | setup_coding_system (p->encode_coding_system, |
| 5071 | proc_encode_coding_system[XINT (p->outfd)]); | 5070 | proc_encode_coding_system[XINT (p->outfd)]); |
| 5072 | if (proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5073 | == CODING_EOL_UNDECIDED) | ||
| 5074 | proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5075 | = system_eol_type; | ||
| 5076 | } | 5071 | } |
| 5077 | } | 5072 | } |
| 5078 | 5073 | ||
| @@ -5179,13 +5174,10 @@ read_process_output (proc, channel) | |||
| 5179 | if (NILP (p->encode_coding_system) | 5174 | if (NILP (p->encode_coding_system) |
| 5180 | && proc_encode_coding_system[XINT (p->outfd)]) | 5175 | && proc_encode_coding_system[XINT (p->outfd)]) |
| 5181 | { | 5176 | { |
| 5182 | p->encode_coding_system = Vlast_coding_system_used; | 5177 | p->encode_coding_system |
| 5178 | = coding_inherit_eol_type (Vlast_coding_system_used, Qnil); | ||
| 5183 | setup_coding_system (p->encode_coding_system, | 5179 | setup_coding_system (p->encode_coding_system, |
| 5184 | proc_encode_coding_system[XINT (p->outfd)]); | 5180 | proc_encode_coding_system[XINT (p->outfd)]); |
| 5185 | if (proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5186 | == CODING_EOL_UNDECIDED) | ||
| 5187 | proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5188 | = system_eol_type; | ||
| 5189 | } | 5181 | } |
| 5190 | } | 5182 | } |
| 5191 | if (coding->carryover_bytes > 0) | 5183 | if (coding->carryover_bytes > 0) |
| @@ -6698,7 +6690,7 @@ encode subprocess input. */) | |||
| 6698 | error ("Output file descriptor of %s closed", SDATA (p->name)); | 6690 | error ("Output file descriptor of %s closed", SDATA (p->name)); |
| 6699 | Fcheck_coding_system (decoding); | 6691 | Fcheck_coding_system (decoding); |
| 6700 | Fcheck_coding_system (encoding); | 6692 | Fcheck_coding_system (encoding); |
| 6701 | 6693 | encoding = coding_inherit_eol_type (encoding, Qnil); | |
| 6702 | p->decode_coding_system = decoding; | 6694 | p->decode_coding_system = decoding; |
| 6703 | p->encode_coding_system = encoding; | 6695 | p->encode_coding_system = encoding; |
| 6704 | setup_process_coding_systems (process); | 6696 | setup_process_coding_systems (process); |