aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorPavel Janík2001-12-09 00:56:24 +0000
committerPavel Janík2001-12-09 00:56:24 +0000
commit873232948609cec66905f04695de31bb0874132c (patch)
tree08e9a528d995c54f15aa2e364687d247470d0fb6 /src/coding.c
parent05ffc44bbc34e3026002ceed1d39beca3abd19da (diff)
downloademacs-873232948609cec66905f04695de31bb0874132c.tar.gz
emacs-873232948609cec66905f04695de31bb0874132c.zip
(setup_coding_system, shrink_encoding_region)
(Fdecode_sjis_char): Likewise.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/coding.c b/src/coding.c
index 58951442422..f2dde6695da 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3576,8 +3576,8 @@ setup_coding_system (coding_system, coding)
3576 = CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION; 3576 = CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION;
3577 for (i = 0; i < 4; i++) 3577 for (i = 0; i < 4; i++)
3578 { 3578 {
3579 if (INTEGERP (flags[i]) 3579 if ((INTEGERP (flags[i])
3580 && (charset = XINT (flags[i]), CHARSET_VALID_P (charset)) 3580 && (charset = XINT (flags[i]), CHARSET_VALID_P (charset)))
3581 || (charset = get_charset_id (flags[i])) >= 0) 3581 || (charset = get_charset_id (flags[i])) >= 0)
3582 { 3582 {
3583 CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = charset; 3583 CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = charset;
@@ -3595,9 +3595,9 @@ setup_coding_system (coding_system, coding)
3595 tail = flags[i]; 3595 tail = flags[i];
3596 3596
3597 coding->flags |= CODING_FLAG_ISO_DESIGNATION; 3597 coding->flags |= CODING_FLAG_ISO_DESIGNATION;
3598 if (INTEGERP (XCAR (tail)) 3598 if ((INTEGERP (XCAR (tail))
3599 && (charset = XINT (XCAR (tail)), 3599 && (charset = XINT (XCAR (tail)),
3600 CHARSET_VALID_P (charset)) 3600 CHARSET_VALID_P (charset)))
3601 || (charset = get_charset_id (XCAR (tail))) >= 0) 3601 || (charset = get_charset_id (XCAR (tail))) >= 0)
3602 { 3602 {
3603 CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = charset; 3603 CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = charset;
@@ -3608,9 +3608,9 @@ setup_coding_system (coding_system, coding)
3608 tail = XCDR (tail); 3608 tail = XCDR (tail);
3609 while (CONSP (tail)) 3609 while (CONSP (tail))
3610 { 3610 {
3611 if (INTEGERP (XCAR (tail)) 3611 if ((INTEGERP (XCAR (tail))
3612 && (charset = XINT (XCAR (tail)), 3612 && (charset = XINT (XCAR (tail)),
3613 CHARSET_VALID_P (charset)) 3613 CHARSET_VALID_P (charset)))
3614 || (charset = get_charset_id (XCAR (tail))) >= 0) 3614 || (charset = get_charset_id (XCAR (tail))) >= 0)
3615 CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) 3615 CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset)
3616 = i; 3616 = i;
@@ -5047,7 +5047,7 @@ shrink_encoding_region (beg, end, coding, str)
5047 if (coding->type == coding_type_ccl 5047 if (coding->type == coding_type_ccl
5048 || coding->eol_type == CODING_EOL_CRLF 5048 || coding->eol_type == CODING_EOL_CRLF
5049 || coding->eol_type == CODING_EOL_CR 5049 || coding->eol_type == CODING_EOL_CR
5050 || coding->cmp_data && coding->cmp_data->used > 0) 5050 || (coding->cmp_data && coding->cmp_data->used > 0))
5051 { 5051 {
5052 /* We can't skip any data. */ 5052 /* We can't skip any data. */
5053 return; 5053 return;
@@ -6606,7 +6606,7 @@ Return the corresponding character. */)
6606 } 6606 }
6607 else 6607 else
6608 { 6608 {
6609 if ((s1 < 0x80 || s1 > 0x9F && s1 < 0xE0 || s1 > 0xEF) 6609 if ((s1 < 0x80 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF)
6610 || (s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)) 6610 || (s2 < 0x40 || s2 == 0x7F || s2 > 0xFC))
6611 error ("Invalid Shift JIS code: %x", XFASTINT (code)); 6611 error ("Invalid Shift JIS code: %x", XFASTINT (code));
6612 DECODE_SJIS (s1, s2, c1, c2); 6612 DECODE_SJIS (s1, s2, c1, c2);