copy in from cvs; cvs2svn fucked up big time

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2003-12-19 19:12:08 +00:00
parent 351c8ca204
commit 51eabc017b
310 changed files with 7852 additions and 5005 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: quiz.c,v 1.13 1998/09/13 15:27:29 hubertf Exp $ */
/* $NetBSD: quiz.c,v 1.18 2000/05/08 07:56:05 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
#if 0
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: quiz.c,v 1.13 1998/09/13 15:27:29 hubertf Exp $");
__RCSID("$NetBSD: quiz.c,v 1.18 2000/05/08 07:56:05 mycroft Exp $");
#endif
#endif /* not lint */
@@ -69,12 +69,12 @@ static QE qlist;
static int catone, cattwo, tflag;
static u_int qsize;
char *appdstr __P((char *, char *, size_t));
char *appdstr __P((char *, const char *, size_t));
void downcase __P((char *));
void get_cats __P((char *, char *));
void get_file __P((char *));
void get_file __P((const char *));
int main __P((int, char *[]));
char *next_cat __P((char *));
const char *next_cat __P((const char *));
void quiz __P((void));
void score __P((u_int, u_int, u_int));
void show_index __P((void));
@@ -86,7 +86,7 @@ main(argc, argv)
char *argv[];
{
int ch;
char *indexfile;
const char *indexfile;
/* Revoke setgid privileges */
setregid(getgid(), getgid());
@@ -125,7 +125,7 @@ main(argc, argv)
void
get_file(file)
char *file;
const char *file;
{
FILE *fp;
QE *qp;
@@ -167,9 +167,9 @@ void
show_index()
{
QE *qp;
char *p, *s;
const char *p, *s;
FILE *pf;
char *pager;
const char *pager;
if (!isatty(1))
pager = "cat";
@@ -178,7 +178,7 @@ show_index()
pager = _PATH_PAGER;
}
if ((pf = popen(pager, "w")) == NULL)
err(1, "%s", _PATH_PAGER);
err(1, "%s", pager);
(void)fprintf(pf, "Subjects:\n\n");
for (qp = qlist.q_next; qp; qp = qp->q_next) {
for (s = next_cat(qp->q_text); s; s = next_cat(s)) {
@@ -202,7 +202,7 @@ get_cats(cat1, cat2)
{
QE *qp;
int i;
char *s;
const char *s;
downcase(cat1);
downcase(cat2);
@@ -237,7 +237,8 @@ quiz()
size_t len;
u_int guesses, rights, wrongs;
int next;
char *answer, *s, *t, question[LINE_SZ];
char *answer, *t, question[LINE_SZ];
const char *s;
srandom(time(NULL));
guesses = rights = wrongs = 0;
@@ -311,9 +312,9 @@ quiz()
score(rights, wrongs, guesses);
}
char *
const char *
next_cat(s)
char * s;
const char * s;
{
int esc;
@@ -338,10 +339,11 @@ next_cat(s)
char *
appdstr(s, tp, len)
char *s;
char *tp;
const char *tp;
size_t len;
{
char *mp, *sp;
char *mp;
const char *sp;
int ch;
char *m;