Mercurial > hg > xemacs-beta
diff src/dired.c @ 377:d883f39b8495 r21-2b4
Import from CVS: tag r21-2b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:05:42 +0200 |
parents | 6240c7796c7a |
children | 8626e4521993 |
line wrap: on
line diff
--- a/src/dired.c Mon Aug 13 11:04:53 2007 +0200 +++ b/src/dired.c Mon Aug 13 11:05:42 2007 +0200 @@ -376,9 +376,7 @@ 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); @@ -531,6 +529,10 @@ } + +/* The *pwent() functions do not exist on NT */ +#ifndef WINDOWSNT + static Lisp_Object user_name_completion (Lisp_Object user, int all_flag, int *uniq); @@ -775,6 +777,7 @@ return Qt; return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize)); } +#endif /* ! defined WINDOWSNT */ Lisp_Object @@ -791,8 +794,8 @@ { 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); } @@ -938,9 +941,11 @@ 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); }