diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-10-24 05:00:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-10-24 05:00:29 +0000 |
commit | bdfd0d78bc44e73d693510e70087857785b3b521 (patch) | |
tree | 153a573095afac8d8d0ea857759ecabd77fb28b7 /coreutils/sort.c | |
parent | 9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff) | |
download | busybox-bdfd0d78bc44e73d693510e70087857785b3b521.tar.gz |
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r-- | coreutils/sort.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c index 4f4979cc5..fc12dfb01 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -43,10 +43,10 @@ int sort_main(int argc, char **argv) char *line, **lines = NULL; int i, opt, nlines = 0; int (*compare)(const void *, const void *) = compare_ascii; -#ifdef BB_FEATURE_SORT_REVERSE +#ifdef CONFIG_FEATURE_SORT_REVERSE int reverse = FALSE; #endif -#ifdef BB_FEATURE_SORT_UNIQUE +#ifdef CONFIG_FEATURE_SORT_UNIQUE int unique = FALSE; #endif @@ -55,12 +55,12 @@ int sort_main(int argc, char **argv) case 'n': compare = compare_numeric; break; -#ifdef BB_FEATURE_SORT_REVERSE +#ifdef CONFIG_FEATURE_SORT_REVERSE case 'r': reverse = TRUE; break; #endif -#ifdef BB_FEATURE_SORT_UNIQUE +#ifdef CONFIG_FEATURE_SORT_UNIQUE case 'u': unique = TRUE; break; @@ -88,17 +88,17 @@ int sort_main(int argc, char **argv) qsort(lines, nlines, sizeof(char *), compare); /* print it */ -#ifdef BB_FEATURE_SORT_REVERSE +#ifdef CONFIG_FEATURE_SORT_REVERSE if (reverse) { for (i = --nlines; 0 <= i; i--) -#ifdef BB_FEATURE_SORT_UNIQUE +#ifdef CONFIG_FEATURE_SORT_UNIQUE if((!unique) || (i == nlines) || (strcmp(lines[i + 1], lines[i]))) #endif puts(lines[i]); } else #endif for (i = 0; i < nlines; i++) -#ifdef BB_FEATURE_SORT_UNIQUE +#ifdef CONFIG_FEATURE_SORT_UNIQUE if((!unique) || (!i) || (strcmp(lines[i - 1], lines[i]))) #endif puts(lines[i]); |