[net.games.hack] Last part of hack distribution will be an ed script

aeb@mcvax.UUCP (Andries Brouwer) (04/14/85)

Tomorrow I'll post the tenth and last part of the distribution
of Hack 1.0.2. Since I started posting about two weeks ago
I have noticed a few bugs and in order to fix them the end
of the shar file is an edit script. Thus, you should run this
last file through sh after unpacking the 9 other files, and
have the hack source writable.
Of course some people will already have edited their sources;
in such cases, make the hack source read only and the ed script
will not do anything.
The fixes are not very important (at least not under BSD4.2;
a description of the changes follows below)
and Hack compiles (under BSD4.2) both with and without the fixes,
so you may choose what you want.
Below a discussion of the changes. (I also put in a few enhancements
people asked for.)

Changes (+ means bug fix):

- Put the definitions of the data and rumors files in config.h

- Put a bitfield  female  in def.flag.h (so that we can say
  "choked in her food" and "cave woman" - any other sex
  dependencies? I hope girls won't mind being seduced by a Nymph).

- Undo the interchange of the commands 'I' and 'i' - too many
  people complained - they must be right.

+ Added in hack.do_name.c
159a162
> 	otemp.onamelth = 0;
  (previously naming a type of object where the specific object already
   had a name produced garbage).

- Do not eat objects on the floor while floating.

+ Added in hack.engrave.c
249a250
> 	head_engr = 0;
  (previously engravings on one level were also found on the next).

- Added the possibility to escape from a 'D' command with the escape char.

+ Changed the definition of the name of the save file so that it doesnt
  contain spaces (I find that some UNIX systems do not allow embedded
  spaces in a filename). [hack.main.c]
< 	(void) sprintf(SAVEF, "save/%5d%s", getuid(), plname);
---
> 	(void) sprintf(SAVEF, "save/%d%s", getuid(), plname);

+ Changed the names of the field in the struct rectangle in hack.mklev.c
  so that these are different from the fields in struct room. (Old C
  compilers just translate fields into offsets, regardless of the
  structure concerned.)
32c32
< 	xchar lx,ly,hx,hy;
---
> 	xchar rlx,rly,rhx,rhy;
(and all places where these are used).

+ Fixed a bug in the wand of wishing code (where sometimes strcmp was called
  with zero argument) [hack.objnam.c]
498c498,501
< 		if(an && strcmp(an, objects[i].oc_name))
---
> 		register char *zn = objects[i].oc_name;
> 
> 		if(!zn) goto nxti;
> 		if(an && strcmp(an, zn))
500c503
< 		if(dn && strcmp(dn, objects[i].oc_descr))
---
> 		if(dn && (!(zn = objects[i].oc_descr) || strcmp(dn, zn)))
502c505
< 		if(un && strcmp(un, objects[i].oc_uname))
---
> 		if(un && (!(zn = objects[i].oc_uname) || strcmp(un, zn)))
536c539
< 		spe = 0;
---
> 		spe = (rn2(10) ? -1 : 0);