]> code.delx.au - gnu-emacs/blobdiff - src/coding.h
(Fcoordinates_in_window_p): Convert Fcons arguments to Lisp_Integer.
[gnu-emacs] / src / coding.h
index 43929ad4655c6d3ea70cdaa80ec9bc3953833056..7ac022e942d34d9a0625cfacde7fdc78f0091ce6 100644 (file)
@@ -1,7 +1,6 @@
 /* Header for coding system handler.
-   Ver.1.0
-   Copyright (C) 1995 Free Software Foundation, Inc.
-   Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
+   Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
+   Licensed to the Free Software Foundation.
 
 This file is part of GNU Emacs.
 
@@ -27,7 +26,7 @@ Boston, MA 02111-1307, USA.  */
 #include "../src/ccl.h"
 #endif
 
-/*** EMACS' INTERNAL FORMAT section ***/
+/*** EMACS' INTERNAL FORMAT (emacs-mule) section ***/
 
 /* All code (1-byte) of Emacs' internal format is classified into one
    of the followings.  See also `charset.h'.  */
@@ -149,7 +148,7 @@ struct iso2022_spec
   int initial_designation[4];
 
   /* A graphic register to which each charset should be designated.  */
-  char requested_designation[MAX_CHARSET + 1];
+  unsigned char requested_designation[MAX_CHARSET + 1];
 
   /* Set to 1 temporarily only when graphic register 2 or 3 is invoked
      by single-shift while encoding.  */
@@ -173,6 +172,12 @@ struct iso2022_spec
 #define CODING_SPEC_ISO_BOL(coding) \
   coding->spec.iso2022.bol
 
+/* A value which may appear in
+   coding->spec.iso2022.requested_designation indicating that the
+   corresponding charset does not request any graphic register to be
+   designated.  */
+#define CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION 4
+
 /* Return a charset which is currently designated to the graphic plane
    PLANE in the coding-system CODING.  */
 #define CODING_SPEC_ISO_PLANE_CHARSET(coding, plane)   \
@@ -199,11 +204,11 @@ enum coding_type
     coding_type_no_conversion, /* A coding system which requires no
                                   conversion for reading and writing
                                   including end-of-line format.  */
-    coding_type_internal,      /* A coding system used in Emacs'
+    coding_type_emacs_mule,    /* A coding system used in Emacs'
                                   buffer and string.  Requires no
                                   conversion for reading and writing
                                   except for end-of-line format.  */
-    coding_type_automatic,     /* A coding system which requires
+    coding_type_undecided,     /* A coding system which requires
                                   automatic detection of a real
                                   coding system.  */
     coding_type_sjis,          /* SJIS coding system for Japanese.  */
@@ -220,7 +225,7 @@ enum coding_type
 #define CODING_EOL_CRLF        1       /* Sequence of carriage-return and
                                   line-feed.  */
 #define CODING_EOL_CR  2       /* Carriage-return only.  */
-#define CODING_EOL_AUTOMATIC 3 /* This value is used to denote the
+#define CODING_EOL_UNDECIDED 3 /* This value is used to denote the
                                   eol-type is not yet decided.  */
 
 /* Character composition status while encoding/decoding.  */
@@ -290,8 +295,9 @@ struct coding_system
      additional conversion. */
   Lisp_Object pre_write_conversion;
 
-  /* Character unification table to look up, or nil.  */
-  Lisp_Object character_unification_table;
+  /* Character unification tables to look up, or nil.  */
+  Lisp_Object character_unification_table_for_decode;
+  Lisp_Object character_unification_table_for_encode;
 
   /* Carryover yielded by decoding/encoding incomplete source.  No
      coding-system yields more than 7-byte of carryover.  This does
@@ -307,12 +313,12 @@ struct coding_system
    representation of a visible character (text).  */
 #define CODING_REQUIRE_TEXT_CONVERSION(coding) \
   ((coding)->type != coding_type_no_conversion         \
-   && (coding)->type != coding_type_internal)
+   && (coding)->type != coding_type_emacs_mule)
 
 /* Return 1 if the coding-system CODING requires conversion of the
    format of end-of-line.  */
 #define CODING_REQUIRE_EOL_CONVERSION(coding)  \
-  ((coding)->eol_type != CODING_EOL_AUTOMATIC          \
+  ((coding)->eol_type != CODING_EOL_UNDECIDED          \
    && (coding)->eol_type != CODING_EOL_LF)
 
 /* Return 1 if the coding-system CODING requires some conversion.  */
@@ -321,7 +327,7 @@ struct coding_system
    || CODING_REQUIRE_EOL_CONVERSION (coding))
 
 /* Index for each coding category in `coding_category_table' */
-#define CODING_CATEGORY_IDX_INTERNAL   0
+#define CODING_CATEGORY_IDX_EMACS_MULE 0
 #define CODING_CATEGORY_IDX_SJIS       1
 #define CODING_CATEGORY_IDX_ISO_7      2
 #define CODING_CATEGORY_IDX_ISO_8_1    3
@@ -333,7 +339,7 @@ struct coding_system
 
 /* Definitions of flag bits returned by the function
    detect_coding_mask ().  */
-#define CODING_CATEGORY_MASK_INTERNAL  (1 << CODING_CATEGORY_IDX_INTERNAL)
+#define CODING_CATEGORY_MASK_EMACS_MULE        (1 << CODING_CATEGORY_IDX_EMACS_MULE)
 #define CODING_CATEGORY_MASK_SJIS      (1 << CODING_CATEGORY_IDX_SJIS)
 #define CODING_CATEGORY_MASK_ISO_7     (1 << CODING_CATEGORY_IDX_ISO_7)
 #define CODING_CATEGORY_MASK_ISO_8_1   (1 << CODING_CATEGORY_IDX_ISO_8_1)
@@ -344,7 +350,7 @@ struct coding_system
 /* This value is returned if detect_coding_mask () find nothing other
    than ASCII characters.  */
 #define CODING_CATEGORY_MASK_ANY       \
-  (  CODING_CATEGORY_MASK_INTERNAL     \
+  (  CODING_CATEGORY_MASK_EMACS_MULE   \
    | CODING_CATEGORY_MASK_SJIS         \
    | CODING_CATEGORY_MASK_ISO_7                \
    | CODING_CATEGORY_MASK_ISO_8_1      \
@@ -384,6 +390,7 @@ extern int conversion_buffer_size;
 extern char *conversion_buffer, *get_conversion_buffer ();
 extern Lisp_Object Fcheck_coding_system ();
 extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index;
+extern Lisp_Object Qemacs_mule;
 extern Lisp_Object Qbuffer_file_coding_system;
 extern Lisp_Object Vcoding_category_list;
 
@@ -419,7 +426,8 @@ extern struct coding_system terminal_coding;
    function `set-keyboard-coding-system'.  */
 extern struct coding_system keyboard_coding;
 
-extern Lisp_Object Vcoding_system_alist;
+/* Default coding systems used for process I/O.  */
+extern Lisp_Object Vdefault_process_coding_system;
 
 #endif