changeset 19611:79c3bdba351b

(coding_type): New member coding_type_raw_text. (CODING_EOL_INCONSISTENT): New macro. (CODING_REQUIRE_NO_CONVERSION): Check also coding_type_raw_text. (CODING_MAY_REQUIRE_NO_CONVERSION): Likewise. (CODING_CATEGORY_IDX_RAW_TEXT): New macro. (CODING_CATEGORY_MASK_RAW_TEXT): New macro.
author Kenichi Handa <handa@m17n.org>
date Thu, 28 Aug 1997 10:51:12 +0000
parents 3bbf4dd908a5
children 783efd6c7c1e
files src/coding.h
diffstat 1 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.h	Thu Aug 28 10:50:32 1997 +0000
+++ b/src/coding.h	Thu Aug 28 10:51:12 1997 +0000
@@ -234,8 +234,12 @@
     coding_type_iso2022,	/* Any coding system of ISO2022
 				   variants.  */
     coding_type_big5,		/* BIG5 coding system for Chinese.  */
-    coding_type_ccl		/* The coding system of which decoder
+    coding_type_ccl,		/* The coding system of which decoder
 				   and encoder are written in CCL.  */
+    coding_type_raw_text	/* A coding system for a text
+				   containing ramdom 8-bit code which
+				   does not require code conversion
+				   except for end-of-line format. */
   };
 
 /* Formats of end-of-line.  */
@@ -246,6 +250,9 @@
 #define CODING_EOL_CR	2	/* Carriage-return only.  */
 #define CODING_EOL_UNDECIDED 3	/* This value is used to denote the
 				   eol-type is not yet decided.  */
+#define CODING_EOL_INCONSISTENT 4 /* This value is used to denote the
+				     eol-type is not consistent
+				     through the file.  */
 
 /* Character composition status while encoding/decoding.  */
 #define COMPOSING_NO		 0 /* not composing */
@@ -330,17 +337,19 @@
 
 /* Return 1 if coding system CODING never requires any code conversion.  */
 #define CODING_REQUIRE_NO_CONVERSION(coding)		\
-  (((coding)->type == coding_type_no_conversion		\
-    || (coding)->type == coding_type_emacs_mule)	\
-   && (coding)->eol_type == CODING_EOL_LF)
+  ((coding)->type == coding_type_no_conversion		\
+   || (((coding)->type == coding_type_emacs_mule	\
+	|| (coding)->type == coding_type_raw_text)	\
+       && (coding)->eol_type == CODING_EOL_LF))
 
 /* Return 1 if coding system CODING may not require code conversion.  */
 #define CODING_MAY_REQUIRE_NO_CONVERSION(coding)	\
-  (((coding)->type == coding_type_no_conversion		\
-    || (coding)->type == coding_type_emacs_mule		\
-    || (coding)->type == coding_type_undecided)		\
-   && ((coding)->eol_type == CODING_EOL_LF		\
-       || (coding)->eol_type == CODING_EOL_UNDECIDED))
+  ((coding)->type == coding_type_no_conversion		\
+   || (((coding)->type == coding_type_emacs_mule	\
+	|| (coding)->type == coding_type_undecided	\
+	|| (coding)->type == coding_type_raw_text)	\
+       && ((coding)->eol_type == CODING_EOL_LF		\
+	   || (coding)->eol_type == CODING_EOL_UNDECIDED)))
 
 /* Index for each coding category in `coding_category_table' */
 #define CODING_CATEGORY_IDX_EMACS_MULE	0
@@ -351,8 +360,9 @@
 #define CODING_CATEGORY_IDX_ISO_7_ELSE	5
 #define CODING_CATEGORY_IDX_ISO_8_ELSE	6
 #define CODING_CATEGORY_IDX_BIG5	7
-#define CODING_CATEGORY_IDX_BINARY	8
-#define CODING_CATEGORY_IDX_MAX		9
+#define CODING_CATEGORY_IDX_RAW_TEXT	8
+#define CODING_CATEGORY_IDX_BINARY	9
+#define CODING_CATEGORY_IDX_MAX		10
 
 /* Definitions of flag bits returned by the function
    detect_coding_mask ().  */
@@ -363,6 +373,7 @@
 #define CODING_CATEGORY_MASK_ISO_8_2	(1 << CODING_CATEGORY_IDX_ISO_8_2)
 #define CODING_CATEGORY_MASK_ISO_7_ELSE	(1 << CODING_CATEGORY_IDX_ISO_7_ELSE)
 #define CODING_CATEGORY_MASK_ISO_8_ELSE	(1 << CODING_CATEGORY_IDX_ISO_8_ELSE)
+#define CODING_CATEGORY_MASK_RAW_TEXT	(1 << CODING_CATEGORY_IDX_RAW_TEXT)
 #define CODING_CATEGORY_MASK_BIG5	(1 << CODING_CATEGORY_IDX_BIG5)
 #define CODING_CATEGORY_MASK_BINARY	(1 << CODING_CATEGORY_IDX_BINARY)