summaryrefslogtreecommitdiffstats
path: root/battlestar/extern.h
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1999-07-28 01:45:41 +0000
committerhubertf <hubertf@NetBSD.org>1999-07-28 01:45:41 +0000
commit932e74d4028472671e706b8d64965ef4a4293d0f (patch)
tree7155c281e751417d576084fd2feebae3a4e5159e /battlestar/extern.h
parentd0abda98e89948088de49cb3c2f192c15aa4518d (diff)
downloadbsdgames-darwin-932e74d4028472671e706b8d64965ef4a4293d0f.tar.gz
bsdgames-darwin-932e74d4028472671e706b8d64965ef4a4293d0f.tar.zst
bsdgames-darwin-932e74d4028472671e706b8d64965ef4a4293d0f.zip
This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it on the command line when restoring. It also eliminates a buffer overrun in determining the path to the save file, and any particular arbitrary limit on the name length. In the name of a tidier home directory, the default name is changed from "Bstar" to ".Bstar". Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk> Minor modification (s/startup/filename/ in initialize()) by me.
Diffstat (limited to 'battlestar/extern.h')
-rw-r--r--battlestar/extern.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/battlestar/extern.h b/battlestar/extern.h
index 7231ceb5..a7f02261 100644
--- a/battlestar/extern.h
+++ b/battlestar/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.11 1999/07/21 03:56:53 hubertf Exp $ */
+/* $NetBSD: extern.h,v 1.12 1999/07/28 01:45:42 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -303,6 +303,8 @@ struct objs {
extern const struct objs dayobjs[];
extern const struct objs nightobjs[];
+#define DEFAULT_SAVE_FILE ".Bstar"
+
void blast __P((void));
void bury __P((void));
int card __P((const char *, int));
@@ -325,7 +327,7 @@ int follow __P((void));
void getutmp __P((char *));
int give __P((void));
int hash __P((const char *));
-void initialize __P((char));
+void initialize __P((const char *));
void install __P((struct wlist *));
int jump __P((void));
void kiss __P((void));
@@ -347,9 +349,10 @@ void printobjs __P((void));
int put __P((void));
int puton __P((void));
void ravage __P((void));
-void restore __P((void));
+void restore __P((const char *));
int ride __P((void));
-void save __P((void));
+void save __P((const char *));
+char *save_file_name __P((const char *, size_t));
void screen __P((void));
int shoot __P((void));
void succumb __P((int));