Fix fix on 1991/buzzard
The parameter type of q in function z() should be a 'char *', not a 'char **'. Added to CSILENCE -Wno-implicit-int. Note that if including files for abs(3), strlen(3) or other functions implicitly declared the program will not work (or at least it won't work if at least one of them is #included?).
This commit is contained in:
1 parent
beefa8da12
commit
890f59d056
4 files changed
+12
-6
No files matched your search
@@ -41,7 +41,7 @@ include ../../var.mk
|
|||||||
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
|
||||||
-Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \
|
-Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \
|
||||||
-Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value \
|
-Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value \
|
||||||
-Wno-deprecated-non-prototype
|
-Wno-deprecated-non-prototype -Wno-implicit-int
|
||||||
|
|
||||||
# Common C compiler warning flags
|
# Common C compiler warning flags
|
||||||
#
|
#
|
||||||
@@ -140,6 +140,10 @@ ${PROG}: ${PROG}.c
|
|||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||||
|
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
@@ -28,9 +28,11 @@ bugs.md](/bugs.md#1991-buzzard).
|
|||||||
|
|
||||||
## Alternate code:
|
## Alternate code:
|
||||||
|
|
||||||
This version changes the keys `f` for forward, `l` for left and `r` for right to
|
This version changes the keys `f` for forward, `l` for left and `r` for right by
|
||||||
`k` for forward, `l` for right and `h` for left, which is more natural for those
|
default to `k` for forward, `l` for right and `h` for left, which is more
|
||||||
who use vi(m). Also one can just hit `q` followed by enter to quit the maze.
|
natural for those who use vi(m). Also one can just hit `q` followed by enter to
|
||||||
|
quit the maze. It is problematic to reconfigure the keys except by modifying the
|
||||||
|
code directly so the keys are not made a `-D` at the compiler.
|
||||||
|
|
||||||
|
|
||||||
### Alternate build:
|
### Alternate build:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define X(s) (!(s&3)-((s&3)==2))
|
#define X(s) (!(s&3)-((s&3)==2))
|
||||||
#define W while
|
#define W while
|
||||||
char Z[82][82],A,B,f,g=26;z(q)char**q;{return atoi(q);}m(d,l){return
|
char Z[82][82],A,B,f,g=26;z(q)char*q;{return atoi(q);}m(d,l){return
|
||||||
Z[ B + X ( f +
|
Z[ B + X ( f +
|
||||||
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
|
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
|
||||||
l* X ( f + 3 ) ] ;}int
|
l* X ( f + 3 ) ] ;}int
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define X(s) (!(s&3)-((s&3)==2))
|
#define X(s) (!(s&3)-((s&3)==2))
|
||||||
#define W while
|
#define W while
|
||||||
char Z[82][82],A,B,f,g=26;z(q)char**q;{return atoi(q);}m(d,l){return
|
char Z[82][82],A,B,f,g=26;z(q)char*q;{return atoi(q);}m(d,l){return
|
||||||
Z[ B + X ( f +
|
Z[ B + X ( f +
|
||||||
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
|
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
|
||||||
l* X ( f + 3 ) ] ;}int
|
l* X ( f + 3 ) ] ;}int
|
||||||
|
|||||||
Reference in new issue
Block a user