-/* $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
#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"
{&oldlc2, sizeof(oldlc2)},
{&oldloc, sizeof(oldloc)},
{&panic, sizeof(panic)},
- {&saved, sizeof(saved)},
+ {&saveday, sizeof(saveday)},
{&savet, sizeof(savet)},
{&scorng, sizeof(scorng)},
{&spk, sizeof(spk)},
*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;
}