comparison src/coding.c @ 23426:088cb2a804c7

(shrink_decoding_region): If a charset other than ascii is initially designated to G0, don't shrink the region. (shrink_encoding_region): Likewise.
author Kenichi Handa <handa@m17n.org>
date Mon, 12 Oct 1998 12:00:44 +0000
parents 6905813a49c6
children 6f03301d36a7
comparison
equal deleted inserted replaced
23425:3ae4cc2b716c 23426:088cb2a804c7
3944 if (begp < endp && endp < endp_orig && endp[-1] >= 0x80) 3944 if (begp < endp && endp < endp_orig && endp[-1] >= 0x80)
3945 endp++; 3945 endp++;
3946 break; 3946 break;
3947 3947
3948 default: /* i.e. case coding_type_iso2022: */ 3948 default: /* i.e. case coding_type_iso2022: */
3949 if (CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, 0) != CHARSET_ASCII)
3950 /* We can't skip any data. */
3951 break;
3949 if (coding->heading_ascii < 0) 3952 if (coding->heading_ascii < 0)
3950 { 3953 {
3951 /* We can skip all ASCII characters at the head except for a 3954 /* We can skip all ASCII characters at the head except for a
3952 few control codes. */ 3955 few control codes. */
3953 while (begp < endp && (c = *begp) < 0x80 3956 while (begp < endp && (c = *begp) < 0x80
4085 else 4088 else
4086 begp = endp; 4089 begp = endp;
4087 break; 4090 break;
4088 4091
4089 case coding_type_iso2022: 4092 case coding_type_iso2022:
4093 if (CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, 0) != CHARSET_ASCII)
4094 /* We can't skip any data. */
4095 break;
4090 if (coding->flags & CODING_FLAG_ISO_DESIGNATE_AT_BOL) 4096 if (coding->flags & CODING_FLAG_ISO_DESIGNATE_AT_BOL)
4091 { 4097 {
4092 unsigned char *bol = begp; 4098 unsigned char *bol = begp;
4093 while (begp < endp && *begp < 0x80) 4099 while (begp < endp && *begp < 0x80)
4094 { 4100 {