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
|
static void
|
||||||
usage(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
|
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
|
static void
|
||||||
usage(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
|
int
|
||||||
|
|
5
ed.c
5
ed.c
|
@ -13,7 +13,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "arg.h"
|
#include "util.h"
|
||||||
|
|
||||||
#define REGEXSIZE 100
|
#define REGEXSIZE 100
|
||||||
#define LINESIZE 80
|
#define LINESIZE 80
|
||||||
|
@ -1310,8 +1310,7 @@ doglobal(void)
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fputs("ed [-s][-p][file]\n", stderr);
|
eprintf("usage: %s [-s] [-p] [file]\n", argv0);
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
2
find.c
2
find.c
|
@ -992,7 +992,7 @@ find(char *path, struct findhist *hist)
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-H|-L] path... [expression...]\n", argv0);
|
eprintf("usage: %s [-H | -L] path ... [expression ...]\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
3
grep.c
3
grep.c
|
@ -166,7 +166,8 @@ end:
|
||||||
static void
|
static void
|
||||||
usage(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
|
int
|
||||||
|
|
1
join.c
1
join.c
|
@ -5,7 +5,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "arg.h"
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "utf.h"
|
#include "utf.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
2
renice.c
2
renice.c
|
@ -37,7 +37,7 @@ renice(int which, int who, long adj)
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("renice -n num [-g | -p | -u] id ...\n");
|
eprintf("usage: %s -n num [-g | -p | -u] id ...\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
4
seq.c
4
seq.c
|
@ -72,8 +72,8 @@ format:
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-f fmt] [-s sep] [-w] [startnum"
|
eprintf("usage: %s [-f fmt] [-s sep] [-w] "
|
||||||
" [step]] endnum\n", argv0);
|
"[startnum [step]] endnum\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
6
tar.c
6
tar.c
|
@ -490,8 +490,10 @@ xt(int argc, char *argv[], int mode)
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-C dir] [-J | -Z | -a | -j | -z] -x [-m | -t] [-f file] [file ...]\n"
|
eprintf("usage: %s [-C dir] [-J | -Z | -a | -j | -z] -x [-m | -t] "
|
||||||
" %s [-C dir] [-J | -Z | -a | -j | -z] [-h] -c path ... [-f file]\n", argv0, argv0);
|
"[-f file] [file ...]\n"
|
||||||
|
" %s [-C dir] [-J | -Z | -a | -j | -z] [-h] -c path ... "
|
||||||
|
"[-f file]\n", argv0, argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
3
touch.c
3
touch.c
|
@ -111,7 +111,8 @@ parsetime(char *str, time_t current)
|
||||||
static void
|
static void
|
||||||
usage(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
|
int
|
||||||
|
|
1
which.c
1
which.c
|
@ -9,7 +9,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "arg.h"
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
static int aflag;
|
static int aflag;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user