(num_teles, redir_fp, pipe_fp, exec_fd, sendeof, prompt, command)

(ac_intercept, all_missiles, ac_planedamage, ac_doflak, ac_landflak)
(ac_shipflak, ac_fireflak, can_fly, do_evade, att_calcodds)
(emp_setbitmap, lnd_hit_mine, conditions, get_wp, daemonize): Internal
linkage.
This commit is contained in:
Markus Armbruster 2006-05-20 13:54:45 +00:00
parent aac6312c74
commit 2ae6be9af6
18 changed files with 41 additions and 44 deletions

View file

@ -45,7 +45,7 @@
#include "optlist.h"
#include "commands.h"
char *prompt[] = {
static char *prompt[] = {
"Improve what ('road' or 'rail')? ",
"Improve what ('road', 'rail' or 'defense')? "
};

View file

@ -59,6 +59,7 @@
#include <errno.h>
#include <fcntl.h>
static int command(void);
static int status(void);
struct player *player;
@ -139,7 +140,7 @@ player_main(struct player *p)
pr("Bye-bye\n");
}
int
static int
command(void)
{
unsigned i;

View file

@ -53,10 +53,21 @@
#include "optlist.h"
#include "server.h"
static void getilist(struct emp_qelem *list, natid own,
struct emp_qelem *a, struct emp_qelem *b,
struct emp_qelem *c, struct emp_qelem *d);
static void ac_dog(struct plist *ap, struct plist *dp);
static void ac_intercept(struct emp_qelem *, struct emp_qelem *,
struct emp_qelem *, natid, coord, coord);
static int all_missiles(struct emp_qelem *);
static void ac_dog(struct plist *, struct plist *);
static void ac_planedamage(struct plist *, natid, int, natid, int,
int, char *);
static void ac_doflak(struct emp_qelem *, struct sctstr *);
static void ac_landflak(struct emp_qelem *, coord, coord);
static void ac_shipflak(struct emp_qelem *, coord, coord);
static void ac_fireflak(struct emp_qelem *, natid, natid, int);
static void getilist(struct emp_qelem *, natid,
struct emp_qelem *, struct emp_qelem *,
struct emp_qelem *, struct emp_qelem *);
static int can_fly(int);
static int do_evade(struct emp_qelem *, struct emp_qelem *);
void
ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
@ -431,7 +442,7 @@ sam_intercept(struct emp_qelem *att_list, struct emp_qelem *def_list,
}
}
void
static void
ac_intercept(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
struct emp_qelem *def_list, natid def_own, coord x, coord y)
{
@ -572,7 +583,7 @@ ac_airtoair(struct emp_qelem *att_list, struct emp_qelem *int_list)
}
}
int
static int
all_missiles(struct emp_qelem *att_list)
{
struct emp_qelem *qp;
@ -687,7 +698,7 @@ ac_dog(struct plist *ap, struct plist *dp)
* that the current queue pointer is invalid on return from the ac_planedamage
* call. (this has caused bugs in the past)
*/
void
static void
ac_planedamage(struct plist *plp, natid from, int dam, natid other,
int checkabort, int show, char *mesg)
{
@ -764,7 +775,7 @@ ac_planedamage(struct plist *plp, natid from, int dam, natid other,
strcpy(mesg, dmess);
}
void
static void
ac_doflak(struct emp_qelem *list, struct sctstr *from)
{
int shell;
@ -799,7 +810,7 @@ ac_doflak(struct emp_qelem *list, struct sctstr *from)
}
}
void
static void
ac_shipflak(struct emp_qelem *list, coord x, coord y)
{
struct nstr_item ni;
@ -869,7 +880,7 @@ ac_shipflak(struct emp_qelem *list, coord x, coord y)
}
}
void
static void
ac_landflak(struct emp_qelem *list, coord x, coord y)
{
struct nstr_item ni;
@ -937,7 +948,7 @@ ac_landflak(struct emp_qelem *list, coord x, coord y)
/*
* Called from shipflak, landflak, and doflak.
*/
void
static void
ac_fireflak(struct emp_qelem *list, natid from, natid other, int guns)
{
struct plnstr *pp;
@ -1097,7 +1108,7 @@ getilist(struct emp_qelem *list, natid own, struct emp_qelem *a,
int
static int
can_fly(int p)
{ /* Can this plane fly from the ship or land unit it is on? */
struct plnstr plane;
@ -1150,7 +1161,7 @@ can_fly(int p)
return 0;
}
int
static int
do_evade(struct emp_qelem *bomb_list, struct emp_qelem *esc_list)
{
struct emp_qelem *qp;

View file

@ -77,6 +77,7 @@ static int get_ototal(int combat_mode, struct combat *off,
struct emp_qelem *olist, double osupport, int check);
static int get_dtotal(struct combat *def, struct emp_qelem *list,
double dsupport, int check);
static double att_calcodds(int, int);
static int take_casualty(int combat_mode, struct combat *off,
struct emp_qelem *olist);

View file

@ -142,7 +142,7 @@ emp_setbit(int x, int y, unsigned char *bitmap)
bitmap[id / 8] |= bit(id & 07);
}
void
static void
emp_setbitmap(int x, int y, unsigned char *bitmap, int *bitmaps)
{
register int *mp;

View file

@ -54,6 +54,7 @@
#include "prototypes.h"
static void lnd_mess(char *, struct llist *);
static int lnd_hit_mine(struct lndstr *, struct lchrstr *);
int
attack_val(int combat_mode, struct lndstr *lp)
@ -1006,7 +1007,7 @@ lnd_hardtarget(struct lndstr *lp)
(double)lp->lnd_spd / 2.0 - lp->lnd_vis));
}
int
static int
lnd_hit_mine(struct lndstr *lp, struct lchrstr *lcp)
{
double m;

View file

@ -59,7 +59,7 @@ struct ccode {
char *desc[2];
};
struct ccode conditions[] = {
static struct ccode conditions[] = {
{ 'i', { "retreated with a damaged friend",
"was damaged" } },
{ 't', { "retreated with a torpedoed ship",

View file

@ -44,7 +44,7 @@
static int bud_key[I_MAX + 2] =
{ 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 5, 6, 0, 0, 7 };
int *
static int *
get_wp(int *bp, struct sctstr *sp, int cm)
{
return (bp + (sp->sct_x + (sp->sct_y * WORLD_X)) +