These were written by William Allen Simpson and submitted in PR 21983,
and are added with minor adjustments and nits from christos@ and myself.
Approved by christos@ and groo@.
1) Don't put two pits in the same room.
2) Don't put bats and pits in the same room. (you will never hit the bat)
3) Don't start the player in a room with a pit or bad, if possible. Some
caves are so crowded the loop may go on forever, so we give up after 100
tries to put them in a safe location (as long as it's not with the wumpus).
4) Make the manpage reflect reality WRT the default number of rooms.
Bug #3 pointed out by salo.
games in a row. Also modify change made in rev 1.18 to work correctly.
take_action() returns 1 if the player dies, causing the game to allways
exit after any death, now the game correctly asks if the player would
like to play again.
The weights here are taken from
http://www.iupac.org/publications/pac/2003/7508/7508x1107.html
and have been rounded to four significant figures in all cases.
In the case of elements that have no isotopes stable enough for
reasonable measurement, numbers have been updated from Zumdahl,
"Chemistry", Fifth edition and are presented (as before) in parentheses.
2) Cesium is now C{a}esium
3) A number of new elements have been added at the end of the periodic
table.
Although the traditional spelling in commonwealth countries is
"Sulphur", the official IUPAC name of the element is "Sulfur", and
even the Royal Society of Chemistry now spells it "Sulfur".
- replaced direct POSIX read/write with stdio, which made the code simpler.
- added even more error checking.
- restructured the code to make each function fit on one screen
(well, except one).
- now the code reflects the intended purpose of the program.
- return 0 instead of EXIT_FAILURE on success.
The C code is a complete rewrite done by Guy Harris for 4.4BSD and is
not the original from v7 at all. Unfortunately, the data file itself,
without which the rest isn't useful, was not freed until Caldera
released all of 32v a few years ago, so it was not in 4.4lite.
The data file, the ching nroff macros, and the driver script are under
Caldera or Caldera+Berkeley copyright.
I've partially redone the driver script from 4.4 (there was no point
in using a temporary file for the hexagram), which was already
partially redone from 32v. (As an aside, it is nutty that the script
needs a copyright so many times longer than the code.)
I've renamed "cno" to "castching", "phx" to "printching", (the
traditional names were opaque), and put them in /usr/libexec/ching
instead of the v7 /usr/games/ching.d. The data file and nroff macros
are in /usr/share/games/ching
because it is initialized with values >= SCHAR_MAX. Also removed two
unnecessary bit mask operations. These changes do not affect the actual
behavior. Also replaced an "#ifdef notdef" with "#if 0". All these
changes are mainly for reducing lint(1) warnings.
* Search all acronyms databases, and don't force the user to
know in which category to look (-t is gone)
* If an acronym is not found in the database or by whatis(1),
also check pkg_info(1). Per PR bin/30539 by Geert Hendrickx
(geert.hendrickx@ua.ac.be)
OK'd by Julio M. Merino Vidal <jmmv>
with getchar(), in readchar(), a char was used to read input, which in
getuchar() is used as an argument to islower() and toupper(). Also removed
a condition which terminated the process if the user typed in character
255. Approved by christos.
number generator.
Unfortunately, it conflicted with a function of the same defined in
stdlib.h. This was masked by the __P hack, which is now being purged.
I've renamed "srand" to "seedrand" to eliminate the conflict.
setup now just creates an empty file. When main starts and loads it in,
it stats and if zero size init's a new location and saves it back out.
Now games.tgz can be shared among MACHINE_ARCH's
character. Don't encode whitespace as "...". Don't fail decoding
across a 1024-byte boundary. Mark end of message appropriately. From
OpenBSD but with punctuation taken from ITU-T Recommendation F.1
(03/98).
algorithm; fixes "factor 2147483647111311". Correct comment;
algorithm is Pollard p-1, not Pollard rho. Increase base if p-1
algorithm reaches 1; fixes "factor 99999999999991". Testcases from
David A Bagley <bagleyd@tux.org>.
When reporting errors for failing to open files, give error text
rather than errno number. Patch from Joey Hess <joey@kitenet.net> for
Debian bug 187251 from Mikael Hedin <micce@debian.org>.
residual probability" error message. Distribute residual probability
correctly rather than all to one file. Patch from Mike Castle
<dalgoda@ix.netcom.com>.
any pieces, not if the opponent has removed pieces but has had a piece
knocked back to the bar afterwards. Fixes Debian bug 185101 from
Konstantin Seiler <list@kseiler.de>.
* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.
* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.
* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx
* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES
* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}
* Deprecate the (short lived) DEPENDSRCS
Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.
Tested with "make -j 8 distribution" and "make distribution".
program/tool from "FOO" to "TOOL_FOO". The new variables are:
TOOL_ASN1_COMPILE TOOL_CAP_MKDB TOOL_CAT TOOL_CKSUM TOOL_COMPILE_ET
TOOL_CONFIG TOOL_CRUNCHGEN TOOL_CTAGS TOOL_DB TOOL_EQN TOOL_FGEN
TOOL_GENCAT TOOL_GROFF TOOL_HEXDUMP TOOL_INDXBIB TOOL_INSTALLBOOT
TOOL_INSTALL_INFO TOOL_M4 TOOL_MAKEFS TOOL_MAKEINFO TOOL_MAKEWHATIS
TOOL_MDSETIMAGE TOOL_MENUC TOOL_MKCSMAPPER TOOL_MKESDB
TOOL_MKLOCALE TOOL_MKMAGIC TOOL_MKTEMP TOOL_MSGC TOOL_MTREE
TOOL_PAX TOOL_PIC TOOL_PREPMKBOOTIMAGE TOOL_PWD_MKDB TOOL_REFER
TOOL_ROFF_ASCII TOOL_ROFF_DVI TOOL_ROFF_HTML TOOL_ROFF_PS
TOOL_ROFF_RAW TOOL_RPCGEN TOOL_SOELIM TOOL_SUNLABEL TOOL_TBL
TOOL_UUDECODE TOOL_VGRIND TOOL_ZIC
For each, provide default in <bsd.sys.mk> of the form:
TOOL_FOO?= foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
TOOL_FOO= ${TOOLDIR}/bin/${_TOOL_PREFIX}foo
Document all of these in bsd.README.
This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.