diff options
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) | |||
43 | char *line, **lines = NULL; | 43 | char *line, **lines = NULL; |
44 | int i, opt, nlines = 0; | 44 | int i, opt, nlines = 0; |
45 | int (*compare)(const void *, const void *) = compare_ascii; | 45 | int (*compare)(const void *, const void *) = compare_ascii; |
46 | #ifdef BB_FEATURE_SORT_REVERSE | 46 | #ifdef CONFIG_FEATURE_SORT_REVERSE |
47 | int reverse = FALSE; | 47 | int reverse = FALSE; |
48 | #endif | 48 | #endif |
49 | #ifdef BB_FEATURE_SORT_UNIQUE | 49 | #ifdef CONFIG_FEATURE_SORT_UNIQUE |
50 | int unique = FALSE; | 50 | int unique = FALSE; |
51 | #endif | 51 | #endif |
52 | 52 | ||
@@ -55,12 +55,12 @@ int sort_main(int argc, char **argv) | |||
55 | case 'n': | 55 | case 'n': |
56 | compare = compare_numeric; | 56 | compare = compare_numeric; |
57 | break; | 57 | break; |
58 | #ifdef BB_FEATURE_SORT_REVERSE | 58 | #ifdef CONFIG_FEATURE_SORT_REVERSE |
59 | case 'r': | 59 | case 'r': |
60 | reverse = TRUE; | 60 | reverse = TRUE; |
61 | break; | 61 | break; |
62 | #endif | 62 | #endif |
63 | #ifdef BB_FEATURE_SORT_UNIQUE | 63 | #ifdef CONFIG_FEATURE_SORT_UNIQUE |
64 | case 'u': | 64 | case 'u': |
65 | unique = TRUE; | 65 | unique = TRUE; |
66 | break; | 66 | break; |
@@ -88,17 +88,17 @@ int sort_main(int argc, char **argv) | |||
88 | qsort(lines, nlines, sizeof(char *), compare); | 88 | qsort(lines, nlines, sizeof(char *), compare); |
89 | 89 | ||
90 | /* print it */ | 90 | /* print it */ |
91 | #ifdef BB_FEATURE_SORT_REVERSE | 91 | #ifdef CONFIG_FEATURE_SORT_REVERSE |
92 | if (reverse) { | 92 | if (reverse) { |
93 | for (i = --nlines; 0 <= i; i--) | 93 | for (i = --nlines; 0 <= i; i--) |
94 | #ifdef BB_FEATURE_SORT_UNIQUE | 94 | #ifdef CONFIG_FEATURE_SORT_UNIQUE |
95 | if((!unique) || (i == nlines) || (strcmp(lines[i + 1], lines[i]))) | 95 | if((!unique) || (i == nlines) || (strcmp(lines[i + 1], lines[i]))) |
96 | #endif | 96 | #endif |
97 | puts(lines[i]); | 97 | puts(lines[i]); |
98 | } else | 98 | } else |
99 | #endif | 99 | #endif |
100 | for (i = 0; i < nlines; i++) | 100 | for (i = 0; i < nlines; i++) |
101 | #ifdef BB_FEATURE_SORT_UNIQUE | 101 | #ifdef CONFIG_FEATURE_SORT_UNIQUE |
102 | if((!unique) || (!i) || (strcmp(lines[i - 1], lines[i]))) | 102 | if((!unique) || (!i) || (strcmp(lines[i - 1], lines[i]))) |
103 | #endif | 103 | #endif |
104 | puts(lines[i]); | 104 | puts(lines[i]); |