comparison src/coding.c @ 29877:7b43e1fb478a

(decode_eol_post_ccl): Special handling for undecided and inconsistent EOL types.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 23 Jun 2000 05:30:34 +0000
parents 2bc397e9b09a
children 37a3b3eae862
comparison
equal deleted inserted replaced
29876:edfec1c0d511 29877:7b43e1fb478a
3942 if (coding->eol_type == CODING_EOL_UNDECIDED) 3942 if (coding->eol_type == CODING_EOL_UNDECIDED)
3943 { 3943 {
3944 /* Here, to avoid the call of setup_coding_system, we directly 3944 /* Here, to avoid the call of setup_coding_system, we directly
3945 call detect_eol_type. */ 3945 call detect_eol_type. */
3946 coding->eol_type = detect_eol_type (ptr, bytes, &dummy); 3946 coding->eol_type = detect_eol_type (ptr, bytes, &dummy);
3947 val = Fget (coding->symbol, Qeol_type); 3947 if (coding->eol_type == CODING_EOL_INCONSISTENT)
3948 if (VECTORP (val) && XVECTOR (val)->size == 3) 3948 coding->eol_type = CODING_EOL_LF;
3949 coding->symbol = XVECTOR (val)->contents[coding->eol_type]; 3949 if (coding->eol_type != CODING_EOL_UNDECIDED)
3950 {
3951 val = Fget (coding->symbol, Qeol_type);
3952 if (VECTORP (val) && XVECTOR (val)->size == 3)
3953 coding->symbol = XVECTOR (val)->contents[coding->eol_type];
3954 }
3950 coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; 3955 coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL;
3951 } 3956 }
3952 3957
3953 if (coding->eol_type == CODING_EOL_LF) 3958 if (coding->eol_type == CODING_EOL_LF
3959 || coding->eol_type == CODING_EOL_UNDECIDED)
3954 { 3960 {
3955 /* We have nothing to do. */ 3961 /* We have nothing to do. */
3956 ptr = pend; 3962 ptr = pend;
3957 } 3963 }
3958 else if (coding->eol_type == CODING_EOL_CRLF) 3964 else if (coding->eol_type == CODING_EOL_CRLF)