diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-19 09:35:19 +0400 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-19 09:35:19 +0400 |
commit | 330fd2b5767110f29544131d4c72c77e0506b6df (patch) | |
tree | aa360774a903d3ebb0b2b5f3031c2e359f9c3afb /coreutils/basename.c | |
parent | d356c6e9d1bc091c64200ecc401aa9b6ffb53151 (diff) |
More libc portability updates, add in the website (which has not been
archived previously). Wrote 'which' during the meeting today.
-Erik
Diffstat (limited to 'coreutils/basename.c')
-rw-r--r-- | coreutils/basename.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c index 10ae76188..78265a5e6 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -24,19 +24,23 @@ #include "internal.h" #include <stdio.h> +const char *basename_usage="basename FILE [SUFFIX]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nStrips directory path and suffixes from FILE.\n" + "If specified, also removes any trailing SUFFIX.\n" +#endif +; + + extern int basename_main(int argc, char **argv) { int m, n; char *s, *s1; if ((argc < 2) || (**(argv + 1) == '-')) { - usage("basename FILE [SUFFIX]\n" -#ifndef BB_FEATURE_TRIVIAL_HELP - "\nStrips directory path and suffixes from FILE.\n" - "If specified, also removes any trailing SUFFIX.\n" -#endif - ); + usage(basename_usage); } + argv++; s1=*argv+strlen(*argv)-1; |