releasing version 2.17-1

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@11092 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2005-02-18 18:44:27 +00:00
parent 3d248f5d00
commit 00d2970fb5
126 changed files with 786 additions and 778 deletions

View File

@@ -1,12 +0,0 @@
Makeconfig
hide-game
install-man
install-score
subst.sed
subst.rules
test.out
GNUmakefile
conftest.c
exec.libs.tmp
exec.objs.tmp
a.out

View File

@@ -387,7 +387,7 @@ 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-2004 Joseph Samuel Myers.
Copyright (c) 1997-2005 Joseph Samuel Myers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -434,7 +434,7 @@ 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-2004 Joseph Samuel Myers.
Copyright (c) 1997-2005 Joseph Samuel Myers.
All rights reserved.
Redistribution and use in source and binary forms, with or without

202
ChangeLog
View File

@@ -1,5 +1,207 @@
2005-02-18 Joseph S. Myers <jsm@polyomino.org.uk>
* Version 2.17.
* NEWS, bsd-games.lsm, bsd-games-non-free.lsm: Update.
* wtf/acronyms, wtf/acronyms.comp: Update from NetBSD CVS.
2005-02-16 Joseph S. Myers <jsm@polyomino.org.uk>
* atc/input.c, backgammon/backgammon/main.c,
backgammon/teachgammon/teach.c, cribbage/instr.c, fish/fish.c,
phantasia/gamesupport.c, phantasia/interplayer.c, phantasia/io.c,
phantasia/misc.c, phantasia/phantstruct.h, rogue/machdep.c,
rogue/rogue.h, trek/getpar.h, trek/trek.h, wump/wump.c: Update
from NetBSD CVS.
2005-02-14 Joseph S. Myers <jsm@polyomino.org.uk>
* hack/hack.termcap.c: Remove "static" from some variables. Fix
from Andreas Jochens <aj@andaco.de> in Debian bug 284750.
* exec.objs: Include lib/strlcpy.o for atc and sail.
* atc/input.c, backgammon/backgammon/main.c,
backgammon/teachgammon/teach.c, cribbage/instr.c, fish/fish.c,
phantasia/misc.c, rogue/machdep.c, wump/wump.c: Cast last argument
of execl to char *.
* rogue/rogue.h: Avoid arrays of incomplete types.
* trek/trek.h: Likewise. Don't declare Skitab and Lentab here.
* trek/getpar.h: Declare Skitab and Lentab here.
* phantasia/phantstruct.h: Define phbool.
* phantasia/gamesupport.c, phantasia/interplayer.c,
phantasia/io.c, phantasia/misc.c: Use phbool where necessary.
* .cvsignore, adventure/.cvsignore, arithmetic/.cvsignore,
atc/.cvsignore, backgammon/backgammon/.cvsignore,
backgammon/common_source/.cvsignore,
backgammon/teachgammon/.cvsignore, banner/.cvsignore,
battlestar/.cvsignore, bcd/.cvsignore, boggle/boggle/.cvsignore,
boggle/mkdict/.cvsignore, boggle/mkindex/.cvsignore,
caesar/.cvsignore, canfield/canfield/.cvsignore,
canfield/cfscores/.cvsignore, cribbage/.cvsignore, dab/.cvsignore,
dm/.cvsignore, factor/.cvsignore, fish/.cvsignore,
fortune/datfiles/.cvsignore, fortune/fortune/.cvsignore,
fortune/strfile/.cvsignore, fortune/unstr/.cvsignore,
gomoku/.cvsignore, hack/.cvsignore, hangman/.cvsignore,
hunt/hunt/.cvsignore, hunt/huntd/.cvsignore, include/.cvsignore,
lib/.cvsignore, mille/.cvsignore, monop/.cvsignore,
morse/.cvsignore, number/.cvsignore, phantasia/.cvsignore,
pig/.cvsignore, pom/.cvsignore, ppt/.cvsignore, primes/.cvsignore,
quiz/.cvsignore, quiz/datfiles/.cvsignore, rain/.cvsignore,
random/.cvsignore, robots/.cvsignore, rogue/.cvsignore,
sail/.cvsignore, snake/snake/.cvsignore, snake/snscore/.cvsignore,
tetris/.cvsignore, trek/.cvsignore, worm/.cvsignore,
worms/.cvsignore, wtf/.cvsignore, wump/.cvsignore: Remove as no
longer needed after move to Subversion.
2005-01-30 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes2: Update from NetBSD CVS.
2005-01-30 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms, wtf/acronyms.comp: Update from NetBSD CVS.
* COPYING: Update copyright dates.
2004-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
* monop/malloc.c, phantasia/main.c, phantasia/setup.c: Update from
NetBSD CVS.
2004-12-07 Joseph S. Myers <jsm@polyomino.org.uk>
* arithmetic/arithmetic.c, battlestar/getcom.c,
boggle/boggle/bog.c, boggle/boggle/mach.c,
canfield/canfield/canfield.c, cribbage/io.c, dm/dm.c,
fortune/fortune/fortune.c, gomoku/stoc.c, hack/hack.u_init.c,
hangman/getword.c, hunt/hunt/hunt.c, hunt/hunt/otto.c,
hunt/huntd/answer.c, mille/move.c, monop/getinp.c, monop/misc.c,
number/number.c, pig/pig.c, robots/main.c, sail/dr_1.c,
sail/misc.c, sail/pl_4.c, sail/pl_5.c, worms/Makefile.bsd,
wtf/acronyms, wtf/acronyms.comp: Update from NetBSD CVS.
2004-10-31 Joseph S. Myers <jsm@polyomino.org.uk>
* lib/fgetln.c: Handle case of line just fitting in buffer
correctly.
2004-10-23 Joseph S. Myers <jsm@polyomino.org.uk>
* dm/utmpentry.c: Update from NetBSD CVS.
2004-09-15 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/fortune/fortune.6.in, fortune/strfile/strfile.8,
worms/worms.c: Update from NetBSD CVS.
2004-09-08 Joseph S. Myers <jsm@polyomino.org.uk>
* atc/log.c, sail/dr_1.c, sail/sync.c: Update from NetBSD CVS.
2004-09-04 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms: Update from NetBSD CVS.
2004-09-02 Joseph S. Myers <jsm@polyomino.org.uk>
* robots/auto.c, robots/move.c: Update from NetBSD CVS.
2004-08-23 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes: Update from NetBSD CVS.
2004-07-16 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms.comp: Update from NetBSD CVS.
2004-07-05 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms: Update from NetBSD CVS.
2004-06-07 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms.comp: Update from NetBSD CVS.
2004-06-02 Joseph S. Myers <jsm@polyomino.org.uk>
* hack/hack.6.in: Update from NetBSD CVS.
2004-05-24 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes: Update from NetBSD CVS.
2004-05-20 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms.comp: Update from NetBSD CVS.
2004-05-02 Joseph S. Myers <jsm@polyomino.org.uk>
* rain/rain.c: Update from NetBSD CVS.
* exec.objs: Update.
2004-04-30 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms.comp: Update from NetBSD CVS.
2004-04-24 Joseph S. Myers <jsm@polyomino.org.uk>
* backgammon/common_source/fancy.c, fortune/datfiles/farber:
Update from NetBSD CVS.
2004-04-12 Joseph S. Myers <jsm@polyomino.org.uk>
* phantasia/fight.c, phantasia/gamesupport.c,
phantasia/interplayer.c, phantasia/io.c, phantasia/main.c,
phantasia/misc.c: Update from NetBSD CVS.
2004-04-08 Joseph S. Myers <jsm@polyomino.org.uk>
* mille/move.c, phantasia/fight.c, phantasia/gamesupport.c,
phantasia/include.h, phantasia/interplayer.c, phantasia/io.c,
phantasia/main.c, phantasia/misc.c, phantasia/phantstruct.h,
phantasia/setup.c, worms/worms.c, wtf/acronyms, wtf/acronyms.comp:
Update from NetBSD CVS.
2004-03-29 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes2, fortune/datfiles/fortunes2-o.real,
hack/data, hack/rumors: Update from NetBSD CVS.
2004-03-27 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms, wtf/acronyms.comp: Update from NetBSD CVS.
2004-03-12 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms, wtf/acronyms.comp: Update from NetBSD CVS.
2004-03-05 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms: Update from NetBSD CVS.
2004-03-04 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms.comp: Update from NetBSD CVS.
2004-02-28 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes2: Update from NetBSD CVS.
2004-02-18 Joseph S. Myers <jsm@polyomino.org.uk>
* wtf/acronyms: Update from NetBSD CVS.
2004-02-14 Joseph S. Myers <jsm@polyomino.org.uk>
* fortune/datfiles/fortunes, fortune/datfiles/fortunes.sp.ok,
rogue/USD.doc/rogue.me: Update from NetBSD CVS.
* NEWS: Fix typo.
* ChangeLog: Mark properly for 2.16 release.
2004-02-13 Joseph S. Myers <jsm@polyomino.org.uk>
* Version 2.16.
* NEWS, bsd-games.lsm, bsd-games-non-free.lsm: Update.
* morse/morse.c: Update from NetBSD CVS.

10
NEWS
View File

@@ -11,10 +11,18 @@ 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.17 (2005-02-18)
============
* Updated from NetBSD CVS of 2005-02-18.
* Some bugs fixed (in particular, should now build with current GCC 4
CVS), some backlogged.
Version 2.16 (2004-02-13)
============
* Updated from NetBSD CVS of 2004-02-12. Includes a new game, dab
* Updated from NetBSD CVS of 2004-02-13. Includes a new game, dab
(Dots and Boxes), written in C++.
* Supplementary documentation for trek and rogue now installed

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
adventure
setup
data.c

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
arithmetic

View File

@@ -1,4 +1,4 @@
/* $NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm Exp $ */
/* $NetBSD: arithmetic.c,v 1.21 2004/11/05 21:30:31 dsl Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm Exp $");
__RCSID("$NetBSD: arithmetic.c,v 1.21 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -246,8 +246,8 @@ retry:
(void)printf("\n");
return(EOF);
}
for (p = line; *p && isspace(*p); ++p);
if (!isdigit(*p)) {
for (p = line; *p && isspace((unsigned char)*p); ++p);
if (!isdigit((unsigned char)*p)) {
(void)printf("Please type a number.\n");
continue;
}

View File

@@ -1,13 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
atc
pathnames.h
atc.6
grammar.c
grammar.h
y.tab.*
lex.c
lex.yy.c

View File

@@ -1,4 +1,4 @@
/* $NetBSD: input.c,v 1.16 2004/01/27 20:30:28 jsm Exp $ */
/* $NetBSD: input.c,v 1.17 2005/02/15 12:56:20 jsm Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: input.c,v 1.16 2004/01/27 20:30:28 jsm Exp $");
__RCSID("$NetBSD: input.c,v 1.17 2005/02/15 12:56:20 jsm Exp $");
#endif
#endif /* not lint */
@@ -322,10 +322,10 @@ gettoken()
base = shell;
else
base++;
execl(shell, base, 0);
execl(shell, base, (char *) 0);
}
else
execl(_PATH_BSHELL, "sh", 0);
execl(_PATH_BSHELL, "sh", (char *) 0);
exit(0); /* oops */
}

