diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-06 08:11:08 +0000 |
|---|---|---|
| committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-06 08:11:08 +0000 |
| commit | 8f7d38970046c0ea53de911084561b79ffb2d6b9 (patch) | |
| tree | b19ed436f9361694ce3d071f3a8ec5957042c8e4 /include | |
| parent | e11a01cc34ab024b81ca83fec5182c6a444d4798 (diff) | |
| download | busybox-w32-8f7d38970046c0ea53de911084561b79ffb2d6b9.tar.gz busybox-w32-8f7d38970046c0ea53de911084561b79ffb2d6b9.tar.bz2 busybox-w32-8f7d38970046c0ea53de911084561b79ffb2d6b9.zip | |
- new applet diff. Rob Sullivan writes:
Here's my attempt at a mini diff applet - it's adapted from the code at
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/diff/, and only supports
unified diffs.
I've busyboxified everything to a reasonable degree, so I think the code is
suitable enough to be included, but there's still a fair bit of cleaning up
to be done.
Diffstat (limited to 'include')
| -rw-r--r-- | include/applets.h | 1 | ||||
| -rw-r--r-- | include/usage.h | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h index 0f239822c..f0c6f7a0e 100644 --- a/include/applets.h +++ b/include/applets.h | |||
| @@ -86,6 +86,7 @@ USE_DELGROUP(APPLET(delgroup, delgroup_main, _BB_DIR_BIN, _BB_SUID_NEVER)) | |||
| 86 | USE_DELUSER(APPLET(deluser, deluser_main, _BB_DIR_BIN, _BB_SUID_NEVER)) | 86 | USE_DELUSER(APPLET(deluser, deluser_main, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| 87 | USE_DEVFSD(APPLET(devfsd, devfsd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) | 87 | USE_DEVFSD(APPLET(devfsd, devfsd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| 88 | USE_DF(APPLET(df, df_main, _BB_DIR_BIN, _BB_SUID_NEVER)) | 88 | USE_DF(APPLET(df, df_main, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| 89 | USE_DIFF(APPLET(diff, diff_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | ||
| 89 | USE_DIRNAME(APPLET(dirname, dirname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 90 | USE_DIRNAME(APPLET(dirname, dirname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| 90 | USE_DMESG(APPLET(dmesg, dmesg_main, _BB_DIR_BIN, _BB_SUID_NEVER)) | 91 | USE_DMESG(APPLET(dmesg, dmesg_main, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| 91 | USE_DNSD(APPLET(dnsd, dnsd_main, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS)) | 92 | USE_DNSD(APPLET(dnsd, dnsd_main, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS)) |
diff --git a/include/usage.h b/include/usage.h index 0ac0284ce..2eb548bcf 100644 --- a/include/usage.h +++ b/include/usage.h | |||
| @@ -453,6 +453,26 @@ | |||
| 453 | "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ | 453 | "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ |
| 454 | "/dev/sda3 8690864 8553540 137324 98% /\n" | 454 | "/dev/sda3 8690864 8553540 137324 98% /\n" |
| 455 | 455 | ||
| 456 | #define diff_trivial_usage \ | ||
| 457 | "[-abdiNqrTstw] [-S FILE] [-U LINES] FILE1 FILE2" | ||
| 458 | #define diff_full_usage \ | ||
| 459 | "Compare files line by line and output the differences between them.\n" \ | ||
| 460 | "This diff implementation only supports unified diffs.\n\n" \ | ||
| 461 | "Options:\n" \ | ||
| 462 | "\t-a\tTreat all files as text\n" \ | ||
| 463 | "\t-b\tIgnore changes in the amount of whitespace\n" \ | ||
| 464 | "\t-d\tTry hard to find a smaller set of changes\n" \ | ||
| 465 | "\t-i\tIgnore case differences\n" \ | ||
| 466 | "\t-N\tTreat absent files as empty\n" \ | ||
| 467 | "\t-q\tOutput only whether files differ\n" \ | ||
| 468 | "\t-r\tRecursively compare any subdirectories\n" \ | ||
| 469 | "\t-S\tStart with FILE when comparing directories\n" \ | ||
| 470 | "\t-T\tMake tabs line up by prefixing a tab when necessary\n" \ | ||
| 471 | "\t-s\tReport when two files are the same\n" \ | ||
| 472 | "\t-t\tExpand tabs to spaces in output\n" \ | ||
| 473 | "\t-U\tOutput LINES lines of context\n" \ | ||
| 474 | "\t-w\tIgnore all whitespace\n" | ||
| 475 | |||
| 456 | #define dirname_trivial_usage \ | 476 | #define dirname_trivial_usage \ |
| 457 | "FILENAME" | 477 | "FILENAME" |
| 458 | #define dirname_full_usage \ | 478 | #define dirname_full_usage \ |
