prog.c: In function 'autoplay':
prog.c:3:8: warning: implicit declaration of function 'step' [-Wimplicit-function-declaration]
if (!step()) return 0;
^
prog.c:5:33: error: 'RWS' undeclared (first use in this function)
for (change = 0, i = 1; i < RWS; ++i)
^
prog.c:5:33: note: each undeclared identifier is reported only once for each function it appears in
prog.c:6:23: error: 'CLS' undeclared (first use in this function)
for (j = 1; j < CLS; ++j)
^
prog.c:7:7: warning: implicit declaration of function 'DETECT' [-Wimplicit-function-declaration]
if (!DETECT(bd[i][j],UNKN)) { /* consider nghbrs of safe cells */
^
prog.c:7:14: error: 'bd' undeclared (first use in this function)
if (!DETECT(bd[i][j],UNKN)) { /* consider nghbrs of safe cells */
^
prog.c:7:23: error: 'UNKN' undeclared (first use in this function)
if (!DETECT(bd[i][j],UNKN)) { /* consider nghbrs of safe cells */
^
prog.c:8:8: warning: implicit declaration of function 'cnx' [-Wimplicit-function-declaration]
m = cnx(i,j,MINE);
^
prog.c:8:16: error: 'MINE' undeclared (first use in this function)
m = cnx(i,j,MINE);
^
prog.c:9:16: error: 'FLAG' undeclared (first use in this function)
if (cnx(i,j,FLAG) == m) { /* mines appear flagged */
^
prog.c:10:22: warning: implicit declaration of function 'DIM' [-Wimplicit-function-declaration]
for (k = 0; k < DIM(neighbor); ++k)
^
prog.c:10:26: error: 'neighbor' undeclared (first use in this function)
for (k = 0; k < DIM(neighbor); ++k)
^
prog.c:11:19: warning: implicit declaration of function 'NEIGHBOR' [-Wimplicit-function-declaration]
if (DETECT(NEIGHBOR(i,j,k),UNKN)&&!DETECT(NEIGHBOR(i,j,k),FLAG)) {
^
prog.c:13:5: error: 'row' undeclared (first use in this function)
row = i+neighbor[k].i-1, col = j+neighbor[k].j-1;
^
prog.c:13:30: error: 'col' undeclared (first use in this function)
row = i+neighbor[k].i-1, col = j+neighbor[k].j-1;
^
prog.c:13:28: warning: left-hand operand of comma expression has no effect [-Wunused-value]
row = i+neighbor[k].i-1, col = j+neighbor[k].j-1;
^
prog.c:16:15: warning: implicit declaration of function 'CLR_BIT' [-Wimplicit-function-declaration]
change = 1, CLR_BIT(NEIGHBOR(i,j,k),UNKN);
^
prog.c:21:15: warning: implicit declaration of function 'SET_BIT' [-Wimplicit-function-declaration]
change = 1, SET_BIT(NEIGHBOR(i,j,k),FLAG);
^