View File

@@ -1,4 +1,4 @@
/* $NetBSD: log.c,v 1.12 2003/08/07 09:36:54 agc Exp $ */
/* $NetBSD: log.c,v 1.13 2004/09/07 13:20:39 jrf Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: log.c,v 1.12 2003/08/07 09:36:54 agc Exp $");
__RCSID("$NetBSD: log.c,v 1.13 2004/09/07 13:20:39 jrf Exp $");
#endif
#endif /* not lint */
@@ -180,8 +180,7 @@ log_score(list_em)
}
strcpy(thisscore.name, pw->pw_name);
uname(&name);
strncpy(thisscore.host, name.nodename, sizeof(thisscore.host)-1);
thisscore.host[sizeof(thisscore.host) - 1] = '\0';
strlcpy(thisscore.host, name.nodename, sizeof(thisscore.host));
cp = strrchr(file, '/');
if (cp == NULL) {

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
backgammon
backgammon.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.20 2004/02/08 22:23:50 jsm Exp $ */
/* $NetBSD: main.c,v 1.21 2005/02/15 12:56:20 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,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.20 2004/02/08 22:23:50 jsm Exp $");
__RCSID("$NetBSD: main.c,v 1.21 2005/02/15 12:56:20 jsm Exp $");
#endif
#endif /* not lint */
@@ -152,7 +152,8 @@ main(argc, argv)
if (yorn(0)) {
fixtty(&old); /* restore tty */
execl(TEACH, "teachgammon", args[1]?args:0, 0);
execl(TEACH, "teachgammon", args[1]?args:0,
(char *) 0);
tflag = 0; /* error! */
writel(noteach);

View File

@@ -1,5 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp

View File

@@ -1,4 +1,4 @@
/* $NetBSD: fancy.c,v 1.11 2003/08/07 09:36:57 agc Exp $ */
/* $NetBSD: fancy.c,v 1.12 2004/04/23 02:58:27 simonb Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: fancy.c,v 1.11 2003/08/07 09:36:57 agc Exp $");
__RCSID("$NetBSD: fancy.c,v 1.12 2004/04/23 02:58:27 simonb Exp $");
#endif
#endif /* not lint */
@@ -591,7 +591,7 @@ fancyc(c)
addbuf(c);
return;
}
/* process tabs, use spaces if the the tab should be erasing things,
/* process tabs, use spaces if the tab should be erasing things,
* otherwise use cursor movement routines. Note this does not use
* hardware tabs at all. */
if (c == '\t') {

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
teachgammon

View File

@@ -1,4 +1,4 @@
/* $NetBSD: teach.c,v 1.15 2004/02/08 22:23:50 jsm Exp $ */
/* $NetBSD: teach.c,v 1.16 2005/02/15 12:56:20 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: teach.c,v 1.15 2004/02/08 22:23:50 jsm Exp $");
__RCSID("$NetBSD: teach.c,v 1.16 2005/02/15 12:56:20 jsm Exp $");
#endif
#endif /* not lint */
@@ -152,7 +152,7 @@ leave()
else
writec('\n');
fixtty(&old);
execl(EXEC, "backgammon", "-n", args[1]?args:0, 0);
execl(EXEC, "backgammon", "-n", args[1]?args:0, (char *) 0);
writel("Help! Backgammon program is missing\007!!\n");
exit(1);
}

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
banner

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
battlestar
pathnames.h

View File

@@ -1,4 +1,4 @@
/* $NetBSD: getcom.c,v 1.11 2003/08/07 09:37:02 agc Exp $ */
/* $NetBSD: getcom.c,v 1.12 2004/11/05 21:30:31 dsl Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: getcom.c,v 1.11 2003/08/07 09:37:02 agc Exp $");
__RCSID("$NetBSD: getcom.c,v 1.12 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -54,7 +54,7 @@ getcom(buf, size, prompt, error)
clearerr(stdin);
continue;
}
while (isspace(*buf))
while (isspace((unsigned char)*buf))
buf++;
if (*buf)
break;
@@ -83,25 +83,25 @@ getword(buf1, buf2, flag)
int cnt;
cnt = 1;
while (isspace(*buf1))
while (isspace((unsigned char)*buf1))
buf1++;
if (*buf1 != ',') {
if (!*buf1) {
*buf2 = 0;
return (0);
}
while (cnt < WORDLEN && *buf1 && !isspace(*buf1) && *buf1 != ',')
while (cnt < WORDLEN && *buf1 && !isspace((unsigned char)*buf1) && *buf1 != ',')
if (flag < 0) {
if (isupper(*buf1)) {
*buf2++ = tolower(*buf1++);
if (isupper((unsigned char)*buf1)) {
*buf2++ = tolower((unsigned char)*buf1++);
cnt++;
} else {
*buf2++ = *buf1++;
cnt++;
}
} else if (flag > 0) {
if (islower(*buf1)) {
*buf2++ = toupper(*buf1++);
if (islower((unsigned char)*buf1)) {
*buf2++ = toupper((unsigned char)*buf1++);
cnt++;
} else {
*buf2++ = *buf1++;
@@ -112,12 +112,12 @@ getword(buf1, buf2, flag)
cnt++;
}
if (cnt == WORDLEN)
while (*buf1 && !isspace(*buf1))
while (*buf1 && !isspace((unsigned char)*buf1))
buf1++;
} else
*buf2++ = *buf1++;
*buf2 = '\0';
while (isspace(*buf1))
while (isspace((unsigned char)*buf1))
buf1++;
return (*buf1 ? buf1 : NULL);
}

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
bcd

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
boggle
bog.h

View File

@@ -1,4 +1,4 @@
/* $NetBSD: bog.c,v 1.18 2004/01/27 20:30:29 jsm Exp $ */
/* $NetBSD: bog.c,v 1.19 2004/11/05 21:30:31 dsl Exp $ */
/*-
* Copyright (c) 1993
@@ -42,7 +42,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.18 2004/01/27 20:30:29 jsm Exp $");
__RCSID("$NetBSD: bog.c,v 1.19 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -180,7 +180,7 @@ main(argc, argv)
}
if (argc > 0) {
if (islower(argv[0][0])) {
if (islower((unsigned char)argv[0][0])) {
if (strlen(argv[0]) != 16) {
usage();
} else {

View File

@@ -1,4 +1,4 @@
/* $NetBSD: mach.c,v 1.13 2004/01/27 20:30:29 jsm Exp $ */
/* $NetBSD: mach.c,v 1.14 2004/11/05 21:30:31 dsl Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
__RCSID("$NetBSD: mach.c,v 1.13 2004/01/27 20:30:29 jsm Exp $");
__RCSID("$NetBSD: mach.c,v 1.14 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -445,7 +445,7 @@ findword()
if (board[wordpath[i]] == 'q')
printw("Qu");
else
printw("%c", toupper(board[wordpath[i]]));
printw("%c", toupper((unsigned char)board[wordpath[i]]));
move(r, c);
refresh();
delay(5);
@@ -460,7 +460,7 @@ findword()
if (board[wordpath[i]] == 'q')
printw("Qu");
else
printw("%c", toupper(board[wordpath[i]]));
printw("%c", toupper((unsigned char)board[wordpath[i]]));
}
move(r, c);
clrtoeol();
@@ -668,7 +668,7 @@ tty_showboard(b)
if (b[i] == 'q')
printw("| Qu");
else
printw("| %c ", toupper(b[i]));
printw("| %c ", toupper((unsigned char)b[i]));
if ((i + 1) % 4 == 0) {
printw("|");
move(++line, BOARD_COL);

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
mkdict
dictionary

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
mkindex
dictindex

View File

@@ -1,7 +1,7 @@
Begin4
Title: bsd-games
Version: 2.16
Entered-date: 2004-02-13
Version: 2.17
Entered-date: 2005-02-18
Description: Port of most of the games from NetBSD-current. Games
included: adventure arithmetic atc backgammon banner battlestar
bcd boggle caesar canfield countmail cribbage dab dm factor fish
@@ -11,7 +11,7 @@ Description: Port of most of the games from NetBSD-current. Games
Keywords: games, NetBSD
Maintained-by: jsm@polyomino.org.uk (Joseph S. Myers)
Primary-site: ibiblio.org /pub/Linux/games
bsd-games-2.16.tar.gz
bsd-games-2.17.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

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
caesar
rot13

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
canfield
pathnames.h
canfield.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: canfield.c,v 1.19 2004/01/27 20:30:29 jsm Exp $ */
/* $NetBSD: canfield.c,v 1.20 2004/11/05 21:30:31 dsl Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,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.19 2004/01/27 20:30:29 jsm Exp $");
__RCSID("$NetBSD: canfield.c,v 1.20 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -1400,7 +1400,7 @@ getcmd(row, col, cp)
suspend();
move(row, col + i);
refresh();
} else if (isprint(ch)) {
} else if (isprint((unsigned char)ch)) {
cmd[i++] = ch;
addch(ch);
refresh();

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
cfscores

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
cribbage
pathnames.h
cribbage.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: instr.c,v 1.10 2003/08/07 09:37:10 agc Exp $ */
/* $NetBSD: instr.c,v 1.11 2005/02/15 12:56:20 jsm Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)instr.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: instr.c,v 1.10 2003/08/07 09:37:10 agc Exp $");
__RCSID("$NetBSD: instr.c,v 1.11 2005/02/15 12:56:20 jsm Exp $");
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@ instructions()
warn("dup2");
_exit(1);
}
execl("/bin/sh", "sh", "-c", path, NULL);
execl("/bin/sh", "sh", "-c", path, (char *) NULL);
warn(NULL);
_exit(1);
default:

View File

@@ -1,4 +1,4 @@
/* $NetBSD: io.c,v 1.17 2004/01/26 09:58:35 jsm Exp $ */
/* $NetBSD: io.c,v 1.18 2004/11/05 21:30:31 dsl Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: io.c,v 1.17 2004/01/26 09:58:35 jsm Exp $");
__RCSID("$NetBSD: io.c,v 1.18 2004/11/05 21:30:31 dsl Exp $");
#endif
#endif /* not lint */
@@ -353,10 +353,10 @@ number(lo, hi, prompt)
}
sum = 0;
if (!isdigit(*p))
if (!isdigit((unsigned char)*p))
sum = lo - 1;
else
while (isdigit(*p)) {
while (isdigit((unsigned char)*p)) {
sum = 10 * sum + (*p - '0');
++p;
}
@@ -424,8 +424,8 @@ endmsg()
/* All messages should start with uppercase */
mvaddch(lastline + Y_MSG_START, SCORE_X, ' ');
if (islower(Msgbuf[0]) && Msgbuf[1] != ')')
Msgbuf[0] = toupper(Msgbuf[0]);
if (islower((unsigned char)Msgbuf[0]) && Msgbuf[1] != ')')
Msgbuf[0] = toupper((unsigned char)Msgbuf[0]);
mp = Msgbuf;
len = strlen(mp);
if (len / MSG_X + Lineno >= MSG_Y) {

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.ii
*.s
*.d.tmp
dab

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
bsdgames (2.17-1) unstable; urgency=low
* New upstream release.
-- Joey Hess <joeyh@debian.org> Fri, 18 Feb 2005 13:12:51 -0500
bsdgames (2.16-5) unstable; urgency=low
* Apply hack patch from Andreas Jochens to support building under gcc 4.0

View File

@@ -1,9 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
dm
pathnames.h
dm.8
dm.conf.5

12
dm/dm.c
View File

@@ -1,4 +1,4 @@
/* $NetBSD: dm.c,v 1.20 2004/02/08 22:23:50 jsm Exp $ */
/* $NetBSD: dm.c,v 1.21 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
#if 0
static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: dm.c,v 1.20 2004/02/08 22:23:50 jsm Exp $");
__RCSID("$NetBSD: dm.c,v 1.21 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -173,7 +173,7 @@ c_day(s_day, s_start, s_stop)
ct = localtime(&now);
if (strcasecmp(s_day, days[ct->tm_wday]))
return;
if (!isdigit(*s_start) || !isdigit(*s_stop))
if (!isdigit((unsigned char)*s_start) || !isdigit((unsigned char)*s_stop))
return;
start = atoi(s_start);
stop = atoi(s_stop);
@@ -221,11 +221,11 @@ c_game(s_game, s_load, s_users, s_priority)
if (strcmp(game, s_game) && strcasecmp("default", s_game))
return;
++found;
if (isdigit(*s_load) && atoi(s_load) < load())
if (isdigit((unsigned char)*s_load) && atoi(s_load) < load())
errx(0, "Sorry, the load average is too high right now.");
if (isdigit(*s_users) && atoi(s_users) <= users())
if (isdigit((unsigned char)*s_users) && atoi(s_users) <= users())
errx(0, "Sorry, there are too many users logged on right now.");
if (isdigit(*s_priority))
if (isdigit((unsigned char)*s_priority))
priority = atoi(s_priority);
}

View File

@@ -1,4 +1,4 @@
/* $NetBSD: utmpentry.c,v 1.4 2003/02/12 17:39:36 christos Exp $ */
/* $NetBSD: utmpentry.c,v 1.5 2004/10/22 15:50:47 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: utmpentry.c,v 1.4 2003/02/12 17:39:36 christos Exp $");
__RCSID("$NetBSD: utmpentry.c,v 1.5 2004/10/22 15:50:47 christos Exp $");
#endif
#include <sys/stat.h>
@@ -94,6 +94,7 @@ setup(const char *fname)
{
int what = 3;
struct stat st;
const char *sfname;
if (fname == NULL) {
#ifdef SUPPORT_UTMPX
@@ -110,38 +111,49 @@ setup(const char *fname)
if (what == 1) {
#ifdef SUPPORT_UTMPX
if (utmpxname(fname) == 0)
err(1, "Cannot open `%s'", fname);
warnx("Cannot set utmpx file to `%s'",
fname);
#else
errx(1, "utmpx support not compiled in");
warnx("utmpx support not compiled in");
#endif
} else {
#ifdef SUPPORT_UTMP
if (utmpname(fname) == 0)
err(1, "Cannot open `%s'", fname);
warnx("Cannot set utmp file to `%s'",
fname);
#else
errx(1, "utmp support not compiled in");
warnx("utmp support not compiled in");
#endif
}
}
#ifdef SUPPORT_UTMPX
if (what & 1) {
(void)stat(fname ? fname : _PATH_UTMPX, &st);
if (st.st_mtime > utmpxtime)
utmpxtime = st.st_mtime;
else
sfname = fname ? fname : _PATH_UTMPX;
if (stat(sfname, &st) == -1) {
warn("Cannot stat `%s'", sfname);
what &= ~1;
} else {
if (st.st_mtime > utmpxtime)
utmpxtime = st.st_mtime;
else
what &= ~1;
}
}
#endif
#ifdef SUPPORT_UTMP
if (what & 2) {
(void)stat(fname ? fname : _PATH_UTMP, &st);
if (st.st_mtime > utmptime)
utmptime = st.st_mtime;
else
sfname = fname ? fname : _PATH_UTMP;
if (stat(sfname, &st) == -1) {
warn("Cannot stat `%s'", sfname);
what &= ~2;
} else {
if (st.st_mtime > utmptime)
utmptime = st.st_mtime;
else
what &= ~2;
}
}
#endif
return what;
}
#endif
@@ -179,10 +191,13 @@ getutentries(const char *fname, struct utmpentry **epp)
struct utmpentry *ep;
int what = setup(fname);
struct utmpentry **nextp = &ehead;
if (what == 0) {
switch (what) {
case 0:
/* No updates */
*epp = ehead;
return numutmp;
} else {
default:
/* Need to re-scan */
ehead = NULL;
numutmp = 0;
}
@@ -192,8 +207,10 @@ getutentries(const char *fname, struct utmpentry **epp)
while ((what & 1) && (utx = getutxent()) != NULL) {
if (fname == NULL && utx->ut_type != USER_PROCESS)
continue;
if ((ep = calloc(1, sizeof(struct utmpentry))) == NULL)
err(1, NULL);
if ((ep = calloc(1, sizeof(struct utmpentry))) == NULL) {
warn(NULL);
return 0;
}
getentryx(ep, utx);
*nextp = ep;
nextp = &(ep->next);
@@ -213,8 +230,10 @@ getutentries(const char *fname, struct utmpentry **epp)
}
if (ep != NULL)
continue;
if ((ep = calloc(1, sizeof(struct utmpentry))) == NULL)
err(1, NULL);
if ((ep = calloc(1, sizeof(struct utmpentry))) == NULL) {
warn(NULL);
return 0;
}
getentry(ep, ut);
*nextp = ep;
nextp = &(ep->next);

View File

@@ -1,7 +1,7 @@
# 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, 2004 Joseph Samuel Myers.
# Copyright (c) 1998, 1999, 2000, 2001, 2003, 2004, 2005 Joseph Samuel Myers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@ adventure crc.o data.o done.o init.o io.o main.o save.o subr.o \
adventure/setup setup.o
arithmetic arithmetic.o lib/getprogname.o
atc extern.o grammar.o graphics.o input.o lex.o list.o \
log.o main.o tunable.o update.o
log.o main.o tunable.o update.o lib/strlcpy.o
backgammon/backgammon/backgammon extra.o main.o move.o text.o \
version.o backgammon/common_source/allow.o \
backgammon/common_source/board.o backgammon/common_source/check.o \
@@ -102,7 +102,7 @@ pom pom.o
ppt ppt.o
primes pattern.o pr_tbl.o primes.o
quiz quiz.o rxp.o lib/fgetln.o
rain rain.o
rain rain.o lib/getprogname.o
random random.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
@@ -112,7 +112,8 @@ rogue hit.o init.o inventory.o level.o machdep.o main.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
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 \
lib/strlcpy.o
snake/snake/snake snake.o
snake/snscore/snscore snscore.o
tetris input.o scores.o screen.o shapes.o tetris.o

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
factor

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
fish
pathnames.h

View File

@@ -1,4 +1,4 @@
/* $NetBSD: fish.c,v 1.15 2004/01/27 20:30:29 jsm Exp $ */
/* $NetBSD: fish.c,v 1.16 2005/02/15 12:56:20 jsm Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: fish.c,v 1.15 2004/01/27 20:30:29 jsm Exp $");
__RCSID("$NetBSD: fish.c,v 1.16 2005/02/15 12:56:20 jsm Exp $");
#endif
#endif /* not lint */
@@ -472,7 +472,7 @@ instructions()
err(1, "open %s", _PATH_INSTR);
if (dup2(fd, 0) == -1)
err(1, "dup2");
(void)execl("/bin/sh", "sh", "-c", pager, NULL);
(void)execl("/bin/sh", "sh", "-c", pager, (char *) NULL);
err(1, "exec sh -c %s", pager);
/*NOTREACHED*/
case -1:

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
*.dat
*-o

View File

@@ -1121,7 +1121,7 @@ It's the other end of the kettle of fish.
%
It's the straw that broke the ice.
%
It's the the highest of the lows.
It's the highest of the lows.
%
It's the vilest smell I ever heard.
%

View File

@@ -109,7 +109,7 @@ You patch a bug, and dump it again:
%
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
-- Mahatma Ghandi
-- Mahatma Gandhi
%
A [golf] ball hitting a tree shall be deemed not to have hit the tree.
Hitting a tree is simply bad luck and has no place in a scientific
@@ -191,7 +191,7 @@ A closed mouth gathers no foot.
A conclusion is simply the place where someone got tired of thinking.
%
A CONS is an object which cares.
-- Bernie Greenberg.
-- Bernie Greenberg
%
A consultant is a person who borrows your watch, tells you what time it
is, pockets the watch, and sends you a bill for it.
@@ -550,7 +550,7 @@ ov ould doderez -- tu riplais "ch", "sh", and "th" rispektivli.
hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld.
%
A power so great, it can only be used for Good or Evil!
-- Firesign Theatre, "The Giant Rat of Sumatra"
-- The Firesign Theatre, "The Giant Rat of Sumatra"
%
A priest asked: What is Fate, Master?
@@ -583,7 +583,7 @@ A professor is one who talks in someone else's sleep.
%
A programmer is a person who passes as an exacting expert on the basis
of being able to turn out, after innumerable punching, an infinite
series of incomprehensive answers calculated with micrometric
series of incomprehensible answers calculated with micrometric
precisions from vague assumptions based on debatable figures taken from
inconclusive documents and carried out on instruments of problematical
accuracy by persons of dubious reliability and questionable mentality
@@ -1071,7 +1071,7 @@ every organism to live beyond its income.
-- Samuel Butler, "Notebooks"
%
All science is either physics or stamp collecting.
-- E. Rutherford
-- Ernest Rutherford
%
All snakes who wish to remain in Ireland will please raise their right
hands.
@@ -1610,7 +1610,7 @@ imagine the grandeur and scope of a program that would take as long?
-- Epigrams in Programming, ACM SIGPLAN Sept. 1982
%
Art is anything you can get away with.
-- Marshall McLuhan.
-- Marshall McLuhan
%
Art is either plagiarism or revolution.
-- Paul Gauguin
@@ -2008,7 +2008,7 @@ both Parliament and Party.
It stands today, a monument to human spirit. If life exists on other
planets, this may be the first message received from us.
-- The Realist, November, 1964.
-- The Realist, November, 1964
%
Beware of bugs in the above code; I have only proved it correct, not
tried it.
@@ -2132,7 +2132,7 @@ when they are between the ages of 18 months and 90 years.
-- James Thurber
%
Boys will be boys, and so will a lot of middle-aged men.
-- Kin Hubbard
-- Kim Hubbard
%
Brace yourselves. We're about to try something that borders on the
unique: an actually rather serious technical book which is not only
@@ -2772,7 +2772,7 @@ Computers will not be perfected until they can compute how much more
than the estimate the job will cost.
%
Conceit causes more conversation than wit.
-- LaRouchefoucauld
-- La Rochefoucauld
%
Concept, n.:
Any "idea" for which an outside consultant billed you more than
@@ -2792,7 +2792,7 @@ Confidence is the feeling you have before you understand the situation.
%
Congratulations! You have purchased an extremely fine device that
would give you thousands of years of trouble-free service, except that
you undoubtably will destroy it via some typical bonehead consumer
you undoubtedly will destroy it via some typical bonehead consumer
maneuver. Which is why we ask you to PLEASE FOR GOD'S SAKE READ THIS
OWNER'S MANUAL CAREFULLY BEFORE YOU UNPACK THE DEVICE. YOU ALREADY
UNPACKED IT, DIDN'T YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED
@@ -3027,7 +3027,7 @@ blessed.
default, n.:
[Possibly from Black English "De fault wid dis system is you,
mon."] The vain attempt to avoid errors by inactivity. "Nothing will
come of nothing: speak again." -- King Lear.
come of nothing: speak again." -- King Lear
-- Stan Kelly-Bootle, "The Devil's DP Dictionary"
%
#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
@@ -3451,7 +3451,7 @@ the plastic underneath -- black. According to the instructions, this
means the puzzle is solved.
-- Steve Rubenstein
%
Eat drink and be merry, for tomorrow they may make it illegal.
Eat, drink, and be merry, for tomorrow they may make it illegal.
%
Eat, drink, and be merry, for tomorrow you may work.
%
@@ -3641,7 +3641,7 @@ spending money alone. It is spending the sweat of its laborers, the
genius of its scientists, the hopes of its children. This is not a way
of life at all in any true sense. Under the clouds of war, it is
humanity hanging on a cross of iron.
-- Dwight Eisenhower, April 16, 1953
-- Dwight D. Eisenhower, April 16, 1953
%
Every Horse has an Infinite Number of Legs (proof by intimidation):
@@ -4155,7 +4155,7 @@ For years a secret shame destroyed my peace --
I'd not read Eliot, Auden or MacNiece.
But now I think a thought that brings me hope:
Neither had Chaucer, Shakespeare, Milton, Pope.
-- Justin Richardson.
-- Justin Richardson
%
For your penance, say five Hail Marys and one loud BLAH!
%
@@ -4287,7 +4287,7 @@ A: He told me, he says, "I have to kill you because you can identify
Q: Did he kill you?
A: No.
%
fortune: cpu time/usefulness ratio too high -- core dumped.
fortune: CPU time/usefulness ratio too high -- core dumped.
%
Fortune: You will be attacked next Wednesday at 3:15 p.m. by six samurai
sword wielding purple fish glued to Harley-Davidson motorcycles.
@@ -4471,8 +4471,7 @@ think not, my friend, I think not.
extracurricular activity except you."
"Well, gee, doesn't Louise count?"
"Only to ten, Mudhead."
-- Firesign Theater
-- The Firesign Theatre
%
Gee, Toto, I don't think we are in Kansas anymore.
%
@@ -4752,7 +4751,7 @@ Goldenstern's Rules:
%
Good advice is something a man gives when he is too old to set a bad
example.
-- La Rouchefoucauld
-- La Rochefoucauld
%
Good day for a change of scene. Repaper the bedroom wall.
%
@@ -4780,7 +4779,7 @@ well.
%
Gosh that takes me back... or is it forward? That's the trouble with
time travel, you never can tell.
-- Doctor Who "Androids of Tara"
-- Doctor Who, "Androids of Tara"
%
Got Mole problems?
Call Avogadro 6.02 x 10^23
@@ -5553,7 +5552,7 @@ I am not now, and never have been, a girlfriend of Henry Kissinger.
-- Gloria Steinem
%
I am not now, nor have I ever been, a member of the demigodic party.
-- Dennis Ritchie
-- Dennis M. Ritchie
%
I am not sure what this is, but an `F' would only dignify it.
-- English Professor
@@ -5615,7 +5614,7 @@ I can read your mind, and you should be ashamed of yourself.
I can remember when a good politician had to be 75 percent ability and
25 percent actor, but I can well see the day when the reverse could be
true.
-- Harry Truman
-- Harry S. Truman
%
I can resist anything but temptation.
%
@@ -5820,7 +5819,7 @@ I found out why my car was humming. It had forgotten the words.
%
I gained nothing at all from Supreme Enlightenment, and for that very
reason it is called Supreme Enlightenment.
-- Gotama Buddha
-- Gautama Buddha
%
I gave up Smoking, Drinking and Sex. It was the most *__________horrifying* 20
minutes of my life!
@@ -5889,7 +5888,7 @@ have never met you, but if I do you'll need a new nose and plenty of
beefsteak and perhaps a supporter below. Westbrook Pegler, a
guttersnipe, is a gentleman compared to you. You can take that as more
of an insult than as a reflection on your ancestry.
-- President Harry S Truman
-- President Harry S. Truman
%
I have learned
To spell hors d'oeuvres
@@ -6446,7 +6445,7 @@ And from that full meridian of my glory
I haste now to my setting. I shall fall,
Like a bright exhalation in the evening
And no man see me more.
-- Shakespeare
-- William Shakespeare
%
IBM had a PL/I,
Its syntax worse than JOSS;
@@ -6700,7 +6699,7 @@ Sabbath-breaking, and from that to incivility and procrastination.
-- Thomas De Quincey (1785 - 1859)
%
If one studies too zealously, one easily loses his pants.
-- A. Einstein.
-- Albert Einstein
%
If only God would give me some clear sign! Like making a large deposit
in my name at a Swiss bank.
@@ -6816,7 +6815,7 @@ If you can't be careful, give me a call.
If you can't learn to do it well, learn to enjoy doing it badly.
%
If you cannot convince them, confuse them.
-- Harry S Truman
-- Harry S. Truman
%
If you didn't get caught, did you really do it?
%
@@ -7465,7 +7464,7 @@ Curiously enough, the dolphins had long known of the impending
destruction of the of the planet Earth and had made many attempts to
alert mankind to the danger; but most of their communications were
misinterpreted ...
-- Douglas Adams "The Hitch-Hikers' Guide To The Galaxy"
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
It is better for civilization to be going down the drain than to be
coming up it.
@@ -8259,7 +8258,7 @@ weren't for other people.
Life would be so much easier if we could just look at the source code.
%
Life, loathe it or ignore it, you can't like it.
-- Marvin, "Hitchhiker's Guide to the Galaxy"
-- Marvin, "The Hitchhiker's Guide to the Galaxy"
%
Like so many Americans, she was trying to construct a life that made
sense from things she found in gift shops.
@@ -8631,7 +8630,7 @@ Men were real men, women were real women, and small, furry creatures
from Alpha Centauri were REAL small, furry creatures from Alpha
Centauri. Spirits were brave, men boldly split infinitives that no man
had split before. Thus was the Empire forged.
-- "The Hitchhiker's Guide to the Galaxy", Douglas Adams
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
Men's skin is different from women's skin. It is usually bigger, and
it has more snakes tattooed on it. Also, if you examine a woman's skin
@@ -9239,13 +9238,13 @@ Ninety-Ninety Rule of Project Schedules:
The first ninety percent of the task takes ninety percent of
the time, and the last ten percent takes the other ninety percent.
%
Nirvana? Thats the place where the powers that be and their friends
Nirvana? That's the place where the powers that be and their friends
hang out.
-- Zonker Harris
%
No animal should ever jump on the dining room furniture unless
absolutely certain he can hold his own in conversation.
-- Fran Lebowitz
-- Fran Leibowitz
%
No committee could ever come up with anything as revolutionary as a
camel -- anything as practical and as perfectly designed to perform
@@ -9361,7 +9360,7 @@ chipped at it a bit, and everything was just fine ...
-- Stanislaw Lem, "Cyberiad"
%
Not Hercules could have knock'd out his brains, for he had none.
-- Shakespeare
-- William Shakespeare
%
Not only is this incomprehensible, but the ink is ugly and the paper
is from the wrong kind of tree.
@@ -9666,10 +9665,10 @@ each of us observes, in his own way, by going to the mall of his
choice.
In the old days, it was not called the Holiday Season; the Christians
called it "Christmas" and went to church; the Jews called it "Hanukka"
called it "Christmas" and went to church; the Jews called it "Hanukkah"
and went to synagogue; the atheists went to parties and drank. People
passing each other on the street would say "Merry Christmas!" or "Happy
Hanukka!" or (to the atheists) "Look out for the wall!"
Hanukkah!" or (to the atheists) "Look out for the wall!"
-- Dave Barry, "Christmas Shopping: A Survivor's Guide"
%
Once at a social gathering, Gladstone said to Disraeli, "I predict,
@@ -10344,7 +10343,7 @@ laughter, singing
That's the way the chimney smokes
Pope Goestheveezl
The square was finally cleared by armed carabineri with tears of
The square was finally cleared by armed carabinieri with tears of
laughter streaming down their faces. The event set a record for
hilarious civic functions, smashing the previous record set when Baron
Hans Neizant B"ompzidaize was elected Landburgher of K"oln in 1653.
@@ -10566,10 +10565,10 @@ Q: How many heterosexual males does it take to screw in a light bulb
in San Francisco?
A: Both of them.
%
Q: How many IBM cpu's does it take to do a logical right shift?
Q: How many IBM CPUs does it take to do a logical right shift?
A: 33. 1 to hold the bits and 32 to push the register.
%
Q: How many IBM CPU's does it take to execute a job?
Q: How many IBM CPUs does it take to execute a job?
A: Four; three to hold it down, and one to rip its head off.
%
Q: How many IBM types does it take to change a light bulb?
@@ -11140,7 +11139,7 @@ pencil.
Science is facts; just as houses are made of stones, so is science made
of facts; but a pile of stones is not a house and a collection of facts
is not necessarily science.
-- Henri Poincair'e
-- Henri Poincar'e
%
Science is what happens when preconception meets verification.
%
@@ -11269,7 +11268,7 @@ Sex is not the answer. Sex is the question. "Yes" is the answer.
-- Swami X
%
Sex is the mathematics urge sublimated.
-- M. C. Reed.
-- M. C. Reed
%
Sex without love is an empty experience, but, as empty experiences go,
it's one of the best.
@@ -11588,7 +11587,7 @@ Sorry. I forget what I was going to say.
Space is big. You just won't believe how vastly, hugely, mind-
bogglingly big it is. I mean, you may think it's a long way down the
road to the drug store, but that's just peanuts to space.
-- "The Hitchhiker's Guide to the Galaxy"
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
Spare no expense to save money on this one.
-- Samuel Goldwyn
@@ -11809,7 +11808,7 @@ Every now and then when your life gets complicated and the weasels
start closing in, the only cure is to load up on heinous chemicals and
then drive like a bastard from Hollywood to Las Vegas ... with the
music at top volume and at least a pint of ether.
-- H.S. Thompson, "Fear and Loathing in Las Vegas"
-- H. S. Thompson, "Fear and Loathing in Las Vegas"
%
T: One big monster, he called TROLL.
He don't rock, and he don't roll;
@@ -12430,7 +12429,7 @@ down anything he damn well pleases.
%
The grand leap of the whale up the Fall of Niagara is esteemed, by all
who have seen it, as one of the finest spectacles in nature.
-- Benjamin Franklin.
-- Benjamin Franklin
%
The Great Bald Swamp Hedgehog:
The Great Bald Swamp Hedgehog of Billericay displays, in
@@ -12573,7 +12572,7 @@ The lawgiver, of all beings, most owes the law allegiance. He of all
men should behave as though the law compelled him. But it is the
universal weakness of mankind that what we are given to administer we
presently imagine we own.
-- H.G. Wells
-- H. G. Wells
%
THE LESSER-KNOWN PROGRAMMING LANGUAGES #10: SIMPLE
@@ -12636,7 +12635,7 @@ who end up using this language.
THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE
Named after the famous French philosopher and mathematician Rene
DesCartes, RENE is a language used for artificial intelligence. The
Descartes, RENE is a language used for artificial intelligence. The
language is being developed at the Chicago Center of Machine Politics
and Programming under a grant from the Jane Byrne Victory Fund. A
spokesman described the language as "Just as great as dis [sic] city of
@@ -12715,7 +12714,7 @@ one has ever been.
%
The man who sets out to carry a cat by its tail learns something that
will always be useful and which never will grow dim or doubtful.
-- Mark Twain.
-- Mark Twain
%
The marvels of today's modern technology include the development of a
soda can, when discarded will last forever ... and a $7,000 car which
@@ -12831,7 +12830,7 @@ The New York Times is read by the people who run the country. The
Washington Post is read by the people who think they run the country.
The National Enquirer is read by the people who think Elvis is alive
and running the country ...
-- Robert J Woodhead
-- Robert J. Woodhead
%
The nice thing about standards is that there are so many of them to
choose from.
@@ -12913,7 +12912,7 @@ The opossum is a very sophisticated animal. It doesn't even get up
until 5 or 6 p.m.
%
The opposite of a profound truth may well be another profound truth.
-- Bohr
-- Niels Bohr
%
The optimum committee has no members.
-- Norman Augustine
@@ -13056,7 +13055,7 @@ the insurance before running off to Germany where it lives in hiding.
"The pyramid is opening!"
"Which one?"
"The one with the ever-widening hole in it!"
-- Firesign Theater, "How Can You Be In Two Places At
-- The Firesign Theatre, "How Can You Be In Two Places At
Once When You're Not Anywhere At All"
%
The qotc (quote of the con) was Liz's:
@@ -13325,7 +13324,7 @@ The Third Law: You can only break even at absolute zero.
%
The trouble with a kitten is that
When it grows up, it's always a cat
-- Ogden Nash.
-- Ogden Nash
%
The trouble with being poor is that it takes up all your time.
%
@@ -13639,7 +13638,7 @@ inexplicable.
There is another theory which states that this has already happened.
-- Douglas Adams, "The Hitch Hiker's Guide to the Galaxy"
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
There is hopeful symbolism in the fact that flags do not wave in a vacuum.
-- Arthur C. Clarke
@@ -13943,7 +13942,7 @@ This is your fortune.
This land is full of trousers!
this land is full of mausers!
And pussycats to eat them when the sun goes down!
-- Firesign Theater
-- The Firesign Theatre
%
This land is made of mountains,
This land is made of mud,
@@ -13986,7 +13985,7 @@ student newspaper, of Tuesday, 3/10/87.
which identifies errors in the original program.
%
This sentence contradicts itself -- no actually it doesn't.
-- Hofstadter
-- Douglas Hofstadter
%
... This striving for excellence extends into people's personal lives
as well. When '80s people buy something, they buy the best one, as
@@ -14436,7 +14435,7 @@ unix soit qui mal y pense
%
UNIX was half a billion (500000000) seconds old on
Tue Nov 5 00:53:20 1985 GMT (measuring since the time(2) epoch).
-- Andy Tannenbaum
-- Andrew S. Tanenbaum
%
Unnamed Law:
If it happens, it must be possible.
@@ -14622,7 +14621,7 @@ We are on the verge: Today our program proved Fermat's next-to-last theorem.
-- Epigrams in Programming, ACM SIGPLAN Sept. 1982
%
We are upping our standards ... so up yours.
-- Pat Paulsen for President, 1988.
-- Pat Paulsen for President, 1988
%
We can defeat gravity. The problem is the paperwork involved.
%
@@ -14779,7 +14778,7 @@ Weiner's Law of Libraries:
%
Welcome thy neighbor into thy fallout shelter. He'll come in handy if
you run out of food.
-- Dean McLaughlin.
-- Dean McLaughlin
%
Well, here it is, 1983, so it won't be long before you start reading a
lot of boring stories about people like Vance Hartke. Hartke is a
@@ -14830,7 +14829,7 @@ coefficient of relevance to Key of Time: zero."
"Well," Brahma said, "even after ten thousand explanations, a fool is
no wiser, but an intelligent man requires only two thousand five
hundred."
-- The Mahabharata.
-- The Mahabharata
%
Westheimer's Discovery:
A couple of months in the laboratory can frequently save a
@@ -14868,7 +14867,7 @@ What garlic is to salad, insanity is to art.
What George Washington did for us was to throw out the British, so
that we wouldn't have a fat, insensitive government running our
country. Nice try anyway, George.
-- D.J. on KSFO/KYA
-- D. J. on KSFO/KYA
%
What good is a ticket to the good life, if you can't find the
entrance?
@@ -15193,7 +15192,7 @@ When you are in it up to your ears, keep your mouth shut.
When you don't know what you are doing, do it neatly.
%
When you have an efficient government, you have a dictatorship.
-- Harry Truman
-- Harry S. Truman
%
When you have shot and killed a man you have in some measure
clarified your attitude toward him. You have given a definite answer
@@ -15410,7 +15409,7 @@ Why You Can't Run When There's Trouble in the Office:
No matter where you stand, no matter how far or fast you flee,
when it hits the fan, as much as possible will be propelled in your
direction, and almost none will be returned to the source.
-- John L. Shelton
-- John L. Shelton
%
Wiker's Law:
Government expands to absorb revenue and then some.
@@ -15452,7 +15451,7 @@ try to be a fraud and a half.
-- Otto von Bismark
%
With a rubber duck, one's never alone.
-- "The Hitchhiker's Guide to the Galaxy"
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
With all the fancy scientists in the world, why can't they just once
build a nuclear balm?
@@ -15877,7 +15876,7 @@ deep space that I really wish I'd listened to what my mother told me
when I was young!"
"Why, what did she tell you?"
"I don't know, I didn't listen!"
-- Douglas Adams, "Hitchhiker's Guide to the Galaxy"
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
%
You look like a million dollars. All green and wrinkled.
%
@@ -15929,7 +15928,7 @@ You possess a mind not merely twisted, but actually sprained.
%
You probably wouldn't worry about what people think of you if you could
know how seldom they do.
-- Olin Miller.
-- Olin Miller
%
You should emulate your heros, but don't carry it too far. Especially
if they are dead.

View File

@@ -176,7 +176,6 @@ CONGRAM
CONtractor
CPPR
CPU
CPU's
CPUs
CRN
CS
@@ -1387,8 +1386,6 @@ conks
copacetic
corkenpoppen
corpuscle
cpu
cpu's
crabgrass
crapshoot
criminology

View File

@@ -20276,9 +20276,9 @@ Hideously disfigured by an ancient Indian curse?
Call (511) 338-0959 for an immediate appointment.
%
Hier liegt ein Mann ganz obnegleich;
Im Leibe dick, an Suden reich.
Wir haben ihn in das Grab gesteckt, Here lies a man with sundry flaws
Hier liegt ein Mann ganz ohnegleich;
Im Leibe dick, an Suenden reich.
Wir haben ihn ins Grab gesteckt, Here lies a man with sundry flaws
Weil es uns dunkt er sei verreckt. And numerous Sins upon his head;
We buried him today because
As far as we can tell, he's dead.
@@ -30870,7 +30870,7 @@ MEETINGS:
%
Meetings are an addictive, highly self indulgent activity that
corporations and other large organizations habitually engage
in only becuase they cannot actually masturbate.
in only because they cannot actually masturbate.
-- Dave Barry
%
MEMO:
@@ -36197,7 +36197,7 @@ SAMPLE: Proof of induction without proof of induction.
for every natural number less than n. N is arbitrary, so we can take n
as large as we want. If n is sufficiently large, the case of n+1 is
trivially equivalent, so the only important n are n less than n. We can
take n = n (from above), so it's true for n+1 becuase it's just about n.
take n = n (from above), so it's true for n+1 because it's just about n.
QED. (QED translates from the Latin as "So what?")
%
Proof techniques #2: Proof by Oddity.
@@ -42099,7 +42099,7 @@ utterly absurd; indeed, in view of the silliness of the majority of mankind,
a widespread belief is more often likely to be foolish than sensible.
-- Bertrand Russell, in "Marriage and Morals", 1929
%
The fact that hitler was a politcal genius unmasks the nature of politics
The fact that Hitler was a political genius unmasks the nature of politics
in general as no other can.
-- Wilhelm Reich
%

View File

@@ -8483,7 +8483,7 @@ you lose interest.
-- Professor Irwin Corey
%
Mary had a little lamb,
It's fleece as white as snow.
Its fleece as white as snow.
It followed her to school one day,
And got fucked by a big black dog.
%

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
fortune
pathnames.h
fortune.6

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: fortune.6,v 1.10 2003/08/07 09:37:13 agc Exp $
.\" $NetBSD: fortune.6,v 1.11 2004/09/09 22:01:08 wiz Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" @(#)fortune.6 8.3 (Berkeley) 4/19/94
.\"
.Dd April 19, 1994
.Dd September 9, 2004
.Dt FORTUNE 6
.Os
.Sh NAME
@@ -66,9 +66,13 @@ on multiple files).
.It Fl f
Print out the list of files which would be searched, but don't
print a fortune.
.It Fl i
Ignore case for
.Fl m
patterns.
.It Fl l
Long dictums only.
.It Fl m
.It Fl m Ar pattern
Print out all fortunes which match the regular expression
.Ar pattern .
See
@@ -96,10 +100,6 @@ Needs be.
.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.
@@ -110,13 +110,14 @@ to guarantee that the message can be read before the screen is cleared.
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
.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
.Sq %
character.
If it is, there will be an
.Ar N
percent probability that an adage will be picked from that file
or directory.
@@ -133,7 +134,7 @@ with
.Em funny
twice as big, saying
.Bd -literal -offset indent
fortune funny not-funny
$ fortune funny not-funny
.Ed
.Pp
will get you fortunes out of
@@ -141,27 +142,41 @@ will get you fortunes out of
two-thirds of the time.
The command
.Bd -literal -offset indent
fortune 90% funny 10% not-funny
$ 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
.Dq 10%
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
$ fortune -e
.Ed
.Pp
is equivalent to
.Bd -literal -offset indent
fortune 50% funny 50% not
.Em -funny
$ fortune 50% funny 50% not-funny
.Ed
.Pp
Datafiles for
.Nm
are created by the
.Xr strfile 8
utility, which is not installed by default,
The source code for this utility
can on BSD systems be found in
.Pa /usr/src/games/fortune/strfile ,
if it exists.
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa @fortune_dir@
.Bl -tag -width XX@fortune_dir@/*XX -compact
.It Pa @fortune_dir@/*
Fortune files.
.El
.Sh SEE ALSO
.Xr regex 3
.Xr regex 3 ,
.Xr random 6 ,
.Xr rot13 6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: fortune.c,v 1.43 2004/01/27 20:30:29 jsm Exp $ */
/* $NetBSD: fortune.c,v 1.44 2004/11/05 21:30:32 dsl Exp $ */
/*-
* Copyright (c) 1986, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\
#if 0
static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: fortune.c,v 1.43 2004/01/27 20:30:29 jsm Exp $");
__RCSID("$NetBSD: fortune.c,v 1.44 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -287,9 +287,9 @@ rot13(line, len)
len = strlen(line);
for (p = line; (ch = *p) != 0; ++p)
if (isupper(ch))
if (isupper((unsigned char)ch))
*p = 'A' + (ch - 'A' + 13) % 26;
else if (islower(ch))
else if (islower((unsigned char)ch))
*p = 'a' + (ch - 'a' + 13) % 26;
}
@@ -458,11 +458,11 @@ form_file_list(files, file_cnt)
}
for (i = 0; i < file_cnt; i++) {
percent = NO_PROB;
if (!isdigit(files[i][0]))
if (!isdigit((unsigned char)files[i][0]))
sp = files[i];
else {
percent = 0;
for (sp = files[i]; isdigit(*sp); sp++)
for (sp = files[i]; isdigit((unsigned char)*sp); sp++)
percent = percent * 10 + *sp - '0';
if (percent > 100) {
warnx("Percentages must be <= 100");
@@ -1273,7 +1273,7 @@ conv_pat(orig)
cnt = 1; /* allow for '\0' */
for (sp = orig; *sp != '\0'; sp++)
if (isalpha(*sp))
if (isalpha((unsigned char)*sp))
cnt += 4;
else
cnt++;
@@ -1281,16 +1281,16 @@ conv_pat(orig)
err(1, NULL);
for (sp = new; *orig != '\0'; orig++) {
if (islower(*orig)) {
if (islower((unsigned char)*orig)) {
*sp++ = '[';
*sp++ = *orig;
*sp++ = toupper(*orig);
*sp++ = toupper((unsigned char)*orig);
*sp++ = ']';
}
else if (isupper(*orig)) {
else if (isupper((unsigned char)*orig)) {
*sp++ = '[';
*sp++ = *orig;
*sp++ = tolower(*orig);
*sp++ = tolower((unsigned char)*orig);
*sp++ = ']';
}
else

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
strfile

View File

@@ -1,8 +1,8 @@
.\" $NetBSD: strfile.8,v 1.11 2003/08/07 09:37:14 agc Exp $
.\" $NetBSD: strfile.8,v 1.12 2004/09/09 22:03:21 wiz 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.
.\"
@@ -97,7 +97,7 @@ field to be set.
.El
.Pp
The format of the header is:
.Bd -literal
.Bd -literal -offset indent
#define VERSION 1
unsigned long str_version; /* version number */
unsigned long str_numstr; /* # of strings in the file */
@@ -128,14 +128,14 @@ when
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 SEE ALSO
.Xr byteorder 3 ,
.Xr fortune 6
.Sh HISTORY
The
.Nm strfile

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
unstr

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
gomoku

View File

@@ -1,4 +1,4 @@
/* $NetBSD: stoc.c,v 1.7 2003/08/07 09:37:18 agc Exp $ */
/* $NetBSD: stoc.c,v 1.8 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
#else
__RCSID("$NetBSD: stoc.c,v 1.7 2003/08/07 09:37:18 agc Exp $");
__RCSID("$NetBSD: stoc.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -88,7 +88,7 @@ ctos(mp)
for (i = 0; mv[i].m_code >= 0; i++)
if (strcmp(mp, mv[i].m_text) == 0)
return(mv[i].m_code);
if (!isalpha(mp[0]))
if (!isalpha((unsigned char)mp[0]))
return(ILLEGAL);
i = atoi(&mp[1]);
if (i < 1 || i > 19)

View File

@@ -1,10 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
hack
makedefs
pathnames.h
hack.6
hack.onames.h

View File

@@ -146,7 +146,7 @@ c a cockatrice;
gle glance from its yellow, piercing toad's eyes will kill
both man and beast. Its power of destruction is said to be
so great that sometimes simply to hear its hiss can prove
fatal. Its breath is so venomenous that it causes all vege-
fatal. Its breath is so venomous that it causes all vege-
tation to wither.
There is, however, one creature which can withstand the
basilisk's deadly gaze, and this is the weasel. No one knows

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: hack.6,v 1.13 2003/06/27 22:48:35 wiz Exp $ -*- nroff -*-
.\" $NetBSD: hack.6,v 1.14 2004/06/01 10:10:06 wiz Exp $ -*- nroff -*-
.\"
.\" Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
.\" Amsterdam
@@ -88,7 +88,7 @@ will give you a list of the available commands and the command
.Ic /
will identify the things you see on the screen.
.Pp
To win the game (as opposed to merely playing to beat other people high
To win the game (as opposed to merely playing to beat other people's high
scores) you must locate the Amulet of Yendor which is somewhere below
the 20th level of the dungeon and get it out.
Nobody has achieved this yet and if somebody does, he will probably go

View File

@@ -77,10 +77,10 @@ __RCSID("$NetBSD: hack.termcap.c,v 1.12 2003/04/02 18:36:40 jsm Exp $");
#include "def.flag.h" /* for flags.nonull */
static char tbuf[512];
char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
static char *VS, *VE;
static int SG;
char PC = '\0';
char PC = '\0';
char *CD; /* tested in pri.c: docorner() */
int CO, LI; /* used in pri.c and whatis.c */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $ */
/* $NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hack.u_init.c,v 1.7 2003/04/02 18:36:41 jsm Exp $");
__RCSID("$NetBSD: hack.u_init.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -169,8 +169,8 @@ u_init()
rolesyms[i] = 0;
if ((pc = pl_character[0]) != '\0') {
if (islower(pc))
pc = toupper(pc);
if (islower((unsigned char)pc))
pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0)
goto got_suffix; /* implies experienced */
printf("\nUnknown role: %c\n", pc);
@@ -201,8 +201,8 @@ u_init()
printf("? [%s] ", rolesyms);
while ((pc = readchar()) != '\0') {
if (islower(pc))
pc = toupper(pc);
if (islower((unsigned char)pc))
pc = toupper((unsigned char)pc);
if ((i = role_index(pc)) >= 0) {
printf("%c\n", pc); /* echo */
(void) fflush(stdout); /* should be seen */

View File

@@ -191,7 +191,7 @@ If you can't learn to do it well, learn to enjoy doing it badly.
If you need a wand of digging, kindly ask the minotaur.
If you see nurses you better start looking somewhere for a doctor.
If you turn blind: don't expect your dog to be turned into a seeing-eye dog.
If you want to feal great, you must eat something real big.
If you want to feel great, you must eat something real big.
If you want to float you'd better eat a floating eye.
If you want to genocide nurses, genocide @'s.
If you want to hit, use a dagger.

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
hangman
pathnames.h
hangman.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: getword.c,v 1.8 2003/08/07 09:37:21 agc Exp $ */
/* $NetBSD: getword.c,v 1.9 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getword.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: getword.c,v 1.8 2003/08/07 09:37:21 agc Exp $");
__RCSID("$NetBSD: getword.c,v 1.9 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -63,7 +63,7 @@ getword()
if (strlen(Word) < Minlen)
continue;
for (wp = Word; *wp; wp++)
if (!islower(*wp))
if (!islower((unsigned char)*wp))
goto cont;
break;
cont: ;

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
hunt
hunt.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hunt.c,v 1.22 2004/02/08 22:23:50 jsm Exp $ */
/* $NetBSD: hunt.c,v 1.23 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hunt.c,v 1.22 2004/02/08 22:23:50 jsm Exp $");
__RCSID("$NetBSD: hunt.c,v 1.23 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
# include <sys/param.h>
@@ -149,7 +149,7 @@ main(ac, av)
break;
case 't':
team = *optarg;
if (!isdigit(team)) {
if (!isdigit((unsigned char)team)) {
warnx("Team names must be numeric");
team = ' ';
}
@@ -1065,7 +1065,7 @@ env_init(enter_status)
# endif
else if (strncmp(envp, "team=", s - envp + 1) == 0) {
team = *(s + 1);
if (!isdigit(team))
if (!isdigit((unsigned char)team))
team = ' ';
if ((s = strchr(envp, ',')) == NULL) {
*envp = '\0';
@@ -1128,7 +1128,7 @@ again:
goto again;
}
for (cp = name; *cp != '\0'; cp++)
if (!isprint(*cp)) {
if (!isprint((unsigned char)*cp)) {
name[0] = '\0';
printf("Illegal character in your code name.\n");
goto again;

View File

@@ -1,4 +1,4 @@
/* $NetBSD: otto.c,v 1.7 2004/02/08 22:23:50 jsm Exp $ */
/* $NetBSD: otto.c,v 1.8 2004/11/05 21:30:32 dsl Exp $ */
# ifdef OTTO
/*
* Copyright (c) 1983-2003, Regents of the University of California.
@@ -45,7 +45,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: otto.c,v 1.7 2004/02/08 22:23:50 jsm Exp $");
__RCSID("$NetBSD: otto.c,v 1.8 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
# include <sys/time.h>
@@ -438,7 +438,7 @@ face_and_move_direction(rel_dir, distance)
int i;
struct item items[NUMDIRECTIONS];
command[comlen++] = toupper(cmd);
command[comlen++] = toupper((unsigned char)cmd);
if (distance == 0) {
/* rotate ottolook's to be in right position */
for (i = 0; i < NUMDIRECTIONS; i++)

View File

@@ -1,7 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
huntd
huntd.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: answer.c,v 1.6 2003/06/11 12:00:22 wiz Exp $ */
/* $NetBSD: answer.c,v 1.7 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: answer.c,v 1.6 2003/06/11 12:00:22 wiz Exp $");
__RCSID("$NetBSD: answer.c,v 1.7 2004/11/05 21:30:32 dsl Exp $");
#endif /* not lint */
# include <ctype.h>
@@ -116,7 +116,7 @@ answer()
* between driver and player processes
*/
for (cp1 = cp2 = name; *cp1 != '\0'; cp1++)
if (isprint(*cp1) || *cp1 == ' ')
if (isprint((unsigned char)*cp1) || *cp1 == ' ')
*cp2++ = *cp1;
*cp2 = '\0';

View File

@@ -1 +0,0 @@
bsd-games.h

View File

@@ -1,5 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp

View File

@@ -1,6 +1,6 @@
/* lib/fgetln.c - bsd-games implementation of fgetln.
*
* Copyright (c) 1997, 1998, 1999, 2000 Joseph Samuel Myers.
* Copyright (c) 1997, 1998, 1999, 2000, 2004 Joseph Samuel Myers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@ fgetln(FILE *stream, size_t *len)
res = fgets(buf, buflen, stream);
if (res == NULL)
return NULL;
while (buf[buflen - 1] == 0) { /* long line */
while (buf[buflen - 1] == 0 && buf[buflen - 2] != '\n') { /* long line */
nbuf = realloc(buf, buflen * 2);
if (nbuf == NULL)
return NULL;

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
mille

View File

@@ -1,4 +1,4 @@
/* $NetBSD: move.c,v 1.13 2003/08/07 09:37:25 agc Exp $ */
/* $NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,12 +34,16 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: move.c,v 1.13 2003/08/07 09:37:25 agc Exp $");
__RCSID("$NetBSD: move.c,v 1.15 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
#include <termios.h>
#ifdef DEBUG
#include <sys/param.h>
#endif
#include "mille.h"
#ifndef unctrl
#include "unctrl.h"
@@ -60,6 +64,13 @@ domove()
bool goodplay;
pp = &Player[Play];
for (i = 0, j = 0; i < HAND_SZ; i++)
if (pp->hand[i] != -1)
j++;
if (!j) {
nextplay();
return;
}
if (Play == PLAYER)
getmove();
else
@@ -356,9 +367,9 @@ getmove()
refresh();
while ((c = readch()) == killchar() || c == erasechar())
continue;
if (islower(c))
c = toupper(c);
if (isprint(c) && !isspace(c)) {
if (islower((unsigned char)c))
c = toupper((unsigned char)c);
if (isprint((unsigned char)c) && !isspace((unsigned char)c)) {
addch(c);
refresh();
}
@@ -426,10 +437,12 @@ getmove()
case 'Z': /* Debug code */
if (!Debug && outf == NULL) {
char buf[MAXPATHLEN];
char *sp;
prompt(FILEPROMPT);
leaveok(Board, FALSE);
refresh();
over:
sp = buf;
while ((*sp = readch()) != '\n') {
if (*sp == killchar())

View File

@@ -1,10 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
monop
initdeck
pathnames.h
monop.6
cards.pck

View File

@@ -1,4 +1,4 @@
/* $NetBSD: getinp.c,v 1.12 2004/01/27 20:30:30 jsm Exp $ */
/* $NetBSD: getinp.c,v 1.13 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: getinp.c,v 1.12 2004/01/27 20:30:30 jsm Exp $");
__RCSID("$NetBSD: getinp.c,v 1.13 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -91,8 +91,7 @@ inter:
}
*sp = '\0';
for (sp = buf; *sp; sp++)
if (isupper(*sp))
*sp = tolower(*sp);
*sp = tolower((unsigned char)*sp);
for (i = n_match = 0; list[i]; i++)
if (comp(list[i])) {
n_match++;
@@ -115,7 +114,7 @@ comp(s1)
if (buf[0] != '\0')
for (sp = buf, tsp = s1; *sp; ) {
c = isupper(*tsp) ? tolower(*tsp) : *tsp;
c = tolower((unsigned char)*tsp);
tsp++;
if (c != *sp++)
return 0;

View File

@@ -1,4 +1,4 @@
/* $NetBSD: malloc.c,v 1.3 2004/01/27 20:30:30 jsm Exp $ */
/* $NetBSD: malloc.c,v 1.4 2004/12/14 00:21:01 nathanw Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)malloc.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: malloc.c,v 1.3 2004/01/27 20:30:30 jsm Exp $");
__RCSID("$NetBSD: malloc.c,v 1.4 2004/12/14 00:21:01 nathanw Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -59,7 +59,7 @@ __RCSID("$NetBSD: malloc.c,v 1.3 2004/01/27 20:30:30 jsm Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <threadlib.h>
#include <pthread.h>
/*
@@ -118,7 +118,7 @@ static int pagebucket; /* page size bucket */
static u_int nmalloc[NBUCKETS];
#endif
static mutex_t malloc_mutex = MUTEX_INITIALIZER;
static pthread_mutex_t malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
static void morecore(int);
static int findbucket(union overhead *, int);
@@ -176,7 +176,7 @@ malloc(nbytes)
long n;
unsigned amt;
mutex_lock(&malloc_mutex);
pthread_mutex_lock(&malloc_mutex);
/*
* First time malloc is called, setup page size and
@@ -191,7 +191,7 @@ malloc(nbytes)
n += pagesz;
if (n) {
if (sbrk((int)n) == (void *)-1) {
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
return (NULL);
}
}
@@ -234,7 +234,7 @@ malloc(nbytes)
if ((op = nextf[bucket]) == NULL) {
morecore(bucket);
if ((op = nextf[bucket]) == NULL) {
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
return (NULL);
}
}
@@ -245,7 +245,7 @@ malloc(nbytes)
#ifdef MSTATS
nmalloc[bucket]++;
#endif
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
#ifdef RCHECK
/*
* Record allocated size of block and
@@ -326,13 +326,13 @@ free(cp)
#endif
size = op->ov_index;
ASSERT(size < NBUCKETS);
mutex_lock(&malloc_mutex);
pthread_mutex_lock(&malloc_mutex);
op->ov_next = nextf[(unsigned int)size];/* also clobbers ov_magic */
nextf[(unsigned int)size] = op;
#ifdef MSTATS
nmalloc[(size_t)size]--;
#endif
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
}
/*
@@ -366,7 +366,7 @@ realloc(cp, nbytes)
return (NULL);
}
op = (union overhead *)(void *)((caddr_t)cp - sizeof (union overhead));
mutex_lock(&malloc_mutex);
pthread_mutex_lock(&malloc_mutex);
if (op->ov_magic == MAGIC) {
was_alloced++;
i = op->ov_index;
@@ -408,7 +408,7 @@ realloc(cp, nbytes)
op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
return (cp);
}
@@ -417,7 +417,7 @@ realloc(cp, nbytes)
free(cp);
#endif
}
mutex_unlock(&malloc_mutex);
pthread_mutex_unlock(&malloc_mutex);
if ((res = malloc(nbytes)) == NULL) {
#ifdef _REENT
free(cp);

View File

@@ -1,4 +1,4 @@
/* $NetBSD: misc.c,v 1.12 2004/01/26 09:59:36 jsm Exp $ */
/* $NetBSD: misc.c,v 1.13 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: misc.c,v 1.12 2004/01/26 09:59:36 jsm Exp $");
__RCSID("$NetBSD: misc.c,v 1.13 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -109,9 +109,9 @@ inter:
*sp = c;
if (sp == buf)
continue;
for (sp = buf; isspace(*sp); sp++)
for (sp = buf; isspace((unsigned char)*sp); sp++)
continue;
for (; isdigit(*sp); sp++)
for (; isdigit((unsigned char)*sp); sp++)
num = num * 10 + *sp - '0';
if (*sp == '\n')
return num;

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
morse

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
number

View File

@@ -1,4 +1,4 @@
/* $NetBSD: number.c,v 1.9 2004/01/27 20:30:30 jsm Exp $ */
/* $NetBSD: number.c,v 1.10 2004/11/05 21:30:32 dsl Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)number.c 8.3 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: number.c,v 1.9 2004/01/27 20:30:30 jsm Exp $");
__RCSID("$NetBSD: number.c,v 1.10 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -144,7 +144,7 @@ convert(line)
}
goto badnum;
}
if (isdigit(*p))
if (isdigit((unsigned char)*p))
continue;
switch (*p) {
case '.':

View File

@@ -1,17 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
phantasia
setup
pathnames.h
gold
lastdead
mess
monsters
motd
void
scoreboard
characs
scorefiles.stamp

View File

@@ -1,10 +1,12 @@
/* $NetBSD: fight.c,v 1.8 2004/02/08 00:32:07 jsm Exp $ */
/* $NetBSD: fight.c,v 1.10 2004/04/11 13:35:06 he Exp $ */
/*
* fight.c Phantasia monster fighting routines
*/
#include "include.h"
#undef bool
#include <curses.h>
void
encounter(particular)

View File

@@ -1,14 +1,16 @@
/* $NetBSD: gamesupport.c,v 1.6 1999/09/08 21:57:19 jsm Exp $ */
/* $NetBSD: gamesupport.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* gamesupport.c - auxiliary routines for support of Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
changestats(ingameflag)
bool ingameflag;
phbool ingameflag;
{
static char flag[2] = /* for printing values of bools */
{'F', 'T'};
@@ -20,7 +22,7 @@ changestats(ingameflag)
long loc; /* location in player file */
time_t now; /* time now */
double dtemp; /* temporary variable */
bool *bptr; /* pointer to bool item to change */
phbool *bptr; /* pointer to bool item to change */
double *dptr; /* pointer to double item to change */
short *sptr; /* pointer to short item to change */

View File

@@ -1,15 +1,15 @@
/* $NetBSD: include.h,v 1.4 1997/10/13 02:18:19 lukem Exp $ */
/* $NetBSD: include.h,v 1.5 2004/04/07 17:46:47 ross Exp $ */
/*
* include.h - includes all important files for Phantasia
*/
#include <ctype.h>
#include <curses.h>
#include <errno.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@@ -1,10 +1,12 @@
/* $NetBSD: interplayer.c,v 1.6 1999/09/18 19:38:52 jsm Exp $ */
/* $NetBSD: interplayer.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* interplayer.c - player to player routines for Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
checkbattle()
@@ -537,7 +539,7 @@ tampered(what, arg1, arg2)
void
userlist(ingameflag)
bool ingameflag;
phbool ingameflag;
{
int numusers = 0; /* number of users on file */

View File

@@ -1,10 +1,12 @@
/* $NetBSD: io.c,v 1.6 2004/02/08 00:32:07 jsm Exp $ */
/* $NetBSD: io.c,v 1.9 2005/02/15 12:58:21 jsm Exp $ */
/*
* io.c - input/output routines for Phantasia
*/
#include "include.h"
#undef bool
#include <curses.h>
void
getstring(cp, mx)
@@ -154,7 +156,7 @@ interrupt()
int
getanswer(choices, def)
const char *choices;
bool def;
phbool def;
{
int ch; /* input */
volatile int loop; /* counter */

View File

@@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.12 2004/01/01 16:03:46 jsm Exp $ */
/* $NetBSD: main.c,v 1.15 2004/12/09 05:15:59 jmc Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
@@ -27,6 +27,7 @@
* AT&T is in no way connected with this game.
*/
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <termios.h>
@@ -57,6 +58,8 @@
*/
#include "include.h"
#undef bool
#include <curses.h>
int main(int, char **);
@@ -270,6 +273,8 @@ main(argc, argv)
void
initialstate()
{
struct stat sb;
Beyond = FALSE;
Marsh = FALSE;
Throne = FALSE;
@@ -301,6 +306,16 @@ initialstate()
if ((Energyvoidfp = fopen(_PATH_VOID, "r+")) == NULL)
error(_PATH_VOID);
if (fstat(fileno(Energyvoidfp), &sb) == -1)
error("stat");
if (sb.st_size == 0) {
/* initialize grail to new location */
Enrgyvoid.ev_active = TRUE;
Enrgyvoid.ev_x = ROLL(-1.0e6, 2.0e6);
Enrgyvoid.ev_y = ROLL(-1.0e6, 2.0e6);
writevoid(&Enrgyvoid, 0L);
}
/* NOTREACHED */
srandom((unsigned) time(NULL)); /* prime random numbers */

View File

@@ -1,10 +1,12 @@
/* $NetBSD: misc.c,v 1.10 2004/01/01 16:03:46 jsm Exp $ */
/* $NetBSD: misc.c,v 1.14 2005/02/15 12:58:21 jsm Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
*/
#include "include.h"
#undef bool
#include <curses.h>
void
@@ -63,7 +65,7 @@ movelevel()
const char *
descrlocation(playerp, shortflag)
struct player *playerp;
bool shortflag;
phbool shortflag;
{
double circle; /* corresponding circle for coordinates */
int quadrant; /* quandrant of grid */
@@ -445,7 +447,7 @@ allstatslist()
const char *
descrtype(playerp, shortflag)
struct player *playerp;
bool shortflag;
phbool shortflag;
{
int type; /* for caluculating result subscript */
static const char *const results[] =/* description table */
@@ -671,7 +673,7 @@ death(how)
if (ch == 'Y') {
cleanup(FALSE);
execl(_PATH_GAMEPROG, "phantasia", "-s",
(Wizard ? "-S" : (char *) NULL), 0);
(Wizard ? "-S" : (char *) NULL), (char *) NULL);
exit(0);
/* NOTREACHED */
}

View File

@@ -1,4 +1,8 @@
/* $NetBSD: phantstruct.h,v 1.3 1999/09/08 21:17:55 jsm Exp $ */
/* $NetBSD: phantstruct.h,v 1.5 2005/02/15 12:58:21 jsm Exp $ */
#define bool char
/* phbool is used when we need this version of bool after <curses.h>. */
#define phbool char
/*
* phantstruct.h - structure definitions for Phantasia

View File

@@ -1,4 +1,4 @@
/* $NetBSD: setup.c,v 1.12 2003/05/08 13:03:49 wiz Exp $ */
/* $NetBSD: setup.c,v 1.14 2004/12/09 05:15:59 jmc Exp $ */
/*
* setup.c - set up all files for Phantasia
@@ -109,21 +109,10 @@ main(argc, argv)
++filename; /* process next file */
}
/* 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);
path = strrchr(_PATH_VOID, '/') + 1;
/* Initialize an empty file placeholder for the grail location. */
if ((fp = fopen(path, "w")) == NULL)
Error("Cannot update %s.\n", path);
else
{
fwrite(&Enrgyvoid, SZ_VOIDSTRUCT, 1, fp);
fflush(fp);
if (ferror(fp))
Error("Writing %s.\n", path);
fclose(fp);
}
Error("Cannot create %s.\n", path);
fclose(fp);
/* create binary monster data base */
path = strrchr(_PATH_MONST, '/') + 1;

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
pig

View File

@@ -1,4 +1,4 @@
/* $NetBSD: pig.c,v 1.10 2004/01/27 20:30:30 jsm Exp $ */
/* $NetBSD: pig.c,v 1.11 2004/11/05 21:30:32 dsl Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
#if 0
static char sccsid[] = "@(#)pig.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: pig.c,v 1.10 2004/01/27 20:30:30 jsm Exp $");
__RCSID("$NetBSD: pig.c,v 1.11 2004/11/05 21:30:32 dsl Exp $");
#endif
#endif /* not lint */
@@ -102,9 +102,9 @@ pigout(buf, len)
int olen, allupper, firstupper;
/* See if the word is all upper case */
allupper = firstupper = isupper(buf[0]);
allupper = firstupper = isupper((unsigned char)buf[0]);
for (i = 1; i < len && allupper; i++)
allupper = allupper && isupper(buf[i]);
allupper = allupper && isupper((unsigned char)buf[i]);
/*
* If the word starts with a vowel, append "way". Don't treat 'y'
@@ -121,7 +121,7 @@ pigout(buf, len)
* isn't treated as a vowel.
*/
if (!allupper)
buf[0] = tolower(buf[0]);
buf[0] = tolower((unsigned char)buf[0]);
for (start = 0, olen = len;
!strchr("aeiouyAEIOUY", buf[start]) && start < olen;) {
ch = buf[len++] = buf[start++];
@@ -130,7 +130,7 @@ pigout(buf, len)
buf[len++] = buf[start++];
}
if (firstupper)
buf[start] = toupper(buf[start]);
buf[start] = toupper((unsigned char)buf[start]);
(void)printf("%.*s%s", olen, buf + start, allupper ? "AY" : "ay");
}

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
pom

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
ppt

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
primes

View File

@@ -1,8 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
quiz
pathnames.h
quiz.6

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
index

View File

@@ -1,6 +0,0 @@
a.out
*.d
*.i
*.s
*.d.tmp
rain

View File

@@ -1,4 +1,4 @@
/* $NetBSD: rain.c,v 1.16 2004/02/08 22:21:57 jsm Exp $ */
/* $NetBSD: rain.c,v 1.17 2004/05/02 21:31:23 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)rain.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: rain.c,v 1.16 2004/02/08 22:21:57 jsm Exp $");
__RCSID("$NetBSD: rain.c,v 1.17 2004/05/02 21:31:23 christos Exp $");
#endif
#endif /* not lint */
@@ -56,39 +56,45 @@ __RCSID("$NetBSD: rain.c,v 1.16 2004/02/08 22:21:57 jsm Exp $");
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
volatile sig_atomic_t sig_caught = 0;
static volatile sig_atomic_t sig_caught = 0;
int main(int, char **);
void onsig(int);
int main(int, char **);
static void onsig(int);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int x, y, j;
long cols, lines;
unsigned int delay = 0;
unsigned long val = 0;
int ch;
char *ep;
int xpos[5], ypos[5];
/* Revoke setgid privileges */
setregid(getgid(), getgid());
while ((ch = getopt(argc, argv, "d:h")) != -1)
while ((ch = getopt(argc, argv, "d:")) != -1)
switch (ch) {
case 'd':
if ((delay = (unsigned int)strtoul(optarg, (char **)NULL, 10)) < 1
|| delay > 1000)
errx(1, "invalid delay (1-1000)");
delay *= 1000; /* ms -> us */
val = strtoul(optarg, &ep, 0);
if (ep == optarg || *ep)
errx(1, "Invalid delay `%s'", optarg);
if (errno == ERANGE && val == ULONG_MAX)
err(1, "Invalid delay `%s'", optarg);
if (val >= 1000)
errx(1, "Invalid delay `%s' (1-999)", optarg);
delay = (unsigned int)val * 1000; /* ms -> us */
break;
case 'h':
default:
(void)fprintf(stderr, "usage: rain [-d delay]\n");
exit(1);
(void)fprintf(stderr, "Usage: %s [-d delay]\n",
getprogname());
return 1;
}
initscr();
@@ -97,9 +103,6 @@ main(argc, argv)
(void)signal(SIGHUP, onsig);
(void)signal(SIGINT, onsig);
(void)signal(SIGQUIT, onsig);
(void)signal(SIGSTOP, onsig);
(void)signal(SIGTSTP, onsig);
(void)signal(SIGTERM, onsig);
curs_set(0);
@@ -148,9 +151,8 @@ main(argc, argv)
}
}
void
onsig(dummy)
int dummy __attribute__((__unused__));
static void
onsig(int dummy __attribute__((__unused__)))
{
sig_caught = 1;
}

Some files were not shown because too many files have changed in this diff Show More