comparison src/coding.h @ 20149:b804a783ceec

(struct iso2022_spec): New member charset_revision_number. (CODING_SPEC_ISO_SAFE_CHARSETS): This macro deleted. (CODING_SPEC_ISO_REVISION_NUMBER): New macro. (struct coding_system): Member `safe_charsets' is moved from struct iso2022_spec.
author Kenichi Handa <handa@m17n.org>
date Thu, 23 Oct 1997 12:01:50 +0000
parents 08b92fab92af
children 549826cf2952
comparison
equal deleted inserted replaced
20148:988eef7dba1b 20149:b804a783ceec
133 133
134 /* If set, designation sequence should be placed at beginning of line 134 /* If set, designation sequence should be placed at beginning of line
135 on output. */ 135 on output. */
136 #define CODING_FLAG_ISO_DESIGNATE_AT_BOL 0x0400 136 #define CODING_FLAG_ISO_DESIGNATE_AT_BOL 0x0400
137 137
138 /* If set, do not encode unexpected charactes on output. */ 138 /* If set, do not encode unsafe charactes on output. */
139 #define CODING_FLAG_ISO_SAFE 0x0800 139 #define CODING_FLAG_ISO_SAFE 0x0800
140 140
141 /* If set, extra latin codes (128..159) are accepted as a valid code 141 /* If set, extra latin codes (128..159) are accepted as a valid code
142 on input. */ 142 on input. */
143 #define CODING_FLAG_ISO_LATIN_EXTRA 0x1000 143 #define CODING_FLAG_ISO_LATIN_EXTRA 0x1000
159 int initial_designation[4]; 159 int initial_designation[4];
160 160
161 /* A graphic register to which each charset should be designated. */ 161 /* A graphic register to which each charset should be designated. */
162 unsigned char requested_designation[MAX_CHARSET + 1]; 162 unsigned char requested_designation[MAX_CHARSET + 1];
163 163
164 /* Table of expected character sets for this coding system. If the 164 /* A revision number to be specified for each charset on encoding.
165 Nth element is 0, the charset of ID N is not an expected 165 The value 255 means no revision number for the corresponding
166 character set. Such a character set is not encoded when 166 charset. */
167 CODING_ISO_FLAG_SAFE is set. */ 167 unsigned char charset_revision_number[MAX_CHARSET + 1];
168 unsigned char expected_charsets[MAX_CHARSET + 1];
169 168
170 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked 169 /* Set to 1 temporarily only when graphic register 2 or 3 is invoked
171 by single-shift while encoding. */ 170 by single-shift while encoding. */
172 int single_shifting; 171 int single_shifting;
173 172
182 coding->spec.iso2022.current_designation[reg] 181 coding->spec.iso2022.current_designation[reg]
183 #define CODING_SPEC_ISO_INITIAL_DESIGNATION(coding, reg) \ 182 #define CODING_SPEC_ISO_INITIAL_DESIGNATION(coding, reg) \
184 coding->spec.iso2022.initial_designation[reg] 183 coding->spec.iso2022.initial_designation[reg]
185 #define CODING_SPEC_ISO_REQUESTED_DESIGNATION(coding, charset) \ 184 #define CODING_SPEC_ISO_REQUESTED_DESIGNATION(coding, charset) \
186 coding->spec.iso2022.requested_designation[charset] 185 coding->spec.iso2022.requested_designation[charset]
187 #define CODING_SPEC_ISO_EXPECTED_CHARSETS(coding) \ 186 #define CODING_SPEC_ISO_REVISION_NUMBER(coding, charset) \
188 coding->spec.iso2022.expected_charsets 187 coding->spec.iso2022.charset_revision_number[charset]
189 #define CODING_SPEC_ISO_SINGLE_SHIFTING(coding) \ 188 #define CODING_SPEC_ISO_SINGLE_SHIFTING(coding) \
190 coding->spec.iso2022.single_shifting 189 coding->spec.iso2022.single_shifting
191 #define CODING_SPEC_ISO_BOL(coding) \ 190 #define CODING_SPEC_ISO_BOL(coding) \
192 coding->spec.iso2022.bol 191 coding->spec.iso2022.bol
193 192
284 unsigned int flags; 283 unsigned int flags;
285 284
286 /* Type of end-of-line format (LF, CRLF, or CR) of the coding system. */ 285 /* Type of end-of-line format (LF, CRLF, or CR) of the coding system. */
287 int eol_type; 286 int eol_type;
288 287
288 /* Table of safe character sets for this coding system. If the Nth
289 element is 0, the charset of ID N is not an safe character set.
290 Such a character set is not encoded when CODING_ISO_FLAG_SAFE is
291 set. */
292 unsigned char safe_charsets[MAX_CHARSET + 1];
293
289 /* Non-zero means that the current source text is the last block of the 294 /* Non-zero means that the current source text is the last block of the
290 whole text to be converted. */ 295 whole text to be converted. */
291 int last_block; 296 int last_block;
292 297
293 /* Non-zero means that characters are being composed currently while 298 /* Non-zero means that characters are being composed currently while