Added support for ignoring '-g' per GNU ls, thanks to David Vrabel
[oweals/busybox.git] / sort.c
diff --git a/sort.c b/sort.c
index 49eb4fd728b8eb325e905416de31f31daf9b8edb..a28122d510d420bc8bc525dd6092f6e5873b9860 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -33,7 +33,11 @@ static const char sort_usage[] = "sort [-n]"
 #ifdef BB_FEATURE_SORT_REVERSE
 " [-r]"
 #endif
-" [FILE]...\n\nSorts lines of text in the specified files\n";
+" [FILE]...\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+"\nSorts lines of text in the specified files\n"
+#endif
+;
 
 #ifdef BB_FEATURE_SORT_REVERSE
 #define APPLY_REVERSE(x) (reverse ? -(x) : (x))
@@ -80,7 +84,7 @@ static Line *line_newFromFile(FILE * src)
        Line *self;
        char *cstring = NULL;
 
-       if ((cstring = cstring_lineFromFile(src))) {
+       if ((cstring = get_line_from_file(src))) {
                self = line_alloc();
                if (self == NULL) {
                        return NULL;
@@ -297,7 +301,7 @@ int sort_main(int argc, char **argv)
                list_release(&list);
        }
 
-       exit(0);
+       return(0);
 }
 
-/* $Id: sort.c,v 1.15 2000/04/17 04:22:09 beppu Exp $ */
+/* $Id: sort.c,v 1.18 2000/06/28 22:15:26 markw Exp $ */