aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ccl.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/ccl.c b/src/ccl.c
index d85045252b8..3b8eb62db9a 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -20,25 +20,15 @@ along with GNU Emacs; see the file COPYING. If not, write to
20the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */ 21Boston, MA 02111-1307, USA. */
22 22
23#ifdef emacs
24#include <config.h> 23#include <config.h>
25#endif
26 24
27#include <stdio.h> 25#include <stdio.h>
28 26
29#ifdef emacs
30
31#include "lisp.h" 27#include "lisp.h"
32#include "charset.h" 28#include "charset.h"
33#include "ccl.h" 29#include "ccl.h"
34#include "coding.h" 30#include "coding.h"
35 31
36#else /* not emacs */
37
38#include "mulelib.h"
39
40#endif /* not emacs */
41
42/* This contains all code conversion map available to CCL. */ 32/* This contains all code conversion map available to CCL. */
43Lisp_Object Vcode_conversion_map_vector; 33Lisp_Object Vcode_conversion_map_vector;
44 34
@@ -862,7 +852,7 @@ while(0)
862 852
863#ifdef CCL_DEBUG 853#ifdef CCL_DEBUG
864#define CCL_DEBUG_BACKTRACE_LEN 256 854#define CCL_DEBUG_BACKTRACE_LEN 256
865int ccl_backtrace_table[CCL_BACKTRACE_TABLE]; 855int ccl_backtrace_table[CCL_DEBUG_BACKTRACE_LEN];
866int ccl_backtrace_idx; 856int ccl_backtrace_idx;
867#endif 857#endif
868 858
@@ -1434,10 +1424,11 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
1434 op = hash_lookup (h, make_number (reg[RRR]), NULL); 1424 op = hash_lookup (h, make_number (reg[RRR]), NULL);
1435 if (op >= 0) 1425 if (op >= 0)
1436 { 1426 {
1437 op = HASH_VALUE (h, op); 1427 Lisp_Object opl;
1438 if (!CHAR_VALID_P (op, 0)) 1428 opl = HASH_VALUE (h, op);
1429 if (!CHAR_VALID_P (XINT (opl), 0))
1439 CCL_INVALID_CMD; 1430 CCL_INVALID_CMD;
1440 SPLIT_CHAR (XINT (op), reg[RRR], i, j); 1431 SPLIT_CHAR (XINT (opl), reg[RRR], i, j);
1441 if (j != -1) 1432 if (j != -1)
1442 i = (i << 7) | j; 1433 i = (i << 7) | j;
1443 reg[rrr] = i; 1434 reg[rrr] = i;
@@ -1458,10 +1449,11 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
1458 op = hash_lookup (h, make_number (i), NULL); 1449 op = hash_lookup (h, make_number (i), NULL);
1459 if (op >= 0) 1450 if (op >= 0)
1460 { 1451 {
1461 op = HASH_VALUE (h, op); 1452 Lisp_Object opl;
1462 if (!INTEGERP (op)) 1453 opl = HASH_VALUE (h, op);
1454 if (!INTEGERP (opl))
1463 CCL_INVALID_CMD; 1455 CCL_INVALID_CMD;
1464 reg[RRR] = XINT (op); 1456 reg[RRR] = XINT (opl);
1465 reg[7] = 1; /* r7 true for success */ 1457 reg[7] = 1; /* r7 true for success */
1466 } 1458 }
1467 else 1459 else
@@ -2071,8 +2063,6 @@ setup_ccl_program (ccl, ccl_prog)
2071 return 0; 2063 return 0;
2072} 2064}
2073 2065
2074#ifdef emacs
2075
2076DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, 2066DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,
2077 doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. 2067 doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code.
2078See the documentation of `define-ccl-program' for the detail of CCL program. */) 2068See the documentation of `define-ccl-program' for the detail of CCL program. */)
@@ -2412,5 +2402,3 @@ used by CCL. */);
2412 defsubr (&Sregister_ccl_program); 2402 defsubr (&Sregister_ccl_program);
2413 defsubr (&Sregister_code_conversion_map); 2403 defsubr (&Sregister_code_conversion_map);
2414} 2404}
2415
2416#endif /* emacs */