/* Header for coding system handler.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Lisp_Object, ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t, Lisp_Object);
+#if defined (WINDOWSNT) || defined (CYGWIN)
+
+/* These functions use Lisp string objects to store the UTF-16LE
+ strings that modern versions of Windows expect. These strings are
+ not particularly useful to Lisp, and all Lisp strings should be
+ native Emacs multibyte. */
+
+/* Access the wide-character string stored in a Lisp string object. */
+#define WCSDATA(x) ((wchar_t *) SDATA (x))
+
+/* Convert the multi-byte string in STR to UTF-16LE encoded unibyte
+ string, and store it in *BUF. BUF may safely point to STR on entry. */
+extern wchar_t *to_unicode (Lisp_Object str, Lisp_Object *buf);
+
+/* Convert STR, a UTF-16LE encoded string embedded in a unibyte string
+ object, to a multi-byte Emacs string and return it. This function
+ calls code_convert_string_norecord internally and has all its
+ failure modes. STR itself is not modified. */
+extern Lisp_Object from_unicode (Lisp_Object str);
+
+#endif /* WINDOWSNT || CYGWIN */
+
/* Macros for backward compatibility. */
#define decode_coding_region(coding, from, to) \
extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided;
extern Lisp_Object Qbuffer_file_coding_system;
-extern Lisp_Object Qunix, Qdos, Qmac;
+extern Lisp_Object Qunix, Qdos;
extern Lisp_Object Qtranslation_table;
extern Lisp_Object Qtranslation_table_id;