]> code.delx.au - gnu-emacs/blobdiff - src/coding.h
(main): Change `#ifdef HAVE_CARBON' to `#if defined (MAC_OSX) &&
[gnu-emacs] / src / coding.h
index f0a5fa4c04ea6573c9e026ef87ea0d85b5722ca4..3d9e143ff3d6b16eab7d2f362075aa4860451fd0 100644 (file)
@@ -1,4 +1,5 @@
 /* Header for coding system handler.
+   Copyright (C) 2004  Free Software Foundation, Inc.
    Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
    Licensed to the Free Software Foundation.
 
@@ -572,10 +573,10 @@ struct coding_system
    for file names, if any.  */
 #define ENCODE_FILE(name)                                                 \
   (! NILP (Vfile_name_coding_system)                                      \
-   && XFASTINT (Vfile_name_coding_system) != 0                            \
+   && !EQ (Vfile_name_coding_system, make_number (0))                     \
    ? code_convert_string_norecord (name, Vfile_name_coding_system, 1)     \
    : (! NILP (Vdefault_file_name_coding_system)                                   \
-      && XFASTINT (Vdefault_file_name_coding_system) != 0                 \
+      && !EQ (Vdefault_file_name_coding_system, make_number (0))          \
       ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
       : name))
 
@@ -583,10 +584,10 @@ struct coding_system
    for file names, if any.  */
 #define DECODE_FILE(name)                                                 \
   (! NILP (Vfile_name_coding_system)                                      \
-   && XFASTINT (Vfile_name_coding_system) != 0                            \
+   && !EQ (Vfile_name_coding_system, make_number (0))                     \
    ? code_convert_string_norecord (name, Vfile_name_coding_system, 0)     \
    : (! NILP (Vdefault_file_name_coding_system)                                   \
-      && XFASTINT (Vdefault_file_name_coding_system) != 0                 \
+      && !EQ (Vdefault_file_name_coding_system, make_number (0))          \
       ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \
       : name))
 
@@ -595,7 +596,7 @@ struct coding_system
    for w32 system functions, if any.  */
 #define ENCODE_SYSTEM(str)                                                \
   (! NILP (Vlocale_coding_system)                                         \
-   && XFASTINT (Vlocale_coding_system) != 0                               \
+   && !EQ (Vlocale_coding_system, make_number (0))                        \
    ? code_convert_string_norecord (str, Vlocale_coding_system, 1)         \
    : str)
 
@@ -603,7 +604,7 @@ struct coding_system
    for w32 system functions, if any.  */
 #define DECODE_SYSTEM(name)                                               \
   (! NILP (Vlocale_coding_system)                                         \
-   && XFASTINT (Vlocale_coding_system) != 0                               \
+   && !EQ (Vlocale_coding_system, make_number (0))                        \
    ? code_convert_string_norecord (str, Vlocale_coding_system, 0)         \
    : str)
 
@@ -614,6 +615,8 @@ struct coding_system
 
 #endif /* !WINDOWSNT */
 
+#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1)
+
 /* Extern declarations.  */
 extern int decode_coding P_ ((struct coding_system *, const unsigned char *,
                              unsigned char *, int, int));
@@ -633,6 +636,10 @@ 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 *, 
+                                                 int, int,
+                                                 struct coding_system *));
+
 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 *, const unsigned char *,
@@ -655,6 +662,7 @@ extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index;
 extern Lisp_Object Qraw_text, Qemacs_mule;
 extern Lisp_Object Qbuffer_file_coding_system;
 extern Lisp_Object Vcoding_category_list;
+extern Lisp_Object Qutf_8;
 
 extern Lisp_Object Qtranslation_table;
 extern Lisp_Object Qtranslation_table_id;
@@ -726,3 +734,6 @@ extern Lisp_Object Vdefault_file_name_coding_system;
 extern Lisp_Object Qcoding_system_error;
 
 #endif /* EMACS_CODING_H */
+
+/* arch-tag: 2bc3b4fa-6870-4f64-8135-b962b2d290e4
+   (do not change this comment) */