Make my fix to 1995/makarios more like original
The parameters to the functions spell out (backwards) the function name.
As for main() since there can only be three args it has in comments a
fourth to spell out main (backwards). Also use old style
( main(n,i,a)char**i,**a;{/*..*/} ) as that's how the original code is
(and the added function is that way too though only ints like main()
used to be).
Added -Wno-implicit-int -Wno-return-type to CSILENCE in Makefile.
There's still one more warning but I'm not sure if it's supported by all
compilers so I haven't disabled it (yet?).
This commit is contained in:
1 parent
140aadc5ad
commit
8da99acce0
2 files changed
+4
-4
No files matched your search
@@ -39,7 +39,7 @@ include ../../var.mk
|
|||||||
# Common C compiler warnings to silence
|
# Common C compiler warnings to silence
|
||||||
#
|
#
|
||||||
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \
|
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \
|
||||||
-Wno-int-conversion
|
-Wno-int-conversion -Wno-implicit-int -Wno-return-type
|
||||||
|
|
||||||
# Common C compiler warning flags
|
# Common C compiler warning flags
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
pain(int n, char **ia, char **aa, char **ma){int i=ia, a=aa, m=ma; while(i=++n)
|
pain(n,i,a,p){while(i=++n)
|
||||||
for(a=0;a<i?a=a*8+i%8,i/=8,m=a==i|a/8==i,1:(n-++m||printf("%o\n",n))&&n%m;);}
|
for(a=0;a<i?a=a*8+i%8,i/=8,p=a==i|a/8==i,1:(n-++p||printf("%o\n",n))&&n%p;);}
|
||||||
main(int n, char **ia, char **aa) { return pain(n, ia, aa, 0); }
|
main(n,i,a/*,m*/)char**i,**a;{return pain(n,i,a,0);}
|
||||||
Reference in new issue
Block a user