changeset 90339:4a17062dd458

(Fccl_execute_on_string): Fix the condition of terminating the loop. When quitted, show a proper error message.
author Kenichi Handa <handa@m17n.org>
date Fri, 03 Mar 2006 05:13:48 +0000
parents 413614f3fc44
children 8f2b88ad38c4
files src/ccl.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ccl.c	Thu Mar 02 07:00:35 2006 +0000
+++ b/src/ccl.c	Fri Mar 03 05:13:48 2006 +0000
@@ -2167,13 +2167,15 @@
 	    break;
 	}
 
-      if (ccl.status != CCL_STAT_SUSPEND_BY_SRC)
+      if (ccl.status != CCL_STAT_SUSPEND_BY_SRC
+	  || str_chars == consumed_chars)
 	break;
     }
 
-  if (ccl.status != CCL_STAT_SUCCESS
-      && ccl.status != CCL_STAT_SUSPEND_BY_SRC)
+  if (ccl.status == CCL_STAT_INVALID_CMD)
     error ("Error in CCL program at %dth code", ccl.ic);
+  if (ccl.status == CCL_STAT_QUIT)
+    error ("CCL program interrupted at %dth code", ccl.ic);
 
   for (i = 0; i < 8; i++)
     ASET (status, i, make_number (ccl.reg[i]));