comparison src/dired.c @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 2f8bb876ab1d
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
301 301
302 GCPRO3 (file, directory, bestmatch); 302 GCPRO3 (file, directory, bestmatch);
303 303
304 CHECK_STRING (file); 304 CHECK_STRING (file);
305 305
306 #ifdef WINDOWSNT 306 #ifdef WIN32_NATIVE
307 /* Filename completion on Windows ignores case, since Windows 307 /* Filename completion on Windows ignores case, since Windows
308 filesystems do. */ 308 filesystems do. */
309 specbind (Qcompletion_ignore_case, Qt); 309 specbind (Qcompletion_ignore_case, Qt);
310 #endif /* WINDOWSNT */ 310 #endif /* WIN32_NATIVE */
311 311
312 #ifdef FILE_SYSTEM_CASE 312 #ifdef FILE_SYSTEM_CASE
313 file = FILE_SYSTEM_CASE (file); 313 file = FILE_SYSTEM_CASE (file);
314 #endif 314 #endif
315 directory = Fexpand_file_name (directory, Qnil); 315 directory = Fexpand_file_name (directory, Qnil);
506 } 506 }
507 507
508 508
509 509
510 /* The *pwent() functions do not exist on NT */ 510 /* The *pwent() functions do not exist on NT */
511 #ifndef WINDOWSNT 511 #ifndef WIN32_NATIVE
512 512
513 static Lisp_Object user_name_completion (Lisp_Object user, 513 static Lisp_Object user_name_completion (Lisp_Object user,
514 int all_flag, 514 int all_flag,
515 int *uniq); 515 int *uniq);
516 516
705 return bestmatch; 705 return bestmatch;
706 if (matchcount == 1 && bestmatchsize == user_name_length) 706 if (matchcount == 1 && bestmatchsize == user_name_length)
707 return Qt; 707 return Qt;
708 return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize)); 708 return Fsubstring (bestmatch, Qzero, make_int (bestmatchsize));
709 } 709 }
710 #endif /* ! defined WINDOWSNT */ 710 #endif /* ! defined WIN32_NATIVE */
711 711
712 712
713 Lisp_Object 713 Lisp_Object
714 make_directory_hash_table (const char *path) 714 make_directory_hash_table (const char *path)
715 { 715 {
794 794
795 #ifdef BSD4_2 795 #ifdef BSD4_2
796 directory = Ffile_name_directory (filename); 796 directory = Ffile_name_directory (filename);
797 #endif 797 #endif
798 798
799 #ifdef MSDOS 799 #if 0 /* #### shouldn't this apply to WIN32_NATIVE and maybe CYGWIN? */
800 { 800 {
801 char *tmpnam = (char *) XSTRING_DATA (Ffile_name_nondirectory (filename)); 801 char *tmpnam = (char *) XSTRING_DATA (Ffile_name_nondirectory (filename));
802 int l = strlen (tmpnam); 802 int l = strlen (tmpnam);
803 803
804 if (l >= 5 804 if (l >= 5
808 stricmp (&tmpnam[l - 4], ".bat") == 0)) 808 stricmp (&tmpnam[l - 4], ".bat") == 0))
809 { 809 {
810 s.st_mode |= S_IEXEC; 810 s.st_mode |= S_IEXEC;
811 } 811 }
812 } 812 }
813 #endif /* MSDOS */ 813 #endif
814 814
815 switch (s.st_mode & S_IFMT) 815 switch (s.st_mode & S_IFMT)
816 { 816 {
817 default: 817 default:
818 values[0] = Qnil; 818 values[0] = Qnil;
871 defsymbol (&Qfile_attributes, "file-attributes"); 871 defsymbol (&Qfile_attributes, "file-attributes");
872 872
873 DEFSUBR (Fdirectory_files); 873 DEFSUBR (Fdirectory_files);
874 DEFSUBR (Ffile_name_completion); 874 DEFSUBR (Ffile_name_completion);
875 DEFSUBR (Ffile_name_all_completions); 875 DEFSUBR (Ffile_name_all_completions);
876 #ifndef WINDOWSNT 876 #ifndef WIN32_NATIVE
877 DEFSUBR (Fuser_name_completion); 877 DEFSUBR (Fuser_name_completion);
878 DEFSUBR (Fuser_name_completion_1); 878 DEFSUBR (Fuser_name_completion_1);
879 DEFSUBR (Fuser_name_all_completions); 879 DEFSUBR (Fuser_name_all_completions);
880 #endif 880 #endif
881 DEFSUBR (Ffile_attributes); 881 DEFSUBR (Ffile_attributes);