- add libbb function str_tolower to convert a string to lowercase.
[oweals/busybox.git] / coreutils / watch.c
index e3e9e06bb81de8e6bee01f5c43121a716435364d..60a4a71ceabd85d678b43438618d2dec9e89b817 100644 (file)
@@ -23,6 +23,7 @@
 //
 // (procps 3.x and procps 2.x are forks, not newer/older versions of the same)
 
+int watch_main(int argc, char **argv);
 int watch_main(int argc, char **argv)
 {
        unsigned opt;
@@ -59,7 +60,7 @@ int watch_main(int argc, char **argv)
 
                        get_terminal_width_height(STDOUT_FILENO, &width, 0);
                        header = xrealloc(header, width--);
-                       // We pad with spaces entire length
+                       // '%-*s' pads header with spaces to the full width
                        snprintf(header, width, "Every %ds: %-*s", period, width, cmd);
                        time(&t);
                        thyme = ctime(&t);
@@ -75,4 +76,5 @@ int watch_main(int argc, char **argv)
                system(cmd);
                sleep(period);
        }
+       return 0; // gcc thinks we can reach this :)
 }