billr@saab.CNA.TEK.COM (Bill Randle) (07/12/89)
Submitted-by: "Philip A. Cordier" <philc@sco.COM>
Posting-number: Volume 7, Issue 9
Archive-name: ularn/Patch1
Patch-To: ularn: Volume 7, Issue 1-8
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: patches01
# Wrapped by billr@saab on Mon Jul 10 13:53:34 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches01' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches01'\"
else
echo shar: Extracting \"'patches01'\" \(9852 characters\)
sed "s/^X//" >'patches01' <<'END_OF_FILE'
X*** /dev/null Mon Jul 10 13:45:01 1989
X--- README.patch Mon Jul 10 13:52:14 1989
X***************
X*** 0 ****
X--- 1,57 ----
X+
X+
X+ 7/9/89
X+
X+ Several small problems with the distribution of Ularn have cropped
X+ up, and I've put together several patches. To apply, you'll need
X+ Larry Wall's "patch" program (if you don't have it and can't
X+ find it anywhere, you should be able to make the modifications
X+ by hand from the descriptions below). These should be applied to
X+ the unmodified sources as distributed by the comp.sources.games
X+ moderator.
X+
X+ -Phil Cordier
X+ philc@sco.COM
X+ ...!uunet!sco!philc
X+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
X+
X+ FILE: header.h
X+ CHANGE: move "#include <sys/timeb.h>" to after #ifdef BSD
X+ FIXES: file not found message for those SYSV implentations that don't
X+ have the BSD <sys/timeb.h> file.
X+
X+ FILE: main.c
X+ CHANGE: all "<=26" to "<26"
X+ FIXES: problem with junk on screen after doing an inventory
X+
X+ FILE: nap.c
X+ CHANGE: comment out stuff after "#else"
X+ FIXES: error messages from picky compilers
X+
X+ FILE: to_ansi.c
X+ CHANGE: add explicit "exit(0)" before end of main()
X+ FIXES: unless explicit succesfull return value is there, some compilers
X+ return whatever is on top of the stack - if non-zero, 'make' bombs
X+ out.
X+
X+ FILE: tok.c
X+ CHANGE: add an ioctl to flush input buffer for those who don't have the
X+ POSIX tcflush() function.
X+ FIXES: unresolved external message for those without POSIX stuff.
X+
X+ FILE: scores.c
X+ CHANGE: change first call of "scbr()" to "clearvt100()" in died()
X+ FIXES: restores all initial terminal settings - EOF will now correctly
X+ be <control>-D instead of <control>-A after playing the game.
X+
X+ FILE: Makefile
X+ CHANGE: $(UTIL) to ./$(UTIL) in actions for Umaps
X+ FIXES: If you run 'make install' as root, it will fail when it tries
X+ to run 'to_ansi <Uhelp.no_control >Uhelp' because "." is not in root's
X+ PATH. Fix by adding explicit "./" before the "to_ansi" call.
X+ CHANGE: $(UTIL_OBJ) to $(UTIL_SRC) in production for $(UTIL)
X+ FIXES: Some systems complain about not being able to find to_ansi.o.
X+
X+ FILE: store.c
X+ CHANGE: add a loop to zero out gemvalue array before selling a stone
X+ FIXES: bug allowing you to sell a gemstone multiple times
X*** header.h.orig Thu Jun 29 06:28:23 1989
X--- header.h Mon Jul 10 09:22:06 1989
X***************
X*** 1,9 ****
X /* header.h */
X #include <sys/types.h>
X #include <sys/stat.h>
X- #include <sys/timeb.h>
X
X #ifdef BSD
X # include <sys/time.h>
X # include <sgtty.h>
X #else
X--- 1,9 ----
X /* header.h */
X #include <sys/types.h>
X #include <sys/stat.h>
X
X #ifdef BSD
X+ # include <sys/timeb.h>
X # include <sys/time.h>
X # include <sgtty.h>
X #else
X*** main.c.orig Thu Jun 29 06:28:41 1989
X--- main.c Mon Jul 10 09:22:07 1989
X***************
X*** 269,275 ****
X srcount++;
X }
X
X! for (k=0; k<=26; k++)
X if (iven[k]) show3(k);
X
X lprintf("\nElapsed time is %d. You have %d mobuls left",
X--- 269,275 ----
X srcount++;
X }
X
X! for (k=0; k<26; k++)
X if (iven[k]) show3(k);
X
X lprintf("\nElapsed time is %d. You have %d mobuls left",
X***************
X*** 320,326 ****
X srcount=0;
X
X /* count number of items we will display */
X! for (count=2,j=0; j<=26; j++)
X if (i=iven[j])
X switch(i) {
X case OLEATHER:
X--- 320,326 ----
X srcount=0;
X
X /* count number of items we will display */
X! for (count=2,j=0; j<26; j++)
X if (i=iven[j])
X switch(i) {
X case OLEATHER:
X***************
X*** 339,345 ****
X t_setup(count);
X
X for (i=22; i<93; i++)
X! for (j=0; j<=26; j++)
X if (i==iven[j])
X switch(i) {
X case OLEATHER:
X--- 339,345 ----
X t_setup(count);
X
X for (i=22; i<93; i++)
X! for (j=0; j<26; j++)
X if (i==iven[j])
X switch(i) {
X case OLEATHER:
X***************
X*** 368,374 ****
X sigsav=nosignal; nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<=26; j++) /* count how many items */
X if (i=iven[j])
X switch(i) {
X case ODIAMOND: case ORUBY: case OEMERALD:
X--- 368,374 ----
X sigsav=nosignal; nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<26; j++) /* count how many items */
X if (i=iven[j])
X switch(i) {
X case ODIAMOND: case ORUBY: case OEMERALD:
X***************
X*** 390,396 ****
X t_setup(count);
X
X for (i=22; i<93; i++)
X! for (j=0; j<=26; j++)
X if (i==iven[j])
X switch(i) {
X case ODIAMOND: case ORUBY:
X--- 390,396 ----
X t_setup(count);
X
X for (i=22; i<93; i++)
X! for (j=0; j<26; j++)
X if (i==iven[j])
X switch(i) {
X case ODIAMOND: case ORUBY:
X***************
X*** 419,425 ****
X sigsav=nosignal; nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<=26; j++)
X switch(iven[j]) {
X case OBOOK:
X case OSCROLL:
X--- 419,425 ----
X sigsav=nosignal; nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<26; j++)
X switch(iven[j]) {
X case OBOOK:
X case OSCROLL:
X***************
X*** 428,434 ****
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<=26; j++)
X if (i==iven[j])
X switch(i) {
X case OBOOK:
X--- 428,434 ----
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<26; j++)
X if (i==iven[j])
X switch(i) {
X case OBOOK:
X***************
X*** 451,457 ****
X nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<=26; j++)
X switch(iven[j]) {
X case OCOOKIE:
X count++;
X--- 451,457 ----
X nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<26; j++)
X switch(iven[j]) {
X case OCOOKIE:
X count++;
X***************
X*** 459,465 ****
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<=26; j++)
X if (i==iven[j])
X switch(i) {
X case OCOOKIE:
X--- 459,465 ----
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<26; j++)
X if (i==iven[j])
X switch(i) {
X case OCOOKIE:
X***************
X*** 481,487 ****
X nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<=26; j++)
X switch(iven[j]) {
X case OPOTION:
X count++;
X--- 481,487 ----
X nosignal=1; /* don't allow ^c etc */
X srcount=0;
X
X! for (count=2,j=0; j<26; j++)
X switch(iven[j]) {
X case OPOTION:
X count++;
X***************
X*** 489,495 ****
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<=26; j++)
X if (i==iven[j])
X switch(i) {
X case OPOTION:
X--- 489,495 ----
X t_setup(count);
X
X for (i=22; i<84; i++)
X! for (j=0; j<26; j++)
X if (i==iven[j])
X switch(i) {
X case OPOTION:
X***************
X*** 1129,1135 ****
X char gack[26];
X
X cursors();
X! for (j=0; j<=26; j++)
X switch(iven[j]) {
X case OPOTION: gack[i++] = j;
X };
X--- 1129,1135 ----
X char gack[26];
X
X cursors();
X! for (j=0; j<26; j++)
X switch(iven[j]) {
X case OPOTION: gack[i++] = j;
X };
X***************
X*** 1164,1170 ****
X else if (!strcmp(str, "eat")) e = 1;
X else if (!strcmp(str, "drop")) d = 1;
X
X! for (j=0; j<=26; j++) {
X switch(iven[j]) {
X case OSWORDofSLASHING :
X case OHAMMER:
X--- 1164,1170 ----
X else if (!strcmp(str, "eat")) e = 1;
X else if (!strcmp(str, "drop")) d = 1;
X
X! for (j=0; j<26; j++) {
X switch(iven[j]) {
X case OSWORDofSLASHING :
X case OHAMMER:
X*** nap.c.orig Thu Jun 29 06:28:16 1989
X--- nap.c Mon Jul 10 09:22:08 1989
X***************
X*** 96,102 ****
X }
X }
X # endif /* SIGVTALARAM */
X! # else not BSD
X napms(time)
X int time;
X {
X--- 96,102 ----
X }
X }
X # endif /* SIGVTALARAM */
X! # else /* not BSD */
X napms(time)
X int time;
X {
X*** scores.c.orig Thu Jun 29 06:28:57 1989
X--- scores.c Mon Jul 10 09:22:09 1989
X***************
X*** 670,676 ****
X return; /* only case where died() returns */
X }
X invalid:
X! sncbr();
X f = 0;
X if (ckpflag)
X unlink(ckpfile); /* remove checkpoint file if used */
X--- 670,676 ----
X return; /* only case where died() returns */
X }
X invalid:
X! clearvt100();
X f = 0;
X if (ckpflag)
X unlink(ckpfile); /* remove checkpoint file if used */
X*** to_ansi.c.orig Thu Jun 29 08:00:13 1989
X--- to_ansi.c Mon Jul 10 09:22:10 1989
X***************
X*** 23,26 ****
X--- 23,27 ----
X } else
X putc((char)c, stdout);
X }
X+ exit(0);
X }
X*** tok.c.orig Thu Jun 29 06:28:02 1989
X--- tok.c Mon Jul 10 09:22:11 1989
X***************
X*** 49,63 ****
X exit(0);
X }
X }
X! #ifdef BSD
X! /* if keyboard input buffer is too big, flush some of it */
X! do {
X! ioctl(0,FIONREAD,&ic);
X! if (ic>flushno)
X! read(0,&cc,1);
X! }
X! while (ic>flushno);
X! #endif
X if (read(0,&cc,1) != 1)
X return(lastok = -1);
X
X--- 49,55 ----
X exit(0);
X }
X }
X! flushall();
X if (read(0,&cc,1) != 1)
X return(lastok = -1);
X
X***************
X*** 113,121 ****
X } /* gobble up the byte */
X }
X #else /* SYSV */
X! # ifdef unix
X! tcflush(0, TCIFLUSH); /* unix SYSV only, not XENIX */
X! # endif /* unix */
X #endif /* BSD */
X }
X
X--- 105,115 ----
X } /* gobble up the byte */
X }
X #else /* SYSV */
X! # ifdef TCIFLUSH
X! tcflush(0, TCIFLUSH); /* SYSV w/POSIX 1003 tcflush() */
X! # else
X! ioctl(0, TCFLSH); /* standard ioctl */
X! # endif /* TCIFLUSH */
X #endif /* BSD */
X }
X
X*** /dev/null Mon Jul 10 09:30:02 1989
X--- patchlevel.h Mon Jul 10 09:34:48 1989
X***************
X*** 0 ****
X--- 1 ----
X+ #define PATCHLEVEL 1
X*** store.c.orig Thu Jun 29 06:29:01 1989
X--- store.c Mon Jul 10 13:46:21 1989
X***************
X*** 536,541 ****
X--- 536,544 ----
X
X if (level==8) c[TELEFLAG] = 0;
X
X+ for(i = 0; i < 26; i++)
X+ gemvalue[i] = 0;
X+
X for (k=i=0; i<26; i++)
X switch(iven[i]) {
X case OLARNEYE:
END_OF_FILE
if test 9852 -ne `wc -c <'patches01'`; then
echo shar: \"'patches01'\" unpacked with wrong size!
fi
# end of 'patches01'
fi
echo shar: End of shell archive.
exit 0