Cleanup usage() across sbase

Some tools didn't use argv0 for tool name, or usage() at all.
master
Quentin Rameau 7 years ago committed by sin
parent 00d7bf4ea5
commit 6e7743eb56

@ -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

@ -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

@ -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

@ -992,7 +992,7 @@ find(char *path, struct findhist *hist)
static void
usage(void)
{
eprintf("usage: %s [-H|-L] path... [expression...]\n", argv0);
eprintf("usage: %s [-H | -L] path ... [expression ...]\n", argv0);
}
int

@ -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

@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include "arg.h"
#include "text.h"
#include "utf.h"
#include "util.h"

@ -94,7 +94,7 @@ usage(void)
{
eprintf("usage: %s [-p] [-b type] [-d delim] [-f type]\n"
" [-h type] [-i num] [-l num] [-n format]\n"
" [-s sep] [-v num] [-w num] [file]\n", argv0);
" [-s sep] [-v num] [-w num] [file]\n", argv0);
}
static char

@ -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

@ -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

@ -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

@ -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

@ -9,7 +9,6 @@
#include <string.h>
#include <unistd.h>
#include "arg.h"
#include "util.h"
static int aflag;

@ -188,7 +188,8 @@ spawn(void)
static void
usage(void)
{
eprintf("usage: %s [-rtx] [-E eofstr] [-n num] [-s num] [cmd [arg ...]]\n", argv0);
eprintf("usage: %s [-rtx] [-E eofstr] [-n num] [-s num] "
"[cmd [arg ...]]\n", argv0);
}
int

Loading…
Cancel
Save