From 4f731ce30ec2a9f5e9b231b47aa68f32b75feb35 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 15 Jun 2010 15:40:16 +0200 Subject: findutils/*: move usage and applet bits to *.c files Signed-off-by: Denys Vlasenko --- findutils/xargs.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'findutils/xargs.c') diff --git a/findutils/xargs.c b/findutils/xargs.c index 8caaff91c..46a62cbf1 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -1,7 +1,6 @@ /* vi: set sw=4 ts=4: */ /* * Mini xargs implementation for busybox - * Options are supported: "-prtx -n max_arg -s max_chars -e[ouf_str]" * * (C) 2002,2003 by Vladimir Oleynik * @@ -14,9 +13,10 @@ * * xargs is described in the Single Unix Specification v3 at * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html - * */ +//applet:IF_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_DROP, xargs)) + //kbuild:lib-$(CONFIG_XARGS) += xargs.o //config:config XARGS @@ -351,6 +351,29 @@ static int xargs_ask_confirmation(void) # define xargs_ask_confirmation() 1 #endif +//usage:#define xargs_trivial_usage +//usage: "[OPTIONS] [PROG ARGS]" +//usage:#define xargs_full_usage "\n\n" +//usage: "Run PROG on every item given by stdin\n" +//usage: "\nOptions:" +//usage: IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( +//usage: "\n -p Ask user whether to run each command" +//usage: ) +//usage: "\n -r Don't run command if input is empty" +//usage: IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( +//usage: "\n -0 Input is separated by NUL characters" +//usage: ) +//usage: "\n -t Print the command on stderr before execution" +//usage: "\n -e[STR] STR stops input processing" +//usage: "\n -n N Pass no more than N args to PROG" +//usage: "\n -s N Pass command line of no more than N bytes" +//usage: IF_FEATURE_XARGS_SUPPORT_TERMOPT( +//usage: "\n -x Exit if size is exceeded" +//usage: ) +//usage:#define xargs_example_usage +//usage: "$ ls | xargs gzip\n" +//usage: "$ find . -name '*.c' -print | xargs rm\n" + /* Correct regardless of combination of CONFIG_xxx */ enum { OPTBIT_VERBOSE = 0, -- cgit v1.2.3