summaryrefslogtreecommitdiffstats
path: root/backgammon/common_source/save.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2012-10-13 19:19:38 +0000
committerdholland <dholland@NetBSD.org>2012-10-13 19:19:38 +0000
commit83f2ef7227030c4b88ec1006e49d9304aa6f7be0 (patch)
tree0f69865c3aa850090b15e95a6ae7a6d599c95e11 /backgammon/common_source/save.c
parentf70c1c7e831fd972c1f452e87709f5fe158e6f4d (diff)
downloadbsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.tar.gz
bsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.tar.zst
bsdgames-darwin-83f2ef7227030c4b88ec1006e49d9304aa6f7be0.zip
Pass the move info around instead of using it as a global.
Diffstat (limited to 'backgammon/common_source/save.c')
-rw-r--r--backgammon/common_source/save.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/backgammon/common_source/save.c b/backgammon/common_source/save.c
index 5cadf51c..462050af 100644
--- a/backgammon/common_source/save.c
+++ b/backgammon/common_source/save.c
@@ -1,4 +1,4 @@
-/* $NetBSD: save.c,v 1.15 2012/10/13 18:44:15 dholland Exp $ */
+/* $NetBSD: save.c,v 1.16 2012/10/13 19:19:39 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: save.c,v 1.15 2012/10/13 18:44:15 dholland Exp $");
+__RCSID("$NetBSD: save.c,v 1.16 2012/10/13 19:19:39 dholland Exp $");
#endif
#endif /* not lint */
@@ -56,12 +56,11 @@ static const char cantrec[] = "Can't recover file: ";
static void norec(const char *) __dead;
void
-save(int n)
+save(struct move *mm, int n)
{
int fdesc;
char *fs;
char fname[50];
- struct move *mm = &gm;
if (n) {
if (tflag) {
@@ -146,10 +145,9 @@ save(int n)
}
void
-recover(const char *s)
+recover(struct move *mm, const char *s)
{
int fdesc;
- struct move *mm = &gm;
if ((fdesc = open(s, O_RDONLY)) == -1)
norec(s);