diff options
author | Rob Landley <rob@landley.net> | 2005-10-08 17:48:25 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-10-08 17:48:25 +0000 |
commit | 45ad0e87d679fd7fe09909577e539dfe95646e54 (patch) | |
tree | d180f6ea523043ec4f858daf2793260a950dbc36 | |
parent | 1ba19d6bf7445d80e93488af681285bda2e95dca (diff) | |
download | busybox-w32-45ad0e87d679fd7fe09909577e539dfe95646e54.tar.gz busybox-w32-45ad0e87d679fd7fe09909577e539dfe95646e54.tar.bz2 busybox-w32-45ad0e87d679fd7fe09909577e539dfe95646e54.zip |
Rename CONFIG_SORT_BIG to CONFIG_FEATURE_SORT_BIG so allbareconfig can find it.
-rw-r--r-- | coreutils/Config.in | 21 | ||||
-rw-r--r-- | coreutils/sort.c | 11 |
2 files changed, 26 insertions, 6 deletions
diff --git a/coreutils/Config.in b/coreutils/Config.in index 50e605dc2..31e97c145 100644 --- a/coreutils/Config.in +++ b/coreutils/Config.in | |||
@@ -436,7 +436,7 @@ config CONFIG_SORT | |||
436 | help | 436 | help |
437 | sort is used to sort lines of text in specified files. | 437 | sort is used to sort lines of text in specified files. |
438 | 438 | ||
439 | config CONFIG_SORT_BIG | 439 | config CONFIG_FEATURE_SORT_BIG |
440 | bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)" | 440 | bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)" |
441 | default y | 441 | default y |
442 | depends on CONFIG_SORT | 442 | depends on CONFIG_SORT |
@@ -547,6 +547,25 @@ config CONFIG_TR | |||
547 | tr is used to squeeze, and/or delete characters from standard | 547 | tr is used to squeeze, and/or delete characters from standard |
548 | input, writing to standard output. | 548 | input, writing to standard output. |
549 | 549 | ||
550 | config CONFIG_FEATURE_TR_CLASSES | ||
551 | bool " Enable character classes (such as [:upper:])" | ||
552 | default n | ||
553 | depends on CONFIG_TR | ||
554 | help | ||
555 | Enable character classes, enabling commands such as: | ||
556 | tr [:upper:] [:lower:] to convert input into lowercase. | ||
557 | |||
558 | config CONFIG_FEATURE_TR_EQUIV | ||
559 | bool " Enable equivalence classes" | ||
560 | default n | ||
561 | depends on CONFIG_TR | ||
562 | help | ||
563 | Enable equivalence classes, which essentially add the enclosed | ||
564 | character to the current set. For instance, tr [=a=] xyz would | ||
565 | replace all instances of 'a' with 'xyz'. This option is mainly | ||
566 | useful for cases when no other way of expressing a character | ||
567 | is possible. | ||
568 | |||
550 | if CONFIG_HUSH || CONFIG_LASH || CONFIG_MSH | 569 | if CONFIG_HUSH || CONFIG_LASH || CONFIG_MSH |
551 | config CONFIG_TRUE | 570 | config CONFIG_TRUE |
552 | default y | 571 | default y |
diff --git a/coreutils/sort.c b/coreutils/sort.c index 6d8a55245..ce51bc178 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -56,7 +56,7 @@ static int global_flags; | |||
56 | #define FLAG_bb 32768 /* Ignore trailing blanks */ | 56 | #define FLAG_bb 32768 /* Ignore trailing blanks */ |
57 | 57 | ||
58 | 58 | ||
59 | #ifdef CONFIG_SORT_BIG | 59 | #ifdef CONFIG_FEATURE_SORT_BIG |
60 | static char key_separator; | 60 | static char key_separator; |
61 | 61 | ||
62 | static struct sort_key | 62 | static struct sort_key |
@@ -154,7 +154,7 @@ static int compare_keys(const void *xarg, const void *yarg) | |||
154 | int flags=global_flags,retval=0; | 154 | int flags=global_flags,retval=0; |
155 | char *x,*y; | 155 | char *x,*y; |
156 | 156 | ||
157 | #ifdef CONFIG_SORT_BIG | 157 | #ifdef CONFIG_FEATURE_SORT_BIG |
158 | struct sort_key *key; | 158 | struct sort_key *key; |
159 | 159 | ||
160 | for(key=key_list;!retval && key;key=key->next_key) { | 160 | for(key=key_list;!retval && key;key=key->next_key) { |
@@ -178,7 +178,7 @@ static int compare_keys(const void *xarg, const void *yarg) | |||
178 | case 0: | 178 | case 0: |
179 | retval=strcmp(x,y); | 179 | retval=strcmp(x,y); |
180 | break; | 180 | break; |
181 | #ifdef CONFIG_SORT_BIG | 181 | #ifdef CONFIG_FEATURE_SORT_BIG |
182 | case FLAG_g: | 182 | case FLAG_g: |
183 | { | 183 | { |
184 | char *xx,*yy; | 184 | char *xx,*yy; |
@@ -232,6 +232,7 @@ static int compare_keys(const void *xarg, const void *yarg) | |||
232 | /* Perform fallback sort if necessary */ | 232 | /* Perform fallback sort if necessary */ |
233 | if(!retval && !(global_flags&FLAG_s)) | 233 | if(!retval && !(global_flags&FLAG_s)) |
234 | retval=strcmp(*(char **)xarg, *(char **)yarg); | 234 | retval=strcmp(*(char **)xarg, *(char **)yarg); |
235 | //dprintf(2,"reverse=%d\n",flags&FLAG_r); | ||
235 | return ((flags&FLAG_r)?-1:1)*retval; | 236 | return ((flags&FLAG_r)?-1:1)*retval; |
236 | } | 237 | } |
237 | 238 | ||
@@ -248,7 +249,7 @@ int sort_main(int argc, char **argv) | |||
248 | line=index(optlist,c); | 249 | line=index(optlist,c); |
249 | if(!line) bb_show_usage(); | 250 | if(!line) bb_show_usage(); |
250 | switch(*line) { | 251 | switch(*line) { |
251 | #ifdef CONFIG_SORT_BIG | 252 | #ifdef CONFIG_FEATURE_SORT_BIG |
252 | case 'o': | 253 | case 'o': |
253 | if(outfile) bb_error_msg_and_die("Too many -o."); | 254 | if(outfile) bb_error_msg_and_die("Too many -o."); |
254 | outfile=bb_xfopen(optarg,"w"); | 255 | outfile=bb_xfopen(optarg,"w"); |
@@ -308,7 +309,7 @@ int sort_main(int argc, char **argv) | |||
308 | } | 309 | } |
309 | fclose(fp); | 310 | fclose(fp); |
310 | } | 311 | } |
311 | #ifdef CONFIG_SORT_BIG | 312 | #ifdef CONFIG_FEATURE_SORT_BIG |
312 | /* if no key, perform alphabetic sort */ | 313 | /* if no key, perform alphabetic sort */ |
313 | if(!key_list) add_key()->range[0]=1; | 314 | if(!key_list) add_key()->range[0]=1; |
314 | /* handle -c */ | 315 | /* handle -c */ |