summaryrefslogtreecommitdiffstats
path: root/sail/extern.h
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1999-02-10 00:45:45 +0000
committerhubertf <hubertf@NetBSD.org>1999-02-10 00:45:45 +0000
commit22a27dede77166c7bdf1de647d4d2b961fcd92c2 (patch)
treeeba164fcad44498207f63281968e224f52d40bcb /sail/extern.h
parente0e186091a777dfe9cf3c22deeff989f459d8db9 (diff)
downloadbsdgames-darwin-22a27dede77166c7bdf1de647d4d2b961fcd92c2.tar.gz
bsdgames-darwin-22a27dede77166c7bdf1de647d4d2b961fcd92c2.zip
The game sail(6) has a function Write() which is used both with
integer arguments and with string arguments (cast to long, and in one place to int). The patch here cleans this up, making it into two separate functions; this allows for the game to be made const-correct in future and improves portability. The patch also contains two other fragments: a change to use the symbolic constant SEEK_END with fseek(), and a change to use snprintf in one place to avoid a buffer overrun. Via PR 6569 by Joseph Myers <jsm28@cam.ac.uk>.
Diffstat (limited to 'sail/extern.h')
-rw-r--r--sail/extern.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sail/extern.h b/sail/extern.h
index 935ec48c..73c4dded 100644
--- a/sail/extern.h
+++ b/sail/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.8 1998/09/13 15:27:30 hubertf Exp $ */
+/* $NetBSD: extern.h,v 1.9 1999/02/10 00:45:45 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -435,6 +435,7 @@ void makemsg __P((struct ship *, const char *, ...))
int sync_exists __P((int));
int sync_open __P((void));
void sync_close __P((int));
-void Write __P((int, struct ship *, int, long, long, long, long));
+void Write __P((int, struct ship *, long, long, long, long));
+void Writestr __P((int, struct ship *, const char *));
int Sync __P((void));
-int sync_update __P((int, struct ship *, long, long, long, long));
+int sync_update __P((int, struct ship *, const char *, long, long, long, long));