]> code.delx.au - gnu-emacs/blobdiff - src/coding.h
*** empty log message ***
[gnu-emacs] / src / coding.h
index ee86cd6ac12f84e3ddf25f351687d8b53f8eafc3..b4e2668622992d6bfec36c8db0f41490e0f9e137 100644 (file)
@@ -1,7 +1,10 @@
 /* Header for coding system handler.
-   Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-   Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
-   Licensed to the Free Software Foundation.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005,
+                 2006, 2007  Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+     2005, 2006, 2007
+     National Institute of Advanced Industrial Science and Technology (AIST)
+     Registration Number H14PRO021
 
 This file is part of GNU Emacs.
 
@@ -441,10 +444,12 @@ struct coding_system
   Lisp_Object translation_table_for_encode;
 };
 
-#define CODING_REQUIRE_FLUSHING_MASK   1
-#define CODING_REQUIRE_DECODING_MASK   2
-#define CODING_REQUIRE_ENCODING_MASK   4
-#define CODING_REQUIRE_DETECTION_MASK  8
+/* Mask bits for (struct coding_system *)->common_flags.  */
+#define CODING_REQUIRE_FLUSHING_MASK   0x01
+#define CODING_REQUIRE_DECODING_MASK   0x02
+#define CODING_REQUIRE_ENCODING_MASK   0x04
+#define CODING_REQUIRE_DETECTION_MASK  0x08
+#define CODING_ASCII_INCOMPATIBLE_MASK 0x10
 
 /* Return 1 if the coding system CODING requires specific code to be
    attached at the tail of converted text.  */
@@ -458,7 +463,10 @@ struct coding_system
    || (coding)->common_flags & CODING_REQUIRE_DECODING_MASK)
 
 /* Return 1 if the coding system CODING requires code conversion on
-   encoding.  */
+   encoding.
+   The non-multibyte part of the condition is to support encoding of
+   unibyte strings/buffers generated by string-as-unibyte or
+   (set-buffer-multibyte nil) from multibyte strings/buffers.  */
 #define CODING_REQUIRE_ENCODING(coding)        \
   ((coding)->src_multibyte             \
    || (coding)->common_flags & CODING_REQUIRE_ENCODING_MASK)
@@ -601,7 +609,7 @@ struct coding_system
 
 /* Decode the string STR using the specified coding system
    for system functions, if any.  */
-#define DECODE_SYSTEM(name)                                               \
+#define DECODE_SYSTEM(str)                                                \
   (! NILP (Vlocale_coding_system)                                         \
    && !EQ (Vlocale_coding_system, make_number (0))                        \
    ? code_convert_string_norecord (str, Vlocale_coding_system, 0)         \
@@ -628,7 +636,7 @@ extern int code_convert_region P_ ((int, int, int, int, struct coding_system *,
 extern Lisp_Object run_pre_post_conversion_on_str P_ ((Lisp_Object,
                                                       struct coding_system *,
                                                       int));
-extern void run_pre_write_conversin_on_c_str P_ ((unsigned char **, int *, 
+extern void run_pre_write_conversin_on_c_str P_ ((unsigned char **, int *,
                                                  int, int,
                                                  struct coding_system *));
 
@@ -664,9 +672,12 @@ extern Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac;
 /* Mnemonic string to indicate type of end-of-line is not yet decided.  */
 extern Lisp_Object eol_mnemonic_undecided;
 
+/* Format of end-of-line decided by system.  */
+extern int system_eol_type;
+
 #ifdef emacs
 extern Lisp_Object Qfile_coding_system;
-extern Lisp_Object Qcall_process, Qcall_process_region, Qprocess_argument;
+extern Lisp_Object Qcall_process, Qcall_process_region;
 extern Lisp_Object Qstart_process, Qopen_network_stream;
 extern Lisp_Object Qwrite_region;