the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _CODING_H
-#define _CODING_H
+#ifndef EMACS_CODING_H
+#define EMACS_CODING_H
-#ifndef _CCL_H
#include "ccl.h"
-#endif
/*** EMACS' INTERNAL FORMAT (emacs-mule) section ***/
struct composition_data *prev, *next;
};
-/* Macros used for the member finish_status of the struct
+/* Macros used for the member `result' of the struct
coding_system. */
#define CODING_FINISH_NORMAL 0
#define CODING_FINISH_INSUFFICIENT_SRC 1
CODING_MODE_XXX. */
unsigned int mode;
- /* Table of safe character sets for this coding system. If the Nth
- element is 0, the charset of ID N is not a safe character set.
- Such a character set is not encoded when CODING_ISO_FLAG_SAFE is
- set. */
- unsigned char safe_charsets[MAX_CHARSET + 1];
-
/* The current status of composition handling. */
int composing;
/* Index number of coding category of the coding system. */
int category_idx;
+ /* The following two members specify how characters 128..159 are
+ represented in source and destination text respectively. 1 means
+ they are represented by 2-byte sequence, 0 means they are
+ represented by 1-byte as is (see the comment in charset.h). */
unsigned src_multibyte : 1;
unsigned dst_multibyte : 1;
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \
: name))
+#ifdef WINDOWSNT
+/* Encode the string STR using the specified coding system
+ for w32 system functions, if any. */
+#define ENCODE_SYSTEM(str) \
+ (! NILP (Vw32_system_coding_system) \
+ && XFASTINT (Vw32_system_coding_system) != 0 \
+ ? code_convert_string_norecord (str, Vw32_system_coding_system, 1) \
+ : str)
+
+/* Decode the string STR using the specified coding system
+ for w32 system functions, if any. */
+#define DECODE_SYSTEM(name) \
+ (! NILP (Vw32_system_coding_system) \
+ && XFASTINT (Vw32_system_coding_system) != 0 \
+ ? code_convert_string_norecord (str, Vw32_system_coding_system, 0) \
+ : str)
+#endif
+
/* Extern declarations. */
extern int decode_coding P_ ((struct coding_system *, unsigned char *,
unsigned char *, int, int));
extern void coding_free_composition_data P_ ((struct coding_system *));
extern void coding_adjust_composition_offset P_ ((struct coding_system *,
int));
+extern void coding_allocate_composition_data P_ ((struct coding_system *,
+ int));
+extern void coding_restore_composition P_ ((struct coding_system *,
+ Lisp_Object));
extern int code_convert_region P_ ((int, int, int, int, struct coding_system *,
int, int));
extern int decoding_buffer_size P_ ((struct coding_system *, int));
extern int encoding_buffer_size P_ ((struct coding_system *, int));
extern void detect_coding P_ ((struct coding_system *, unsigned char *, int));
extern void detect_eol P_ ((struct coding_system *, unsigned char *, int));
-extern int conversion_buffer_size;
-extern char *conversion_buffer;
-extern char *get_conversion_buffer P_ ((int));
extern int setup_coding_system P_ ((Lisp_Object, struct coding_system *));
extern Lisp_Object code_convert_string P_ ((Lisp_Object,
struct coding_system *, int, int));
+extern Lisp_Object code_convert_string_norecord P_ ((Lisp_Object, Lisp_Object,
+ int));
extern void setup_raw_text_coding_system P_ ((struct coding_system *));
+extern Lisp_Object encode_coding_string P_ ((Lisp_Object,
+ struct coding_system *, int));
+extern Lisp_Object decode_coding_string P_ ((Lisp_Object,
+ struct coding_system *, int));
extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index;
extern Lisp_Object Qraw_text, Qemacs_mule;
extern Lisp_Object Qbuffer_file_coding_system;
/* Coding system for file names used only when
Vfile_name_coding_system is nil. */
extern Lisp_Object Vdefault_file_name_coding_system;
+
+#ifdef WINDOWSNT
+/* Coding system for w32 system strings, or nil if none. */
+extern Lisp_Object Vw32_system_coding_system;
+#endif
#endif
-#endif /* _CODING_H */
+#endif /* EMACS_CODING_H */