summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2010-11-02 20:55:13 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2010-11-02 20:55:13 +0000
commit96601ce9fe320873459f2d7a069abc17ab303a70 (patch)
tree5317d859f7fc345b840a2f793fff99f8bec36ece /tools
parent1cec111af3c63db7dbd5603afd313d247eb0b207 (diff)
Bring back fuzz.c.
Diffstat (limited to 'tools')
-rw-r--r--tools/fuzz.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/fuzz.c b/tools/fuzz.c
new file mode 100644
index 00000000..39a2a4db
--- /dev/null
+++ b/tools/fuzz.c
@@ -0,0 +1,31 @@
+#include <sys/types.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
+
+int
+main(void)
+{
+ time_t t;
+ int i;
+
+ setvbuf(stdout, NULL, _IONBF, 0);
+
+ t = time(NULL);
+ srandom((u_int) t);
+
+ for (;;) {
+ putchar('\033');
+
+ for (i = 0; i < random() % 25; i++) {
+ if (i > 22)
+ putchar(';');
+ else
+ putchar(random() % 256);
+ }
+
+ /* usleep(100); */
+ }
+}