comparison src/coding.c @ 24510:3aeaac397061

(encode_coding_iso2022): Initialize dummy arguments to ENCODE_ISO_CHARACTER for the previous change on this macro.
author Kenichi Handa <handa@m17n.org>
date Tue, 23 Mar 1999 12:28:55 +0000
parents 219c99669e4b
children 05c797dbc451
comparison
equal deleted inserted replaced
24509:3cb266497eb3 24510:3aeaac397061
1900 /* Now encode one character. C1 is a control character, an 1900 /* Now encode one character. C1 is a control character, an
1901 ASCII character, or a leading-code of multi-byte character. */ 1901 ASCII character, or a leading-code of multi-byte character. */
1902 switch (emacs_code_class[c1]) 1902 switch (emacs_code_class[c1])
1903 { 1903 {
1904 case EMACS_ascii_code: 1904 case EMACS_ascii_code:
1905 c2 = 0;
1905 ENCODE_ISO_CHARACTER (CHARSET_ASCII, c1, /* dummy */ c2); 1906 ENCODE_ISO_CHARACTER (CHARSET_ASCII, c1, /* dummy */ c2);
1906 break; 1907 break;
1907 1908
1908 case EMACS_control_code: 1909 case EMACS_control_code:
1909 if (coding->flags & CODING_FLAG_ISO_RESET_AT_CNTL) 1910 if (coding->flags & CODING_FLAG_ISO_RESET_AT_CNTL)
1941 coding->consumed_char++; 1942 coding->consumed_char++;
1942 break; 1943 break;
1943 1944
1944 case EMACS_leading_code_2: 1945 case EMACS_leading_code_2:
1945 ONE_MORE_BYTE (c2); 1946 ONE_MORE_BYTE (c2);
1947 c3 = 0;
1946 if (c2 < 0xA0) 1948 if (c2 < 0xA0)
1947 { 1949 {
1948 /* invalid sequence */ 1950 /* invalid sequence */
1949 *dst++ = c1; 1951 *dst++ = c1;
1950 src--; 1952 src--;
1954 ENCODE_ISO_CHARACTER (c1, c2, /* dummy */ c3); 1956 ENCODE_ISO_CHARACTER (c1, c2, /* dummy */ c3);
1955 break; 1957 break;
1956 1958
1957 case EMACS_leading_code_3: 1959 case EMACS_leading_code_3:
1958 TWO_MORE_BYTES (c2, c3); 1960 TWO_MORE_BYTES (c2, c3);
1961 c4 = 0;
1959 if (c2 < 0xA0 || c3 < 0xA0) 1962 if (c2 < 0xA0 || c3 < 0xA0)
1960 { 1963 {
1961 /* invalid sequence */ 1964 /* invalid sequence */
1962 *dst++ = c1; 1965 *dst++ = c1;
1963 src -= 2; 1966 src -= 2;