[net.sources] More fixes to corewar

wjb@ariel.UUCP (07/03/84)

<this feature brought to you by "software lethargy">

	From the code it appears that corewar was written on a 4.1 BSD
system.  This produces two problems when it is run a USG system.

	The first problem is the function index().  This function does
not exist in USG 5.0.  The equivalent function is strchr().  A define
in corewar.h will solve this problem.

	The second problem also concerns a function - rand().  Apparently
under 4.1 it returns a number in the range 0 to (2^31 - 1).  Under USG,
the range is only to 2^15 - 1.  The shifts " >> 12 " wherever rand is
called should be removed.

flame on (very mild)

	In the future, it would be helpful if posters to net.sources
would provide more information about the system for which their program
was developed.  Both of the problems above are very common and could
be almost eliminated if the operating system was indentified.

flame off

	Now, who wants to propose net.games.core? :-)

-------
					Bill Bogstad
					ihnp4!ariel!wjb

	From an "amateur" programmer ...

		I don't get paid enough to be called professional.