[hackers] [sbase] tr: change delete behaviour || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 12 Apr 2014 21:33:15 +0200

commit a8f45b45681d3ca515f147ef4623266ba50430b8
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Apr 12 12:56:56 2014 +0200

    tr: change delete behaviour
    
    when one argument is specified use delete behaviour again
    
    Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>

diff --git a/tr.c b/tr.c
index aad2245..32e805a 100644
--- a/tr.c
+++ b/tr.c
_AT_@ -137,8 +137,8 @@ main(int argc, char *argv[])
         if(argc == 0)
                 usage();
 
- if(dflag) {
- if(argc >= 2)
+ if(dflag || argc == 1) {
+ if(argc != 1)
                         usage();
                 parsemapping(argv[0], NULL, mappings);
                 mapfunc = maptonull;
Received on Sat Apr 12 2014 - 21:33:15 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 12 2014 - 21:36:24 CEST