changeset 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 988eef7dba1b
children 402b6e5f4b58
files src/coding.h
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.h	Thu Oct 23 12:01:50 1997 +0000
+++ b/src/coding.h	Thu Oct 23 12:01:50 1997 +0000
@@ -135,7 +135,7 @@
    on output.  */
 #define CODING_FLAG_ISO_DESIGNATE_AT_BOL 0x0400
 
-/* If set, do not encode unexpected charactes on output.  */
+/* If set, do not encode unsafe charactes on output.  */
 #define CODING_FLAG_ISO_SAFE		0x0800
 
 /* If set, extra latin codes (128..159) are accepted as a valid code
@@ -161,11 +161,10 @@
   /* A graphic register to which each charset should be designated.  */
   unsigned char requested_designation[MAX_CHARSET + 1];
 
-  /* Table of expected character sets for this coding system.  If the
-     Nth element is 0, the charset of ID N is not an expected
-     character set.  Such a character set is not encoded when
-     CODING_ISO_FLAG_SAFE is set.  */
-  unsigned char expected_charsets[MAX_CHARSET + 1];
+  /* A revision number to be specified for each charset on encoding.
+     The value 255 means no revision number for the corresponding
+     charset.  */
+  unsigned char charset_revision_number[MAX_CHARSET + 1];
 
   /* Set to 1 temporarily only when graphic register 2 or 3 is invoked
      by single-shift while encoding.  */
@@ -184,8 +183,8 @@
   coding->spec.iso2022.initial_designation[reg]
 #define CODING_SPEC_ISO_REQUESTED_DESIGNATION(coding, charset) \
   coding->spec.iso2022.requested_designation[charset]
-#define CODING_SPEC_ISO_EXPECTED_CHARSETS(coding) \
-  coding->spec.iso2022.expected_charsets
+#define CODING_SPEC_ISO_REVISION_NUMBER(coding, charset) \
+  coding->spec.iso2022.charset_revision_number[charset]
 #define CODING_SPEC_ISO_SINGLE_SHIFTING(coding) \
   coding->spec.iso2022.single_shifting
 #define CODING_SPEC_ISO_BOL(coding) \
@@ -286,6 +285,12 @@
   /* Type of end-of-line format (LF, CRLF, or CR) of the coding system.  */
   int eol_type;
 
+  /* Table of safe character sets for this coding system.  If the Nth
+     element is 0, the charset of ID N is not an safe character set.
+     Such a character set is not encoded when CODING_ISO_FLAG_SAFE is
+     set.  */
+  unsigned char safe_charsets[MAX_CHARSET + 1];
+
   /* Non-zero means that the current source text is the last block of the
      whole text to be converted.  */
   int last_block;