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:
Cody Boone Ferguson committed 2023-11-16 03:20:18 -08:00
1 parent beefa8da12
commit 890f59d056
4 files changed
+12 -6

No files matched your search

+5 -1
View File
@@ -41,7 +41,7 @@ include ../../var.mk
CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
-Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \
-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
#
@@ -140,6 +140,10 @@ ${PROG}: ${PROG}.c
alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
# data files
#
data: ${DATA}
+5 -3
View File
@@ -28,9 +28,11 @@ bugs.md](/bugs.md#1991-buzzard).
## Alternate code:
This version changes the keys `f` for forward, `l` for left and `r` for right to
`k` for forward, `l` for right and `h` for left, which is more natural for those
who use vi(m). Also one can just hit `q` followed by enter to quit the maze.
This version changes the keys `f` for forward, `l` for left and `r` for right by
default to `k` for forward, `l` for right and `h` for left, which is more
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:
+1 -1
View File
@@ -1,7 +1,7 @@
#include <stdio.h>
#define X(s) (!(s&3)-((s&3)==2))
#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 +
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
l* X ( f + 3 ) ] ;}int
+1 -1
View File
@@ -1,7 +1,7 @@
#include <stdio.h>
#define X(s) (!(s&3)-((s&3)==2))
#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 +
3) * d+l *X(f+ 2 )][ A+X ( f ) * d +
l* X ( f + 3 ) ] ;}int