From 97ff31e5806fad2d0f5b7f89fade6394eb40efb2 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 22 Jul 2016 18:11:38 +0200 Subject: mlist: add -X/-x ala mflag --- mlist.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mlist.c') diff --git a/mlist.c b/mlist.c index 689743b..8d28827 100644 --- a/mlist.c +++ b/mlist.c @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) { int c; - while ((c = getopt(argc, argv, "PRSTDFprstdfNnCcim:")) != -1) + while ((c = getopt(argc, argv, "PRSTDFprstdfX:x:NnCcim:")) != -1) switch(c) { case 'P': case 'R': case 'S': case 'T': case 'D': case 'F': flags[(unsigned int)c] = 1; @@ -169,6 +169,14 @@ main(int argc, char *argv[]) case 'p': case 'r': case 's': case 't': case 'd': case 'f': flags[(unsigned int)uc(c)] = -1; break; + case 'X': + while (*optarg) + flags[(unsigned int)*optarg++] = 1; + break; + case 'x': + while (*optarg) + flags[(unsigned int)*optarg++] = -1; + break; case 'N': Nflag = 1; break; case 'n': Nflag = -1; break; case 'C': Cflag = 1; break; -- cgit 1.4.1