diff options
author | Pere Orga <gotrunks@gmail.com> | 2011-04-01 22:56:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-03 01:33:55 +0200 |
commit | 6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch) | |
tree | b7d40d6e0c6042f0d102101ff7b5784d2f0536ba /editors | |
parent | fa9126e68904b16aee2a0fc47688ffe17403152a (diff) | |
download | busybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz |
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 8 | ||||
-rw-r--r-- | editors/cmp.c | 9 | ||||
-rw-r--r-- | editors/diff.c | 22 | ||||
-rw-r--r-- | editors/ed.c | 3 | ||||
-rw-r--r-- | editors/sed.c | 17 | ||||
-rw-r--r-- | editors/vi.c | 13 |
6 files changed, 72 insertions, 0 deletions
diff --git a/editors/awk.c b/editors/awk.c index 2eeb9d77a..9d38b1f88 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -7,6 +7,14 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//usage:#define awk_trivial_usage +//usage: "[OPTIONS] [AWK_PROGRAM] [FILE]..." +//usage:#define awk_full_usage "\n\n" +//usage: "Options:" +//usage: "\n -v VAR=VAL Set variable" +//usage: "\n -F SEP Use SEP as field separator" +//usage: "\n -f FILE Read program from FILE" + #include "libbb.h" #include "xregex.h" #include <math.h> diff --git a/editors/cmp.c b/editors/cmp.c index f84a56e3e..3a0f5aa4f 100644 --- a/editors/cmp.c +++ b/editors/cmp.c @@ -10,6 +10,15 @@ /* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */ /* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */ +//usage:#define cmp_trivial_usage +//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" +//usage:#define cmp_full_usage "\n\n" +//usage: "Compare FILE1 with FILE2 (or stdin)\n" +//usage: "\nOptions:" +//usage: "\n -l Write the byte numbers (decimal) and values (octal)" +//usage: "\n for all differing bytes" +//usage: "\n -s Quiet" + #include "libbb.h" static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n"; diff --git a/editors/diff.c b/editors/diff.c index 3719bb49f..daa58af9b 100644 --- a/editors/diff.c +++ b/editors/diff.c @@ -76,6 +76,28 @@ * 6n words for files of length n. */ +//usage:#define diff_trivial_usage +//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" +//usage:#define diff_full_usage "\n\n" +//usage: "Compare files line by line and output the differences between them.\n" +//usage: "This implementation supports unified diffs only.\n" +//usage: "\nOptions:" +//usage: "\n -a Treat all files as text" +//usage: "\n -b Ignore changes in the amount of whitespace" +//usage: "\n -B Ignore changes whose lines are all blank" +//usage: "\n -d Try hard to find a smaller set of changes" +//usage: "\n -i Ignore case differences" +//usage: "\n -L Use LABEL instead of the filename in the unified header" +//usage: "\n -N Treat absent files as empty" +//usage: "\n -q Output only whether files differ" +//usage: "\n -r Recurse" +//usage: "\n -S Start with FILE when comparing directories" +//usage: "\n -T Make tabs line up by prefixing a tab when necessary" +//usage: "\n -s Report when two files are the same" +//usage: "\n -t Expand tabs to spaces in output" +//usage: "\n -U Output LINES lines of context" +//usage: "\n -w Ignore all whitespace" + #include "libbb.h" #if 0 diff --git a/editors/ed.c b/editors/ed.c index b1b6a8d27..41ac88c32 100644 --- a/editors/ed.c +++ b/editors/ed.c @@ -7,6 +7,9 @@ * The "ed" built-in command (much simplified) */ +//usage:#define ed_trivial_usage "" +//usage:#define ed_full_usage "" + #include "libbb.h" typedef struct LINE { diff --git a/editors/sed.c b/editors/sed.c index d3555243f..9ab758bd7 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -58,6 +58,23 @@ Reference http://www.opengroup.org/onlinepubs/007904975/utilities/sed.html */ +//usage:#define sed_trivial_usage +//usage: "[-efinr] SED_CMD [FILE]..." +//usage:#define sed_full_usage "\n\n" +//usage: "Options:" +//usage: "\n -e CMD Add CMD to sed commands to be executed" +//usage: "\n -f FILE Add FILE contents to sed commands to be executed" +//usage: "\n -i Edit files in-place (else sends result to stdout)" +//usage: "\n -n Suppress automatic printing of pattern space" +//usage: "\n -r Use extended regex syntax" +//usage: "\n" +//usage: "\nIf no -e or -f, the first non-option argument is the sed command string." +//usage: "\nRemaining arguments are input files (stdin if none)." +//usage: +//usage:#define sed_example_usage +//usage: "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" +//usage: "bar\n" + #include "libbb.h" #include "xregex.h" diff --git a/editors/vi.c b/editors/vi.c index 602fc61d9..fd8bd0f78 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -21,6 +21,19 @@ * An "ex" line oriented mode- maybe using "cmdedit" */ +//usage:#define vi_trivial_usage +//usage: "[OPTIONS] [FILE]..." +//usage:#define vi_full_usage "\n\n" +//usage: "Edit FILE\n" +//usage: "\nOptions:" +//usage: IF_FEATURE_VI_COLON( +//usage: "\n -c Initial command to run ($EXINIT also available)" +//usage: ) +//usage: IF_FEATURE_VI_READONLY( +//usage: "\n -R Read-only" +//usage: ) +//usage: "\n -H Short help regarding available features" + #include "libbb.h" /* the CRASHME code is unmaintained, and doesn't currently build */ |