Commit 74b01b80 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(decode_eol_post_ccl): Special handling for undecided

and inconsistent EOL types.
parent affbf647
No preview for this file type
......@@ -3944,13 +3944,19 @@ decode_eol_post_ccl (coding, ptr, bytes)
/* Here, to avoid the call of setup_coding_system, we directly
call detect_eol_type. */
coding->eol_type = detect_eol_type (ptr, bytes, &dummy);
val = Fget (coding->symbol, Qeol_type);
if (VECTORP (val) && XVECTOR (val)->size == 3)
coding->symbol = XVECTOR (val)->contents[coding->eol_type];
if (coding->eol_type == CODING_EOL_INCONSISTENT)
coding->eol_type = CODING_EOL_LF;
if (coding->eol_type != CODING_EOL_UNDECIDED)
{
val = Fget (coding->symbol, Qeol_type);
if (VECTORP (val) && XVECTOR (val)->size == 3)
coding->symbol = XVECTOR (val)->contents[coding->eol_type];
}
coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL;
}
if (coding->eol_type == CODING_EOL_LF)
if (coding->eol_type == CODING_EOL_LF
|| coding->eol_type == CODING_EOL_UNDECIDED)
{
/* We have nothing to do. */
ptr = pend;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment