diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-14 23:28:47 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-14 23:28:47 +0000 |
commit | 3ab1d8193e335afa74e86a8d8e628158d7e503b9 (patch) | |
tree | 6a217bf17e7c00e98a47f657015535f21b53cedd /cut.c | |
parent | 28611675ac2c9073639562f4e4477f8e81d01845 (diff) | |
download | busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.tar.gz busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.tar.bz2 busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.zip |
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
git-svn-id: svn://busybox.net/trunk/busybox@863 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'cut.c')
-rw-r--r-- | cut.c | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -206,6 +206,19 @@ void cut() | |||
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | const 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 | ; | ||
209 | 222 | ||
210 | int cut_main(int argc, char **argv) | 223 | int cut_main(int argc, char **argv) |
211 | { | 224 | { |
@@ -213,18 +226,7 @@ int cut_main(int argc, char **argv) | |||
213 | int numberFilenames = 0; | 226 | int numberFilenames = 0; |
214 | 227 | ||
215 | if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) | 228 | if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) |
216 | usage( "cut [OPTION]... [FILE]...\n" | 229 | usage(cut_usage); |
217 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
218 | "\nPrints selected fields from each input FILE to standard output.\n\n" | ||
219 | "Options:\n" | ||
220 | "\t-b LIST\tOutput only bytes from LIST\n" | ||
221 | "\t-c LIST\tOutput only characters from LIST\n" | ||
222 | "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n" | ||
223 | "\t-s\tOnly output Lines if the include DELIM\n" | ||
224 | "\t-f N\tPrint only these fields\n" | ||
225 | "\t-n\tIgnored\n" | ||
226 | #endif | ||
227 | ); | ||
228 | 230 | ||
229 | while (i < argc) { | 231 | while (i < argc) { |
230 | if (argv[i][0] == '-') { | 232 | if (argv[i][0] == '-') { |