Re: [dev][sbase][RFC] "tr" with -d option or without?

From: Hiltjo Posthuma <>
Date: Sat, 12 Apr 2014 13:06:17 +0200

On Sat, Apr 12, 2014 at 9:31 AM, Silvan Jegen <> wrote:
> On Fri, Apr 11, 2014 at 11:17:53PM +0100, sin wrote:
>> On Fri, Apr 11, 2014 at 09:07:10PM +0200, Silvan Jegen wrote:
>> > I can see the need for a '-d' flag for compatibility reasons but my
>> > preference would be to just ignore the flag if it is specified. What are
>> > peoples opinion on the '-d' flag?
>> One thing that is different is the breaking conditions for when to consider
>> the invocation as invalid usage (in the -d case we check for >= 2 in
>> any other case we check for != 2). So in that case we cannot consider -d
>> as a no-op as far as I uderstand it.
> I have a patch in the pipeline that will adjust the usage checks. I will
> submit it if we decide to change the behavior.

OK I changed the behaviour to how it was:

If one argument is specified or the dflag is specified: use delete.
If the dflag is specified but argc != 1, show usage.

For translate 2 arguments should be specified else usage information
will be shown.

Does this seem OK to you? Then sin or me will commit it.

I'm working on updating the man pages for tr and other tools and the
TODO file, so don't worry about that :)
I'll also probably rewrite the mmap code to use malloc since it causes
issues on some machines.

Thanks and kind regards,

Received on Sat Apr 12 2014 - 13:06:17 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 12 2014 - 13:12:06 CEST