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
1 changed files with 2 additions and 2 deletions

4
tr.c
View File

@ -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;