Commit Graph

617 Commits

Author SHA1 Message Date
simonb e42b2048d4 Convert to something resembling KNF. 1999-08-21 10:40:03 +00:00
simonb e28c422151 Instead of writing out a structure that contains pointers as the header
of the card decks file, just write out the number of cards for each
deck.  Also use "off_t" for offsets into the file (that are stored after
the number of cards) instead of "long".
/usr/share/games/cards.pck is now MI.
1999-08-21 09:23:44 +00:00
simonb 87500c939d Use new endian-specific conversion macros - 64-bit off_t's are now
the stored the same regardess of the byte order of the generating
host.

Note in the strfile(8) man page that all fields are big-endian, not
in network byte order.
1999-08-21 07:02:46 +00:00
simonb ba77c9abaf Don't chown installed files or directories if UNPRIVILEGED is defined.
"make build" should now work as a non-root user (tested on Alpha).
mtree spits out lots of warnings during "make distrib-dirs", but
these are non-fatal.
1999-08-21 06:30:11 +00:00
simonb b729f2c755 Use ${INSTPRIV} with ${INSTALL}. 1999-08-21 06:27:29 +00:00
hubertf 96651fe764 Make phrase to enter password again clearer 1999-08-18 01:39:16 +00:00
enami d8ad2663a8 In name section, use .Dq macro rather than writing double quote directly. 1999-08-17 03:36:35 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
tron 7cef41650e Adapt to change of "termcap.h". 1999-08-14 16:38:45 +00:00
tron b3cf7d7788 Adapt to change in "termcap.h". 1999-08-14 16:36:42 +00:00
tron 679f4a54e3 Adapt to change of "termcap.h". 1999-08-14 16:29:22 +00:00
sommerfeld 7e9fe5fb1e Fix the part of pr8201 which is IMHO a bug: the error message now goes
to stderr.

The existing error message ("I don't know what xxx means") is
unchanged, as it is stylisticly in keeping with the light-hearted
nature of the program, and is also more likely to be accurate than the
"no such acronym" error message proposed in 8201.
1999-08-13 03:02:06 +00:00
hubertf ead3c28a8d Leave ^Z-handling to the system (curses? no idea, at least it works :-),
and don't wait for two seconds when game is over.
1999-08-10 21:52:43 +00:00
hubertf 2e41cf04d2 Print score after endwin() so it isn't deleted immediately afterward. 1999-08-08 03:08:08 +00:00
simonb 32a44f6987 Revert inclusion of <string.h> now that curses has been fixed. 1999-08-08 02:06:01 +00:00
thorpej a451d97336 Fortunes from those Unamerican Activities bumper stickers you see on
mountain bikes owned by Gen-X'ers.
1999-08-04 22:45:09 +00:00
thorpej 810b5148c4 Need <strings.h>. 1999-08-04 18:38:12 +00:00
hubertf a71d955669 This patch converts worms(6) to use curses, thereby
simplifying the code and improving its portability.  It also adds a
delay option from OpenBSD, to allow reasonable speed display on fast
terminals, adds use of const, and fixes signal handling and use of
errx() where appropriate.

Patch supplied in PR 6661 by Joseph Myers <jsm28@cam.ac.uk>.
1999-07-30 02:23:27 +00:00
hubertf 1543eff804 This patch converts rain(6) to use curses, thereby
significantly simplifying the code and improving its portability.  It
also adds a delay option from OpenBSD to make the display go at a
useful speed on fast terminals, and fixes signal handling to make it
reliable.

Patch supplied by Joseph Myers <jsm28@cam.ac.uk> in PR 6659.
1999-07-30 02:14:56 +00:00
hubertf ef49c17e92 This patch fixes adventure(6) to use `extern' on declarations of
objects in its header file, and to add corresponding definitions to
init.c accordingly.  (See the C standard - relying on linker commons
where there are multiple uninitialised declarations of an object in
the program traditionally works on Unix, but is not standard C.)

The patch also removes a bit-rotten code fragment under #ifdef
OLDSTUFF.

Patch submitted in PR 8105 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-28 23:23:39 +00:00
hubertf c26f3e09fd This is a trivial fix to backgammon(6): '\a' is cleaner than '\007'.
Submitted in PR 8104 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-28 23:15:51 +00:00
hubertf 18ee317315 This patch makes worm(6) keep the cursor on the head of the worm.
Submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8103.
1999-07-28 23:09:45 +00:00
hubertf 303b1c7490 This patch adds references to the main punched card, paper tape and
Morse code standards to the bcd(6) manpage (which also serves as the
manpages ppt(6) and morse(6)).

(The only one of these standards I have read is the ECMA-10 paper tape
standard, which is also probably the least readily available, since
ECMA don't supply copies of obsolete standards, though they will
supply printed copies of any or all of their current standards at no
charge.)

Patch submitted in PR 8102 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-28 23:01:59 +00:00
hubertf 062503c344 This patch makes bcd(6) use `const' where appropriate, and use
unsigned char rather than char for values that end up passed to
isascii() and also used as array indices.

Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8093.
1999-07-28 02:12:33 +00:00
hubertf d29d591c01 This patch fixes a remaining relic of the backgammon(6) "execute
saved game to continue playing" problem described in bin/6077.

