summaryrefslogtreecommitdiffstats
path: root/sail
diff options
context:
space:
mode:
authorjwise <jwise@NetBSD.org>2001-01-04 02:43:32 +0000
committerjwise <jwise@NetBSD.org>2001-01-04 02:43:32 +0000
commit97e04d4fb9d218f2fb01cc75da027de2f4035be8 (patch)
tree18821c5b8e5c6f40481c3ae4c98f9b02f9f434fb /sail
parente3d903728b566a12e09bf75b912da49e60b2643b (diff)
downloadbsdgames-darwin-97e04d4fb9d218f2fb01cc75da027de2f4035be8.tar.gz
bsdgames-darwin-97e04d4fb9d218f2fb01cc75da027de2f4035be8.tar.zst
bsdgames-darwin-97e04d4fb9d218f2fb01cc75da027de2f4035be8.zip
Second half of static-ization of local funcs.
Diffstat (limited to 'sail')
-rw-r--r--sail/extern.h10
-rw-r--r--sail/misc.c14
-rw-r--r--sail/parties.c8
-rw-r--r--sail/pl_1.c8
-rw-r--r--sail/pl_2.c6
-rw-r--r--sail/pl_3.c8
-rw-r--r--sail/pl_4.c10
-rw-r--r--sail/pl_5.c10
-rw-r--r--sail/pl_6.c10
-rw-r--r--sail/pl_7.c36
-rw-r--r--sail/pl_main.c9
-rw-r--r--sail/sync.c17
12 files changed, 104 insertions, 42 deletions
diff --git a/sail/extern.h b/sail/extern.h
index 149d5007..987e2a1f 100644
--- a/sail/extern.h
+++ b/sail/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.20 2001/01/04 01:56:27 jwise Exp $ */
+/* $NetBSD: extern.h,v 1.21 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -345,7 +345,6 @@ int lo_main (void);
/* misc.c */
int range (struct ship *, struct ship *);
struct ship *closestenemy (struct ship *, int, int);
-int angle (int, int);
int gunsbear (struct ship *, struct ship *);
int portside (struct ship *, struct ship *, int);
int colours (struct ship *);
@@ -379,11 +378,9 @@ void eyeball (struct ship *);
/* pl_5.c */
void acceptmove (void);
void acceptboard (void);
-void parties (int[3], struct ship *, int, int);
/* pl_6.c */
void repair (void);
-int turned (void);
void loadplayer (void);
/* pl_7.c */
@@ -394,9 +391,7 @@ void Signal (const char *, struct ship *, ...)
__attribute__((__format__(__printf__,1,3)));
void Msg (const char *, ...)
__attribute__((__format__(__printf__,1,2)));
-void Scroll (void);
void prompt (const char *, struct ship *);
-void endprompt (int);
int sgetch (const char *, struct ship *, int);
void sgetstr (const char *, char *, int);
void draw_screen (void);
@@ -410,11 +405,9 @@ void upview (void);
void downview (void);
void leftview (void);
void rightview (void);
-void adjustview (void);
/* pl_main.c */
int pl_main (void);
-void initialize (void);
/* sync.c */
void fmtship (char *, size_t, const char *, struct ship *);
@@ -428,4 +421,3 @@ void sync_close (int);
void Write (int, struct ship *, long, long, long, long);
void Writestr (int, struct ship *, const char *);
int Sync (void);
-int sync_update (int, struct ship *, const char *, long, long, long, long);
diff --git a/sail/misc.c b/sail/misc.c
index a1e91ce3..8e3858c5 100644
--- a/sail/misc.c
+++ b/sail/misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.7 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: misc.c,v 1.8 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: misc.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: misc.c,v 1.8 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
@@ -50,6 +50,14 @@ __RCSID("$NetBSD: misc.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
#define distance(x,y) (abs(x) >= abs(y) ? abs(x) + abs(y)/2 : abs(y) + abs(x)/2)
+int range(struct ship *, struct ship *);
+struct ship *closestenemy(struct ship *, int, int);
+static int angle(int, int);
+int gunsbear(struct ship *, struct ship *);
+int portside(struct ship *, struct ship *, int);
+int colours(struct ship *);
+void logger(struct ship *);
+
/* XXX */
int
range(struct ship *from, struct ship *to)
@@ -105,7 +113,7 @@ closestenemy(struct ship *from, int side, int anyship)
return closest;
}
-int
+static int
angle(int dr, int dc)
{
int i;
diff --git a/sail/parties.c b/sail/parties.c
index f4df352a..28b266c9 100644
--- a/sail/parties.c
+++ b/sail/parties.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parties.c,v 1.7 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: parties.c,v 1.8 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,12 +38,16 @@
#if 0
static char sccsid[] = "@(#)parties.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: parties.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: parties.c,v 1.8 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
#include "extern.h"
+int meleeing(struct ship *, struct ship *);
+int boarding(struct ship *, int);
+void unboard(struct ship *, struct ship *, int);
+
int
meleeing(struct ship *from, struct ship *to)
{
diff --git a/sail/pl_1.c b/sail/pl_1.c
index 56d7ad3b..c73657b1 100644
--- a/sail/pl_1.c
+++ b/sail/pl_1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_1.c,v 1.9 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_1.c,v 1.10 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_1.c,v 1.9 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_1.c,v 1.10 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
@@ -48,6 +48,10 @@ __RCSID("$NetBSD: pl_1.c,v 1.9 2001/01/01 21:57:38 jwise Exp $");
#include <stdlib.h>
#include <unistd.h>
+void leave(int);
+void choke(int);
+void child(int);
+
/*
* If we get here before a ship is chosen, then ms == 0 and
* we don't want to update the score file, or do any Write's either.
diff --git a/sail/pl_2.c b/sail/pl_2.c
index f69f7ebe..efd66ddd 100644
--- a/sail/pl_2.c
+++ b/sail/pl_2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_2.c,v 1.5 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_2.c,v 1.6 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,12 +38,14 @@
#if 0
static char sccsid[] = "@(#)pl_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_2.c,v 1.5 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_2.c,v 1.6 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
#include "player.h"
+void play(void);
+
void
play(void)
{
diff --git a/sail/pl_3.c b/sail/pl_3.c
index 0fc3588b..8e71f220 100644
--- a/sail/pl_3.c
+++ b/sail/pl_3.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_3.c,v 1.10 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_3.c,v 1.11 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,13 +38,17 @@
#if 0
static char sccsid[] = "@(#)pl_3.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_3.c,v 1.10 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_3.c,v 1.11 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
#include "player.h"
#include <stdlib.h>
+void acceptcombat(void);
+void grapungrap(void);
+void unfoulplayer(void);
+
void
acceptcombat(void)
{
diff --git a/sail/pl_4.c b/sail/pl_4.c
index bff20cbc..56c6dba8 100644
--- a/sail/pl_4.c
+++ b/sail/pl_4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_4.c,v 1.9 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_4.c,v 1.10 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,12 +38,18 @@
#if 0
static char sccsid[] = "@(#)pl_4.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_4.c,v 1.9 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_4.c,v 1.10 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
#include "player.h"
+void changesail(void);
+void acceptsignal(void);
+void lookout(void);
+const char *saywhat(struct ship *, int);
+void eyeball(struct ship *);
+
void
changesail(void)
{
diff --git a/sail/pl_5.c b/sail/pl_5.c
index fa873d50..3d763f3f 100644
--- a/sail/pl_5.c
+++ b/sail/pl_5.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_5.c,v 1.8 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_5.c,v 1.9 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_5.c,v 1.8 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_5.c,v 1.9 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
@@ -46,6 +46,10 @@ __RCSID("$NetBSD: pl_5.c,v 1.8 2001/01/01 21:57:38 jwise Exp $");
#define turnfirst(x) (*x == 'r' || *x == 'l')
+void acceptmove(void);
+void acceptboard(void);
+static void parties(int *, struct ship *, int, int);
+
void
acceptmove(void)
{
@@ -200,7 +204,7 @@ acceptboard(void)
unblockalarm();
}
-void
+static void
parties(int *crew, struct ship *to, int isdefense, int buf)
{
int k, j, men;
diff --git a/sail/pl_6.c b/sail/pl_6.c
index 6e58bd7b..0f071f68 100644
--- a/sail/pl_6.c
+++ b/sail/pl_6.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_6.c,v 1.6 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_6.c,v 1.7 2001/01/04 02:43:32 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,12 +38,16 @@
#if 0
static char sccsid[] = "@(#)pl_6.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_6.c,v 1.6 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_6.c,v 1.7 2001/01/04 02:43:32 jwise Exp $");
#endif
#endif /* not lint */
#include "player.h"
+void repair(void);
+static int turned(void);
+void loadplayer(void);
+
void
repair(void)
{
@@ -138,7 +142,7 @@ repair(void)
repaired = 1;
}
-int
+static int
turned(void)
{
char *p;
diff --git a/sail/pl_7.c b/sail/pl_7.c
index b876edca..36cd5347 100644
--- a/sail/pl_7.c
+++ b/sail/pl_7.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_7.c,v 1.16 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: pl_7.c,v 1.17 2001/01/04 02:43:33 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_7.c,v 1.16 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.17 2001/01/04 02:43:33 jwise Exp $");
#endif
#endif /* not lint */
@@ -52,6 +52,28 @@ __RCSID("$NetBSD: pl_7.c,v 1.16 2001/01/01 21:57:38 jwise Exp $");
#include <stdlib.h>
#include <unistd.h>
+void initscreen(void);
+void cleanupscreen(void);
+void newturn(int);
+void Signal(const char *, struct ship *, ...);
+void Msg(const char *, ...);
+static void Scroll(void);
+void prompt(const char *, struct ship *);
+static void endprompt(int);
+int sgetch(const char *, struct ship *, int);
+void sgetstr(const char *, char *, int);
+void draw_screen(void);
+void draw_view(void);
+void draw_turn(void);
+void draw_stat(void);
+void draw_slot(void);
+void draw_board(void);
+void centerview(void);
+void upview(void);
+void downview(void);
+void leftview(void);
+void rightview(void);
+static void adjustview(void);
/*
* Display interface
@@ -201,7 +223,7 @@ Msg(const char *fmt, ...)
Scroll();
}
-void
+static void
Scroll(void)
{
if (++sc_line >= SCROLL_Y)
@@ -211,9 +233,7 @@ Scroll(void)
}
void
-prompt(p, ship)
- const char *p;
- struct ship *ship;
+prompt(const char *p, struct ship *ship)
{
static char buf[BUFSIZ];
@@ -224,7 +244,7 @@ prompt(p, ship)
waddstr(scroll_w, buf);
}
-void
+static void
endprompt(int flag)
{
sc_hasprompt = 0;
@@ -510,7 +530,7 @@ rightview(void)
viewcol += VIEW_X / 5;
}
-void
+static void
adjustview(void)
{
if (dont_adjust)
diff --git a/sail/pl_main.c b/sail/pl_main.c
index 6c974ea8..a818cc33 100644
--- a/sail/pl_main.c
+++ b/sail/pl_main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_main.c,v 1.10 2001/01/04 01:13:34 jwise Exp $ */
+/* $NetBSD: pl_main.c,v 1.11 2001/01/04 02:43:33 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_main.c,v 1.10 2001/01/04 01:13:34 jwise Exp $");
+__RCSID("$NetBSD: pl_main.c,v 1.11 2001/01/04 02:43:33 jwise Exp $");
#endif
#endif /* not lint */
@@ -48,6 +48,9 @@ __RCSID("$NetBSD: pl_main.c,v 1.10 2001/01/04 01:13:34 jwise Exp $");
#include <stdlib.h>
#include <unistd.h>
+int pl_main(void);
+static void initialize(void);
+
/*ARGSUSED*/
int
pl_main(void)
@@ -59,7 +62,7 @@ pl_main(void)
return 0; /* for lint, play() never returns */
}
-void
+static void
initialize(void)
{
struct File *fp;
diff --git a/sail/sync.c b/sail/sync.c
index 16714ff1..71043d9a 100644
--- a/sail/sync.c
+++ b/sail/sync.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sync.c,v 1.15 2001/01/01 21:57:38 jwise Exp $ */
+/* $NetBSD: sync.c,v 1.16 2001/01/04 02:43:33 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)sync.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: sync.c,v 1.15 2001/01/01 21:57:38 jwise Exp $");
+__RCSID("$NetBSD: sync.c,v 1.16 2001/01/04 02:43:33 jwise Exp $");
#endif
#endif /* not lint */
@@ -59,6 +59,17 @@ __RCSID("$NetBSD: sync.c,v 1.15 2001/01/01 21:57:38 jwise Exp $");
#define BUFSIZE 4096
+void fmtship(char *, size_t, const char *, struct ship *);
+void makesignal(struct ship *, const char *, struct ship *, ...);
+void makemsg(struct ship *, const char *, ...);
+int sync_exists(int);
+int sync_open(void);
+void sync_close(int);
+void Write(int, struct ship *, long, long, long, long);
+void Writestr(int, struct ship *, const char *);
+int Sync(void);
+static int sync_update(int, struct ship *, const char *, long, long, long, long);
+
static const char SF[] = _PATH_SYNC;
static const char LF[] = _PATH_LOCK;
static char sync_buf[BUFSIZE];
@@ -304,7 +315,7 @@ out:
return erred ? -1 : 0;
}
-int
+static int
sync_update(int type, struct ship *ship, const char *astr, long a, long b, long c, long d)
{
switch (type) {