aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2006-05-08 05:19:42 +0000
committerKenichi Handa2006-05-08 05:19:42 +0000
commit6b62b48dbd991734484b78bd7001eac9c9dbbc66 (patch)
tree89b4d1beb237218ee0e5ea10716ce0108ae9a098 /src
parenta995a779fc06af53a4eb340b2c5c4f826c17723d (diff)
downloademacs-6b62b48dbd991734484b78bd7001eac9c9dbbc66.tar.gz
emacs-6b62b48dbd991734484b78bd7001eac9c9dbbc66.zip
(setup_process_coding_systems): Use system_eol_type
for encoding if eol_type is not yet decided. (read_process_output): Likewise. (send_process): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/process.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index dbb431496c3..cfc39235c9a 100644
--- a/src/process.c
+++ b/src/process.c
@@ -695,6 +695,8 @@ setup_process_coding_systems (process)
695 = (struct coding_system *) xmalloc (sizeof (struct coding_system)); 695 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
696 setup_coding_system (p->encode_coding_system, 696 setup_coding_system (p->encode_coding_system,
697 proc_encode_coding_system[outch]); 697 proc_encode_coding_system[outch]);
698 if (proc_encode_coding_system[outch]->eol_type == CODING_EOL_UNDECIDED)
699 proc_encode_coding_system[outch]->eol_type = system_eol_type;
698} 700}
699 701
700DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, 702DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
@@ -5066,6 +5068,10 @@ read_process_output (proc, channel)
5066 p->encode_coding_system = coding->symbol; 5068 p->encode_coding_system = coding->symbol;
5067 setup_coding_system (coding->symbol, 5069 setup_coding_system (coding->symbol,
5068 proc_encode_coding_system[XINT (p->outfd)]); 5070 proc_encode_coding_system[XINT (p->outfd)]);
5071 if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
5072 == CODING_EOL_UNDECIDED)
5073 proc_encode_coding_system[XINT (p->outfd)]->eol_type
5074 = system_eol_type;
5069 } 5075 }
5070 } 5076 }
5071 5077
@@ -5173,6 +5179,10 @@ read_process_output (proc, channel)
5173 p->encode_coding_system = coding->symbol; 5179 p->encode_coding_system = coding->symbol;
5174 setup_coding_system (coding->symbol, 5180 setup_coding_system (coding->symbol,
5175 proc_encode_coding_system[XINT (p->outfd)]); 5181 proc_encode_coding_system[XINT (p->outfd)]);
5182 if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
5183 == CODING_EOL_UNDECIDED)
5184 proc_encode_coding_system[XINT (p->outfd)]->eol_type
5185 = system_eol_type;
5176 } 5186 }
5177 } 5187 }
5178 carryover = nbytes - coding->consumed; 5188 carryover = nbytes - coding->consumed;
@@ -5315,6 +5325,8 @@ send_process (proc, buf, len, object)
5315 sending a multibyte text, thus we must encode it by the 5325 sending a multibyte text, thus we must encode it by the
5316 original coding system specified for the current process. */ 5326 original coding system specified for the current process. */
5317 setup_coding_system (p->encode_coding_system, coding); 5327 setup_coding_system (p->encode_coding_system, coding);
5328 if (coding->eol_type == CODING_EOL_UNDECIDED)
5329 coding->eol_type = system_eol_type;
5318 /* src_multibyte should be set to 1 _after_ a call to 5330 /* src_multibyte should be set to 1 _after_ a call to
5319 setup_coding_system, since it resets src_multibyte to 5331 setup_coding_system, since it resets src_multibyte to
5320 zero. */ 5332 zero. */