summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2006-05-08 05:19:42 +0000
committerKenichi Handa <handa@m17n.org>2006-05-08 05:19:42 +0000
commit6b62b48dbd991734484b78bd7001eac9c9dbbc66 (patch)
tree89b4d1beb237218ee0e5ea10716ce0108ae9a098
parenta995a779fc06af53a4eb340b2c5c4f826c17723d (diff)
downloademacs-6b62b48dbd991734484b78bd7001eac9c9dbbc66.tar.gz
(setup_process_coding_systems): Use system_eol_type
for encoding if eol_type is not yet decided. (read_process_output): Likewise. (send_process): Likewise.
-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)
= (struct coding_system *) xmalloc (sizeof (struct coding_system));
setup_coding_system (p->encode_coding_system,
proc_encode_coding_system[outch]);
+ if (proc_encode_coding_system[outch]->eol_type == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[outch]->eol_type = system_eol_type;
}
DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
@@ -5066,6 +5068,10 @@ read_process_output (proc, channel)
p->encode_coding_system = coding->symbol;
setup_coding_system (coding->symbol,
proc_encode_coding_system[XINT (p->outfd)]);
+ if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ = system_eol_type;
}
}
@@ -5173,6 +5179,10 @@ read_process_output (proc, channel)
p->encode_coding_system = coding->symbol;
setup_coding_system (coding->symbol,
proc_encode_coding_system[XINT (p->outfd)]);
+ if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ = system_eol_type;
}
}
carryover = nbytes - coding->consumed;
@@ -5315,6 +5325,8 @@ send_process (proc, buf, len, object)
sending a multibyte text, thus we must encode it by the
original coding system specified for the current process. */
setup_coding_system (p->encode_coding_system, coding);
+ if (coding->eol_type == CODING_EOL_UNDECIDED)
+ coding->eol_type = system_eol_type;
/* src_multibyte should be set to 1 _after_ a call to
setup_coding_system, since it resets src_multibyte to
zero. */