beep: the -d option takes milliseconds not microseconds
[oweals/busybox.git] / miscutils / ttysize.c
index 292cfb87678399cd9eb198ee5ce97591471b32a7..ca9a2ec8d573c62bac86d1365f9afeb43211ec57 100644 (file)
  */
 #include "libbb.h"
 
-int ttysize_main(int argc, char **argv);
-int ttysize_main(int argc, char **argv)
+int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int ttysize_main(int argc UNUSED_PARAM, char **argv)
 {
-       unsigned w,h;
+       unsigned w, h;
        struct winsize wsz;
 
        w = 80;
@@ -24,7 +24,7 @@ int ttysize_main(int argc, char **argv)
                h = wsz.ws_row;
        }
 
-       if (argc == 1) {
+       if (!argv[1]) {
                printf("%u %u", w, h);
        } else {
                const char *fmt, *arg;