comparison src/coding.c @ 21880:0a3488a71129

(encode_coding_iso2022): If encoding a last block, reset graphic planes and registers.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 May 1998 04:15:48 +0000
parents 376ce06ab12d
children e9014d2166a4
comparison
equal deleted inserted replaced
21879:14316c9ecdac 21880:0a3488a71129
1944 result = CODING_FINISH_INSUFFICIENT_SRC; 1944 result = CODING_FINISH_INSUFFICIENT_SRC;
1945 src = src_base; 1945 src = src_base;
1946 break; 1946 break;
1947 } 1947 }
1948 1948
1949 if (src < src_end) 1949 if (src < src_end && result == CODING_FINISH_NORMAL)
1950 { 1950 result = CODING_FINISH_INSUFFICIENT_DST;
1951 if (result == CODING_FINISH_NORMAL) 1951
1952 result = CODING_FINISH_INSUFFICIENT_DST; 1952 /* If this is the last block of the text to be encoded, we must
1953 else 1953 reset graphic planes and registers to the initial state, and
1954 /* If this is the last block of the text to be encoded, we 1954 flush out the carryover if any. */
1955 must reset graphic planes and registers to the initial 1955 if (coding->mode & CODING_MODE_LAST_BLOCK)
1956 state, and flush out the carryover if any. */ 1956 ENCODE_RESET_PLANE_AND_REGISTER;
1957 if (coding->mode & CODING_MODE_LAST_BLOCK)
1958 ENCODE_RESET_PLANE_AND_REGISTER;
1959 }
1960 1957
1961 coding->consumed = src - source; 1958 coding->consumed = src - source;
1962 coding->produced = coding->produced_char = dst - destination; 1959 coding->produced = coding->produced_char = dst - destination;
1963 return result; 1960 return result;
1964 } 1961 }