Modify "ls" to sort its data faster, using the new gnulib mpsort
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 29 Jan 2007 11:08:52 +0000 (12:08 +0100)
committerJim Meyering <jim@meyering.net>
Mon, 29 Jan 2007 11:08:52 +0000 (12:08 +0100)
commitc1f8d483879846a8d207355a67ce388778a8e773
tree067717d61b3e09873ce4d2398288c90691dd6ac4
parente7420f9781484d9f283a66010b50f84bbe58f5a5
Modify "ls" to sort its data faster, using the new gnulib mpsort
module rather than qsort.  This is particularly a win in
environments where strcoll is slow, since mpsort typically calls
strcoll less often than qsort does.
* bootstrap.conf (gnulib_modules): Add mpsort.
* src/ls.c: Include mpsort.h.
(sorted_file, sorted_file_alloc): New vars, for a new vector of
pointers to the file info, for speed.
(clear_files, extract_dirs_from_files, sort_files, print_current_files):
(print_many_per_line, print_horizontal, print_with_commas):
(calculate_columns): Set and use new vector.
(initialize_ordering_vector): New function.
ChangeLog
bootstrap.conf
src/ls.c