Synchronise with FreeBSD:
authorJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 18:01:49 +0000 (18:01 +0000)
committerJeroen Ruigrok/asmodai <asmodai@dragonflybsd.org>
Sun, 18 Sep 2005 18:01:49 +0000 (18:01 +0000)
commit20d719bf84eac32b6aed550642707e33bfa61279
treeab48c48ec1fbdd9aed5aabc6f3fccb49449c8a62
parent5e90d4b14526d59d5636fd75eb2baac6d7743cfa
Synchronise with FreeBSD:

Bump Id where needed.

Constify parameters that do not get touched.

Do something sensible if both -h and -k are given.

If we are asked to print the total number of blocks, do so even if we
have no entries to print (either due to an empty directory or an
error).  This makes the -l and -s options more consistent, like
Solaris and (Debian) Linux.  To make this happen, tweak two
optimizations on the second call to display():

- Don't skip display() altogether, even if list == NULL.
- Don't skip the call to the printfn in display() if we
  need to print the total.

Small clean ups and casts.
bin/ls/extern.h
bin/ls/ls.c
bin/ls/print.c