/* 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) \
+ (! NILP (Vlocale_coding_system) \
+ && XFASTINT (Vlocale_coding_system) != 0 \
+ ? code_convert_string_norecord (str, Vlocale_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) \
+ (! NILP (Vlocale_coding_system) \
+ && XFASTINT (Vlocale_coding_system) != 0 \
+ ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \
: str)
-#endif
+
+#else /* WINDOWSNT */
+
+#define ENCODE_SYSTEM(str) string_make_unibyte(str)
+#define DECODE_SYSTEM(name) name
+
+#endif /* !WINDOWSNT */
/* Extern declarations. */
-extern int decode_coding P_ ((struct coding_system *, unsigned char *,
+extern int decode_coding P_ ((struct coding_system *, const unsigned char *,
unsigned char *, int, int));
-extern int encode_coding P_ ((struct coding_system *, unsigned char *,
+extern int encode_coding P_ ((struct coding_system *, const unsigned char *,
unsigned char *, int, int));
extern void coding_save_composition P_ ((struct coding_system *, int, int,
Lisp_Object));
Lisp_Object));
extern int code_convert_region P_ ((int, int, int, int, struct coding_system *,
int, int));
+extern Lisp_Object run_pre_post_conversion_on_str P_ ((Lisp_Object,
+ struct coding_system *,
+ 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 void detect_coding P_ ((struct coding_system *, const unsigned char *,
+ int));
+extern void detect_eol P_ ((struct coding_system *, const unsigned char *,
+ 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));
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;
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
/* Error signaled when there's a problem with detecting coding system */