aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2002-03-01 01:14:37 +0000
committerKenichi Handa2002-03-01 01:14:37 +0000
commitd2bc5a70e902fc00fb88152ebac7532116c96e29 (patch)
tree0b27a97917d46d3753b870e5db9c0b1a1628548b
parentc10842eac7ff3e4a2fbba83a1dc1fe0f2a01f1ae (diff)
downloademacs-d2bc5a70e902fc00fb88152ebac7532116c96e29.tar.gz
emacs-d2bc5a70e902fc00fb88152ebac7532116c96e29.zip
(struct ccl_program): Members eol_type and multibyte
deleted. New members src_multibyte, dst_multibyte, consumed, and produced. (struct ccl_spec): Members decoder and encoder deleted. New memeber ccl. (CODING_SPEC_CCL_PROGRAM): New macro. (ccl_driver): Prototype updated. (Qccl, Qcclp, Fccl_program_p): Extern them. (CHECK_CCL_PROGRAM): New macro.
-rw-r--r--src/ccl.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/ccl.h b/src/ccl.h
index ed89bf5e6d8..e8505378844 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -1,6 +1,9 @@
1/* Header for CCL (Code Conversion Language) interpreter. 1/* Header for CCL (Code Conversion Language) interpreter.
2 Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 2 Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
3 Licensed to the Free Software Foundation. 3 Licensed to the Free Software Foundation.
4 Copyright (C) 2001, 2002
5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H13PRO009
4 7
5This file is part of GNU Emacs. 8This file is part of GNU Emacs.
6 9
@@ -53,16 +56,14 @@ struct ccl_program {
53 many times bigger the output buffer 56 many times bigger the output buffer
54 should be than the input buffer. */ 57 should be than the input buffer. */
55 int stack_idx; /* How deep the call of CCL_Call is nested. */ 58 int stack_idx; /* How deep the call of CCL_Call is nested. */
56 int eol_type; /* When the CCL program is used for 59 int src_multibyte; /* 1 if the input buffer is multibyte. */
57 encoding by a coding system, set to 60 int dst_multibyte; /* 1 if the output buffer is multibyte. */
58 the eol_type of the coding system.
59 In other cases, always
60 CODING_EOL_LF. */
61 int multibyte; /* 1 if the source text is multibyte. */
62 int cr_consumed; /* Flag for encoding DOS-like EOL 61 int cr_consumed; /* Flag for encoding DOS-like EOL
63 format when the CCL program is used 62 format when the CCL program is used
64 for encoding by a coding 63 for encoding by a coding
65 system. */ 64 system. */
65 int consumed;
66 int produced;
66 int suppress_error; /* If nonzero, don't insert error 67 int suppress_error; /* If nonzero, don't insert error
67 message in the output. */ 68 message in the output. */
68 int eight_bit_control; /* Set to nonzero if CCL_WRITE_CHAR 69 int eight_bit_control; /* Set to nonzero if CCL_WRITE_CHAR
@@ -73,13 +74,13 @@ struct ccl_program {
73 coding_system. */ 74 coding_system. */
74 75
75struct ccl_spec { 76struct ccl_spec {
76 struct ccl_program decoder; 77 struct ccl_program ccl;
77 struct ccl_program encoder;
78 unsigned char valid_codes[256];
79 int cr_carryover; /* CR carryover flag. */ 78 int cr_carryover; /* CR carryover flag. */
80 unsigned char eight_bit_carryover[MAX_MULTIBYTE_LENGTH]; 79 unsigned char eight_bit_carryover[MAX_MULTIBYTE_LENGTH];
81}; 80};
82 81
82#define CODING_SPEC_CCL_PROGRAM(coding) ((coding)->spec.ccl.ccl)
83
83/* Alist of fontname patterns vs corresponding CCL program. */ 84/* Alist of fontname patterns vs corresponding CCL program. */
84extern Lisp_Object Vfont_ccl_encoder_alist; 85extern Lisp_Object Vfont_ccl_encoder_alist;
85 86
@@ -87,8 +88,7 @@ extern Lisp_Object Vfont_ccl_encoder_alist;
87 execution of ccl program CCL_PROG (symbol or vector). */ 88 execution of ccl program CCL_PROG (symbol or vector). */
88extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object)); 89extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object));
89 90
90extern int ccl_driver P_ ((struct ccl_program *, unsigned char *, 91extern void ccl_driver P_ ((struct ccl_program *, int *, int *, int, int));
91 unsigned char *, int, int, int *));
92 92
93/* Vector of CCL program names vs corresponding program data. */ 93/* Vector of CCL program names vs corresponding program data. */
94extern Lisp_Object Vccl_program_table; 94extern Lisp_Object Vccl_program_table;
@@ -97,4 +97,14 @@ extern Lisp_Object Vccl_program_table;
97 is an index for Vccl_protram_table. */ 97 is an index for Vccl_protram_table. */
98extern Lisp_Object Qccl_program_idx; 98extern Lisp_Object Qccl_program_idx;
99 99
100extern Lisp_Object Qccl, Qcclp;
101
102EXFUN (Fccl_program_p, 1);
103
104#define CHECK_CCL_PROGRAM(x) \
105 do { \
106 if (NILP (Fccl_program_p (x))) \
107 x = wrong_type_argument (Qcclp, (x)); \
108 } while (0);
109
100#endif /* EMACS_CCL_H */ 110#endif /* EMACS_CCL_H */