diff options
author | Jim Meyering <jim@meyering.net> | 1995-06-16 04:13:36 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-06-16 04:13:36 +0000 |
commit | 19ffe3f16e21e383c0cabb20351ae1ddae2b33b0 (patch) | |
tree | fc93bf5f69510b94cf298b9f99bf82cd21e3538c | |
parent | 66196f8fd7b17afcc9234f270d6d6798f9cc0394 (diff) | |
download | coreutils-19ffe3f16e21e383c0cabb20351ae1ddae2b33b0.tar.xz |
(split_3): Unprotoize.
(hex_digits): Unprotoize.
(main): Interpret `no file args' as request to read from stdin.
(usage): Reflect that change.
-rw-r--r-- | src/md5sum.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/md5sum.c b/src/md5sum.c index 2154209f6..0327ecb09 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -172,7 +172,8 @@ static void process_buffer __P ((const void *buffer, size_t len, /* FIXME: This is provisory. Use strtok. */ static int -split_3 (char *s, char **u, char **v, char **w) +split_3 (s, u, v, w) + char *s, **u, **v, **w; { size_t i; char *p[3]; @@ -227,7 +228,8 @@ split_3 (char *s, char **u, char **v, char **w) /* FIXME: use strcspn. */ static int -hex_digits (const char *s) +hex_digits (s) + const char *s; { while (*s) { @@ -332,10 +334,7 @@ main (argc, argv) else if (check_file == NULL) { if (optind == argc) - { - error (0, errno, _("missing file argument")); - usage (1); - } + argv[argc++] = "-"; for (; optind < argc; ++optind) { @@ -442,7 +441,7 @@ usage (status) program_name); else printf (_("\ -Usage: %s [OPTION] FILE...\n\ +Usage: %s [OPTION] [FILE]...\n\ or: %s --check=FILE\n\ or: %s --string=STRING\n\ Mandatory arguments to long options are mandatory for short options too.\n\ |