/* Lisp functions for making directory listings.
- Copyright (C) 1985-1986, 1993-1994, 1999-2013 Free Software
+ Copyright (C) 1985-1986, 1993-1994, 1999-2014 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
#include "regex.h"
#include "blockinput.h"
+#ifdef MSDOS
+#include "msdos.h" /* for fstatat */
+#endif
+
static Lisp_Object Qdirectory_files;
static Lisp_Object Qdirectory_files_and_attributes;
static Lisp_Object Qfile_name_completion;
memcpy (SDATA (fullname) + directory_nbytes + needsep,
SDATA (name), len);
- nchars = chars_in_text (SDATA (fullname), nbytes);
+ nchars = multibyte_chars_in_text (SDATA (fullname), nbytes);
/* Some bug somewhere. */
if (nchars > nbytes)
unblock_input ();
}
if (uname)
- values[2] = DECODE_SYSTEM (build_string (uname));
+ values[2] = DECODE_SYSTEM (build_unibyte_string (uname));
else
values[2] = make_fixnum_or_float (s.st_uid);
if (gname)
- values[3] = DECODE_SYSTEM (build_string (gname));
+ values[3] = DECODE_SYSTEM (build_unibyte_string (gname));
else
values[3] = make_fixnum_or_float (s.st_gid);
values[10] = INTEGER_TO_CONS (s.st_ino);
values[11] = INTEGER_TO_CONS (s.st_dev);
- return Flist (sizeof (values) / sizeof (values[0]), values);
+ return Flist (ARRAYELTS (values), values);
}
DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0,