Patch contributed by Joseph Myers <jsm28@cam.ac.uk> in PR 8092.
1999-07-28 02:07:39 +00:00
hubertf d8b3f85961 In atc(6), the function getAChar() has BSD and SYSV variants to deal
with variations in EINTR behaviour, but the optimisation of using the
BSD version where the SYSV version isn't needed is insignificant.
This patch therefore simplifies the code by making there be just one
version, a more paranoid (about EOF when errno is already EINTR)
version of the SYSV code.  Since the BSD/SYSV defines are mainly used
to control whether BSD timers are used, this helps where BSD timers
but SYSV EINTR handling are wanted.

Patch supplied in PR 8091 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-28 02:01:30 +00:00
hubertf 6c243d931c This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring.  It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length.  In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
1999-07-28 01:45:41 +00:00
drochner b0c1735026 make sure only whole words are matched, use [:space:] RE to avoid embedded
<TAB>s
1999-07-27 15:41:27 +00:00
hubertf 6ec2bcb1c2 Remove empty functin check_adir() and references to it. 1999-07-26 21:14:21 +00:00
hubertf 83d9f5b7e0 This patch adds to backgammon(6) a couple of noreturn attributes
missed in bin/6144.

Patch submitted in PR 8082 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-26 20:56:03 +00:00
hubertf b8d8fccc22 This patch makes backgammon(6) check that, if you use the -s option to
recover a saved game, then you specify a file name.

Patch submitted in PR 8081 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-26 20:50:44 +00:00
hubertf 79705e8498 This adds a check for memory allocation failure to one place in
backgammon(6).  The use of write(2) for the message may seem odd, but
is used in another place in this game.  (Actually, a lot of
backgammon(6) could do with being substantially cleaned up.)

Patch submitted in PR 8080 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-26 18:39:06 +00:00
briggs b0412de83c Check whatis(1) if we don't find an acronym matching the argument 1999-07-25 20:29:04 +00:00
thorpej 2464b36e0a We're in section 6. 1999-07-25 20:02:48 +00:00
hubertf 03fc787fb7 This patch marks unused parameters in atc(6) as such.
Patch submitted in PR 8058 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-25 00:24:38 +00:00
hubertf 420d34ff13 Hardcore const poisoning
Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8057
1999-07-25 00:06:13 +00:00
hubertf 5cfc1e8dc6 This patch makes atc(6) check for memory allocation failure.
Patch submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8056,
with small enhancement to make clearer when loser() is called
with NULL.
1999-07-24 23:58:15 +00:00
mjl c5a4ae7a2a Use getopt instead of home grown command line parsing.
Patch from Joseph Myers <jsm28@cam.ac.uk> in PR/8062.
1999-07-24 15:50:44 +00:00
lukem fb5a2a2eb1 remove sh warning when invoked with no args 1999-07-22 10:08:17 +00:00
mrg 7199fd8f7b add wtf 1999-07-22 01:05:20 +00:00
mrg 3fd868859a Allen Briggs' wtf(6) to grovel the acronyms database. 1999-07-22 01:03:20 +00:00
hubertf b7e11e5c37 const poisoning
Patch submitted in PR 8039 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-21 13:19:10 +00:00
hubertf 6cc6041b97 When atc(6) parses its game definition files, the check for `width'
being defined more than once incorrectly checks for `height' having
been previously defined instead.

Patch submitted in PR 8038 by Joseph Myers <jsm28@cam.ac.uk>
1999-07-21 13:10:47 +00:00
hubertf e1c8885621 Drop setgid privs early, via OpenBSD
Reported in PR 5970 by Joseph Myers <jsm@octomino.demon.co.uk>
1999-07-21 04:04:21 +00:00
hubertf 7287839679 Drop setgid privs early. Via OpenBSD, reported in PR 5970 by
Joseph Myers <jsm28@cam.ac.uk>
1999-07-21 04:02:29 +00:00
hubertf 22c39e3b98 Drop setgid privs early; via OpenBSD reported in PR 5970 by
Joseph Myers <jsm28@cam.ac.uk>
1999-07-21 03:59:41 +00:00
hubertf 054e79fedd Drop setgid privileges early. Derived from OpenBSD and sent in as PR 5970
by Joseph Myers <jsm28@cam.ac.uk>.
1999-07-21 03:56:53 +00:00
hubertf 146de2e635 Back out last due to think o on my side: we don't start banner through
dm(6), so there's no setgid privileges to discard. Pointed out by
Joseph S. Myers <jsm28@cam.ac.uk>
1999-07-19 19:07:17 +00:00
hubertf ccb3350fe4 Drop setgid privs passed from dm(6).
Patch submitted in PR 5945 by Joseph S. Myers <jsm28@cam.ac.uk>
1999-07-19 00:42:59 +00:00
hubertf 3521abbb40 As in previously sent patches: backgammon(6) does not need setgid
games privileges from dm, so should revoke them on startup.

Patch submitteed in PR 8024 bye Joseph Myers <jsm28@cam.ac.uk>
1999-07-19 00:33:58 +00:00