/* 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.
#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'. */
int initial_designation[4];
/* A graphic register to which each charset should be designated. */
- char requested_designation[MAX_CHARSET];
+ 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. */
#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) \
- CODING_SPEC_ISO_DESIGNATION \
- (coding, CODING_SPEC_ISO_INVOCATION (coding, plane))
+#define CODING_SPEC_ISO_PLANE_CHARSET(coding, plane) \
+ ((CODING_SPEC_ISO_INVOCATION (coding, plane) < 0) \
+ ? -1 \
+ : CODING_SPEC_ISO_DESIGNATION (coding, \
+ CODING_SPEC_ISO_INVOCATION (coding, plane)))
/*** BIG5 section ***/
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. */
#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. */
additional conversion. */
Lisp_Object pre_write_conversion;
+ /* 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
not include a text which is not processed because of short of
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. */
|| 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
/* 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)
/* 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 \
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;
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