From 22a27dede77166c7bdf1de647d4d2b961fcd92c2 Mon Sep 17 00:00:00 2001 From: hubertf Date: Wed, 10 Feb 1999 00:45:45 +0000 Subject: 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 . --- sail/extern.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sail/extern.h') 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)); -- cgit v1.2.3