summaryrefslogtreecommitdiffstats
path: root/ching/ching/ching.6
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>2005-06-30 13:30:33 +0000
committerperry <perry@NetBSD.org>2005-06-30 13:30:33 +0000
commitb25e8fbbad734b9ac4b2944e44f96c0a4ff4ee09 (patch)
treeb0239c62dfb2a265c97cec74f6c3bfe74899f087 /ching/ching/ching.6
parent4365ff06b4ad27e4a3e9f5f9594d96cb96c505fe (diff)
downloadbsdgames-darwin-b25e8fbbad734b9ac4b2944e44f96c0a4ff4ee09.tar.gz
bsdgames-darwin-b25e8fbbad734b9ac4b2944e44f96c0a4ff4ee09.tar.zst
bsdgames-darwin-b25e8fbbad734b9ac4b2944e44f96c0a4ff4ee09.zip
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
Diffstat (limited to 'ching/ching/ching.6')
-rw-r--r--ching/ching/ching.6152
1 files changed, 152 insertions, 0 deletions
diff --git a/ching/ching/ching.6 b/ching/ching/ching.6
new file mode 100644
index 00000000..ac650f75
--- /dev/null
+++ b/ching/ching/ching.6
@@ -0,0 +1,152 @@
+.\" $NetBSD: ching.6,v 1.1 2005/06/30 13:30:33 perry Exp $
+.\"
+.\" Copyright (c) Caldera International Inc. 2001-2002. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code and documentation must retain the
+.\" above copyright notice, this list of conditions and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed or owned by Caldera
+.\" International, Inc.
+.\" 4. Neither the name of Caldera International, Inc. nor the names of
+.\" other contributors may be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
+.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\"
+.\" Copyright (c) 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.\" @(#)ching.6 8.1 (Berkeley) 5/31/93
+.\"
+.Dd May 31, 1993
+.Dt CHING 6
+.Os
+.Sh NAME
+.Nm ching
+.Nd the book of changes and other cookies
+.Sh SYNOPSIS
+.Nm
+.Op hexagram
+.Sh DESCRIPTION
+The
+.Em I Ching
+or
+.Em Book of Changes
+is an ancient Chinese oracle that has been in use for centuries
+as a source of wisdom and advice.
+.Pp
+The text of the
+.Em oracle
+(as it is sometimes known) consists of sixty-four
+.Em hexagrams,
+each symbolized by a particular arrangement of six straight (\-\-\-)
+and broken (\-\ \-) lines. These lines have values ranging
+from six through nine, with the even values indicating the broken lines.
+.Pp
+Each hexagram consists of two major sections. The
+.Sy Judgement
+relates specifically to the matter at hand
+.Po e.g.,
+.Dq "It furthers one to have somewhere to go."
+.Pc
+while the
+.Sy Image
+describes the general attributes of the hexagram and how they apply
+to one's own life
+.Po Do Thus the superior man makes
+.No himself strong
+.No and untiring. Dc Pc
+When any of the lines have the values six or nine, they are moving
+lines; for each there is an appended judgement which becomes
+significant. Furthermore, the moving lines are inherently unstable
+and change into their opposites; a second hexagram (and thus an
+additional judgement) is formed.
+.Pp
+Normally, one consults the oracle by fixing the desired question
+firmly in mind and then casting a set of changes (lines)
+using yarrow\-stalks or tossed coins. The resulting hexagram
+will be the answer to the question.
+.Pp
+Using an algorithm suggested by S. C. Johnson, the
+.Ux
+.Em oracle
+simply reads a question from the standard input (up to an EOF) and
+hashes the individual characters in combination with the time of day,
+process id and any other magic numbers which happen to be lying around
+the system. The resulting value is used as the seed of a random
+number generator which drives a simulated coin\-toss divination. The
+answer is then piped through
+.Xr nroff 1
+for formatting and will appear on the standard output.
+.Pp
+For those who wish to remain steadfast in the old traditions, the
+oracle will also accept the results of a personal divination using,
+for example, coins. To do this, cast the change and then type the
+resulting line values as an argument.
+.Pp
+The impatient modern may prefer to settle for Chinese cookies; try
+.Xr fortune 6 .
+.Sh SEE ALSO
+It furthers one to see the great man.
+.Sh DIAGNOSTICS
+The great prince issues commands,
+.br
+Founds states, vests families with fiefs.
+.br
+Inferior people should not be employed.
+.Sh BUGS
+Waiting in the mud
+.br
+Brings about the arrival of the enemy.
+.br
+If one is not extremely careful,
+.br
+Somebody may come up from behind and strike him.
+.br
+Misfortune.