]> code.delx.au - gnu-emacs/blobdiff - src/coding.h
Fix docstring of format-time-string to include %F.
[gnu-emacs] / src / coding.h
index 7b7078e06fa9ffdb046e3e577a63099ae12d64e6..5a921e449509b94b2cb7979ac2a160a96f4a50ed 100644 (file)
@@ -378,8 +378,6 @@ struct emacs_mule_spec
   struct composition_status cmp_status;
 };
 
-struct ccl_spec;
-
 struct undecided_spec
 {
   /* Inhibit null byte detection.  1 means always inhibit,
@@ -514,6 +512,10 @@ struct coding_system
      `charbuf', but at `src_object'.  */
   unsigned chars_at_source : 1;
 
+  /* Nonzero if the result of conversion is in `destination'
+     buffer rather than in `dst_object'.  */
+  unsigned raw_destination : 1;
+
   /* Set to 1 if charbuf contains an annotation.  */
   unsigned annotated : 1;
 
@@ -668,14 +670,16 @@ struct coding_system
     (code) = (s1 << 8) | s2;                           \
   } while (0)
 
-/* Encode the file name NAME using the specified coding system
-   for file names, if any.  */
-#define ENCODE_FILE(name)                                                 \
-  (! NILP (Vfile_name_coding_system)                                      \
-   ? code_convert_string_norecord (name, Vfile_name_coding_system, 1)     \
-   : (! NILP (Vdefault_file_name_coding_system)                                   \
-      ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
-      : name))
+/* Encode the file name NAME using the specified coding system for
+   file names, if any.  If NAME is a unibyte string, return NAME.  */
+#define ENCODE_FILE(name)                                              \
+    (! STRING_MULTIBYTE (name)                                         \
+     ? name                                                            \
+     : (! NILP (Vfile_name_coding_system)                              \
+       ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \
+       : (! NILP (Vdefault_file_name_coding_system)                    \
+          ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
+          : name)))
 
 
 /* Decode the file name NAME using the specified coding system