diff --git a/1993/vanb/Makefile b/1993/vanb/Makefile index 27c8156f2..1bfe5cc66 100644 --- a/1993/vanb/Makefile +++ b/1993/vanb/Makefile @@ -61,7 +61,7 @@ CDEFINE= # Include files that are needed to compile # -CINCLUDE= +CINCLUDE= -include stdio.h # Optimization # diff --git a/1993/vanb/vanb.c b/1993/vanb/vanb.c index 4fccf44a3..55d569274 100644 --- a/1993/vanb/vanb.c +++ b/1993/vanb/vanb.c @@ -1,6 +1,4 @@ -#include -int O3; -int O5(O2, O7, O3)char **O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\157\012" +O5(O2,O7,O3)char**O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\157\012" ,O5(012,O7+01,00)):!(O2-=02>>01)?(**O7<=067&&**O7>057?O5(03,O7,*(*O7)++-060+010 *O3):O3 ):!(O2 -=-O3- ~O3)? (072>** O7&&060 <=**O7 ?O5(04 ,O7,012 *O3-060 @@ -26,4 +24,4 @@ int O5(O2, O7, O3)char **O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\15 ,O7,O5(06,O7, 00)):!( O2+=-02/ 02)?(!(* *O7-053)?O5(011,O7,O3+(++*O7,O5(010,O7,00))):!(055^**O7)?O5(011,O7,O3-(03+*(*O7 )++,O5(0010,O7,00))):O3):!(O2-=0563&0215)?O5(011,O7,O5(010,O7,00)):(++*O7,O3);} -main(O2,O7)char**O7;{return O5(O2,O7,O3);} +main(O2,O7,O3)char**O7,**O3;{return O5(O2,O7,0);} diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 6bc1fbd69..558ecaf4c 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1050,8 +1050,17 @@ the original code. ## [1993/vanb](1993/vanb/vanb.c) ([README.md](1993/vanb/README.md])) Cody fixed this to work with clang. The problem was that the third arg to main() -was not a `char **`. Instead `O5()` (which was `main()`) is now its own function -which main() calls with the right parameters. +was not a `char **`. Instead `O5()` (which was `main()` via `-DO5=main`) is now +its own function which main() calls with the right parameters. + +Later Cody fixed it again to look much more like the original where only a +single line is added, that of `main()`, which calls `O5()`. This was done through +`-include stdio.h` at the compiler (in the Makefile) and by removing the `O3` +variable (an int) at the top of the file, instead making it a `char **` in +`main()` (`O5()` had three args) but then passing in `0` to `O5()` for the third +arg (as it was 0 at file scope already this is perfectly fine and it means +there's no need to cast it to an int in the function call though that would also +work). ## [1994/ldb](1994/ldb/ldb.c) ([README.md](1994/ldb/README.md]))