From 3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 14 Jul 2000 23:28:47 +0000 Subject: Don't use strings directly in calls to usage(). This is in preparation for their extraction to a separate file. --- cut.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'cut.c') diff --git a/cut.c b/cut.c index 783d526a5..08b4586a4 100644 --- a/cut.c +++ b/cut.c @@ -206,6 +206,19 @@ void cut() } } +const char cut_usage[] = + "cut [OPTION]... [FILE]...\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nPrints selected fields from each input FILE to standard output.\n\n" + "Options:\n" + "\t-b LIST\tOutput only bytes from LIST\n" + "\t-c LIST\tOutput only characters from LIST\n" + "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n" + "\t-s\tOnly output Lines if the include DELIM\n" + "\t-f N\tPrint only these fields\n" + "\t-n\tIgnored\n" +#endif + ; int cut_main(int argc, char **argv) { @@ -213,18 +226,7 @@ int cut_main(int argc, char **argv) int numberFilenames = 0; if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) - usage( "cut [OPTION]... [FILE]...\n" -#ifndef BB_FEATURE_TRIVIAL_HELP - "\nPrints selected fields from each input FILE to standard output.\n\n" - "Options:\n" - "\t-b LIST\tOutput only bytes from LIST\n" - "\t-c LIST\tOutput only characters from LIST\n" - "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n" - "\t-s\tOnly output Lines if the include DELIM\n" - "\t-f N\tPrint only these fields\n" - "\t-n\tIgnored\n" -#endif - ); + usage(cut_usage); while (i < argc) { if (argv[i][0] == '-') { -- cgit v1.2.3