]> code.delx.au - gnu-emacs/blobdiff - src/coding.h
*** empty log message ***
[gnu-emacs] / src / coding.h
index 8522e6329743bd55756c955d4d9c8fad54afb7c6..78a7d4aac047579775983884b0ce8bfd0767c8cd 100644 (file)
@@ -1,7 +1,7 @@
 /* Header for coding system handler.
    Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
-   Licensed to the Free Software Foundation.
-   Copyright (C) 2001, 2002
+     Licensed to the Free Software Foundation.
+   Copyright (C) 2003
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H13PRO009
 
@@ -39,6 +39,7 @@ enum define_coding_system_arg_index
     coding_arg_post_read_conversion,
     coding_arg_pre_write_conversion,
     coding_arg_default_char,
+    coding_arg_for_unibyte,
     coding_arg_plist,
     coding_arg_eol_type,
     coding_arg_max
@@ -118,6 +119,7 @@ enum coding_attr_index
     coding_attr_post_read,
     coding_attr_pre_write,
     coding_attr_default_char,
+    coding_attr_for_unibyte,
     coding_attr_plist,
 
     coding_attr_category,
@@ -155,7 +157,7 @@ enum coding_attr_index
 #define CODING_ATTR_POST_READ(attrs)   AREF (attrs, coding_attr_post_read)
 #define CODING_ATTR_PRE_WRITE(attrs)   AREF (attrs, coding_attr_pre_write)
 #define CODING_ATTR_DEFAULT_CHAR(attrs)        AREF (attrs, coding_attr_default_char)
-#define CODING_ATTR_DIRECTION(attrs)   AREF (attrs, coding_attr_direction)
+#define CODING_ATTR_FOR_UNIBYTE(attrs) AREF (attrs, coding_attr_for_unibyte)
 #define CODING_ATTR_FLUSHING(attrs)    AREF (attrs, coding_attr_flushing)
 #define CODING_ATTR_PLIST(attrs)       AREF (attrs, coding_attr_plist)
 #define CODING_ATTR_CATEGORY(attrs)    AREF (attrs, coding_attr_category)
@@ -184,10 +186,10 @@ enum coding_attr_index
 #define CODING_SYSTEM_P(coding_system_symbol)  \
   (! NILP (CODING_SYSTEM_SPEC (coding_system_symbol)))
 
-#define  CHECK_CODING_SYSTEM(x)                                \
+#define CHECK_CODING_SYSTEM(x)                         \
   do {                                                 \
     if (!CODING_SYSTEM_P (x))                          \
-      x = wrong_type_argument (Qcoding_system_p, (x)); \
+      wrong_type_argument (Qcoding_system_p, (x));     \
   } while (0)
 
 
@@ -364,7 +366,7 @@ struct coding_system
 
   EMACS_INT src_pos, src_pos_byte, src_chars, src_bytes;
   Lisp_Object src_object;
-  unsigned char *source;
+  const unsigned char *source;
 
   EMACS_INT dst_pos, dst_pos_byte, dst_bytes;
   Lisp_Object dst_object;
@@ -600,6 +602,8 @@ extern void encode_coding_object P_ ((struct coding_system *,
 extern Lisp_Object preferred_coding_system P_ (());
 
 
+extern Lisp_Object Qutf_8, Qutf_8_emacs;
+
 extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index;
 extern Lisp_Object Qcoding_system_p;
 extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided;
@@ -658,6 +662,10 @@ extern Lisp_Object Vdefault_process_coding_system;
    system.  */
 extern Lisp_Object Vselect_safe_coding_system_function;
 
+/* If nonzero, on writing a file, Vselect_safe_coding_system_function
+   is called even if Vcoding_system_for_write is non-nil.  */
+extern int coding_system_require_warning;
+
 /* Coding system for file names, or nil if none.  */
 extern Lisp_Object Vfile_name_coding_system;