The to build/original build, to use/original use and try/original try sections have been changed in the README.md to be much more consistent and clearer (and detailed in some ways). The to run section (not the original run section as that one is not supposed to be compilable and is not compilable either) has './westley.alt' now as that will give you a message even right after running 'make clobber alt'. The alt code was changed in that blank lines were removed and (as a cosmetic change) the 'return 0;'s were changed to 'exit(0);'s. Originally the idea was to have 'int main()' be 'main()' (like the original in the #if 0..#else..#endif block) but this will trigger -Wimplicit-int and since one would not want to run a more complicated 'make' invocation (instead of a simple 'cc' invocation or at least a simpler one) it means the output is messed up with a warning. But using exit(0); is fine albeit with an additional #include. The try.alt.sh script now has an -o westley.alt and instead of running ./a.out it runs ./westley.alt. This makes it more like normal 'make alt' targets. The Makefile all target now has information about the alt build as it does not have the restrictions of column width, character tab length and wraparound. The .gitignore no longer has a.out in it.
117 lines
2.2 KiB
C
117 lines
2.2 KiB
C
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
int main()
|
|
{
|
|
#if rop&onut&((own&rain)|warf)
|
|
printf("The orc scrambles to the drain,\n"
|
|
"trying to get the donut; you\n"
|
|
"run out the door and escape!\n"
|
|
"\n"
|
|
" The End\n");
|
|
exit(0);
|
|
#else
|
|
#if escribe
|
|
#if ocument
|
|
printf("It reads:\n"
|
|
" Depress Dotted Dog\n");
|
|
exit(0);
|
|
#else
|
|
#if oor
|
|
printf("The door is decorated with relief\n"
|
|
"figures of various dog breeds.\n");
|
|
exit(0);
|
|
#else
|
|
#if rain
|
|
printf("Through the drain you see a dwarf\n"
|
|
"in another cell.\n");
|
|
exit(0);
|
|
#else
|
|
#if warf
|
|
printf("The gnarled dwarf looks thirsty.\n");
|
|
exit(0);
|
|
#else
|
|
#if ungeon|ebris
|
|
printf("You notice a desk, a phone, and\n"
|
|
"a phone directory among the clutter.\n");
|
|
exit(0);
|
|
#else
|
|
#if esk
|
|
printf("There are some dimes on the desk.\n");
|
|
exit(0);
|
|
#else
|
|
#if irectory
|
|
printf("It reads:\n"
|
|
" Pixie's Pub -\n"
|
|
" instant service -\n"
|
|
" Dial DUNgeon0614\n");
|
|
exit(0);
|
|
#else
|
|
printf("You notice nothing unusual.\n");
|
|
exit(0);
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#else
|
|
#if ial&UNgeon0614
|
|
printf("Pixie takes your order, and\n"
|
|
"magically, the room is filled\n"
|
|
"with banana daiquiris.\n");
|
|
exit(0);
|
|
#endif
|
|
#if rink&aiquiri
|
|
printf("As you drink, a voice from\n"
|
|
"below says 'Could you drop\n"
|
|
"one down here?'\n");
|
|
exit(0);
|
|
#endif
|
|
#if rop&aiquiri
|
|
#if warf|own
|
|
printf("The dwarf eagerly accepts\n"
|
|
"the drink. 'Thanks! Here,\n"
|
|
"I found this, but I can't\n"
|
|
"understand it.' He hands\n"
|
|
"you a document.\n");
|
|
exit(0);
|
|
#else
|
|
printf("You drop the drink\n"
|
|
"on the floor.\n");
|
|
exit(0);
|
|
#endif
|
|
#endif
|
|
#if epress&(almatian|almation)
|
|
printf("As you press the dalmatian\n"
|
|
"figure, the door opens - only\n"
|
|
"to reveal a menacing orc by\n"
|
|
"a vending machine (with a\n"
|
|
"sign reading 'DEPOSIT MONEY').\n");
|
|
exit(0);
|
|
#endif
|
|
#if eposit&(ime|imes)
|
|
printf("Donuts spill out; you get\n"
|
|
"some, the orc hungrily eats\n"
|
|
"the rest.\n");
|
|
exit(0);
|
|
#endif
|
|
#if rop&onut
|
|
printf("The orc quickly eats the\n"
|
|
"donut; he still bars the\n"
|
|
"way.\n");
|
|
exit(0);
|
|
#endif
|
|
#if rop+epress+ime+eposit+rink+aiquiri+onut==1
|
|
printf("Be more specific.\n");
|
|
exit(0);
|
|
#endif
|
|
printf("You are in a debris-filled\n"
|
|
"dungeon; a door bars the\n"
|
|
"way, and sludge trickles into\n"
|
|
"a floor drain.\n");
|
|
exit(0);
|
|
#endif
|
|
#endif
|
|
}
|