/* Lisp functions for making directory listings.
- Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001
+ Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004
Free Software Foundation, Inc.
This file is part of GNU Emacs.
call the corresponding file handler. */
handler = Ffind_file_name_handler (directory, Qdirectory_files);
if (!NILP (handler))
- {
- Lisp_Object args[6];
-
- args[0] = handler;
- args[1] = Qdirectory_files;
- args[2] = directory;
- args[3] = full;
- args[4] = match;
- args[5] = nosort;
- return Ffuncall (6, args);
- }
+ return call5 (handler, Qdirectory_files, directory,
+ full, match, nosort);
return directory_files_internal (directory, full, match, nosort, 0, Qnil);
}
call the corresponding file handler. */
handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes);
if (!NILP (handler))
- {
- Lisp_Object args[7];
-
- args[0] = handler;
- args[1] = Qdirectory_files_and_attributes;
- args[2] = directory;
- args[3] = full;
- args[4] = match;
- args[5] = nosort;
- args[6] = id_format;
- return Ffuncall (7, args);
- }
+ return call6 (handler, Qdirectory_files_and_attributes,
+ directory, full, match, nosort, id_format);
return directory_files_internal (directory, full, match, nosort, 1, id_format);
}
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename, Qfile_attributes);
if (!NILP (handler))
- return call3 (handler, Qfile_attributes, filename, id_format);
+ { /* Only pass the extra arg if it is used to help backward compatibility
+ with old file handlers which do not implement the new arg. --Stef */
+ if (NILP (id_format))
+ return call2 (handler, Qfile_attributes, filename);
+ else
+ return call3 (handler, Qfile_attributes, filename, id_format);
+ }
encoded = ENCODE_FILE (filename);
else
{
pw = (struct passwd *) getpwuid (s.st_uid);
- values[2] = (pw ? build_string (pw->pw_name) : s.st_uid);
+ values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid));
gr = (struct group *) getgrgid (s.st_gid);
- values[3] = (gr ? build_string (gr->gr_name) : s.st_gid);
+ values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid));
}
values[4] = make_time (s.st_atime);
values[5] = make_time (s.st_mtime);