Although, if I may report a bug via LJ, it throws lots of compile warnings on Debian powerpc; it looks like mostly the plain char-ness of grid, since adding -fsigned-char. You should be able to reproduce them elsewhere using -funsigned-char.
mines.c: In function `known_squares':
mines.c:581: warning: comparison is always false due to limited range of data type
mines.c:587: warning: comparison is always true due to limited range of data type
[...]
Although, if I may report a bug via LJ, it throws lots of compile warnings on Debian powerpc; it looks like mostly the plain
char-ness ofgrid, since adding-fsigned-char. You should be able to reproduce them elsewhere using-funsigned-char.