DBELL life bug fix
Jyrki Yli-Nokari
jty at tut.UUCP
Tue Jul 30 23:45:57 AEST 1985
D. Bell's game of life don't run on a 4.2bsd Sun.
The game seems to start up fine, but doesn't accept any input.
The bug was in io.c function tty_char() which returns character
as integer.
Problem was that the order of bytes within word
is different in VAX and Sun.
function tty_char should read(2) the character to char ch; not int ch;
and cast it upon return.
diff io.c.orig io.c follows:
83c83
< int ch; /* char to return */
---
> char ch; /* char to return */
103c103
< return(ch &= 0x7f);
---
> return((int)(ch & 0x7f));
PS.
The life is GREAT!
Try also ;rules 1357 02468
and some small figure.
--
...mcvax!tut!jty ! I know all about FORTH.
Jyrki Yli-Nokari ! I saw a TV-program about it once
N 61 26' E 23 50' ! (I also love Carl Barks)
+358 31 162590, home +358 31 178833 !
More information about the Comp.sources.bugs
mailing list