mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-20 10:54:48 +00:00
This commit was manufactured by cvs2svn to create tag
'debian_version_2_14-8'. git-svn-id: file:///srv/svn/joey/bsdgames-tags/debian_version_2_14-8@5231 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
11
BUGS
11
BUGS
@@ -16,8 +16,8 @@ variable of static storage duration assigned to must be of type
|
||||
volatile sig_atomic_t. (See adventure for an example of proper
|
||||
handling.)
|
||||
|
||||
Some games may not check for errors when they should (including
|
||||
allocation failure), or may return inappropriate exit statuses.
|
||||
Some games may not check for errors when they should, or may return
|
||||
inappropriate exit statuses.
|
||||
|
||||
Some games may have arbitrary limits that they should not have.
|
||||
|
||||
@@ -27,18 +27,19 @@ Specific games
|
||||
Under some circumstances, hunt fails to start the hunt daemon if one
|
||||
is not already running. In general, hunt needs thorough testing by
|
||||
someone willing to investigate and fix bugs; at present hunt should be
|
||||
considered unsupported and probably broken.
|
||||
considered unsupported and probably broken. OpenBSD has a
|
||||
substantially improved version that should be imported/merged.
|
||||
|
||||
Saving in monop is completely broken. Since it assumes it can save by
|
||||
writing out the whole data space from 0 to sbrk(0) and read it in to
|
||||
restore, it may not be easy to fix.
|
||||
restore, it may not be easy to fix. See NetBSD PR bin/8247.
|
||||
|
||||
Gomoku can use 16 megabytes or more of memory. (This is reported (not
|
||||
by me) as NetBSD PR 3126.)
|
||||
|
||||
|
||||
Joseph S. Myers
|
||||
jsm28@cam.ac.uk
|
||||
jsm@polyomino.org.uk
|
||||
|
||||
|
||||
|
||||
|
||||
147
COPYING
147
COPYING
@@ -36,11 +36,12 @@ Most games are under the standard BSD terms:
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
The files `backgammon/backgammon/backlocal.h', `countmail/countmail'
|
||||
and `robots/auto.c' have a similar licence, but copyright is held by
|
||||
the NetBSD Foundation:
|
||||
The files "backgammon/backgammon/backlocal.h", "countmail/countmail",
|
||||
"hack/extern.h", "robots/auto.c", "sail/display.h" and
|
||||
"sail/restart.h" have a similar licence, but copyright is held by the
|
||||
NetBSD Foundation:
|
||||
|
||||
Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
Copyright (c) 1997, 1998, 1999, 2001 The NetBSD Foundation, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -71,7 +72,7 @@ the NetBSD Foundation:
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
In the case of `adventure/extern.h' the copyright is held by Christos
|
||||
In the case of "adventure/extern.h" the copyright is held by Christos
|
||||
Zoulas:
|
||||
|
||||
Copyright (c) 1997 Christos Zoulas. All rights reserved.
|
||||
@@ -101,7 +102,7 @@ Zoulas:
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
In the case of `countmail/countmail.6' the copyright is held by
|
||||
In the case of "countmail/countmail.6" the copyright is held by
|
||||
Matthew R. Green:
|
||||
|
||||
Copyright (c) 1997 Matthew R. Green
|
||||
@@ -130,7 +131,7 @@ Matthew R. Green:
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
In the case of `wargames/wargames.6', the copyright is held by Joey
|
||||
In the case of "wargames/wargames.6", the copyright is held by Joey
|
||||
Hess:
|
||||
|
||||
Copyright (c) 1998 Joey Hess
|
||||
@@ -159,7 +160,35 @@ Hess:
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
The game `atc' bears additional notices in the name of Ed James:
|
||||
In the case of "lib/strlcpy.c", the copyright is held by Todd
|
||||
C. Miller:
|
||||
|
||||
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
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. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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.
|
||||
|
||||
The game "atc" bears additional notices in the name of Ed James:
|
||||
|
||||
Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
|
||||
|
||||
@@ -168,12 +197,12 @@ The game `atc' bears additional notices in the name of Ed James:
|
||||
|
||||
For more info on this and all of my stuff, mail edjames@berkeley.edu.
|
||||
|
||||
The game `boggle' used to bear a copyright notice in the name of Barry
|
||||
The game "boggle" used to bear a copyright notice in the name of Barry
|
||||
Brachman, but he confirmed that he had assigned his copyright to the
|
||||
University of California and the continued inclusion of the old
|
||||
copyright notice was an omission on their part.
|
||||
|
||||
The game `hunt' appears to be copyrighted by its authors and the
|
||||
The game "hunt" appears to be copyrighted by its authors and the
|
||||
University of California:
|
||||
|
||||
Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
|
||||
@@ -188,14 +217,18 @@ University of California:
|
||||
and the University of California. You may redistribute freely
|
||||
as long as the copyright notices are retained.
|
||||
|
||||
These terms also apply to `hunt/Makeconfig', which is derived from the
|
||||
hunt `Makefile.inc' distributed by NetBSD.
|
||||
These terms also apply to "hunt/Makeconfig", which is derived from the
|
||||
hunt "Makefile.inc" distributed by NetBSD.
|
||||
|
||||
The game `phantasia' is not copyright (except for
|
||||
`phantasia/pathnames.h.in' to which the BSD copyright and licence
|
||||
apply); the notice in `phantasia/COPYRIGHT' applies to it.
|
||||
The game "phantasia" is not copyright (except for
|
||||
"phantasia/pathnames.h.in" to which the BSD copyright and licence
|
||||
apply); the notice in "phantasia/COPYRIGHT" applies to it.
|
||||
|
||||
The game `rogue' (in bsd-games-non-free) bears the standard BSD
|
||||
The game "wtf" is also not copyright, and bears the notice
|
||||
|
||||
Public domain
|
||||
|
||||
The game "rogue" (in bsd-games-non-free) bears the standard BSD
|
||||
notices, and then the following:
|
||||
|
||||
This source herein may be modified and/or distributed by anybody who
|
||||
@@ -205,23 +238,83 @@ notices, and then the following:
|
||||
3.) This code is not to be traded, sold, or used for personal
|
||||
gain or profit.
|
||||
|
||||
The game `wtf' is also not copyright, and bears the notice
|
||||
The game "hack" has the following notices:
|
||||
|
||||
Public domain
|
||||
Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
Amsterdam
|
||||
All rights reserved.
|
||||
|
||||
Auxilliary and data files, distributed with the games in NetBSD, but
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Stichting Centrum voor Wiskunde en
|
||||
Informatica, 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER
|
||||
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.
|
||||
|
||||
Copyright (c) 1982 Jay Fenlason <hack@gnu.org>
|
||||
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. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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.
|
||||
|
||||
"hack/pathnames.h" bears a BSD copyright notice and licence;
|
||||
"hack/hack.tty.c" bears one in addition to that in those listed above;
|
||||
"hack/extern.h" bears the notice in the name of The NetBSD Foundation
|
||||
listed above.
|
||||
|
||||
Auxiliary and data files, distributed with the games in NetBSD, but
|
||||
not bearing copyright notices, probably fall under the terms of the
|
||||
UCB or NetBSD copyrights and licences. The file `fortune/Notes'
|
||||
UCB or NetBSD copyrights and licences. The file "fortune/Notes"
|
||||
contains a warning in regard to the fortune databases.
|
||||
|
||||
Some files, beyond those present in NetBSD, have been added to the
|
||||
Linux bsd-games collection. The following terms apply to the files in
|
||||
the `include' and `lib' directories (relevant to binary distributions
|
||||
the "include" and "lib" directories (relevant to binary distributions
|
||||
insofar as they get compiled into the games; note that the include
|
||||
files are probably irrelevant for this purpose as it is unlikely they
|
||||
are significant enough to make any binary a derived work).
|
||||
|
||||
Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Joseph Samuel Myers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -253,23 +346,23 @@ significantly derived from bsd-games 1.3 by Curt Olson and Andy Tefft;
|
||||
this is all of them except for the files mentioned below to which the
|
||||
similar terms given below are expected to apply. This includes the
|
||||
testsuite scripts; the testsuite input and output for caesar
|
||||
(`tests/caesar.constin' and `tests/caesar.constout') are from the US
|
||||
("tests/caesar.constin" and "tests/caesar.constout") are from the US
|
||||
Constitution, so not copyright; I believe the other testsuite expected
|
||||
outputs are too trivial, or translations of inputs too trivial, to
|
||||
qualify for copyright; but if not, then the terms given above apply
|
||||
(and, of course, running the test command gives an identical output
|
||||
file to which you could apply your own copyright).
|
||||
|
||||
The files `bsd-games.lsm', `ChangeLog.0', `THANKS', `INSTALL',
|
||||
`README', `TODO', `boggle/README.linux', `fortune/README.linux', and
|
||||
`hunt/README.linux' are still significantly derived from files in the
|
||||
The files "bsd-games.lsm", "ChangeLog.0", "THANKS", "INSTALL",
|
||||
"README", "TODO", "boggle/README.linux", "fortune/README.linux", and
|
||||
"hunt/README.linux" are still significantly derived from files in the
|
||||
original bsd-games package for Linux by Curt Olson and Andy Tefft. It
|
||||
is expected that the following terms will apply to these files, and to
|
||||
the compilation copyright on the package as a whole; ***this has yet
|
||||
to be confirmed with Andy Tefft***:
|
||||
|
||||
Copyright (c) 1993 Curt Olson, Andy Tefft.
|
||||
Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Joseph Samuel Myers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
139
INSTALL
139
INSTALL
@@ -15,7 +15,8 @@ Non-free games
|
||||
|
||||
These installation instructions apply to both bsd-games and
|
||||
bsd-games-non-free. bsd-games-non-free contains rogue, which it seems
|
||||
cannot be sold for profit: the rest of the games are under the
|
||||
cannot be sold for profit, and hack, for which porting but not
|
||||
gameplay changes may be made: the rest of the games are under the
|
||||
standard BSD distribution conditions, or very similar ones (phantasia
|
||||
is public domain, i.e. not copyrighted). As of version 2.2 and later,
|
||||
the bsd-games-non-free package unpacks conventionally into a directory
|
||||
@@ -30,44 +31,47 @@ don't worry about it ... it really is more of an aesthetic thing.
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
You need gcc, libc5 (version 5.4.5 or later) or libc6, and ncurses
|
||||
(any reasonably recent version). Older versions of ncurses may work
|
||||
(but are much more buggy), and BSD curses / termcap just might work
|
||||
(but is obsolete), but these are completely unsupported; even with
|
||||
recent ncurses versions you could run into problems with some games
|
||||
dependent on the version of ncurses; if so, get a debugging version of
|
||||
ncurses (libncurses_g.a), link with -lncurses_g instead of -lncurses,
|
||||
and good luck bug-hunting. If the display gets confused in ordinary
|
||||
use (as opposed for example to after resizing the window), this might
|
||||
be a bug in the game, but is probably a bug in ncurses. You also need
|
||||
some sort of lex and yacc; by default this package will use flex and
|
||||
bison, but byacc will probably work as well. Libc5 versions before
|
||||
5.4.5, or libc4, will not work since they don't have the BSD <err.h>
|
||||
error reporting functions.
|
||||
You need gcc (the C compiler only - other languages not needed), libc5
|
||||
(version 5.4.5 or later) or libc6, and ncurses (any reasonably recent
|
||||
version). Older versions of ncurses may work (but are much more
|
||||
buggy), and BSD curses / termcap just might work (but is obsolete),
|
||||
but these are completely unsupported; even with recent ncurses
|
||||
versions you could run into problems with some games dependent on the
|
||||
version of ncurses; if so, get a debugging version of ncurses
|
||||
(libncurses_g.a), link with -lncurses_g instead of -lncurses, and good
|
||||
luck bug-hunting. If the display gets confused in ordinary use (as
|
||||
opposed for example to after resizing the window), this might be a bug
|
||||
in the game, but is probably a bug in ncurses. You also need some
|
||||
sort of lex and yacc; by default this package will use flex and bison,
|
||||
but byacc will probably work as well. Libc5 versions before 5.4.5, or
|
||||
libc4, will not work since they don't have the BSD <err.h> error
|
||||
reporting functions. libcrypto from OpenSSL can optionally be used by
|
||||
factor.
|
||||
|
||||
You now need a word list for boggle and hangman; bsd-games no longer
|
||||
provides one itself. The GNU miscfiles package contains one, for
|
||||
example. The path can be specified at configure time (default:
|
||||
/usr/share/dict/words). The file used by hangman can also be
|
||||
specified at run time with the "-d" option.
|
||||
|
||||
The makefiles require GNU make; if you have a strange system on which
|
||||
`make' is not GNU make you can use it under some other name since
|
||||
"make" is not GNU make you can use it under some other name since
|
||||
$(MAKE) is used where appropriate. The configure script assumes that
|
||||
/bin/sh is a POSIX.2 shell (bash is known to work; current versions of
|
||||
ksh and ash should be OK but I haven't tested them); it can be run
|
||||
manually with `bash configure' or similar if /bin/sh is not a POSIX.2
|
||||
manually with "bash configure" or similar if /bin/sh is not a POSIX.2
|
||||
shell. It uses the POSIX.2 printf utility (in GNU sh-utils, and a
|
||||
builtin in bash 2.02) to avoid depending on echo -n.
|
||||
|
||||
I am not aware of any dependence on the version of gcc used, although
|
||||
it would be advisable to use gcc 2.7.2.1 or later (or use
|
||||
-fno-strength-reduce). Sufficiently recent egcs snapshots (those with
|
||||
global CSE), and egcs releases 1.1 or later, may produce spurious
|
||||
-fno-strength-reduce). EGCS releases 1.1.x may produce spurious
|
||||
warnings about uninitialized variables because of limitations in the
|
||||
code to detect this, but this does not affect the correctness of the
|
||||
compiled code. Some glibc versions may produce many warnings in the
|
||||
system headers; these can be ignored.
|
||||
|
||||
Some man pages may look better with the tmac.doc macros from NetBSD,
|
||||
rather than the older ones distributed with groff. If any man pages
|
||||
look funny or appear to have words missing (especially the program
|
||||
name or a reference to NetBSD), having older tmac.doc may be the
|
||||
cause.
|
||||
compiled code; this seems to be fixed in GCC 2.95. Some glibc
|
||||
versions may produce many warnings in the system headers; these
|
||||
generally represent bugs in the headers whose only impact is cosmetic,
|
||||
and can be ignored.
|
||||
|
||||
Security
|
||||
========
|
||||
@@ -75,6 +79,23 @@ Security
|
||||
See the SECURITY file for a discussion of security issues about the
|
||||
BSD games.
|
||||
|
||||
Alternative implementations
|
||||
===========================
|
||||
|
||||
Some of the programs in this package have alternative implementations
|
||||
for Linux available, which you may wish to use some of instead of the
|
||||
BSD versions:
|
||||
|
||||
* banner is in util-linux.
|
||||
* factor is in GNU sh-utils as of version 1.12q.
|
||||
* An extensively modified version of fortune is available as
|
||||
"fortune-mod". There are also many additional fortune data files
|
||||
(including translations of the ones included here) available.
|
||||
* Perl implementations of some of the games are included in the "Perl
|
||||
Power Tools" project (http://language.perl.com/ppt/).
|
||||
* My enhanced version of ppt with support for PostScript output is
|
||||
available as "nppt" from metalab and its mirrors.
|
||||
|
||||
Building and installation
|
||||
=========================
|
||||
|
||||
@@ -82,54 +103,59 @@ Building and installation
|
||||
directory that contains this file. There is not yet any support
|
||||
for building in a directory other than the source directory.
|
||||
|
||||
2. Run `./configure' and configure the installation to your liking.
|
||||
2. Run "./configure" and configure the installation to your liking.
|
||||
There may be some games you don't want to build because you have
|
||||
them from elsewhere; for example, there is another fortune package
|
||||
(fortune-mod) available, and factor is included in GNU sh-utils as
|
||||
of version 1.12q. Also banner is in util-linux. You can specify
|
||||
particular games you do not want built before specifying the list
|
||||
of games to build (which will default to all those available,
|
||||
except those you have excluded).
|
||||
them from elsewhere (see above). You can specify particular games
|
||||
you do not want built before specifying the list of games to build
|
||||
(which will default to all those available, except those you have
|
||||
excluded).
|
||||
|
||||
The filesystem structure used defaults to that the the Filesystem
|
||||
Hierarchy Standard (FHS), version 2.0. If you are using the older
|
||||
FSSTND 1.2, or a newer FHS, or wish to install into /usr/local,
|
||||
check the paths given and make changes as appropriate.
|
||||
|
||||
3. Type `make'. You can probably ignore compiler warnings, although
|
||||
3. Type "make". You can probably ignore compiler warnings, although
|
||||
most should be fixed in this release. If you are building on a 64
|
||||
bit architecture, you might want to look over the warnings and let
|
||||
me know about any that are normally significant in such cases.
|
||||
Some versions of gcc (e.g. egcs 1.1) give many `missing
|
||||
initializer' warnings; these are harmless.
|
||||
Recent versions of gcc give many "missing initializer" warnings;
|
||||
these are harmless, as are the warnings in system headers
|
||||
mentioned above. Likewise, "null format string" warnings are
|
||||
harmless; future versions of GCC will probably eliminate them, by
|
||||
allowing headers to specify whether it is OK for a format argument
|
||||
to a particular function to be null.
|
||||
|
||||
At the start of the build, their will be many `No such file or
|
||||
directory' warnings from make. Ignore these as long as make does
|
||||
At the start of the build, there will be many "No such file or
|
||||
directory" warnings from make. Ignore these as long as make does
|
||||
not stop because of them: these refer to dependency files that
|
||||
make can regenerate for itself. See `Automatic Dependencies' in
|
||||
make can regenerate for itself. See "Automatic Dependencies" in
|
||||
the GNU Make manual for details.
|
||||
|
||||
In the unlikely event of an internal compiler error, the build
|
||||
system supports generating the files of preprocessor output
|
||||
required for a bug report: if the error occurs while compiling
|
||||
`foo/bar.c', then `make foo/bar.i' will put the preprocessor
|
||||
output in `foo/bar.i', suitable for sending in a bug report along
|
||||
"foo/bar.c", then "make foo/bar.i" will put the preprocessor
|
||||
output in "foo/bar.i", suitable for sending in a bug report along
|
||||
with details of compiler version and options used. You may,
|
||||
however, wish to minimise the testcase before sending a bug
|
||||
report, if you have the time to do so.
|
||||
|
||||
4. Save copies of any old versions of games you like and their
|
||||
4. Run the testsuite (non-interactive) with "make check". All tests
|
||||
should pass.
|
||||
|
||||
5. Save copies of any old versions of games you like and their
|
||||
datafiles, until you know that the new versions work.
|
||||
|
||||
5. Become root. (If, as an ordinary user, you are installing under
|
||||
6. Become root. (If, as an ordinary user, you are installing under
|
||||
your home directory, and have chosen not to set owners and groups
|
||||
on the installed files, there is of course no need to do this.)
|
||||
|
||||
6. Type `make install'. If you want the installed binaries to be
|
||||
stripped, use `make install-strip' instead. This saves disk
|
||||
7. Type "make install". If you want the installed binaries to be
|
||||
stripped, use "make install-strip" instead. This saves disk
|
||||
space, but means that you cannot debug the installed binaries.
|
||||
|
||||
7. If you had an old installation of bsd-games, check for file
|
||||
8. If you had an old installation of bsd-games, check for file
|
||||
locations that have changed. You will probably want to remove old
|
||||
executables and static data (formerly defaulting to installation
|
||||
in /usr/games/lib), and replace any empty score files that have
|
||||
@@ -147,20 +173,25 @@ Building and installation
|
||||
may need to adjust the permissions manually if you had a previous
|
||||
installation of version 2.3.
|
||||
|
||||
8. You may wish to do something with the BSD Users' Supplementary
|
||||
9. The robots scorefile format changed in version 2.8, so any old
|
||||
score file should be removed or renamed when first upgrading to
|
||||
this or a later version, and a new one created with the correct
|
||||
permissions.
|
||||
|
||||
10. You may wish to do something with the BSD Users' Supplementary
|
||||
Documents for trek and rogue, in trek/USD.doc/trek.me and
|
||||
rogue/USD.doc/rogue.me. You can look at them on a text terminal
|
||||
with `nroff -me' (piped to your pager), or format in PostScript
|
||||
for printing with `groff -me -Tps'.
|
||||
with "nroff -me" (piped to your pager), or format in PostScript
|
||||
for printing with "groff -me -Tps".
|
||||
|
||||
9. `make distclean' will restore the source directory to the original
|
||||
11. "make distclean" will restore the source directory to the original
|
||||
unpacked state. The automatically generated dependency files
|
||||
include paths to system headers, including those in gcc's internal
|
||||
header directory: if you have changed your compiler or library
|
||||
headers between building bsd-games and cleaning up, you can use
|
||||
`make distclean nodep=true' to avoid this causing problems.
|
||||
"make distclean nodep=true" to avoid this causing problems.
|
||||
|
||||
`make clean' will restore the sources to the state just after
|
||||
"make clean" will restore the sources to the state just after
|
||||
configuration.
|
||||
|
||||
Further information
|
||||
@@ -177,7 +208,7 @@ The file BUGS lists known bugs. The README file discusses how to
|
||||
produce useful bug reports.
|
||||
|
||||
Joseph S. Myers
|
||||
jsm28@cam.ac.uk
|
||||
jsm@polyomino.org.uk
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,31 @@
|
||||
# Makeconfig.in - configuration included in Makefiles after substitution
|
||||
# Makeconfig.in - configuration included in Makefiles after substitution.
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999, 2000, 2003 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
# If some variables are unexpanded in Makeconfig, this shouldn't be a
|
||||
# problem, it will be because they weren't configured since the relevant
|
||||
# games weren't being built.
|
||||
@@ -21,8 +48,6 @@ MAN6DIR := @man6dir@
|
||||
MAN8DIR := @man8dir@
|
||||
# Manual pages, section 5
|
||||
MAN5DIR := @man5dir@
|
||||
# Constant data (arch-dependent)
|
||||
LIBDIR := @usrlibdir@
|
||||
# Constant data (arch-independent)
|
||||
SHAREDIR := @sharedir@
|
||||
# Variable data
|
||||
@@ -39,6 +64,7 @@ INSTALL_DATA := @install_constdata@
|
||||
INSTALL_VARDATA := @install_vardata@
|
||||
INSTALL_DM := @install_dm@
|
||||
INSTALL_SAIL_DIR := @install_sail_dir@
|
||||
INSTALL_HACK_DIR := @install_hack_dir@
|
||||
# Is INSTALL_VARDATA actually needed (for games that start with non-empty
|
||||
# scorefile?)
|
||||
# For games which can start with empty scorefile we do:
|
||||
@@ -61,9 +87,13 @@ OPTIMIZE := @optimize_flags@
|
||||
WARNING := @warning_flags@
|
||||
CFLAGS := $(OPTIMIZE) $(WARNING) @other_cflags@
|
||||
LDFLAGS := @other_ldflags@
|
||||
FGETLN_DEFS := @fgetln_defs@
|
||||
GETLOADAVG_DEFS := @getloadavg_defs@
|
||||
NCURSES_LIB := @ncurses_lib@
|
||||
NCURSES_INCS := @ncurses_includes@
|
||||
BASE_INCS := -Iinclude $(NCURSES_INCS)
|
||||
OPENSSL_LIB := @openssl_lib@
|
||||
OPENSSL_INCS := @openssl_includes@
|
||||
BASE_INCS := -Iinclude $(NCURSES_INCS) $(OPENSSL_INCS)
|
||||
BASE_LIBS := @base_libs@
|
||||
YACC := @yacc@
|
||||
LEX := @lex@
|
||||
@@ -77,12 +107,13 @@ ATC_DIR := @atc_dir@
|
||||
ATC_SCOREFILE := @atc_scorefile@
|
||||
BATTLESTAR_SCOREFILE := @battlestar_scorefile@
|
||||
BOGGLE_DIR := @boggle_dir@
|
||||
DICTIONARY_SRC := @dictionary_src@
|
||||
CANFIELD_SCOREFILE := @canfield_scorefile@
|
||||
CRIBBAGE_INSTRFILE := @cribbage_instrfile@
|
||||
CRIBBAGE_SCOREFILE := @cribbage_scorefile@
|
||||
FISH_INSTRFILE := @fish_instrfile@
|
||||
FORTUNE_TYPE := @fortune_type@
|
||||
HANGMAN_WORDSFILE := @hangman_wordsfile@
|
||||
HACK_DIR := @hack_dir@
|
||||
MONOP_CARDSFILE := @monop_cardsfile@
|
||||
PHANTASIA_DIR := @phantasia_dir@
|
||||
QUIZ_DIR := @quiz_dir@
|
||||
@@ -93,4 +124,5 @@ SAIL_DIR := @sail_dir@
|
||||
SNAKE_SCOREFILE := @snake_scorefile@
|
||||
SNAKE_RAWSCOREFILE := @snake_rawscorefile@
|
||||
TETRIS_SCOREFILE := @tetris_scorefile@
|
||||
WTF_ACRONYMFILE := @wtf_acronymfile@
|
||||
WUMP_INFOFILE := @wump_infofile@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.16 1997/10/10 09:39:04 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.20 2002/06/16 22:24:00 itojun Exp $
|
||||
# @(#)Makefile 8.3 (Berkeley) 7/24/94
|
||||
|
||||
# Missing: ching dungeon warp
|
||||
@@ -9,6 +9,6 @@ SUBDIR= adventure arithmetic atc backgammon banner battlestar bcd boggle \
|
||||
caesar canfield countmail cribbage dm factor fish fortune gomoku hack \
|
||||
hangman hunt larn mille monop morse number phantasia pig pom ppt \
|
||||
primes quiz rain random robots rogue sail snake tetris trek wargames \
|
||||
worm worms wump
|
||||
worm worms wtf wump
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
# $NetBSD: Makefile.inc,v 1.9 1997/11/20 00:12:30 mrg Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.11 2002/01/27 00:35:16 perry Exp $
|
||||
# @(#)Makefile.inc 8.1 (Berkeley) 5/31/93
|
||||
|
||||
.if defined(HIDEGAME) && defined(PROG)
|
||||
BINDIR?= /usr/games/hide
|
||||
BINGRP?= games
|
||||
MKHIDEGAME?= no
|
||||
|
||||
.if defined(HIDEGAME) && (MKHIDEGAME!=no) && defined(PROG)
|
||||
BINDIR= /usr/games/hide
|
||||
BINGRP= games
|
||||
.if defined(SETGIDGAME)
|
||||
BINMODE?= 2550
|
||||
BINMODE= 2550
|
||||
.else
|
||||
BINMODE?= 550
|
||||
BINMODE= 550
|
||||
.endif
|
||||
SYMLINKS+= dm /usr/games/${PROG}
|
||||
.else
|
||||
BINDIR?= /usr/games
|
||||
BINDIR= /usr/games
|
||||
.if defined(SETGIDGAME)
|
||||
BINGRP= games
|
||||
BINMODE= 2555
|
||||
.endif
|
||||
.endif
|
||||
WARNS?= 1
|
||||
|
||||
39
PACKAGING
39
PACKAGING
@@ -27,12 +27,12 @@ target system. If used, this prefix must be an absolute path.
|
||||
|
||||
Although the configuration script is by default interactive (although
|
||||
it does not need a terminal), it can also be used non-interactively.
|
||||
If a file `config.params' exists in the source directory, it will be
|
||||
If a file "config.params" exists in the source directory, it will be
|
||||
sourced by the configure script. If this file (which can be an
|
||||
arbitrary shell script) sets `bsd_games_cfg_non_interactive' to `y',
|
||||
arbitrary shell script) sets "bsd_games_cfg_non_interactive" to "y",
|
||||
then the default answers to all questions will be taken without
|
||||
interaction. If this sets `bsd_games_cfg_FOO' to `BAR' then the
|
||||
default value for configuration parameter `FOO' will become `BAR'
|
||||
interaction. If this sets "bsd_games_cfg_FOO" to "BAR" then the
|
||||
default value for configuration parameter "FOO" will become "BAR"
|
||||
instead of whatever default the script would otherwise give. You can
|
||||
find the names and meanings of the configuration parameters by reading
|
||||
the configure script; they are not otherwise documented.
|
||||
@@ -45,7 +45,9 @@ trade-off between security and functionality present, and you may wish
|
||||
to choose a potentially more secure default and allow the sysadmin to
|
||||
change permissions if they are in an environment (for example, a home
|
||||
system with only trusted users) where the functionality is preferred,
|
||||
while ensuring such changes persist across upgrades.
|
||||
while ensuring such changes persist across upgrades. Some packagers
|
||||
may wish to provide a security-hardened system by giving each setgid
|
||||
game its own group so bugs in one do not affect others.
|
||||
|
||||
You may wish to include auxiliary documentation for users, such as the
|
||||
BSD Users' Supplementary Documents for trek and rogue
|
||||
@@ -53,21 +55,27 @@ BSD Users' Supplementary Documents for trek and rogue
|
||||
versions thereof), the AUTHORS and THANKS files, and the year 2000
|
||||
statement YEAR2000. Note that the trek manpage contains a reference
|
||||
to /usr/doc/trek, which should be updated to point to where you put
|
||||
trek.me or a formatted version. As noted below, it is better to
|
||||
update trek.6.in (before configure) than trek.6.
|
||||
trek.me or a formatted version.
|
||||
|
||||
Assuming you distribute source for your package (I do not believe any
|
||||
of the games have licences requiring this), and separate your patches
|
||||
from the original source .tar.gz files (whether in separate files or
|
||||
in a single file source package including them as separable
|
||||
components), arranging the building of the source so that your patches
|
||||
add a `config.params' as described above, and do any other necessary
|
||||
changes to `configure' or other source files, and so that the build
|
||||
add a "config.params" as described above, and do any other necessary
|
||||
changes to "configure" or other source files, and so that the build
|
||||
process runs configure non-interactively and then builds the package,
|
||||
makes it easier for readers to see how you have packaged it than
|
||||
running configure interactively and including the generated files in
|
||||
your patch.
|
||||
|
||||
Since bsd-games no longer comes with its own words file, you may wish
|
||||
to ensure that the same dictionaries are used in the build of boggle
|
||||
regardless of the local configuration of the dictionaries installed on
|
||||
the computer used for the build. (The list used by hangman can also
|
||||
be specified by the user at run time; future versions may provide for
|
||||
this to be done with boggle as well; see TODO.)
|
||||
|
||||
Andries Brouwer has noted more than once on linux-kernel (and
|
||||
elsewhere) that some packagers (for various software and documentation
|
||||
used under Linux):
|
||||
@@ -111,6 +119,9 @@ minors; this includes but is not limited to the offensive fortunes.
|
||||
It is your responsibility to determine and apply any restriction on
|
||||
your distribution of the games that may be necessary in consequence.
|
||||
|
||||
This package contains cryptographic software (caesar and rot13). See
|
||||
the warnings in README about this.
|
||||
|
||||
Notification of new versions
|
||||
============================
|
||||
|
||||
@@ -120,10 +131,10 @@ not currently receive this notification, please let me know.
|
||||
A note on terminology and credit
|
||||
================================
|
||||
|
||||
I am not the `upstream author' of the games packaged here; for an
|
||||
I am not the "upstream author" of the games packaged here; for an
|
||||
incomplete list of the authors see AUTHORS, but do not give me this
|
||||
credit I do not deserve at the expense of the true authors. Rather I
|
||||
am the `upstream maintainer' of the bsd-games and bsd-games-non-free
|
||||
am the "upstream maintainer" of the bsd-games and bsd-games-non-free
|
||||
packages (upstream relative to distributions), and upstream of me is
|
||||
NetBSD, who also are maintainers of the games, but not for the most
|
||||
part authors. Nor am I the creator of the bsd-games package, although
|
||||
@@ -138,3 +149,9 @@ where not known and listed in AUTHORS, or up-to-date contact details
|
||||
for authors listed there, please send me the details so they can
|
||||
receive their due credit in future versions, and thanks from any
|
||||
appreciative users.
|
||||
|
||||
|
||||
|
||||
Local Variables:
|
||||
mode: text
|
||||
End:
|
||||
|
||||
56
README
56
README
@@ -1,18 +1,19 @@
|
||||
README for bsd-games
|
||||
====================
|
||||
|
||||
This is the bsd-games package for Linux, containing ports of all the
|
||||
games from NetBSD-current that are free in the usual (DFSG/OSD) sense
|
||||
(i.e. modified and unmodified versions can be freely distributed,
|
||||
including for profit). NetBSD-current contains three other games,
|
||||
rogue, hack and larn. Rogue has a standard BSD licence, but with an
|
||||
This is the bsd-games package for Linux (and GNU Hurd), containing
|
||||
ports of all the games from NetBSD-current that are free in the usual
|
||||
(DFSG/OSD) sense (i.e. modified and unmodified versions can be freely
|
||||
distributed, including for profit). NetBSD-current contains two other
|
||||
games, rogue and larn. Rogue has a standard BSD licence, but with an
|
||||
additional contradictory licence that does not allow for-profit
|
||||
distribution; hack and larn have no licence at all. If you want
|
||||
rogue, get the bsd-games-non-free package (which should be on sunsite,
|
||||
but not tsx-11), and read the README.non-free that it contains: rogue
|
||||
is being distributed separately, and hack and larn not distributed at
|
||||
all in this Linux port, in the absence of definite confirmation of
|
||||
what licences really apply. A game not from NetBSD, paranoia, was in
|
||||
distribution; larn has no licence at all, only a notice that "Copying
|
||||
for Profit is Prohibited". If you want rogue, get the
|
||||
bsd-games-non-free package (which should be on sunsite, but not
|
||||
tsx-11), and read the README.non-free that it contains: rogue is being
|
||||
distributed separately, and larn not distributed at all in this Linux
|
||||
port, in the absence of definite confirmation of what licences really
|
||||
apply to rogue and larn. A game not from NetBSD, paranoia, was in
|
||||
earlier versions of bsd-games-non-free (and bsd-games 1.2 and 1.3) but
|
||||
has been removed because of the lack of a clear licence.
|
||||
|
||||
@@ -27,11 +28,20 @@ don't test all possible combinations of libraries for each release, so
|
||||
tell me if some versions don't work. For details of prerequisites,
|
||||
see INSTALL.
|
||||
|
||||
For installation instructions, see the file `INSTALL'. Some games
|
||||
have `README.linux' files you may wish to read.
|
||||
For installation instructions, see the file "INSTALL". Some games
|
||||
have "README.linux" files you may wish to read.
|
||||
|
||||
The statement of year 2000 issues associated with bsd-games and
|
||||
bsd-games-non-free is in the file `YEAR2000'.
|
||||
bsd-games-non-free is in the file "YEAR2000".
|
||||
|
||||
The copyrights and licence terms for the games, as best as I can
|
||||
determine them, are in "COPYING".
|
||||
|
||||
This package contains cryptographic software (caesar and rot13). In
|
||||
some jurisdictions, use or distribution of these utilities may be
|
||||
restricted, whether under export control regulations or because these
|
||||
cryptosystems have been used as technical protection measures to
|
||||
restrict access to and copying of copyright works.
|
||||
|
||||
This package contains the following games:
|
||||
|
||||
@@ -52,6 +62,7 @@ factor: factor a number
|
||||
fish: go fish
|
||||
fortune: displays a random silly message
|
||||
gomoku: gomoku
|
||||
hack: exploring the Dungeons of Doom
|
||||
hangman: guess the word before it is too late
|
||||
hunt: hunt each other in a maze (multiplayer -- great)
|
||||
mille: mille borne against the computer
|
||||
@@ -77,10 +88,11 @@ trek: We come in peace, shoot to kill. It's worse than that, he's
|
||||
wargames: would you like to play a game?
|
||||
worm: eat the numbers without running into anything
|
||||
worms: random worms scurrying across your screen
|
||||
wtf: translate acronyms, e.g. "wtf is WTF"
|
||||
wump: hunt the wumpus
|
||||
|
||||
If you have questions about bsd-games or bsd-games-non-free you can
|
||||
contact me at <jsm28@cam.ac.uk>. Bug reports should state the
|
||||
contact me at <jsm@polyomino.org.uk>. Bug reports should state the
|
||||
versions of ncurses and libc used, unless clearly not relevant (e.g.,
|
||||
bugs in data files, or where you have an analysis and patch). If you
|
||||
want to be informed by email of new releases when they come out,
|
||||
@@ -89,14 +101,20 @@ please let me know.
|
||||
Known bugs are listed in the file BUGS; please do not send bug reports
|
||||
for bugs listed there, but patches that fix them are welcome.
|
||||
|
||||
For patches, I prefer unidiffs (use `diff -u OLD NEW', or `diff -ruN
|
||||
OLD-DIRECTORY NEW-DIRECTORY'), but if your diff cannot produce them
|
||||
For patches, I prefer unidiffs (use "diff -u OLD NEW", or "diff -ruN
|
||||
OLD-DIRECTORY NEW-DIRECTORY"), but if your diff cannot produce them
|
||||
then context diffs are OK. Please remember to include details of the
|
||||
bug and your analysis of the problem if you are sending a patch; I
|
||||
have ported the code from NetBSD to Linux, but may not be familiar
|
||||
with the workings of any particular program, whereas you will be if
|
||||
you have been tracing and fixing a bug. The gcc info manual contains
|
||||
you have been tracing and fixing a bug. The GCC info manual contains
|
||||
a discussion of how to produce good bug reports.
|
||||
|
||||
Joseph S. Myers
|
||||
jsm28@cam.ac.uk
|
||||
jsm@polyomino.org.uk
|
||||
|
||||
|
||||
|
||||
Local Variables:
|
||||
mode: text
|
||||
End:
|
||||
|
||||
29
SECURITY
29
SECURITY
@@ -18,26 +18,39 @@ drop any setgid privileges completely (including the saved gid). This
|
||||
limits the effect of a cracked game to corruption of its score file.
|
||||
It should be somewhat safer now to make games setgid games than in
|
||||
versions 2.1 and earlier, but probably not completely safe; phantasia,
|
||||
sail, rogue and tetris do not currently handle their score files in
|
||||
the above way, and so should be considered the most dangerous to
|
||||
sail, rogue, hack and tetris do not currently handle their score files
|
||||
in the above way, and so should be considered the most dangerous to
|
||||
install setgid. If you are auditing these games, phantasia, sail,
|
||||
rogue and tetris should be considered the most important to audit.
|
||||
rogue, hack and tetris should be considered the most important to
|
||||
audit. In versions before 2.14, rogue had an exploitable buffer
|
||||
overrun (see NetBSD Security Advisory 2002-021).
|
||||
|
||||
An effect of this security policy is that in some cases the score
|
||||
files need to be world-readable so that they can be opened for reading
|
||||
after the game has dropped privileges, or by a score file reading
|
||||
program that was never privileged. In versions before 2.10, the
|
||||
phantasia "characs" file (containing passwords for phantasia
|
||||
characters) was mistakenly made world readable.
|
||||
|
||||
You should, of course, only install the games setgid if this is in
|
||||
line with system security policy. Games should not be installed
|
||||
setuid, since if a setuid game is cracked this allows games to be
|
||||
replaced with trojans. Games should not be installed setgid to a
|
||||
system group such as `root' or `daemon'. In some environments, an
|
||||
system group such as "root" or "daemon". In some environments, an
|
||||
acceptable alternative may be not to give the games any special
|
||||
privileges, but to put trusted users in the games group.
|
||||
|
||||
An option is to use the `dungeon master' dm to regulate games playing.
|
||||
An option is to use the "dungeon master" dm to regulate games playing.
|
||||
I believe this is safe; games that do not need to run setgid drop the
|
||||
setgid privileges they get from dm on startup. If dm is setgid, but
|
||||
the games that access score files are not, then they will keep their
|
||||
setgid privileges from dm; note that in this case it does not make
|
||||
sense for dm to be setgid to some gid other than the one (normally
|
||||
`games') with write access to the score files.
|
||||
"games") with write access to the score files.
|
||||
|
||||
This package does not yet support security hardening by giving each
|
||||
setgid game its own gid, but in some environments you may wish to do
|
||||
this.
|
||||
|
||||
***********************************************************************
|
||||
* *
|
||||
@@ -59,7 +72,7 @@ sense for dm to be setgid to some gid other than the one (normally
|
||||
|
||||
If you are compiling these games on an operating system other than
|
||||
Linux, be warned that they rely for their security on
|
||||
`setregid(getgid(), getgid())' dropping all setgid privileges
|
||||
"setregid(getgid(), getgid())" dropping all setgid privileges
|
||||
permanently, _including the saved gid_. On some operating systems
|
||||
this may fail to drop the saved gid (and indeed such operating systems
|
||||
may provide no way for a process not running as root to revoke
|
||||
@@ -68,7 +81,7 @@ access to the games group rather than merely to to that game's score
|
||||
file.
|
||||
|
||||
Joseph S. Myers
|
||||
jsm28@cam.ac.uk
|
||||
jsm@polyomino.org.uk
|
||||
|
||||
|
||||
|
||||
|
||||
89
TODO
89
TODO
@@ -1,10 +1,10 @@
|
||||
TODO list for bsd-games and bsd-games-non-free
|
||||
==============================================
|
||||
|
||||
Please let me (jsm28@cam.ac.uk) know if you're interested in doing any
|
||||
of these, or have done work on them, so we can avoid duplication of
|
||||
effort. The order of entries is just the order they were added in, not any
|
||||
priority order.
|
||||
Please let me (jsm@polyomino.org.uk) know if you're interested in
|
||||
doing any of these, or have done work on them, so we can avoid
|
||||
duplication of effort. The order of entries is just the order they
|
||||
were added in, not any priority order.
|
||||
|
||||
The file BUGS lists known bugs; you may wish to work on some of
|
||||
those. The issues listed there are not included in this list.
|
||||
@@ -12,25 +12,25 @@ those. The issues listed there are not included in this list.
|
||||
1997-04-29 - Improve security of games when running setgid. Most of
|
||||
this has been done, through adopting changes from
|
||||
OpenBSD, but a thorough audit is needed - see SECURITY.
|
||||
There are rumours of the games having been audited by the
|
||||
Linux Security Audit Project (see linux-kernel archives
|
||||
and Alan Cox's diary at
|
||||
<URL:http://roadrunner.swansea.uk.linux.org/alan.shtml>)
|
||||
but I have received no patches.
|
||||
The Linux Security Audit Project looked at the games but
|
||||
never bothered to send me their fixes; I think they are
|
||||
now included. Rogue and tetris could probably be adapted
|
||||
to keep their score files open and so need no more
|
||||
privileges than an open file descriptor. Sail could
|
||||
better use a daemon than a file for interfacing between
|
||||
multiple players; Paul Janzen might do this at some point.
|
||||
|
||||
1997-04-29 - Fix compilation warnings with increasingly strict warning
|
||||
options. -Wwrite-strings (and general use of const) is
|
||||
currently being worked on.
|
||||
|
||||
1997-04-29 - Get changes (at least the bug-fixes) merged back into NetBSD.
|
||||
Various patches for specific bugs have been sent in and
|
||||
applied: more still needs to be done, and some patches
|
||||
are currently waiting in their bug tracking system.
|
||||
options. The main reasonable ones have now been done,
|
||||
but maybe some bits are left, and new warnings get added
|
||||
to new versions of GCC. Fixes for -pedantic warnings are
|
||||
in progress.
|
||||
|
||||
1997-05-01 - Games with scorefiles should lock them when updating them.
|
||||
|
||||
1997-07-15 - Get distribution permission for hack and larn. Get
|
||||
licence of rogue clarified. (See NetBSD PR 5850.)
|
||||
1997-07-15 - Get distribution permission for larn. Get licence of
|
||||
rogue clarified. (See NetBSD PR 5850. Note that the
|
||||
original author of larn, Noah Morgan, is dead.)
|
||||
|
||||
1998-07-28 - Support building in a directory other than the source directory.
|
||||
|
||||
@@ -41,27 +41,56 @@ those. The issues listed there are not included in this list.
|
||||
be compiled with -fwritable-strings.
|
||||
|
||||
1998-08-27 - Convert the games that use termcap to use curses.
|
||||
Currently these are backgammon, rain, snake, tetris and
|
||||
worms. Somewhat hacked versions of rain and worms that
|
||||
use curses are distributed as test programs with ncurses;
|
||||
these might just possibly be useful.
|
||||
Currently these are backgammon, hack and tetris; rain,
|
||||
snake and worms have been done. If it becomes possible
|
||||
to distribute larn, this will apply to it as well.
|
||||
|
||||
1998-08-27 - If we build a game that links to another game's manpage,
|
||||
but don't install the other game, then we get a dangling
|
||||
symlink or .so for the manpage.
|
||||
|
||||
1998-08-27 - Merge in improvements from OpenBSD.
|
||||
|
||||
1998-08-27 - Fix warnings with -Wl,--warn-common (i.e., variables should be
|
||||
declared extern in the header, and defined non-extern
|
||||
exactly once).
|
||||
1998-08-27 - Merge in improvements from OpenBSD. Perhaps FreeBSD also
|
||||
has some; Paul Janzen is adding FreeBSD changes to
|
||||
OpenBSD, so they may reach me that way.
|
||||
|
||||
1998-09-04 - dm should not access the utmp file directly.
|
||||
|
||||
1998-09-11 - Move building of the manpages and headers in which
|
||||
configuration variables are substituted from the
|
||||
configure script into the Makefiles.
|
||||
1998-09-11 - Move building of more files in which configuration
|
||||
variables are substituted from the configure script into
|
||||
the Makefiles.
|
||||
|
||||
1998-12-06 - Allow alternative dictionaries to be specified at runtime
|
||||
for boggle.
|
||||
|
||||
1998-12-11 - Support LFS (large files) - this requires using
|
||||
fseeko/ftello instead of fseek/ftell, where supported,
|
||||
and using -D_FILE_OFFSET_BITS=64 (actually getconf
|
||||
LFS_CFLAGS, getconf LFS_LDFLAGS and getconf LFS_LIBS),
|
||||
and could be useful with the kernel support for 32 bit
|
||||
uids in Linux 2.4, when there could be sparse score files
|
||||
(indexed by uid) over 2Gb.
|
||||
|
||||
1998-12-14 - Check for any more constant data that could be marked
|
||||
const.
|
||||
|
||||
1998-12-28 - Fix any places that use the pid as random seed to use
|
||||
something else, such as the time, because the pid is bad
|
||||
when people boot up their system just to play a game and
|
||||
so it is constant.
|
||||
|
||||
1999-07-29 - Provide support for giving each setgid game its own gid.
|
||||
|
||||
2000-09-09 - Fuzz testing (i.e., pass random input to games in an
|
||||
attempt to crash them). Some bugs have been found and
|
||||
fixed in battlestar through this already. It probably
|
||||
works best with GCC bounded pointers.
|
||||
|
||||
2000-09-09 - Support for HURD-based GNU systems. This may now (2.13)
|
||||
work.
|
||||
|
||||
2000-09-24 - Fix any and all date-related bugs (Y2038, Y10K, etc.) so
|
||||
that the games will work on any date provided only that
|
||||
time_t is big enough.
|
||||
|
||||
|
||||
Local Variables:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.19 1998/09/13 15:22:59 hubertf Exp $
|
||||
# $NetBSD: Makefile,v 1.22 1999/07/17 19:57:03 hubertf Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= atc
|
||||
CPPFLAGS+=-DBSD -I${.CURDIR} -I. -DYY_NO_UNPUT
|
||||
SRCS= extern.c grammar.y graphics.c input.c lex.l list.c log.c \
|
||||
@@ -14,9 +16,11 @@ GAMES= Game_List Killer crossover default easy game_2 \
|
||||
game_4 novice two-corners
|
||||
HIDEGAME=hidegame
|
||||
SETGIDGAME=yes
|
||||
.if ${MKSHARE} != "no"
|
||||
FILES=${GAMES:S@^@${.CURDIR}/games/@g}
|
||||
FILESDIR=/usr/share/games/atc
|
||||
FILESMODE=440
|
||||
FILESMODE=444
|
||||
.endif
|
||||
|
||||
lex.o: grammar.h
|
||||
|
||||
|
||||
26
atc/Makefrag
26
atc/Makefrag
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for atc
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
atc_CLEANFILES := grammar.c grammar.h y.tab.* lex.c lex.yy.c
|
||||
atc_DEFS := -DBSD -DYY_NO_UNPUT
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: def.h,v 1.4 1998/09/11 12:53:28 hubertf Exp $ */
|
||||
/* $NetBSD: def.h,v 1.5 1999/09/30 18:01:31 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.c,v 1.5 1997/10/10 02:07:04 lukem Exp $ */
|
||||
/* $NetBSD: extern.c,v 1.6 1998/11/10 13:43:30 hubertf Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,7 +50,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: extern.c,v 1.5 1997/10/10 02:07:04 lukem Exp $");
|
||||
__RCSID("$NetBSD: extern.c,v 1.6 1998/11/10 13:43:30 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.6 1998/09/13 15:27:26 hubertf Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.9 2001/02/05 00:22:52 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
extern char GAMES[];
|
||||
extern const char *file;
|
||||
extern const char *file;
|
||||
|
||||
extern int clck, safe_planes, start_time, test_mode;
|
||||
|
||||
@@ -110,7 +110,9 @@ int too_close __P((const PLANE *p1, const PLANE *p2, int));
|
||||
void update __P((int));
|
||||
int yyerror __P((const char *));
|
||||
int yylex __P((void));
|
||||
#ifndef YYEMPTY
|
||||
int yyparse __P((void));
|
||||
#endif
|
||||
const char *Left __P((char));
|
||||
const char *Right __P((char));
|
||||
const char *airport __P((char));
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for atc/games
|
||||
#
|
||||
# Copyright (c) 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
atc_games_DIRS := $(ATC_DIR)
|
||||
atc_games_GAMES := atc/games/Game_List atc/games/default atc/games/easy \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grammar.y,v 1.4 1997/10/10 02:07:08 lukem Exp $ */
|
||||
/* $NetBSD: grammar.y,v 1.7 1999/07/26 21:14:21 hubertf Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -68,7 +68,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)grammar.y 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: grammar.y,v 1.4 1997/10/10 02:07:08 lukem Exp $");
|
||||
__RCSID("$NetBSD: grammar.y,v 1.7 1999/07/26 21:14:21 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -137,7 +137,7 @@ hdef:
|
||||
wdef:
|
||||
WidthOp '=' ConstOp ';'
|
||||
{
|
||||
if (sp->height != 0)
|
||||
if (sp->width != 0)
|
||||
return (yyerror("Redefinition of 'width'."));
|
||||
else if ($3 < 3)
|
||||
return (yyerror("'width' is too small."));
|
||||
@@ -253,7 +253,6 @@ Apoint:
|
||||
sp->airport[sp->num_airports].y = $3;
|
||||
sp->airport[sp->num_airports].dir = dir;
|
||||
check_point($2, $3);
|
||||
check_adir($2, $3, dir);
|
||||
sp->num_airports++;
|
||||
}
|
||||
;
|
||||
@@ -377,12 +376,6 @@ check_edir(x, y, dir)
|
||||
yyerror("Bad direction for entrance at exit.");
|
||||
}
|
||||
|
||||
void
|
||||
check_adir(x, y, dir)
|
||||
int x __attribute__((unused)), y __attribute__((unused)), dir __attribute__((unused));
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
checkdefs()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: graphics.c,v 1.4 1997/10/10 02:07:11 lukem Exp $ */
|
||||
/* $NetBSD: graphics.c,v 1.9 1999/09/10 00:16:43 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,7 +50,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: graphics.c,v 1.4 1997/10/10 02:07:11 lukem Exp $");
|
||||
__RCSID("$NetBSD: graphics.c,v 1.9 1999/09/10 00:16:43 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -72,8 +72,10 @@ getAChar()
|
||||
int c;
|
||||
|
||||
errno = 0;
|
||||
while ((c = getchar()) == EOF && errno == EINTR)
|
||||
while ((c = getchar()) == EOF && errno == EINTR) {
|
||||
errno = 0;
|
||||
clearerr(stdin);
|
||||
}
|
||||
return(c);
|
||||
}
|
||||
|
||||
@@ -294,7 +296,7 @@ ioerror(pos, len, str)
|
||||
|
||||
void
|
||||
quit(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
int c, y, x;
|
||||
#ifdef BSD
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/* $NetBSD: include.h,v 1.6 1997/10/10 02:07:14 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Ed James.
|
||||
*
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. 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.
|
||||
*
|
||||
* @(#)include.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
|
||||
*
|
||||
* Copy permission is hereby granted provided that this notice is
|
||||
* retained on all partial or complete copies.
|
||||
*
|
||||
* For more info on this and all of my stuff, mail edjames@berkeley.edu.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <curses.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "def.h"
|
||||
#include "struct.h"
|
||||
#include "extern.h"
|
||||
#include "tunable.h"
|
||||
49
atc/input.c
49
atc/input.c
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: input.c,v 1.10 1998/09/13 15:20:31 hubertf Exp $ */
|
||||
/* $NetBSD: input.c,v 1.14 2001/01/16 02:50:28 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,9 +50,9 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: input.c,v 1.10 1998/09/13 15:20:31 hubertf Exp $");
|
||||
__RCSID("$NetBSD: input.c,v 1.14 2001/01/16 02:50:28 cgd Exp $");
|
||||
#endif
|
||||
#endif not lint
|
||||
#endif /* not lint */
|
||||
|
||||
#include "include.h"
|
||||
#include "pathnames.h"
|
||||
@@ -374,7 +374,7 @@ setplane(c)
|
||||
|
||||
const char *
|
||||
turn(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
if (p.altitude == 0)
|
||||
return ("Planes at airports may not change direction");
|
||||
@@ -383,7 +383,7 @@ turn(c)
|
||||
|
||||
const char *
|
||||
circle(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
if (p.altitude == 0)
|
||||
return ("Planes cannot circle on the ground");
|
||||
@@ -393,7 +393,7 @@ circle(c)
|
||||
|
||||
const char *
|
||||
left(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dir = D_LEFT;
|
||||
p.new_dir = p.dir - 1;
|
||||
@@ -404,7 +404,7 @@ left(c)
|
||||
|
||||
const char *
|
||||
right(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dir = D_RIGHT;
|
||||
p.new_dir = p.dir + 1;
|
||||
@@ -415,7 +415,7 @@ right(c)
|
||||
|
||||
const char *
|
||||
Left(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
p.new_dir = p.dir - 2;
|
||||
if (p.new_dir < 0)
|
||||
@@ -425,7 +425,7 @@ Left(c)
|
||||
|
||||
const char *
|
||||
Right(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
p.new_dir = p.dir + 2;
|
||||
if (p.new_dir >= MAXDIR)
|
||||
@@ -434,13 +434,12 @@ Right(c)
|
||||
}
|
||||
|
||||
const char *
|
||||
delayb(ch)
|
||||
char ch;
|
||||
delayb(c)
|
||||
char c;
|
||||
{
|
||||
int xdiff, ydiff;
|
||||
unsigned char c;
|
||||
|
||||
c = ch - '0';
|
||||
c -= '0';
|
||||
|
||||
if (c >= sp->num_beacons)
|
||||
return ("Unknown beacon");
|
||||
@@ -482,7 +481,7 @@ delayb(ch)
|
||||
|
||||
const char *
|
||||
beacon(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dest_type = T_BEACON;
|
||||
return (NULL);
|
||||
@@ -490,7 +489,7 @@ beacon(c)
|
||||
|
||||
const char *
|
||||
ex_it(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dest_type = T_EXIT;
|
||||
return (NULL);
|
||||
@@ -498,7 +497,7 @@ ex_it(c)
|
||||
|
||||
const char *
|
||||
airport(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dest_type = T_AIRPORT;
|
||||
return (NULL);
|
||||
@@ -506,7 +505,7 @@ airport(c)
|
||||
|
||||
const char *
|
||||
climb(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dir = D_UP;
|
||||
return (NULL);
|
||||
@@ -514,7 +513,7 @@ climb(c)
|
||||
|
||||
const char *
|
||||
descend(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
dir = D_DOWN;
|
||||
return (NULL);
|
||||
@@ -556,12 +555,10 @@ setrelalt(c)
|
||||
}
|
||||
|
||||
const char *
|
||||
benum(ch)
|
||||
char ch;
|
||||
benum(c)
|
||||
char c;
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
dest_no = c = ch - '0';
|
||||
dest_no = c -= '0';
|
||||
|
||||
switch (dest_type) {
|
||||
case T_BEACON:
|
||||
@@ -624,7 +621,7 @@ rel_dir(c)
|
||||
|
||||
const char *
|
||||
mark(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
if (p.altitude == 0)
|
||||
return ("Cannot mark planes on the ground");
|
||||
@@ -636,7 +633,7 @@ mark(c)
|
||||
|
||||
const char *
|
||||
unmark(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
if (p.altitude == 0)
|
||||
return ("Cannot unmark planes on the ground");
|
||||
@@ -648,7 +645,7 @@ unmark(c)
|
||||
|
||||
const char *
|
||||
ignore(c)
|
||||
char c;
|
||||
char c __attribute__((__unused__));
|
||||
{
|
||||
if (p.altitude == 0)
|
||||
return ("Cannot ignore planes on the ground");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: list.c,v 1.4 1997/10/10 02:07:23 lukem Exp $ */
|
||||
/* $NetBSD: list.c,v 1.5 2001/06/19 13:42:08 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,7 +50,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: list.c,v 1.4 1997/10/10 02:07:23 lukem Exp $");
|
||||
__RCSID("$NetBSD: list.c,v 1.5 2001/06/19 13:42:08 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -107,7 +107,7 @@ delete(l, p)
|
||||
PLANE *p;
|
||||
{
|
||||
if (l->head == NULL)
|
||||
loser(p, "deleted a non-existant plane! Get help!");
|
||||
loser(p, "deleted a non-existent plane! Get help!");
|
||||
|
||||
if (l->head == p && l->tail == p)
|
||||
l->head = l->tail = NULL;
|
||||
|
||||
10
atc/log.c
10
atc/log.c
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: log.c,v 1.7 1998/07/24 23:22:26 hubertf Exp $ */
|
||||
/* $NetBSD: log.c,v 1.11 2001/01/16 02:50:28 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,9 +50,9 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: log.c,v 1.7 1998/07/24 23:22:26 hubertf Exp $");
|
||||
__RCSID("$NetBSD: log.c,v 1.11 2001/01/16 02:50:28 cgd Exp $");
|
||||
#endif
|
||||
#endif not lint
|
||||
#endif /* not lint */
|
||||
|
||||
#include "include.h"
|
||||
#include "pathnames.h"
|
||||
@@ -117,6 +117,8 @@ open_score_file()
|
||||
warn("open %s", _PATH_SCORE);
|
||||
return;
|
||||
}
|
||||
if (score_fd < 3)
|
||||
exit(1);
|
||||
/* Set the close-on-exec flag. If this fails for any reason, quit
|
||||
* rather than leave the score file open to tampering. */
|
||||
flags = fcntl(score_fd, F_GETFD);
|
||||
@@ -290,7 +292,7 @@ log_score(list_em)
|
||||
|
||||
void
|
||||
log_score_quit(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
(void)log_score(0);
|
||||
exit(0);
|
||||
|
||||
78
atc/main.c
78
atc/main.c
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.7 1998/09/13 15:20:31 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.12 2001/02/05 00:22:52 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -55,24 +55,25 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.7 1998/09/13 15:20:31 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.12 2001/02/05 00:22:52 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "include.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
extern FILE *yyin;
|
||||
|
||||
int
|
||||
main(ac, av)
|
||||
int ac __attribute__((unused));
|
||||
int ac;
|
||||
char *av[];
|
||||
{
|
||||
int seed;
|
||||
int f_usage = 0, f_list = 0, f_showscore = 0;
|
||||
int f_printpath = 0;
|
||||
const char *file = NULL;
|
||||
char *name, *ptr;
|
||||
int ch;
|
||||
struct sigaction sa;
|
||||
#ifdef BSD
|
||||
struct itimerval itv;
|
||||
@@ -82,56 +83,42 @@ main(ac, av)
|
||||
open_score_file();
|
||||
setregid(getgid(), getgid());
|
||||
|
||||
start_time = seed = time(0);
|
||||
start_time = seed = time(NULL);
|
||||
|
||||
name = *av++;
|
||||
while (*av) {
|
||||
#ifndef SAVEDASH
|
||||
if (**av == '-')
|
||||
++*av;
|
||||
else
|
||||
while ((ch = getopt(ac, av, "ulstpg:f:r:")) != -1) {
|
||||
switch (ch) {
|
||||
case '?':
|
||||
case 'u':
|
||||
default:
|
||||
f_usage++;
|
||||
break;
|
||||
case 'l':
|
||||
f_list++;
|
||||
break;
|
||||
case 's':
|
||||
case 't':
|
||||
f_showscore++;
|
||||
break;
|
||||
case 'p':
|
||||
f_printpath++;
|
||||
break;
|
||||
case 'r':
|
||||
seed = atoi(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
case 'g':
|
||||
file = optarg;
|
||||
break;
|
||||
#endif
|
||||
ptr = *av++;
|
||||
while (*ptr) {
|
||||
switch (*ptr) {
|
||||
case '?':
|
||||
case 'u':
|
||||
f_usage++;
|
||||
break;
|
||||
case 'l':
|
||||
f_list++;
|
||||
break;
|
||||
case 's':
|
||||
case 't':
|
||||
f_showscore++;
|
||||
break;
|
||||
case 'p':
|
||||
f_printpath++;
|
||||
break;
|
||||
case 'r':
|
||||
seed = atoi(*av);
|
||||
av++;
|
||||
break;
|
||||
case 'f':
|
||||
case 'g':
|
||||
file = *av;
|
||||
av++;
|
||||
break;
|
||||
default:
|
||||
warnx("unknown option '%c'\n", *ptr);
|
||||
f_usage++;
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
if (optind < ac)
|
||||
f_usage++;
|
||||
srandom(seed);
|
||||
|
||||
if (f_usage)
|
||||
fprintf(stderr,
|
||||
"Usage: %s -[u?lstp] [-[gf] game_name] [-r random seed]\n",
|
||||
name);
|
||||
av[0]);
|
||||
if (f_showscore)
|
||||
log_score(1);
|
||||
if (f_list)
|
||||
@@ -228,7 +215,6 @@ int
|
||||
read_file(s)
|
||||
const char *s;
|
||||
{
|
||||
extern FILE *yyin;
|
||||
int retval;
|
||||
|
||||
file = s;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: struct.h,v 1.3 1995/03/21 15:04:31 cgd Exp $ */
|
||||
/* $NetBSD: struct.h,v 1.4 1999/07/17 19:57:03 hubertf Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
||||
10
atc/update.c
10
atc/update.c
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: update.c,v 1.7 1998/09/11 12:53:29 hubertf Exp $ */
|
||||
/* $NetBSD: update.c,v 1.11 2001/01/16 02:50:28 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -50,15 +50,15 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: update.c,v 1.7 1998/09/11 12:53:29 hubertf Exp $");
|
||||
__RCSID("$NetBSD: update.c,v 1.11 2001/01/16 02:50:28 cgd Exp $");
|
||||
#endif
|
||||
#endif not lint
|
||||
#endif /* not lint */
|
||||
|
||||
#include "include.h"
|
||||
|
||||
void
|
||||
update(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
int i, dir_diff, unclean;
|
||||
PLANE *pp, *p1, *p2;
|
||||
@@ -366,7 +366,7 @@ addplane()
|
||||
|
||||
pp = newplane();
|
||||
if (pp == NULL)
|
||||
loser(pp, "Out of memory!");
|
||||
loser(NULL, "Out of memory!");
|
||||
memcpy(pp, &p, sizeof (p));
|
||||
|
||||
if (pp->orig_type == T_AIRPORT)
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefile - makefile fragment for backgammon/backgammon
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
backgammon_backgammon_DEFS := -DV7
|
||||
backgammon_backgammon_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
.\" $NetBSD: backgammon.6,v 1.7 1998/09/13 15:21:05 hubertf Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. 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.
|
||||
.\"
|
||||
.\" @(#)backgammon.6 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt BACKGAMMON 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm backgammon
|
||||
.Nd the game of backgammon
|
||||
.br
|
||||
.Nm teachgammon
|
||||
.Nd learn to play backgammon
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl
|
||||
.Op Fl nrwb
|
||||
.Op Fl pr
|
||||
.Op Fl pw
|
||||
.Op Fl pb
|
||||
.Op Fl t Ar term
|
||||
.Op Fl s Ar file
|
||||
.br
|
||||
.Nm teachgammon
|
||||
.Sh DESCRIPTION
|
||||
This program lets you play backgammon against the computer
|
||||
or against a "friend".
|
||||
All commands only are one letter,
|
||||
so you don't need to type a carriage return,
|
||||
except at the end of a move.
|
||||
The program is mostly self documenting,
|
||||
so that a question mark (?) will usually get some help.
|
||||
If you answer `y' when the program asks if you want the rules,
|
||||
you will get text explaining the rules of the game,
|
||||
some hints on strategy,
|
||||
instruction on how to use the program,
|
||||
and a tutorial consisting of a practice game against the computer.
|
||||
A description of how to use the program can be
|
||||
obtained by answering `y' when it asks if you want instructions.
|
||||
.Pp
|
||||
The possible arguments for backgammon
|
||||
(most are unnecessary but some are very convenient)
|
||||
consist of:
|
||||
.Bl -tag -width indent
|
||||
.It Fl n
|
||||
don't ask for rules or instructions
|
||||
.It Fl r
|
||||
player is red (implies n)
|
||||
.It Fl w
|
||||
player is white (implies n)
|
||||
.It Fl b
|
||||
two players, red and white (implies n)
|
||||
.It Fl pr
|
||||
print the board before red's turn
|
||||
.It Fl pw
|
||||
print the board before white's turn
|
||||
.It Fl pb
|
||||
print the board before both player's turn
|
||||
.It Fl t Ar term
|
||||
terminal is type
|
||||
.Ar term ,
|
||||
uses
|
||||
.Pa /usr/share/misc/termcap
|
||||
.It Fl s Ar file
|
||||
recover previously saved game from
|
||||
.Ar file .
|
||||
.El
|
||||
.Pp
|
||||
.\"
|
||||
.\" Arguments may be optionally preceded by a `-'.
|
||||
.\" Several arguments may be concatenated together,
|
||||
.\" but not after `s' or `t' arguments,
|
||||
.\" since they can be followed by an arbitrary string.
|
||||
Any unrecognized arguments are ignored.
|
||||
An argument of a lone `-' gets a description of possible arguments.
|
||||
.Pp
|
||||
If
|
||||
.Ar term
|
||||
has capabilities for direct cursor movement (see
|
||||
.Xr termcap 5 )
|
||||
.Nm
|
||||
``fixes'' the board after each move,
|
||||
so the board does not need to be reprinted,
|
||||
unless the screen suffers some horrendous malady.
|
||||
Also, any `p' option will be ignored.
|
||||
(The `t' option is not necessary unless the terminal type does not match
|
||||
the entry in the
|
||||
.Pa /usr/share/misc/termcap
|
||||
data base.)
|
||||
.Sh QUICK REFERENCE
|
||||
When the program prompts by typing only your color,
|
||||
type a space or carriage return to roll, or
|
||||
.Bl -tag -width indent
|
||||
.It Ic d
|
||||
to double
|
||||
.It Ic p
|
||||
to print the board
|
||||
.It Ic q
|
||||
to quit
|
||||
.It Ic s
|
||||
to save the game for later
|
||||
.El
|
||||
.Pp
|
||||
When the program prompts with 'Move:', type
|
||||
.Bl -tag -width indent
|
||||
.It Ic p
|
||||
to print the board
|
||||
.It Ic q
|
||||
to quit
|
||||
.It Ic s
|
||||
to save the game
|
||||
.El
|
||||
.Pp
|
||||
or a
|
||||
.Em move ,
|
||||
which is a sequence of
|
||||
.Bl -tag -width indent
|
||||
.It Ic s-f
|
||||
move from
|
||||
.Ic s
|
||||
to
|
||||
.Ic f
|
||||
.It Ic s/r
|
||||
move one man on
|
||||
.Ic s
|
||||
the roll
|
||||
.Ic r
|
||||
separated by commas or spaces and ending with a newline.
|
||||
Available abbreviations are
|
||||
.Bl -tag -width indent
|
||||
.It Ic s-f1-f2
|
||||
means
|
||||
.Ic s-f1,f1-f2
|
||||
.It Ic s/r1r2
|
||||
means
|
||||
.Ic s/r1,s/r2
|
||||
.El
|
||||
.El
|
||||
.Pp
|
||||
Use
|
||||
.Ic b
|
||||
for bar and
|
||||
.Ic h
|
||||
for home,
|
||||
or 0 or 25 as appropriate.
|
||||
.Sh AUTHOR
|
||||
Alan Char
|
||||
.Sh FILES
|
||||
.Bl -tag -width /usr/share/misc/termcap -compact
|
||||
.It Pa @gamesdir@/teachgammon
|
||||
rules and tutorial
|
||||
.It Pa /usr/share/misc/termcap
|
||||
terminal capabilities
|
||||
.El
|
||||
.Sh BUGS
|
||||
The program's strategy needs much work.
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: text.c,v 1.5 1997/10/10 08:59:38 lukem Exp $ */
|
||||
/* $NetBSD: text.c,v 1.6 1999/02/10 12:29:47 hubertf Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)text.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: text.c,v 1.5 1997/10/10 08:59:38 lukem Exp $");
|
||||
__RCSID("$NetBSD: text.c,v 1.6 1999/02/10 12:29:47 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: version.c,v 1.4 1997/10/10 08:59:39 lukem Exp $ */
|
||||
/* $NetBSD: version.c,v 1.5 1999/02/10 12:29:47 hubertf Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1987, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)version.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: version.c,v 1.4 1997/10/10 08:59:39 lukem Exp $");
|
||||
__RCSID("$NetBSD: version.c,v 1.5 1999/02/10 12:29:47 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
@@ -1,6 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
teachgammon
|
||||
@@ -1,14 +1,18 @@
|
||||
# $NetBSD: Makefile,v 1.7 1998/02/18 22:37:31 jtc Exp $
|
||||
# $NetBSD: Makefile,v 1.9 1999/02/13 02:54:20 lukem Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/11/93
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= boggle
|
||||
SRCS= bog.c help.c mach.c prtable.c timer.c word.c
|
||||
DPADD= ${LIBCURSES}
|
||||
LDADD= -lcurses
|
||||
HIDEGAME=hidegame
|
||||
MAN= boggle.6
|
||||
.if ${MKSHARE} != "no"
|
||||
FILES= helpfile
|
||||
FILESDIR=/usr/share/games/boggle
|
||||
.endif
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for boggle/boggle
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
# Defining NEW_STYLE causes this program to be compiled with the Linux
|
||||
# improvements; removing this definition gives the original BSD behaviour.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bog.c,v 1.9 1998/08/30 09:19:36 veego Exp $ */
|
||||
/* $NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: bog.c,v 1.9 1998/08/30 09:19:36 veego Exp $");
|
||||
__RCSID("$NetBSD: bog.c,v 1.16 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -526,7 +526,7 @@ validword(word)
|
||||
const char *q, *w;
|
||||
|
||||
j = word[0] - 'a';
|
||||
if (dictseek(dictfp, dictindex[j].start, 0) < 0) {
|
||||
if (dictseek(dictfp, dictindex[j].start, SEEK_SET) < 0) {
|
||||
(void) fprintf(stderr, "Seek error\n");
|
||||
cleanup();
|
||||
exit(1);
|
||||
@@ -567,7 +567,7 @@ checkdict()
|
||||
prevch ='a';
|
||||
qi = &wordpath[MAXWORDLEN + 1];
|
||||
|
||||
(void) dictseek(dictfp, 0L, 0);
|
||||
(void) dictseek(dictfp, 0L, SEEK_SET);
|
||||
while ((w = nextword(dictfp)) != NULL) {
|
||||
if (wordlen < minlength)
|
||||
continue;
|
||||
@@ -594,7 +594,7 @@ checkdict()
|
||||
*/
|
||||
if (i != previndex + 1) {
|
||||
if (dictseek(dictfp,
|
||||
dictindex[i].start, 0) < 0) {
|
||||
dictindex[i].start, SEEK_SET) < 0) {
|
||||
warnx("seek error in checkdict()");
|
||||
cleanup();
|
||||
exit(1);
|
||||
@@ -623,7 +623,7 @@ checkdict()
|
||||
}
|
||||
mword[nmwords++] = mwordsp;
|
||||
p = w;
|
||||
while ((*mwordsp++ = *p++))
|
||||
while ((*mwordsp++ = *p++) != '\0')
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.4 1998/09/13 15:27:26 hubertf Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.6 1999/09/09 17:30:18 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: help.c,v 1.3 1997/10/10 12:04:26 lukem Exp $ */
|
||||
/* $NetBSD: help.c,v 1.4 2001/02/05 00:27:35 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)help.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: help.c,v 1.3 1997/10/10 12:04:26 lukem Exp $");
|
||||
__RCSID("$NetBSD: help.c,v 1.4 2001/02/05 00:27:35 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -51,10 +51,10 @@ __RCSID("$NetBSD: help.c,v 1.3 1997/10/10 12:04:26 lukem Exp $");
|
||||
#include "bog.h"
|
||||
#include "extern.h"
|
||||
|
||||
extern int nlines;
|
||||
int
|
||||
help()
|
||||
{
|
||||
extern int nlines;
|
||||
int eof, i;
|
||||
FILE *fp;
|
||||
WINDOW *win;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach.c,v 1.8 1997/10/13 21:09:59 cjs Exp $ */
|
||||
/* $NetBSD: mach.c,v 1.11 2001/02/05 00:27:35 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mach.c,v 1.8 1997/10/13 21:09:59 cjs Exp $");
|
||||
__RCSID("$NetBSD: mach.c,v 1.11 2001/02/05 00:27:35 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -72,6 +72,10 @@ int ncols, nlines;
|
||||
|
||||
extern const char *pword[], *mword[];
|
||||
extern int ngames, nmwords, npwords, tnmwords, tnpwords;
|
||||
extern char board[];
|
||||
extern int usedbits, wordpath[];
|
||||
extern time_t start_t;
|
||||
extern int debug;
|
||||
|
||||
static void cont_catcher __P((int));
|
||||
static int prwidth __P((const char *const [], int));
|
||||
@@ -91,8 +95,6 @@ setup(sflag, seed)
|
||||
int sflag;
|
||||
time_t seed;
|
||||
{
|
||||
extern int debug;
|
||||
|
||||
if (tty_setup() < 0)
|
||||
return(-1);
|
||||
|
||||
@@ -293,7 +295,6 @@ static int gone;
|
||||
void
|
||||
stoptime()
|
||||
{
|
||||
extern time_t start_t;
|
||||
time_t t;
|
||||
|
||||
(void)time(&t);
|
||||
@@ -306,7 +307,6 @@ stoptime()
|
||||
void
|
||||
starttime()
|
||||
{
|
||||
extern time_t start_t;
|
||||
time_t t;
|
||||
|
||||
(void)time(&t);
|
||||
@@ -408,9 +408,6 @@ findword()
|
||||
{
|
||||
int c, col, found, i, r, row;
|
||||
char buf[MAXWORDLEN + 1];
|
||||
extern char board[];
|
||||
extern int usedbits, wordpath[];
|
||||
extern int nmwords, npwords;
|
||||
|
||||
getyx(stdscr, r, c);
|
||||
getword(buf);
|
||||
@@ -598,7 +595,7 @@ tty_setup()
|
||||
|
||||
static void
|
||||
stop_catcher(signo)
|
||||
int signo __attribute__((unused));
|
||||
int signo __attribute__((__unused__));
|
||||
{
|
||||
sigset_t sigset, osigset;
|
||||
|
||||
@@ -619,7 +616,7 @@ stop_catcher(signo)
|
||||
|
||||
static void
|
||||
cont_catcher(signo)
|
||||
int signo __attribute__((unused));
|
||||
int signo __attribute__((__unused__));
|
||||
{
|
||||
noecho();
|
||||
raw();
|
||||
@@ -635,7 +632,7 @@ cont_catcher(signo)
|
||||
*/
|
||||
static void
|
||||
winch_catcher(signo)
|
||||
int signo __attribute__((unused));
|
||||
int signo __attribute__((__unused__));
|
||||
{
|
||||
/*
|
||||
struct winsize win;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: prtable.c,v 1.4 1997/10/11 02:12:17 lukem Exp $ */
|
||||
/* $NetBSD: prtable.c,v 1.6 2000/03/13 22:49:31 soren Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: prtable.c,v 1.4 1997/10/11 02:12:17 lukem Exp $");
|
||||
__RCSID("$NetBSD: prtable.c,v 1.6 2000/03/13 22:49:31 soren Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <curses.h>
|
||||
@@ -63,7 +63,7 @@ static int get_maxlen __P((const char *const [], int, int (*)(const char *const
|
||||
* length - address of the routine to call to determine the length
|
||||
* of string to be printed
|
||||
*
|
||||
* prtable and length are called with the the address of the base and
|
||||
* prtable and length are called with the address of the base and
|
||||
* an index
|
||||
*/
|
||||
void
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
/* $NetBSD: timer.c,v 1.4 1997/10/10 12:04:36 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Barry Brachman.
|
||||
*
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. 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.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)timer.c 8.2 (Berkeley) 2/22/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: timer.c,v 1.4 1997/10/10 12:04:36 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <curses.h>
|
||||
#include <setjmp.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "bog.h"
|
||||
#include "extern.h"
|
||||
|
||||
static int waitch __P((long));
|
||||
|
||||
/*
|
||||
* Update the display of the remaining time while waiting for a character
|
||||
* If time runs out do a longjmp() to the game controlling routine, returning
|
||||
* non-zero; oth. return the character
|
||||
* Leave the cursor where it was initially
|
||||
*/
|
||||
int
|
||||
timerch()
|
||||
{
|
||||
extern int tlimit;
|
||||
extern time_t start_t;
|
||||
extern jmp_buf env;
|
||||
time_t prevt, t;
|
||||
int col, remaining, row;
|
||||
|
||||
getyx(stdscr, row, col);
|
||||
prevt = 0L;
|
||||
for (;;) {
|
||||
if (waitch(1000L) == 1)
|
||||
break;
|
||||
time(&t);
|
||||
if (t == prevt)
|
||||
continue;
|
||||
prevt = t;
|
||||
remaining = tlimit - (int) (t - start_t);
|
||||
if (remaining < 0) {
|
||||
longjmp(env, 1);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
move(TIMER_LINE, TIMER_COL);
|
||||
printw("%d:%02d", remaining / 60, remaining % 60);
|
||||
move(row, col);
|
||||
refresh();
|
||||
}
|
||||
return (getch() & 0177);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait up to 'delay' microseconds for input to appear
|
||||
* Returns 1 if input is ready, 0 oth.
|
||||
*/
|
||||
static int
|
||||
waitch(delay)
|
||||
long delay;
|
||||
{
|
||||
fd_set fdbits;
|
||||
struct timeval duration;
|
||||
|
||||
duration.tv_sec = 0;
|
||||
duration.tv_usec = delay;
|
||||
FD_ZERO(&fdbits);
|
||||
FD_SET(STDIN_FILENO, &fdbits);
|
||||
return (select(32, &fdbits, NULL, NULL, &duration));
|
||||
}
|
||||
|
||||
void
|
||||
delay(tenths)
|
||||
int tenths;
|
||||
{
|
||||
struct timeval duration;
|
||||
|
||||
duration.tv_usec = (tenths % 10 ) * 100000L;
|
||||
duration.tv_sec = (long) (tenths / 10);
|
||||
select(32, 0, 0, 0, &duration);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: word.c,v 1.4 1997/10/11 02:12:18 lukem Exp $ */
|
||||
/* $NetBSD: word.c,v 1.6 2001/02/05 00:27:35 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)word.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: word.c,v 1.4 1997/10/11 02:12:18 lukem Exp $");
|
||||
__RCSID("$NetBSD: word.c,v 1.6 2001/02/05 00:27:35 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -61,6 +61,9 @@ static char *sp;
|
||||
|
||||
static int first = 1, lastch = 0;
|
||||
|
||||
extern struct dictindex dictindex[];
|
||||
extern int wordlen;
|
||||
|
||||
/*
|
||||
* Return the next word in the compressed dictionary in 'buffer' or
|
||||
* NULL on end-of-file
|
||||
@@ -69,7 +72,6 @@ char *
|
||||
nextword(fp)
|
||||
FILE *fp;
|
||||
{
|
||||
extern int wordlen;
|
||||
int ch, pcount;
|
||||
char *p;
|
||||
static char buf[MAXWORDLEN + 1];
|
||||
@@ -193,7 +195,6 @@ loadindex(indexfile)
|
||||
int i, j;
|
||||
char buf[BUFSIZ];
|
||||
FILE *fp;
|
||||
extern struct dictindex dictindex[];
|
||||
|
||||
if ((fp = fopen(indexfile, "r")) == NULL) {
|
||||
warn("Can't open '%s'", indexfile);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
mkdict
|
||||
dictionary
|
||||
@@ -1,7 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
mkindex
|
||||
dictindex
|
||||
@@ -1,20 +1,20 @@
|
||||
Begin3
|
||||
Begin4
|
||||
Title: bsd-games
|
||||
Version: 2.5
|
||||
Entered-date: 24SEP98
|
||||
Version: 2.14
|
||||
Entered-date: 2003-04-01
|
||||
Description: Port of most of the games from NetBSD-current. Games
|
||||
included: adventure arithmetic atc backgammon banner battlestar
|
||||
bcd boggle caesar canfield countmail cribbage dm factor fish fortune
|
||||
gomoku hangman hunt mille monop morse number phantasia pig pom ppt
|
||||
primes quiz rain random robots sail snake tetris trek wargames worm
|
||||
worms wump.
|
||||
gomoku hack hangman hunt mille monop morse number phantasia pig pom
|
||||
ppt primes quiz rain random robots sail snake tetris trek wargames
|
||||
worm worms wtf wump.
|
||||
Keywords: games, NetBSD
|
||||
Maintained-by: jsm28@cam.ac.uk (Joseph S. Myers)
|
||||
Primary-site: sunsite.unc.edu /pub/Linux/games
|
||||
bsd-games-2.5.tar.gz
|
||||
Maintained-by: jsm@polyomino.org.uk (Joseph S. Myers)
|
||||
Primary-site: ibiblio.org /pub/Linux/games
|
||||
bsd-games-2.14.tar.gz
|
||||
Alternate-site: tsx-11.mit.edu /pub/linux/sources/usr.games
|
||||
Original-site: ftp.netbsd.org /pub/NetBSD/NetBSD-current/tar_files/src
|
||||
games.tar.gz
|
||||
games.tar.gz
|
||||
Platforms: Requires ncurses (curses/termcap may also work but are no
|
||||
longer tested/supported)
|
||||
Copying-policy: BSD
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for canfield/canfield
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
canfield_canfield_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
.\" $NetBSD: canfield.6,v 1.5 1997/10/10 12:26:34 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. 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.
|
||||
.\"
|
||||
.\" @(#)canfield.6 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt CANFIELD 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm canfield ,
|
||||
.Nm cfscores
|
||||
.Nd the solitaire card game canfield
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Nm cfscores
|
||||
.Op Fl a
|
||||
.Op Ar user
|
||||
.Sh DESCRIPTION
|
||||
If you have never played solitaire before, it is recommended
|
||||
that you consult a solitaire instruction book. In
|
||||
Canfield, tableau cards may be built on each other downward
|
||||
in alternate colors. An entire pile must be moved as a unit
|
||||
in building. Top cards of the piles are available
|
||||
to be played on foundations, but never into empty spaces.
|
||||
.Pp
|
||||
Spaces must be filled from the stock. The top card of
|
||||
the stock also is available to be played on foundations or
|
||||
built on tableau piles. After the stock is exhausted,
|
||||
tableau spaces may be filled from the talon and the player may
|
||||
keep them open until he wishes to use them.
|
||||
.Pp
|
||||
Cards are dealt from the hand to the talon by threes
|
||||
and this repeats until there are no more cards in the hand
|
||||
or the player quits. To have cards dealt onto the talon the
|
||||
player types
|
||||
.Sq Ic ht
|
||||
for his move. Foundation base cards are
|
||||
also automatically moved to the foundation when they become
|
||||
available.
|
||||
.Pp
|
||||
The command
|
||||
.Sq Ic c
|
||||
causes
|
||||
.Nm
|
||||
to maintain card counting statistics
|
||||
on the bottom of the screen.
|
||||
When properly used this can greatly increase one's chances of
|
||||
winning.
|
||||
.Pp
|
||||
The rules for betting are somewhat less strict than
|
||||
those used in the official version of the game.
|
||||
The initial deal costs $13.
|
||||
You may quit at this point or inspect the game.
|
||||
Inspection costs $13 and allows you to make as many
|
||||
moves as possible without moving any cards from your hand
|
||||
to the talon.
|
||||
(The initial deal places three cards on the talon;
|
||||
if all these cards are used,
|
||||
three more are made available.)
|
||||
Finally, if the game seems interesting,
|
||||
you must pay the final installment of $26.
|
||||
At this point you are
|
||||
credited at the rate of $5 for each card on the foundation;
|
||||
as the game progresses you are credited with $5 for each
|
||||
card that is moved to the foundation.
|
||||
Each run through the hand after the first costs $5.
|
||||
The card counting feature
|
||||
costs $1 for each unknown card that is identified.
|
||||
If the information is toggled on,
|
||||
you are only charged for cards
|
||||
that became visible since it was last turned on.
|
||||
Thus the maximum cost of information is $34.
|
||||
Playing time is charged at a rate of $1 per minute.
|
||||
.Pp
|
||||
With no arguments, the program
|
||||
.Nm cfscores
|
||||
prints out the current status of your canfield account.
|
||||
If a
|
||||
.Ar user
|
||||
name is specified,
|
||||
it prints out the status of their canfield account.
|
||||
If the
|
||||
.Fl a
|
||||
flag is specified,
|
||||
it prints out the canfield accounts for all users that have
|
||||
played the game since the database was set up.
|
||||
.Sh FILES
|
||||
.Bl -tag -width @gamesdir@/canfield -compact
|
||||
.It Pa @gamesdir@/canfield
|
||||
the game itself
|
||||
.It Pa @gamesdir@/cfscores
|
||||
the database printer
|
||||
.It Pa @canfield_scorefile@
|
||||
the database of scores
|
||||
.Sh BUGS
|
||||
It is impossible to cheat.
|
||||
.Sh AUTHORS
|
||||
Originally written: Steve Levine.
|
||||
.Pp
|
||||
Further random hacking by: Steve Feldman, Kirk McKusick,
|
||||
Mikey Olson, and Eric Allman.
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: canfield.c,v 1.11 1998/09/13 15:27:27 hubertf Exp $ */
|
||||
/* $NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: canfield.c,v 1.11 1998/09/13 15:27:27 hubertf Exp $");
|
||||
__RCSID("$NetBSD: canfield.c,v 1.17 2000/05/08 07:56:02 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -1167,24 +1167,25 @@ updatebettinginfo()
|
||||
if (status != BETTINGBOX)
|
||||
return;
|
||||
move(tboxrow + 2, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.hand, game.hand, total.hand);
|
||||
printw("%4ld%8ld%9ld", this.hand, game.hand, total.hand);
|
||||
move(tboxrow + 3, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.inspection, game.inspection, total.inspection);
|
||||
printw("%4ld%8ld%9ld", this.inspection, game.inspection,
|
||||
total.inspection);
|
||||
move(tboxrow + 4, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.game, game.game, total.game);
|
||||
printw("%4ld%8ld%9ld", this.game, game.game, total.game);
|
||||
move(tboxrow + 5, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.runs, game.runs, total.runs);
|
||||
printw("%4ld%8ld%9ld", this.runs, game.runs, total.runs);
|
||||
move(tboxrow + 6, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.information, game.information,
|
||||
printw("%4ld%8ld%9ld", this.information, game.information,
|
||||
total.information);
|
||||
move(tboxrow + 7, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.thinktime, game.thinktime, total.thinktime);
|
||||
printw("%4ld%8ld%9ld", this.thinktime, game.thinktime, total.thinktime);
|
||||
move(tboxrow + 8, boxcol + 13);
|
||||
printw("%4d%8d%9d", thiscosts, gamecosts, totalcosts);
|
||||
printw("%4ld%8ld%9ld", thiscosts, gamecosts, totalcosts);
|
||||
move(tboxrow + 9, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.wins, game.wins, total.wins);
|
||||
printw("%4ld%8ld%9ld", this.wins, game.wins, total.wins);
|
||||
move(tboxrow + 10, boxcol + 13);
|
||||
printw("%4d%8d%9d", this.worth, game.worth, total.worth);
|
||||
printw("%4ld%8ld%9ld", this.worth, game.worth, total.worth);
|
||||
move(tboxrow + 11, boxcol + 13);
|
||||
printw("%4.0f%%%7.1f%%%8.1f%%", thisreturn, gamereturn, totalreturn);
|
||||
}
|
||||
@@ -1689,6 +1690,8 @@ initall()
|
||||
|
||||
if (dbfd < 0)
|
||||
return;
|
||||
if (dbfd < 3)
|
||||
exit(1);
|
||||
i = lseek(dbfd, uid * sizeof(struct betinfo), SEEK_SET);
|
||||
if (i < 0) {
|
||||
close(dbfd);
|
||||
@@ -1746,7 +1749,7 @@ finish()
|
||||
*/
|
||||
void
|
||||
cleanup(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
|
||||
total.thinktime += 1;
|
||||
@@ -1770,7 +1773,7 @@ cleanup(dummy)
|
||||
*/
|
||||
void
|
||||
askquit(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
move(msgrow, msgcol);
|
||||
printw("Really wish to quit? ");
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.4 1997/10/22 04:42:45 lukem Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= cfscores
|
||||
CPPFLAGS+=-I${.CURDIR}/../canfield
|
||||
NOMAN= noman
|
||||
HIDEGAME=hidegame
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for canfield/cfscores
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
canfield_cfscores_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
canfield_cfscores_INCS := -Icanfield/canfield
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cfscores.c,v 1.6 1998/08/29 22:47:57 hubertf Exp $ */
|
||||
/* $NetBSD: cfscores.c,v 1.10 2000/07/03 03:57:40 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cfscores.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: cfscores.c,v 1.6 1998/08/29 22:47:57 hubertf Exp $");
|
||||
__RCSID("$NetBSD: cfscores.c,v 1.10 2000/07/03 03:57:40 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -52,6 +52,8 @@ __RCSID("$NetBSD: cfscores.c,v 1.6 1998/08/29 22:47:57 hubertf Exp $");
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "pathnames.h"
|
||||
|
||||
|
||||
31
exec.libs
31
exec.libs
@@ -1,3 +1,32 @@
|
||||
# exec.libs - details of libraries needed to link bsd-games programs.
|
||||
# This file is used for automatic makefile generation.
|
||||
#
|
||||
# Copyright (c) 1998, 1999, 2000, 2003 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
#
|
||||
atc -lm $(NCURSES_LIB) $(LEX_LIB)
|
||||
backgammon/backgammon/backgammon $(NCURSES_LIB)
|
||||
backgammon/teachgammon/teachgammon $(NCURSES_LIB)
|
||||
@@ -6,7 +35,9 @@ boggle/boggle/boggle $(NCURSES_LIB)
|
||||
caesar -lm
|
||||
canfield/canfield/canfield $(NCURSES_LIB)
|
||||
cribbage $(NCURSES_LIB)
|
||||
factor $(OPENSSL_LIB)
|
||||
gomoku $(NCURSES_LIB)
|
||||
hack $(NCURSES_LIB)
|
||||
hangman $(NCURSES_LIB)
|
||||
hunt/hunt/hunt $(NCURSES_LIB)
|
||||
mille $(NCURSES_LIB)
|
||||
|
||||
62
exec.objs
62
exec.objs
@@ -1,3 +1,32 @@
|
||||
# exec.objs - details of objects that go into bsd-games programs.
|
||||
# This file is used for automatic makefile generation.
|
||||
#
|
||||
# Copyright (c) 1998, 1999, 2000, 2001, 2003 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
#
|
||||
adventure crc.o data.o done.o init.o io.o main.o save.o subr.o \
|
||||
vocab.o wizard.o
|
||||
adventure/setup setup.o
|
||||
@@ -18,10 +47,10 @@ backgammon/teachgammon/teachgammon data.o teach.o ttext1.o ttext2.o \
|
||||
backgammon/common_source/one.o backgammon/common_source/save.o \
|
||||
backgammon/common_source/subs.o backgammon/common_source/table.o
|
||||
banner banner.o
|
||||
battlestar battlestar.o com1.o com2.o com3.o com4.o com5.o \
|
||||
com6.o com7.o cypher.o dayfile.o dayobjs.o fly.o getcom.o globals.o \
|
||||
init.o misc.o nightfile.o nightobjs.o parse.o room.o save.o words.o \
|
||||
lib/fgetln.o
|
||||
battlestar battlestar.o command1.o command2.o command3.o \
|
||||
command4.o command5.o command6.o command7.o cypher.o dayfile.o \
|
||||
dayobjs.o fly.o getcom.o globals.o init.o misc.o nightfile.o \
|
||||
nightobjs.o parse.o room.o save.o words.o lib/fgetln.o
|
||||
bcd bcd.o
|
||||
boggle/boggle/boggle bog.o help.o mach.o prtable.o timer.o word.o
|
||||
boggle/mkdict/mkdict mkdict.o
|
||||
@@ -37,13 +66,25 @@ fortune/fortune/fortune fortune.o
|
||||
fortune/strfile/strfile strfile.o
|
||||
fortune/unstr/unstr unstr.o
|
||||
gomoku bdinit.o bdisp.o main.o makemove.o pickmove.o stoc.o
|
||||
hack alloc.o hack.Decl.o hack.apply.o hack.bones.o hack.o \
|
||||
hack.cmd.o hack.do.o hack.do_name.o hack.do_wear.o hack.dog.o \
|
||||
hack.eat.o hack.end.o hack.engrave.o hack.fight.o hack.invent.o \
|
||||
hack.ioctl.o hack.lev.o hack.main.o hack.makemon.o hack.mhitu.o \
|
||||
hack.mklev.o hack.mkmaze.o hack.mkobj.o hack.mkshop.o hack.mon.o \
|
||||
hack.monst.o hack.o_init.o hack.objnam.o hack.options.o hack.pager.o \
|
||||
hack.potion.o hack.pri.o hack.read.o hack.rip.o hack.rumors.o \
|
||||
hack.save.o hack.search.o hack.shk.o hack.shknam.o hack.steal.o \
|
||||
hack.termcap.o hack.timeout.o hack.topl.o hack.track.o hack.trap.o \
|
||||
hack.tty.o hack.u_init.o hack.unix.o hack.vault.o hack.version.o \
|
||||
hack.wield.o hack.wizard.o hack.worm.o hack.worn.o hack.zap.o rnd.o
|
||||
hack/makedefs makedefs.o
|
||||
hangman endgame.o extern.o getguess.o getword.o main.o \
|
||||
playgame.o prdata.o prman.o prword.o setup.o
|
||||
hunt/hunt/hunt connect.o hunt.o otto.o playit.o \
|
||||
hunt/huntd/pathname.o lib/select.o
|
||||
hunt/huntd/pathname.o
|
||||
hunt/huntd/huntd answer.o ctl.o ctl_transact.o draw.o driver.o \
|
||||
execute.o expl.o extern.o faketalk.o get_names.o makemaze.o \
|
||||
pathname.o shots.o terminal.o lib/select.o
|
||||
pathname.o shots.o terminal.o
|
||||
mille comp.o end.o extern.o init.o mille.o misc.o move.o \
|
||||
print.o roll.o save.o types.o varpush.o
|
||||
monop cards.o execute.o getinp.o houses.o jail.o misc.o \
|
||||
@@ -61,15 +102,16 @@ primes pattern.o pr_tbl.o primes.o
|
||||
quiz quiz.o rxp.o lib/fgetln.o
|
||||
rain rain.o
|
||||
random random.o
|
||||
robots extern.o flush_in.o init_field.o main.o make_level.o \
|
||||
move.o move_robs.o play_level.o query.o rnd_pos.o score.o
|
||||
robots auto.o extern.o flush_in.o init_field.o main.o \
|
||||
make_level.o move.o move_robs.o play_level.o query.o rnd_pos.o score.o
|
||||
rogue hit.o init.o inventory.o level.o machdep.o main.o \
|
||||
message.o monster.o move.o object.o pack.o play.o random.o ring.o \
|
||||
room.o save.o score.o spec_hit.o throw.o trap.o use.o zap.o
|
||||
room.o save.o score.o spec_hit.o throw.o trap.o use.o zap.o \
|
||||
lib/strlcpy.o
|
||||
sail assorted.o game.o globals.o dr_1.o dr_2.o dr_3.o \
|
||||
dr_4.o dr_5.o dr_main.o lo_main.o main.o misc.o parties.o pl_1.o \
|
||||
pl_2.o pl_3.o pl_4.o pl_5.o pl_6.o pl_7.o pl_main.o sync.o version.o
|
||||
snake/snake/snake move.o snake.o
|
||||
snake/snake/snake snake.o
|
||||
snake/snscore/snscore snscore.o
|
||||
tetris input.o scores.o screen.o shapes.o tetris.o
|
||||
trek abandon.o attack.o autover.o capture.o cgetc.o \
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.20 1997/10/10 13:04:33 lukem Exp $
|
||||
# @(#)Makefile 8.2 (Berkeley) 4/19/94
|
||||
|
||||
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
|
||||
|
||||
SRCFILES= fortunes fortunes2 startrek zippy
|
||||
DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
|
||||
fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
|
||||
limerick limerick.dat
|
||||
|
||||
# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
|
||||
# "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
|
||||
# IN bsd.own.mk OR /etc/mk.conf.
|
||||
|
||||
INSTALL_OFFENSIVE_FORTUNES?= YES
|
||||
.if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
|
||||
TYPE= real
|
||||
.else
|
||||
TYPE= fake
|
||||
.endif
|
||||
|
||||
CLEANFILES+=${DATFILES}
|
||||
|
||||
STRFILE!=cd $(.CURDIR)/../strfile; \
|
||||
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/strfile\n" | ${MAKE} -s -f-
|
||||
|
||||
FILES=${SRCFILES} ${DATFILES}
|
||||
FILESDIR=/usr/share/games/fortune
|
||||
|
||||
all: ${DATFILES}
|
||||
|
||||
# Normal fortunes: build directly from data files.
|
||||
|
||||
fortunes.dat fortunes2.dat startrek.dat zippy.dat:
|
||||
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
|
||||
fortunes.dat: fortunes
|
||||
fortunes2.dat: fortunes2
|
||||
startrek.dat: startrek
|
||||
zippy.dat: zippy
|
||||
|
||||
# Obscene fortunes: we have to build source and data files
|
||||
|
||||
fortunes-o: fortunes-o.${TYPE}
|
||||
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||
fortunes-o.dat: fortunes-o
|
||||
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||
|
||||
fortunes2-o: fortunes2-o.${TYPE}
|
||||
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||
fortunes2-o.dat: fortunes2-o
|
||||
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||
|
||||
limerick: limerick.${TYPE}
|
||||
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||
limerick.dat: limerick
|
||||
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
@@ -1,23 +1,53 @@
|
||||
# Makefrag - makefile fragment for fortune/datfiles
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
fortune_datfiles_DATFILES := fortunes.dat fortunes2.dat startrek.dat zippy.dat
|
||||
fortune_datfiles_DATFILES_off := fortunes-o.dat fortunes2-o.dat limerick.dat
|
||||
fortune_datfiles_GENSRCFILES := fortunes-o fortunes2-o limerick
|
||||
fortune_datfiles_SRCFILES := fortunes fortunes2 startrek zippy
|
||||
fortune_datfiles_DATFILES := farber.dat fortunes.dat fortunes2.dat limerick.dat startrek.dat zippy.dat
|
||||
fortune_datfiles_DATFILES_off := fortunes-o.dat fortunes2-o.dat limerick-o.dat unamerican-o.dat
|
||||
fortune_datfiles_GENSRCFILES := fortunes-o fortunes2-o limerick-o unamerican-o
|
||||
fortune_datfiles_SRCFILES := farber fortunes fortunes2 limerick startrek zippy
|
||||
|
||||
fortune_datfiles_DATFILESp := fortune/datfiles/fortunes.dat \
|
||||
fortune/datfiles/fortunes2.dat fortune/datfiles/startrek.dat \
|
||||
fortune_datfiles_DATFILESp := fortune/datfiles/farber.dat \
|
||||
fortune/datfiles/fortunes.dat fortune/datfiles/fortunes2.dat \
|
||||
fortune/datfiles/limerick.dat fortune/datfiles/startrek.dat \
|
||||
fortune/datfiles/zippy.dat
|
||||
fortune_datfiles_DATFILES_offp := fortune/datfiles/fortunes-o.dat \
|
||||
fortune/datfiles/fortunes2-o.dat fortune/datfiles/limerick.dat
|
||||
fortune/datfiles/fortunes2-o.dat fortune/datfiles/limerick-o.dat \
|
||||
fortune/datfiles/unamerican-o.dat
|
||||
fortune_datfiles_GENSRCFILESp := fortune/datfiles/fortunes-o \
|
||||
fortune/datfiles/fortunes2-o fortune/datfiles/limerick
|
||||
fortune_datfiles_SRCFILESp := fortune/datfiles/fortunes \
|
||||
fortune/datfiles/fortunes2 fortune/datfiles/startrek \
|
||||
fortune/datfiles/fortunes2-o fortune/datfiles/limerick-o \
|
||||
fortune/datfiles/unamerican-o
|
||||
fortune_datfiles_SRCFILESp := fortune/datfiles/farber \
|
||||
fortune/datfiles/fortunes fortune/datfiles/fortunes2 \
|
||||
fortune/datfiles/limerick fortune/datfiles/startrek \
|
||||
fortune/datfiles/zippy
|
||||
|
||||
fortune_datfiles_CLEANFILES := $(fortune_datfiles_DATFILES) $(fortune_datfiles_DATFILES_off) $(fortune_datfiles_GENSRCFILES)
|
||||
fortune_datfiles_DIRS := $(LIBDIR)/fortunes
|
||||
fortune_datfiles_DIRS := $(SHAREDIR)/fortunes
|
||||
|
||||
fortune_datfiles_all: $(fortune_datfiles_DATFILESp) $(fortune_datfiles_DATFILES_offp) $(fortune_datfiles_SRCFILESp) $(fortune_datfiles_GENSRCFILESp)
|
||||
|
||||
@@ -26,7 +56,7 @@ fortune_datfiles_install: fortune_datfiles_all
|
||||
$(fortune_datfiles_GENSRCFILES) $(fortune_datfiles_DATFILES) \
|
||||
$(fortune_datfiles_DATFILES_off); do \
|
||||
$(INSTALL_DATA) fortune/datfiles/$$f \
|
||||
$(INSTALL_PREFIX)$(LIBDIR)/fortunes/$$f; \
|
||||
$(INSTALL_PREFIX)$(SHAREDIR)/fortunes/$$f; \
|
||||
done
|
||||
|
||||
$(fortune_datfiles_DATFILESp): fortune/datfiles/%.dat: fortune/datfiles/% fortune/strfile/strfile
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,11 +39,11 @@ A mathematician named Hall
|
||||
Has a hexahedronical ball,
|
||||
And the cube of its weight
|
||||
Times his pecker's, plus eight
|
||||
Is his phone number -- give him a call..
|
||||
Is his phone number -- give him a call.
|
||||
%
|
||||
"A Mormon is a man that has the bad taste and the religion to do what a
|
||||
A Mormon is a man that has the bad taste and the religion to do what a
|
||||
good many other people are restrained from doing by conscientious
|
||||
scruples and the police."
|
||||
scruples and the police.
|
||||
-- Mr. Dooley
|
||||
%
|
||||
A Nixon [is preferable to] a Dean Rusk -- who will be passionately
|
||||
@@ -100,8 +100,8 @@ Was diddled three times in a hansome.
|
||||
Her young man became sore
|
||||
And exclaimed "My name's Simpson not Samson."
|
||||
%
|
||||
"A woman is like a dresser ... some man always goin' through her
|
||||
drawers."
|
||||
A woman is like a dresser ... some man always goin' through her
|
||||
drawers.
|
||||
-- Blind Lemon Pledge
|
||||
%
|
||||
A worried young man from Stamboul
|
||||
@@ -114,9 +114,9 @@ A.I. hackers do it with robots.
|
||||
%
|
||||
Absinthe makes the tart grow fonder.
|
||||
%
|
||||
"Acceptance without proof is the fundamental characteristic of Western
|
||||
Acceptance without proof is the fundamental characteristic of Western
|
||||
religion, Rejection without proof is the fundamental characteristic of
|
||||
Western science."
|
||||
Western science.
|
||||
-- Gary Zukav, "The Dancing Wu Li Masters"
|
||||
%
|
||||
Achilles' Biological Findings:
|
||||
@@ -162,7 +162,7 @@ Corinthian, ionic, and doric.
|
||||
%
|
||||
An Army travels on her stomach.
|
||||
%
|
||||
An egg has the shortest sex-life of all: if gets laid once; it gets
|
||||
An egg has the shortest sex-life of all: it gets laid once; it gets
|
||||
eaten once. It also has to come in a box with 11 others, and the only
|
||||
person who will sit on its face is its mother.
|
||||
%
|
||||
@@ -179,7 +179,7 @@ very selfhood revealed."
|
||||
And Jesus replied, "What?"
|
||||
%
|
||||
... And then there's the guy who bought 20,000 bras, cut them in half,
|
||||
and sold 40,000 yamalchas with chin straps ...
|
||||
and sold 40,000 yamalchas with chin straps...
|
||||
%
|
||||
Anxiety, n.:
|
||||
The first time you can't do it a second time.
|
||||
@@ -193,9 +193,9 @@ Panic, n.:
|
||||
"Einstein's mother must have been one heck of a physicist."
|
||||
-- Joseph C. Wang
|
||||
%
|
||||
"Approximately 80% of our air pollution stems from hydrocarbons
|
||||
Approximately 80% of our air pollution stems from hydrocarbons
|
||||
released by vegetation, so let's not go overboard in setting and
|
||||
enforcing tough emissions standards from man-made sources."
|
||||
enforcing tough emissions standards from man-made sources.
|
||||
-- Ronald Reagan
|
||||
%
|
||||
Back in the good ole days in Texas, when stagecoaches and the like was
|
||||
@@ -215,12 +215,12 @@ collars.
|
||||
%
|
||||
Bankers do it with interest (penalty for early withdrawal).
|
||||
%
|
||||
"Based on what you know about him in history books, what do you think
|
||||
Based on what you know about him in history books, what do you think
|
||||
Abraham Lincoln would be doing if he were alive today?
|
||||
|
||||
(1) Writing his memoirs of the Civil War.
|
||||
(2) Advising the President.
|
||||
(3) Desperately clawing at the inside of his coffin."
|
||||
(3) Desperately clawing at the inside of his coffin.
|
||||
-- David Letterman
|
||||
%
|
||||
Be prepared... that's the Boy Scout's solemn creed.
|
||||
@@ -321,7 +321,7 @@ G's Third Law:
|
||||
is composed of only two basic substances: magic and bullshit.
|
||||
|
||||
H's Dictum:
|
||||
There is no magic ...
|
||||
There is no magic...
|
||||
%
|
||||
Claude believed that only smart attractive people had the right to
|
||||
fuck, and it sincerely hurt him when he discovered evidence to the
|
||||
@@ -375,12 +375,12 @@ Voiced in reverent mumble:
|
||||
But O God spare me Ronald Reagan!
|
||||
-- Ansel Adams
|
||||
%
|
||||
"Dear Mr. Seldes: I cannot remember the exact wording of the statement
|
||||
Dear Mr. Seldes: I cannot remember the exact wording of the statement
|
||||
to which you allude; but what I meant was that ... a man who calls
|
||||
himself a 100% American and is proud of it, is generally 150% an idiot
|
||||
politically. But the designations may be good business for war
|
||||
veterans. Having bled for their country in 1861 and 1918, they have
|
||||
bled it all they could consequently. And why not?"
|
||||
bled it all they could consequently. And why not?
|
||||
-- George Seldes, "The Great Quotations"
|
||||
%
|
||||
Democracy can learn some things from Communism: for example, when a
|
||||
@@ -394,7 +394,7 @@ Did you hear about the new German microwave oven?
|
||||
|
||||
... Seats 500.
|
||||
%
|
||||
Did you know that Spiro Agnew is an anagram of "Grow a Penis"
|
||||
Did you know that Spiro Agnew is an anagram of "Grow a Penis"?
|
||||
%
|
||||
Did you know that there are 71.9 acres of nipple tissue in the U.S.?
|
||||
%
|
||||
@@ -426,7 +426,7 @@ Do something big -- fuck a giant
|
||||
%
|
||||
Doctors take two aspirin and do it in the morning.
|
||||
%
|
||||
"Don't let your mouth write no check that your tail can't cash."
|
||||
Don't let your mouth write no check that your tail can't cash.
|
||||
-- Bo Diddley
|
||||
%
|
||||
Dope will get you through times of no money better that money will get
|
||||
@@ -469,8 +469,8 @@ male schlemiel.
|
||||
%
|
||||
Evangelists do it with Him watching.
|
||||
%
|
||||
"Even nowadays a man can't step up and kill a woman without feeling
|
||||
just a bit unchivalrous ..."
|
||||
Even nowadays a man can't step up and kill a woman without feeling
|
||||
just a bit unchivalrous ...
|
||||
-- Robert Benchley
|
||||
%
|
||||
Feminists say 60 percent of the country's wealth is in the hands of
|
||||
@@ -510,19 +510,19 @@ punish him? Because George still had the axe in his hand.
|
||||
Getting an education at the University of California is like having
|
||||
$50.00 shoved up your ass, a nickel at a time.
|
||||
%
|
||||
"Go to Heaven for the climate, Hell for the company."
|
||||
Go to Heaven for the climate, Hell for the company.
|
||||
-- Mark Twain
|
||||
%
|
||||
"God built a compelling sex drive into every creature, no
|
||||
God built a compelling sex drive into every creature, no
|
||||
matter what style of fucking it practiced. He made sex irresistibly
|
||||
pleasurable, wildly joyous, free from fears. He made it innocent
|
||||
merriment.
|
||||
"Needless to say, fucking was an immediate smash hit. Everyone
|
||||
Needless to say, fucking was an immediate smash hit. Everyone
|
||||
agreed, from aardvarks to zebras. All the jolly animals -- lions and
|
||||
lambs, rhinoceroses and gazelles, skylarks and lobsters, even insects,
|
||||
though most of them fuck only once in a lifetime -- fucked along
|
||||
innocently and merrily for hundreds of millions of years. Maybe they
|
||||
were dumb animals, but they knew a good thing when they had one."
|
||||
were dumb animals, but they knew a good thing when they had one.
|
||||
-- Alan Sherman, "The Rape of the A*P*E*"
|
||||
%
|
||||
God gives us relatives; thank goodness we can chose our friends.
|
||||
@@ -545,9 +545,9 @@ GOD is applied POWER
|
||||
"God is as real as I am," the old man said. My faith was restored, for
|
||||
I knew that Santa would never lie.
|
||||
%
|
||||
"God is big, so don't fuck with him."
|
||||
God is big, so don't fuck with him.
|
||||
%
|
||||
God isn't dead -- he's been busted
|
||||
God isn't dead -- he's been busted.
|
||||
%
|
||||
God isn't dead, He's just trying to avoid the draft.
|
||||
%
|
||||
@@ -566,7 +566,7 @@ still talking about it."
|
||||
%
|
||||
Good day for water sports. Take a bath with a friend.
|
||||
%
|
||||
Grain grows best in shit
|
||||
Grain grows best in shit.
|
||||
-- Ursula K. LeGuin
|
||||
%
|
||||
Gravity is an unforgiving motherfucker.
|
||||
@@ -606,7 +606,7 @@ Old Testament tell us, had intercourse with every creature before God
|
||||
finally hit upon the idea of woman and created Eve.
|
||||
-- R. E. Masters
|
||||
%
|
||||
"He could be a poster child for retroactive birth control."
|
||||
He could be a poster child for retroactive birth control.
|
||||
%
|
||||
He hated to mend, so young Ned
|
||||
Called in a cute neighbor instead.
|
||||
@@ -625,7 +625,7 @@ damsels is not righteous, but he can have a lot more fun.
|
||||
He who sneezes without a handkerchief takes matters into his own
|
||||
hands.
|
||||
%
|
||||
"He's not pining, he's passed on! This parrot won't squawk! He's
|
||||
He's not pining, he's passed on! This parrot won't squawk! He's
|
||||
ceased to be! He's expired, and gone to meet his maker! It's a
|
||||
stiff! No breath of life, he may rest in peace! If you hadn't nailed
|
||||
him to the perch, he'd be pushing up the daisies! He's off the twig!
|
||||
@@ -657,7 +657,7 @@ that it was illegal and everybody should stop badgering the court about
|
||||
it because the court was going to take a nap.
|
||||
-- Dave Barry, "Pornography"
|
||||
%
|
||||
"Here's the holiday schedule for Monday's observation of Martin Luther
|
||||
Here's the holiday schedule for Monday's observation of Martin Luther
|
||||
King Jr.'s birthday, when the following will be closed:
|
||||
|
||||
* Governmental offices
|
||||
@@ -667,19 +667,19 @@ King Jr.'s birthday, when the following will be closed:
|
||||
* Banks
|
||||
* Parts of Palm Beach
|
||||
|
||||
and the mind of Senator Jesse Helms of North Carolina."
|
||||
and the mind of Senator Jesse Helms of North Carolina.
|
||||
-- Dennis Miller, "Saturday Night Live"
|
||||
%
|
||||
History has the relation to truth that theology has to religion --
|
||||
i.e., none to speak of.
|
||||
-- Lazarus Long
|
||||
%
|
||||
"How do you like the new America? We've cut the fat out of the
|
||||
How do you like the new America? We've cut the fat out of the
|
||||
government, and more recently the heart and brain (the backbone was
|
||||
gone some time ago). All we seem to have left now is muscle. We'll be
|
||||
lucky to escape with our skins!"
|
||||
lucky to escape with our skins!
|
||||
%
|
||||
Howard Cosell's biggest protrusion is his asshole
|
||||
Howard Cosell's biggest protrusion is his asshole.
|
||||
-- John Valby
|
||||
%
|
||||
Hugh Hefner is a virgin.
|
||||
@@ -687,10 +687,10 @@ Hugh Hefner is a virgin.
|
||||
I am an atheist, thank God!
|
||||
%
|
||||
I believe that Ronald Reagan will someday make this country what it
|
||||
once was ... an arctic wilderness
|
||||
once was ... an arctic wilderness.
|
||||
-- Steve Martin
|
||||
%
|
||||
I came; I saw; I fucked up
|
||||
I came; I saw; I fucked up.
|
||||
%
|
||||
I have a funny daddy
|
||||
Who goes in and out with me
|
||||
@@ -710,7 +710,7 @@ In a long distance telephone booth.
|
||||
Of an ideal connection
|
||||
Even if somewhat uncouth.
|
||||
%
|
||||
"I own my own body, but I share"
|
||||
I own my own body, but I share.
|
||||
%
|
||||
I realize that today you have a number of top female athletes such as
|
||||
Martina Navratilova who can run like deer and bench-press Chevrolet
|
||||
@@ -769,8 +769,8 @@ it's sold out. Then I'm sailing to France to be honored by the French
|
||||
government -- I'd give it all up for one erection.
|
||||
-- Groucho Marx
|
||||
%
|
||||
"I've had one child. My husband wants to have another. I'd like to
|
||||
watch him have another."
|
||||
I've had one child. My husband wants to have another. I'd like to
|
||||
watch him have another.
|
||||
%
|
||||
If a child annoys you, quiet him by brushing his hair. If this doesn't
|
||||
work, use the other side of the brush on the other end of the child.
|
||||
@@ -779,17 +779,17 @@ If all these sweet young things were laid end-to-end, I wouldn't be a
|
||||
bit surprised.
|
||||
-- Dorothy Parker
|
||||
%
|
||||
"If anyone wants to trade a couple of centrally located, well-cushioned
|
||||
If anyone wants to trade a couple of centrally located, well-cushioned
|
||||
showgirls for an eroded slope 90 minutes from Broadway, I'll be on this
|
||||
corner tomorrow at 11 with my tongue hanging out."
|
||||
corner tomorrow at 11 with my tongue hanging out.
|
||||
-- S. J. Perelman
|
||||
%
|
||||
If clear thinking created sparks, we could safely store dynamite in
|
||||
James Watt's office.
|
||||
-- Wayne Shannon, KRON-TV
|
||||
%
|
||||
"If God had wanted us to use the metric system, Jesus would have had 10
|
||||
apostles."
|
||||
If God had wanted us to use the metric system, Jesus would have had 10
|
||||
apostles.
|
||||
%
|
||||
If guns are outlawed, how will we shoot the liberals?
|
||||
%
|
||||
@@ -838,15 +838,15 @@ in the whole wide world, don't trust him. It means he experiments.
|
||||
%
|
||||
If you think sex is a pain in the ass, try different position.
|
||||
%
|
||||
"If you're a real good kid, I'll give you a piggy-back ride on a
|
||||
buzz-saw."
|
||||
If you're a real good kid, I'll give you a piggy-back ride on a
|
||||
buzz-saw.
|
||||
-- W. C. Fields
|
||||
%
|
||||
Ignorance is the Mother of Devotion.
|
||||
-- Robert Burton
|
||||
%
|
||||
"In Christianity neither morality nor religion come into contact with
|
||||
reality at any point."
|
||||
In Christianity neither morality nor religion come into contact with
|
||||
reality at any point.
|
||||
-- Friedrich Nietzsche
|
||||
%
|
||||
In the beginning was the DEMO Project. And the Project was
|
||||
@@ -880,8 +880,8 @@ There were only two boobs and he had 'em.
|
||||
Incest, n.:
|
||||
Sibling revelry.
|
||||
%
|
||||
"Is it just me, or does anyone else read `bible humpers' every time
|
||||
someone writes `bible thumpers?'
|
||||
Is it just me, or does anyone else read "bible humpers" every time
|
||||
someone writes "bible thumpers?"
|
||||
-- Joel M. Snyder, jms@mis.arizona.edu
|
||||
%
|
||||
It is a sad commentary on today's society that this fortune has to be
|
||||
@@ -891,14 +891,14 @@ classified as "offensive" simply because it contains the word "fuck".
|
||||
god is dumb, and maybe even a little ugly on the side."
|
||||
-- Frank Zappa
|
||||
%
|
||||
"It was a Roman who said it was sweet to die for one's country. The
|
||||
It was a Roman who said it was sweet to die for one's country. The
|
||||
Greeks never said it was sweet to die for anything. They had no vital
|
||||
lies."
|
||||
lies.
|
||||
-- Edith Hamilton, "The Greek Way"
|
||||
%
|
||||
Jesus died for your sins. Make it worth his time.
|
||||
%
|
||||
"Jesus saves...but Gretzky gets the rebound!"
|
||||
Jesus saves...but Gretzky gets the rebound!
|
||||
-- Daniel Hinojosa
|
||||
%
|
||||
Jesus was killed by a Moral Majority.
|
||||
@@ -970,8 +970,8 @@ Megaton Man: "It is a MANDATE, and I am DUTY BOUND to OBEY!"
|
||||
Missionary Position:
|
||||
The missionary on top.
|
||||
%
|
||||
"Most legislators are so dumb that they couldn't pour piss out of a
|
||||
boot if the instructions were printed on the heel."
|
||||
Most legislators are so dumb that they couldn't pour piss out of a
|
||||
boot if the instructions were printed on the heel.
|
||||
%
|
||||
Motto of the Electrical Engineer:
|
||||
Working computer hardware is a lot like an erect penis: it
|
||||
@@ -980,9 +980,9 @@ stays up as long as you don't fuck with it.
|
||||
My brother-in-law has found a way to make ends meet. He goes around
|
||||
with his head stuck up his ass.
|
||||
%
|
||||
"My country, right or wrong," is a thing that no patriot would think of
|
||||
My country, right or wrong," is a thing that no patriot would think of
|
||||
saying except in a desperate case. It is like saying, "My mother,
|
||||
drunk or sober."
|
||||
drunk or sober.
|
||||
-- G. K. Chesterton
|
||||
%
|
||||
My father was a creole, his father a Negro, and his father a monkey; my
|
||||
@@ -1021,7 +1021,7 @@ No woman can call herself free until she can choose consciously whether
|
||||
she will or will not be a mother.
|
||||
-- Margaret H. Sanger
|
||||
%
|
||||
"Not only is God dead, but just try to find a plumber on weekends."
|
||||
Not only is God dead, but just try to find a plumber on weekends.
|
||||
-- Woody Allen
|
||||
%
|
||||
Nothing is better than Sex.
|
||||
@@ -1045,7 +1045,7 @@ is largely inhabited by Christians, a powerful sub-tribe of the
|
||||
Hypocrites, whose principal industries are murder and cheating, which
|
||||
they are pleased to call "war" and "commerce." These, also, are the
|
||||
principal industries of the Orient.
|
||||
-- Ambrose Bierce, "The Devil's Dictionary"
|
||||
-- Ambrose Bierce, "The Devil's Dictionary"
|
||||
%
|
||||
Ocean, n.:
|
||||
A body of water occupying about two-thirds of a world made for
|
||||
@@ -1090,7 +1090,7 @@ productive life, my son. You take the parachute and leave me in God's
|
||||
hands." "That's very kind of you," the observant scout replied, "but
|
||||
there is no need. Reagan just jumped out with my knapsack."
|
||||
%
|
||||
"One Saturday afternoon, during the campaign to decide whether or not
|
||||
One Saturday afternoon, during the campaign to decide whether or not
|
||||
there should be a Coastal Commission, I took a helicopter ride from Los
|
||||
Angeles to San Diego. We passed several state beaches, some crowded
|
||||
and some virtually empty. They had the same facilities, and in some
|
||||
@@ -1098,7 +1098,7 @@ cases the crowded and the empty beach were within a quarter mile of
|
||||
each other. Obviously many beach-goers prefer to be crowded together.
|
||||
Buying more beaches that people won't go to because they prefer to be
|
||||
crowded together on one beach is a ridiculous waste of our natural
|
||||
resources and our taxes."
|
||||
resources and our taxes.
|
||||
-- Ronald Reagan
|
||||
%
|
||||
One thing I have no worry about is whether God exists. But it has
|
||||
@@ -1123,12 +1123,12 @@ probably would elect to save the infant's life, without ever
|
||||
considering whether there were men on base.
|
||||
-- Dave Barry, "Sports is a Drag"
|
||||
%
|
||||
"Our government has kept us in a perpetual state of fear -- kept us in
|
||||
Our government has kept us in a perpetual state of fear -- kept us in
|
||||
a continuous stampede of patriotic fervor -- with the cry of grave
|
||||
national emergency... Always there has been some terrible evil to
|
||||
gobble us up if we did not blindly rally behind it by furnishing the
|
||||
exorbitant sums demanded. Yet, in retrospect, these disasters seem
|
||||
never to have happened, seem never to have been quite real."
|
||||
never to have happened, seem never to have been quite real.
|
||||
-- General Douglas MacArthur, 1957
|
||||
%
|
||||
Overheard in a bar:
|
||||
@@ -1139,7 +1139,7 @@ People who develop the habit of thinking of themselves as world
|
||||
citizens are fulfilling the first requirement of sanity in our time.
|
||||
-- Norman Cousins
|
||||
%
|
||||
Physicists do it with charm
|
||||
Physicists do it with charm.
|
||||
%
|
||||
Politicians do it to everyone.
|
||||
%
|
||||
@@ -1158,7 +1158,7 @@ Q: How do you play religious roulette?
|
||||
A: You stand around in a circle and blaspheme and see who gets struck
|
||||
by lightning first.
|
||||
%
|
||||
Q: How do you tell if an Elephant has been making love in your
|
||||
Q: How do you tell if an elephant has been making love in your
|
||||
backyard?
|
||||
A: If all your trashcan liners are missing ...
|
||||
%
|
||||
@@ -1193,7 +1193,7 @@ Q: What is "SMOORPLAY"?
|
||||
A: It's what SMURFS do before they SMUCK, of course!
|
||||
%
|
||||
Q: What is the worst story Helen Keller ever read?
|
||||
A: A cheese grater
|
||||
A: A cheese grater.
|
||||
%
|
||||
Q: What's Jewish foreplay?
|
||||
A: Two hours of begging.
|
||||
@@ -1207,13 +1207,13 @@ A: Ugly sheep.
|
||||
Q: Why does Helen Keller masturbate with one hand?
|
||||
A: So she can moan with the other!
|
||||
%
|
||||
"Queensboro president Donald Mannis, charged with receiving bribes in
|
||||
Queensboro president Donald Mannis, charged with receiving bribes in
|
||||
exchange for city contracts, resigned on Tuesday. Mannis feels he must
|
||||
devote more time to impending litigation, some of which might emanate
|
||||
from a recent statement he made comparing New York Mayor Ed Koch to
|
||||
Nazi Martin Bormann. A spokesman from the Bormann estate said they are
|
||||
weighing the odds of a slander suit. Mayor Koch could naturally be
|
||||
reached for comment, but we chose not to listen."
|
||||
reached for comment, but we chose not to listen.
|
||||
-- Dennis Miller, "Saturday Night Live"
|
||||
%
|
||||
Randel, n.:
|
||||
@@ -1222,7 +1222,7 @@ for farting at a friend.
|
||||
-- Mrs. Byrne's Dictionary of Unusual, Obscure &
|
||||
Preposterous Words
|
||||
%
|
||||
Reagan can't _a_c_t either
|
||||
Reagan can't _a_c_t either.
|
||||
%
|
||||
Remember when you were a kid and the boys didn't like the girls? Only
|
||||
sissies liked girls? What I'm trying to tell you is that nothing's
|
||||
@@ -1263,7 +1263,7 @@ Said a horny young girl from Milpitas,
|
||||
"My favorite sport is coitus."
|
||||
But a fullback from State
|
||||
Made her period late,
|
||||
And now she has athlete's fetus
|
||||
And now she has athlete's fetus.
|
||||
%
|
||||
Said a swinging young chick named Lyth
|
||||
Whose virtue was largely a myth,
|
||||
@@ -1335,12 +1335,12 @@ you'll eat that stuff, you'll eat anything.
|
||||
Sure, Reagan has promised to take senility tests. But what if he
|
||||
forgets?
|
||||
%
|
||||
"Taxes should hurt. I just mailed my own tax return last night and I
|
||||
am prepared to say `ouch!' as loud as anyone."
|
||||
Taxes should hurt. I just mailed my own tax return last night and I
|
||||
am prepared to say `ouch!' as loud as anyone.
|
||||
-- Ronald Reagan
|
||||
%
|
||||
"The Army is a place where you get up early in the morning to be yelled
|
||||
at by people with short haircuts and tiny brains."
|
||||
The Army is a place where you get up early in the morning to be yelled
|
||||
at by people with short haircuts and tiny brains.
|
||||
-- Dave Barry
|
||||
%
|
||||
The big problem with pornography is defining it. You can't
|
||||
@@ -1449,7 +1449,7 @@ and I can wash it as fast as I want!"
|
||||
The Split-Atom Blues
|
||||
|
||||
Gimme Twinkies, gimme wine,
|
||||
Gimme jeans by Calvin Kline ...
|
||||
Gimme jeans by Calvin Klein ...
|
||||
But if you split those atoms fine,
|
||||
Mama keep 'em off those genes of mine!
|
||||
|
||||
@@ -1459,19 +1459,19 @@ Call the devil and sell my soul,
|
||||
But Mama keep dem atoms whole!
|
||||
-- Milo Bloom, "Bloom County"
|
||||
%
|
||||
"The State of California has no business subsidizing intellectual
|
||||
curiosity."
|
||||
The State of California has no business subsidizing intellectual
|
||||
curiosity.
|
||||
-- Ronald Reagan
|
||||
%
|
||||
The superpowers often behave like two heavily armed blind men feeling
|
||||
their way around a room, each believing himself in mortal peril from
|
||||
the other, whom he assumes to have perfect vision. Each tends to
|
||||
ascribe to the other side a consistency, forsight and coherence that
|
||||
ascribe to the other side a consistency, foresight and coherence that
|
||||
its own experience belies. Of course, even two blind men can do
|
||||
enormous damage to each other, not to speak of the room.
|
||||
-- Henry Kissinger
|
||||
%
|
||||
The United States Army;
|
||||
The United States Army:
|
||||
194 years of proud service,
|
||||
unhampered by progress.
|
||||
%
|
||||
@@ -1479,9 +1479,9 @@ The United States is like the guy at the party who gives cocaine to
|
||||
everybody and still nobody likes him.
|
||||
-- Jim Samuels
|
||||
%
|
||||
"The voters have spoken, the bastards ..."
|
||||
The voters have spoken, the bastards...
|
||||
%
|
||||
"The whole world is about three drinks behind."
|
||||
The whole world is about three drinks behind.
|
||||
-- Humphrey Bogart
|
||||
%
|
||||
The word "spine" is, of course, an anagram of "penis". This is true in
|
||||
@@ -1524,7 +1524,7 @@ oppressive. They are revolutions against feudalism. [1952]
|
||||
%
|
||||
There are two sides to every divorce: yours and the shithead's.
|
||||
%
|
||||
"There is a God, but He drinks"
|
||||
There is a God, but He drinks.
|
||||
-- Blore
|
||||
%
|
||||
There once was a couple named Kelley,
|
||||
@@ -1533,7 +1533,7 @@ Who lived their life belly to belly.
|
||||
They used Library Paste,
|
||||
Instead of Petroleum Jelly.
|
||||
%
|
||||
There once was a fiesty young terrier
|
||||
There once was a feisty young terrier
|
||||
Who liked to bite girls on the derriere.
|
||||
He'd yip and he'd yap,
|
||||
Then leap up and snap;
|
||||
@@ -1543,7 +1543,7 @@ There once was a freshman named Lin,
|
||||
Whose tool was as thin as a pin,
|
||||
A virgin named Joan
|
||||
From a bible belt home,
|
||||
Said "This won't be much of a sin."
|
||||
Said, "This won't be much of a sin."
|
||||
%
|
||||
There once was a hacker named Ken
|
||||
Who inherited truckloads of Yen
|
||||
@@ -1660,13 +1660,13 @@ Who said she thought fucking a bliss,
|
||||
There was a young lady of Norway
|
||||
Who hung by her toes in a doorway.
|
||||
She said to her beau
|
||||
"Just look at me Joe
|
||||
"Just look at me, Joe,
|
||||
I think I've discovered one more way."
|
||||
%
|
||||
There was a young man from Bel-Aire
|
||||
There was a young man from Bel-Air
|
||||
Who was screwing his girl on the stair,
|
||||
But the banister broke
|
||||
So he doubled his stroke
|
||||
But the banister broke,
|
||||
So he doubled his stroke,
|
||||
And finished her off in mid-air.
|
||||
%
|
||||
There was a young man named Crockett
|
||||
@@ -1687,7 +1687,7 @@ Who wanted to bugger the swans.
|
||||
Said, "Pray take my daughter!
|
||||
Those birds are reserved for the dons."
|
||||
%
|
||||
There was a young whore from kaloo
|
||||
There was a young whore from Kaloo
|
||||
Who filled her vagina with glue.
|
||||
She said with a grin,
|
||||
"If they pay to get in,
|
||||
@@ -1701,7 +1701,7 @@ Whose prick was remarkably short.
|
||||
%
|
||||
There was an old pirate named Bates
|
||||
Who was learning to rhumba on skates.
|
||||
He fell on his cutlass
|
||||
He fell on his cutlass,
|
||||
Which rendered him nutless
|
||||
And practically useless on dates.
|
||||
%
|
||||
@@ -1771,8 +1771,8 @@ Thou shalt not omit adultery.
|
||||
%
|
||||
To a Real Woman, every ejaculation is premature.
|
||||
%
|
||||
"Tom Hayden is the kind of politician who gives opportunism a bad
|
||||
name."
|
||||
Tom Hayden is the kind of politician who gives opportunism a bad
|
||||
name.
|
||||
-- Gore Vidal
|
||||
%
|
||||
'Twas orgy, and the hip and mod And as in raffish thought he sprawled,
|
||||
@@ -1807,8 +1807,8 @@ room, and turns to the younger brother. "What'll you have?"
|
||||
"I dunno," quavers the six-year-old, "but you can bet your ass
|
||||
it ain't gonna be Cheerios."
|
||||
%
|
||||
"Under capitalism, man exploits man. Under Communism, it's just the
|
||||
opposite."
|
||||
Under capitalism, man exploits man. Under Communism, it's just the
|
||||
opposite.
|
||||
-- John Kenneth Galbraith
|
||||
%
|
||||
Uppers are no longer stylish, methedrine is almost as rare as pure acid
|
||||
@@ -1826,13 +1826,12 @@ Virgin, n.:
|
||||
%
|
||||
War is menstruation envy.
|
||||
%
|
||||
"Water? Never touch the stuff! Fish fuck in it."
|
||||
Water? Never touch the stuff! Fish fuck in it.
|
||||
-- W. C. Fields
|
||||
%
|
||||
We call our dog Egypt, because in every room he leaves a pyramid.
|
||||
%
|
||||
"We don't have to protect the environment -- the Second Coming is at
|
||||
hand."
|
||||
We don't have to protect the environment -- the Second Coming is at hand.
|
||||
-- James Watt
|
||||
%
|
||||
We have reason to believe that man first
|
||||
@@ -1901,8 +1900,8 @@ When God created man, She was only testing.
|
||||
When God created two sexes, he may have been overdoing it.
|
||||
-- Charles Merrill Smith
|
||||
%
|
||||
"When I grow up, I want to be an honest lawyer so things like that
|
||||
can't happen."
|
||||
When I grow up, I want to be an honest lawyer so things like that
|
||||
can't happen.
|
||||
-- Richard Nixon as a boy (on the Teapot Dome scandal)
|
||||
%
|
||||
When it all boils down to the essence of truth one must live by a dog's
|
||||
@@ -1920,9 +1919,9 @@ Was exploring in Ermintrude's busiasm,
|
||||
But think nothing of that --
|
||||
You will find that my sweet sister Susiasm."
|
||||
%
|
||||
"White House carpenters have reworked the master bedroom, remodeling it
|
||||
White House carpenters have reworked the master bedroom, remodeling it
|
||||
so that Ronnie can sleep with his head in the hall. That way, by the
|
||||
time he wakes up, somebody will have already shined his hair."
|
||||
time he wakes up, somebody will have already shined his hair.
|
||||
%
|
||||
Why is it that there are so many more horses' asses than there are
|
||||
horses?
|
||||
@@ -1941,8 +1940,8 @@ Women's Libbers are OK. I just wouldn't want my sister to marry one.
|
||||
Would you mind terribly much if I asked you to take your silly-assed
|
||||
problem down the hall?
|
||||
%
|
||||
"Yes, that was Richard Nixon. He used to be President. When he left
|
||||
the White House, the Secret Service would count the silverware."
|
||||
Yes, that was Richard Nixon. He used to be President. When he left
|
||||
the White House, the Secret Service would count the silverware.
|
||||
-- Woody Allen, "Sleeper"
|
||||
%
|
||||
You always introduce the younger person to the older person, using the
|
||||
@@ -1954,9 +1953,9 @@ handshake, followed by a remark designed to show you don't mind a bit,
|
||||
such as "I see you are a (name of a minority group)! Good!"
|
||||
-- Dave Barry, "The Stuff of Etiquette"
|
||||
%
|
||||
"You and I as individuals can, by borrowing, live beyond our means, but
|
||||
You and I as individuals can, by borrowing, live beyond our means, but
|
||||
only for a limited period of time. Why should we think that collectively,
|
||||
as a nation, we are not bound by that same limitation?"
|
||||
as a nation, we are not bound by that same limitation?
|
||||
-- Ronald Reagan
|
||||
%
|
||||
You are at a business lunch when you are suddenly overcome with an
|
||||
@@ -2012,8 +2011,8 @@ into your coffee. You:
|
||||
(c) Show him who's in command; promptly take a leak in his "In"
|
||||
basket.
|
||||
%
|
||||
"You have to regard everything I say with suspicion -- I may be trying
|
||||
to bullshit you, or I may just be bullshitting you inadvertently."
|
||||
You have to regard everything I say with suspicion -- I may be trying
|
||||
to bullshit you, or I may just be bullshitting you inadvertently.
|
||||
-- J. Wainwright, Mathematics 140b
|
||||
%
|
||||
... But among the children of the Great Society there were
|
||||
|
||||
@@ -208,7 +208,7 @@ fetcheth
|
||||
fiesty
|
||||
findeth
|
||||
flunkers
|
||||
forsight
|
||||
foresight
|
||||
frat
|
||||
freakout
|
||||
fuck
|
||||
|
||||
@@ -250,7 +250,7 @@ Cripps
|
||||
Croll
|
||||
Croll's
|
||||
Cuomo
|
||||
Curchill
|
||||
Churchill
|
||||
Cuticle
|
||||
Cyberiad
|
||||
Cybernetic
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
||||
A computer called Illiac4
|
||||
Had a rather tough bug in its core.
|
||||
It chewed up its cards
|
||||
And spewed yards and yards
|
||||
Of illegible tape on the floor.
|
||||
%
|
||||
A computer, to print out a fact,
|
||||
Will divide, multiply, and subtract.
|
||||
But this output can be
|
||||
No more than debris,
|
||||
If the input was short of exact.
|
||||
-- Gigo
|
||||
%
|
||||
A dreary young bank clerk named Fennis
|
||||
Wished to foster an aura of menace;
|
||||
To make people afraid
|
||||
He wore gloves of grey suede
|
||||
And white footgear intended for tennis.
|
||||
-- Edward Gorey
|
||||
%
|
||||
A hacker who screwed a mag tape
|
||||
Was caught and convicted of rape.
|
||||
To jail he did go,
|
||||
From which, to his woe
|
||||
He couldn't get out with ESC.
|
||||
%
|
||||
A linguist thought it a farce
|
||||
That memory space was so sparse.
|
||||
One day they increased it.
|
||||
Said he as he seized it:
|
||||
"At last! Enough core for the parse".
|
||||
%
|
||||
A progressive professor named Winners
|
||||
Held classes each evening for sinners.
|
||||
They were graded and spaced
|
||||
So the vile and debased
|
||||
Would not be held back by beginners.
|
||||
%
|
||||
A very intelligent turtle
|
||||
Found programming UNIX a hurdle
|
||||
The system, you see,
|
||||
Ran as slow as did he,
|
||||
And that's not saying much for the turtle.
|
||||
%
|
||||
@@ -1,536 +0,0 @@
|
||||
____ __ _ ____ __ __ ___ ___ ___
|
||||
___ / | / /__ _/ /_ / |/ __\ / _ |
|
||||
__ / |/ // _\/_ _/ / ' / \_ \ / / /
|
||||
_ / /| // __/ / /_ / , | __/ // / ,/
|
||||
/_/ |__/_\__/__\__//___/__\__//___'
|
||||
-- Greywolf
|
||||
%
|
||||
A _Real_ Operating System for _Real_ Hackers.
|
||||
-- Greywolf
|
||||
%
|
||||
Anagrams for NetBSD core team:
|
||||
Breasted cot men
|
||||
Embraces dot net
|
||||
Strobed teen cam
|
||||
Aborted men sect
|
||||
Emtomb DEC tears
|
||||
-- Julian Assange
|
||||
%
|
||||
Anagrams for NetBSD core team:
|
||||
Crested Boatmen
|
||||
Resented Combat
|
||||
Boast Decrement
|
||||
Basement DEC rot
|
||||
-- Julian Assange
|
||||
%
|
||||
Anagrams for NetBSD core team:
|
||||
Strobe mased net
|
||||
Strobe mased ten
|
||||
Erect teen bonds
|
||||
A boned cream test
|
||||
Cremate no debts
|
||||
-- Julian Assange
|
||||
%
|
||||
Anagrams for NetBSD-core:
|
||||
Bent Coders
|
||||
Secret Bond
|
||||
Robs DECNet
|
||||
Cost Bender
|
||||
-- Julian Assange
|
||||
%
|
||||
Anagrams for NetBSD-core:
|
||||
Cot Benders
|
||||
Be stern, Doc.
|
||||
Net robs DEC
|
||||
DEC robs Net
|
||||
-- Julian Assange
|
||||
%
|
||||
http://www.imrryr.org/NetBSD/logo
|
||||
-- R. C. Dowdeswell
|
||||
%
|
||||
I didn't get where I am today without using NetBSD
|
||||
-- Dave Tyson
|
||||
%
|
||||
My other computer runs NetBSD
|
||||
-- Allen Briggs
|
||||
%
|
||||
NetBSD - a devil of an operating system.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - A Mycroft in every port.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - a server in every port.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - big, isn't it?
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - Bits for Tits.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - daemonic power
|
||||
-- R. C. Dowdeswell
|
||||
%
|
||||
NetBSD: Flying into the heart of the Sun. And the i386, and alpha,
|
||||
and mac, and powerpc, and...
|
||||
-- Greywolf
|
||||
%
|
||||
NetBSD - free yourself from all Stallmanist thought!
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD: Got source?
|
||||
%
|
||||
NetBSD - hackers tested, mom approved
|
||||
-- Ken Nakata
|
||||
%
|
||||
NetBSD - here today and in the middle of 2038 tomorrow.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - Mach 3 stealthOS, undetectable by media radar.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - more is more.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - more ports than a Norwegian crack whore.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - Multiple Architectures lead to Multiple Orgasms.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD: No Windows or Gates, but lots of doors, portals and tunnels.
|
||||
-- Greywolf
|
||||
%
|
||||
NetBSD - penguin flesh never tasted so good.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - posix me harder.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD: Post No Bills.
|
||||
-- Greywolf
|
||||
%
|
||||
NetBSD - safe ports in a storm.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - Scalability Does Matter.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - Serious Other, or Serious Operating system. Your choice.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the Berkeley redemption.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the cathedral versus the bizarre.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the cure.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the devil finds work for idle cycles.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the devil made me do it.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the devil's advocate.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the devil's not just in vaudeville.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the power to suave.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the power to swerve (penguins, worse than cane toads).
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - the semen in the money shot.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD: The Source is out there.
|
||||
-- Greywolf
|
||||
%
|
||||
NetBSD - we have nothing to decare but our benchmarks.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - we put the Net in NetBSD.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - We put the OS in OrgaSm.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - We're not in canvas anymore, toto
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - we're on a mission from Hell.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - where do you want to go Tuesday?
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD - your basement or mine?
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD: A drinking group with a serious computing problem.
|
||||
%
|
||||
NetBSD: Agnostics in the Platform Religious Wars.
|
||||
-- Erik E. Fair
|
||||
%
|
||||
NetBSD: An Operating System For Everyone
|
||||
-- Mike Latinovich
|
||||
%
|
||||
NetBSD: Are you old enough to run it?
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: better for your uptime than Viagra.
|
||||
-- Daniel Carosone
|
||||
%
|
||||
NetBSD: Beyond Windows
|
||||
-- Johan Ihren
|
||||
%
|
||||
NetBSD: CD-ROMs? We don't need no stinkin' CD-ROMs!
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: Choose Your Own Slogan
|
||||
-- Dirk Myers
|
||||
%
|
||||
NetBSD: Compatible with the Real World.
|
||||
-- Greywolf
|
||||
%
|
||||
NetBSD: Dave Barry is working on our motto
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: demonic power.
|
||||
-- R. C. Dowdeswell
|
||||
%
|
||||
NetBSD: Designed to be {secure, reliable, portable, CORRECT}
|
||||
-- Matthew Orgass
|
||||
%
|
||||
NetBSD: Download one, get ${NUMPORTS}-1 for free.
|
||||
-- Antti Kantee
|
||||
%
|
||||
NetBSD: Everyone else is doin' it. But we're doin' it right.
|
||||
-- Herb Peyerl
|
||||
%
|
||||
NetBSD, Feed The Computer.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Flexible and free!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: For The Network Generation
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Get Over It.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Groovy Baby!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD home page: Ultra-heavy use of blink text, hot colours, and
|
||||
Flash plug-ins. All shockwave, all the time. Background music
|
||||
ought to be a mixture of Phillip Glass overlaid on top of
|
||||
Sublime.
|
||||
-- Mason Loring Bliss
|
||||
%
|
||||
NetBSD: I Wanna Be Sedated
|
||||
-- Curt Sampson
|
||||
%
|
||||
NetBSD: If you look through Windows
|
||||
-- Johan Ihren
|
||||
%
|
||||
NetBSD: If your server could choose, it would choose NetBSD
|
||||
-- Tim Rightnour
|
||||
%
|
||||
NetBSD, In Stalls Anywhere
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD is full. Go away.
|
||||
-- Chris Baird <cjb@brushtail.apana.org.au>
|
||||
%
|
||||
NetBSD is much like a tipi: No windows, no gates, and an apache inside.
|
||||
%
|
||||
NetBSD is PAR -- Powerful, Advanced, Reliable. Is your OS up to PAR?
|
||||
-- Frank Warren
|
||||
%
|
||||
NetBSD is the bomb. (ok, bad idea)
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: It keeps on going...and going...and going...
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: It spanks the knickers off those other operating systems
|
||||
-- Brian D Chase
|
||||
%
|
||||
NetBSD: it'll be there when you're ready for it
|
||||
-- Greg Lehey
|
||||
%
|
||||
NetBSD: it's not free beer, but it's free
|
||||
%
|
||||
NetBSD: Its not Windows.
|
||||
-- Paul Wain
|
||||
%
|
||||
NetBSD: It's...uh...well...have you heard of linux?
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: lets get it right
|
||||
-- David Brownlee
|
||||
%
|
||||
NetBSD: Linux without the hype.
|
||||
-- Hubert Feyrer
|
||||
%
|
||||
NetBSD logo: Kiss-painted (w/tongue) Beastie stabbing a pitchfork
|
||||
through a bloodied and obviously-in-horrible-pain Tux.
|
||||
-- Mason Loring Bliss
|
||||
%
|
||||
NetBSD long theme: "Eat a queer fetus for Jesus, and run NetBSD!"
|
||||
-- Mason Loring Bliss
|
||||
%
|
||||
NetBSD: making all computer hardware a commodity.
|
||||
-- Erik E. Fair
|
||||
%
|
||||
NetBSD: Making your net work, and its free to boot!
|
||||
-- Steve Woodford
|
||||
%
|
||||
NetBSD: May the Source be with you
|
||||
-- Greg Earle
|
||||
%
|
||||
NetBSD: Microsoft ask you where you want to go, NetBSD gets you there
|
||||
-- David Brownlee
|
||||
%
|
||||
NetBSD, More Nines.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: More Ports That A Cheap Whore
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Multi-platform OS
|
||||
%
|
||||
NetBSD: My Computer Runs!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: My Computer Works!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD, Net Improvement.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD, Net Profit.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD, Net Some Nines.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Network Power Unleashed.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Network Your World.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Networking Space
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: No Sh;t!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD, No Worries!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Not all of the First Ones have gone away.
|
||||
-- Antti Kantee
|
||||
%
|
||||
NetBSD. Not Guano.
|
||||
-- Hubert Feyrer
|
||||
%
|
||||
NetBSD: Not your mother's OS (unless you are P. Seebach)
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: Oh my god! They support my hardware! You hackers!
|
||||
-- Antti Kantee
|
||||
%
|
||||
NetBSD: Perpetual performance!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: Power Your Net.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: preferred by Rocket Scientists and Moms!
|
||||
-- Steven J. Dovich
|
||||
%
|
||||
NetBSD: priapic OS
|
||||
-- Perry Metzger
|
||||
%
|
||||
NetBSD: Professionalpower!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: "Progress on your system is closer than it appears."
|
||||
%
|
||||
NetBSD: Re: NetBSD Slogans
|
||||
-- Mirian Crzig Lennox
|
||||
%
|
||||
NetBSD: Resistance is futile! You will be supported.
|
||||
-- Peter Seebach
|
||||
%
|
||||
NetBSD: Resistance is NOT futile!
|
||||
-- Hubert Feyrer
|
||||
%
|
||||
NetBSD: Rock solid!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: Servers' choice!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: serves you right.
|
||||
-- Herb Peyerl
|
||||
%
|
||||
NetBSD short theme, for stickers and tattoos: NetBSD... Bitchin'!
|
||||
-- Mason Loring Bliss
|
||||
%
|
||||
NetBSD, SIMMs Like Good Code
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: Someday, we won't burn your toast
|
||||
-- Herb Peyerl
|
||||
%
|
||||
NetBSD: Stable and strong!
|
||||
-- Lars-Johan Liman
|
||||
%
|
||||
NetBSD: Stop, Drop, and Load
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD, stupid.
|
||||
-- Julian Assange
|
||||
%
|
||||
NetBSD, Tap The Power
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: The choice of hundreds worldwide
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: The Final Frontier
|
||||
-- Chris Jones
|
||||
%
|
||||
NetBSD: The free OS with a money back guarantee!
|
||||
-- Tim Rightnour
|
||||
%
|
||||
NetBSD: the free unix for the rest of us
|
||||
-- Bob Nestor
|
||||
%
|
||||
NetBSD: The Last Bastion of the true UNIX Religion.
|
||||
-- Miles Nordin
|
||||
%
|
||||
NetBSD: The OS WORM - Write Once, Run Many
|
||||
-- Antti Kantee
|
||||
%
|
||||
NetBSD: The Power of Code
|
||||
-- Mason Loring Bliss
|
||||
%
|
||||
NetBSD: The power to Connect
|
||||
-- Feico Dillema
|
||||
%
|
||||
NetBSD: The power to serve, also
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: The power to serve, on the platform of your choice
|
||||
-- John Darrow
|
||||
%
|
||||
NetBSD: the second best thing you can get for free
|
||||
%
|
||||
NetBSD: the server is up
|
||||
-- David Brownlee
|
||||
%
|
||||
NetBSD: The Worlds Most Portable Operating System
|
||||
%
|
||||
NetBSD: To serve the power.
|
||||
-- Herb Peyerl
|
||||
%
|
||||
NetBSD: true inheritors of the UNIX(tm) legacy.
|
||||
-- Erik E. Fair
|
||||
%
|
||||
NetBSD: Twice the Bits-Clean of other Leading OSes
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: Two guys with a vax
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: u_long uptime;
|
||||
-- Herb Peyerl
|
||||
%
|
||||
NetBSD: Unix With Balls.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: unshackling hardware designers and users from the bondage
|
||||
of WinTel.
|
||||
-- Erik E. Fair
|
||||
%
|
||||
NetBSD: Use the ENTIRE computer!
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: userland included
|
||||
-- Antti Kantee
|
||||
%
|
||||
NetBSD: We Come In Peace.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: We do it right.
|
||||
-- Perry Metzger
|
||||
%
|
||||
NetBSD: We don't negotiate with terrorists.
|
||||
-- Miles Nordin
|
||||
%
|
||||
NetBSD: We put the "Net" in "BSD", and took out the "Free"
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: We Stay Up.
|
||||
-- Andrew Gillham
|
||||
%
|
||||
NetBSD: We Suck Less
|
||||
%
|
||||
NetBSD: We're so committed to it being free, we won't sell it to you
|
||||
even if you ask!
|
||||
-- Charles M. Hannum
|
||||
%
|
||||
NetBSD: What do you want to serve today?
|
||||
-- Hubert Feyrer
|
||||
%
|
||||
NetBSD: When Linux ports to that platform, they will discover -
|
||||
WE HAVE ALWAYS BEEN HERE
|
||||
-- David Maxwell
|
||||
%
|
||||
NetBSD: Where do you want to have the power to serve, tomorrow?
|
||||
-- Tom Harvey
|
||||
%
|
||||
NetBSD: Who do you Serve? And who do you Trust?
|
||||
-- David Maxwell
|
||||
%
|
||||
NetBSD: Write Once, Run Everywhere. Java optional.
|
||||
-- Todd Whitesel
|
||||
%
|
||||
NetBSD: You can't handle it.
|
||||
-- Paul Newhouse
|
||||
%
|
||||
NetBSD/sparc: less Lovelaces in your LX?
|
||||
-- Jim Wise
|
||||
%
|
||||
Never mind the bollocks, here's NetBSD.
|
||||
-- Julian Assange
|
||||
%
|
||||
Of course it runs NetBSD.
|
||||
%
|
||||
Portable. Supportable. NetBSD.
|
||||
-- Jim Wise
|
||||
%
|
||||
Software is like sex - it should be free
|
||||
-- Hubert Feyrer
|
||||
%
|
||||
We're BSD. If you want System V, you know where to get it.
|
||||
-- Greywolf
|
||||
%
|
||||
Where would you have rather been today, tomorrow? NetBSD.
|
||||
-- Allen Briggs
|
||||
%
|
||||
With many thanks to the core team and UCB CSRG.
|
||||
-- Greywolf
|
||||
@@ -688,7 +688,7 @@ sheer horror than the male of the species.
|
||||
-- Spock, "Wolf in the Fold", stardate 3615.4
|
||||
%
|
||||
Women professionals do tend to over-compensate.
|
||||
-- Dr. Elizabeth Dehaver, "Where No Man Has Gone Before",
|
||||
-- Dr. Elizabeth Dehner, "Where No Man Has Gone Before",
|
||||
stardate 1312.9.
|
||||
%
|
||||
Worlds are conquered, galaxies destroyed -- but a woman is always a
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for fortune/fortune
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
fortune_fortune_DEFS := -DHAVE_REGCOMP
|
||||
fortune_fortune_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
.\" $NetBSD: fortune.6,v 1.7 1997/10/10 13:04:37 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to Berkeley by
|
||||
.\" Ken Arnold.
|
||||
.\"
|
||||
.\" 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. 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.
|
||||
.\"
|
||||
.\" @(#)fortune.6 8.3 (Berkeley) 4/19/94
|
||||
.\"
|
||||
.Dd April 19, 1994
|
||||
.Dt FORTUNE 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm fortune
|
||||
.Nd print a random, hopefully interesting, adage
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl aefilosw
|
||||
.Op Fl m Ar pattern
|
||||
.Oo
|
||||
.Op Ar N%
|
||||
.Ar file/dir/all
|
||||
.Oc
|
||||
.Sh DESCRIPTION
|
||||
When
|
||||
.Nm
|
||||
is run with no arguments it prints out a random epigram.
|
||||
Epigrams are divided into several categories, where each category
|
||||
is subdivided into those which are potentially offensive and those
|
||||
which are not.
|
||||
The options are as follows:
|
||||
.Bl -tag -width flag
|
||||
.It Fl a
|
||||
Choose from all lists of maxims, both offensive and not.
|
||||
(See the
|
||||
.Fl o
|
||||
option for more information on offensive fortunes.)
|
||||
.It Fl e
|
||||
Consider all fortune files to be of equal size (see discussion below
|
||||
on multiple files).
|
||||
.It Fl f
|
||||
Print out the list of files which would be searched, but don't
|
||||
print a fortune.
|
||||
.It Fl l
|
||||
Long dictums only.
|
||||
.It Fl m
|
||||
Print out all fortunes which match the regular expression
|
||||
.Ar pattern .
|
||||
See
|
||||
.Xr regex 3
|
||||
for a description of patterns.
|
||||
.It Fl o
|
||||
Choose only from potentially offensive aphorisms.
|
||||
.Bf -symbolic
|
||||
Please, please, please request a potentially offensive fortune if and
|
||||
only if you believe, deep down in your heart, that you are willing
|
||||
to be offended.
|
||||
(And that if you are, you'll just quit using
|
||||
.Fl o
|
||||
rather than give us
|
||||
grief about it, okay?)
|
||||
.Ef
|
||||
.Bd -filled -offset indent
|
||||
\&... let us keep in mind the basic governing philosophy
|
||||
of The Brotherhood, as handsomely summarized in these words:
|
||||
we believe in healthy, hearty laughter -- at the expense of
|
||||
the whole human race, if needs be.
|
||||
Needs be.
|
||||
.Bd -filled -offset indent-two -compact
|
||||
--H. Allen Smith, "Rude Jokes"
|
||||
.Ed
|
||||
.Ed
|
||||
.It Fl s
|
||||
Short apothegms only.
|
||||
.It Fl i
|
||||
Ignore case for
|
||||
.Fl m
|
||||
patterns.
|
||||
.It Fl w
|
||||
Wait before termination for an amount of time calculated from the
|
||||
number of characters in the message.
|
||||
This is useful if it is executed as part of the logout procedure
|
||||
to guarantee that the message can be read before the screen is cleared.
|
||||
.El
|
||||
.Pp
|
||||
The user may specify alternative sayings.
|
||||
You can specify a specific file, a directory which contains one or
|
||||
more files, or the special word
|
||||
.Em all
|
||||
which says to use all the standard databases.
|
||||
Any of these may be preceded by a percentage, which is a number
|
||||
.Ar N
|
||||
between 0 and 100 inclusive, followed by a
|
||||
.Ar % .
|
||||
If it is, there will be a
|
||||
.Ar N
|
||||
percent probability that an adage will be picked from that file
|
||||
or directory.
|
||||
If the percentages do not sum to 100, and there are specifications
|
||||
without percentages, the remaining percent will apply to those files
|
||||
and/or directories, in which case the probability of selecting from
|
||||
one of them will be based on their relative sizes.
|
||||
.Pp
|
||||
As an example, given two databases
|
||||
.Em funny
|
||||
and
|
||||
.Em not-funny ,
|
||||
with
|
||||
.Em funny
|
||||
twice as big, saying
|
||||
.Bd -literal -offset indent
|
||||
fortune funny not-funny
|
||||
.Ed
|
||||
.Pp
|
||||
will get you fortunes out of
|
||||
.Em funny
|
||||
two-thirds of the time.
|
||||
The command
|
||||
.Bd -literal -offset indent
|
||||
fortune 90% funny 10% not-funny
|
||||
.Ed
|
||||
.Pp
|
||||
will pick out 90% of its fortunes from
|
||||
.Em funny
|
||||
(the ``10% not-funny'' is unnecessary, since 10% is all that's left).
|
||||
The
|
||||
.Fl e
|
||||
option says to consider all files equal;
|
||||
thus
|
||||
.Bd -literal -offset indent
|
||||
fortune -e
|
||||
.Ed
|
||||
.Pp
|
||||
is equivalent to
|
||||
.Bd -literal -offset indent
|
||||
fortune 50% funny 50% not
|
||||
.Em -funny
|
||||
.Ed
|
||||
.Sh FILES
|
||||
.Bl -tag -width Pa -compact
|
||||
.It Pa @usrlibdir@/fortunes
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr regex 3
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,4 +35,4 @@
|
||||
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
#define FORTDIR "@usrlibdir@"
|
||||
#define FORTDIR "@sharedir@"
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.7 1997/05/07 15:59:10 mycroft Exp $
|
||||
# $NetBSD: Makefile,v 1.8 2000/04/14 04:12:19 simonb Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= strfile
|
||||
MAN= strfile.8
|
||||
HOSTPROG= strfile
|
||||
MAN= strfile.8
|
||||
|
||||
# only needed during build
|
||||
proginstall::
|
||||
|
||||
# Override these rules for cross-compilation
|
||||
.c.o:
|
||||
${HOST_COMPILE.c} ${.IMPSRC}
|
||||
|
||||
${PROG}: ${OBJS}
|
||||
${HOST_LINK.c} -o ${.TARGET} ${OBJS}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.hostprog.mk>
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for fortune/strfile
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
fortune_strfile_DIRS := $(USRBINDIR) $(MAN8DIR)
|
||||
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
.\" $NetBSD: strfile.8,v 1.4 1998/02/03 20:45:00 perry Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1989, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\"
|
||||
.\" This code is derived from software contributed to Berkeley by
|
||||
.\" Ken Arnold.
|
||||
.\"
|
||||
.\" 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. 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.
|
||||
.\"
|
||||
.\" @(#)strfile.8 8.1 (Berkeley) 6/9/93
|
||||
.\"
|
||||
.Dd June 9, 1993
|
||||
.Dt STRFILE 8
|
||||
.Os BSD 4
|
||||
.Sh NAME
|
||||
.Nm strfile ,
|
||||
.Nm unstr
|
||||
.Nd "create a random access file for storing strings"
|
||||
.Sh SYNOPSIS
|
||||
.Nm strfile
|
||||
.Op Fl iorsx
|
||||
.Op Fl c Ar char
|
||||
.Ar source_file
|
||||
.Op Ar output_file
|
||||
.Nm unstr
|
||||
.Ar source_file
|
||||
.Sh DESCRIPTION
|
||||
.Nm Strfile
|
||||
reads a file containing groups of lines separated by a line containing
|
||||
a single percent
|
||||
.Ql \&%
|
||||
sign and creates a data file which contains
|
||||
a header structure and a table of file offsets for each group of lines.
|
||||
This allows random access of the strings.
|
||||
.Pp
|
||||
The output file, if not specified on the command line, is named
|
||||
.Ar source_file Ns Sy .out .
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width "-c char"
|
||||
.It Fl c Ar char
|
||||
Change the delimiting character from the percent sign to
|
||||
.Ar char .
|
||||
.It Fl i
|
||||
Ignore case when ordering the strings.
|
||||
.It Fl o
|
||||
Order the strings in alphabetical order.
|
||||
The offset table will be sorted in the alphabetical order of the
|
||||
groups of lines referenced.
|
||||
Any initial non-alphanumeric characters are ignored.
|
||||
This option causes the
|
||||
.Dv STR_ORDERED
|
||||
bit in the header
|
||||
.Ar str_flags
|
||||
field to be set.
|
||||
.It Fl r
|
||||
Randomize access to the strings.
|
||||
Entries in the offset table will be randomly ordered.
|
||||
This option causes the
|
||||
.Dv STR_RANDOM
|
||||
bit in the header
|
||||
.Ar str_flags
|
||||
field to be set.
|
||||
.It Fl s
|
||||
Run silently; don't give a summary message when finished.
|
||||
.It Fl x
|
||||
Note that each alphabetic character in the groups of lines is rotated
|
||||
13 positions in a simple caesar cypher.
|
||||
This option causes the
|
||||
.Dv STR_ROTATED
|
||||
bit in the header
|
||||
.Ar str_flags
|
||||
field to be set.
|
||||
.El
|
||||
.Pp
|
||||
The format of the header is:
|
||||
.Bd -literal
|
||||
#define VERSION 1
|
||||
unsigned long str_version; /* version number */
|
||||
unsigned long str_numstr; /* # of strings in the file */
|
||||
unsigned long str_longlen; /* length of longest string */
|
||||
unsigned long str_shortlen; /* length of shortest string */
|
||||
#define STR_RANDOM 0x1 /* randomized pointers */
|
||||
#define STR_ORDERED 0x2 /* ordered pointers */
|
||||
#define STR_ROTATED 0x4 /* rot-13'd text */
|
||||
unsigned long str_flags; /* bit field for flags */
|
||||
char str_delim; /* delimiting character */
|
||||
.Ed
|
||||
.Pp
|
||||
All fields are written in network byte order.
|
||||
.Pp
|
||||
The purpose of
|
||||
.Nm unstr
|
||||
is to undo the work of
|
||||
.Nm strfile .
|
||||
It prints out the strings contained in the file
|
||||
.Ar source_file
|
||||
in the order that they are listed in
|
||||
the header file
|
||||
.Ar source_file Ns Pa .dat
|
||||
to standard output.
|
||||
It is possible to create sorted versions of input files by using
|
||||
.Fl o
|
||||
when
|
||||
.Nm strfile
|
||||
is run and then using
|
||||
.Nm unstr
|
||||
to dump them out in the table order.
|
||||
.Sh SEE ALSO
|
||||
.Xr byteorder 3 ,
|
||||
.Xr fortune 6
|
||||
.Sh FILES
|
||||
.Bl -tag -width strfile.out -compact
|
||||
.It Pa strfile.out
|
||||
default output file.
|
||||
.El
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm strfile
|
||||
utility first appeared in
|
||||
.Bx 4.4 .
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: strfile.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */
|
||||
/* $NetBSD: strfile.c,v 1.21 2001/07/22 13:34:00 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -36,6 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if 1
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
@@ -46,28 +47,46 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: strfile.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $");
|
||||
__RCSID("$NetBSD: strfile.c,v 1.21 2001/07/22 13:34:00 wiz Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif /* __NetBSD__ */
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/param.h>
|
||||
# include <err.h>
|
||||
# include <ctype.h>
|
||||
# include <netinet/in.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <time.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# ifndef u_int32_t
|
||||
# define u_int32_t unsigned int
|
||||
# endif
|
||||
# include "strfile.h"
|
||||
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
# endif /* MAXPATHLEN */
|
||||
|
||||
static u_int32_t
|
||||
h2nl(u_int32_t h)
|
||||
{
|
||||
unsigned char c[4];
|
||||
u_int32_t rv;
|
||||
|
||||
c[0] = (h >> 24) & 0xff;
|
||||
c[1] = (h >> 16) & 0xff;
|
||||
c[2] = (h >> 8) & 0xff;
|
||||
c[3] = (h >> 0) & 0xff;
|
||||
memcpy(&rv, c, sizeof rv);
|
||||
|
||||
return (rv);
|
||||
}
|
||||
|
||||
/*
|
||||
* This program takes a file composed of strings seperated by
|
||||
* This program takes a file composed of strings separated by
|
||||
* lines starting with two consecutive delimiting character (default
|
||||
* character is '%') and creates another file which consists of a table
|
||||
* describing the file (structure from "strfile.h"), a table of seek
|
||||
@@ -95,24 +114,15 @@ __RCSID("$NetBSD: strfile.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $");
|
||||
# define STORING_PTRS (Oflag || Rflag)
|
||||
# define CHUNKSIZE 512
|
||||
|
||||
#ifdef lint
|
||||
# define ALWAYS atoi("1")
|
||||
#else
|
||||
# define ALWAYS 1
|
||||
#endif
|
||||
# define ALLOC(ptr,sz) do { \
|
||||
if (ptr == NULL) \
|
||||
ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
|
||||
ptr = malloc(CHUNKSIZE * sizeof *ptr); \
|
||||
else if (((sz) + 1) % CHUNKSIZE == 0) \
|
||||
ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
|
||||
ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \
|
||||
if (ptr == NULL) \
|
||||
errx(1, "out of space"); \
|
||||
die("out of space"); \
|
||||
} while (0)
|
||||
|
||||
#ifdef NO_VOID
|
||||
# define void char
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char first;
|
||||
off_t pos;
|
||||
@@ -137,14 +147,22 @@ STRFILE Tbl; /* statistics table */
|
||||
|
||||
STR *Firstch; /* first chars of each string */
|
||||
|
||||
void add_offset __P((FILE *, off_t));
|
||||
int cmp_str __P((const void *, const void *));
|
||||
void do_order __P((void));
|
||||
void getargs __P((int, char *[]));
|
||||
int main __P((int, char *[]));
|
||||
void randomize __P((void));
|
||||
char *unctrl __P((char));
|
||||
void usage __P((void)) __attribute__((__noreturn__));
|
||||
#ifdef __GNUC__
|
||||
#define NORETURN __attribute__((__noreturn__))
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
|
||||
void add_offset(FILE *, off_t);
|
||||
int cmp_str(const void *, const void *);
|
||||
void die(const char *) NORETURN;
|
||||
void dieperror(const char *, char *) NORETURN;
|
||||
void do_order(void);
|
||||
void fwrite_be_offt(off_t, FILE *);
|
||||
void getargs(int, char *[]);
|
||||
int main(int, char *[]);
|
||||
void randomize(void);
|
||||
void usage(void) NORETURN;
|
||||
|
||||
|
||||
/*
|
||||
@@ -169,22 +187,26 @@ main(ac, av)
|
||||
STR *fp;
|
||||
static char string[257];
|
||||
|
||||
/* sanity test */
|
||||
if (sizeof(u_int32_t) != 4)
|
||||
die("sizeof(unsigned int) != 4");
|
||||
|
||||
getargs(ac, av); /* evalute arguments */
|
||||
dc = Delimch;
|
||||
if ((inf = fopen(Infile, "r")) == NULL)
|
||||
err(1, "open `%s'", Infile);
|
||||
dieperror("open `%s'", Infile);
|
||||
|
||||
if ((outf = fopen(Outfile, "w")) == NULL)
|
||||
err(1, "open `%s'", Outfile);
|
||||
dieperror("open `%s'", Outfile);
|
||||
if (!STORING_PTRS)
|
||||
(void) fseek(outf, sizeof Tbl, 0);
|
||||
(void) fseek(outf, sizeof Tbl, SEEK_SET);
|
||||
|
||||
/*
|
||||
* Write the strings onto the file
|
||||
*/
|
||||
|
||||
Tbl.str_longlen = 0;
|
||||
Tbl.str_shortlen = (unsigned int) 0xffffffff;
|
||||
Tbl.str_shortlen = (unsigned int) 0x7fffffff;
|
||||
Tbl.str_delim = dc;
|
||||
Tbl.str_version = VERSION;
|
||||
first = Oflag;
|
||||
@@ -239,24 +261,26 @@ main(ac, av)
|
||||
puts("There was 1 string");
|
||||
else
|
||||
printf("There were %d strings\n", (int)(Num_pts - 1));
|
||||
printf("Longest string: %lu byte%s\n", Tbl.str_longlen,
|
||||
printf("Longest string: %lu byte%s\n", (unsigned long)Tbl.str_longlen,
|
||||
Tbl.str_longlen == 1 ? "" : "s");
|
||||
printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen,
|
||||
printf("Shortest string: %lu byte%s\n", (unsigned long)Tbl.str_shortlen,
|
||||
Tbl.str_shortlen == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
(void) fseek(outf, (off_t) 0, 0);
|
||||
Tbl.str_version = htonl(Tbl.str_version);
|
||||
Tbl.str_numstr = htonl(Num_pts - 1);
|
||||
Tbl.str_longlen = htonl(Tbl.str_longlen);
|
||||
Tbl.str_shortlen = htonl(Tbl.str_shortlen);
|
||||
Tbl.str_flags = htonl(Tbl.str_flags);
|
||||
(void) fseek(outf, (off_t) 0, SEEK_SET);
|
||||
Tbl.str_version = h2nl(Tbl.str_version);
|
||||
Tbl.str_numstr = h2nl(Num_pts - 1);
|
||||
Tbl.str_longlen = h2nl(Tbl.str_longlen);
|
||||
Tbl.str_shortlen = h2nl(Tbl.str_shortlen);
|
||||
Tbl.str_flags = h2nl(Tbl.str_flags);
|
||||
(void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf);
|
||||
if (STORING_PTRS) {
|
||||
for (p = Seekpts, cnt = Num_pts; cnt--; ++p)
|
||||
*p = htonl(*p);
|
||||
(void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf);
|
||||
fwrite_be_offt(*p, outf);
|
||||
}
|
||||
fflush(outf);
|
||||
if (ferror(outf))
|
||||
dieperror("fwrite %s", Outfile);
|
||||
(void) fclose(outf);
|
||||
exit(0);
|
||||
}
|
||||
@@ -270,6 +294,8 @@ getargs(argc, argv)
|
||||
char **argv;
|
||||
{
|
||||
int ch;
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:iorsx")) != -1)
|
||||
switch(ch) {
|
||||
@@ -324,6 +350,26 @@ usage()
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
die(str)
|
||||
const char *str;
|
||||
{
|
||||
fprintf(stderr, "strfile: %s\n", str);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
dieperror(fmt, file)
|
||||
const char *fmt;
|
||||
char *file;
|
||||
{
|
||||
fprintf(stderr, "strfile: ");
|
||||
fprintf(stderr, fmt, file);
|
||||
fprintf(stderr, ": ");
|
||||
perror(NULL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* add_offset:
|
||||
* Add an offset to the list, or write it out, as appropriate.
|
||||
@@ -333,11 +379,9 @@ add_offset(fp, off)
|
||||
FILE *fp;
|
||||
off_t off;
|
||||
{
|
||||
off_t net;
|
||||
|
||||
if (!STORING_PTRS) {
|
||||
net = htonl(off);
|
||||
fwrite(&net, 1, sizeof net, fp);
|
||||
fwrite_be_offt(off, fp);
|
||||
} else {
|
||||
ALLOC(Seekpts, Num_pts + 1);
|
||||
Seekpts[Num_pts] = off;
|
||||
@@ -369,31 +413,6 @@ do_order()
|
||||
Tbl.str_flags |= STR_ORDERED;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmp_str:
|
||||
* Compare two strings in the file
|
||||
*/
|
||||
char *
|
||||
unctrl(c)
|
||||
char c;
|
||||
{
|
||||
static char buf[3];
|
||||
|
||||
if (isprint(c)) {
|
||||
buf[0] = c;
|
||||
buf[1] = '\0';
|
||||
}
|
||||
else if (c == 0177) {
|
||||
buf[0] = '^';
|
||||
buf[1] = '?';
|
||||
}
|
||||
else {
|
||||
buf[0] = '^';
|
||||
buf[1] = c + 'A' - 1;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
int
|
||||
cmp_str(vp1, vp2)
|
||||
const void *vp1, *vp2;
|
||||
@@ -413,8 +432,8 @@ cmp_str(vp1, vp2)
|
||||
if (c1 != c2)
|
||||
return c1 - c2;
|
||||
|
||||
(void) fseek(Sort_1, p1->pos, 0);
|
||||
(void) fseek(Sort_2, p2->pos, 0);
|
||||
(void) fseek(Sort_1, p1->pos, SEEK_SET);
|
||||
(void) fseek(Sort_2, p2->pos, SEEK_SET);
|
||||
|
||||
n1 = FALSE;
|
||||
n2 = FALSE;
|
||||
@@ -473,3 +492,23 @@ randomize()
|
||||
sp[i] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* fwrite_be_offt:
|
||||
* Write out the off paramater as a 64 bit big endian number
|
||||
*/
|
||||
|
||||
void
|
||||
fwrite_be_offt(off, f)
|
||||
off_t off;
|
||||
FILE *f;
|
||||
{
|
||||
int i;
|
||||
unsigned char c[8];
|
||||
|
||||
for (i = 7; i >= 0; i--) {
|
||||
c[i] = off & 0xff;
|
||||
off >>= 8;
|
||||
}
|
||||
fwrite(c, sizeof(c), 1, f);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: strfile.h,v 1.3 1995/03/23 08:28:49 cgd Exp $ */
|
||||
/* $NetBSD: strfile.h,v 1.5 1999/12/30 01:26:44 simonb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -38,19 +38,21 @@
|
||||
* @(#)strfile.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#define STR_ENDSTRING(line,tbl) \
|
||||
((line)[0] == (tbl).str_delim && (line)[1] == '\n')
|
||||
|
||||
typedef struct { /* information table */
|
||||
#define VERSION 1
|
||||
unsigned long str_version; /* version number */
|
||||
unsigned long str_numstr; /* # of strings in the file */
|
||||
unsigned long str_longlen; /* length of longest string */
|
||||
unsigned long str_shortlen; /* length of shortest string */
|
||||
u_int32_t str_version; /* version number */
|
||||
u_int32_t str_numstr; /* # of strings in the file */
|
||||
u_int32_t str_longlen; /* length of longest string */
|
||||
u_int32_t str_shortlen; /* length of shortest string */
|
||||
#define STR_RANDOM 0x1 /* randomized pointers */
|
||||
#define STR_ORDERED 0x2 /* ordered pointers */
|
||||
#define STR_ROTATED 0x4 /* rot-13'd text */
|
||||
unsigned long str_flags; /* bit field for flags */
|
||||
u_int32_t str_flags; /* bit field for flags */
|
||||
unsigned char stuff[4]; /* long aligned space */
|
||||
#define str_delim stuff[0] /* delimiting character */
|
||||
} STRFILE;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.4 1997/10/22 04:56:21 lukem Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= unstr
|
||||
NOMAN= noman
|
||||
CPPFLAGS+= -I${.CURDIR}/../strfile
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for fortune/unstr
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
# fortune_unstr_DIRS := $(USRBINDIR)
|
||||
fortune_unstr_INCS := -Ifortune/strfile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unstr.c,v 1.4 1997/10/11 07:59:09 lukem Exp $ */
|
||||
/* $NetBSD: unstr.c,v 1.7 1999/09/18 19:38:50 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: unstr.c,v 1.4 1997/10/11 07:59:09 lukem Exp $");
|
||||
__RCSID("$NetBSD: unstr.c,v 1.7 1999/09/18 19:38:50 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -65,13 +65,11 @@ __RCSID("$NetBSD: unstr.c,v 1.4 1997/10/11 07:59:09 lukem Exp $");
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/param.h>
|
||||
# ifndef __linux__
|
||||
# include <machine/endian.h>
|
||||
# endif
|
||||
# include <sys/endian.h>
|
||||
# include <ctype.h>
|
||||
# include <err.h>
|
||||
# include <netinet/in.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include "strfile.h"
|
||||
|
||||
@@ -92,7 +90,7 @@ void order_unstr __P((STRFILE *));
|
||||
/* ARGSUSED */
|
||||
int
|
||||
main(ac, av)
|
||||
int ac __attribute__((unused));
|
||||
int ac __attribute__((__unused__));
|
||||
char **av;
|
||||
{
|
||||
static STRFILE tbl; /* description table */
|
||||
@@ -103,11 +101,11 @@ main(ac, av)
|
||||
if ((Dataf = fopen(Datafile, "r")) == NULL)
|
||||
err(1, "fopen %s", Datafile);
|
||||
(void) fread((char *) &tbl, sizeof tbl, 1, Dataf);
|
||||
tbl.str_version = ntohl(tbl.str_version);
|
||||
tbl.str_numstr = ntohl(tbl.str_numstr);
|
||||
tbl.str_longlen = ntohl(tbl.str_longlen);
|
||||
tbl.str_shortlen = ntohl(tbl.str_shortlen);
|
||||
tbl.str_flags = ntohl(tbl.str_flags);
|
||||
BE32TOH(tbl.str_version);
|
||||
BE32TOH(tbl.str_numstr);
|
||||
BE32TOH(tbl.str_longlen);
|
||||
BE32TOH(tbl.str_shortlen);
|
||||
BE32TOH(tbl.str_flags);
|
||||
if (!(tbl.str_flags & (STR_ORDERED | STR_RANDOM))) {
|
||||
fprintf(stderr, "nothing to do -- table in file order\n");
|
||||
exit(1);
|
||||
@@ -138,12 +136,12 @@ order_unstr(tbl)
|
||||
{
|
||||
unsigned int i;
|
||||
char *sp;
|
||||
off_t pos;
|
||||
u_int64_t pos;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
for (i = 0; i < tbl->str_numstr; i++) {
|
||||
(void) fread((char *) &pos, 1, sizeof pos, Dataf);
|
||||
(void) fseek(Inf, ntohl(pos), 0);
|
||||
(void) fseek(Inf, be64toh(pos), SEEK_SET);
|
||||
if (i != 0)
|
||||
(void) printf("%c\n", Delimch);
|
||||
for (;;) {
|
||||
|
||||
28
hide-game.in
28
hide-game.in
@@ -1,4 +1,30 @@
|
||||
# hide-game.in - hide a game (only used if appropriate)
|
||||
# hide-game.in - hide a game (only used if appropriate).
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for hunt/hunt
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
include hunt/Makeconfig
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: otto.c,v 1.2 1997/10/10 16:32:39 lukem Exp $ */
|
||||
/* $NetBSD: otto.c,v 1.4 2001/02/05 00:40:45 christos Exp $ */
|
||||
# ifdef OTTO
|
||||
/*
|
||||
* otto - a hunt otto-matic player
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: otto.c,v 1.2 1997/10/10 16:32:39 lukem Exp $");
|
||||
__RCSID("$NetBSD: otto.c,v 1.4 2001/02/05 00:40:45 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
# include <sys/time.h>
|
||||
@@ -41,15 +41,7 @@ __RCSID("$NetBSD: otto.c,v 1.2 1997/10/10 16:32:39 lukem Exp $");
|
||||
extern char screen[SCREEN_HEIGHT][SCREEN_WIDTH2];
|
||||
# define SCREEN(y, x) screen[y][x]
|
||||
# else
|
||||
# if defined(BSD_RELEASE) && BSD_RELEASE >= 44
|
||||
#ifndef NCURSES_VERSION
|
||||
# define SCREEN(y, x) stdscr->lines[y]->line[x].ch
|
||||
#else
|
||||
#define SCREEN(y, x) stdscr->_line[y].text[x]
|
||||
#endif
|
||||
# else
|
||||
# define SCREEN(y, x) stdscr->_y[y][x]
|
||||
# endif
|
||||
# define SCREEN(y, x) mvinch(y, x)
|
||||
# endif
|
||||
|
||||
# ifndef DEBUG
|
||||
@@ -127,9 +119,11 @@ STATIC SIGNAL_TYPE nothing __P((int));
|
||||
STATIC int stop_look __P((struct item *, char, int, int));
|
||||
STATIC void wander __P((void));
|
||||
|
||||
extern int Otto_count;
|
||||
|
||||
STATIC SIGNAL_TYPE
|
||||
nothing(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
}
|
||||
|
||||
@@ -139,7 +133,6 @@ otto(y, x, face)
|
||||
char face;
|
||||
{
|
||||
int i;
|
||||
extern int Otto_count;
|
||||
int old_mask;
|
||||
|
||||
# ifdef DEBUG
|
||||
|
||||
@@ -1,640 +0,0 @@
|
||||
/* $NetBSD: playit.c,v 1.4 1997/10/20 00:37:15 lukem Exp $ */
|
||||
/*
|
||||
* Hunt
|
||||
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
|
||||
* San Francisco, California
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: playit.c,v 1.4 1997/10/20 00:37:15 lukem Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
# include <sys/file.h>
|
||||
# include <err.h>
|
||||
# include <errno.h>
|
||||
# include <curses.h>
|
||||
# include <ctype.h>
|
||||
# include <signal.h>
|
||||
# include <sys/time.h>
|
||||
# if defined(HPUX) || (defined(BSD_RELEASE) && BSD_RELEASE >= 44)
|
||||
# include <termios.h>
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
# include "hunt.h"
|
||||
|
||||
# ifndef FREAD
|
||||
# define FREAD 1
|
||||
# endif
|
||||
|
||||
# if !defined(USE_CURSES) || !defined(TERMINFO)
|
||||
# define beep() (void) putchar(CTRL('G'))
|
||||
# endif
|
||||
# if !defined(USE_CURSES)
|
||||
# undef refresh
|
||||
# define refresh() (void) fflush(stdout);
|
||||
# endif
|
||||
# ifdef USE_CURSES
|
||||
# define clear_eol() clrtoeol()
|
||||
# define put_ch addch
|
||||
# define put_str addstr
|
||||
# endif
|
||||
|
||||
static int nchar_send;
|
||||
# ifndef USE_CURSES
|
||||
char screen[SCREEN_HEIGHT][SCREEN_WIDTH2], blanks[SCREEN_WIDTH];
|
||||
int cur_row, cur_col;
|
||||
# endif
|
||||
# ifdef OTTO
|
||||
int Otto_count;
|
||||
int Otto_mode;
|
||||
static int otto_y, otto_x;
|
||||
static char otto_face;
|
||||
# endif
|
||||
|
||||
# define MAX_SEND 5
|
||||
# define STDIN 0
|
||||
|
||||
/*
|
||||
* ibuf is the input buffer used for the stream from the driver.
|
||||
* It is small because we do not check for user input when there
|
||||
* are characters in the input buffer.
|
||||
*/
|
||||
static int icnt = 0;
|
||||
static unsigned char ibuf[256], *iptr = ibuf;
|
||||
|
||||
#define GETCHR() (--icnt < 0 ? getchr() : *iptr++)
|
||||
|
||||
#if !defined(BSD_RELEASE) || BSD_RELEASE < 44
|
||||
extern int _putchar();
|
||||
#endif
|
||||
|
||||
static unsigned char getchr __P((void));
|
||||
static void send_stuff __P((void));
|
||||
|
||||
/*
|
||||
* playit:
|
||||
* Play a given game, handling all the curses commands from
|
||||
* the driver.
|
||||
*/
|
||||
void
|
||||
playit()
|
||||
{
|
||||
int ch;
|
||||
int y, x;
|
||||
long version;
|
||||
|
||||
if (read(Socket, (char *) &version, LONGLEN) != LONGLEN) {
|
||||
bad_con();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
if (ntohl(version) != (unsigned long)HUNT_VERSION) {
|
||||
bad_ver();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
errno = 0;
|
||||
# ifdef OTTO
|
||||
Otto_count = 0;
|
||||
# endif
|
||||
nchar_send = MAX_SEND;
|
||||
while ((ch = GETCHR()) != EOF) {
|
||||
# ifdef DEBUG
|
||||
fputc(ch, stderr);
|
||||
# endif
|
||||
switch (ch & 0377) {
|
||||
case MOVE:
|
||||
y = GETCHR();
|
||||
x = GETCHR();
|
||||
# ifdef USE_CURSES
|
||||
move(y, x);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, y, x);
|
||||
cur_row = y;
|
||||
cur_col = x;
|
||||
# endif
|
||||
break;
|
||||
case ADDCH:
|
||||
ch = GETCHR();
|
||||
# ifdef OTTO
|
||||
switch (ch) {
|
||||
|
||||
case '<':
|
||||
case '>':
|
||||
case '^':
|
||||
case 'v':
|
||||
otto_face = ch;
|
||||
# ifdef USE_CURSES
|
||||
getyx(stdscr, otto_y, otto_x);
|
||||
# else
|
||||
otto_y = cur_row;
|
||||
otto_x = cur_col;
|
||||
# endif
|
||||
break;
|
||||
}
|
||||
# endif
|
||||
put_ch(ch);
|
||||
break;
|
||||
case CLRTOEOL:
|
||||
clear_eol();
|
||||
break;
|
||||
case CLEAR:
|
||||
clear_the_screen();
|
||||
break;
|
||||
case REFRESH:
|
||||
refresh();
|
||||
break;
|
||||
case REDRAW:
|
||||
redraw_screen();
|
||||
refresh();
|
||||
break;
|
||||
case ENDWIN:
|
||||
refresh();
|
||||
if ((ch = GETCHR()) == LAST_PLAYER)
|
||||
Last_player = TRUE;
|
||||
ch = EOF;
|
||||
goto out;
|
||||
case BELL:
|
||||
beep();
|
||||
break;
|
||||
case READY:
|
||||
refresh();
|
||||
if (nchar_send < 0)
|
||||
# if defined(HPUX) || (defined(BSD_RELEASE) && BSD_RELEASE >= 44)
|
||||
tcflush(STDIN, TCIFLUSH);
|
||||
# else
|
||||
# ifndef TCFLSH
|
||||
(void) ioctl(STDIN, TIOCFLUSH, &in);
|
||||
# else
|
||||
(void) ioctl(STDIN, TCFLSH, 0);
|
||||
# endif
|
||||
# endif
|
||||
nchar_send = MAX_SEND;
|
||||
# ifndef OTTO
|
||||
(void) GETCHR();
|
||||
# else
|
||||
Otto_count -= (GETCHR() & 0xff);
|
||||
if (!Am_monitor) {
|
||||
# ifdef DEBUG
|
||||
fputc('0' + Otto_count, stderr);
|
||||
# endif
|
||||
if (Otto_count == 0 && Otto_mode)
|
||||
otto(otto_y, otto_x, otto_face);
|
||||
}
|
||||
# endif
|
||||
break;
|
||||
default:
|
||||
# ifdef OTTO
|
||||
switch (ch) {
|
||||
|
||||
case '<':
|
||||
case '>':
|
||||
case '^':
|
||||
case 'v':
|
||||
otto_face = ch;
|
||||
# ifdef USE_CURSES
|
||||
getyx(stdscr, otto_y, otto_x);
|
||||
# else
|
||||
otto_y = cur_row;
|
||||
otto_x = cur_col;
|
||||
# endif
|
||||
break;
|
||||
}
|
||||
# endif
|
||||
put_ch(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
out:
|
||||
(void) close(Socket);
|
||||
}
|
||||
|
||||
/*
|
||||
* getchr:
|
||||
* Grab input and pass it along to the driver
|
||||
* Return any characters from the driver
|
||||
* When this routine is called by GETCHR, we already know there are
|
||||
* no characters in the input buffer.
|
||||
*/
|
||||
static unsigned char
|
||||
getchr()
|
||||
{
|
||||
fd_set readfds, s_readfds;
|
||||
int nfds, s_nfds;
|
||||
|
||||
FD_ZERO(&s_readfds);
|
||||
FD_SET(Socket, &s_readfds);
|
||||
FD_SET(STDIN, &s_readfds);
|
||||
s_nfds = (Socket > STDIN) ? Socket : STDIN;
|
||||
s_nfds++;
|
||||
|
||||
one_more_time:
|
||||
do {
|
||||
errno = 0;
|
||||
readfds = s_readfds;
|
||||
nfds = s_nfds;
|
||||
nfds = select(nfds, &readfds, NULL, NULL, NULL);
|
||||
} while (nfds <= 0 && errno == EINTR);
|
||||
|
||||
if (FD_ISSET(STDIN, &readfds))
|
||||
send_stuff();
|
||||
if (! FD_ISSET(Socket, &readfds))
|
||||
goto one_more_time;
|
||||
icnt = read(Socket, ibuf, sizeof ibuf);
|
||||
if (icnt < 0) {
|
||||
bad_con();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
if (icnt == 0)
|
||||
goto one_more_time;
|
||||
iptr = ibuf;
|
||||
icnt--;
|
||||
return *iptr++;
|
||||
}
|
||||
|
||||
/*
|
||||
* send_stuff:
|
||||
* Send standard input characters to the driver
|
||||
*/
|
||||
static void
|
||||
send_stuff()
|
||||
{
|
||||
int count;
|
||||
char *sp, *nsp;
|
||||
static char inp[sizeof Buf];
|
||||
|
||||
count = read(STDIN, Buf, sizeof Buf);
|
||||
if (count <= 0)
|
||||
return;
|
||||
if (nchar_send <= 0 && !no_beep) {
|
||||
(void) write(1, "\7", 1); /* CTRL('G') */
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* look for 'q'uit commands; if we find one,
|
||||
* confirm it. If it is not confirmed, strip
|
||||
* it out of the input
|
||||
*/
|
||||
Buf[count] = '\0';
|
||||
nsp = inp;
|
||||
for (sp = Buf; *sp != '\0'; sp++)
|
||||
if ((*nsp = map_key[(int)*sp]) == 'q')
|
||||
intr(0);
|
||||
else
|
||||
nsp++;
|
||||
count = nsp - inp;
|
||||
if (count) {
|
||||
# ifdef OTTO
|
||||
Otto_count += count;
|
||||
# endif
|
||||
nchar_send -= count;
|
||||
if (nchar_send < 0)
|
||||
count += nchar_send;
|
||||
(void) write(Socket, inp, count);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* quit:
|
||||
* Handle the end of the game when the player dies
|
||||
*/
|
||||
int
|
||||
quit(old_status)
|
||||
int old_status;
|
||||
{
|
||||
int explain, ch;
|
||||
|
||||
if (Last_player)
|
||||
return Q_QUIT;
|
||||
# ifdef OTTO
|
||||
if (Otto_mode)
|
||||
return Q_CLOAK;
|
||||
# endif
|
||||
# ifdef USE_CURSES
|
||||
move(HEIGHT, 0);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, HEIGHT, 0);
|
||||
cur_row = HEIGHT;
|
||||
cur_col = 0;
|
||||
# endif
|
||||
put_str("Re-enter game [ynwo]? ");
|
||||
clear_eol();
|
||||
explain = FALSE;
|
||||
for (;;) {
|
||||
refresh();
|
||||
if (isupper(ch = getchar()))
|
||||
ch = tolower(ch);
|
||||
if (ch == 'y')
|
||||
return old_status;
|
||||
else if (ch == 'o')
|
||||
break;
|
||||
else if (ch == 'n') {
|
||||
# ifndef INTERNET
|
||||
return Q_QUIT;
|
||||
# else
|
||||
# ifdef USE_CURSES
|
||||
move(HEIGHT, 0);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, HEIGHT, 0);
|
||||
cur_row = HEIGHT;
|
||||
cur_col = 0;
|
||||
# endif
|
||||
put_str("Write a parting message [yn]? ");
|
||||
clear_eol();
|
||||
refresh();
|
||||
for (;;) {
|
||||
if (isupper(ch = getchar()))
|
||||
ch = tolower(ch);
|
||||
if (ch == 'y')
|
||||
goto get_message;
|
||||
if (ch == 'n')
|
||||
return Q_QUIT;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# ifdef INTERNET
|
||||
else if (ch == 'w') {
|
||||
static char buf[WIDTH + WIDTH % 2];
|
||||
char *cp, c;
|
||||
|
||||
get_message:
|
||||
c = ch; /* save how we got here */
|
||||
# ifdef USE_CURSES
|
||||
move(HEIGHT, 0);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, HEIGHT, 0);
|
||||
cur_row = HEIGHT;
|
||||
cur_col = 0;
|
||||
# endif
|
||||
put_str("Message: ");
|
||||
clear_eol();
|
||||
refresh();
|
||||
cp = buf;
|
||||
for (;;) {
|
||||
refresh();
|
||||
if ((ch = getchar()) == '\n' || ch == '\r')
|
||||
break;
|
||||
# if defined(TERMINFO) || BSD_RELEASE >= 44
|
||||
if (ch == erasechar())
|
||||
# else
|
||||
if (ch == _tty.sg_erase)
|
||||
# endif
|
||||
{
|
||||
if (cp > buf) {
|
||||
# ifdef USE_CURSES
|
||||
int y, x;
|
||||
getyx(stdscr, y, x);
|
||||
move(y, x - 1);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, cur_row,
|
||||
cur_col - 1);
|
||||
cur_col -= 1;
|
||||
# endif
|
||||
cp -= 1;
|
||||
clear_eol();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
# if defined(TERMINFO) || BSD_RELEASE >= 44
|
||||
else if (ch == killchar())
|
||||
# else
|
||||
else if (ch == _tty.sg_kill)
|
||||
# endif
|
||||
{
|
||||
# ifdef USE_CURSES
|
||||
int y, x;
|
||||
getyx(stdscr, y, x);
|
||||
move(y, x - (cp - buf));
|
||||
# else
|
||||
mvcur(cur_row, cur_col, cur_row,
|
||||
cur_col - (cp - buf));
|
||||
cur_col -= cp - buf;
|
||||
# endif
|
||||
cp = buf;
|
||||
clear_eol();
|
||||
continue;
|
||||
} else if (!isprint(ch)) {
|
||||
beep();
|
||||
continue;
|
||||
}
|
||||
put_ch(ch);
|
||||
*cp++ = ch;
|
||||
if (cp + 1 >= buf + sizeof buf)
|
||||
break;
|
||||
}
|
||||
*cp = '\0';
|
||||
Send_message = buf;
|
||||
return (c == 'w') ? old_status : Q_MESSAGE;
|
||||
}
|
||||
# endif
|
||||
beep();
|
||||
if (!explain) {
|
||||
put_str("(Yes, No, Write message, or Options) ");
|
||||
explain = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef USE_CURSES
|
||||
move(HEIGHT, 0);
|
||||
# else
|
||||
mvcur(cur_row, cur_col, HEIGHT, 0);
|
||||
cur_row = HEIGHT;
|
||||
cur_col = 0;
|
||||
# endif
|
||||
# ifdef FLY
|
||||
put_str("Scan, Cloak, Flying, or Quit? ");
|
||||
# else
|
||||
put_str("Scan, Cloak, or Quit? ");
|
||||
# endif
|
||||
clear_eol();
|
||||
refresh();
|
||||
explain = FALSE;
|
||||
for (;;) {
|
||||
if (isupper(ch = getchar()))
|
||||
ch = tolower(ch);
|
||||
if (ch == 's')
|
||||
return Q_SCAN;
|
||||
else if (ch == 'c')
|
||||
return Q_CLOAK;
|
||||
# ifdef FLY
|
||||
else if (ch == 'f')
|
||||
return Q_FLY;
|
||||
# endif
|
||||
else if (ch == 'q')
|
||||
return Q_QUIT;
|
||||
beep();
|
||||
if (!explain) {
|
||||
# ifdef FLY
|
||||
put_str("[SCFQ] ");
|
||||
# else
|
||||
put_str("[SCQ] ");
|
||||
# endif
|
||||
explain = TRUE;
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
# ifndef USE_CURSES
|
||||
void
|
||||
put_ch(ch)
|
||||
char ch;
|
||||
{
|
||||
if (!isprint(ch)) {
|
||||
fprintf(stderr, "r,c,ch: %d,%d,%d", cur_row, cur_col, ch);
|
||||
return;
|
||||
}
|
||||
screen[cur_row][cur_col] = ch;
|
||||
putchar(ch);
|
||||
if (++cur_col >= COLS) {
|
||||
if (!AM || XN)
|
||||
putchar('\n');
|
||||
cur_col = 0;
|
||||
if (++cur_row >= LINES)
|
||||
cur_row = LINES;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
put_str(s)
|
||||
const char *s;
|
||||
{
|
||||
while (*s)
|
||||
put_ch(*s++);
|
||||
}
|
||||
# endif
|
||||
|
||||
void
|
||||
clear_the_screen()
|
||||
{
|
||||
# ifdef USE_CURSES
|
||||
clear();
|
||||
move(0, 0);
|
||||
refresh();
|
||||
# else
|
||||
int i;
|
||||
|
||||
if (blanks[0] == '\0')
|
||||
for (i = 0; i < SCREEN_WIDTH; i++)
|
||||
blanks[i] = ' ';
|
||||
|
||||
if (CL != NULL) {
|
||||
#if !defined(BSD_RELEASE) || BSD_RELEASE < 44
|
||||
tputs(CL, LINES, _putchar);
|
||||
#else
|
||||
tputs(CL, LINES, __cputchar);
|
||||
#endif
|
||||
for (i = 0; i < SCREEN_HEIGHT; i++)
|
||||
memcpy(screen[i], blanks, SCREEN_WIDTH);
|
||||
} else {
|
||||
for (i = 0; i < SCREEN_HEIGHT; i++) {
|
||||
mvcur(cur_row, cur_col, i, 0);
|
||||
cur_row = i;
|
||||
cur_col = 0;
|
||||
clear_eol();
|
||||
}
|
||||
mvcur(cur_row, cur_col, 0, 0);
|
||||
}
|
||||
cur_row = cur_col = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef USE_CURSES
|
||||
void
|
||||
clear_eol()
|
||||
{
|
||||
if (CE != NULL)
|
||||
#if !defined(BSD_RELEASE) || BSD_RELEASE < 44
|
||||
tputs(CE, 1, _putchar);
|
||||
#else
|
||||
tputs(CE, 1, __cputchar);
|
||||
#endif
|
||||
else {
|
||||
fwrite(blanks, sizeof (char), SCREEN_WIDTH - cur_col, stdout);
|
||||
if (COLS != SCREEN_WIDTH)
|
||||
mvcur(cur_row, SCREEN_WIDTH, cur_row, cur_col);
|
||||
else if (AM)
|
||||
mvcur(cur_row + 1, 0, cur_row, cur_col);
|
||||
else
|
||||
mvcur(cur_row, SCREEN_WIDTH - 1, cur_row, cur_col);
|
||||
}
|
||||
memcpy(&screen[cur_row][cur_col], blanks, SCREEN_WIDTH - cur_col);
|
||||
}
|
||||
# endif
|
||||
|
||||
void
|
||||
redraw_screen()
|
||||
{
|
||||
# ifdef USE_CURSES
|
||||
clearok(stdscr, TRUE);
|
||||
touchwin(stdscr);
|
||||
# else
|
||||
int i;
|
||||
# ifndef NOCURSES
|
||||
static int first = 1;
|
||||
|
||||
if (first) {
|
||||
curscr = newwin(SCREEN_HEIGHT, SCREEN_WIDTH, 0, 0);
|
||||
if (curscr == NULL)
|
||||
errx(1, "Can't create curscr");
|
||||
# if !defined(BSD_RELEASE) || BSD_RELEASE < 44
|
||||
for (i = 0; i < SCREEN_HEIGHT; i++)
|
||||
curscr->_y[i] = screen[i];
|
||||
# endif
|
||||
first = 0;
|
||||
}
|
||||
# if defined(BSD_RELEASE) && BSD_RELEASE >= 44
|
||||
for (i = 0; i < SCREEN_HEIGHT; i++) {
|
||||
int j;
|
||||
|
||||
for (j = 0; j < SCREEN_WIDTH; j++)
|
||||
curscr->lines[i]->line[j].ch = screen[i][j];
|
||||
}
|
||||
curscr->cury = cur_row;
|
||||
curscr->curx = cur_col;
|
||||
# else
|
||||
curscr->_cury = cur_row;
|
||||
curscr->_curx = cur_col;
|
||||
# endif
|
||||
clearok(curscr, TRUE);
|
||||
touchwin(curscr);
|
||||
wrefresh(curscr);
|
||||
#else
|
||||
mvcur(cur_row, cur_col, 0, 0);
|
||||
for (i = 0; i < SCREEN_HEIGHT - 1; i++) {
|
||||
fwrite(screen[i], sizeof (char), SCREEN_WIDTH, stdout);
|
||||
if (COLS > SCREEN_WIDTH || (COLS == SCREEN_WIDTH && !AM))
|
||||
putchar('\n');
|
||||
}
|
||||
fwrite(screen[SCREEN_HEIGHT - 1], sizeof (char), SCREEN_WIDTH - 1,
|
||||
stdout);
|
||||
mvcur(SCREEN_HEIGHT - 1, SCREEN_WIDTH - 1, cur_row, cur_col);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* do_message:
|
||||
* Send a message to the driver and return
|
||||
*/
|
||||
void
|
||||
do_message()
|
||||
{
|
||||
long version;
|
||||
|
||||
if (read(Socket, (char *) &version, LONGLEN) != LONGLEN) {
|
||||
bad_con();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
if (ntohl(version) != (unsigned long)HUNT_VERSION) {
|
||||
bad_ver();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
# ifdef INTERNET
|
||||
if (write(Socket, Send_message, strlen(Send_message)) < 0) {
|
||||
bad_con();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
# endif
|
||||
(void) close(Socket);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
huntd
|
||||
huntd.6
|
||||
@@ -1,141 +0,0 @@
|
||||
/* $NetBSD: get_names.c,v 1.6 2001/02/05 00:42:15 christos Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: get_names.c,v 1.6 2001/02/05 00:42:15 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "bsd.h"
|
||||
|
||||
#if defined(TALK_43) || defined(TALK_42)
|
||||
|
||||
# include <sys/param.h>
|
||||
# include <netdb.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <unistd.h>
|
||||
# include "hunt.h"
|
||||
# include "talk_ctl.h"
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#endif
|
||||
|
||||
static char hostname[MAXHOSTNAMELEN + 1];
|
||||
char *my_machine_name;
|
||||
|
||||
/*
|
||||
* Determine the local user and machine
|
||||
*/
|
||||
void
|
||||
get_local_name(my_name)
|
||||
const char *my_name;
|
||||
{
|
||||
struct hostent *hp;
|
||||
struct servent *sp;
|
||||
|
||||
/* Load these useful values into the standard message header */
|
||||
msg.id_num = 0;
|
||||
(void) strncpy(msg.l_name, my_name, NAME_SIZE);
|
||||
msg.l_name[NAME_SIZE - 1] = '\0';
|
||||
msg.r_tty[0] = '\0';
|
||||
msg.pid = getpid();
|
||||
# ifdef TALK_43
|
||||
msg.vers = TALK_VERSION;
|
||||
msg.addr.sa_family = htons(AF_INET);
|
||||
msg.ctl_addr.sa_family = htons(AF_INET);
|
||||
# else
|
||||
msg.addr.sin_family = htons(AF_INET);
|
||||
msg.ctl_addr.sin_family = htons(AF_INET);
|
||||
# endif
|
||||
|
||||
(void)gethostname(hostname, sizeof (hostname));
|
||||
hostname[sizeof(hostname) - 1] = '\0';
|
||||
my_machine_name = hostname;
|
||||
/* look up the address of the local host */
|
||||
hp = gethostbyname(my_machine_name);
|
||||
if (hp == (struct hostent *) 0) {
|
||||
# ifdef LOG
|
||||
syslog(LOG_ERR,
|
||||
"This machine doesn't exist. Boy, am I confused!");
|
||||
# else
|
||||
perror("This machine doesn't exist. Boy, am I confused!");
|
||||
# endif
|
||||
exit(1);
|
||||
}
|
||||
memcpy(&my_machine_addr, hp->h_addr, hp->h_length);
|
||||
/* find the daemon portal */
|
||||
# ifdef TALK_43
|
||||
sp = getservbyname("ntalk", "udp");
|
||||
# else
|
||||
sp = getservbyname("talk", "udp");
|
||||
# endif
|
||||
if (sp == 0) {
|
||||
# ifdef LOG
|
||||
syslog(LOG_ERR, "This machine doesn't support talk");
|
||||
# else
|
||||
perror("This machine doesn't support talk");
|
||||
# endif
|
||||
exit(1);
|
||||
}
|
||||
daemon_port = sp->s_port;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the remote user and machine
|
||||
*/
|
||||
int
|
||||
get_remote_name(his_address)
|
||||
char *his_address;
|
||||
{
|
||||
char *his_name;
|
||||
char *his_machine_name;
|
||||
char *ptr;
|
||||
struct hostent *hp;
|
||||
|
||||
|
||||
/* check for, and strip out, the machine name of the target */
|
||||
for (ptr = his_address; *ptr != '\0' && *ptr != '@' && *ptr != ':'
|
||||
&& *ptr != '!' && *ptr != '.'; ptr++)
|
||||
continue;
|
||||
if (*ptr == '\0') {
|
||||
/* this is a local to local talk */
|
||||
his_name = his_address;
|
||||
his_machine_name = my_machine_name;
|
||||
} else {
|
||||
if (*ptr == '@') {
|
||||
/* user@host */
|
||||
his_name = his_address;
|
||||
his_machine_name = ptr + 1;
|
||||
} else {
|
||||
/* host.user or host!user or host:user */
|
||||
his_name = ptr + 1;
|
||||
his_machine_name = his_address;
|
||||
}
|
||||
*ptr = '\0';
|
||||
}
|
||||
/* Load these useful values into the standard message header */
|
||||
(void) strncpy(msg.r_name, his_name, NAME_SIZE);
|
||||
msg.r_name[NAME_SIZE - 1] = '\0';
|
||||
|
||||
/* if he is on the same machine, then simply copy */
|
||||
if (memcmp((char *) &his_machine_name, (char *) &my_machine_name,
|
||||
sizeof(his_machine_name)) == 0)
|
||||
memcpy(&his_machine_addr, &my_machine_addr,
|
||||
sizeof(his_machine_name));
|
||||
else {
|
||||
/* look up the address of the recipient's machine */
|
||||
hp = gethostbyname(his_machine_name);
|
||||
if (hp == (struct hostent *) 0)
|
||||
return 0; /* unknown host */
|
||||
memcpy(&his_machine_addr, hp->h_addr, hp->h_length);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,30 @@
|
||||
# install-man.in - install a manpage
|
||||
# install-man.in - install a manpage.
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -42,7 +68,7 @@ elif [ $# = 2 ]; then
|
||||
echo ".so man$section1/$page1" >"$mandir/$page2"
|
||||
chmod @manpage_perms@ "$mandir/$page2"
|
||||
if [ @do_chown@ = y ]; then
|
||||
chown @manpage_owner@.@manpage_group@ "$mandir/$page2"
|
||||
chown @manpage_owner@:@manpage_group@ "$mandir/$page2"
|
||||
fi
|
||||
if [ @gzip_manpages@ = y ]; then
|
||||
rm -f "$mandir/$page2.gz"
|
||||
@@ -55,9 +81,9 @@ elif [ $# = 2 ]; then
|
||||
linkto="../man$section1/$page1"
|
||||
fi
|
||||
if [ @gzip_manpages@ = y ]; then
|
||||
ln -s "$linkto.gz" "$mandir/$page2.gz"
|
||||
ln -sf "$linkto.gz" "$mandir/$page2.gz"
|
||||
else
|
||||
ln -s "$linkto" "$mandir/$page2"
|
||||
ln -sf "$linkto" "$mandir/$page2"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -1,13 +1,45 @@
|
||||
# install-score.in - install a score file
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
set -e
|
||||
|
||||
scorefile="@install_prefix@$1"
|
||||
if [ "$1" = "-p" ]; then
|
||||
scorefile="@install_prefix@$2"
|
||||
perms=@vardata_perms_priv@
|
||||
else
|
||||
scorefile="@install_prefix@$1"
|
||||
perms=@vardata_perms@
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "$scorefile")"
|
||||
|
||||
test -e "$scorefile" || touch "$scorefile"
|
||||
if [ @do_chown@ = y ]; then
|
||||
chown @vardata_owner@.@vardata_group@ "$scorefile"
|
||||
chown @vardata_owner@:@vardata_group@ "$scorefile"
|
||||
fi
|
||||
chmod @vardata_perms@ "$scorefile"
|
||||
chmod "$perms" "$scorefile"
|
||||
|
||||
32
mkdep
32
mkdep
@@ -1,5 +1,32 @@
|
||||
#!/bin/sh
|
||||
# mkdep - create dependencies
|
||||
# mkdep - create dependencies.
|
||||
#
|
||||
# Copyright (c) 1998, 2001 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
# usage: mkdep source output compiler flags
|
||||
# e.g. mkdep foo/bar.c foo/bar.d gcc -g -O2 -DFOOBAR
|
||||
|
||||
@@ -14,6 +41,7 @@ shift 3
|
||||
|
||||
"$compiler" -M "$@" "$source_file" >"$output_file".tmp
|
||||
|
||||
sed "s!$base_base_name.o *:!$base_name.o $base_name.d:!g" <"$output_file".tmp >"$output_file"
|
||||
sed "s!^$base_base_name.o *:!$base_name.o :!g
|
||||
s!$base_name.o *:!$base_name.o $base_name.d:!g" <"$output_file".tmp >"$output_file"
|
||||
|
||||
rm -f "$output_file".tmp
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for quiz/datfiles
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
quiz_datfiles_DIRS := $(QUIZ_DIR)
|
||||
|
||||
@@ -7,7 +33,7 @@ quiz_datfiles_CATS := africa america areas arith asia babies bard chinese \
|
||||
locomotive midearth morse mult murders poetry posneg pres province \
|
||||
seq-easy seq-hard sexes sov spell state trek ucc
|
||||
|
||||
quiz_datfiles_all:
|
||||
quiz_datfiles_all: quiz/datfiles/index
|
||||
|
||||
quiz_datfiles_install:
|
||||
set -e; for c in $(quiz_datfiles_CATS); do $(INSTALL_DATA) quiz/datfiles/$$c $(INSTALL_PREFIX)$(QUIZ_DIR)/$$c; done
|
||||
|
||||
@@ -35,7 +35,7 @@ gangsters:mob
|
||||
geese in flight:skein
|
||||
geese on water:gaggle
|
||||
goats:trip
|
||||
grapes|banannas:bunch
|
||||
grapes|bananas:bunch
|
||||
hawks:cast
|
||||
hens:brood
|
||||
herons:siege
|
||||
|
||||
@@ -2,7 +2,7 @@ African violet:Such worth is rare
|
||||
Apple blossom:Preference
|
||||
Bachelor's button:Celibacy
|
||||
Bay leaf:I change but in death
|
||||
Camelia:Reflected loveliness
|
||||
Camellia:Reflected loveliness
|
||||
Chrysanthemum, non-red/white:Slighted love
|
||||
Chrysanthemum, red:I love
|
||||
Chrysanthemum, white:Truth
|
||||
@@ -15,7 +15,7 @@ Fuchsia:Fast
|
||||
Gardenia:Secret, untold love
|
||||
Honeysuckle:Bonds of love
|
||||
Ivy:Friendship, fidelity, marriage
|
||||
Jasmine:Amiablity, transports of joy, sensuality
|
||||
Jasmine:Amiability, transports of joy, sensuality
|
||||
Lilac:Youthful innocence
|
||||
Lilly of the valley:Return of happiness
|
||||
Lilly:Purity, sweetness
|
||||
@@ -35,7 +35,7 @@ Rose, thornless, any color:Early attachment
|
||||
Rose, white:I am worthy of you
|
||||
Rose, yellow:Decrease of love, rise of jealousy
|
||||
Rosebud, white:Girlhood, and a heart ignorant of love
|
||||
Rosemary:Rememberance
|
||||
Rosemary:Remembrance
|
||||
Sunflower:Haughtiness
|
||||
Tulip, red:Declaration of love
|
||||
Tulip, yellow:Hopeless love
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@quiz_dir@/murders:victim:killer
|
||||
@quiz_dir@/poetry:poem{-}line:next:poem:author
|
||||
@quiz_dir@/posneg:pos{itive}:neg{ative}
|
||||
@quiz_dir@/pres:pres{ident}:term:succ{essor}
|
||||
@quiz_dir@/pres:pres{ident}:term:vice:succ{essor}
|
||||
@quiz_dir@/province:province:cap{ital}
|
||||
@quiz_dir@/seq-easy:easy{-}{seq{uence}}:next:name
|
||||
@quiz_dir@/seq-hard:hard{-}{seq{uence}}:next:name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Shire:Michel Delving|Hobbiton
|
||||
Mordor:Minas Morgul
|
||||
Mordor:Barad Dur
|
||||
Gondor:Minas Tirith
|
||||
Umbar:{City of the }Corsairs
|
||||
Rhovanion:Esgaroth{ upon the Long Lake}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
large|big:small
|
||||
on:off
|
||||
standing up:sitting down
|
||||
inside:outside
|
||||
high:low
|
||||
old:new|young
|
||||
hot:cold
|
||||
out:in
|
||||
heavy|dark:light
|
||||
daytime:night[time| time]
|
||||
stop|come:go
|
||||
top:bottom
|
||||
floor:ceiling
|
||||
near:far
|
||||
run:walk
|
||||
empty|hungry:full
|
||||
backwards:f[or|ront]wards
|
||||
big|large:little|small
|
||||
fat|thick:thin|skinny
|
||||
bright|light:dark|dull
|
||||
right:wrong|left
|
||||
give:take|receive|get
|
||||
buy:sell
|
||||
shiny|bright:dull
|
||||
dawn:dusk
|
||||
fall down|go to bed:[get|stand|rise] up
|
||||
asleep:awake
|
||||
up:down
|
||||
open[|ed|]:close[d|]
|
||||
smile:frown|cry
|
||||
happy|glad:sad
|
||||
hard:soft|easy
|
||||
boy|woman|lady:girl|man
|
||||
fast:slow
|
||||
wet:dry
|
||||
covered|hid[den|]:uncovered|open
|
||||
good:bad
|
||||
always|sometimes|now:never|sometimes
|
||||
beautiful|pretty:ugly
|
||||
rough:smooth
|
||||
hairy:bald||smooth
|
||||
above:below
|
||||
yin:yang
|
||||
sweet:sour
|
||||
if:unless
|
||||
from|fro:to
|
||||
with[|in|]:without|against
|
||||
after:before
|
||||
together:apart
|
||||
plus:minus
|
||||
@@ -1,42 +1,83 @@
|
||||
{G{eorge} }Washington:1789-{17}97:{J{ohn} }Adams
|
||||
{J{ohn} }Adams:1797-1801:{T{homas} }Jefferson
|
||||
{T{homas} }Jefferson:1801-{{18}0}9:{J{ames} }Madison
|
||||
{J{ames} }Madison:1809-{18}17:{J{ames} }Monroe
|
||||
{J{ames} }Monroe:1817-1825:{J{ohn} }{Q{uincy} }Adams
|
||||
{J{ohn} }{Q{uincy} }Adams:1825-{{18}2}9:{A{ndrew} }Jackson
|
||||
{A{ndrew} }Jackson:1829-{18}37:{M{artin} }Van Buren
|
||||
{M{artin} }Van Buren:1837-{18}41:{W{illiam|m} }{H{enry} }Harrison
|
||||
{W{illiam|m} }{H{enry} }Harrison:1841:{J{ohn} }Tyler
|
||||
{J{ohn} }Tyler:1841-{{18}4}5:{J{ames} }{K{nox} }Polk
|
||||
{J{ames} }{K{nox} }Polk:1845-{{18}4}9:{Z{achary} }Taylor
|
||||
{Z{achary} }Taylor:1849-{18}50:{M{illard} }Fillmore
|
||||
{M{illard} }Fillmore:1850-{{18}5}3:{F{ranklin} }Pierce
|
||||
{F{ranklin} }Pierce:1853-{{18}5}7:{J{ames} }Buchanan
|
||||
{J{ames} }Buchanan:1857-{18}61:{A{braham|be} }Lincoln
|
||||
{A{braham|be} }Lincoln:1861-{{18}6}5:{A{ndrew} }Johnson
|
||||
{A{ndrew} }Johnson:1865-{{18}6}9:{U{lysses} }{S{impson} }Grant
|
||||
{U{lysses} }{S{impson} }Grant:1869-{18}77:{R{utherford} }{B{irchard} }Hayes
|
||||
{R{utherford} }{B{irchard} }Hayes:1877-{18}81:{J{ames} }{A{bram} }Garfield
|
||||
{J{ames} }{A{bram} }Garfield:1881:{C{hester} }{A{lan} }Arthur
|
||||
{C{hester} }{A{lan} }Arthur:1881-{{18}8}5:{G{rover} }Cleveland{ (1st term)}
|
||||
{G{rover} }Cleveland{ (1st term)}:1885-{{18}8}9:{B{enjamin} }Harrison
|
||||
{B{enjamin} }Harrison:1889-{18}93:{G{rover} }Cleveland{ (2nd term)}
|
||||
{G{rover} }Cleveland{ (2nd term)}:1893-{18}97:{W{illiam|m} }McKinley
|
||||
{W{illiam|m} }McKinley:1897-1901:{T{heodore|eddy} }Roosevelt|TR
|
||||
{T{heodore|eddy} }Roosevelt|TR:1901-{{19}0}9:{W{illiam|m} }{H{oward} }Taft
|
||||
{W{illiam|m} }{H{oward} }Taft:1909-{19}13:{W{oodrow} }Wilson
|
||||
{W{oodrow} }Wilson:1913-{19}21:{W{arren} }{G{amaliel} }Harding
|
||||
{W{arren} }{G{amaliel} }Harding:1921-{{19}2}3:{C{alvin} }Coolidge
|
||||
{C{alvin} }Coolidge:1923-{{19}2}9:{H{erbert} }Hoover
|
||||
{H{erbert} }Hoover:1929-{19}33:{F{ranklin} }{D{elano} }Roosevelt|FDR
|
||||
{F{ranklin} }{D{elano} }Roosevelt|FDR:1933-{19}45:{H{arry} }{S }Truman
|
||||
{H{arry} }{S }Truman:1945-{19}53:{D{wight} }{D{avid} }Eisenhower
|
||||
{D{wight} }{D{avid} }Eisenhower:1953-{19}61:{J{ohn} }{F{itzgerald} }Kennedy|JFK
|
||||
{J{ohn} }{F{itzgerald} }Kennedy|JFK:1961-{{19}6}3:{L{yndon} }{B{aines} }Johnson|LBJ
|
||||
{L{yndon} }{B{aines} }Johnson|LBJ:1963-{{19}6}9:{R{ichard} }{M{ilhouse} }Nixon
|
||||
{R{ichard} }{M{ilhouse} }Nixon:1969-{19}74:{G{erald} }{R{obert} }Ford
|
||||
{G{erald} }{R{obert} }Ford:1974-76:{J{immy} }Carter
|
||||
{J{immy} }Carter:1976-1980:{R{onald} }Reagan
|
||||
{R{onald} }Reagan:1980-1988:{G{eorge} }{H{erbert} }{W{alker} }Bush
|
||||
{G{eorge} }{H{erbert} }{W{alker} }Bush:1988-1992:{W{illiam} }{J{efferson} }Clinton
|
||||
{W{illiam} }{J{efferson} }Clinton:1992-:
|
||||
{G{eorge} }Washington:1789-{17}97:{J{ohn} }Adams:{J{ohn} }Adams
|
||||
{J{ohn} }Adams:1797-1801:{T{homas} }Jefferson:{T{homas} }Jefferson
|
||||
{T{homas} }Jefferson:1801-{{18}0}9:{A{aron} }Burr|{G{eorge} }Clinton:\
|
||||
{J{ames} }Madison
|
||||
{J{ames} }Madison:1809-{18}17:{G{eorge} }Clinton|{E{lbridge} }Gerry:\
|
||||
{J{ames} }Monroe
|
||||
{J{ames} }Monroe:1817-1825:\
|
||||
{D{aniel} }{D{.} }Tompkins:{J{ohn} }{Q{uincy} }Adams
|
||||
{J{ohn} }{Q{uincy} }Adams:1825-{{18}2}9:{J{ohn} }{C{aldwell} }Calhoun:\
|
||||
{A{ndrew} }Jackson
|
||||
{A{ndrew} }Jackson:1829-{18}37:\
|
||||
{J{ohn} }{C{aldwell} }Calhoun|{M{artin} }Van Buren:{M{artin} }Van Buren
|
||||
{M{artin} }Van Buren:1837-{18}41:\
|
||||
{R{ichard} }{M{entor} }Johnson:{W{illiam|m} }{H{enry} }Harrison
|
||||
{W{illiam|m} }{H{enry} }Harrison:1841:{J{ohn} }Tyler:{J{ohn} }Tyler
|
||||
{J{ohn} }Tyler:1841-{{18}4}5:[N|n]one{ (1841-5)}:{J{ames} }{K{nox} }Polk
|
||||
{J{ames} }{K{nox} }Polk:1845-{{18}4}9:\
|
||||
{G{eorge} }{M{ifflin} }Dallas:{Z{achary} }Taylor
|
||||
{Z{achary} }Taylor:1849-{18}50:{M{illard} }Fillmore:{M{illard} }Fillmore
|
||||
{M{illard} }Fillmore:1850-{{18}5}3:[N|n]one{ (1850-3)}:{F{ranklin} }Pierce
|
||||
{F{ranklin} }Pierce:1853-{{18}5}7:\
|
||||
{W{illiam|m} }{R{ufus} }{de Vane }King:{J{ames} }Buchanan
|
||||
{J{ames} }Buchanan:1857-{18}61:\
|
||||
{J{ohn} }{C{abell} }Breckinridge:{A{braham|be} }Lincoln
|
||||
{A{braham|be} }Lincoln:1861-{{18}6}5:\
|
||||
{H{annibal} }Hamlin|{A{ndrew} }Johnson:{A{ndrew} }Johnson
|
||||
{A{ndrew} }Johnson:1865-{{18}6}9:[N|n]one{ (1865-9)}:\
|
||||
{U{lysses} }{S{impson} }Grant
|
||||
{U{lysses} }{S{impson} }Grant:1869-{18}77:\
|
||||
{S{chuyler} }Colfax|{H{enry} }Wilson:{R{utherford} }{B{irchard} }Hayes
|
||||
{R{utherford} }{B{irchard} }Hayes:1877-{18}81:\
|
||||
{W{illiam|m} }{A{lmon} }Wheeler:{J{ames} }{A{bram} }Garfield
|
||||
{J{ames} }{A{bram} }Garfield:1881:\
|
||||
{C{hester} }{A{lan} }Arthur:{C{hester} }{A{lan} }Arthur
|
||||
{C{hester} }{A{lan} }Arthur:1881-{{18}8}5:[N|n]one{ (1881-5)}:\
|
||||
{G{rover} }Cleveland{ (1st term)}
|
||||
{G{rover} }Cleveland{ (1st term)}:1885-{{18}8}9:\
|
||||
{T{homas} }{A{ndrews} }Hendricks:{B{enjamin} }Harrison
|
||||
{B{enjamin} }Harrison:1889-{18}93:\
|
||||
{L{evi} }{P{arsons} }Morton:{G{rover} }Cleveland{ (2nd term)}
|
||||
{G{rover} }Cleveland{ (2nd term)}:1893-{18}97:\
|
||||
{A{dlai} }{E{wing} }Stevenson:{W{illiam|m} }McKinley
|
||||
{W{illiam|m} }McKinley:1897-1901:\
|
||||
{G{arret} }{A{ugustus} }Hobart|{T{heodore|eddy} }Roosevelt|TR:\
|
||||
{T{heodore|eddy} }Roosevelt|TR
|
||||
{T{heodore|eddy} }Roosevelt|TR:1901-{{19}0}9:\
|
||||
{C{harles} }{W{arren} }Fairbanks:{W{illiam|m} }{H{oward} }Taft
|
||||
{W{illiam|m} }{H{oward} }Taft:1909-{19}13:\
|
||||
{J{ames} }{S{choolcraft} }Sherman:{W{oodrow} }Wilson
|
||||
{W{oodrow} }Wilson:1913-{19}21:\
|
||||
{T{homas} }{R{iley} }Marshall:{W{arren} }{G{amaliel} }Harding
|
||||
{W{arren} }{G{amaliel} }Harding:1921-{{19}2}3:{C{alvin} }Coolidge:\
|
||||
{C{alvin} }Coolidge
|
||||
{C{alvin} }Coolidge:1923-{{19}2}9:\
|
||||
{C{harles} }{G{ates} }Dawes:{H{erbert} }{C{lark} }Hoover
|
||||
{H{erbert} }{C{lark} }Hoover:1929-{19}33:\
|
||||
{C{harles} }Curtis:{F{ranklin} }{D{elano} }Roosevelt|FDR
|
||||
{F{ranklin} }{D{elano} }Roosevelt|FDR:1933-{19}45:\
|
||||
{J{ohn} }{N{ance} }Garner|{H{enry} }{A{gard} }Wallace|{H{arry} }{S }Truman:\
|
||||
{H{arry} }{S }Truman
|
||||
{H{arry} }{S }Truman:1945-{19}53:\
|
||||
{A{lben} }{W{illiam} }Barkley:{D{wight} }{D{avid} }Eisenhower
|
||||
{D{wight} }{D{avid} }Eisenhower:1953-{19}61:\
|
||||
{R{ichard} }{M{ilhous} }Nixon:{J{ohn} }{F{itzgerald} }Kennedy|JFK
|
||||
{J{ohn} }{F{itzgerald} }Kennedy|JFK:1961-{{19}6}3:\
|
||||
{L{yndon} }{B{aines} }Johnson|LBJ:{L{yndon} }{B{aines} }Johnson|LBJ
|
||||
{L{yndon} }{B{aines} }Johnson|LBJ:1963-{{19}6}9:\
|
||||
{H{ubert} }{H{oratio} }Humphrey:{R{ichard} }{M{ilhous} }Nixon
|
||||
{R{ichard} }{M{ilhous} }Nixon:1969-{19}74:\
|
||||
{S{piro} }{T{heodore} }Agnew|{G{erald} }{R{udolph} }Ford:\
|
||||
{G{erald} }{R{udolph} }Ford
|
||||
{G{erald} }{R{udolph} }Ford:1974-{{19}7}7:\
|
||||
{N{elson} }{A{ldrich} }Rockefeller:{J{ames} }{E{arl} }Carter{{,} J{unio}r}
|
||||
{J{ames} }{E{arl} }Carter{{,} J{unio}r}:1977-{19}81:\
|
||||
{W{alter} }{F{rederick} }Mondale:{R{onald} }{W{ilson} }Reagan
|
||||
{R{onald} }{W{ilson} }Reagan:1981-{{19}8}9:\
|
||||
{G{eorge} }{H{erbert} }{W{alker} }Bush:{G{eorge} }{H{erbert} }{W{alker} }Bush
|
||||
{G{eorge} }{H{erbert} }{W{alker} }Bush:1989-{19}93:\
|
||||
{J{ames} }{D{anforth|an} }Quayle:{W{illiam|m} }{J{efferson} }Clinton
|
||||
{W{illiam|m} }{J{efferson} }Clinton:1993-2001:\
|
||||
{A{lbert} }{A{rnold} }Gore{{,} J{unio}r}:{G{eorge} }{W{alker} }Bush{{,} J{unio}r}
|
||||
{G{eorge} }{W{alker} }Bush{{,} J{unio}r}:2001-:\
|
||||
{R{ichard} }{B{ruce} }Cheney:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# $NetBSD: Makefile,v 1.8 1998/02/04 10:24:13 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.9 1999/09/14 18:07:21 jsm Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= snake
|
||||
SRCS= snake.c move.c
|
||||
SRCS= snake.c
|
||||
MAN= snake.6
|
||||
DPADD= ${LIBM} ${LIBTERMCAP}
|
||||
LDADD= -lm -ltermcap
|
||||
DPADD= ${LIBM} ${LIBCURSES}
|
||||
LDADD= -lm -lcurses
|
||||
HIDEGAME=hidegame
|
||||
SETGIDGAME=yes
|
||||
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# Makefrag - makefile fragment for snake/snake
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
|
||||
snake_snake_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
.\" $NetBSD: snake.6,v 1.6 1997/10/12 01:49:26 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. 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.
|
||||
.\"
|
||||
.\" @(#)snake.6 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt SNAKE 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm snake ,
|
||||
.Nm snscore
|
||||
.Nd display chase game
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl w Ar width
|
||||
.Op Fl l Ar length
|
||||
.br
|
||||
.Nm snscore
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a display-based game which must be played on a CRT terminal.
|
||||
The object of the game is to make as much money as possible without
|
||||
getting eaten by the snake. The
|
||||
.Fl l
|
||||
and
|
||||
.Fl w
|
||||
options allow you to specify the length and width of the field.
|
||||
By default the entire screen (except for the last column) is used.
|
||||
.Pp
|
||||
You are represented on the screen by an I.
|
||||
The snake is 6 squares long and is represented by S's.
|
||||
The money is $, and an exit is #.
|
||||
Your score is posted in the upper left hand corner.
|
||||
.Pp
|
||||
You can move around using the same conventions as
|
||||
.Xr vi 1 ,
|
||||
the
|
||||
.Ic h ,
|
||||
.Ic j ,
|
||||
.Ic k ,
|
||||
and
|
||||
.Ic l
|
||||
keys work, as do the arrow keys.
|
||||
Other possibilities include:
|
||||
.Bl -tag -width indent
|
||||
.It Ic sefc
|
||||
These keys are like hjkl but form a directed pad around the d key.
|
||||
.It Ic HJKL
|
||||
These keys move you all the way in the indicated direction to the
|
||||
same row or column as the money. This does
|
||||
.Em not
|
||||
let you jump away from the snake, but rather saves you from having
|
||||
to type a key repeatedly. The snake still gets all his turns.
|
||||
.It Ic SEFC
|
||||
Likewise for the upper case versions on the left.
|
||||
.It Ic ATPB
|
||||
These keys move you to the four edges of the screen.
|
||||
Their position on the keyboard is the mnemonic, e.g.
|
||||
P is at the far right of the keyboard.
|
||||
.It Ic x
|
||||
This lets you quit the game at any time.
|
||||
.It Ic p
|
||||
Points in a direction you might want to go.
|
||||
.It Ic w
|
||||
Space warp to get out of tight squeezes, at a price.
|
||||
.El
|
||||
.Pp
|
||||
To earn money, move to the same square the money is on.
|
||||
A new $ will appear when you earn the current one.
|
||||
As you get richer, the snake gets hungrier.
|
||||
To leave the game, move to the exit (#).
|
||||
.Pp
|
||||
A record is kept of the personal best score of each player.
|
||||
Scores are only counted if you leave at the exit,
|
||||
getting eaten by the snake is worth nothing.
|
||||
.Pp
|
||||
As in pinball, matching the last digit of your score to the number
|
||||
which appears after the game is worth a bonus.
|
||||
.Pp
|
||||
To see who wastes time playing snake, run
|
||||
.Nm snscore .
|
||||
.Sh FILES
|
||||
.Bl -tag -width /var/games/snakerawscores -compact
|
||||
.It Pa /var/games/snakerawscores
|
||||
database of personal bests
|
||||
.It Pa /var/games/snake.log
|
||||
log of games played
|
||||
.El
|
||||
.Sh BUGS
|
||||
When playing on a small screen,
|
||||
it's hard to tell when you hit the edge of the screen.
|
||||
.Pp
|
||||
The scoring function takes into account the size of the screen.
|
||||
A perfect function to do this equitably has not been devised.
|
||||
@@ -1,6 +0,0 @@
|
||||
a.out
|
||||
*.d
|
||||
*.i
|
||||
*.s
|
||||
*.d.tmp
|
||||
snscore
|
||||
48
substfiles
48
substfiles
@@ -1,40 +1,52 @@
|
||||
# substfiles - list of files in which parameters are to be substituted.
|
||||
# These ones get substituted in at configure time.
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999, 2000 Joseph Samuel Myers.
|
||||
# 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. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
#
|
||||
Makeconfig
|
||||
hide-game
|
||||
install-man
|
||||
install-score
|
||||
atc/pathnames.h
|
||||
backgammon/backgammon/backgammon.6
|
||||
battlestar/pathnames.h
|
||||
boggle/boggle/bog.h
|
||||
caesar/rot13
|
||||
canfield/canfield/canfield.6
|
||||
canfield/canfield/pathnames.h
|
||||
cribbage/cribbage.6
|
||||
cribbage/pathnames.h
|
||||
dm/dm.8
|
||||
dm/dm.conf.5
|
||||
dm/pathnames.h
|
||||
fish/pathnames.h
|
||||
fortune/fortune/fortune.6
|
||||
fortune/fortune/pathnames.h
|
||||
hangman/hangman.6
|
||||
hack/pathnames.h
|
||||
hangman/pathnames.h
|
||||
hunt/hunt/hunt.6
|
||||
hunt/huntd/huntd.6
|
||||
monop/monop.6
|
||||
monop/pathnames.h
|
||||
phantasia/pathnames.h
|
||||
quiz/datfiles/index
|
||||
quiz/pathnames.h
|
||||
quiz/quiz.6
|
||||
robots/pathnames.h
|
||||
robots/robots.6
|
||||
rogue/pathnames.h
|
||||
rogue/rogue.6
|
||||
sail/pathnames.h
|
||||
snake/snake/pathnames.h
|
||||
snake/snake/snake.6
|
||||
tetris/pathnames.h
|
||||
tetris/tetris.6
|
||||
trek/trek.6
|
||||
wump/pathnames.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# substfiles2 - list of files in which parameters are to be substituted.
|
||||
# These ones get substituted during the make process.
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
|
||||
# Copyright (c) 1997, 1998, 1999, 2000, 2003 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -35,6 +35,7 @@ cribbage/cribbage.6
|
||||
dm/dm.8
|
||||
dm/dm.conf.5
|
||||
fortune/fortune/fortune.6
|
||||
hack/hack.6
|
||||
hangman/hangman.6
|
||||
hunt/hunt/hunt.6
|
||||
hunt/huntd/huntd.6
|
||||
@@ -45,6 +46,5 @@ robots/robots.6
|
||||
rogue/rogue.6
|
||||
snake/snake/snake.6
|
||||
tetris/tetris.6
|
||||
trek/trek.6
|
||||
wtf/wtf.6
|
||||
wtf/wtf
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# tests/factor.test - test functionality of factor.
|
||||
#
|
||||
# Copyright (c) 1999 Joseph Samuel Myers.
|
||||
# Copyright (c) 1999, 2003 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -55,3 +55,15 @@ factor/factor <<EOF >test.out 2>&1 || failtest
|
||||
EOF
|
||||
compare test.out tests/factor.123456
|
||||
rm -f test.out
|
||||
|
||||
if grep -q HAVE_OPENSSL include/bsd-games.h; then
|
||||
testno 5
|
||||
factor/factor 987654321987654 >test.out 2>&1 || failtest
|
||||
compare test.out tests/factor.987654321987654
|
||||
rm -f test.out
|
||||
|
||||
testno 6
|
||||
factor/factor 987654321987654321987 >test.out 2>&1 || failtest
|
||||
compare test.out tests/factor.987654321987654321987
|
||||
rm -f test.out
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user