First half of static-ization of local funcs.
This commit is contained in:
parent
29e8291322
commit
bca097d567
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $ */
|
||||
/* $NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)assorted.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $");
|
||||
__RCSID("$NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -47,6 +47,8 @@ __RCSID("$NetBSD: assorted.c,v 1.10 2001/01/01 21:57:37 jwise Exp $");
|
||||
#include <unistd.h>
|
||||
#include <err.h>
|
||||
|
||||
void table(int, int, int, struct ship *, struct ship *, int);
|
||||
void Cleansnag(struct ship *, struct ship *, int, int);
|
||||
static void strike (struct ship *, struct ship *);
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_1.c,v 1.12 2001/01/01 21:57:37 jwise Exp $ */
|
||||
/* $NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,13 +38,20 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_1.c,v 1.12 2001/01/01 21:57:37 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "driver.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void unfoul(void);
|
||||
void boardcomp(void);
|
||||
static int fightitout(struct ship *, struct ship *, int);
|
||||
void resolve(void);
|
||||
void compcombat(void);
|
||||
int next(void);
|
||||
|
||||
void
|
||||
unfoul(void)
|
||||
{
|
||||
@ -133,7 +140,7 @@ boardcomp(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
fightitout(struct ship *from, struct ship *to, int key)
|
||||
{
|
||||
struct ship *fromcap, *tocap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $ */
|
||||
/* $NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -47,6 +47,18 @@ __RCSID("$NetBSD: dr_2.c,v 1.13 2001/01/01 21:57:37 jwise Exp $");
|
||||
|
||||
#define couldwin(f,t) (f->specs->crew2 > t->specs->crew2 * 1.5)
|
||||
|
||||
void thinkofgrapples(void);
|
||||
void checkup(void);
|
||||
void prizecheck(void);
|
||||
static int str_end(const char *);
|
||||
void closeon(struct ship *, struct ship *, char *, int, int, int);
|
||||
static int score(char *, struct ship *, struct ship *, int);
|
||||
static void move_ship(const char *, struct ship *, unsigned char *, short *, short *, char *);
|
||||
static void try(char *, char *, int, int, int, int, int, struct ship *, struct ship *, int *, int);
|
||||
static void rmend(char *);
|
||||
|
||||
const int dtab[] = {0,1,1,2,3,4,4,5}; /* diagonal distances in x==y */
|
||||
|
||||
void
|
||||
thinkofgrapples(void)
|
||||
{
|
||||
@ -127,7 +139,7 @@ prizecheck(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
str_end(const char *str)
|
||||
{
|
||||
const char *p;
|
||||
@ -148,9 +160,7 @@ closeon(struct ship *from, struct ship *to, char *command, int ta, int ma, int a
|
||||
try(command, temp, ma, ta, af, ma, from->file->dir, from, to, &high, 0);
|
||||
}
|
||||
|
||||
const int dtab[] = {0,1,1,2,3,4,4,5}; /* diagonal distances in x==y */
|
||||
|
||||
int
|
||||
static int
|
||||
score(char *movement, struct ship *ship, struct ship *to, int onlytemp)
|
||||
{
|
||||
char drift;
|
||||
@ -181,7 +191,7 @@ score(char *movement, struct ship *ship, struct ship *to, int onlytemp)
|
||||
return total;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
move_ship(const char *p, struct ship *ship, unsigned char *dir, short *row, short *col, char *drift)
|
||||
{
|
||||
int dist;
|
||||
@ -221,7 +231,7 @@ move_ship(const char *p, struct ship *ship, unsigned char *dir, short *row, shor
|
||||
*drift = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
try(char *command, char *temp, int ma, int ta, int af, int vma, int dir, struct ship *f, struct ship *t, int *high, int rakeme)
|
||||
{
|
||||
int new, n;
|
||||
@ -263,7 +273,7 @@ try(char *command, char *temp, int ma, int ta, int af, int vma, int dir, struct
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
rmend(char *str)
|
||||
{
|
||||
char *p;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $ */
|
||||
/* $NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,13 +38,23 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_3.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_3.c,v 1.9 2001/01/01 21:57:37 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "driver.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void moveall(void);
|
||||
static int stillmoving(int);
|
||||
static int is_isolated(struct ship *);
|
||||
static int push(struct ship *, struct ship *);
|
||||
static void step(int, struct ship *, char *);
|
||||
void sendbp(struct ship *, struct ship *, int, int);
|
||||
int is_toughmelee(struct ship *, struct ship *, int, int);
|
||||
void reload(void);
|
||||
void checksails(void);
|
||||
|
||||
/* move all comp ships */
|
||||
void
|
||||
moveall(void)
|
||||
@ -183,7 +193,7 @@ moveall(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stillmoving(int k)
|
||||
{
|
||||
struct ship *sp;
|
||||
@ -194,7 +204,7 @@ stillmoving(int k)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
is_isolated(struct ship *ship)
|
||||
{
|
||||
struct ship *sp;
|
||||
@ -206,7 +216,7 @@ is_isolated(struct ship *ship)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
push(struct ship *from, struct ship *to)
|
||||
{
|
||||
int bs, sb;
|
||||
@ -220,7 +230,7 @@ push(struct ship *from, struct ship *to)
|
||||
return from < to;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
step(int com, struct ship *sp, char *moved)
|
||||
{
|
||||
int dist;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_4.c,v 1.9 2001/01/01 21:57:37 jwise Exp $ */
|
||||
/* $NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,13 +38,16 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_4.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_4.c,v 1.9 2001/01/01 21:57:37 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void ungrap(struct ship *, struct ship *);
|
||||
void grap(struct ship *, struct ship *);
|
||||
|
||||
void
|
||||
ungrap(struct ship *from, struct ship *to)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_5.c,v 1.7 2001/01/01 21:57:38 jwise Exp $ */
|
||||
/* $NetBSD: dr_5.c,v 1.8 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,12 +38,15 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_5.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_5.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_5.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
void subtract(struct ship *, int, int *, struct ship *, int);
|
||||
int mensent(struct ship *, struct ship *, int *, struct ship **, int *, int);
|
||||
|
||||
void
|
||||
subtract(struct ship *from, int totalfrom, int *crewfrom, struct ship *fromcap, int pcfrom)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $ */
|
||||
/* $NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dr_main.c 8.2 (Berkeley) 4/16/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
|
||||
__RCSID("$NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -46,6 +46,8 @@ __RCSID("$NetBSD: dr_main.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int dr_main(void);
|
||||
|
||||
int
|
||||
dr_main(void)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.18 2001/01/01 21:57:38 jwise Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.19 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -307,7 +307,6 @@ void Cleansnag (struct ship *, struct ship *, int, int);
|
||||
/* dr_1.c */
|
||||
void unfoul (void);
|
||||
void boardcomp (void);
|
||||
int fightitout (struct ship *, struct ship *, int);
|
||||
void resolve (void);
|
||||
void compcombat (void);
|
||||
int next (void);
|
||||
@ -316,20 +315,10 @@ int next (void);
|
||||
void thinkofgrapples (void);
|
||||
void checkup (void);
|
||||
void prizecheck (void);
|
||||
int str_end (const char *);
|
||||
void closeon (struct ship *, struct ship *, char *, int, int, int);
|
||||
int score (char *, struct ship *, struct ship *, int);
|
||||
void move_ship (const char *, struct ship *, unsigned char *, short *, short *, char *);
|
||||
void try (char *, char *, int, int, int, int, int, struct ship *,
|
||||
struct ship *, int *, int);
|
||||
void rmend (char *);
|
||||
|
||||
/* dr_3.c */
|
||||
void moveall (void);
|
||||
int stillmoving (int);
|
||||
int is_isolated (struct ship *);
|
||||
int push (struct ship *, struct ship *);
|
||||
void step (int, struct ship *, char *);
|
||||
void sendbp (struct ship *, struct ship *, int, int);
|
||||
int is_toughmelee (struct ship *, struct ship *, int, int);
|
||||
void reload (void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: game.c,v 1.7 2001/01/01 21:57:38 jwise Exp $ */
|
||||
/* $NetBSD: game.c,v 1.8 2001/01/04 01:53:24 jwise Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,12 +38,15 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)game.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: game.c,v 1.7 2001/01/01 21:57:38 jwise Exp $");
|
||||
__RCSID("$NetBSD: game.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
int maxturns(struct ship *, char *);
|
||||
int maxmove(struct ship *, int, int);
|
||||
|
||||
int
|
||||
maxturns(struct ship *ship, char *af)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user