Commit Graph

50 Commits

Author SHA1 Message Date
christos cde105a416 - use printf(3) "'" format to do thousands grouping instead of custom version.
- fix sign format inconsistencies.
2011-03-15 22:53:41 +00:00
erh 4aaf499c53 PR#7540, add a -M option to ls which causes sizes (and number of blocks) to be
displayed with comma separators (or a locale specific separator).
2011-03-15 03:52:37 +00:00
enami 5a8bd46049 Fix broken indentation. No functional change. 2010-08-18 02:53:54 +00:00
christos b22f104713 make it obvious to grep that we are checking ctime. 2010-04-02 15:09:12 +00:00
christos 221f2e33dd handle ctime returning NULL 2010-04-01 22:23:27 +00:00
lukem 990d25a96c fix -Wsign-compare issues 2009-02-14 08:02:04 +00:00
christos 909ffa3267 prepare for 64 bit dev_t 2008-12-28 19:30:33 +00:00
ahoka c111d82975 Implement a printtotal function to avoid code repetition. 2008-11-02 02:27:32 +00:00
christos 78509e7f31 Pass lint. From Anon Ymous 2006-12-14 14:15:26 +00:00
jschauma 0386433d98 Somehow missed this in the last commit, where I only changed the commentary
to reflect the actual change (plus minor nits).  So here's the actual change:

Rather than '-h' suppressing '-s' when using '-l', make it display
the blocks used in human readable form, as suggested by Alan Barrett
and Daniel Carosone.

(Missing bits spotted, as usual, by wiz@.)
2005-10-31 14:13:33 +00:00
mycroft 75a40767d0 Print some future timestamps with HH:MM rather than YYYY, so that we get
something reasonable if we're using a file server whose time is slightly
ahead.
2004-11-17 17:00:00 +00:00
jschauma 1a12f82f4b If a files date is any time in the future (not six months or more),
use "date "+%b %e %Y"" format.  This is what SUSv3 says.
Ok jdolecek, dsl
2004-08-09 20:14:54 +00:00
grant f4c4780250 implement -h(umanize).
from David P. Reese Jr. in PR bin/23870.
2003-12-26 06:19:19 +00:00
jschauma 21ab633500 After last weeks addition of the '-b' flag, add '-B' and '-w' flags,
suggested by uwe@, inspired by FreeBSD.  The three flags override
each other (and the '-q' flag) and behave as follows:

     -B      Force printing of non-printable characters in file names as
	     \xxx, where xxx is the numeric value of the character in octal.

     -b      As -B, but use C escape codes whenever possible.

     -w      Force raw printing of non-printable characters.  This is the
             default when output is not to a terminal.
2003-09-22 02:43:19 +00:00
jschauma 2ccef82cc4 Implement '-b' option, which, following FreeBSD, Linux and (I think) Solaris
prints octal escapes for nongraphic characters.
2003-09-14 19:16:05 +00:00
agc b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
grant 75d0e9d0c0 make -g behave as it should according to SUSv3 (long listing without
owner).

ok'd by kleink@.
2003-05-07 13:00:24 +00:00
enami 54a944c353 Cosmetic changes. 2002-11-09 12:27:08 +00:00
christos 1eb5da90ed don't include utmp.h 2002-08-01 20:05:48 +00:00
christos 18d76c325c fix nested extern. 2001-02-04 19:32:26 +00:00
lukem ba2e04dc88 convert to new KNF 2000-07-29 03:46:14 +00:00
assar b23df5be68 make sure to print file names consistenly in column mode 2000-06-22 23:42:22 +00:00
assar c5a806697b Do not modify the file name when not printing non-printables, also do
it consistently with the file name and possible symbolic link target.

fixes bin/10385 and bin/10384
2000-06-17 16:11:25 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
kleink b424b8fe8c Add support for the XCU5 -p option (-F restricted to directories). 1999-02-17 15:28:08 +00:00
kleink b7443b0f16 Implement 1003.2 -m option (stream output format). 1999-02-12 14:35:48 +00:00
christos a7e8a30ca7 %q -> %ll 1998-11-04 18:53:17 +00:00
christos 9be0cf0c25 conservative casts for printfs. 1998-11-04 18:50:37 +00:00
mycroft 1381f68431 Delint. 1998-07-28 05:15:46 +00:00
lukem e30b76288b * blocks can be 64bit (not u_long), so calculate and display accordingly
* cleanup some other typedamage (int is as good as u_long)
* remove unused variables
1998-05-16 15:12:26 +00:00
mycroft d4e67eb266 If a time stamp is 6 months or more in the future, display the year in the
short form.  Also, cache the current time.
1998-01-21 00:25:19 +00:00
lukem ac591fc02c * implement -x; sort columns across the page rather than down the page
* in printcol(), don't bother building an index to the linked list if
  only printing one column with printscol()...
* implement -n; prevent [gu]id->name mapping in long listings.
  inspired by openbsd, but does *not* imply -l by itself.
* fix sorting with -d (or mismatched types in general).  (from openbsd).
* document -g. (from openbsd).
1998-01-18 13:30:03 +00:00
mycroft 9ded7f638d Automatically resize the major and minor number fields, and DTRT if the size
field is not the same size.
1998-01-17 12:00:42 +00:00
thorpej f566fe5da3 Add some casts to printf args to keep the compiler happy on the Alpha. 1997-07-30 05:01:01 +00:00
christos b22592e84f Fix compiler warnings.
Add WARNS=1
1997-07-20 18:52:57 +00:00
thorpej 51175461d6 Do multicolumn output in a way that's a little more likely to always
line up evenly.  From D'Arcy J.M. Cain <darcy@druid.com>, PR #2965.
1996-12-11 03:25:39 +00:00
jtc d943cdadce Sync with 4.4lite2 1995-09-07 06:42:58 +00:00
cgd 49f0ad8601 convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
mycroft d966913f57 Sync with CSRG. 1994-12-27 23:14:46 +00:00
mycroft 83ede345fb Merge with 4.4-Lite version. 1994-09-23 06:14:39 +00:00
chopps 854720238b "yet" on quad_t/off_t things. (not noticed on i386 becuase of endian I guess.) 1994-04-04 19:29:42 +00:00
cgd d85e4acf72 off_t exp. 1994-03-27 09:26:59 +00:00
cgd 006b4ddd7f (1) fixup getbsize() calls
(2) convert to use err(), warn(), and warnx(), as appropriate.
1994-01-25 20:44:48 +00:00
jtc 6261fa0a42 The working directory is changed back when fts_children() returns,
so their fts_accpath members no longer have the correct relative
path.  We can solve this problem by looking at the parent's path
via p->fts_parent->fts_accpath.
1994-01-13 21:50:41 +00:00
jtc 2514ae4e86 POSIX.2 says to print a pipe character after fifo names when using
the -F option.
1993-10-14 23:03:41 +00:00
mycroft 203e422702 New version from uunet, with -k option readded, and 4.4 ffs--specific stuff
in `#ifdef notyet'.
1993-08-07 03:56:47 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
cgd 06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd 346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00