bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / util-linux / scriptreplay.c
index 6474d38e89c9e8bc755f413bd187fb4cc5e1d170..e3083ab93ae91d701c8af03c9c0440e53ca80292 100644 (file)
@@ -4,9 +4,24 @@
  *
  * pascal.bellard@ads-lu.com
  *
- * Licensed under GPLv2 or later, see file License in this tarball for details.
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config SCRIPTREPLAY
+//config:      bool "scriptreplay (2.6 kb)"
+//config:      default y
+//config:      help
+//config:      This program replays a typescript, using timing information
+//config:      given by script -t.
+
+//applet:IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_SCRIPTREPLAY) += scriptreplay.o
+
+//usage:#define scriptreplay_trivial_usage
+//usage:       "TIMINGFILE [TYPESCRIPT [DIVISOR]]"
+//usage:#define scriptreplay_full_usage "\n\n"
+//usage:       "Play back typescripts, using timing information"
+
 #include "libbb.h"
 
 int scriptreplay_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -18,6 +33,9 @@ int scriptreplay_main(int argc UNUSED_PARAM, char **argv)
        unsigned long count;
        FILE *tfp;
 
+       if (!argv[1])
+               bb_show_usage();
+
        if (argv[2]) {
                script = argv[2];
                if (argv[3])