diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-15 00:23:06 +0300 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-15 00:23:06 +0300 |
commit | 67991cf824f8df27e74c92d754fb507681c69ce6 (patch) | |
tree | a0b652f3dc794d1050c1a8de3afb014a621238fa /miscutils | |
parent | 68be2ab914e1e20fe666bbd22a89a18714be2789 (diff) |
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/dc.c | 2 | ||||
-rw-r--r-- | miscutils/dutmp.c | 4 | ||||
-rw-r--r-- | miscutils/makedevs.c | 4 | ||||
-rw-r--r-- | miscutils/mktemp.c | 2 | ||||
-rw-r--r-- | miscutils/mt.c | 4 | ||||
-rw-r--r-- | miscutils/readlink.c | 2 | ||||
-rw-r--r-- | miscutils/update.c | 2 | ||||
-rw-r--r-- | miscutils/watchdog.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 122673a95..1e34574ed 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -169,7 +169,7 @@ int dc_main(int argc, char **argv) } } else { if (*argv[1]=='-') - usage(dc_usage); + show_usage(); while (argc >= 2) { stack_machine(argv[1]); argv++; diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c index 7e1d2eed7..2e6b3c056 100644 --- a/miscutils/dutmp.c +++ b/miscutils/dutmp.c @@ -33,7 +33,7 @@ extern int dutmp_main(int argc, char **argv) if (argc<2) { file = fileno(stdin); } else if (*argv[1] == '-' ) { - usage(dutmp_usage); + show_usage(); } else { file = open(argv[1], O_RDONLY); if (file < 0) { @@ -45,7 +45,7 @@ extern int dutmp_main(int argc, char **argv) * fact the stupid libc doesn't have a reliable #define to announce that libc5 * is being used. sigh. */ -#if ! defined __GLIBC__ +#if ! defined __GLIBC__ || defined __UCLIBC__ while (read(file, (void*)&ut, sizeof(struct utmp))) { printf("%d|%d|%s|%s|%s|%s|%s|%lx\n", ut.ut_type, ut.ut_pid, ut.ut_line, diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index f979871bd..eed3968c8 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -32,7 +32,7 @@ int makedevs_main(int argc, char **argv) char buf[255]; if (argc < 7 || *argv[1]=='-') - usage(makedevs_usage); + show_usage(); switch (type[0]) { case 'c': @@ -45,7 +45,7 @@ int makedevs_main(int argc, char **argv) mode = S_IFIFO; break; default: - usage(makedevs_usage); + show_usage(); } mode |= 0660; diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c index 3b9f2b22c..b3522026e 100644 --- a/miscutils/mktemp.c +++ b/miscutils/mktemp.c @@ -31,7 +31,7 @@ extern int mktemp_main(int argc, char **argv) { if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q"))) - usage(mktemp_usage); + show_usage(); if(mkstemp(argv[argc-1]) < 0) return EXIT_FAILURE; (void) puts(argv[argc-1]); diff --git a/miscutils/mt.c b/miscutils/mt.c index 683804b5a..eb93cb234 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -57,12 +57,12 @@ extern int mt_main(int argc, char **argv) int fd; if (argc < 2) { - usage(mt_usage); + show_usage(); } if (strcmp(argv[1], "-f") == 0) { if (argc < 4) { - usage(mt_usage); + show_usage(); } file = argv[2]; argv += 2; diff --git a/miscutils/readlink.c b/miscutils/readlink.c index 57f43d174..c82f64027 100644 --- a/miscutils/readlink.c +++ b/miscutils/readlink.c @@ -33,7 +33,7 @@ int readlink_main(int argc, char **argv) int bufsize = 128, size = 128; if (argc != 2) - usage(readlink_usage); + show_usage(); while (bufsize < size + 1) { bufsize *= 2; diff --git a/miscutils/update.c b/miscutils/update.c index 309ce0cbd..2cf4a98b2 100644 --- a/miscutils/update.c +++ b/miscutils/update.c @@ -64,7 +64,7 @@ extern int update_main(int argc, char **argv) flush_duration = atoi(optarg); break; default: - usage(update_usage); + show_usage(); } } diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 7026cc005..65d0fc35f 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -31,7 +31,7 @@ extern int watchdog_main(int argc, char **argv) int fd; if (argc != 2) { - usage(watchdog_usage); + show_usage(); } if ((fd=open(argv[1], O_WRONLY)) == -1) { |