From: Thomas Cort Date: Sun, 16 Mar 2014 14:49:56 +0000 (-0400) Subject: Importing games/wargames X-Git-Tag: v3.3.0~386 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch05.html?a=commitdiff_plain;h=6e7922ee31da2f571c97e79f1942244681d273d0;p=minix.git Importing games/wargames No Minix specific changes needed. Change-Id: Ie752ee476dd6be712b1dc9cae6ea260f12aaf906 --- diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index d97471009..f2717fa14 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -568,6 +568,7 @@ ./usr/games/primes minix-sys ./usr/games/strfile minix-sys ./usr/games/unstr minix-sys +./usr/games/wargames minix-sys ./usr/include minix-sys ./usr/include/aio.h minix-sys ./usr/include/a.out.h minix-sys @@ -4765,6 +4766,7 @@ ./usr/man/man6/pig.6 minix-sys ./usr/man/man6/ppt.6 minix-sys ./usr/man/man6/primes.6 minix-sys +./usr/man/man6/wargames.6 minix-sys ./usr/man/man7 minix-sys ./usr/man/man7/ascii.7 minix-sys ./usr/man/man7/atf.7 minix-sys atf diff --git a/games/Makefile b/games/Makefile index 0f02325da..7c7888cfc 100644 --- a/games/Makefile +++ b/games/Makefile @@ -12,7 +12,9 @@ SUBDIR= adventure \ \ factor fortune \ monop morse number \ - pig ppt primes + pig ppt primes \ + \ + wargames .if !defined(__MINIX) .if ${MKCXX} != "no" diff --git a/games/wargames/Makefile b/games/wargames/Makefile new file mode 100644 index 000000000..47b625a1b --- /dev/null +++ b/games/wargames/Makefile @@ -0,0 +1,7 @@ +# $NetBSD: Makefile,v 1.10 2000/01/25 21:41:18 drochner Exp $ +# @(#)Makefile 8.1 (Berkeley) 5/31/93 + +SCRIPTS=wargames.sh +MAN= wargames.6 + +.include diff --git a/games/wargames/wargames.6 b/games/wargames/wargames.6 new file mode 100644 index 000000000..bf393cbc5 --- /dev/null +++ b/games/wargames/wargames.6 @@ -0,0 +1,50 @@ +.\" $NetBSD: wargames.6,v 1.6 2005/09/15 02:09:42 wiz Exp $ +.\" +.\" Copyright (c) 1998 Joey Hess +.\" 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. +.\" +.Dd February 22, 1998 +.Dt WARGAMES 6 +.Os +.Sh NAME +.Nm wargames +.Nd shall we play a game? +.Sh SYNOPSIS +.Nm wargames +.Sh DESCRIPTION +.Dq Shall we play a game? +-- computer, +.Nm wargames +.Pp +Just like in the movie, the computer will happily play a game with you. +The likelihood of Global Thermonuclear Warfare resulting is much smaller.... +.Sh SEE ALSO +Wargames, +the movie (an MGM production, PG 13, directed by John Badham, 1983). +.Sh AUTHORS +This manual page was written by +.An Joey Hess +.Aq joeyh@kitenet.net . diff --git a/games/wargames/wargames.sh b/games/wargames/wargames.sh new file mode 100644 index 000000000..c8172a6c4 --- /dev/null +++ b/games/wargames/wargames.sh @@ -0,0 +1,52 @@ +#!/bin/sh - +# $NetBSD: wargames.sh,v 1.4 2001/09/19 04:54:06 lukem Exp $ +# +# Copyright (c) 1985, 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. +# +# @(#)wargames.sh 8.1 (Berkeley) 5/31/93 +# +echo -n "Would you like to play a game? " +read x + +x=`echo $x | sed 's/[^a-z0-9]//g'` + +if [ -f /usr/games/$x ] ; then + tput cl + exec /usr/games/$x +else + exec cat <