new upstream

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@10080 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2004-02-14 21:35:37 +00:00
parent 26fb70d304
commit a02c126403
224 changed files with 5624 additions and 2217 deletions

View File

@@ -1,6 +1,6 @@
# Makefrag - makefile fragment for arithmetic
#
# Copyright (c) 1997, 1998 Joseph Samuel Myers.
# Copyright (c) 1997, 1998, 2004 Joseph Samuel Myers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -26,6 +26,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
arithmetic_DEFS := $(GETPROGNAME_DEFS)
arithmetic_DIRS := $(GAMESDIR) $(MAN6DIR)
arithmetic_all: arithmetic/arithmetic arithmetic/arithmetic.6

View File

@@ -1,4 +1,4 @@
/* $NetBSD: arithmetic.c,v 1.19 2003/08/07 09:36:52 agc Exp $ */
/* $NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm 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.19 2003/08/07 09:36:52 agc Exp $");
__RCSID("$NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm Exp $");
#endif
#endif /* not lint */
@@ -84,14 +84,14 @@ __RCSID("$NetBSD: arithmetic.c,v 1.19 2003/08/07 09:36:52 agc Exp $");
#include <time.h>
#include <unistd.h>
int getrandom __P((int, int, int));
void intr __P((int)) __attribute__((__noreturn__));
int main __P((int, char *[]));
int opnum __P((int));
void penalise __P((int, int, int));
int problem __P((void));
void showstats __P((int));
void usage __P((void)) __attribute__((__noreturn__));
int getrandom(int, int, int);
void intr(int) __attribute__((__noreturn__));
int main(int, char *[]);
int opnum(int);
void penalise(int, int, int);
int problem(void);
void showstats(int);
void usage(void) __attribute__((__noreturn__));
const char keylist[] = "+-x/";
const char defaultkeys[] = "+-";
@@ -102,8 +102,6 @@ int nright, nwrong;
time_t qtime;
#define NQUESTS 20
extern char *__progname; /* from crt0.o */
/*
* Select keys from +-x/ to be asked addition, subtraction, multiplication,
* and division problems. More than one key may be given. The default is
@@ -390,6 +388,6 @@ void
usage()
{
(void)fprintf(stderr, "Usage: %s [-o +-x/] [-r range]\n",
__progname);
getprogname());
exit(1);
}