This one should be able to deal with the USAGE macros a little
[oweals/busybox.git] / tail.c
diff --git a/tail.c b/tail.c
index dc5918d6b23f31a85f5dd4887248cfa7f404bd81..a85256c807dce801c0f2d04e634f22cec9f312e2 100644 (file)
--- a/tail.c
+++ b/tail.c
  *
  */
 
-#include "busybox.h"
 
-#include <sys/types.h>
 #include <fcntl.h>
+#include <getopt.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include "busybox.h"
 
-static struct suffix_mult tail_suffixes[] = {
+static const struct suffix_mult tail_suffixes[] = {
        { "b", 512 },
        { "k", 1024 },
        { "m", 1048576 },
        { NULL, 0 }
 };
 
-#ifndef BB_FEATURE_SIMPLE_TAIL
-static struct suffix_mult null_suffixes[] = {
-       { NULL, 0 }
-};
-#endif
-
 static const int BYTES = 0;
 static const int LINES = 1;
 
@@ -92,14 +90,14 @@ int tail_main(int argc, char **argv)
                                hide_headers = 1;
                                break;
                        case 's':
-                               sleep_period = parse_number(optarg, null_suffixes);
+                               sleep_period = parse_number(optarg, 0);
                                break;
                        case 'v':
                                show_headers = 1;
                                break;
 #endif
                        default:
-                               usage(tail_usage);
+                               show_usage();
                }
        }