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