dp = readdir (d);
if (!dp) break;
- /* #### This is a bad idea, because d_name can contain
- control characters, which can make XEmacs crash. This
- should be handled properly with FORMAT_FILENAME. */
+ /* Cast to Bufbyte* is OK, as readdir() Mule-encapsulates. */
d_name = (Bufbyte *) dp->d_name;
len = NAMLEN (dp);
cclen = bytecount_to_charcount (d_name, len);
}
\f
+
+/* The *pwent() functions do not exist on NT */
+#ifndef WINDOWSNT
+
static Lisp_Object user_name_completion (Lisp_Object user,
int all_flag,
int *uniq);
return Qt;
return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize));
}
+#endif /* ! defined WINDOWSNT */
\f
Lisp_Object
{
Bytecount len = NAMLEN (dp);
if (DIRENTRY_NONEMPTY (dp))
- Fputhash (make_ext_string ((Bufbyte *) dp->d_name, len,
- FORMAT_FILENAME), Qt, hash);
+ /* Cast to Bufbyte* is OK, as readdir() Mule-encapsulates. */
+ Fputhash (make_string ((Bufbyte *) dp->d_name, len), Qt, hash);
}
closedir (d);
}
DEFSUBR (Fdirectory_files);
DEFSUBR (Ffile_name_completion);
DEFSUBR (Ffile_name_all_completions);
+#ifndef WINDOWSNT
DEFSUBR (Fuser_name_completion);
DEFSUBR (Fuser_name_completion_1);
DEFSUBR (Fuser_name_all_completions);
+#endif
DEFSUBR (Ffile_attributes);
}