From fd809c23f25a60368afa9118787023f3ef79231e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 17 Mar 2023 11:34:48 -0700 Subject: [PATCH] Fix 1996/gandalf As I love the theme and layout I kept the code that can no longer compile in just commented out. Fun fact: did you know that the original name of Gandalf was Bladorthin? He was not the only character who originally had different names in The Hobbit. In fact the original name of Thorin was Gandalf! (... I know the former is true and I'm almost certain the latter is true but it's been a long time since I've read it in The History of the Hobbit). --- 1996/gandalf/README.md | 23 ++++++++++++++--------- 1996/gandalf/gandalf.c | 5 ++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/1996/gandalf/README.md b/1996/gandalf/README.md index c85ce0fcd..5623b237f 100644 --- a/1996/gandalf/README.md +++ b/1996/gandalf/README.md @@ -14,33 +14,38 @@ make all - NOTE: This entry might not compile when using modern compilers. +NOTE: [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to +compile with modern systems. As he loved the references in the code that could +not compile he just commented it out (as little as possible). Thank you Cody for +your assistance! ### To run ./gandalf -## Judges' comments +## Try: - Also try: PATH=.:$PATH ./hatcat ./cathat - And next try: +And next try: ./cathat `pwd`/cathat - Care to guess why these execute differently? Only the - compiler knows ... ok maybe other things like the author, - the judges and maybe you too? +Care to guess why these execute differently? Only the +compiler knows ... ok maybe other things like the author, +the judges and maybe you too? + +## Judges' comments + +For mis-leading C pre-processor output, try: - For mis-leading C pre-processor output, try: cc -E gandalf.c ## Author's comments - The program requires an ASCII system. +The program requires an ASCII system. diff --git a/1996/gandalf/gandalf.c b/1996/gandalf/gandalf.c index 019de7d7c..20562eb8c 100644 --- a/1996/gandalf/gandalf.c +++ b/1996/gandalf/gandalf.c @@ -2,14 +2,14 @@ #define de #define #define do de -do { begin +/*do { begin do you like (green eggs and ham++)? do you eat them: in a box? do you eat them with a fox?0 do } end fine -fine, just fine. +fine, just fine. */ /*@@@@@@@@@@@@=___ /@@@@@@@@@@@@@@@@@@@a @@ -53,7 +53,6 @@ fine, just fine. "\n");}main(a ,b)int a; char **b ;{int x=2; - do(x=0;x<4;x++)exit(0); for(grem();x<1<<3+(int)b[0] [0]%2;)cred (++x-1);}