Mercurial > emacs
comparison src/dired.c @ 75180:cf3da57bf8a5
(Ffile_attributes): Use floats for large uids/gids.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 10 Jan 2007 03:44:49 +0000 |
parents | 2347e4b0bec2 |
children | 248d2b5b7577 |
comparison
equal
deleted
inserted
replaced
75179:b414cb68e99e | 75180:cf3da57bf8a5 |
---|---|
1 /* Lisp functions for making directory listings. | 1 /* Lisp functions for making directory listings. |
2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003, | 2 Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003, |
3 2004, 2005, 2006 Free Software Foundation, Inc. | 3 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
6 | 6 |
7 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
964 #endif | 964 #endif |
965 } | 965 } |
966 values[1] = make_number (s.st_nlink); | 966 values[1] = make_number (s.st_nlink); |
967 if (NILP (id_format) || EQ (id_format, Qinteger)) | 967 if (NILP (id_format) || EQ (id_format, Qinteger)) |
968 { | 968 { |
969 values[2] = make_number (s.st_uid); | 969 values[2] = make_fixnum_or_float (s.st_uid); |
970 values[3] = make_number (s.st_gid); | 970 values[3] = make_fixnum_or_float (s.st_gid); |
971 } | 971 } |
972 else | 972 else |
973 { | 973 { |
974 BLOCK_INPUT; | 974 BLOCK_INPUT; |
975 pw = (struct passwd *) getpwuid (s.st_uid); | 975 pw = (struct passwd *) getpwuid (s.st_uid); |
976 values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid)); | 976 values[2] = (pw ? build_string (pw->pw_name) |
977 : make_fixnum_or_float (s.st_uid)); | |
977 gr = (struct group *) getgrgid (s.st_gid); | 978 gr = (struct group *) getgrgid (s.st_gid); |
978 values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid)); | 979 values[3] = (gr ? build_string (gr->gr_name) |
980 : make_fixnum_or_float (s.st_gid)); | |
979 UNBLOCK_INPUT; | 981 UNBLOCK_INPUT; |
980 } | 982 } |
981 values[4] = make_time (s.st_atime); | 983 values[4] = make_time (s.st_atime); |
982 values[5] = make_time (s.st_mtime); | 984 values[5] = make_time (s.st_mtime); |
983 values[6] = make_time (s.st_ctime); | 985 values[6] = make_time (s.st_ctime); |