kbd_mode: fix non-ASCII letters in comments
[oweals/busybox.git] / coreutils / head.c
index af9e9f41ec1a6bb088a9f5a6e27d5d92971e9407..570f140b1d99f9775dd5e9fbb13d8850277c7783 100644 (file)
@@ -31,7 +31,7 @@ static const struct suffix_mult head_suffixes[] = {
 
 static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
 
-int head_main(int argc, char **argv);
+int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int head_main(int argc, char **argv)
 {
        unsigned long count = 10;
@@ -91,19 +91,19 @@ int head_main(int argc, char **argv)
                }
        }
 
+       argc -= optind;
        argv += optind;
-       if (!*argv) {
+       if (!*argv)
                *--argv = (char*)"-";
-       }
 
        fmt = header_fmt_str + 1;
 #if ENABLE_FEATURE_FANCY_HEAD
-       if (argc - optind <= header_threshhold) {
+       if (argc <= header_threshhold) {
                header_threshhold = 0;
        }
 #else
-       if (argc <= optind + 1) {
-               fmt += 11;
+       if (argc <= 1) {
+               fmt += 11; /* "" */
        }
        /* Now define some things here to avoid #ifdefs in the code below.
         * These should optimize out of the if conditions below. */