]> code.delx.au - gnu-emacs/blobdiff - src/dired.c
(gc_cons_threshold): Not static.
[gnu-emacs] / src / dired.c
index e833ceb216bdce411cc3542678f53d09feca7f26..55f96d288886b67dde7fd9cdbc9fdf696fd3d9a5 100644 (file)
@@ -1,5 +1,5 @@
 /* Lisp functions for making directory listings.
 /* Lisp functions for making directory listings.
-   Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004
+   Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004, 2005
      Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
      Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -16,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 
 #include <config.h>
 
 
 #include <config.h>
@@ -26,10 +26,10 @@ Boston, MA 02111-1307, USA.  */
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#ifdef VMS
-#include "vms-pwd.h"
-#else
+#ifdef HAVE_PWD_H
 #include <pwd.h>
 #include <pwd.h>
+#endif
+#ifndef VMS
 #include <grp.h>
 #endif
 
 #include <grp.h>
 #endif
 
@@ -114,7 +114,6 @@ extern void filemodestring P_ ((struct stat *, char *));
 
 extern int completion_ignore_case;
 extern Lisp_Object Vcompletion_regexp_list;
 
 extern int completion_ignore_case;
 extern Lisp_Object Vcompletion_regexp_list;
-extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system;
 
 Lisp_Object Vcompletion_ignored_extensions;
 Lisp_Object Qcompletion_ignore_case;
 
 Lisp_Object Vcompletion_ignored_extensions;
 Lisp_Object Qcompletion_ignore_case;
@@ -401,7 +400,7 @@ DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion,
 Returns the longest string
 common to all file names in DIRECTORY that start with FILE.
 If there is only one and FILE matches it exactly, returns t.
 Returns the longest string
 common to all file names in DIRECTORY that start with FILE.
 If there is only one and FILE matches it exactly, returns t.
-Returns nil if DIR contains no name starting with FILE.
+Returns nil if DIRECTORY contains no name starting with FILE.
 
 This function ignores some of the possible completions as
 determined by the variable `completion-ignored-extensions', which see.  */)
 
 This function ignores some of the possible completions as
 determined by the variable `completion-ignored-extensions', which see.  */)
@@ -907,6 +906,7 @@ Elements of the attribute list are:
 #endif
   char modes[10];
   Lisp_Object handler;
 #endif
   char modes[10];
   Lisp_Object handler;
+  struct gcpro gcpro1;
 
   filename = Fexpand_file_name (filename, Qnil);
 
 
   filename = Fexpand_file_name (filename, Qnil);
 
@@ -922,7 +922,9 @@ Elements of the attribute list are:
        return call3 (handler, Qfile_attributes, filename, id_format);
     }
 
        return call3 (handler, Qfile_attributes, filename, id_format);
     }
 
+  GCPRO1 (filename);
   encoded = ENCODE_FILE (filename);
   encoded = ENCODE_FILE (filename);
+  UNGCPRO;
 
   if (lstat (SDATA (encoded), &s) < 0)
     return Qnil;
 
   if (lstat (SDATA (encoded), &s) < 0)
     return Qnil;