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: save.c,v 1.5 1998/09/13 00:07:24 hubertf Exp $ */
/* $NetBSD: save.c,v 1.7 1999/07/17 20:02:48 hubertf Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -43,10 +43,11 @@
#if 0
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: save.c,v 1.5 1998/09/13 00:07:24 hubertf Exp $");
__RCSID("$NetBSD: save.c,v 1.7 1999/07/17 20:02:48 hubertf Exp $");
#endif
#endif /* not lint */
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include "hdr.h"
@@ -95,7 +96,7 @@ struct savestruct save_array[] =
{&oldlc2, sizeof(oldlc2)},
{&oldloc, sizeof(oldloc)},
{&panic, sizeof(panic)},
{&saved, sizeof(saved)},
{&saveday, sizeof(saveday)},
{&savet, sizeof(savet)},
{&scorng, sizeof(scorng)},
{&spk, sizeof(spk)},
@@ -152,7 +153,10 @@ save(outfile) /* Two passes on data: first to get checksum,
*s = (*s ^ random()) & 0xFF; /* Lightly encrypt */
fwrite(p->address, p->width, 1, out);
}
fclose(out);
if (fclose(out) != 0) {
warn("writing %s", outfile);
return 1;
}
return 0;
}