/* Cygwin support routines.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "buffer.h"
#include <unistd.h>
#include <fcntl.h>
-static Lisp_Object Qutf_16_le;
+static Lisp_Object Qutf_16le;
static Lisp_Object
fchdir_unwind (Lisp_Object dir_fd)
str = Fsubstring (str, make_number (0), make_number (-1));
}
- return code_convert_string_norecord (str, Qutf_16_le, 0);
+ return code_convert_string_norecord (str, Qutf_16le, 0);
}
wchar_t *
to_unicode (Lisp_Object str, Lisp_Object *buf)
{
- *buf = code_convert_string_norecord (str, Qutf_16_le, 1);
+ *buf = code_convert_string_norecord (str, Qutf_16le, 1);
/* We need to make a another copy (in addition to the one made by
code_convert_string_norecord) to ensure that the final string is
_doubly_ zero terminated --- that is, that the string is
(Lisp_Object path, Lisp_Object absolute_p)
{
return from_unicode (
- conv_filename_to_w32_unicode (path, absolute_p == Qnil ? 0 : 1));
+ conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1));
}
DEFUN ("cygwin-convert-path-from-windows",
(Lisp_Object path, Lisp_Object absolute_p)
{
return conv_filename_from_w32_unicode (to_unicode (path, &path),
- absolute_p == Qnil ? 0 : 1);
+ EQ (absolute_p, Qnil) ? 0 : 1);
}
void
syms_of_cygw32 (void)
{
/* No, not utf-16-le: that one has a BOM. */
- DEFSYM (Qutf_16_le, "utf-16le");
+ DEFSYM (Qutf_16le, "utf-16le");
defsubr (&Scygwin_convert_path_from_windows);
defsubr (&Scygwin_convert_path_to_windows);
}