summaryrefslogtreecommitdiff
path: root/bofh/bofh.c
diff options
context:
space:
mode:
Diffstat (limited to 'bofh/bofh.c')
-rw-r--r--bofh/bofh.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/bofh/bofh.c b/bofh/bofh.c
new file mode 100644
index 0000000..b84869d
--- /dev/null
+++ b/bofh/bofh.c
@@ -0,0 +1,15 @@
+/* $Id$ */
+
+#include <stdio.h>
+#include "excuses.h"
+
+#define nelem(n) (sizeof(n) / sizeof((n)[0]))
+#define rndex(n) (n)[arc4random() % nelem(n)]
+
+int
+main()
+{
+ printf("Conten-type: %s\r\n\r\n", "text/plain");
+ printf("Your excuse is: %s\n", rndex(excuses));
+ return 0;
+}