From 9b6b5a0376f3f443d8a8ef0721ae9418d06fdc61 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sat, 18 Mar 2023 21:47:12 -0700 Subject: [PATCH] fix on macOS, compile of 1996/dalbec --- 1996/dalbec/Makefile | 8 ++++---- 1996/dalbec/dalbec.c | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/1996/dalbec/Makefile b/1996/dalbec/Makefile index 7cc14c1c2..b12c6b967 100644 --- a/1996/dalbec/Makefile +++ b/1996/dalbec/Makefile @@ -63,7 +63,7 @@ X11_INCDIR= /opt/X11/include # Common C compiler warnings to silence # #CSILENCE= -CSILENCE= -Wno-logical-not-parentheses +CSILENCE= -Wno-logical-not-parentheses -Wno-bool-operation -Wno-uninitialized # Common C compiler warning flags # @@ -97,10 +97,10 @@ CDEFINE= # Include files that are needed to compile # -CINCLUDE= +#CINCLUDE= #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h -#CINCLUDE= -include stdlib.h -include stdio.h +CINCLUDE= -include stdlib.h -include stdio.h #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 @@ -138,7 +138,7 @@ CC= cc # ifeq ($(CC),clang) # -CSILENCE+= -Wno-poison-system-directories +CSILENCE+= -Wno-poison-system-directories -Wno-comma -Wno-missing-prototypes # CWARN+= -Weverything # diff --git a/1996/dalbec/dalbec.c b/1996/dalbec/dalbec.c index 8dfbf8633..0c32eebf9 100644 --- a/1996/dalbec/dalbec.c +++ b/1996/dalbec/dalbec.c @@ -1,19 +1,16 @@ -#include -#include -main(I,O,O0,OO,l) -int I,O0,OO,l; -char **O; +int cain(int I, char **O, int O0, int OO, int l) { return !!I>=I?!I>=I?!!~I>=~I?!~I>=~I?!OO?!I:OO%2? - OO=main(I,O,O0,OO>>!!OO,l), - OO=main(I-!I-!!I,O,OO,OO,l), - OO=main(I-!I-!!I,O,O0,OO,l), + OO=cain(I,O,O0,OO>>!!OO,l), + OO=cain(I-!I-!!I,O,OO,OO,l), + OO=cain(I-!I-!!I,O,O0,OO,l), !(OO-!I||I)?l-1:OO - :(OO=main(I,O,O0,OO>>!!OO,l), - !(OO-l+!I||I)?l-1:main(I-!I-!!I,O,OO,OO,l)) + :(OO=cain(I,O,O0,OO>>!!OO,l), + !(OO-l+!I||I)?l-1:cain(I-!I-!!I,O,OO,OO,l)) :(O0+OO)%l - :main(I-I/I-I/I,O,O0,OO+OO/OO, - main(0,O,O0,OO,I-I-I)+I+1?1:printf("%d ",I-I-I)+fflush(stdout)) - :main(I-I-I-I-I,O,I+I-I+I,I,0) - :main(~!!I-!!I,O,atoi(1[O]),1,atoi(0[O])); + :cain(I-I/I-I/I,O,O0,OO+OO/OO, + cain(0,O,O0,OO,I-I-I)+I+1?1:printf("%d ",I-I-I)+fflush(stdout)) + :cain(I-I-I-I-I,O,I+I-I+I,I,0) + :cain(~!!I-!!I,O,atoi(1[O]),1,atoi(0[O])); } +int main(int I, char **O) { int O0,OO,l; return cain(I,O,O0,OO,l); }