Make 1992/kivinen main() have 2 args, not 1
Due to a clang defect.
This commit is contained in:
1 parent
8727944f2f
commit
0be0511329
4 files changed
+10
-3
No files matched your search
@@ -39,7 +39,8 @@ include ../../var.mk
|
|||||||
# Common C compiler warnings to silence
|
# Common C compiler warnings to silence
|
||||||
#
|
#
|
||||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-logical-op-parentheses -Wno-main -Wno-variadic-macros -Wno-deprecated-non-prototype
|
-Wno-logical-op-parentheses -Wno-main -Wno-variadic-macros -Wno-deprecated-non-prototype \
|
||||||
|
-Wno-unused-parameter
|
||||||
|
|
||||||
# Common C compiler warning flags
|
# Common C compiler warning flags
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
# define R BlackPixel(d,D)
|
# define R BlackPixel(d,D)
|
||||||
# define S r.xvisibility
|
# define S r.xvisibility
|
||||||
|
|
||||||
int main(a)int a;{Window s[53];int w,u,i,c,y,l=0
|
int main(a,b)int a;char**b;{Window s[53];int w,u,i,c,y,l=0
|
||||||
,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
|
,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
|
||||||
d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
|
d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
|
||||||
v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
|
v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
# define R BlackPixel(d,D)
|
# define R BlackPixel(d,D)
|
||||||
# define S r.xvisibility
|
# define S r.xvisibility
|
||||||
|
|
||||||
int main(a)int a;{Window s[53];int w,u,i,c,y,l=0
|
int main(a,b)int a;char**b;{Window s[53];int w,u,i,c,y,l=0
|
||||||
,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
|
,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
|
||||||
d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
|
d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
|
||||||
v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
|
v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
|
||||||
|
|||||||
@@ -1467,6 +1467,12 @@ line lengths match the original code, at least as best as possible (if not
|
|||||||
perfectly), including start and end columns, often (if not all) with the same
|
perfectly), including start and end columns, often (if not all) with the same
|
||||||
start and end character.
|
start and end character.
|
||||||
|
|
||||||
|
Cody made `main()` have two args, not one, as some versions of clang have a
|
||||||
|
defect with the number of args to `main()` though when it comes to 1 arg it is
|
||||||
|
only in an error message if say 4 args are used. This is out of an abundance of
|
||||||
|
caution as it's quite possible that clang or the ANSI C committee end up further
|
||||||
|
changing this.
|
||||||
|
|
||||||
Yusuke also noted that there is a bug in the program where right after starting
|
Yusuke also noted that there is a bug in the program where right after starting
|
||||||
it moves towards the right but if you click the mouse it goes back.
|
it moves towards the right but if you click the mouse it goes back.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user