Cleanup usage() across sbase
Some tools didn't use argv0 for tool name, or usage() at all.
This commit is contained in:
parent
00d7bf4ea5
commit
6e7743eb56
2
chgrp.c
2
chgrp.c
|
@ -37,7 +37,7 @@ chgrp(const char *path, struct stat *st, void *data, struct recursor *r)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: chgrp [-h] [-R [-H | -L | -P]] group file ...\n");
|
||||
eprintf("usage: %s [-h] [-R [-H | -L | -P]] group file ...\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
3
chown.c
3
chown.c
|
@ -40,7 +40,8 @@ chownpwgr(const char *path, struct stat *st, void *data, struct recursor *r)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [-h] [-R [-H | -L | -P]] [owner][:[group]] file ...\n", argv0);
|
||||
eprintf("usage: %s [-h] [-R [-H | -L | -P]] [owner][:[group]] "
|
||||
"file ...\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
5
ed.c
5
ed.c
|
@ -13,7 +13,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "arg.h"
|
||||
#include "util.h"
|
||||
|
||||
#define REGEXSIZE 100
|
||||
#define LINESIZE 80
|
||||
|
@ -1310,8 +1310,7 @@ doglobal(void)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
fputs("ed [-s][-p][file]\n", stderr);
|
||||
exit(1);
|
||||
eprintf("usage: %s [-s] [-p] [file]\n", argv0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
3
grep.c
3
grep.c
|
@ -166,7 +166,8 @@ end:
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
enprintf(Error, "usage: %s [-EFHchilnqsvwx] [-e pattern] [-f file] [pattern] [file ...]\n", argv0);
|
||||
enprintf(Error, "usage: %s [-EFHchilnqsvwx] [-e pattern] [-f file] "
|
||||
"[pattern] [file ...]\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
1
join.c
1
join.c
|
@ -5,7 +5,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "arg.h"
|
||||
#include "text.h"
|
||||
#include "utf.h"
|
||||
#include "util.h"
|
||||
|
|
2
renice.c
2
renice.c
|
@ -37,7 +37,7 @@ renice(int which, int who, long adj)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("renice -n num [-g | -p | -u] id ...\n");
|
||||
eprintf("usage: %s -n num [-g | -p | -u] id ...\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
4
seq.c
4
seq.c
|
@ -72,8 +72,8 @@ format:
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [-f fmt] [-s sep] [-w] [startnum"
|
||||
" [step]] endnum\n", argv0);
|
||||
eprintf("usage: %s [-f fmt] [-s sep] [-w] "
|
||||
"[startnum [step]] endnum\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
6
tar.c
6
tar.c
|
@ -490,8 +490,10 @@ xt(int argc, char *argv[], int mode)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [-C dir] [-J | -Z | -a | -j | -z] -x [-m | -t] [-f file] [file ...]\n"
|
||||
" %s [-C dir] [-J | -Z | -a | -j | -z] [-h] -c path ... [-f file]\n", argv0, argv0);
|
||||
eprintf("usage: %s [-C dir] [-J | -Z | -a | -j | -z] -x [-m | -t] "
|
||||
"[-f file] [file ...]\n"
|
||||
" %s [-C dir] [-J | -Z | -a | -j | -z] [-h] -c path ... "
|
||||
"[-f file]\n", argv0, argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
3
touch.c
3
touch.c
|
@ -111,7 +111,8 @@ parsetime(char *str, time_t current)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s [-acm] [-d time | -r ref_file | -t time | -T time] file ...\n", argv0);
|
||||
eprintf("usage: %s [-acm] [-d time | -r ref_file | -t time | -T time] "
|
||||
"file ...\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
1
which.c
1
which.c
|
@ -9,7 +9,6 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "arg.h"
|
||||
#include "util.h"
|
||||
|
||||
static int aflag;
|
||||
|
|
Loading…
Reference in New Issue
Block a user