summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/main.c b/main.c
index 67159ba..fcbafce 100644
--- a/main.c
+++ b/main.c
@@ -1,8 +1,40 @@
 #include <stdio.h>
 
+extern int voodoo(); /* from vd.hc */
+extern void godword(); /* from gw.hc */
+
 int
 main(void)
 {
-	puts("Hello, world!");
+	int t;
+	int f;
+	int g;
+
+	t = voodoo(1);
+	f = voodoo(0);
+	g = voodoo(4);
+
+	puts("voodoo() is a HolyC function.");
+	puts("If we pass 1 to it, it should return 0.");
+	puts("If we pass 0 to it, it should return 1.");
+	puts("For any other value, it should return 69.");
+
+	puts("Tests:");
+
+	printf("pass 1, want 0 --> t = %d\n", t);
+	printf("pass 0, want 1 --> f = %d\n", f);
+
+	printf("pass 4, want 69 --> g = %d\n", g);
+
+	puts("");
+	puts("Is this divine intellect?");
+	puts("");
+
+	puts("Now let's try printing to stdout.");
+	puts("We are going to call godword(), a void-returning function.");
+	puts("If this works correctly, it should say something biblical:");
+
+	godword();
+
 	return 0;
 }