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.
This commit is contained in:
sin 2013-08-15 10:55:21 +01:00
parent 582511d57b
commit 83c2c3d1f5
7 changed files with 22 additions and 7 deletions

View File

@ -14,7 +14,7 @@ static int expand(Fdescr *f, int tabstop);
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-t n] [file...]\n", argv0); eprintf("usage: %s [-i] [-t n] [file...]\n", argv0);
} }
int int
@ -25,6 +25,8 @@ main(int argc, char *argv[])
int tabstop = 8; int tabstop = 8;
ARGBEGIN { ARGBEGIN {
case 'i':
eprintf("not implemented\n");
case 't': case 't':
tabstop = estrtol(EARGF(usage()), 0); tabstop = estrtol(EARGF(usage()), 0);
break; break;

View File

@ -17,7 +17,7 @@ struct crypt_ops md5_ops = {
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [file...]\n", argv0); eprintf("usage: %s [-c] [file...]\n", argv0);
} }
int int
@ -27,6 +27,8 @@ main(int argc, char *argv[])
uint8_t md[MD5_DIGEST_LENGTH]; uint8_t md[MD5_DIGEST_LENGTH];
ARGBEGIN { ARGBEGIN {
case 'c':
eprintf("not implemented\n");
default: default:
usage(); usage();
} ARGEND; } ARGEND;

View File

@ -11,7 +11,7 @@
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-fn] file\n", argv0); eprintf("usage: %s [-efmn] file\n", argv0);
} }
int int
@ -23,6 +23,9 @@ main(int argc, char *argv[])
ssize_t n; ssize_t n;
ARGBEGIN { ARGBEGIN {
case 'e':
case 'm':
eprintf("not implemented\n");
case 'f': case 'f':
fflag = true; fflag = true;
break; break;

View File

@ -17,7 +17,7 @@ struct crypt_ops sha1_ops = {
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [file...]\n", argv0); eprintf("usage: %s [-c] [file...]\n", argv0);
} }
int int
@ -27,6 +27,8 @@ main(int argc, char *argv[])
uint8_t md[SHA1_DIGEST_LENGTH]; uint8_t md[SHA1_DIGEST_LENGTH];
ARGBEGIN { ARGBEGIN {
case 'c':
eprintf("not implemented\n");
default: default:
usage(); usage();
} ARGEND; } ARGEND;

View File

@ -17,7 +17,7 @@ struct crypt_ops sha256_ops = {
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [file...]\n", argv0); eprintf("usage: %s [-c] [file...]\n", argv0);
} }
int int
@ -27,6 +27,8 @@ main(int argc, char *argv[])
uint8_t md[SHA256_DIGEST_LENGTH]; uint8_t md[SHA256_DIGEST_LENGTH];
ARGBEGIN { ARGBEGIN {
case 'c':
eprintf("not implemented\n");
default: default:
usage(); usage();
} ARGEND; } ARGEND;

View File

@ -17,7 +17,7 @@ struct crypt_ops sha512_ops = {
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [file...]\n", argv0); eprintf("usage: %s [-c] [file...]\n", argv0);
} }
int int
@ -27,6 +27,8 @@ main(int argc, char *argv[])
uint8_t md[SHA512_DIGEST_LENGTH]; uint8_t md[SHA512_DIGEST_LENGTH];
ARGBEGIN { ARGBEGIN {
case 'c':
eprintf("not implemented\n");
default: default:
usage(); usage();
} ARGEND; } ARGEND;

4
uniq.c
View File

@ -22,7 +22,7 @@ static long prev_line_count = 0;
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-cdu] [input]]\n", argv0); eprintf("usage: %s [-cdiu] [input]]\n", argv0);
} }
int int
@ -31,6 +31,8 @@ main(int argc, char *argv[])
FILE *fp; FILE *fp;
ARGBEGIN { ARGBEGIN {
case 'i':
eprintf("not implemented\n");
case 'c': case 'c':
countfmt = "%7ld "; countfmt = "%7ld ";
break; break;