mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
* Fixed bad merge (that's why sail was broken).
git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5177 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
17
NEWS
17
NEWS
@@ -11,6 +11,21 @@ changes in installation instructions. Packagers should also reread
|
||||
the PACKAGING file each version (or do a diff between the old and new
|
||||
versions of the package and read that).
|
||||
|
||||
Version 2.13 (2001-08-30)
|
||||
============
|
||||
|
||||
* Warning now present in README about the inclusion of cryptographic
|
||||
software (caesar and rot13).
|
||||
|
||||
* Various minor improvements and bugfixes, some from NetBSD, some from
|
||||
OpenBSD, some from other contributors. Current with NetBSD CVS of
|
||||
2001-08-29.
|
||||
|
||||
* Some fixes to avoid some warnings when compiling with current glibc
|
||||
and GCC 3.
|
||||
|
||||
* May support GNU Hurd (untested).
|
||||
|
||||
Version 2.12 (2000-09-25)
|
||||
============
|
||||
|
||||
@@ -346,7 +361,7 @@ Version 1.3.1beta (1997-05-01)
|
||||
|
||||
* Now works with libc 5 ;-).
|
||||
|
||||
* Debian patches from Joey Hess <joeyh@debian.org> mostly
|
||||
* Debian patches from Joey Hess <joeyh@master.debian.org> mostly
|
||||
integrated up to Debian version 1.3-7.
|
||||
|
||||
* New ports of tetris and gomoku, thanks to David Frey
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com2.c,v 1.21 2000/09/25 19:37:58 jsm Exp $ */
|
||||
/* $NetBSD: com2.c,v 1.22 2001/06/02 17:30:28 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)com2.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: com2.c,v 1.21 2000/09/25 19:37:58 jsm Exp $");
|
||||
__RCSID("$NetBSD: com2.c,v 1.22 2001/06/02 17:30:28 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -54,7 +54,7 @@ wearit()
|
||||
while (wordnumber <= wordcount && (wordtype[wordnumber] == OBJECT ||
|
||||
wordtype[wordnumber] == NOUNS) && wordvalue[wordnumber] != DOOR) {
|
||||
value = wordvalue[wordnumber];
|
||||
if (objsht[value] == NULL)
|
||||
if (value >= 0 && objsht[value] == NULL)
|
||||
break;
|
||||
switch (value) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: bcd.6,v 1.11 1999/07/28 23:01:59 hubertf Exp $
|
||||
.\" $NetBSD: bcd.6,v 1.12 2001/06/05 12:41:04 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1988, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@@ -34,7 +34,7 @@
|
||||
.\" @(#)bcd.6 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt "BCD" 6
|
||||
.Dt BCD 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bcd ,
|
||||
@@ -50,7 +50,7 @@
|
||||
.Op Fl ds Ar string ...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm "bcd" ,
|
||||
.Nm bcd ,
|
||||
.Nm ppt
|
||||
and
|
||||
.Nm morse
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is read by configure and is used during the build of the
|
||||
# Debian package.
|
||||
|
||||
# Don't run configure interactively.
|
||||
bsd_games_cfg_non_interactive=y
|
||||
|
||||
|
||||
2
configure
vendored
2
configure
vendored
@@ -437,7 +437,7 @@ game_ask atc "Directory for atc static data" atc_dir "$sharedir/atc"
|
||||
game_ask atc "Score file for atc" atc_scorefile "$varlibdir/atc_score"
|
||||
game_ask battlestar "Score file for battlestar" battlestar_scorefile "$varlibdir/battlestar.log"
|
||||
# Bog has some other configuration
|
||||
game_ask boggle "Dictionary for boggle (CHECK ANSWER)" dictionary_src /usr/share/dict/american-english
|
||||
game_ask boggle "Dictionary for boggle (CHECK ANSWER)" dictionary_src /usr/share/dict/words
|
||||
game_ask boggle "Directory for boggle static data" boggle_dir "$sharedir/boggle"
|
||||
game_ask canfield "Score file for canfield" canfield_scorefile "$varlibdir/cfscores"
|
||||
game_ask cribbage "File for cribbage instructions" cribbage_instrfile "$sharedir/cribbage.instr"
|
||||
|
||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
||||
bsdgames (2.13-2) unstable; urgency=low
|
||||
|
||||
* Fixed bad merge (that's why sail was broken).
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 29 Dec 2001 13:37:00 -0500
|
||||
|
||||
bsdgames (2.13-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: hunt.6,v 1.3 1997/10/10 16:32:30 lukem Exp $
|
||||
.\" $NetBSD: hunt.6,v 1.4 2001/04/04 11:41:01 wiz Exp $
|
||||
.\"
|
||||
.\" hunt
|
||||
.\" Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
|
||||
@@ -8,98 +8,105 @@
|
||||
.\" All rights reserved. The Berkeley software License Agreement
|
||||
.\" specifies the terms and conditions for redistribution.
|
||||
.\"
|
||||
.TH HUNT 6 "21 August 1986"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
hunt \- a multi-player multi-terminal game
|
||||
.SH SYNOPSIS
|
||||
\fB@gamesdir@/hunt\fP [ \fB\-qmcsfbS\fP ] [ \fB\-n\fP name ] [ \fB\-t\fP team ] [ \fB\-p\fP port ] [ \fB\-w\fP message ] [ host ]
|
||||
.SH DESCRIPTION
|
||||
.Dd April 4, 2001
|
||||
.Dt HUNT 6
|
||||
.Sh NAME
|
||||
.Nm hunt
|
||||
.Nd a multi-player multi-terminal game
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl bcfmqSs
|
||||
.Op Fl n Ar name
|
||||
.Op Fl t Ar team
|
||||
.Op Fl p Ar port
|
||||
.Op Fl w Ar message
|
||||
.Op Ar host
|
||||
.Sh DESCRIPTION
|
||||
The object of the game
|
||||
.I hunt
|
||||
.Nm
|
||||
is to kill off the other players.
|
||||
There are no rooms, no treasures, and no monsters.
|
||||
Instead, you wander around a maze, find grenades, trip mines, and shoot down
|
||||
walls and players.
|
||||
The more players you kill before you die, the better your score is.
|
||||
If the
|
||||
.B \-m
|
||||
.Fl m
|
||||
flag is given,
|
||||
you enter the game as a monitor
|
||||
(you can see the action but you cannot play).
|
||||
.PP
|
||||
.I Hunt
|
||||
.Pp
|
||||
.Nm
|
||||
normally looks for an active game on the local network;
|
||||
if none is found, it starts one up on the local host.
|
||||
The location of the game may be specified by giving the
|
||||
.I host
|
||||
.Ar host
|
||||
argument.
|
||||
This presupposes that a hunt game is already running on that host, see
|
||||
.IR huntd (6)
|
||||
.Xr huntd 6
|
||||
for details on how to setup a game on a specific host.
|
||||
If more than one game if found,
|
||||
you may pick which game to play in.
|
||||
.PP
|
||||
.Pp
|
||||
If the
|
||||
.B \-q
|
||||
.Fl q
|
||||
flag is given,
|
||||
.I hunt
|
||||
.Nm
|
||||
queries the local network (or specific host)
|
||||
and reports on all active games found.
|
||||
This is useful for shell startup scripts, \fIe.g.\fP csh's .login.
|
||||
.PP
|
||||
This is useful for shell startup scripts, e.g.\&
|
||||
.Xr csh 1 Ns 's No .login .
|
||||
.Pp
|
||||
The player name may be specified on the command line by using the
|
||||
.B \-n
|
||||
.Fl n
|
||||
option.
|
||||
.PP
|
||||
.Pp
|
||||
The
|
||||
.BR \-c ,
|
||||
.BR \-s ,
|
||||
.Fl c ,
|
||||
.Fl s ,
|
||||
and
|
||||
.B \-f
|
||||
.Fl f
|
||||
options are for entering the game cloaked, scanning, or flying respectively.
|
||||
.PP
|
||||
.Pp
|
||||
The
|
||||
.B \-b
|
||||
.Fl b
|
||||
option turns off beeping when you reach the typeahead limit.
|
||||
.PP
|
||||
.Pp
|
||||
The
|
||||
.B \-t
|
||||
.Fl t
|
||||
option aids team playing by making everyone else on one's team
|
||||
appear as the team name.
|
||||
A team name is a single digit to avoid conflicting with other characters
|
||||
used in the game.
|
||||
.PP
|
||||
.Pp
|
||||
The
|
||||
.B \-p
|
||||
.I port
|
||||
.Fl p Ar port
|
||||
option allows the rendezvous port number to be set.
|
||||
This is a useful way for people playing on dialup lines to avoid playing
|
||||
with people on 9600 baud terminals.
|
||||
.PP
|
||||
.Pp
|
||||
The
|
||||
.B \-w
|
||||
.I message
|
||||
.Fl w Ar message
|
||||
option is the only way to send a message to everyone else's screen when
|
||||
you start up.
|
||||
It is most often used to say ``eat slime death - NickD's coming in''.
|
||||
.PP
|
||||
It is most often used to say
|
||||
.Dq eat slime death - NickD's coming in .
|
||||
.Pp
|
||||
When you die and are asked if you wish to re-enter the game,
|
||||
there are other answers than just yes or no.
|
||||
You can also reply with a
|
||||
.B w
|
||||
.Ic w
|
||||
for write a message before continuing or
|
||||
.B o
|
||||
.Ic o
|
||||
to change how you enter the game (cloaked, scanning, or flying).
|
||||
.PP
|
||||
.Pp
|
||||
To be notified automatically when a
|
||||
.I hunt
|
||||
.Nm
|
||||
starts up, add your login to the
|
||||
.I hunt-players
|
||||
.Em hunt-players
|
||||
mailing list (see
|
||||
.IR huntd (6)).
|
||||
.SH "PLAYING HINTS"
|
||||
.I Hunt
|
||||
.Xr huntd 6 ) .
|
||||
.Sh PLAYING HINTS
|
||||
.Nm
|
||||
only works on crt (vdt) terminals with at least 24 lines, 80 columns, and
|
||||
cursor addressing.
|
||||
The screen is divided in to 3 areas.
|
||||
@@ -108,273 +115,288 @@ It shows damage sustained,
|
||||
charges remaining,
|
||||
who's in the game,
|
||||
who's scanning (the
|
||||
.B ``*''
|
||||
.Dq *
|
||||
in front of the name),
|
||||
who's cloaked (the
|
||||
.B ``+''
|
||||
.Dq +
|
||||
in front of the name),
|
||||
and other players' scores.
|
||||
The rest of the screen is taken up by your map of the maze.
|
||||
The 24th line
|
||||
is used for longer messages that don't fit in the status area.
|
||||
.PP
|
||||
.I Hunt
|
||||
.Pp
|
||||
.Nm
|
||||
uses the same keys to move as
|
||||
.IR vi (1)
|
||||
does,
|
||||
.IR i.e. ,
|
||||
.BR h ,
|
||||
.BR j ,
|
||||
.BR k ,
|
||||
.Xr vi 1
|
||||
does, i.e.,
|
||||
.Ic h ,
|
||||
.Ic j ,
|
||||
.Ic k ,
|
||||
and
|
||||
.B l
|
||||
.Ic l
|
||||
for left, down, up, right respectively.
|
||||
To change which direction you're facing in the maze,
|
||||
use the upper case version of the movement key (\c
|
||||
.IR i.e. ,
|
||||
.BR HJKL ).
|
||||
use the upper case version of the movement key (i.e.,
|
||||
.Ic HJKL ) .
|
||||
You can only fire or throw things in the direction you're facing.
|
||||
.TP
|
||||
.Bl -tag -width xxxxxxx
|
||||
Other commands are:
|
||||
.sp
|
||||
.nf
|
||||
.ta
|
||||
.ta \w'>\|<\|^\|v\ \ 'u
|
||||
f or 1 \- Fire a bullet (Takes 1 charge)
|
||||
g or 2 \- Throw grenade (Takes 9 charges)
|
||||
F or 3 \- Throw satchel charge (Takes 25 charges)
|
||||
G or 4 \- Throw bomb (Takes 49 charges)
|
||||
5 \- Throw big bomb (Takes 81 charges)
|
||||
6 \- Throw even bigger bomb (Takes 121 charges)
|
||||
7 \- Throw even more big bomb (Takes 169 charges)
|
||||
8 \- Throw even more bigger bomb (Takes 225 charges)
|
||||
9 \- Throw very big bomb (Takes 289 charges)
|
||||
0 \- Throw very, very big bomb (Takes 361 charges)
|
||||
@ \- Throw biggest bomb (Takes 441 charges)
|
||||
o \- Throw small slime (Takes 5 charges)
|
||||
O \- Throw big slime (Takes 10 charges)
|
||||
p \- Throw bigger slime (Takes 15 charges)
|
||||
P \- Throw biggest slime (Takes 20 charges)
|
||||
s \- Scan (show where other players are) (Takes 1 charge)
|
||||
c \- Cloak (hide from scanners) (Takes 1 charge)
|
||||
|
||||
^L \- Redraw screen
|
||||
q \- Quit
|
||||
.fi
|
||||
.TP
|
||||
.It Ic f No or Ic 1
|
||||
Fire a bullet (Takes 1 charge)
|
||||
.It Ic g No or Ic 2
|
||||
Throw grenade (Takes 9 charges)
|
||||
.It Ic F No or Ic 3
|
||||
Throw satchel charge (Takes 25 charges)
|
||||
.It Ic G No or Ic 4
|
||||
Throw bomb (Takes 49 charges)
|
||||
.It Ic 5
|
||||
Throw big bomb (Takes 81 charges)
|
||||
.It Ic 6
|
||||
Throw even bigger bomb (Takes 121 charges)
|
||||
.It Ic 7
|
||||
Throw even more big bomb (Takes 169 charges)
|
||||
.It Ic 8
|
||||
Throw even more bigger bomb (Takes 225 charges)
|
||||
.It Ic 9
|
||||
Throw very big bomb (Takes 289 charges)
|
||||
.It Ic 0
|
||||
Throw very, very big bomb (Takes 361 charges)
|
||||
.It Ic @
|
||||
Throw biggest bomb (Takes 441 charges)
|
||||
.It Ic o
|
||||
Throw small slime (Takes 5 charges)
|
||||
.It Ic O
|
||||
Throw big slime (Takes 10 charges)
|
||||
.It Ic p
|
||||
Throw bigger slime (Takes 15 charges)
|
||||
.It Ic P
|
||||
Throw biggest slime (Takes 20 charges)
|
||||
.It Ic s
|
||||
Scan (show where other players are) (Takes 1 charge)
|
||||
.It Ic c
|
||||
Cloak (hide from scanners) (Takes 1 charge)
|
||||
.It Ic ^L
|
||||
Redraw screen
|
||||
.It Ic q
|
||||
Quit
|
||||
.El
|
||||
.Pp
|
||||
The symbols on the screen are:
|
||||
.sp
|
||||
.nf
|
||||
.ta
|
||||
.ta \w'>\|<\|^\|v\ \ 'u
|
||||
\-\||\|+ \- walls
|
||||
/\|\\ \- diagonal (deflecting) walls
|
||||
# \- doors (dispersion walls)
|
||||
; \- small mine
|
||||
g \- large mine
|
||||
: \- bullet
|
||||
o \- grenade
|
||||
O \- satchel charge
|
||||
@ \- bomb
|
||||
s \- small slime
|
||||
$ \- big slime
|
||||
>\|<\|^\|v \- you facing right, left, up, or down
|
||||
}\|{\|i\|! \- other players facing right, left, up, or down
|
||||
\(** \- explosion
|
||||
.ne 3
|
||||
.cs R 24
|
||||
.cs I 24
|
||||
\fR\\|/\fP
|
||||
.cs R
|
||||
\fI\-\(**\-\fP \- grenade and large mine explosion
|
||||
.fl
|
||||
.cs R 24
|
||||
\fR/|\\\fP
|
||||
.cs R
|
||||
.cs I
|
||||
.fi
|
||||
.LP
|
||||
.Bl -tag -width xxxxx -compact -offset indent
|
||||
.It -|+
|
||||
walls
|
||||
.It /\e
|
||||
diagonal (deflecting) walls
|
||||
.It #
|
||||
doors (dispersion walls)
|
||||
.It ;
|
||||
small mine
|
||||
.It g
|
||||
large mine
|
||||
.It :
|
||||
bullet
|
||||
.It o
|
||||
grenade
|
||||
.It O
|
||||
satchel charge
|
||||
.It @
|
||||
bomb
|
||||
.It s
|
||||
small slime
|
||||
.It $
|
||||
big slime
|
||||
.It ><^v
|
||||
you facing right, left, up, or down
|
||||
.It }{i!
|
||||
other players facing right, left, up, or down
|
||||
.It *
|
||||
explosion
|
||||
.It \e|/
|
||||
.It -*-
|
||||
grenade and large mine explosion
|
||||
.It /|\e
|
||||
.El
|
||||
.Pp
|
||||
Other helpful hints:
|
||||
.sp
|
||||
.ie n .ds b []
|
||||
.el .ds b \(bu
|
||||
.ta
|
||||
.ta \w'\*b\ \|'u
|
||||
.nr In \n(.i
|
||||
.de MP
|
||||
.br
|
||||
.in \n(Inu+\w'\*b\ \|'u
|
||||
.ti \n(Inu
|
||||
\*b \c
|
||||
..
|
||||
.MP
|
||||
.Bl -bullet
|
||||
.It
|
||||
You can only fire in the direction you are facing.
|
||||
.MP
|
||||
.It
|
||||
You can only fire three shots in a row, then the gun must cool off.
|
||||
.MP
|
||||
.It
|
||||
Shots move 5 times faster than you do.
|
||||
.MP
|
||||
.It
|
||||
To stab someone,
|
||||
you face that player and move at them.
|
||||
.MP
|
||||
.It
|
||||
Stabbing does 2 points worth of damage and shooting does 5 points.
|
||||
.MP
|
||||
.It
|
||||
Slime does 5 points of damage each time it hits.
|
||||
.MP
|
||||
.It
|
||||
You start with 15 charges and get 5 more every time a player enters
|
||||
or re-enters.
|
||||
.MP
|
||||
.It
|
||||
Grenade explosions cover a 3 by 3 area, each larger bomb cover a
|
||||
correspondingly larger area (ranging from 5 by 5 to 21 by 21).
|
||||
All explosions are centered around the square the shot hits and
|
||||
do the most damage in the center.
|
||||
.MP
|
||||
.It
|
||||
Slime affects all squares it oozes over.
|
||||
The number of squares is equal to the number of charges used.
|
||||
.MP
|
||||
.It
|
||||
One small mine and one large mine is placed in the maze for every new player.
|
||||
A mine has a 2% probability of tripping when you walk forward on to it;
|
||||
50% when going sideways;
|
||||
95% when backing up.
|
||||
Tripping a mine costs you 5 points or 10 points respectively.
|
||||
Defusing a mine is worth 1 charge or 9 charges respectively.
|
||||
.MP
|
||||
.It
|
||||
You cannot see behind you.
|
||||
.MP
|
||||
.It
|
||||
Cloaking consumes 1 ammo charge per 20 of your moves.
|
||||
.MP
|
||||
.It
|
||||
Scanning consumes 1 ammo charge per (20 \(mu the number of players)
|
||||
of other player moves.
|
||||
.MP
|
||||
.It
|
||||
Turning on cloaking turns off scanning \(em turning on scanning turns off
|
||||
cloaking.
|
||||
.MP
|
||||
.It
|
||||
When you kill someone,
|
||||
you get 2 more damage capacity points and 2 damage points get taken away.
|
||||
.MP
|
||||
.It
|
||||
Maximum typeahead is 5 characters.
|
||||
.MP
|
||||
A shot destroys normal (\c
|
||||
.IR i.e.,
|
||||
non-diagonal, non-door) walls.
|
||||
.MP
|
||||
.It
|
||||
A shot destroys normal (i.e., non-diagonal, non-door) walls.
|
||||
.It
|
||||
Diagonal walls deflect shots and change orientation.
|
||||
.MP
|
||||
.It
|
||||
Doors disperse shots in random directions (up, down, left, right).
|
||||
.MP
|
||||
.It
|
||||
Diagonal walls and doors cannot be destroyed by direct shots but may
|
||||
be destroyed by an adjacent grenade explosion.
|
||||
.MP
|
||||
.It
|
||||
Slime goes around walls, not through them.
|
||||
.MP
|
||||
.It
|
||||
Walls regenerate, reappearing in the order they were destroyed.
|
||||
One percent of the regenerated walls will be diagonal walls or doors.
|
||||
When a wall is generated directly beneath a player, he is thrown in
|
||||
a random direction for a random period of time. When he lands, he
|
||||
sustains damage (up to 20 percent of the amount of damage already
|
||||
sustained);
|
||||
.IR i.e. ,
|
||||
sustained); i.e.,
|
||||
the less damage he had, the more nimble he is and
|
||||
therefore less likely to hurt himself on landing.
|
||||
.\"MP
|
||||
.\"There is a volcano close to the center of the maze which goes off
|
||||
.\"close to every 30 deaths.
|
||||
.MP
|
||||
.It
|
||||
Every 30 deaths or so, a
|
||||
.B ``?''
|
||||
.Dq ?
|
||||
will appear.
|
||||
It is a wandering bomb which will explode when it hits someone, or
|
||||
when it is slimed.
|
||||
.MP
|
||||
.It
|
||||
If no one moves, everything stands still.
|
||||
.MP
|
||||
.It
|
||||
The environment variable
|
||||
.B HUNT
|
||||
.Ev HUNT
|
||||
is checked to get the player name.
|
||||
If you don't have this variable set,
|
||||
.I hunt
|
||||
.Nm
|
||||
will ask you what name you want to play under.
|
||||
If you wish to set other options than just your name,
|
||||
you can enumerate the options as follows:
|
||||
.br
|
||||
.ti +1i
|
||||
setenv HUNT "name=Sneaky,team=1,cloak,mapkey=zoFfGg1f2g3F4G"
|
||||
.br
|
||||
.Dl setenv HUNT "name=Sneaky,team=1,cloak,mapkey=zoFfGg1f2g3F4G"
|
||||
sets the player name to Sneaky,
|
||||
sets the team to one,
|
||||
sets the enter game attribute to cloaked,
|
||||
and the maps \fBz\fP to \fBo\fP, \fBF\fP to \fBf\fP, \fBG\fP to \fBg\fP,
|
||||
\fB1\fP to \fBf\fP,
|
||||
\fB2\fP to \fBg\fP, \fB3\fP to \fBF\fP, and \fB4\fP to \fBG\fP.
|
||||
The \fImapkey\fP option must be last.
|
||||
Other options are: scan, fly, nobeep, port=string, host=string,
|
||||
and message=string \(em which correspond to the command line options.
|
||||
and the maps
|
||||
.Ic z
|
||||
to
|
||||
.Ic o , F
|
||||
to
|
||||
.Ic f , G
|
||||
to
|
||||
.Ic g , 1
|
||||
to
|
||||
.Ic f , 2
|
||||
to
|
||||
.Ic g , 3
|
||||
to
|
||||
.Ic F ,
|
||||
and
|
||||
.Ic 4
|
||||
to
|
||||
.Ic G .
|
||||
The
|
||||
.Ar mapkey
|
||||
option must be last.
|
||||
Other options are:
|
||||
.Ar scan , fly , nobeep , port=string , host=string ,
|
||||
and
|
||||
.Ar message=string
|
||||
\(em which correspond to the command line options.
|
||||
String options cannot contain commas since commas
|
||||
are used to separate options.
|
||||
.MP
|
||||
.It
|
||||
It's a boring game if you're the only one playing.
|
||||
.PP
|
||||
.El
|
||||
.Pp
|
||||
Your score is the decayed average of the ratio of number of kills to number
|
||||
of times you entered the game and is only kept for the duration
|
||||
of a single session of \fIhunt\fP.
|
||||
.PP
|
||||
.I Hunt
|
||||
of a single session of
|
||||
.Nm .
|
||||
.Pp
|
||||
.Nm
|
||||
normally drives up the load average to be approximately
|
||||
(number_of_players + 0.5) greater than it would be without a
|
||||
.I hunt
|
||||
.Nm
|
||||
game executing.
|
||||
.SH STATISTICS
|
||||
.Sh STATISTICS
|
||||
The
|
||||
.B \-S
|
||||
.Fl S
|
||||
option fetches the current game statistics.
|
||||
The meaning of the column headings are as follows:
|
||||
.I score
|
||||
\(em the player's last score;
|
||||
.I ducked
|
||||
\(em
|
||||
how many shots a player ducked;
|
||||
.I absorb
|
||||
\(em how many shots a player absorbed;
|
||||
.I faced
|
||||
\(em how many shots were fired at player's face;
|
||||
.I shot
|
||||
\(em how many shots were fired at player;
|
||||
.I robbed
|
||||
\(em how many of player's shots were absorbed;
|
||||
.I missed
|
||||
\(em how many of player's shots were ducked;
|
||||
.I slimeK
|
||||
\(em how many slime kills player had;
|
||||
.I enemy
|
||||
\(em how many enemies were killed;
|
||||
.I friend
|
||||
\(em how many friends were killed (self and same team);
|
||||
.I deaths
|
||||
\(em how many times player died;
|
||||
.I still
|
||||
\(em how many times player died without typing in any commands;
|
||||
.I saved
|
||||
\(em how many times a shot/bomb would have killed player if he hadn't
|
||||
.Bl -tag -width ducked
|
||||
.It score
|
||||
the player's last score
|
||||
.It ducked
|
||||
how many shots a player ducked
|
||||
.It absorb
|
||||
how many shots a player absorbed
|
||||
.It faced
|
||||
how many shots were fired at player's face
|
||||
.It shot
|
||||
how many shots were fired at player
|
||||
.It robbed
|
||||
how many of player's shots were absorbed
|
||||
.It missed
|
||||
how many of player's shots were ducked
|
||||
.It slimeK
|
||||
how many slime kills player had
|
||||
.It enemy
|
||||
how many enemies were killed
|
||||
.tI friend
|
||||
how many friends were killed (self and same team)
|
||||
.It deaths
|
||||
how many times player died
|
||||
.It still
|
||||
how many times player died without typing in any commands
|
||||
.It saved
|
||||
how many times a shot/bomb would have killed player if he hadn't
|
||||
ducked or absorbed it.
|
||||
.SH FILES
|
||||
.nf
|
||||
.ta
|
||||
.ta \w'@sbindir@/huntd\ \ \ 'u
|
||||
@sbindir@/huntd game coordinator
|
||||
.DT
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
huntd(6)
|
||||
.SH AUTHORS
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr huntd 6
|
||||
.Sh AUTHORS
|
||||
Conrad Huang, Ken Arnold, and Greg Couch;
|
||||
.br
|
||||
University of California, San Francisco, Computer Graphics Lab
|
||||
.SH ACKNOWLEDGEMENTS
|
||||
.Sh ACKNOWLEDGEMENTS
|
||||
We thank Don Kneller,
|
||||
John Thomason, Eric Pettersen, Mark Day,
|
||||
and Scott Weiner for providing
|
||||
endless hours of play-testing to improve the character of the game.
|
||||
We hope their significant others will forgive them;
|
||||
we certainly don't.
|
||||
.SH BUGS
|
||||
.Sh BUGS
|
||||
To keep up the pace, not everything is as realistic as possible.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hunt.c,v 1.11 2000/04/14 05:58:03 simonb Exp $ */
|
||||
/* $NetBSD: hunt.c,v 1.12 2001/02/05 00:40:45 christos Exp $ */
|
||||
/*
|
||||
* Hunt
|
||||
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: hunt.c,v 1.11 2000/04/14 05:58:03 simonb Exp $");
|
||||
__RCSID("$NetBSD: hunt.c,v 1.12 2001/02/05 00:40:45 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
# include <sys/param.h>
|
||||
@@ -52,6 +52,10 @@ static struct termios saved_tty;
|
||||
extern int _putchar();
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#endif
|
||||
|
||||
FLAG Last_player = FALSE;
|
||||
# ifdef MONITOR
|
||||
FLAG Am_monitor = FALSE;
|
||||
@@ -94,6 +98,7 @@ int main __P((int, char *[]));
|
||||
SOCKET *list_drivers __P((void));
|
||||
# endif
|
||||
|
||||
extern int Otto_mode;
|
||||
/*
|
||||
* main:
|
||||
* Main program for local process
|
||||
@@ -105,7 +110,6 @@ main(ac, av)
|
||||
{
|
||||
char *term;
|
||||
int c;
|
||||
extern int Otto_mode;
|
||||
long enter_status;
|
||||
|
||||
/* Revoke setgid privileges */
|
||||
@@ -393,11 +397,7 @@ list_drivers()
|
||||
static SOCKET test;
|
||||
int test_socket;
|
||||
int namelen;
|
||||
# ifdef MAXHOSTNAMELEN
|
||||
char local_name[MAXHOSTNAMELEN + 1];
|
||||
# else
|
||||
char local_name[] = "127.0.0.1";
|
||||
# endif
|
||||
static int initial = TRUE;
|
||||
static struct in_addr local_address;
|
||||
struct hostent *hp;
|
||||
@@ -418,13 +418,11 @@ list_drivers()
|
||||
# ifndef BROADCAST
|
||||
sethostent(1); /* don't bother to close host file */
|
||||
# endif
|
||||
# ifdef MAXHOSTNAMELEN
|
||||
if (gethostname(local_name, sizeof local_name) < 0) {
|
||||
leave(1, "Sorry, I have no name.");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
local_name[sizeof(local_name) - 1] = '\0';
|
||||
# endif
|
||||
if ((hp = gethostbyname(local_name)) == NULL) {
|
||||
leave(1, "Can't find myself.");
|
||||
/* NOTREACHED */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: get_names.c,v 1.4 2000/07/03 03:57:41 matt Exp $ */
|
||||
/* $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
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: get_names.c,v 1.4 2000/07/03 03:57:41 matt Exp $");
|
||||
__RCSID("$NetBSD: get_names.c,v 1.6 2001/02/05 00:42:15 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "bsd.h"
|
||||
@@ -23,10 +23,9 @@ __RCSID("$NetBSD: get_names.c,v 1.4 2000/07/03 03:57:41 matt Exp $");
|
||||
# include "hunt.h"
|
||||
# include "talk_ctl.h"
|
||||
|
||||
extern CTL_MSG msg;
|
||||
|
||||
/* according to SUSv2, hostnames can't be longer then 256 characters */
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#endif
|
||||
|
||||
static char hostname[MAXHOSTNAMELEN + 1];
|
||||
char *my_machine_name;
|
||||
@@ -62,8 +61,13 @@ get_local_name(my_name)
|
||||
/* look up the address of the local host */
|
||||
hp = gethostbyname(my_machine_name);
|
||||
if (hp == (struct hostent *) 0) {
|
||||
printf("This machine doesn't exist. Boy, am I confused!\n");
|
||||
exit(-1);
|
||||
# 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 */
|
||||
@@ -78,7 +82,7 @@ get_local_name(my_name)
|
||||
# else
|
||||
perror("This machine doesn't support talk");
|
||||
# endif
|
||||
exit(-1);
|
||||
exit(1);
|
||||
}
|
||||
daemon_port = sp->s_port;
|
||||
}
|
||||
|
||||
@@ -6,3 +6,12 @@ a.out
|
||||
phantasia
|
||||
setup
|
||||
pathnames.h
|
||||
gold
|
||||
lastdead
|
||||
mess
|
||||
monsters
|
||||
motd
|
||||
void
|
||||
scoreboard
|
||||
characs
|
||||
scorefiles.stamp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefrag - makefile fragment for phantasia
|
||||
#
|
||||
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
|
||||
# Copyright (c) 1997, 1998, 1999, 2001 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -27,16 +27,25 @@
|
||||
# SUCH DAMAGE.
|
||||
|
||||
phantasia_DIRS := $(GAMESDIR) $(MAN6DIR) $(PHANTASIA_DIR)
|
||||
phantasia_VFILES := gold lastdead mess monsters motd scoreboard void
|
||||
phantasia_DEFS := -D_GNU_SOURCE
|
||||
phantasia_VFILES1 := gold lastdead mess monsters motd void
|
||||
phantasia_VFILES2 := scoreboard characs
|
||||
phantasia_CLEANFILES := $(phantasia_VFILES1) $(phantasia_VFILES2) scorefiles.stamp
|
||||
|
||||
phantasia_all: phantasia/phantasia phantasia/setup phantasia/monsters.asc phantasia/phantasia.6
|
||||
phantasia_all: phantasia/phantasia phantasia/phantasia.6 phantasia/scorefiles.stamp
|
||||
|
||||
phantasia/scorefiles.stamp: phantasia/setup phantasia/monsters.asc
|
||||
cd phantasia && ./setup -m monsters.asc
|
||||
touch phantasia/scorefiles.stamp
|
||||
|
||||
phantasia_install: phantasia_all
|
||||
$(INSTALL_SCORE_GAME) phantasia/phantasia $(INSTALL_PREFIX)$(GAMESDIR)/phantasia
|
||||
$(HIDE_GAME) phantasia
|
||||
DESTDIR=$(INSTALL_PREFIX) phantasia/setup -m phantasia/monsters.asc
|
||||
(set -e; for f in $(phantasia_VFILES); do $(INSTALL_SCORE_FILE) \
|
||||
$(PHANTASIA_DIR)/$$f; done; \
|
||||
(set -e; for f in $(phantasia_VFILES1); do \
|
||||
cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \
|
||||
$(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/$$f; done)
|
||||
(set -e; for f in $(phantasia_VFILES2); do \
|
||||
if [ ! -e $(PHANTASIA_DIR)/$$f ]; then \
|
||||
cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; fi; done; \
|
||||
$(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/scoreboard; \
|
||||
$(INSTALL_SCORE_FILE) -p $(PHANTASIA_DIR)/characs)
|
||||
$(INSTALL_MANUAL) phantasia/phantasia.6
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/* $NetBSD: setup.c,v 1.10 1999/09/19 18:14:52 jsm Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.11 2001/03/27 02:23:28 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* setup.c - set up all files for Phantasia
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -64,16 +63,12 @@ main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
register const char *const *filename; /* for pointing to file names */
|
||||
register int fd; /* file descriptor */
|
||||
FILE *fp; /* for opening files */
|
||||
const char *const *filename; /* for pointing to file names */
|
||||
int fd; /* file descriptor */
|
||||
FILE *fp; /* for opening files */
|
||||
struct stat fbuf; /* for getting files statistics */
|
||||
int ch;
|
||||
#if defined(__GLIBC__)
|
||||
char *path, *prefix;
|
||||
#else
|
||||
char path[MAXPATHLEN], *prefix;
|
||||
#endif
|
||||
char *path;
|
||||
|
||||
while ((ch = getopt(argc, argv, "m:")) != -1)
|
||||
switch(ch) {
|
||||
@@ -91,39 +86,15 @@ main(argc, argv)
|
||||
|
||||
umask(0117); /* only owner can read/write created files */
|
||||
|
||||
prefix = getenv("DESTDIR");
|
||||
|
||||
/* try to create data files */
|
||||
filename = &files[0];
|
||||
while (*filename != NULL)
|
||||
/* create each file */
|
||||
{
|
||||
#if defined(__GLIBC__)
|
||||
path = NULL;
|
||||
asprintf(&path, "%s%s", prefix?prefix:"", *filename);
|
||||
if (!path)
|
||||
Error ("Not enough memory to store filename.", "");
|
||||
/*NOTREACHED*/
|
||||
#else
|
||||
snprintf(path, sizeof(path), "%s%s", prefix?prefix:"", *filename);
|
||||
#endif
|
||||
path = strrchr(*filename, '/') + 1;
|
||||
if (stat(path, &fbuf) == 0)
|
||||
/* file exists; remove it */
|
||||
{
|
||||
if (!strcmp(*filename, _PATH_PEOPLE))
|
||||
/* do not reset character file if it already exists */
|
||||
{
|
||||
++filename;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(*filename, _PATH_SCORE))
|
||||
/* do not reset score file if it already exists */
|
||||
{
|
||||
++filename;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (unlink(path) < 0)
|
||||
Error("Cannot unlink %s.\n", path);
|
||||
/*NOTREACHED*/
|
||||
@@ -136,24 +107,13 @@ main(argc, argv)
|
||||
close(fd); /* close newly created file */
|
||||
|
||||
++filename; /* process next file */
|
||||
#if defined(__GLIBC__)
|
||||
free (path);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* put holy grail info into energy void file */
|
||||
Enrgyvoid.ev_active = TRUE;
|
||||
Enrgyvoid.ev_x = ROLL(-1.0e6, 2.0e6);
|
||||
Enrgyvoid.ev_y = ROLL(-1.0e6, 2.0e6);
|
||||
#if defined(__GLIBC__)
|
||||
path = NULL;
|
||||
asprintf (&path, "%s%s", prefix?prefix:"", _PATH_VOID);
|
||||
if (!path)
|
||||
Error ("Not enough memory to store filename.", "");
|
||||
/*NOTREACHED*/
|
||||
#else
|
||||
snprintf(path, sizeof(path), "%s%s", prefix?prefix:"", _PATH_VOID);
|
||||
#endif
|
||||
path = strrchr(_PATH_VOID, '/') + 1;
|
||||
if ((fp = fopen(path, "w")) == NULL)
|
||||
Error("Cannot update %s.\n", path);
|
||||
else
|
||||
@@ -164,20 +124,9 @@ main(argc, argv)
|
||||
Error("Writing %s.\n", path);
|
||||
fclose(fp);
|
||||
}
|
||||
#if defined(__GLIBC__)
|
||||
free (path);
|
||||
#endif
|
||||
|
||||
/* create binary monster data base */
|
||||
#if defined(__GLIBC__)
|
||||
path = NULL;
|
||||
asprintf (&path, "%s%s", prefix?prefix:"", _PATH_MONST);
|
||||
if (!path)
|
||||
Error ("Not enough memory to store filename.", "");
|
||||
/*NOTREACHED*/
|
||||
#else
|
||||
snprintf(path, sizeof(path), "%s%s", prefix?prefix:"", _PATH_MONST);
|
||||
#endif
|
||||
path = strrchr(_PATH_MONST, '/') + 1;
|
||||
if ((Monstfp = fopen(path, "w")) == NULL)
|
||||
Error("Cannot update %s.\n", path);
|
||||
else
|
||||
@@ -215,24 +164,13 @@ main(argc, argv)
|
||||
fclose(Monstfp);
|
||||
}
|
||||
}
|
||||
#if defined(__GLIBC__)
|
||||
free (path);
|
||||
#endif
|
||||
|
||||
#ifdef MAKE_INSTALLS_THIS_AND_DOESNT_WANT_TO_HEAR_ABOUT_IT
|
||||
/* write to motd file */
|
||||
printf("One line 'motd' ? ");
|
||||
if (fgets(Databuf, SZ_DATABUF, stdin) == NULL)
|
||||
Databuf[0] = '\0';
|
||||
#if defined(__GLIBC__)
|
||||
path = NULL;
|
||||
asprintf (&path, "%s%s", prefix?prefix:"", _PATH_MOTD);
|
||||
if (!path)
|
||||
Error ("Not enough memory to store filename.", "");
|
||||
/*NOTREACHED*/
|
||||
#else
|
||||
snprintf(path, sizeof(path), "%s%s", prefix?prefix:"", _PATH_MOTD);
|
||||
#endif
|
||||
path = strrchr(_PATH_MOTD, '/') + 1;
|
||||
if ((fp = fopen(path, "w")) == NULL)
|
||||
Error("Cannot update %s.\n", path);
|
||||
else
|
||||
@@ -240,9 +178,6 @@ main(argc, argv)
|
||||
fwrite(Databuf, sizeof(char), strlen(Databuf), fp);
|
||||
fclose(fp);
|
||||
}
|
||||
#if defined(__GLIBC__)
|
||||
free (path);
|
||||
#endif
|
||||
|
||||
/* report compile-time options */
|
||||
printf("Compiled options:\n\n");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $ */
|
||||
/* $NetBSD: main.c,v 1.17 2001/02/05 01:02:45 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.17 2001/02/05 01:02:45 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -51,6 +51,9 @@ __RCSID("$NetBSD: main.c,v 1.16 2000/05/08 07:56:05 mycroft Exp $");
|
||||
|
||||
int main __P((int, char **));
|
||||
|
||||
extern const char *Scorefile;
|
||||
extern int Max_per_uid;
|
||||
|
||||
int
|
||||
main(ac, av)
|
||||
int ac;
|
||||
@@ -59,8 +62,6 @@ main(ac, av)
|
||||
const char *sp;
|
||||
bool bad_arg;
|
||||
bool show_only;
|
||||
extern const char *Scorefile;
|
||||
extern int Max_per_uid;
|
||||
int score_wfd; /* high score writable file descriptor */
|
||||
int score_err = 0; /* hold errno from score file open */
|
||||
|
||||
|
||||
138
sail/sync.c
138
sail/sync.c
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sync.c,v 1.14 2000/02/09 22:27:56 jsm Exp $ */
|
||||
/* $NetBSD: sync.c,v 1.20 2001/02/05 01:10:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@@ -38,31 +38,28 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)sync.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: sync.c,v 1.14 2000/02/09 22:27:56 jsm Exp $");
|
||||
__RCSID("$NetBSD: sync.c,v sync.c,v 1.20 2001/02/05 01:10:11 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#ifdef __STDC__
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include "extern.h"
|
||||
#include "pathnames.h"
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
#define BUFSIZE 4096
|
||||
|
||||
int sync_update(type, ship, astr, a, b, c, d);
|
||||
static int sync_update(int, struct ship *, const char *, long, long, long, long);
|
||||
|
||||
static const char SF[] = _PATH_SYNC;
|
||||
static const char LF[] = _PATH_LOCK;
|
||||
@@ -74,11 +71,7 @@ static long sync_seek;
|
||||
static FILE *sync_fp;
|
||||
|
||||
void
|
||||
fmtship(buf, len, fmt, ship)
|
||||
char *buf;
|
||||
size_t len;
|
||||
const char *fmt;
|
||||
struct ship *ship;
|
||||
fmtship(char *buf, size_t len, const char *fmt, struct ship *ship)
|
||||
{
|
||||
while (*fmt) {
|
||||
if (len-- == 0) {
|
||||
@@ -103,78 +96,50 @@ fmtship(buf, len, fmt, ship)
|
||||
|
||||
/*VARARGS3*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
makesignal(struct ship *from, const char *fmt, struct ship *ship, ...)
|
||||
#else
|
||||
makesignal(va_alias)
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
char message[BUFSIZ];
|
||||
char format[BUFSIZ];
|
||||
va_list ap;
|
||||
#ifndef __STDC__
|
||||
struct ship *from;
|
||||
const char *fmt;
|
||||
struct ship *ship;
|
||||
|
||||
va_start(ap);
|
||||
from = va_arg(ap, struct ship *);
|
||||
fmt = va_arg(ap, const char *);
|
||||
ship = va_arg(ap, struct ship *);
|
||||
#else
|
||||
va_start(ap, ship);
|
||||
#endif
|
||||
fmtship(format, sizeof(format), fmt, ship);
|
||||
(void) vsprintf(message, format, ap);
|
||||
vsprintf(message, format, ap);
|
||||
va_end(ap);
|
||||
Writestr(W_SIGNAL, from, message);
|
||||
}
|
||||
|
||||
/*VARARGS2*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
makemsg(struct ship *from, const char *fmt, ...)
|
||||
#else
|
||||
makemsg(va_alias)
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
char message[BUFSIZ];
|
||||
va_list ap;
|
||||
#ifndef __STDC__
|
||||
struct ship *from;
|
||||
const char *fmt;
|
||||
|
||||
va_start(ap);
|
||||
from = va_arg(ap, struct ship *);
|
||||
fmt = va_arg(ap, const char *);
|
||||
#else
|
||||
va_start(ap, fmt);
|
||||
#endif
|
||||
(void) vsprintf(message, fmt, ap);
|
||||
vsprintf(message, fmt, ap);
|
||||
va_end(ap);
|
||||
Writestr(W_SIGNAL, from, message);
|
||||
}
|
||||
|
||||
int
|
||||
sync_exists(game)
|
||||
int game;
|
||||
sync_exists(int game)
|
||||
{
|
||||
char buf[sizeof sync_file];
|
||||
struct stat s;
|
||||
time_t t;
|
||||
|
||||
(void) sprintf(buf, SF, game);
|
||||
(void) time(&t);
|
||||
sprintf(buf, SF, game);
|
||||
time(&t);
|
||||
setegid(egid);
|
||||
if (stat(buf, &s) < 0) {
|
||||
setegid(gid);
|
||||
return 0;
|
||||
}
|
||||
if (s.st_mtime < t - 60*60*2) { /* 2 hours */
|
||||
(void) unlink(buf);
|
||||
(void) sprintf(buf, LF, game);
|
||||
(void) unlink(buf);
|
||||
unlink(buf);
|
||||
sprintf(buf, LF, game);
|
||||
unlink(buf);
|
||||
setegid(gid);
|
||||
return 0;
|
||||
} else {
|
||||
@@ -184,18 +149,18 @@ sync_exists(game)
|
||||
}
|
||||
|
||||
int
|
||||
sync_open()
|
||||
sync_open(void)
|
||||
{
|
||||
struct stat tmp;
|
||||
if (sync_fp != NULL)
|
||||
(void) fclose(sync_fp);
|
||||
(void) sprintf(sync_lock, LF, game);
|
||||
(void) sprintf(sync_file, SF, game);
|
||||
fclose(sync_fp);
|
||||
sprintf(sync_lock, LF, game);
|
||||
sprintf(sync_file, SF, game);
|
||||
setegid(egid);
|
||||
if (stat(sync_file, &tmp) < 0) {
|
||||
mode_t omask = umask(002);
|
||||
sync_fp = fopen(sync_file, "w+");
|
||||
(void) umask(omask);
|
||||
umask(omask);
|
||||
} else
|
||||
sync_fp = fopen(sync_file, "r+");
|
||||
setegid(gid);
|
||||
@@ -206,54 +171,45 @@ sync_open()
|
||||
}
|
||||
|
||||
void
|
||||
sync_close(remove)
|
||||
char remove;
|
||||
sync_close(int remove)
|
||||
{
|
||||
if (sync_fp != 0)
|
||||
(void) fclose(sync_fp);
|
||||
fclose(sync_fp);
|
||||
if (remove) {
|
||||
setegid(egid);
|
||||
(void) unlink(sync_file);
|
||||
unlink(sync_file);
|
||||
setegid(gid);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Write(type, ship, a, b, c, d)
|
||||
int type;
|
||||
struct ship *ship;
|
||||
long a, b, c, d;
|
||||
Write(int type, struct ship *ship, long a, long b, long c, long d)
|
||||
{
|
||||
|
||||
(void) sprintf(sync_bp, "%d %d 0 %ld %ld %ld %ld\n",
|
||||
sprintf(sync_bp, "%d %d 0 %ld %ld %ld %ld\n",
|
||||
type, ship->file->index, a, b, c, d);
|
||||
while (*sync_bp++)
|
||||
;
|
||||
sync_bp--;
|
||||
if (sync_bp >= &sync_buf[sizeof sync_buf])
|
||||
abort();
|
||||
(void) sync_update(type, ship, NULL, a, b, c, d);
|
||||
sync_update(type, ship, NULL, a, b, c, d);
|
||||
}
|
||||
|
||||
void
|
||||
Writestr(type, ship, a)
|
||||
int type;
|
||||
struct ship *ship;
|
||||
const char *a;
|
||||
Writestr(int type, struct ship *ship, const char *a)
|
||||
{
|
||||
|
||||
(void) sprintf(sync_bp, "%d %d 1 %s\n",
|
||||
type, ship->file->index, a);
|
||||
sprintf(sync_bp, "%d %d 1 %s\n", type, ship->file->index, a);
|
||||
while (*sync_bp++)
|
||||
;
|
||||
sync_bp--;
|
||||
if (sync_bp >= &sync_buf[sizeof sync_buf])
|
||||
abort();
|
||||
(void) sync_update(type, ship, a, 0, 0, 0, 0);
|
||||
sync_update(type, ship, a, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
int
|
||||
Sync()
|
||||
Sync(void)
|
||||
{
|
||||
sig_t sighup, sigint;
|
||||
int n;
|
||||
@@ -285,7 +241,7 @@ Sync()
|
||||
}
|
||||
if (n <= 0)
|
||||
return -1;
|
||||
(void) fseek(sync_fp, sync_seek, SEEK_SET);
|
||||
fseek(sync_fp, sync_seek, SEEK_SET);
|
||||
for (;;) {
|
||||
switch (fscanf(sync_fp, "%d%d%d", &type, &shipnum, &isstr)) {
|
||||
case 3:
|
||||
@@ -331,31 +287,27 @@ bad:
|
||||
erred++;
|
||||
out:
|
||||
if (!erred && sync_bp != sync_buf) {
|
||||
(void) fseek(sync_fp, 0L, SEEK_END);
|
||||
(void) fwrite(sync_buf, sizeof *sync_buf, sync_bp - sync_buf,
|
||||
fseek(sync_fp, 0L, SEEK_END);
|
||||
fwrite(sync_buf, sizeof *sync_buf, sync_bp - sync_buf,
|
||||
sync_fp);
|
||||
(void) fflush(sync_fp);
|
||||
fflush(sync_fp);
|
||||
sync_bp = sync_buf;
|
||||
}
|
||||
sync_seek = ftell(sync_fp);
|
||||
#ifdef LOCK_EX
|
||||
(void) flock(fileno(sync_fp), LOCK_UN);
|
||||
flock(fileno(sync_fp), LOCK_UN);
|
||||
#else
|
||||
setegid(egid);
|
||||
(void) unlink(sync_lock);
|
||||
unlink(sync_lock);
|
||||
setegid(gid);
|
||||
#endif
|
||||
(void) signal(SIGHUP, sighup);
|
||||
(void) signal(SIGINT, sigint);
|
||||
signal(SIGHUP, sighup);
|
||||
signal(SIGINT, sigint);
|
||||
return erred ? -1 : 0;
|
||||
}
|
||||
|
||||
int
|
||||
sync_update(type, ship, astr, a, b, c, d)
|
||||
int type;
|
||||
struct ship *ship;
|
||||
const char *astr;
|
||||
long a, b, c, d;
|
||||
static int
|
||||
sync_update(int type, struct ship *ship, const char *astr, long a, long b, long c, long d)
|
||||
{
|
||||
switch (type) {
|
||||
case W_DBP: {
|
||||
@@ -432,7 +384,7 @@ sync_update(type, ship, astr, a, b, c, d)
|
||||
break;
|
||||
}
|
||||
case W_CAPTAIN:
|
||||
(void) strncpy(ship->file->captain, astr,
|
||||
strncpy(ship->file->captain, astr,
|
||||
sizeof ship->file->captain - 1);
|
||||
ship->file->captain[sizeof ship->file->captain - 1] = 0;
|
||||
break;
|
||||
@@ -471,7 +423,7 @@ sync_update(type, ship, astr, a, b, c, d)
|
||||
ship->specs->hull = a;
|
||||
break;
|
||||
case W_MOVE:
|
||||
(void) strncpy(ship->file->movebuf, astr,
|
||||
strncpy(ship->file->movebuf, astr,
|
||||
sizeof ship->file->movebuf - 1);
|
||||
ship->file->movebuf[sizeof ship->file->movebuf - 1] = 0;
|
||||
break;
|
||||
@@ -534,7 +486,7 @@ sync_update(type, ship, astr, a, b, c, d)
|
||||
windspeed = b;
|
||||
break;
|
||||
case W_BEGIN:
|
||||
(void) strcpy(ship->file->captain, "begin");
|
||||
strcpy(ship->file->captain, "begin");
|
||||
people++;
|
||||
break;
|
||||
case W_END:
|
||||
|
||||
@@ -169,7 +169,7 @@ main(argc, argv)
|
||||
|
||||
while ((ch = getopt(argc, argv, "l:w:t")) != -1)
|
||||
switch ((char) ch) {
|
||||
#if 0
|
||||
#ifdef DEBUG
|
||||
case 'd':
|
||||
tv = atol(optarg);
|
||||
break;
|
||||
@@ -185,7 +185,11 @@ main(argc, argv)
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
fputs("usage: snake [-d seed] [-w width] [-l length] [-t]\n", stderr);
|
||||
#else
|
||||
fputs("usage: snake [-w width] [-l length] [-t]\n", stderr);
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -292,8 +292,8 @@ scr_set()
|
||||
newtt = oldtt;
|
||||
newtt.c_lflag &= ~(ICANON|ECHO);
|
||||
newtt.c_oflag &= ~OXTABS;
|
||||
newtt.c_cc[VMIN] = 1;
|
||||
newtt.c_cc[VTIME] = 0;
|
||||
newtt.c_cc[VMIN] = 1; /* don't lag behind 3 keystrokes on sun */
|
||||
newtt.c_cc[VTIME] = 0; /* systems -- JEH */
|
||||
if (tcsetattr(0, TCSADRAIN, &newtt) < 0)
|
||||
stop("tcsetattr() fails");
|
||||
ospeed = cfgetospeed(&newtt);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: trek.6,v 1.7 2000/03/02 13:27:53 enami Exp $
|
||||
.\" $NetBSD: trek.6,v 1.8 2001/04/02 22:42:39 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@@ -81,7 +81,7 @@ the game will tell you what it expects if you just type in a question mark.
|
||||
.Sh AUTHOR
|
||||
Eric Allman
|
||||
.Sh SEE ALSO
|
||||
.Pa /usr/share/doc/trek/trek.me.gz
|
||||
.Pa /usr/share/doc/bsdgames/trek.me.gz
|
||||
.Sh COMMAND SUMMARY
|
||||
.Bl -item -compact
|
||||
.It
|
||||
|
||||
34
wtf/acronyms
34
wtf/acronyms
@@ -1,4 +1,4 @@
|
||||
$NetBSD: acronyms,v 1.68 2000/09/10 20:49:20 wiz Exp $
|
||||
$NetBSD: acronyms,v 1.89 2001/08/11 11:57:35 wennmach Exp $
|
||||
|
||||
AFAICR as far as I can recall
|
||||
AFAICT as far as I can tell
|
||||
@@ -8,14 +8,19 @@ AFK away from keyboard
|
||||
AIUI as I understand it
|
||||
AKA also known as
|
||||
ASAP as soon as possible
|
||||
AWOL absent without official leave
|
||||
AYBABTU all your base are belong to us
|
||||
BBL [I'll] be back later
|
||||
BBS be back soon
|
||||
BBT be back tomorrow
|
||||
BFD big fucking deal
|
||||
BIAB back in a bit
|
||||
BIAF back in a few
|
||||
BIALW back in a little while
|
||||
BIAS back in a second
|
||||
BIAW back in a while
|
||||
BOFH bastard operator from hell
|
||||
BOHICA bend over here it comes again
|
||||
BRB [I'll] be right back
|
||||
BTDT been there, done that
|
||||
BTTH butt to the head
|
||||
@@ -30,10 +35,13 @@ DWIM do what I mean
|
||||
EG evil grin
|
||||
EMSG email message
|
||||
ETLA extended three letter acronym
|
||||
EWAG experienced wild-ass guess
|
||||
FAQ frequently asked question
|
||||
FIIK fuck if I know
|
||||
FIIK fuck[ed] if I know
|
||||
FIIR fuck[ed] if I remember
|
||||
FOAD fall over and die
|
||||
FSDO for some definition of
|
||||
FSVO for some value of
|
||||
FUBAR fucked up beyond all recognition
|
||||
FUD fear, uncertainty and doubt
|
||||
FWIW for what it's worth
|
||||
@@ -57,6 +65,7 @@ IRL in real life
|
||||
ISTM it seems to me
|
||||
ISTR I seem to recall
|
||||
ITYM I think you mean
|
||||
JIC just in case
|
||||
JK just kidding
|
||||
JMO just my opinion
|
||||
JTLYK just to let you know
|
||||
@@ -64,6 +73,8 @@ KISS keep it simple, stupid
|
||||
KITA kick in the ass
|
||||
KNF kernel normal form
|
||||
L8R later
|
||||
LART luser attitude readjustment tool (ie, hammer)
|
||||
LJBF let's just be friends
|
||||
LMSO laughing my socks off
|
||||
LOL laughing out loud
|
||||
LTNS long time no see
|
||||
@@ -75,6 +86,7 @@ MYOB mind your own business
|
||||
NBD no big deal
|
||||
NFC no fucking clue
|
||||
NFI no fucking idea
|
||||
NFW no fucking way
|
||||
NIH not invented here
|
||||
NP no problem
|
||||
NRFPT not ready for prime time
|
||||
@@ -83,6 +95,7 @@ OIC oh, I see
|
||||
OTL out to lunch
|
||||
OTOH on the other hand
|
||||
OTTOMH off the top of my head
|
||||
PFY pimply faced youth
|
||||
PITA pain in the ass
|
||||
PNG persona non grata
|
||||
POC point of contact
|
||||
@@ -91,13 +104,14 @@ PPL pretty please
|
||||
QED quod erat demonstrandum
|
||||
RFC request for comments
|
||||
RL real life
|
||||
RLC rod length check
|
||||
ROTFL rolling on the floor laughing
|
||||
RP responsible person
|
||||
RSN real soon now
|
||||
RTFB read the fine book
|
||||
RTFM read the fine manual
|
||||
RTFMP read the fine man page
|
||||
RTFS read the fine source
|
||||
RTFB read the fine/fucking book
|
||||
RTFM read the fine/fucking manual
|
||||
RTFMP read the fine/fucking man page
|
||||
RTFS read the fine/fucking source
|
||||
SCNR sorry, could not resist
|
||||
SEP someone else's problem
|
||||
SFA sweet fuck all
|
||||
@@ -107,18 +121,26 @@ SMOP simple matter of programming
|
||||
SNAFU situation normal, all fucked up
|
||||
SNERT snot-nosed egotistical rude teenager
|
||||
SO significant other
|
||||
SOB son of [a] bitch
|
||||
SOL shit out [of] luck
|
||||
SUS stupid user syndrome
|
||||
SWAG silly, wild-assed guess
|
||||
SWAHBI silly, wild-assed hare-brained idea
|
||||
TANSTAAFL there ain't no such thing as a free lunch
|
||||
TBD to be {decided,determined,done}
|
||||
TIA thanks in advance
|
||||
TLA three letter acronym
|
||||
TMA too many abbreviations
|
||||
TMI too much information
|
||||
TTFN ta ta for now
|
||||
TTYL talk to you later
|
||||
TYVM thank you very much
|
||||
UTSL use the source, Luke
|
||||
VEG very evil grin
|
||||
WAG wild-ass guess
|
||||
WIBNI wouldn't it be nice if
|
||||
WOFTAM waste of fucking time and money
|
||||
WOMBAT waste of money, brain, and time
|
||||
WTF {what,where,who,why} the fuck
|
||||
WTH {what,where,who,why} the hell
|
||||
WYSIWYG what you see is what you get
|
||||
|
||||
Reference in New Issue
Block a user