diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-19 05:35:19 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-19 05:35:19 +0000 |
commit | 330fd2b5767110f29544131d4c72c77e0506b6df (patch) | |
tree | aa360774a903d3ebb0b2b5f3031c2e359f9c3afb /coreutils/basename.c | |
parent | d356c6e9d1bc091c64200ecc401aa9b6ffb53151 (diff) | |
download | busybox-w32-330fd2b5767110f29544131d4c72c77e0506b6df.tar.gz busybox-w32-330fd2b5767110f29544131d4c72c77e0506b6df.tar.bz2 busybox-w32-330fd2b5767110f29544131d4c72c77e0506b6df.zip |
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 @@ | |||
24 | #include "internal.h" | 24 | #include "internal.h" |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | 26 | ||
27 | const char *basename_usage="basename FILE [SUFFIX]\n" | ||
28 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
29 | "\nStrips directory path and suffixes from FILE.\n" | ||
30 | "If specified, also removes any trailing SUFFIX.\n" | ||
31 | #endif | ||
32 | ; | ||
33 | |||
34 | |||
27 | extern int basename_main(int argc, char **argv) | 35 | extern int basename_main(int argc, char **argv) |
28 | { | 36 | { |
29 | int m, n; | 37 | int m, n; |
30 | char *s, *s1; | 38 | char *s, *s1; |
31 | 39 | ||
32 | if ((argc < 2) || (**(argv + 1) == '-')) { | 40 | if ((argc < 2) || (**(argv + 1) == '-')) { |
33 | usage("basename FILE [SUFFIX]\n" | 41 | usage(basename_usage); |
34 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
35 | "\nStrips directory path and suffixes from FILE.\n" | ||
36 | "If specified, also removes any trailing SUFFIX.\n" | ||
37 | #endif | ||
38 | ); | ||
39 | } | 42 | } |
43 | |||
40 | argv++; | 44 | argv++; |
41 | 45 | ||
42 | s1=*argv+strlen(*argv)-1; | 46 | s1=*argv+strlen(*argv)-1; |