ronald@csuchico.EDU (Ronald Cole) (12/17/87)
Here are the diffs to NetHack 2.2 to run on UNIX System V Release 2.0 3B5 Version 2. I have tried to make the changes in the files controlled by #ifdef options so that they would be non-intrusive. Who knows, maybe I succeeded. Anyway here they are: -------------------------- diffs to "Makefile.unix" -------------------------- 15c15 < TERMLIB = -ltermlib --- > TERMLIB = -lcurses ------------------------------------------------------------------------------ ---------------------------- diffs to "config.h" ----------------------------- 23,24c23,24 < #define BSD /* defind for 4.n BSD */ < /* #define SYSV /* define for System V */ --- > /* #define BSD /* defind for 4.n BSD */ > #define SYSV /* define for System V */ 29c29 < #define PYRAMID_BUG /* avoid a bug on the Pyramid */ --- > /* #define PYRAMID_BUG /* avoid a bug on the Pyramid */ 33c33 < /* #define TERMINFO /* uses "curses" rather than termcap */ --- > #define TERMINFO /* uses "curses" rather than termcap */ 69c69 < #define DEF_MAILREADER "/usr/bin/mail" /* or e.g. /bin/mail */ --- > #define DEF_MAILREADER "/bin/mail" /* or e.g. /bin/mail */ 134c134 < typedef char schar; --- > typedef short int schar; 164c164 < #define Bitfield(x,n) uchar x --- > #define Bitfield(x,n) unsigned x:n ------------------------------------------------------------------------------ ----------------------------- diffs to "mklev.c" ----------------------------- 531c531,533 < if(troom->hx < 0 || croom->hx < 0 || doorindex >= DOORMAX) return; --- > /* break test into two parts for compiler bug. ronald@csuchico.edu */ > if(troom->hx < 0 || croom->hx < 0) return; > if(doorindex >= DOORMAX) return; ------------------------------------------------------------------------------ ------------------------------ diffs to "rnd.c" ------------------------------ 5c5,6 < #define RND(x) (random() % (x)) --- > /* changed random to rand; should be this anyway. ronald@csuchico.edu */ > #define RND(x) (rand() % (x)) ------------------------------------------------------------------------------ ---------------------------- diffs to "termcap.c" ---------------------------- 6a7,11 > #ifdef TERMINFO > # ifdef SYSV > #include <sgtty.h> /* ronald@csuchico.edu - ospeed support for USG */ > # endif > #endif 18d22 < short ospeed; /* terminal baudrate; used by tputs */ 19a24 > short ospeed; /* terminal baudrate; used by tputs */ 71a77,84 > #ifdef TERMINFO > # ifdef SYSV > struct sgttyb kludge; /* ronald@csuchico.edu - ospeed support for USG */ > > ioctl(fileno(stdout), TIOCGETP, &kludge); > ospeed = kludge.sg_ospeed; > # endif > #endif ------------------------------------------------------------------------------ It may not be much, but elegance is in the eye of the beholder. Have fun and Merry Christmas! -- Ronald Cole | uucp: ihnp4!csun!csuchico!ronald AT&T 3B5 System Manager | PhoneNet: ronald@csuchico.edu California State University, Chico | voice (916) 895-4635 "... and if you don't like it, you must lump it." -Joseph Smith