From 19ffe3f16e21e383c0cabb20351ae1ddae2b33b0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 16 Jun 1995 04:13:36 +0000 Subject: (split_3): Unprotoize. (hex_digits): Unprotoize. (main): Interpret `no file args' as request to read from stdin. (usage): Reflect that change. --- src/md5sum.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') 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\ -- cgit v1.2.3-70-g09d2