comparison src/fileio.c @ 17835:f36ffb6f1208

Name change through the code: coding-category-internal => coding-category-emacs-mule, XXX_coding_internal => XXX_coding_emacs_mule, coding_type_internal => coding_type_emacs_mule, coding_type_automatic => coding_type_undecided, CODING_CATEGORY_MASK_INTERNAL => CODING_CATEGORY_MASK_EMACS_MULE, CODING_CATEGORY_IDX_INTERNAL => CODING_CATEGORY_IDX_EMACS_MULE, CODING_EOL_AUTOMATIC => CODING_EOL_UNDECIDED.
author Kenichi Handa <handa@m17n.org>
date Fri, 16 May 1997 00:43:29 +0000
parents 2f313f045caa
children 7b3eb9189759
comparison
equal deleted inserted replaced
17834:e154b943bbba 17835:f36ffb6f1208
3163 method and hope for the best. 3163 method and hope for the best.
3164 But if we discover the need for conversion, we give up on this method 3164 But if we discover the need for conversion, we give up on this method
3165 and let the following if-statement handle the replace job. */ 3165 and let the following if-statement handle the replace job. */
3166 if (!NILP (replace) 3166 if (!NILP (replace)
3167 && (! CODING_REQUIRE_CONVERSION (&coding) 3167 && (! CODING_REQUIRE_CONVERSION (&coding)
3168 || (coding.type == coding_type_automatic 3168 || (coding.type == coding_type_undecided
3169 && ! CODING_REQUIRE_EOL_CONVERSION (&coding)) 3169 && ! CODING_REQUIRE_EOL_CONVERSION (&coding))
3170 || (coding.eol_type == CODING_EOL_AUTOMATIC 3170 || (coding.eol_type == CODING_EOL_UNDECIDED
3171 && ! CODING_REQUIRE_TEXT_CONVERSION (&coding)))) 3171 && ! CODING_REQUIRE_TEXT_CONVERSION (&coding))))
3172 { 3172 {
3173 int same_at_start = BEGV; 3173 int same_at_start = BEGV;
3174 int same_at_end = ZV; 3174 int same_at_end = ZV;
3175 int overlap; 3175 int overlap;
3198 error ("IO error reading %s: %s", 3198 error ("IO error reading %s: %s",
3199 XSTRING (filename)->data, strerror (errno)); 3199 XSTRING (filename)->data, strerror (errno));
3200 else if (nread == 0) 3200 else if (nread == 0)
3201 break; 3201 break;
3202 3202
3203 if (coding.type == coding_type_automatic) 3203 if (coding.type == coding_type_undecided)
3204 detect_coding (&coding, buffer, nread); 3204 detect_coding (&coding, buffer, nread);
3205 if (CODING_REQUIRE_TEXT_CONVERSION (&coding)) 3205 if (CODING_REQUIRE_TEXT_CONVERSION (&coding))
3206 /* We found that the file should be decoded somehow. 3206 /* We found that the file should be decoded somehow.
3207 Let's give up here. */ 3207 Let's give up here. */
3208 { 3208 {
3209 giveup_match_end = 1; 3209 giveup_match_end = 1;
3210 break; 3210 break;
3211 } 3211 }
3212 3212
3213 if (coding.eol_type == CODING_EOL_AUTOMATIC) 3213 if (coding.eol_type == CODING_EOL_UNDECIDED)
3214 detect_eol (&coding, buffer, nread); 3214 detect_eol (&coding, buffer, nread);
3215 if (CODING_REQUIRE_EOL_CONVERSION (&coding)) 3215 if (CODING_REQUIRE_EOL_CONVERSION (&coding))
3216 /* We found that the format of eol should be decoded. 3216 /* We found that the format of eol should be decoded.
3217 Let's give up here. */ 3217 Let's give up here. */
3218 { 3218 {