Extract usage information into a separate file.
[oweals/busybox.git] / uniq.c
diff --git a/uniq.c b/uniq.c
index 0cccbd5e7639774fc2a22a7b5419cc8932a05a64..016fc77806cadb534616c9e79b65233fec608438 100644 (file)
--- a/uniq.c
+++ b/uniq.c
 #include <string.h>
 #include <errno.h>
 
-static const char uniq_usage[] =
-       "uniq [OPTION]... [INPUT [OUTPUT]]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
-       "\nDiscard all but one of successive identical lines from INPUT\n"
-       "(or standard input), writing to OUTPUT (or standard output).\n"
-#endif
-       ;
-
 /* max chars in line */
 #define UNIQ_MAX 4096
 
@@ -127,11 +119,11 @@ set_file_pointers(int schema, FILE ** in, FILE ** out, char **argv)
                break;
        }
        if (*in == NULL) {
-               fprintf(stderr, "uniq: %s: %s\n", argv[0], strerror(errno));
+               errorMsg("%s: %s\n", argv[0], strerror(errno));
                return errno;
        }
        if (*out == NULL) {
-               fprintf(stderr, "uniq: %s: %s\n", argv[1], strerror(errno));
+               errorMsg("%s: %s\n", argv[1], strerror(errno));
                return errno;
        }
        return 0;
@@ -184,7 +176,7 @@ int uniq_main(int argc, char **argv)
        subject_last(&s);
        subject_study(&s);
 
-       exit(0);
+       return(0);
 }
 
-/* $Id: uniq.c,v 1.10 2000/05/12 19:41:47 erik Exp $ */
+/* $Id: uniq.c,v 1.13 2000/07/16 20:57:15 kraai Exp $ */