summaryrefslogtreecommitdiffstats
authornicm <nicm>2010-11-02 20:55:13 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-02 18:59:31 (GMT)
commitbd4f5fe0a80f34453fc633e314d461eaaa90835c (patch) (side-by-side diff)
tree92d5008f237c4d13bdb25e7e5956b11f4fece350
parent10ddbcc548991edeb42eb95a3f408a437fb7bce7 (diff)
downloadtmux-old-bd4f5fe0a80f34453fc633e314d461eaaa90835c.zip
tmux-old-bd4f5fe0a80f34453fc633e314d461eaaa90835c.tar.gz
tmux-old-bd4f5fe0a80f34453fc633e314d461eaaa90835c.tar.bz2
Bring back fuzz.c.
Diffstat (more/less context) (ignore whitespace changes)
-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 0000000..39a2a4d
--- a/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); */
+ }
+}