#define BUDG_H
void fill_update_array(int *bp, struct sctstr *sp);
-int *get_wp(int *bp, struct sctstr *sp, int cm);
int gt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm);
void pt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm, int amount);
void get_materials(struct sctstr *sp, int *bp, int *mvec, int check);
#define A_LBOARD 5
/* src/lib/subs/attsub.c */
-extern double att_calcodds(int, int);
extern double att_combat_eff(struct combat *);
extern void att_move_in_off(int, struct combat *, struct emp_qelem *,
struct combat *);
extern void lnd_count_units(struct lndstr *);
extern void lnd_mar(struct emp_qelem *, double *, double *, int *, natid);
extern void lnd_put(struct emp_qelem *, natid);
-extern int lnd_hit_mine(struct lndstr *, struct lchrstr *);
extern void lnd_list(struct emp_qelem *);
extern int lnd_hardtarget(struct lndstr *);
extern int lnd_mar_one_sector(struct emp_qelem *, int, natid, int);
#define days(x) (60*60*24*(x))
extern int debug;
-extern int daemonize;
/*
* If EXPR is true, an internal error occured.
#define PLN_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm))
/* src/lib/subs/aircombat.c */
-extern void ac_planedamage(struct plist *, natid, int, natid, int,
- int, char *);
-extern void ac_intercept(struct emp_qelem *, struct emp_qelem *,
- struct emp_qelem *, natid, coord, coord);
extern void ac_combat_headers(natid, natid);
extern void ac_airtoair(struct emp_qelem *, struct emp_qelem *);
-extern void ac_doflak(struct emp_qelem *, struct sctstr *);
-extern void ac_shipflak(struct emp_qelem *, coord, coord);
-extern void ac_landflak(struct emp_qelem *, coord, coord);
-extern void ac_fireflak(struct emp_qelem *, natid, natid, int);
extern int ac_flak_dam(int);
extern void ac_encounter(struct emp_qelem *, struct emp_qelem *, coord,
coord, char *, int, int,
struct emp_qelem *, struct emp_qelem *);
extern int ac_isflying(struct plnstr *, struct emp_qelem *);
-extern int do_evade(struct emp_qelem *, struct emp_qelem *);
extern void sam_intercept(struct emp_qelem *, struct emp_qelem *,
natid, natid, coord, coord, int);
-extern int all_missiles(struct emp_qelem *);
-extern int can_fly(int);
/* src/lib/subs/aswplnsubs.c */
extern int on_shiplist(short, struct shiplist *);
extern struct player *player; /* current player's context */
extern char *praddr(struct player *);
extern void player_main(struct player *);
-extern int command(void);
/* more under Commands */
/* recvclient.c */
extern int recvclient(char *, int);
/* getbit.c */
extern int emp_getbit(int, int, unsigned char *);
extern void emp_setbit(int, int, unsigned char *);
-extern void emp_setbitmap(int, int, unsigned char *, int *);
extern void bitinit2(struct nstr_sect *, unsigned char *, int);
/* getele.c */
extern int getele(char *, char *);
extern char empirehost[];
extern char empireport[];
extern int eight_bit_clean;
-extern char num_teles[];
extern int sock;
extern char *SO;
extern char *SE;
int login(int s, char *uname, char *cname, char *cpass, int kill_proc, int);
void saveargv(int ac, char **src, char **dst);
void sendcmd(int s, char *cmd, char *arg);
-int sendeof(int sock);
void servercmd(struct ioqueue *ioq, FILE *auxfi);
int serverio(int s, struct ioqueue *ioq);
int termio(int fd, int sock, FILE *auxfi);
#include <io.h>
#endif
-char num_teles[64];
+static char num_teles[64];
static char the_prompt[1024];
static int mode;
static int nbtu;
static int nmin;
-FILE *redir_fp;
-FILE *pipe_fp;
-int exec_fd;
+static FILE *redir_fp;
+static FILE *pipe_fp;
+static int exec_fd;
static void prompt(FILE *auxfi);
static void doredir(char *p);
#include "misc.h"
#include "tags.h"
+static int sendeof(int sock);
+
int
termio(int fd, int sock, FILE *auxfi)
{
return 1;
}
-int
+static int
sendeof(int sock)
{
#ifndef _WIN32
#include "optlist.h"
#include "commands.h"
-char *prompt[] = {
+static char *prompt[] = {
"Improve what ('road' or 'rail')? ",
"Improve what ('road', 'rail' or 'defense')? "
};
#include <errno.h>
#include <fcntl.h>
+static int command(void);
static int status(void);
struct player *player;
pr("Bye-bye\n");
}
-int
+static int
command(void)
{
unsigned i;
#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,
}
}
-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)
{
}
}
-int
+static int
all_missiles(struct emp_qelem *att_list)
{
struct emp_qelem *qp;
* 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)
{
strcpy(mesg, dmess);
}
-void
+static void
ac_doflak(struct emp_qelem *list, struct sctstr *from)
{
int shell;
}
}
-void
+static void
ac_shipflak(struct emp_qelem *list, coord x, coord y)
{
struct nstr_item ni;
}
}
-void
+static void
ac_landflak(struct emp_qelem *list, coord x, coord y)
{
struct nstr_item ni;
/*
* Called from shipflak, landflak, and doflak.
*/
-void
+static void
ac_fireflak(struct emp_qelem *list, natid from, natid other, int guns)
{
struct plnstr *pp;
-int
+static int
can_fly(int p)
{ /* Can this plane fly from the ship or land unit it is on? */
struct plnstr plane;
return 0;
}
-int
+static int
do_evade(struct emp_qelem *bomb_list, struct emp_qelem *esc_list)
{
struct emp_qelem *qp;
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);
bitmap[id / 8] |= bit(id & 07);
}
-void
+static void
emp_setbitmap(int x, int y, unsigned char *bitmap, int *bitmaps)
{
register int *mp;
#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)
(double)lp->lnd_spd / 2.0 - lp->lnd_vis));
}
-int
+static int
lnd_hit_mine(struct lndstr *lp, struct lchrstr *lcp)
{
double m;
char *desc[2];
};
-struct ccode conditions[] = {
+static struct ccode conditions[] = {
{ 'i', { "retreated with a damaged friend",
"was damaged" } },
{ 't', { "retreated with a torpedoed ship",
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)) +
static char pidfname[] = "server.pid";
/* Run as daemon? If yes, detach from controlling terminal etc. */
-int daemonize = 1;
+static int daemonize = 1;
static void
print_usage(char *program_name)