From 330fd2b5767110f29544131d4c72c77e0506b6df Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Fri, 19 May 2000 05:35:19 +0000 Subject: More libc portability updates, add in the website (which has not been archived previously). Wrote 'which' during the meeting today. -Erik --- basename.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'basename.c') diff --git a/basename.c b/basename.c index 10ae76188..78265a5e6 100644 --- a/basename.c +++ b/basename.c @@ -24,19 +24,23 @@ #include "internal.h" #include +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; -- cgit v1.2.3