paul@vixie.UUCP (06/12/87)
Two bugs, one compiler leak. Here are three unauthorized patches for
Larry Wall's Warp7 program, recently posted to comp.sources.games. I
have sent these to Larry, who I'd guess by his reputation will have
an Official Patch Kit out in a few days. If you apply these, save
the ".orig" files and rename them back, before you apply the patch that
I expect from Larry pretty soon. To apply these, cd to the warp7 source
directory and feed this article to Patch. From RN, say |(cd xxxxx;patch)
Index: Configure
*** Configure.orig Thu Jun 11 12:41:36 1987
--- Configure Thu Jun 11 12:49:20 1987
***************
*** 1934,1939 ****
--- 1934,1942 ----
echo " "
if test -d ../UU; then
cd ..
+ myread=UU/myread
+ else
+ myread=myread
fi
echo "Creating config.sh..."
$spitshell <<EOT >config.sh
***************
*** 2056,2062 ****
echo "If you didn't make any mistakes, then just type a carriage return here."
rp="If you need to edit config.sh, do it as a shell escape here:"
$echo $n "$rp $c"
! . myread
case "$ans" in
'') ;;
*) : in case they cannot read
--- 2059,2065 ----
echo "If you didn't make any mistakes, then just type a carriage return here."
rp="If you need to edit config.sh, do it as a shell escape here:"
$echo $n "$rp $c"
! . $myread
case "$ans" in
'') ;;
*) : in case they cannot read
***************
*** 2096,2102 ****
EOM
rp="Run make depend now? [$dflt]"
$echo $n "$rp $c"
! . myread
case "$ans" in
y*) make depend
echo "Now you must run a make."
--- 2099,2105 ----
EOM
rp="Run make depend now? [$dflt]"
$echo $n "$rp $c"
! . $myread
case "$ans" in
y*) make depend
echo "Now you must run a make."
Index: weapon.c
*** weapon.c.orig Thu Jun 11 15:01:42 1987
--- weapon.c Thu Jun 11 15:15:22 1987
***************
*** 356,365 ****
goto bombout;
if (prob == scandist) {
int y, x;
! blast[y=(obj->posy+obj->vely+YSIZE00)%YSIZE]
! [x=(obj->posx+obj->velx+XSIZE00)%XSIZE]
! += (obj->image == '0' ? 2000 : 200);
yblasted[y] |= 1;
xblasted[x] |= 1;
blasted = TRUE;
--- 356,367 ----
goto bombout;
if (prob == scandist) {
int y, x;
+ int z;
! y=(obj->posy+obj->vely+YSIZE00)%YSIZE;
! x=(obj->posx+obj->velx+XSIZE00)%XSIZE;
! z=(obj->image == '0' ? 2000 : 200);
! blast[y][x] = blast[y][x] + z;
yblasted[y] |= 1;
xblasted[x] |= 1;
blasted = TRUE;
Index: intrp.c
*** intrp.c.orig Thu Jun 11 14:58:20 1987
--- intrp.c Thu Jun 11 14:58:47 1987
***************
*** 22,28 ****
/* name of this host */
#ifdef GETHOSTNAME
! char *hostname;
# undef HOSTNAME
# define HOSTNAME hostname
#else /* !GETHOSTNAME */
--- 22,28 ----
/* name of this host */
#ifdef GETHOSTNAME
! /* char *hostname; */
# undef HOSTNAME
# define HOSTNAME hostname
#else /* !GETHOSTNAME */
***************
*** 33,39 ****
# define HOSTNAME uts.nodename
# else /* !DOUNAME */
# ifdef PHOSTNAME
! char *hostname;
# undef HOSTNAME
# define HOSTNAME hostname
# else /* !PHOSTNAME */
--- 33,39 ----
# define HOSTNAME uts.nodename
# else /* !DOUNAME */
# ifdef PHOSTNAME
! /* char *hostname; */
# undef HOSTNAME
# define HOSTNAME hostname
# else /* !PHOSTNAME */
That's it.
--
Paul A Vixie Esq
329 Noe Street {ptsfa, crash, hoptoad, ucat}!vixie!paul
San Francisco ptsfa!vixie!paul@ames.ames.arc.nasa.gov
CA 94116 paul@vixie.UUCP (415) 864-7013