tr: change delete behaviour

when one argument is specified use delete behaviour again

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
Hiltjo Posthuma 2014-04-12 12:56:56 +02:00 committed by sin
parent 16cf92119f
commit a8f45b4568

4
tr.c
View File

@ -137,8 +137,8 @@ main(int argc, char *argv[])
if(argc == 0) if(argc == 0)
usage(); usage();
if(dflag) { if(dflag || argc == 1) {
if(argc >= 2) if(argc != 1)
usage(); usage();
parsemapping(argv[0], NULL, mappings); parsemapping(argv[0], NULL, mappings);
mapfunc = maptonull; mapfunc = maptonull;