More libc portability updates, add in the website (which has not been
archived previously). Wrote 'which' during the meeting today. -Erik
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user