aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-211-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix columnar output. Closes 8731Denys Vlasenko2016-03-061-3/+3
| | | | | | | | | | | | In coreutils/ls.c, 1.19 introduced commit 2f7d9e8903029b1b5e51a15f9cb0dcb6ca17c3ac, removing the variable tabstops and hard coding the column separation to 2 characters, but was not done correctly. The column_width assumes a gap of 1 character, so the computed number of columns exceeds the terminal width when many small files are encountered. A minor problem but surprisingly annoying. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: factor out code which queries screen widthDenys Vlasenko2015-10-231-1/+1
| | | | | | | | | | | | | | | | function old new delta get_terminal_width - 17 +17 stty_main 1196 1197 +1 pstree_main 321 319 -2 ls_main 735 731 -4 watch_main 232 225 -7 bb_progress_update 714 706 -8 ps_main 555 543 -12 run_applet_and_exit 708 695 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 18/-46) Total: -28 byte Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: heed compiler warningDenys Vlasenko2015-02-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: trivial code shrinkDenys Vlasenko2015-02-181-5/+5
| | | | | | | function old new delta display_single 914 893 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix year 9999 bug :)Denys Vlasenko2015-02-161-5/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make "ls -s DIR" show total too. Clases 4946Denys Vlasenko2014-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixes. no code changesDenys Vlasenko2013-01-141-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2011-08-101-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix HAVE_STRVERSCMP check; add check for older uclibc versionsDenys Vlasenko2011-06-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Add HAVE_STRVERSCMP, guard the only usage of strverscmp with #ifdefDenys Vlasenko2011-06-211-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix comment about -p (it's compatible now)Denys Vlasenko2011-06-131-4/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make -v and -X actually work as intendedDenys Vlasenko2011-06-131-7/+15
| | | | | | | | | | function old new delta strverscmp - 236 +236 sortcmp 186 254 +68 static.result_type - 60 +60 static.next_state 12 16 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: code shrinkDenys Vlasenko2011-05-131-7/+11
| | | | | | | | | | | | function old new delta sort_and_display_files - 427 +427 scan_and_display_dirs_recur 497 488 -9 ls_main 765 735 -30 display_files 422 - -422 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 427/-461) Total: -34 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: reorder and rename functions. No code changesDenys Vlasenko2011-05-131-238/+240
| | | | | | | | | | | | | | function old new delta display_single - 931 +931 scan_and_display_dirs_recur - 497 +497 display_files - 422 +422 showfiles 422 - -422 showdirs 497 - -497 list_single 931 - -931 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 0/0 up/down: 1850/-1850) Total: 0 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: reduce memory consumption and speed up (don't do redundant [l]stat)Denys Vlasenko2011-05-131-158/+210
| | | | | | | | | | | | function old new delta my_stat 110 278 +168 splitdnarray 120 118 -2 ls_main 769 765 -4 list_single 961 931 -30 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 168/-36) Total: 132 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: avoid forward declaration. No code changesDenys Vlasenko2011-05-131-45/+43
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: code shrinkDenys Vlasenko2011-05-131-32/+21
| | | | | | | function old new delta list_single 990 961 -29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix help text: -w N is optionalDenys Vlasenko2011-05-121-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix -p help text, improve comments and define namesDenys Vlasenko2011-05-121-11/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: better help text for -a and -ADenys Vlasenko2011-04-031-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix handling of symlinks by option -1Denys Vlasenko2011-03-121-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: widen -s (1k blocks) column from 4 to 6Denys Vlasenko2011-03-011-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: -g implies -lDenys Vlasenko2011-02-281-5/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix bits for -T, -w and --color; make -n imply -l; fix commentsDenys Vlasenko2011-02-281-25/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix one-bit-off which caused -H to behave as -hDenys Vlasenko2011-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: remove redundant constants LIST_FILENAME and LIST_SHORTJames Youngman2010-12-201-47/+44
| | | | | | | LIST_FILENAME is always true and LIST_SHORT affects nothing. Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: add support for -HDenys Vlasenko2010-12-191-73/+86
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: tweak -e handling; better commentsDenys Vlasenko2010-12-191-19/+24
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: print a space after each column. Closes bug 2941Denys Vlasenko2010-12-191-11/+72
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make -F not follow symlinks of the command lineDenys Vlasenko2010-12-191-4/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make -x force columnar output; remove unused parts of TRIGGER codeDenys Vlasenko2010-12-191-43/+30
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: for some options, only last takes effect. Closes bug 2959Denys Vlasenko2010-12-191-8/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix -lg to show group (was showing user)Denys Vlasenko2010-11-061-3/+3
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Avoid side effects in putc(), which may be implemented as a macroDan Fandrich2010-09-091-1/+2
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko2010-07-261-2/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko2010-02-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: unicode fixesDenys Vlasenko2010-01-311-195/+217
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2010-01-241-9/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: better unicode width support. Hopefully fixes bug 839.Denys Vlasenko2010-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also opens up a possibility to make other unicode stuff smaller and more correct later. but: function old new delta static.combining - 516 +516 bb_wcwidth - 328 +328 unicode_cut_nchars - 141 +141 mbstowc_internal - 93 +93 in_table - 78 +78 cal_main 899 961 +62 static.combining0x10000 - 40 +40 unicode_strlen - 31 +31 bb_mbstrlen 31 - -31 bb_mbstowcs 173 102 -71 ------------------------------------------------------------------------------ (add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102) Total: 1187 bytes Uses code of Markus Kuhn, which is in public domain: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c "Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted. The author disclaims all warranties with regard to this software." Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix sort of very large files. +21 byteDenys Vlasenko2010-01-181-12/+24
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make it so that group never glues itself to file sizeDenys Vlasenko2010-01-181-29/+26
| | | | | | + smaller enhancements: inode is long long; -h is a bit narrower; etc Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fold: unicode support. Based on a patch by Tomas Heinrich ↵Denys Vlasenko2010-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | <heinrich.tomas@gmail.com> General Unicode support is tweaked to expose unicode_status. function old new delta init_unicode - 77 +77 write2stdout - 19 +19 adjust_column 68 71 +3 unicode_status - 1 +1 unicode_is_enabled 1 - -1 grep_main 780 773 -7 fold_main 619 552 -67 check_unicode_in_env 77 - -77 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix "ls | cat" to not show "total NNN" headerDenys Vlasenko2009-10-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/human_readable.c: shrink; and reduce bss usageDenys Vlasenko2009-10-131-1/+3
| | | | | | | | | | | | | | | | | | | | also, move smart_ulltoaN there and comment usage locations function old new delta static.unit_chars 7 9 +2 utoa_to_buf 110 108 -2 make_human_readable_str 262 258 -4 fallbackSort 1723 1719 -4 static.fmt 97 92 -5 static.fmt_tenths 10 - -10 static.str 21 4 -17 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/5 up/down: 2/-42) Total: -40 bytes text data bss dec hex filename 820981 453 6932 828366 ca3ce busybox_old 820968 453 6916 828337 ca3b1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: forgotten chunk from prev commitDenys Vlasenko2009-10-031-5/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: code shrinkDenys Vlasenko2009-10-031-44/+44
| | | | | | | | | | | | | | function old new delta count_dirs 81 86 +5 dnalloc 13 17 +4 showfiles 372 370 -2 ls_main 833 825 -8 showdirs 505 489 -16 splitdnarray 189 120 -69 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/4 up/down: 9/-95) Total: -86 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>