[hackers] [sbase] Add 'not implemented' errors for unimplemented flags || sin

From: <git_AT_suckless.org>
Date: Sat, 05 Oct 2013 16:29:16 +0200

commit 83c2c3d1f548b437f34f532a87b6ba6e96a3b7ad
Author: sin <sin_AT_2f30.org>
Date: Thu Aug 15 10:55:21 2013 +0100

    Add 'not implemented' errors for unimplemented flags
    
    These used to live in TODO but we got rid off them. Make sure
    we keep track of what we want to support by printing a message
    when those flags are unimplemented.

diff --git a/expand.c b/expand.c
index 68336ec..7ad43b8 100644
--- a/expand.c
+++ b/expand.c
_AT_@ -14,7 +14,7 @@ static int expand(Fdescr *f, int tabstop);
 static void
 usage(void)
 {
- eprintf("usage: %s [-t n] [file...]
", argv0);
+ eprintf("usage: %s [-i] [-t n] [file...]
", argv0);
 }
 
 int
_AT_@ -25,6 +25,8 @@ main(int argc, char *argv[])
         int tabstop = 8;
 
         ARGBEGIN {
+ case 'i':
+ eprintf("not implemented
");
         case 't':
                 tabstop = estrtol(EARGF(usage()), 0);
                 break;
diff --git a/md5sum.c b/md5sum.c
index 4fd449f..7618663 100644
--- a/md5sum.c
+++ b/md5sum.c
_AT_@ -17,7 +17,7 @@ struct crypt_ops md5_ops = {
 static void
 usage(void)
 {
- eprintf("usage: %s [file...]
", argv0);
+ eprintf("usage: %s [-c] [file...]
", argv0);
 }
 
 int
_AT_@ -27,6 +27,8 @@ main(int argc, char *argv[])
         uint8_t md[MD5_DIGEST_LENGTH];
 
         ARGBEGIN {
+ case 'c':
+ eprintf("not implemented
");
         default:
                 usage();
         } ARGEND;
diff --git a/readlink.c b/readlink.c
index 065c05d..f54fd51 100644
--- a/readlink.c
+++ b/readlink.c
_AT_@ -11,7 +11,7 @@
 static void
 usage(void)
 {
- eprintf("usage: %s [-fn] file
", argv0);
+ eprintf("usage: %s [-efmn] file
", argv0);
 }
 
 int
_AT_@ -23,6 +23,9 @@ main(int argc, char *argv[])
         ssize_t n;
 
         ARGBEGIN {
+ case 'e':
+ case 'm':
+ eprintf("not implemented
");
         case 'f':
                 fflag = true;
                 break;
diff --git a/sha1sum.c b/sha1sum.c
index 11b9111..6d79f15 100644
--- a/sha1sum.c
+++ b/sha1sum.c
_AT_@ -17,7 +17,7 @@ struct crypt_ops sha1_ops = {
 static void
 usage(void)
 {
- eprintf("usage: %s [file...]
", argv0);
+ eprintf("usage: %s [-c] [file...]
", argv0);
 }
 
 int
_AT_@ -27,6 +27,8 @@ main(int argc, char *argv[])
         uint8_t md[SHA1_DIGEST_LENGTH];
 
         ARGBEGIN {
+ case 'c':
+ eprintf("not implemented
");
         default:
                 usage();
         } ARGEND;
diff --git a/sha256sum.c b/sha256sum.c
index ce97435..5dfc6a5 100644
--- a/sha256sum.c
+++ b/sha256sum.c
_AT_@ -17,7 +17,7 @@ struct crypt_ops sha256_ops = {
 static void
 usage(void)
 {
- eprintf("usage: %s [file...]
", argv0);
+ eprintf("usage: %s [-c] [file...]
", argv0);
 }
 
 int
_AT_@ -27,6 +27,8 @@ main(int argc, char *argv[])
         uint8_t md[SHA256_DIGEST_LENGTH];
 
         ARGBEGIN {
+ case 'c':
+ eprintf("not implemented
");
         default:
                 usage();
         } ARGEND;
diff --git a/sha512sum.c b/sha512sum.c
index 972f2c7..edb1cd3 100644
--- a/sha512sum.c
+++ b/sha512sum.c
_AT_@ -17,7 +17,7 @@ struct crypt_ops sha512_ops = {
 static void
 usage(void)
 {
- eprintf("usage: %s [file...]
", argv0);
+ eprintf("usage: %s [-c] [file...]
", argv0);
 }
 
 int
_AT_@ -27,6 +27,8 @@ main(int argc, char *argv[])
         uint8_t md[SHA512_DIGEST_LENGTH];
 
         ARGBEGIN {
+ case 'c':
+ eprintf("not implemented
");
         default:
                 usage();
         } ARGEND;
diff --git a/uniq.c b/uniq.c
index 7eb49f3..9c85668 100644
--- a/uniq.c
+++ b/uniq.c
_AT_@ -22,7 +22,7 @@ static long prev_line_count = 0;
 static void
 usage(void)
 {
- eprintf("usage: %s [-cdu] [input]]
", argv0);
+ eprintf("usage: %s [-cdiu] [input]]
", argv0);
 }
 
 int
_AT_@ -31,6 +31,8 @@ main(int argc, char *argv[])
         FILE *fp;
 
         ARGBEGIN {
+ case 'i':
+ eprintf("not implemented
");
         case 'c':
                 countfmt = "%7ld ";
                 break;
Received on Sat Oct 05 2013 - 16:29:16 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 05 2013 - 16:36:19 CEST