Merge pull request #1155 from xexyl/1993-vanb-fix-fix

Make my fix to 1993/vanb more like original
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-10-22 14:48:28 -07:00
commit 50ffabd5d8
3 files changed
+14 -7

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ CDEFINE=
# Include files that are needed to compile # Include files that are needed to compile
# #
CINCLUDE= CINCLUDE= -include stdio.h
# Optimization # Optimization
# #
+2 -4
View File
@@ -1,6 +1,4 @@
#include <stdio.h> O5(O2,O7,O3)char**O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\157\012"
int O3;
int 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 ,O5(012,O7+01,00)):!(O2-=02>>01)?(**O7<=067&&**O7>057?O5(03,O7,*(*O7)++-060+010
*O3):O3 ):!(O2 -=-O3- ~O3)? (072>** *O3):O3 ):!(O2 -=-O3- ~O3)? (072>**
O7&&060 <=**O7 ?O5(04 ,O7,012 *O3-060 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,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 *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);} )++,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);}
+11 -2
View File
@@ -1050,8 +1050,17 @@ the original code.
## [1993/vanb](1993/vanb/vanb.c) ([README.md](1993/vanb/README.md])) ## [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() 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 was not a `char **`. Instead `O5()` (which was `main()` via `-DO5=main`) is now
which main() calls with the right parameters. 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])) ## [1994/ldb](1994/ldb/ldb.c) ([README.md](1994/ldb/README.md]))