aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c8
-rw-r--r--coreutils/cat.c7
-rw-r--r--coreutils/chroot.c9
-rw-r--r--coreutils/cut.c14
-rw-r--r--coreutils/date.c11
-rw-r--r--coreutils/dd.c17
-rw-r--r--coreutils/df.c6
-rw-r--r--coreutils/dirname.c7
-rw-r--r--coreutils/du.c13
-rw-r--r--coreutils/echo.c13
-rw-r--r--coreutils/head.c13
-rw-r--r--coreutils/id.c11
-rw-r--r--coreutils/length.c7
-rw-r--r--coreutils/ln.c13
-rw-r--r--coreutils/logname.c6
-rw-r--r--coreutils/ls.c57
-rw-r--r--coreutils/md5sum.c17
-rw-r--r--coreutils/mkdir.c12
-rw-r--r--coreutils/mkfifo.c8
-rw-r--r--coreutils/mknod.c12
-rw-r--r--coreutils/printf.c7
-rw-r--r--coreutils/rm.c11
-rw-r--r--coreutils/rmdir.c7
-rw-r--r--coreutils/sleep.c6
-rw-r--r--coreutils/sort.c12
-rw-r--r--coreutils/sync.c7
-rw-r--r--coreutils/tail.c34
-rw-r--r--coreutils/tee.c14
-rw-r--r--coreutils/test.c9
-rw-r--r--coreutils/touch.c10
-rw-r--r--coreutils/tr.c13
-rw-r--r--coreutils/tty.c8
-rw-r--r--coreutils/uname.c18
-rw-r--r--coreutils/uniq.c10
-rw-r--r--coreutils/usleep.c6
-rw-r--r--coreutils/uudecode.c9
-rw-r--r--coreutils/uuencode.c9
-rw-r--r--coreutils/wc.c13
-rw-r--r--coreutils/whoami.c6
-rw-r--r--coreutils/yes.c7
40 files changed, 6 insertions, 471 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 5678c4433..5b83eef49 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -24,14 +24,6 @@
24#include "internal.h" 24#include "internal.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27const char *basename_usage="basename FILE [SUFFIX]\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nStrips directory path and suffixes from FILE.\n"
30 "If specified, also removes any trailing SUFFIX.\n"
31#endif
32;
33
34
35extern int basename_main(int argc, char **argv) 27extern int basename_main(int argc, char **argv)
36{ 28{
37 int m, n; 29 int m, n;
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 6c17ee620..c27f07e82 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -34,13 +34,6 @@ static void print_file(FILE * file)
34 fflush(stdout); 34 fflush(stdout);
35} 35}
36 36
37static const char cat_usage[] =
38 "cat [FILE]...\n"
39#ifndef BB_FEATURE_TRIVIAL_HELP
40 "\nConcatenates FILE(s) and prints them to stdout.\n"
41#endif
42 ;
43
44extern int cat_main(int argc, char **argv) 37extern int cat_main(int argc, char **argv)
45{ 38{
46 FILE *file; 39 FILE *file;
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 95aed3d17..9b1a5a82d 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -27,15 +27,6 @@
27#include <stdio.h> 27#include <stdio.h>
28#include <errno.h> 28#include <errno.h>
29 29
30
31static const char chroot_usage[] = "chroot NEWROOT [COMMAND...]\n"
32#ifndef BB_FEATURE_TRIVIAL_HELP
33 "\nRun COMMAND with root directory set to NEWROOT.\n"
34#endif
35 ;
36
37
38
39int chroot_main(int argc, char **argv) 30int chroot_main(int argc, char **argv)
40{ 31{
41 char *prog; 32 char *prog;
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 08b4586a4..8b28fff7a 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -206,20 +206,6 @@ void cut()
206 } 206 }
207} 207}
208 208
209const char cut_usage[] =
210 "cut [OPTION]... [FILE]...\n"
211#ifndef BB_FEATURE_TRIVIAL_HELP
212 "\nPrints selected fields from each input FILE to standard output.\n\n"
213 "Options:\n"
214 "\t-b LIST\tOutput only bytes from LIST\n"
215 "\t-c LIST\tOutput only characters from LIST\n"
216 "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n"
217 "\t-s\tOnly output Lines if the include DELIM\n"
218 "\t-f N\tPrint only these fields\n"
219 "\t-n\tIgnored\n"
220#endif
221 ;
222
223int cut_main(int argc, char **argv) 209int cut_main(int argc, char **argv)
224{ 210{
225 int i = 1; 211 int i = 1;
diff --git a/coreutils/date.c b/coreutils/date.c
index 3ede1237c..b6fc6c686 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -39,17 +39,6 @@
39 an RFC 822 complient date output for shell scripting 39 an RFC 822 complient date output for shell scripting
40 mail commands */ 40 mail commands */
41 41
42static const char date_usage[] = "date [OPTION]... [+FORMAT]\n"
43 " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n"
44#ifndef BB_FEATURE_TRIVIAL_HELP
45 "\nDisplays the current time in the given FORMAT, or sets the system date.\n"
46 "\nOptions:\n\t-R\tOutputs RFC-822 compliant date string\n"
47 "\t-s\tSets time described by STRING\n"
48 "\t-u\tPrints or sets Coordinated Universal Time\n"
49#endif
50 ;
51
52
53/* Input parsing code is always bulky - used heavy duty libc stuff as 42/* Input parsing code is always bulky - used heavy duty libc stuff as
54 much as possible, missed out a lot of bounds checking */ 43 much as possible, missed out a lot of bounds checking */
55 44
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 6261dfef5..86899194c 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -40,23 +40,6 @@
40typedef unsigned long long int uintmax_t; 40typedef unsigned long long int uintmax_t;
41#endif 41#endif
42 42
43static const char dd_usage[] =
44 "dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N]\n"
45#ifndef BB_FEATURE_TRIVIAL_HELP
46 "\nCopy a file, converting and formatting according to options\n\n"
47 "\tif=FILE\tread from FILE instead of stdin\n"
48 "\tof=FILE\twrite to FILE instead of stdout\n"
49 "\tbs=N\tread and write N bytes at a time\n"
50 "\tcount=N\tcopy only N input blocks\n"
51 "\tskip=N\tskip N input blocks\n"
52 "\tseek=N\tskip N output blocks\n"
53 "\n"
54 "Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)\n"
55#endif
56 ;
57
58
59
60extern int dd_main(int argc, char **argv) 43extern int dd_main(int argc, char **argv)
61{ 44{
62 char *inFile = NULL; 45 char *inFile = NULL;
diff --git a/coreutils/df.c b/coreutils/df.c
index 62226ceb8..714c79965 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -28,12 +28,6 @@
28#include <sys/stat.h> 28#include <sys/stat.h>
29#include <sys/vfs.h> 29#include <sys/vfs.h>
30 30
31static const char df_usage[] = "df [filesystem ...]\n"
32#ifndef BB_FEATURE_TRIVIAL_HELP
33 "\nPrint the filesystem space used and space available.\n"
34#endif
35 ;
36
37extern const char mtab_file[]; /* Defined in utility.c */ 31extern const char mtab_file[]; /* Defined in utility.c */
38 32
39static int df(char *device, const char *mountPoint) 33static int df(char *device, const char *mountPoint)
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index 0b60ceb88..e63fef30b 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -23,13 +23,6 @@
23#include "internal.h" 23#include "internal.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26const char dirname_usage[] =
27 "dirname [FILENAME ...]\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nStrips non-directory suffix from FILENAME\n"
30#endif
31 ;
32
33extern int dirname_main(int argc, char **argv) 26extern int dirname_main(int argc, char **argv)
34{ 27{
35 char* s; 28 char* s;
diff --git a/coreutils/du.c b/coreutils/du.c
index f1a44427a..147914c9e 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -35,17 +35,6 @@
35 35
36typedef void (Display) (long, char *); 36typedef void (Display) (long, char *);
37 37
38static const char du_usage[] =
39 "du [OPTION]... [FILE]...\n"
40#ifndef BB_FEATURE_TRIVIAL_HELP
41 "\nSummarizes disk space used for each FILE and/or directory.\n"
42 "Disk space is printed in units of 1024 bytes.\n\n"
43 "Options:\n"
44 "\t-l\tcount sizes many times if hard linked\n"
45 "\t-s\tdisplay only a total for each argument\n"
46#endif
47 ;
48
49static int du_depth = 0; 38static int du_depth = 0;
50static int count_hardlinks = 0; 39static int count_hardlinks = 0;
51 40
@@ -174,7 +163,7 @@ int du_main(int argc, char **argv)
174 return(0); 163 return(0);
175} 164}
176 165
177/* $Id: du.c,v 1.22 2000/07/14 18:38:26 andersen Exp $ */ 166/* $Id: du.c,v 1.23 2000/07/16 20:57:15 kraai Exp $ */
178/* 167/*
179Local Variables: 168Local Variables:
180c-file-style: "linux" 169c-file-style: "linux"
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 387ea3fef..73be8f2e2 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -25,17 +25,6 @@
25#include "internal.h" 25#include "internal.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28static const char uname_usage[] =
29 "echo [-neE] [ARG ...]\n"
30#ifndef BB_FEATURE_TRIVIAL_HELP
31 "\nPrints the specified ARGs to stdout\n\n"
32 "Options:\n"
33 "\t-n\tsuppress trailing newline\n"
34 "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n"
35 "\t-E\tdisable interpretation of backslash-escaped characters\n"
36#endif
37 ;
38
39extern int 28extern int
40echo_main(int argc, char** argv) 29echo_main(int argc, char** argv)
41{ 30{
@@ -58,7 +47,7 @@ echo_main(int argc, char** argv)
58 eflag = 0; 47 eflag = 0;
59 break; 48 break;
60 default: 49 default:
61 usage(uname_usage); 50 usage(echo_usage);
62 } 51 }
63 } 52 }
64 53
diff --git a/coreutils/head.c b/coreutils/head.c
index b82678dc2..58b3cae68 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -26,17 +26,6 @@
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
28 28
29const char head_usage[] =
30 "head [OPTION] [FILE]...\n"
31#ifndef BB_FEATURE_TRIVIAL_HELP
32 "\nPrint first 10 lines of each FILE to standard output.\n"
33 "With more than one FILE, precede each with a header giving the\n"
34 "file name. With no FILE, or when FILE is -, read standard input.\n\n"
35
36 "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10\n"
37#endif
38 ;
39
40int head(int len, FILE * src) 29int head(int len, FILE * src)
41{ 30{
42 int i; 31 int i;
@@ -111,4 +100,4 @@ int head_main(int argc, char **argv)
111 return(0); 100 return(0);
112} 101}
113 102
114/* $Id: head.c,v 1.12 2000/07/14 01:51:25 kraai Exp $ */ 103/* $Id: head.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */
diff --git a/coreutils/id.c b/coreutils/id.c
index 69dfe2658..56a2e279f 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -28,17 +28,6 @@
28#include <grp.h> 28#include <grp.h>
29#include <sys/types.h> 29#include <sys/types.h>
30 30
31static const char id_usage[] =
32 "id [OPTIONS]... [USERNAME]\n"
33#ifndef BB_FEATURE_TRIVIAL_HELP
34 "\nPrint information for USERNAME or the current user\n\n"
35 "Options:\n"
36 "\t-g\tprints only the group ID\n"
37 "\t-u\tprints only the user ID\n"
38 "\t-r\tprints the real user ID instead of the effective ID (with -ug)\n\n"
39#endif
40 ;
41
42extern int id_main(int argc, char **argv) 31extern int id_main(int argc, char **argv)
43{ 32{
44 int no_user = 0, no_group = 0, print_real = 0; 33 int no_user = 0, no_group = 0, print_real = 0;
diff --git a/coreutils/length.c b/coreutils/length.c
index 82f50c159..cf4fb1c07 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -4,13 +4,6 @@
4#include <string.h> 4#include <string.h>
5#include <stdio.h> 5#include <stdio.h>
6 6
7const char length_usage[] =
8 "length STRING\n"
9#ifndef BB_FEATURE_TRIVIAL_HELP
10 "\nPrints out the length of the specified STRING.\n"
11#endif
12 ;
13
14extern int length_main(int argc, char **argv) 7extern int length_main(int argc, char **argv)
15{ 8{
16 if (argc != 2 || **(argv + 1) == '-') 9 if (argc != 2 || **(argv + 1) == '-')
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 9f7774380..8b8fa1c58 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -30,19 +30,6 @@
30#include <dirent.h> 30#include <dirent.h>
31#include <errno.h> 31#include <errno.h>
32 32
33static const char ln_usage[] =
34 "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n"
35#ifndef BB_FEATURE_TRIVIAL_HELP
36 "\nCreate a link named LINK_NAME or DIRECTORY to the specified TARGET\n"
37 "\nYou may use '--' to indicate that all following arguments are non-options.\n\n"
38 "Options:\n"
39 "\t-s\tmake symbolic links instead of hard links\n"
40
41 "\t-f\tremove existing destination files\n"
42 "\t-n\tno dereference symlinks - treat like normal file\n"
43#endif
44 ;
45
46static int symlinkFlag = FALSE; 33static int symlinkFlag = FALSE;
47static int removeoldFlag = FALSE; 34static int removeoldFlag = FALSE;
48static int followLinks = TRUE; 35static int followLinks = TRUE;
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 12ebfbde6..a0aff42d6 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -23,12 +23,6 @@
23#include "internal.h" 23#include "internal.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26static const char logname_usage[] = "logname\n"
27#ifndef BB_FEATURE_TRIVIAL_HELP
28 "\nPrint the name of the current user.\n"
29#endif
30 ;
31
32extern int logname_main(int argc, char **argv) 26extern int logname_main(int argc, char **argv)
33{ 27{
34 char *user = xmalloc(9); 28 char *user = xmalloc(9);
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 0644cde87..e56e3bcfb 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -427,63 +427,6 @@ static int list_item(const char *name)
427 return 1; 427 return 1;
428} 428}
429 429
430static const char ls_usage[] = "ls [-1a"
431#ifdef BB_FEATURE_LS_TIMESTAMPS
432 "c"
433#endif
434 "d"
435#ifdef BB_FEATURE_LS_TIMESTAMPS
436 "e"
437#endif
438 "ln"
439#ifdef BB_FEATURE_LS_FILETYPES
440 "p"
441#endif
442#ifdef BB_FEATURE_LS_TIMESTAMPS
443 "u"
444#endif
445 "xAC"
446#ifdef BB_FEATURE_LS_FILETYPES
447 "F"
448#endif
449#ifdef BB_FEATURE_LS_RECURSIVE
450 "R"
451#endif
452 "] [filenames...]\n"
453#ifndef BB_FEATURE_TRIVIAL_HELP
454 "\nList directory contents\n\n"
455 "Options:\n"
456 "\t-a\tdo not hide entries starting with .\n"
457#ifdef BB_FEATURE_LS_TIMESTAMPS
458 "\t-c\twith -l: show ctime (the time of last\n"
459 "\t\tmodification of file status information)\n"
460#endif
461 "\t-d\tlist directory entries instead of contents\n"
462#ifdef BB_FEATURE_LS_TIMESTAMPS
463 "\t-e\tlist both full date and full time\n"
464#endif
465 "\t-l\tuse a long listing format\n"
466 "\t-n\tlist numeric UIDs and GIDs instead of names\n"
467#ifdef BB_FEATURE_LS_FILETYPES
468 "\t-p\tappend indicator (one of /=@|) to entries\n"
469#endif
470#ifdef BB_FEATURE_LS_TIMESTAMPS
471 "\t-u\twith -l: show access time (the time of last\n"
472 "\t\taccess of the file)\n"
473#endif
474 "\t-x\tlist entries by lines instead of by columns\n"
475 "\t-A\tdo not list implied . and ..\n"
476 "\t-C\tlist entries by columns\n"
477#ifdef BB_FEATURE_LS_FILETYPES
478 "\t-F\tappend indicator (one of */=@|) to entries\n"
479#endif
480#ifdef BB_FEATURE_LS_RECURSIVE
481 "\t-R\tlist subdirectories recursively\n"
482#endif
483#endif
484 ;
485
486
487#ifdef BB_FEATURE_LS_RECURSIVE 430#ifdef BB_FEATURE_LS_RECURSIVE
488static int dirAction(const char *fileName, struct stat *statbuf, void* junk) 431static int dirAction(const char *fileName, struct stat *statbuf, void* junk)
489{ 432{
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index e6f1c86b4..fad563fe7 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -582,23 +582,6 @@ static int status_only = 0; /* With -c, don't generate any output.
582static int warn = 0; /* With -w, print a message to standard error warning 582static int warn = 0; /* With -w, print a message to standard error warning
583 about each improperly formatted MD5 checksum line */ 583 about each improperly formatted MD5 checksum line */
584 584
585static const char md5sum_usage[] =
586 "md5sum [OPTION] [FILE]...\n"
587 "or: md5sum [OPTION] -c [FILE]\n"
588#ifndef BB_FEATURE_TRIVIAL_HELP
589 "\nPrint or check MD5 checksums.\n\n"
590 "Options:\n"
591 "With no FILE, or when FILE is -, read standard input.\n\n"
592 "\t-b\tread files in binary mode\n"
593 "\t-c\tcheck MD5 sums against given list\n"
594 "\t-t\tread files in text mode (default)\n"
595 "\t-g\tread a string\n"
596 "\nThe following two options are useful only when verifying checksums:\n"
597 "\t-s,\tdon't output anything, status code shows success\n"
598 "\t-w,\twarn about improperly formated MD5 checksum lines\n"
599#endif
600;
601
602static int split_3(char *s, 585static int split_3(char *s,
603 size_t s_len, 586 size_t s_len,
604 unsigned char **u, 587 unsigned char **u,
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index f6e08cadc..f824cdcb6 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -29,18 +29,6 @@
29#include <stdio.h> 29#include <stdio.h>
30#include <errno.h> 30#include <errno.h>
31 31
32static const char mkdir_usage[] =
33 "mkdir [OPTION] DIRECTORY...\n"
34#ifndef BB_FEATURE_TRIVIAL_HELP
35 "\nCreate the DIRECTORY(ies), if they do not already exist\n\n"
36 "Options:\n"
37
38 "\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
39 "\t-p\tno error if existing, make parent directories as needed\n"
40#endif
41 ;
42
43
44static int parentFlag = FALSE; 32static int parentFlag = FALSE;
45static mode_t mode = 0777; 33static mode_t mode = 0777;
46 34
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index f701a97d5..3db17bbbc 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -26,14 +26,6 @@
26#include <sys/stat.h> 26#include <sys/stat.h>
27#include <errno.h> 27#include <errno.h>
28 28
29static const char mkfifo_usage[] = "mkfifo [OPTIONS] name\n"
30#ifndef BB_FEATURE_TRIVIAL_HELP
31 "\nCreates a named pipe (identical to 'mknod name p')\n\n"
32 "Options:\n"
33 "\t-m\tcreate the pipe using the specified mode (default a=rw)\n"
34#endif
35 ;
36
37extern int mkfifo_main(int argc, char **argv) 29extern int mkfifo_main(int argc, char **argv)
38{ 30{
39 char *thisarg; 31 char *thisarg;
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index ac96817ee..b51c8f3e3 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -28,18 +28,6 @@
28#include <fcntl.h> 28#include <fcntl.h>
29#include <unistd.h> 29#include <unistd.h>
30 30
31static const char mknod_usage[] = "mknod [OPTIONS] NAME TYPE MAJOR MINOR\n"
32#ifndef BB_FEATURE_TRIVIAL_HELP
33 "\nCreate a special file (block, character, or pipe).\n\n"
34 "Options:\n"
35 "\t-m\tcreate the special file using the specified mode (default a=rw)\n\n"
36 "TYPEs include:\n"
37 "\tb:\tMake a block (buffered) device.\n"
38 "\tc or u:\tMake a character (un-buffered) device.\n"
39 "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n"
40#endif
41 ;
42
43int mknod_main(int argc, char **argv) 31int mknod_main(int argc, char **argv)
44{ 32{
45 char *thisarg; 33 char *thisarg;
diff --git a/coreutils/printf.c b/coreutils/printf.c
index f57289759..6a87fc319 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -137,13 +137,6 @@ static void verify __P((char *s, char *end));
137/* The value to return to the calling program. */ 137/* The value to return to the calling program. */
138static int exit_status; 138static int exit_status;
139 139
140static const char printf_usage[] = "printf FORMAT [ARGUMENT...]\n"
141#ifndef BB_FEATURE_TRIVIAL_HELP
142 "\nFormats and prints ARGUMENT(s) according to FORMAT,\n"
143 "Where FORMAT controls the output exactly as in C printf.\n"
144#endif
145 ;
146
147int printf_main(int argc, char **argv) 140int printf_main(int argc, char **argv)
148{ 141{
149 char *format; 142 char *format;
diff --git a/coreutils/rm.c b/coreutils/rm.c
index 2067d878c..275c05946 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -29,17 +29,6 @@
29#include <dirent.h> 29#include <dirent.h>
30#include <errno.h> 30#include <errno.h>
31 31
32static const char *rm_usage = "rm [OPTION]... FILE...\n"
33#ifndef BB_FEATURE_TRIVIAL_HELP
34 "\nRemove (unlink) the FILE(s). You may use '--' to\n"
35 "indicate that all following arguments are non-options.\n\n"
36 "Options:\n"
37 "\t-f\t\tremove existing destinations, never prompt\n"
38 "\t-r or -R\tremove the contents of directories recursively\n"
39#endif
40 ;
41
42
43static int recursiveFlag = FALSE; 32static int recursiveFlag = FALSE;
44static int forceFlag = FALSE; 33static int forceFlag = FALSE;
45static const char *srcName; 34static const char *srcName;
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 3c3533fae..500890e40 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -26,13 +26,6 @@
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28 28
29const char rmdir_usage[] =
30 "rmdir [OPTION]... DIRECTORY...\n"
31#ifndef BB_FEATURE_TRIVIAL_HELP
32 "\nRemove the DIRECTORY(ies), if they are empty.\n"
33#endif
34 ;
35
36extern int rmdir_main(int argc, char **argv) 29extern int rmdir_main(int argc, char **argv)
37{ 30{
38 if (argc == 1 || **(argv + 1) == '-') 31 if (argc == 1 || **(argv + 1) == '-')
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index c7ab32d4b..d6705c4c3 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -24,12 +24,6 @@
24#include "internal.h" 24#include "internal.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27const char sleep_usage[] = "sleep N\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nPause for N seconds.\n"
30#endif
31 ;
32
33extern int sleep_main(int argc, char **argv) 27extern int sleep_main(int argc, char **argv)
34{ 28{
35 if ((argc < 2) || (**(argv + 1) == '-')) { 29 if ((argc < 2) || (**(argv + 1) == '-')) {
diff --git a/coreutils/sort.c b/coreutils/sort.c
index c754989ea..6af5c4df3 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -29,16 +29,6 @@
29#include <stdio.h> 29#include <stdio.h>
30#include <errno.h> 30#include <errno.h>
31 31
32static const char sort_usage[] = "sort [-n]"
33#ifdef BB_FEATURE_SORT_REVERSE
34" [-r]"
35#endif
36" [FILE]...\n"
37#ifndef BB_FEATURE_TRIVIAL_HELP
38"\nSorts lines of text in the specified files\n"
39#endif
40;
41
42#ifdef BB_FEATURE_SORT_REVERSE 32#ifdef BB_FEATURE_SORT_REVERSE
43#define APPLY_REVERSE(x) (reverse ? -(x) : (x)) 33#define APPLY_REVERSE(x) (reverse ? -(x) : (x))
44static int reverse = 0; 34static int reverse = 0;
@@ -304,4 +294,4 @@ int sort_main(int argc, char **argv)
304 return(0); 294 return(0);
305} 295}
306 296
307/* $Id: sort.c,v 1.19 2000/07/14 01:51:25 kraai Exp $ */ 297/* $Id: sort.c,v 1.20 2000/07/16 20:57:15 kraai Exp $ */
diff --git a/coreutils/sync.c b/coreutils/sync.c
index f7c14b04c..3737cb1f1 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -24,13 +24,6 @@
24#include "internal.h" 24#include "internal.h"
25#include <stdio.h> 25#include <stdio.h>
26 26
27const char sync_usage[] =
28 "sync\n"
29#ifndef BB_FEATURE_TRIVIAL_HELP
30 "\nWrite all buffered filesystem blocks to disk.\n"
31#endif
32 ;
33
34extern int sync_main(int argc, char **argv) 27extern int sync_main(int argc, char **argv)
35{ 28{
36 if (argc > 1 && **(argv + 1) == '-') 29 if (argc > 1 && **(argv + 1) == '-')
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 9232356eb..cea63e840 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -72,21 +72,6 @@ static int forever;
72/* If nonzero, print filename headers. */ 72/* If nonzero, print filename headers. */
73static int print_headers; 73static int print_headers;
74 74
75const char tail_usage[] =
76 "tail [OPTION] [FILE]...\n"
77#ifndef BB_FEATURE_TRIVIAL_HELP
78 "\nPrint last 10 lines of each FILE to standard output.\n"
79 "With more than one FILE, precede each with a header giving the\n"
80 "file name. With no FILE, or when FILE is -, read standard input.\n\n"
81 "Options:\n"
82 "\t-n NUM\t\tPrint last NUM lines instead of first 10\n"
83
84 "\t-f\t\tOutput data as the file grows. This version\n"
85 "\t\t\tof 'tail -f' supports only one file at a time.\n"
86#endif
87 ;
88
89
90static void write_header(const char *filename) 75static void write_header(const char *filename)
91{ 76{
92 static int first_file = 1; 77 static int first_file = 1;
@@ -516,25 +501,6 @@ char *program_name;
516/* Nonzero if we have ever read standard input. */ 501/* Nonzero if we have ever read standard input. */
517static int have_read_stdin; 502static int have_read_stdin;
518 503
519
520static const char tail_usage[] = "tail [OPTION]... [FILE]...\n"
521#ifndef BB_FEATURE_TRIVIAL_HELP
522"\nPrint last 10 lines of each FILE to standard output.\n\
523With more than one FILE, precede each with a header giving the file name.\n\
524With no FILE, or when FILE is -, read standard input.\n\
525\n\
526 -c=N[kbm] output the last N bytes\n\
527 -f output appended data as the file grows\n\
528 -n=N output the last N lines, instead of last 10\n\
529 -q never output headers giving file names\n\
530 -v always output headers giving file names\n\
531\n\
532If the first character of N (bytes or lines) is a `+', output begins with \n\
533the Nth item from the start of each file, otherwise, print the last N items\n\
534in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).\n"
535#endif
536;
537
538static void write_header(const char *filename, const char *comment) 504static void write_header(const char *filename, const char *comment)
539{ 505{
540 static int first_file = 1; 506 static int first_file = 1;
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 67b42a24d..c15408b51 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -26,18 +26,6 @@
26#include <errno.h> 26#include <errno.h>
27#include <stdio.h> 27#include <stdio.h>
28 28
29static const char tee_usage[] =
30 "tee [OPTION]... [FILE]...\n"
31#ifndef BB_FEATURE_TRIVIAL_HELP
32 "\nCopy standard input to each FILE, and also to standard output.\n\n"
33 "Options:\n" "\t-a\tappend to the given FILEs, do not overwrite\n"
34#if 0
35 "\t-i\tignore interrupt signals\n"
36#endif
37#endif
38;
39
40
41/* FileList _______________________________________________________________ */ 29/* FileList _______________________________________________________________ */
42 30
43#define FL_MAX 1024 31#define FL_MAX 1024
@@ -133,4 +121,4 @@ int tee_main(int argc, char **argv)
133 return(0); 121 return(0);
134} 122}
135 123
136/* $Id: tee.c,v 1.12 2000/07/14 01:51:25 kraai Exp $ */ 124/* $Id: tee.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */
diff --git a/coreutils/test.c b/coreutils/test.c
index bf1622cde..9a1888b28 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -178,15 +178,6 @@ static int test_eaccess();
178static int is_a_group_member(); 178static int is_a_group_member();
179static void initialize_group_array(); 179static void initialize_group_array();
180 180
181const char test_usage[] =
182 "test EXPRESSION\n"
183 "or [ EXPRESSION ]\n"
184#ifndef BB_FEATURE_TRIVIAL_HELP
185 "\nChecks file types and compares values returning an exit\n"
186 "code determined by the value of EXPRESSION.\n"
187#endif
188 ;
189
190extern int 181extern int
191test_main(int argc, char** argv) 182test_main(int argc, char** argv)
192{ 183{
diff --git a/coreutils/touch.c b/coreutils/touch.c
index ac275423c..afdd265f7 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -30,16 +30,6 @@
30#include <utime.h> 30#include <utime.h>
31#include <errno.h> 31#include <errno.h>
32 32
33
34static const char touch_usage[] = "touch [-c] file [file ...]\n"
35#ifndef BB_FEATURE_TRIVIAL_HELP
36 "\nUpdate the last-modified date on the given file[s].\n\n"
37 "Options:\n"
38 "\t-c\tDo not create any files\n"
39#endif
40 ;
41
42
43extern int touch_main(int argc, char **argv) 33extern int touch_main(int argc, char **argv)
44{ 34{
45 int fd; 35 int fd;
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 2971ef68e..004092477 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -34,19 +34,6 @@
34#define bb_need_write_error 34#define bb_need_write_error
35#include "messages.c" 35#include "messages.c"
36 36
37const char *tr_usage="tr [-cds] STRING1 [STRING2]\n"
38#ifndef BB_FEATURE_TRIVIAL_HELP
39 "\nTranslate, squeeze, and/or delete characters from\n"
40 "standard input, writing to standard output.\n\n"
41 "Options:\n"
42 "\t-c\ttake complement of STRING1\n"
43 "\t-d\tdelete input characters coded STRING1\n"
44 "\t-s\tsqueeze multiple output characters of STRING2 into one character\n"
45#endif
46;
47
48
49
50#ifdef TRUE 37#ifdef TRUE
51#undef TRUE 38#undef TRUE
52#undef FALSE 39#undef FALSE
diff --git a/coreutils/tty.c b/coreutils/tty.c
index f3c7fb74f..bbc051f6b 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -24,14 +24,6 @@
24#include <stdio.h> 24#include <stdio.h>
25#include <sys/types.h> 25#include <sys/types.h>
26 26
27static const char tty_usage[] = "tty\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nPrint the file name of the terminal connected to standard input.\n\n"
30 "Options:\n"
31 "\t-s\tprint nothing, only return an exit status\n"
32#endif
33 ;
34
35extern int tty_main(int argc, char **argv) 27extern int tty_main(int argc, char **argv)
36{ 28{
37 char *tty; 29 char *tty;
diff --git a/coreutils/uname.c b/coreutils/uname.c
index b7c88ece5..55616dd19 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -40,24 +40,6 @@
40# include <sys/systeminfo.h> 40# include <sys/systeminfo.h>
41#endif 41#endif
42 42
43
44static const char uname_usage[] =
45 "uname [OPTION]...\n"
46#ifndef BB_FEATURE_TRIVIAL_HELP
47 "\nPrint certain system information. With no OPTION, same as -s.\n\n"
48 "Options:\n"
49 "\t-a\tprint all information\n"
50 "\t-m\tthe machine (hardware) type\n"
51 "\t-n\tprint the machine's network node hostname\n"
52 "\t-r\tprint the operating system release\n"
53 "\t-s\tprint the operating system name\n"
54
55 "\t-p\tprint the host processor type\n"
56 "\t-v\tprint the operating system version\n"
57#endif
58 ;
59
60
61static void print_element(unsigned int mask, char *element); 43static void print_element(unsigned int mask, char *element);
62 44
63/* Values that are bitwise or'd into `toprint'. */ 45/* Values that are bitwise or'd into `toprint'. */
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 16b257670..016fc7780 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -27,14 +27,6 @@
27#include <string.h> 27#include <string.h>
28#include <errno.h> 28#include <errno.h>
29 29
30static const char uniq_usage[] =
31 "uniq [OPTION]... [INPUT [OUTPUT]]\n"
32#ifndef BB_FEATURE_TRIVIAL_HELP
33 "\nDiscard all but one of successive identical lines from INPUT\n"
34 "(or standard input), writing to OUTPUT (or standard output).\n"
35#endif
36 ;
37
38/* max chars in line */ 30/* max chars in line */
39#define UNIQ_MAX 4096 31#define UNIQ_MAX 4096
40 32
@@ -187,4 +179,4 @@ int uniq_main(int argc, char **argv)
187 return(0); 179 return(0);
188} 180}
189 181
190/* $Id: uniq.c,v 1.12 2000/07/14 01:51:25 kraai Exp $ */ 182/* $Id: uniq.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index da6cca9ab..fcdf3bbf6 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -25,12 +25,6 @@
25#include <stdlib.h> 25#include <stdlib.h>
26#include <unistd.h> 26#include <unistd.h>
27 27
28const char usleep_usage[] = "usleep N\n"
29#ifndef BB_FEATURE_TRIVIAL_HELP
30 "\nPause for N microseconds.\n"
31#endif
32 ;
33
34extern int usleep_main(int argc, char **argv) 28extern int usleep_main(int argc, char **argv)
35{ 29{
36 if ((argc < 2) || (**(argv + 1) == '-')) { 30 if ((argc < 2) || (**(argv + 1) == '-')) {
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 12a71a573..90bef9238 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -300,15 +300,6 @@ static int decode (const char *inname,
300 return read_stduu (inname); 300 return read_stduu (inname);
301} 301}
302 302
303static const char uudecode_usage[] =
304 "uudecode [FILE]...\n"
305#ifndef BB_FEATURE_TRIVIAL_HELP
306 "\nUudecode a file that is uuencoded.\n\n"
307 "Options:\n"
308 "\t-o FILE\tdirect output to FILE\n"
309#endif
310;
311
312int uudecode_main (int argc, 303int uudecode_main (int argc,
313 char **argv) 304 char **argv)
314{ 305{
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index e107a01e7..1433c7f3b 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -180,15 +180,6 @@ static void encode()
180 } 180 }
181} 181}
182 182
183static const char uuencode_usage[] =
184 "uuencode [OPTION] [INFILE] REMOTEFILE\n"
185#ifndef BB_FEATURE_TRIVIAL_HELP
186 "\nUuencode a file.\n\n"
187 "Options:\n"
188 "\t-m\tuse base64 encoding as of RFC1521\n"
189#endif
190;
191
192int uuencode_main (int argc, 183int uuencode_main (int argc,
193 char **argv) 184 char **argv)
194{ 185{
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 3b0e589b6..058444d89 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -23,19 +23,6 @@
23#include "internal.h" 23#include "internal.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26static const char wc_usage[] = "wc [OPTION]... [FILE]...\n"
27#ifndef BB_FEATURE_TRIVIAL_HELP
28 "\nPrint line, word, and byte counts for each FILE, and a total line if\n"
29 "more than one FILE is specified. With no FILE, read standard input.\n\n"
30 "Options:\n"
31 "\t-c\tprint the byte counts\n"
32 "\t-l\tprint the newline counts\n"
33
34 "\t-L\tprint the length of the longest line\n"
35 "\t-w\tprint the word counts\n"
36#endif
37 ;
38
39static int total_lines, total_words, total_chars, max_length; 26static int total_lines, total_words, total_chars, max_length;
40static int print_lines, print_words, print_chars, print_length; 27static int print_lines, print_words, print_chars, print_length;
41 28
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 01dff81f9..84b27fe58 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -24,12 +24,6 @@
24#include <stdio.h> 24#include <stdio.h>
25#include <pwd.h> 25#include <pwd.h>
26 26
27static const char whoami_usage[] = "whoami\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nPrints the user name associated with the current effective user id.\n"
30#endif
31 ;
32
33extern int whoami_main(int argc, char **argv) 27extern int whoami_main(int argc, char **argv)
34{ 28{
35 char *user = xmalloc(9); 29 char *user = xmalloc(9);
diff --git a/coreutils/yes.c b/coreutils/yes.c
index 0191bb003..f41bbb6ef 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -23,13 +23,6 @@
23#include "internal.h" 23#include "internal.h"
24#include <stdio.h> 24#include <stdio.h>
25 25
26const char yes_usage[] =
27 "yes [OPTION]... [STRING]...\n"
28#ifndef BB_FEATURE_TRIVIAL_HELP
29 "\nRepeatedly outputs a line with all specified STRING(s), or `y'.\n"
30#endif
31 ;
32
33extern int yes_main(int argc, char **argv) 26extern int yes_main(int argc, char **argv)
34{ 27{
35 int i; 28 int i;