sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 83c2c3d1f548b437f34f532a87b6ba6e96a3b7ad
parent 582511d57b4970a1411d2b8d81b7af6d64978225
Author: sin <sin@2f30.org>
Date:   Thu, 15 Aug 2013 10:55:21 +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.

Diffstat:
Mexpand.c | 4+++-
Mmd5sum.c | 4+++-
Mreadlink.c | 5++++-
Msha1sum.c | 4+++-
Msha256sum.c | 4+++-
Msha512sum.c | 4+++-
Muniq.c | 4+++-
7 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/expand.c b/expand.c @@ -14,7 +14,7 @@ static int expand(Fdescr *f, int tabstop); static void usage(void) { - eprintf("usage: %s [-t n] [file...]\n", argv0); + eprintf("usage: %s [-i] [-t n] [file...]\n", argv0); } int @@ -25,6 +25,8 @@ main(int argc, char *argv[]) int tabstop = 8; ARGBEGIN { + case 'i': + eprintf("not implemented\n"); case 't': tabstop = estrtol(EARGF(usage()), 0); break; diff --git a/md5sum.c b/md5sum.c @@ -17,7 +17,7 @@ struct crypt_ops md5_ops = { static void usage(void) { - eprintf("usage: %s [file...]\n", argv0); + eprintf("usage: %s [-c] [file...]\n", argv0); } int @@ -27,6 +27,8 @@ main(int argc, char *argv[]) uint8_t md[MD5_DIGEST_LENGTH]; ARGBEGIN { + case 'c': + eprintf("not implemented\n"); default: usage(); } ARGEND; diff --git a/readlink.c b/readlink.c @@ -11,7 +11,7 @@ static void usage(void) { - eprintf("usage: %s [-fn] file\n", argv0); + eprintf("usage: %s [-efmn] file\n", argv0); } int @@ -23,6 +23,9 @@ main(int argc, char *argv[]) ssize_t n; ARGBEGIN { + case 'e': + case 'm': + eprintf("not implemented\n"); case 'f': fflag = true; break; diff --git a/sha1sum.c b/sha1sum.c @@ -17,7 +17,7 @@ struct crypt_ops sha1_ops = { static void usage(void) { - eprintf("usage: %s [file...]\n", argv0); + eprintf("usage: %s [-c] [file...]\n", argv0); } int @@ -27,6 +27,8 @@ main(int argc, char *argv[]) uint8_t md[SHA1_DIGEST_LENGTH]; ARGBEGIN { + case 'c': + eprintf("not implemented\n"); default: usage(); } ARGEND; diff --git a/sha256sum.c b/sha256sum.c @@ -17,7 +17,7 @@ struct crypt_ops sha256_ops = { static void usage(void) { - eprintf("usage: %s [file...]\n", argv0); + eprintf("usage: %s [-c] [file...]\n", argv0); } int @@ -27,6 +27,8 @@ main(int argc, char *argv[]) uint8_t md[SHA256_DIGEST_LENGTH]; ARGBEGIN { + case 'c': + eprintf("not implemented\n"); default: usage(); } ARGEND; diff --git a/sha512sum.c b/sha512sum.c @@ -17,7 +17,7 @@ struct crypt_ops sha512_ops = { static void usage(void) { - eprintf("usage: %s [file...]\n", argv0); + eprintf("usage: %s [-c] [file...]\n", argv0); } int @@ -27,6 +27,8 @@ main(int argc, char *argv[]) uint8_t md[SHA512_DIGEST_LENGTH]; ARGBEGIN { + case 'c': + eprintf("not implemented\n"); default: usage(); } ARGEND; diff --git a/uniq.c b/uniq.c @@ -22,7 +22,7 @@ static long prev_line_count = 0; static void usage(void) { - eprintf("usage: %s [-cdu] [input]]\n", argv0); + eprintf("usage: %s [-cdiu] [input]]\n", argv0); } int @@ -31,6 +31,8 @@ main(int argc, char *argv[]) FILE *fp; ARGBEGIN { + case 'i': + eprintf("not implemented\n"); case 'c': countfmt = "%7ld "; break;