abs [Fri, 17 Mar 2006 23:11:47 +0000 (23:11 +0000)]
If getpwuid() returns null, its not usually a good idea to dereference
that to try to assign a default value. Just copy the default value into
the final destination.
Addresses Coverty CID 925
garbled [Thu, 19 Jan 2006 21:20:35 +0000 (21:20 +0000)]
Fix some minor buglets in wump:
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.
garbled [Thu, 19 Jan 2006 20:15:31 +0000 (20:15 +0000)]
Apply patch from PR bin/26501 to fix hang in wump if you play too many
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.
perry [Sun, 14 Aug 2005 20:28:25 +0000 (20:28 +0000)]
1) Update atomic weights.
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.
perry [Sun, 14 Aug 2005 17:45:17 +0000 (17:45 +0000)]
Sulphur -> Sulfur
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".
- caesar(6) is not a SETGIDGAME, so we don't need to revoke any privileges.
- 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.
perry [Thu, 30 Jun 2005 13:30:33 +0000 (13:30 +0000)]
ching(6) -- The Book of Changes, not seen in BSD since 4.4BSD.
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
symka [Thu, 30 Jun 2005 06:08:56 +0000 (06:08 +0000)]
Fixed error on a nonexistent mail spool file, when countmail can't find it\n\nCloses PR misc/29526\n\n\(Code submitted in PR misc/29526 by Andreas Eder)
rillig [Mon, 27 Jun 2005 20:32:07 +0000 (20:32 +0000)]
Changed the type of data_table to be unsigned char[] instead of char[],
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.
hubertf [Wed, 22 Jun 2005 20:11:03 +0000 (20:11 +0000)]
* Change program logic to not nest needlessly
* 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)
Fixed wrong use of datatypes. In wait_for(), a char was used together
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.
jwise [Mon, 21 Mar 2005 18:45:18 +0000 (18:45 +0000)]
Fix a long-standing bug in wump(6) whereby hitting ^d to exit would first
print ``Care to play another game? (y-n)'' (but then exit anyway without
waiting for an answer).
jsm [Tue, 15 Feb 2005 12:58:21 +0000 (12:58 +0000)]
Don't presume phantasia's internal bool (char) is the same as that in
curses.h: define phbool and use it where necessary to avoid declaring
functions with one bool and defining them with the other.
jmc [Thu, 9 Dec 2004 05:15:59 +0000 (05:15 +0000)]
Redo how void gets init'd.
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