aboutsummaryrefslogtreecommitdiffstats
path: root/src/ccl.c
diff options
context:
space:
mode:
authorKenichi Handa1997-04-07 07:12:13 +0000
committerKenichi Handa1997-04-07 07:12:13 +0000
commit887bfbd7dad82b22175f75bcf5fa38ffe1af6268 (patch)
tree56c5d328112d2f5b7d780b2b28d9e904f8574bca /src/ccl.c
parent6dc0722daf6e6fba9ff5d1db733f97f2378145f0 (diff)
downloademacs-887bfbd7dad82b22175f75bcf5fa38ffe1af6268.tar.gz
emacs-887bfbd7dad82b22175f75bcf5fa38ffe1af6268.zip
(ccl_driver): Fix bug of the case CCL_WriteArrayReadJump.
Diffstat (limited to 'src/ccl.c')
-rw-r--r--src/ccl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ccl.c b/src/ccl.c
index b3f9d49c0c7..f6251c285ef 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -196,7 +196,7 @@ Lisp_Object Vccl_program_table;
196 IC += ADDRESS; 196 IC += ADDRESS;
197 */ 197 */
198/* Note: If read is suspended, the resumed execution starts from the 198/* Note: If read is suspended, the resumed execution starts from the
199 Mth code (YYYYY == CCL_ReadJump). */ 199 Nth code (YYYYY == CCL_ReadJump). */
200 200
201#define CCL_ReadJump 0x0C /* Read and jump: 201#define CCL_ReadJump 0x0C /* Read and jump:
202 1:A--D--D--R--E--S--S-rrrYYYYY 202 1:A--D--D--R--E--S--S-rrrYYYYY
@@ -462,7 +462,7 @@ Lisp_Object Vccl_program_table;
462 } while (0) 462 } while (0)
463 463
464/* Encode one character CH to multibyte form and write to the current 464/* Encode one character CH to multibyte form and write to the current
465 output buffer. If CH is negative, write one byte -CH. */ 465 output buffer. If CH is less than 256, CH is written as is. */
466#define CCL_WRITE_CHAR(ch) \ 466#define CCL_WRITE_CHAR(ch) \
467 do { \ 467 do { \
468 if (!dst) \ 468 if (!dst) \
@@ -655,13 +655,13 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
655 655
656 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ 656 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
657 i = reg[rrr]; 657 i = reg[rrr];
658 j = ccl_prog[ic++]; 658 j = ccl_prog[ic];
659 if ((unsigned int) i < j) 659 if ((unsigned int) i < j)
660 { 660 {
661 i = XINT (ccl_prog[ic + i]); 661 i = XINT (ccl_prog[ic + 1 + i]);
662 CCL_WRITE_CHAR (i); 662 CCL_WRITE_CHAR (i);
663 } 663 }
664 ic += j + 1; 664 ic += j + 2;
665 CCL_READ_CHAR (reg[rrr]); 665 CCL_READ_CHAR (reg[rrr]);
666 ic += ADDR - (j + 2); 666 ic += ADDR - (j + 2);
667 break; 667 break;
@@ -926,8 +926,8 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
926 dst += msglen; 926 dst += msglen;
927 } 927 }
928 } 928 }
929 goto ccl_finish;
930#endif 929#endif
930 goto ccl_finish;
931 931
932 case CCL_STAT_QUIT: 932 case CCL_STAT_QUIT:
933 sprintf(msg, "\nCCL: Quited."); 933 sprintf(msg, "\nCCL: Quited.");