-/* $NetBSD: save.c,v 1.6 1998/08/29 22:53:04 hubertf Exp $ */
+/* $NetBSD: save.c,v 1.9 1999/07/28 02:07:39 hubertf Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: save.c,v 1.6 1998/08/29 22:53:04 hubertf Exp $");
+__RCSID("$NetBSD: save.c,v 1.9 1999/07/28 02:07:39 hubertf Exp $");
#endif
#endif /* not lint */
#include "back.h"
-static char confirm[] = "Are you sure you want to leave now?";
-static char prompt[] = "Enter a file name: ";
-static char exist1[] = "The file '";
-static char exist2[] =
+static const char confirm[] = "Are you sure you want to leave now?";
+static const char prompt[] = "Enter a file name: ";
+static const char exist1[] = "The file '";
+static const char exist2[] =
"' already exists.\nAre you sure you want to use this file?";
-static char cantuse[] = "\nCan't use ";
-static char saved[] = "This game has been saved on the file '";
-static char type[] = "'.\nType \"backgammon ";
-static char rec[] = "\" to recover your game.\n\n";
-static char cantrec[] = "Can't recover file: ";
+static const char cantuse[] = "\nCan't use ";
+static const char saved[] = "This game has been saved on the file '";
+static const char type[] = "'.\nType \"backgammon ";
+static const char rec[] = "\" to recover your game.\n\n";
+static const char cantrec[] = "Can't recover file: ";
void
save(n)
}
*fs = '\0';
if ((fdesc = open(fname, O_RDWR)) == -1 && errno == ENOENT) {
- if ((fdesc = creat(fname, 0700)) != -1)
+ if ((fdesc = creat(fname, 0600)) != -1)
break;
}
if (fdesc != -1) {
close(fdesc);
if (yorn(0)) {
unlink(fname);
- fdesc = creat(fname, 0700);
+ fdesc = creat(fname, 0600);
break;
} else {
cflag = 1;
void
recover(s)
- char *s;
+ const char *s;
{
int fdesc;
void
norec(s)
- char *s;
+ const char *s;
{
- char *c;
+ const char *c;
tflag = 0;
writel(cantrec);