Make 1989/fubar more like original

There's no need to have the 'cc' macro have 'int ' before main. Instead
have CSILENCE include '-Wno-implicit-int'.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-11 09:03:02 -08:00
1 parent 5e1d8f397a
commit 51790b6a94
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ include ../../var.mk
# Common C compiler warnings to silence
#
CSILENCE= -Wno-implicit-function-declaration -Wno-incompatible-library-redeclaration
CSILENCE= -Wno-implicit-function-declaration -Wno-incompatible-library-redeclaration -Wno-implicit-int
# Common C compiler warning flags
#
+1 -1
View File
@@ -3,7 +3,7 @@
#include <stdlib.h>
#define QQ 1
#define TT 1
#define cc int main(c,v) int c; char **v;{char tt[12],qq[7]; int q=0,o=1,l=1,m=1;struct {int c;} f;
#define cc main(c,v) int c; char **v;{char tt[12],qq[7]; int q=0,o=1,l=1,m=1;struct {int c;} f;
#define ouroboros qq[6]='\0';tt[11]='\0';if(QQ==atoi(v[1])+1){(void)fprintf(stderr,"%s factorial = %d\n",v[1], TT);exit(1);}o=c+f
#define x ;while(EOF!=(o=getchar())){if(l && q=='Q' && o=='Q'){l=0;(void)getchar();(void)fread(qq,6,1,stdin);(void)printf("Q %6d",atoi(qq)+1);}else
if(m && q=='T' && o=='T'){m=0;(void)fread(tt,11,1,stdin);(void)printf("T %9d\n",atoi(tt)*QQ);}else {q=o;(void)putchar(o);}}exit(0);}
+2 -1
View File
@@ -755,7 +755,8 @@ not strictly necessary but nonetheless more correct, even if not warned against.
[Cody](#cody) got this to work with modern systems. The main issues were that an
`#include` had to be added along with fixing the path (due to `.` not being in
`$PATH`) to files referred to in the code.
`$PATH`) to files referred to in the code. The path problem was also fixed in
[fubar.sh](/1989/fubar/fubar.sh).
## <a name="1989_jar.1"></a>[1989/jar.1](/1989/jar.1/jar.1.c) ([README.md](/1989/jar.1/README.md]))