[hackers] [scc] [driver] update usage, exit when exclusive flags given || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 1 Jun 2016 19:54:10 +0200 (CEST)

commit d61e762f242feac5d89b935b9bf591d0daf986d3
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Jun 1 19:51:04 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Jun 1 19:52:56 2016 +0200

    [driver] update usage, exit when exclusive flags given

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 9d21684..d288fe3 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -194,7 +194,7 @@ build(char *file)
 static void
 usage(void)
 {
- die("usage: %s [-m arch] input ...");
+ die("usage: %s [-E|-kS] [-m arch] input ...", argv0);
 }
 
 int
_AT_@ -228,6 +228,9 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND
 
+ if (Eflag && (Sflag || kflag))
+ usage();
+
         if (!argc)
                 die("scc: fatal error: no input files");
 
Received on Wed Jun 01 2016 - 19:54:10 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 01 2016 - 20:00:14 CEST