Jim Meyering [Tue, 25 Jun 1996 04:56:22 +0000 (04:56 +0000)]
(decode_switches): Allow 0 as argument to --tabsize (-T) option.
Interpret as a directive to use no TAB characters to separate columns.
(indent): Handle TABSIZE == 0.
Jim Meyering [Sun, 23 Jun 1996 19:03:31 +0000 (19:03 +0000)]
* (parse_line): Rewrite to avoid modifying LINE.
Put LINE first in parameter list.
Adjust caller.
(dc_parse_stream): Free KEYWD and ARG.
(main): Give diagnostic for unreasonable combinations of
options/arguments.
Jim Meyering [Sat, 22 Jun 1996 22:02:37 +0000 (22:02 +0000)]
Major overhaul. No longer read from /etc/DIR_COLORS or from ~/.dircolors.
Defaults are now compiled in. If you specify a file on the command line,
it is used instead of the compiled-in defaults.
Jim Meyering [Wed, 19 Jun 1996 01:59:12 +0000 (01:59 +0000)]
(do_copy): When the force and backup options have been
specified and the source and destination are the same name for an
existing, regular file, convert the user's command, e.g.
`cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
where SUFFIX is determined by any version control options used.
At urging of (most recently) Karl Berry.
Jim Meyering [Sat, 1 Jun 1996 18:36:19 +0000 (18:36 +0000)]
Rename options and internal variables to reflect change to
--color=WHEN where WHEN is never, always, or auto (for consistency
with e.g. cp --sparse=WHEN. For at least a while, the original
slackware-supported arguments `none', `force', `yes', etc will be
supported but deprecated by lack of documentation.
(decode_switches): Use STDOUT_FILENO instead of `1' in is_tty test.
(usage): Update/add description of the --color option.
Jim Meyering [Fri, 31 May 1996 03:35:32 +0000 (03:35 +0000)]
(main): Interpret the old-style +VALUE and -VALUE
options like -c VALUE and -c +VALUE (resp) when VALUE has one of
the [bkm] suffix multipliers. This makes the code consistent
with --help output.
Jim Meyering [Fri, 31 May 1996 03:07:45 +0000 (03:07 +0000)]
(limfield): #ifdef-out a block of code that makes
GNU sort incompatible with Unix sort when a key-end spec refers
to the N'th character in a field that has fewer than N characters.
The POSIX spec doesn't appear to specify behavior for this case.
From Karl Heuer.
Jim Meyering [Thu, 30 May 1996 05:09:56 +0000 (05:09 +0000)]
(decode_one_format): Take another parameter.
Give a specific diagnostic for invalid format spec here rather
than an overly general one from caller's caller.
(decode_format_string): Update caller.
(main): Don't give diagnostic here when decode_format_string fails.
Remove assertions that could fail on some Crays because they don't
have a two-byte type.
Johan Danielsson (joda@pdc.kth.se) reported the failed assertions.