Second half of static-ization of local funcs.
This commit is contained in:
parent
d5c5fed0c7
commit
43894be666
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue