comparison src/file-coding.h @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children 3078fd1074e8
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
22 /* Synched up with: Mule 2.3. Not in FSF. */ 22 /* Synched up with: Mule 2.3. Not in FSF. */
23 23
24 /* 91.10.09 written by K.Handa <handa@etl.go.jp> */ 24 /* 91.10.09 written by K.Handa <handa@etl.go.jp> */
25 /* Rewritten by Ben Wing <ben@xemacs.org>. */ 25 /* Rewritten by Ben Wing <ben@xemacs.org>. */
26 26
27 #ifndef _XEMACS_MULE_CODING_H_ 27 #ifndef INCLUDED_file_coding_h_
28 #define _XEMACS_MULE_CODING_H_ 28 #define INCLUDED_file_coding_h_
29 29
30 struct decoding_stream; 30 struct decoding_stream;
31 struct encoding_stream; 31 struct encoding_stream;
32 32
33 /* Coding system types. These go into the TYPE field of a 33 /* Coding system types. These go into the TYPE field of a
34 struct Lisp_Coding_System. */ 34 Lisp_Coding_System. */
35 35
36 enum coding_system_type 36 enum coding_system_type
37 { 37 {
38 CODESYS_AUTODETECT, /* Automatic conversion. */ 38 CODESYS_AUTODETECT, /* Automatic conversion. */
39 #ifdef MULE 39 #ifdef MULE
82 struct Lisp_Coding_System 82 struct Lisp_Coding_System
83 { 83 {
84 struct lcrecord_header header; 84 struct lcrecord_header header;
85 85
86 /* Name and doc string of this coding system. */ 86 /* Name and doc string of this coding system. */
87 Lisp_Object name, doc_string; 87 Lisp_Object name;
88 Lisp_Object doc_string;
88 89
89 /* This is the major type of the coding system -- one of Big5, ISO2022, 90 /* This is the major type of the coding system -- one of Big5, ISO2022,
90 Shift-JIS, etc. See the constants above. */ 91 Shift-JIS, etc. See the constants above. */
91 enum coding_system_type type; 92 enum coding_system_type type;
92 93
93 /* Mnemonic string displayed in the modeline when this coding 94 /* Mnemonic string displayed in the modeline when this coding
94 system is active for a particular buffer. */ 95 system is active for a particular buffer. */
95 Lisp_Object mnemonic; 96 Lisp_Object mnemonic;
96 97
97 Lisp_Object post_read_conversion, pre_write_conversion; 98 Lisp_Object post_read_conversion;
99 Lisp_Object pre_write_conversion;
98 100
99 eol_type_t eol_type; 101 eol_type_t eol_type;
100 102
101 /* Subsidiary coding systems that specify a particular type of EOL 103 /* Subsidiary coding systems that specify a particular type of EOL
102 marking, rather than autodetecting it. These will only be non-nil 104 marking, rather than autodetecting it. These will only be non-nil
103 if (eol_type == EOL_AUTODETECT). */ 105 if (eol_type == EOL_AUTODETECT). */
104 Lisp_Object eol_lf, eol_crlf, eol_cr; 106 Lisp_Object eol_lf;
107 Lisp_Object eol_crlf;
108 Lisp_Object eol_cr;
105 #ifdef MULE 109 #ifdef MULE
106 struct 110 struct
107 { 111 {
108 /* What are the charsets to be initially designated to G0, G1, 112 /* What are the charsets to be initially designated to G0, G1,
109 G2, G3? If t, no charset is initially designated. If nil, 113 G2, G3? If t, no charset is initially designated. If nil,
128 } iso2022; 132 } iso2022;
129 struct 133 struct
130 { 134 {
131 /* For a CCL coding system, these specify the CCL programs used for 135 /* For a CCL coding system, these specify the CCL programs used for
132 decoding (input) and encoding (output). */ 136 decoding (input) and encoding (output). */
133 Lisp_Object decode, encode; 137 Lisp_Object decode;
138 Lisp_Object encode;
134 } ccl; 139 } ccl;
135 #endif 140 #endif
136 }; 141 };
137 typedef struct Lisp_Coding_System Lisp_Coding_System; 142 typedef struct Lisp_Coding_System Lisp_Coding_System;
138 143
139 DECLARE_LRECORD (coding_system, struct Lisp_Coding_System); 144 DECLARE_LRECORD (coding_system, Lisp_Coding_System);
140 #define XCODING_SYSTEM(x) XRECORD (x, coding_system, struct Lisp_Coding_System) 145 #define XCODING_SYSTEM(x) XRECORD (x, coding_system, Lisp_Coding_System)
141 #define XSETCODING_SYSTEM(x, p) XSETRECORD (x, p, coding_system) 146 #define XSETCODING_SYSTEM(x, p) XSETRECORD (x, p, coding_system)
142 #define CODING_SYSTEMP(x) RECORDP (x, coding_system) 147 #define CODING_SYSTEMP(x) RECORDP (x, coding_system)
143 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system) 148 #define CHECK_CODING_SYSTEM(x) CHECK_RECORD (x, coding_system)
144 #define CONCHECK_CODING_SYSTEM(x) CONCHECK_RECORD (x, coding_system) 149 #define CONCHECK_CODING_SYSTEM(x) CONCHECK_RECORD (x, coding_system)
145 150
249 EXFUN (Fsubsidiary_coding_system, 2); 254 EXFUN (Fsubsidiary_coding_system, 2);
250 255
251 extern Lisp_Object Qucs4, Qutf8; 256 extern Lisp_Object Qucs4, Qutf8;
252 extern Lisp_Object Qbig5, Qccl, Qcharset_g0; 257 extern Lisp_Object Qbig5, Qccl, Qcharset_g0;
253 extern Lisp_Object Qcharset_g1, Qcharset_g2, Qcharset_g3, Qcoding_system_error; 258 extern Lisp_Object Qcharset_g1, Qcharset_g2, Qcharset_g3, Qcoding_system_error;
254 extern Lisp_Object Qcoding_systemp, Qcr, Qcrlf, Qctext, Qdecode, Qencode; 259 extern Lisp_Object Qcoding_systemp, Qcr, Qcrlf, Qdecode, Qencode;
255 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qescape_quoted; 260 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qescape_quoted;
256 extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output; 261 extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output;
257 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output; 262 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output;
258 extern Lisp_Object Qinput_charset_conversion, Qiso2022, Qlf, Qlock_shift; 263 extern Lisp_Object Qinput_charset_conversion, Qiso2022, Qlf, Qlock_shift;
259 extern Lisp_Object Qmnemonic, Qno_ascii_cntl, Qno_ascii_eol, Qno_conversion; 264 extern Lisp_Object Qmnemonic, Qno_ascii_cntl, Qno_ascii_eol, Qno_conversion;
513 #define LEADING_BYTE_LATIN_ISO8859_1 0x81 /* Right half of ISO 8859-1 */ 518 #define LEADING_BYTE_LATIN_ISO8859_1 0x81 /* Right half of ISO 8859-1 */
514 #define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20) 519 #define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20)
515 #define BUFBYTE_FIRST_BYTE_P(c) ((c) < 0xA0) 520 #define BUFBYTE_FIRST_BYTE_P(c) ((c) < 0xA0)
516 #define BUFBYTE_LEADING_BYTE_P(c) BYTE_C1_P (c) 521 #define BUFBYTE_LEADING_BYTE_P(c) BYTE_C1_P (c)
517 #endif /* not MULE */ 522 #endif /* not MULE */
518 #endif /* _XEMACS_MULE_CODING_H_ */ 523
519 524 #endif /* INCLUDED_file_coding_h_ */
525