svn commit: trunk/busybox/coreutils
landley at busybox.net
landley at busybox.net
Sat Oct 8 17:48:29 UTC 2005
Author: landley
Date: 2005-10-08 10:48:25 -0700 (Sat, 08 Oct 2005)
New Revision: 11811
Log:
Rename CONFIG_SORT_BIG to CONFIG_FEATURE_SORT_BIG so allbareconfig can find it.
Modified:
trunk/busybox/coreutils/Config.in
trunk/busybox/coreutils/sort.c
Changeset:
Modified: trunk/busybox/coreutils/Config.in
===================================================================
--- trunk/busybox/coreutils/Config.in 2005-10-08 17:42:35 UTC (rev 11810)
+++ trunk/busybox/coreutils/Config.in 2005-10-08 17:48:25 UTC (rev 11811)
@@ -436,7 +436,7 @@
help
sort is used to sort lines of text in specified files.
-config CONFIG_SORT_BIG
+config CONFIG_FEATURE_SORT_BIG
bool " full SuSv3 compliant sort (Support -ktcsbdfiozgM)"
default y
depends on CONFIG_SORT
@@ -547,6 +547,25 @@
tr is used to squeeze, and/or delete characters from standard
input, writing to standard output.
+config CONFIG_FEATURE_TR_CLASSES
+ bool " Enable character classes (such as [:upper:])"
+ default n
+ depends on CONFIG_TR
+ help
+ Enable character classes, enabling commands such as:
+ tr [:upper:] [:lower:] to convert input into lowercase.
+
+config CONFIG_FEATURE_TR_EQUIV
+ bool " Enable equivalence classes"
+ default n
+ depends on CONFIG_TR
+ help
+ Enable equivalence classes, which essentially add the enclosed
+ character to the current set. For instance, tr [=a=] xyz would
+ replace all instances of 'a' with 'xyz'. This option is mainly
+ useful for cases when no other way of expressing a character
+ is possible.
+
if CONFIG_HUSH || CONFIG_LASH || CONFIG_MSH
config CONFIG_TRUE
default y
Modified: trunk/busybox/coreutils/sort.c
===================================================================
--- trunk/busybox/coreutils/sort.c 2005-10-08 17:42:35 UTC (rev 11810)
+++ trunk/busybox/coreutils/sort.c 2005-10-08 17:48:25 UTC (rev 11811)
@@ -56,7 +56,7 @@
#define FLAG_bb 32768 /* Ignore trailing blanks */
-#ifdef CONFIG_SORT_BIG
+#ifdef CONFIG_FEATURE_SORT_BIG
static char key_separator;
static struct sort_key
@@ -154,7 +154,7 @@
int flags=global_flags,retval=0;
char *x,*y;
-#ifdef CONFIG_SORT_BIG
+#ifdef CONFIG_FEATURE_SORT_BIG
struct sort_key *key;
for(key=key_list;!retval && key;key=key->next_key) {
@@ -178,7 +178,7 @@
case 0:
retval=strcmp(x,y);
break;
-#ifdef CONFIG_SORT_BIG
+#ifdef CONFIG_FEATURE_SORT_BIG
case FLAG_g:
{
char *xx,*yy;
@@ -232,6 +232,7 @@
/* Perform fallback sort if necessary */
if(!retval && !(global_flags&FLAG_s))
retval=strcmp(*(char **)xarg, *(char **)yarg);
+//dprintf(2,"reverse=%d\n",flags&FLAG_r);
return ((flags&FLAG_r)?-1:1)*retval;
}
@@ -248,7 +249,7 @@
line=index(optlist,c);
if(!line) bb_show_usage();
switch(*line) {
-#ifdef CONFIG_SORT_BIG
+#ifdef CONFIG_FEATURE_SORT_BIG
case 'o':
if(outfile) bb_error_msg_and_die("Too many -o.");
outfile=bb_xfopen(optarg,"w");
@@ -308,7 +309,7 @@
}
fclose(fp);
}
-#ifdef CONFIG_SORT_BIG
+#ifdef CONFIG_FEATURE_SORT_BIG
/* if no key, perform alphabetic sort */
if(!key_list) add_key()->range[0]=1;
/* handle -c */
More information about the busybox-cvs
mailing list