aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.h')
-rw-r--r--src/coding.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/coding.h b/src/coding.h
index cd698e75f09..ed641650381 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -135,7 +135,7 @@ enum iso_code_class_type
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
@@ -161,11 +161,10 @@ struct iso2022_spec
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. */
@@ -184,8 +183,8 @@ struct iso2022_spec
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) \
@@ -286,6 +285,12 @@ struct coding_system
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;