41 lines
801 B
C
41 lines
801 B
C
#include <stdio.h>
|
|
|
|
extern int voodoo(); /* from vd.hc */
|
|
extern void godword(); /* from gw.hc */
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
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;
|
|
}
|