From: Jim Meyering Date: Fri, 16 Jun 1995 04:13:36 +0000 (+0000) Subject: (split_3): Unprotoize. X-Git-Tag: textutils-1_12_1~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19ffe3f16e21e383c0cabb20351ae1ddae2b33b0;p=thirdparty%2Fcoreutils.git (split_3): Unprotoize. (hex_digits): Unprotoize. (main): Interpret `no file args' as request to read from stdin. (usage): Reflect that change. --- diff --git a/src/md5sum.c b/src/md5sum.c index 2154209f6e..0327ecb09e 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\