s_char purge directed by compiler warnings.
This commit is contained in:
parent
87b5d5d6e3
commit
a988b907fc
130 changed files with 527 additions and 527 deletions
|
@ -56,7 +56,7 @@ struct combat {
|
||||||
struct dchrstr *sct_dcp;
|
struct dchrstr *sct_dcp;
|
||||||
struct mchrstr *shp_mcp;
|
struct mchrstr *shp_mcp;
|
||||||
struct lchrstr *lnd_lcp;
|
struct lchrstr *lnd_lcp;
|
||||||
s_char shp_name[MAXSHPNAMLEN];
|
char shp_name[MAXSHPNAMLEN];
|
||||||
int relations_checked;
|
int relations_checked;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,12 @@ extern int io_input(struct iop *, int);
|
||||||
extern int io_inputwaiting(struct iop *);
|
extern int io_inputwaiting(struct iop *);
|
||||||
extern int io_outputwaiting(struct iop *);
|
extern int io_outputwaiting(struct iop *);
|
||||||
extern int io_output(struct iop *, int);
|
extern int io_output(struct iop *, int);
|
||||||
extern int io_peek(struct iop *, s_char *, int);
|
extern int io_peek(struct iop *, char *, int);
|
||||||
extern int io_read(struct iop *, s_char *, int);
|
extern int io_read(struct iop *, char *, int);
|
||||||
extern int io_write(struct iop *, s_char *, int, int);
|
extern int io_write(struct iop *, char *, int, int);
|
||||||
extern int io_output_all(struct iop *);
|
extern int io_output_all(struct iop *);
|
||||||
extern int io_gets(struct iop *, s_char *, int);
|
extern int io_gets(struct iop *, char *, int);
|
||||||
extern int io_puts(struct iop *, s_char *);
|
extern int io_puts(struct iop *, char *);
|
||||||
extern int io_shutdown(struct iop *, int);
|
extern int io_shutdown(struct iop *, int);
|
||||||
extern int io_error(struct iop *);
|
extern int io_error(struct iop *);
|
||||||
extern int io_eof(struct iop *);
|
extern int io_eof(struct iop *);
|
||||||
|
|
|
@ -56,11 +56,11 @@ extern int ioq_makebuf(struct ioqueue *ioq, char *pBuf, int nBufLen);
|
||||||
#else
|
#else
|
||||||
extern int ioq_makeiov(struct ioqueue *ioq, struct iovec *iov, int cc);
|
extern int ioq_makeiov(struct ioqueue *ioq, struct iovec *iov, int cc);
|
||||||
#endif
|
#endif
|
||||||
extern int ioq_peek(struct ioqueue *ioq, s_char *buf, int cc);
|
extern int ioq_peek(struct ioqueue *ioq, char *buf, int cc);
|
||||||
extern int ioq_dequeue(struct ioqueue *ioq, int cc);
|
extern int ioq_dequeue(struct ioqueue *ioq, int cc);
|
||||||
extern void ioq_append(struct ioqueue *ioq, s_char *buf, int cc);
|
extern void ioq_append(struct ioqueue *ioq, char *buf, int cc);
|
||||||
extern int ioq_qsize(struct ioqueue *ioq);
|
extern int ioq_qsize(struct ioqueue *ioq);
|
||||||
extern int ioq_gets(struct ioqueue *ioq, s_char *buf, int cc);
|
extern int ioq_gets(struct ioqueue *ioq, char *buf, int cc);
|
||||||
extern int ioq_puts(struct ioqueue *ioq, s_char *buf);
|
extern int ioq_puts(struct ioqueue *ioq, char *buf);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -201,22 +201,22 @@ enum {
|
||||||
extern void lnd_sweep(struct emp_qelem *, int, int, natid);
|
extern void lnd_sweep(struct emp_qelem *, int, int, natid);
|
||||||
extern int lnd_interdict(struct emp_qelem *, coord, coord, natid);
|
extern int lnd_interdict(struct emp_qelem *, coord, coord, natid);
|
||||||
extern void lnd_sel(struct nstr_item *, struct emp_qelem *);
|
extern void lnd_sel(struct nstr_item *, struct emp_qelem *);
|
||||||
extern void lnd_mess(s_char *, struct llist *);
|
extern void lnd_mess(char *, struct llist *);
|
||||||
extern int lnd_check_mines(struct emp_qelem *);
|
extern int lnd_check_mines(struct emp_qelem *);
|
||||||
extern double lnd_mobcost(struct lndstr *, struct sctstr *, int);
|
extern double lnd_mobcost(struct lndstr *, struct sctstr *, int);
|
||||||
extern s_char *lnd_path(int, struct lndstr *, s_char *);
|
extern char *lnd_path(int, struct lndstr *, char *);
|
||||||
|
|
||||||
extern int attack_val(int, struct lndstr *);
|
extern int attack_val(int, struct lndstr *);
|
||||||
extern int total_mil(struct lndstr *);
|
extern int total_mil(struct lndstr *);
|
||||||
extern int defense_val(struct lndstr *);
|
extern int defense_val(struct lndstr *);
|
||||||
extern int lnd_getmil(struct lndstr *);
|
extern int lnd_getmil(struct lndstr *);
|
||||||
extern void lnd_print(struct llist *, s_char *);
|
extern void lnd_print(struct llist *, char *);
|
||||||
extern void lnd_delete(struct llist *, s_char *);
|
extern void lnd_delete(struct llist *, char *);
|
||||||
extern int lnd_take_casualty(int, struct llist *, int);
|
extern int lnd_take_casualty(int, struct llist *, int);
|
||||||
extern void lnd_submil(struct lndstr *, int);
|
extern void lnd_submil(struct lndstr *, int);
|
||||||
extern void lnd_takemob(struct emp_qelem *, double);
|
extern void lnd_takemob(struct emp_qelem *, double);
|
||||||
extern int lnd_spyval(struct lndstr *);
|
extern int lnd_spyval(struct lndstr *);
|
||||||
extern int intelligence_report(int, struct lndstr *, int, s_char *);
|
extern int intelligence_report(int, struct lndstr *, int, char *);
|
||||||
extern int count_sect_units(struct sctstr *);
|
extern int count_sect_units(struct sctstr *);
|
||||||
extern void count_units(struct shpstr *);
|
extern void count_units(struct shpstr *);
|
||||||
extern void lnd_count_units(struct lndstr *);
|
extern void lnd_count_units(struct lndstr *);
|
||||||
|
|
|
@ -39,13 +39,13 @@
|
||||||
|
|
||||||
#define MAPWIDTH(persec) ((WORLD_X/2)*(persec + 1)+1)
|
#define MAPWIDTH(persec) ((WORLD_X/2)*(persec + 1)+1)
|
||||||
|
|
||||||
extern void blankfill(s_char *, register struct range *, int);
|
extern void blankfill(char *, struct range *, int);
|
||||||
/* src/lib/subs/border.c */
|
/* src/lib/subs/border.c */
|
||||||
extern int map_set(natid, coord, coord, s_char, int);
|
extern int map_set(natid, coord, coord, s_char, int);
|
||||||
extern void writebmap(natid);
|
extern void writebmap(natid);
|
||||||
extern void writemap(natid);
|
extern void writemap(natid);
|
||||||
/* src/lib/subs/border.c */
|
/* src/lib/subs/border.c */
|
||||||
extern void border(struct range *, s_char *, s_char *);
|
extern void border(struct range *, char *, char *);
|
||||||
|
|
||||||
#define MAP_SHIP bit(0)
|
#define MAP_SHIP bit(0)
|
||||||
#define MAP_LAND bit(1)
|
#define MAP_LAND bit(1)
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct shiplist {
|
||||||
|
|
||||||
/* src/lib/subs/aircombat.c */
|
/* src/lib/subs/aircombat.c */
|
||||||
extern void ac_planedamage(struct plist *, natid, int, natid, int,
|
extern void ac_planedamage(struct plist *, natid, int, natid, int,
|
||||||
int, s_char *);
|
int, char *);
|
||||||
extern void ac_intercept(struct emp_qelem *, struct emp_qelem *,
|
extern void ac_intercept(struct emp_qelem *, struct emp_qelem *,
|
||||||
struct emp_qelem *, natid, coord, coord);
|
struct emp_qelem *, natid, coord, coord);
|
||||||
extern void ac_combat_headers(natid, natid);
|
extern void ac_combat_headers(natid, natid);
|
||||||
|
@ -173,7 +173,7 @@ extern void ac_landflak(struct emp_qelem *, coord, coord);
|
||||||
extern void ac_fireflak(struct emp_qelem *, natid, natid, int);
|
extern void ac_fireflak(struct emp_qelem *, natid, natid, int);
|
||||||
extern int ac_flak_dam(int);
|
extern int ac_flak_dam(int);
|
||||||
extern void ac_encounter(struct emp_qelem *, struct emp_qelem *, coord,
|
extern void ac_encounter(struct emp_qelem *, struct emp_qelem *, coord,
|
||||||
coord, s_char *, int, int,
|
coord, char *, int, int,
|
||||||
struct emp_qelem *, struct emp_qelem *);
|
struct emp_qelem *, struct emp_qelem *);
|
||||||
extern int ac_isflying(struct plnstr *, struct emp_qelem *);
|
extern int ac_isflying(struct plnstr *, struct emp_qelem *);
|
||||||
extern int do_evade(struct emp_qelem *, struct emp_qelem *);
|
extern int do_evade(struct emp_qelem *, struct emp_qelem *);
|
||||||
|
|
|
@ -71,11 +71,11 @@ extern int nav_map(int, int, int);
|
||||||
extern int count_pop(int);
|
extern int count_pop(int);
|
||||||
extern int scuttle_tradeship(struct shpstr *, int);
|
extern int scuttle_tradeship(struct shpstr *, int);
|
||||||
extern void scuttle_ship(struct shpstr *);
|
extern void scuttle_ship(struct shpstr *);
|
||||||
extern void resnoise(struct sctstr *sptr, int public_amt, s_char *name,
|
extern void resnoise(struct sctstr *sptr, int public_amt, char *name,
|
||||||
int old, int new);
|
int old, int new);
|
||||||
extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
|
extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
|
||||||
extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
|
extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
|
||||||
extern s_char *prsub(struct shpstr *);
|
extern char *prsub(struct shpstr *);
|
||||||
extern int check_trade(void);
|
extern int check_trade(void);
|
||||||
extern int ontradingblock(int, void *);
|
extern int ontradingblock(int, void *);
|
||||||
extern void trdswitchown(int, void *, int);
|
extern void trdswitchown(int, void *, int);
|
||||||
|
@ -312,7 +312,7 @@ extern void logerror(char *, ...) ATTRIBUTE((format (printf, 1, 2)));
|
||||||
extern int draw_map(int, s_char, int, struct nstr_sect *);
|
extern int draw_map(int, s_char, int, struct nstr_sect *);
|
||||||
extern int unit_map(int, int, struct nstr_sect *, s_char *);
|
extern int unit_map(int, int, struct nstr_sect *, s_char *);
|
||||||
extern int bmaps_intersect(natid, natid);
|
extern int bmaps_intersect(natid, natid);
|
||||||
extern int share_bmap(natid, natid, struct nstr_sect *, s_char, s_char *);
|
extern int share_bmap(natid, natid, struct nstr_sect *, char, char *);
|
||||||
/* move.c */
|
/* move.c */
|
||||||
/* in path.h */
|
/* in path.h */
|
||||||
/* nstr_subs.c */
|
/* nstr_subs.c */
|
||||||
|
@ -321,13 +321,13 @@ extern int share_bmap(natid, natid, struct nstr_sect *, s_char, s_char *);
|
||||||
extern void bp_enable_cachepath(void);
|
extern void bp_enable_cachepath(void);
|
||||||
extern void bp_disable_cachepath(void);
|
extern void bp_disable_cachepath(void);
|
||||||
extern void bp_clear_cachepath(void);
|
extern void bp_clear_cachepath(void);
|
||||||
extern s_char *BestDistPath(s_char *, struct sctstr *, struct sctstr *,
|
extern char *BestDistPath(char *, struct sctstr *, struct sctstr *,
|
||||||
double *, int);
|
double *, int);
|
||||||
extern s_char *BestLandPath(s_char *, struct sctstr *, struct sctstr *,
|
extern char *BestLandPath(char *, struct sctstr *, struct sctstr *,
|
||||||
double *, int);
|
double *, int);
|
||||||
extern s_char *BestShipPath(s_char *, int, int, int, int, int);
|
extern char *BestShipPath(char *, int, int, int, int, int);
|
||||||
extern s_char *BestAirPath(s_char *, int, int, int, int);
|
extern char *BestAirPath(char *, int, int, int, int);
|
||||||
extern double pathcost(struct sctstr *, s_char *, int);
|
extern double pathcost(struct sctstr *, char *, int);
|
||||||
/* res_pop.c */
|
/* res_pop.c */
|
||||||
extern int max_population(float, int, int);
|
extern int max_population(float, int, int);
|
||||||
extern int max_pop(float, struct sctstr *);
|
extern int max_pop(float, struct sctstr *);
|
||||||
|
@ -382,18 +382,18 @@ extern int diffy(int, int);
|
||||||
extern int deltax(int, int);
|
extern int deltax(int, int);
|
||||||
extern int deltay(int, int);
|
extern int deltay(int, int);
|
||||||
extern int mapdist(int, int, int, int);
|
extern int mapdist(int, int, int, int);
|
||||||
extern s_char *effadv(int);
|
extern char *effadv(int);
|
||||||
extern int onearg(s_char *, s_char *);
|
extern int onearg(char *, char *);
|
||||||
extern int parse(char *, char **, char **, char *, char **);
|
extern int parse(char *, char **, char **, char *, char **);
|
||||||
extern int ldround(double, int);
|
extern int ldround(double, int);
|
||||||
extern int roundintby(int, int);
|
extern int roundintby(int, int);
|
||||||
extern int scthash(register int, register int, int);
|
extern int scthash(register int, register int, int);
|
||||||
extern int tcp_listen(char *, char *, size_t *);
|
extern int tcp_listen(char *, char *, size_t *);
|
||||||
extern s_char *numstr(s_char buf[], int n);
|
extern char *numstr(char buf[], int n);
|
||||||
/* plur.c */
|
/* plur.c */
|
||||||
extern s_char *esplur(int n);
|
extern char *esplur(int n);
|
||||||
extern s_char *splur(int n);
|
extern char *splur(int n);
|
||||||
extern s_char *iesplur(int n);
|
extern char *iesplur(int n);
|
||||||
extern char *plurize(char *buf, int max_len, int n);
|
extern char *plurize(char *buf, int max_len, int n);
|
||||||
/* more in misc.h */
|
/* more in misc.h */
|
||||||
|
|
||||||
|
@ -432,8 +432,8 @@ extern int init_nats(void);
|
||||||
/* login.c */
|
/* login.c */
|
||||||
extern void player_login(void *);
|
extern void player_login(void *);
|
||||||
/* nat.c */
|
/* nat.c */
|
||||||
extern int natbyname(s_char *, natid *);
|
extern int natbyname(char *, natid *);
|
||||||
extern int natpass(int, s_char *);
|
extern int natpass(int, char *);
|
||||||
/* player.c */
|
/* player.c */
|
||||||
extern struct player *player; /* current player's context */
|
extern struct player *player; /* current player's context */
|
||||||
extern char *praddr(struct player *);
|
extern char *praddr(struct player *);
|
||||||
|
@ -451,15 +451,15 @@ extern void stop_service(void);
|
||||||
* src/lib/subs/ *.c
|
* src/lib/subs/ *.c
|
||||||
*/
|
*/
|
||||||
/* askyn.c */
|
/* askyn.c */
|
||||||
extern int confirm(s_char *);
|
extern int confirm(char *);
|
||||||
extern int askyn(s_char *);
|
extern int askyn(char *);
|
||||||
/* bsanct.c */
|
/* bsanct.c */
|
||||||
extern void bsanct(void);
|
extern void bsanct(void);
|
||||||
/* caploss.c */
|
/* caploss.c */
|
||||||
extern void caploss(struct sctstr *, natid, s_char *);
|
extern void caploss(struct sctstr *, natid, char *);
|
||||||
/* chkmoney.c */
|
/* chkmoney.c */
|
||||||
extern int chkmoney(long, long, s_char *);
|
extern int chkmoney(long, long, char *);
|
||||||
extern int check_cost(int, int, long, int *, s_char *);
|
extern int check_cost(int, int, long, int *, char *);
|
||||||
/* cnumb.c */
|
/* cnumb.c */
|
||||||
extern int cnumb(char *);
|
extern int cnumb(char *);
|
||||||
/* coastal.c */
|
/* coastal.c */
|
||||||
|
@ -488,7 +488,7 @@ extern void bitinit2(struct nstr_sect *, unsigned char *, int);
|
||||||
/* getele.c */
|
/* getele.c */
|
||||||
extern int getele(char *, char *);
|
extern int getele(char *, char *);
|
||||||
/* land.c */
|
/* land.c */
|
||||||
extern s_char *prland(struct lndstr *);
|
extern char *prland(struct lndstr *);
|
||||||
extern int lnd_postread(int, void *);
|
extern int lnd_postread(int, void *);
|
||||||
extern int lnd_prewrite(int, void *);
|
extern int lnd_prewrite(int, void *);
|
||||||
extern void lnd_init(int, void *);
|
extern void lnd_init(int, void *);
|
||||||
|
@ -505,15 +505,15 @@ extern int planesatxy(coord, coord, int, int, struct emp_qelem *);
|
||||||
extern int asw_shipsatxy(coord, coord, int, int, struct plnstr *,
|
extern int asw_shipsatxy(coord, coord, int, int, struct plnstr *,
|
||||||
struct shiplist **);
|
struct shiplist **);
|
||||||
extern int num_shipsatxy(coord, coord, int, int);
|
extern int num_shipsatxy(coord, coord, int, int);
|
||||||
extern int islist(s_char *);
|
extern int islist(char *);
|
||||||
/* src/lib/subs/mission.c */
|
/* src/lib/subs/mission.c */
|
||||||
extern s_char *mission_name(short);
|
extern char *mission_name(short);
|
||||||
extern s_char *nameofitem(struct genitem *, int);
|
extern char *nameofitem(struct genitem *, int);
|
||||||
extern int collateral_damage(coord, coord, int, struct emp_qelem *);
|
extern int collateral_damage(coord, coord, int, struct emp_qelem *);
|
||||||
extern int mission_pln_equip(struct plist *, struct ichrstr *, int,
|
extern int mission_pln_equip(struct plist *, struct ichrstr *, int,
|
||||||
s_char);
|
s_char);
|
||||||
extern int ground_interdict(coord, coord, natid, s_char *);
|
extern int ground_interdict(coord, coord, natid, char *);
|
||||||
extern int unit_interdict(coord, coord, natid, s_char *, int, int);
|
extern int unit_interdict(coord, coord, natid, char *, int, int);
|
||||||
extern int off_support(coord, coord, natid, natid);
|
extern int off_support(coord, coord, natid, natid);
|
||||||
extern int def_support(coord, coord, natid, natid);
|
extern int def_support(coord, coord, natid, natid);
|
||||||
extern int oprange(struct genitem *, int, int *);
|
extern int oprange(struct genitem *, int, int *);
|
||||||
|
@ -531,14 +531,14 @@ extern int fly_map(coord, coord);
|
||||||
/* mslsub.c */
|
/* mslsub.c */
|
||||||
extern int msl_intercept(coord, coord, natid, int, int, int, int);
|
extern int msl_intercept(coord, coord, natid, int, int, int, int);
|
||||||
extern int msl_equip(struct plnstr *);
|
extern int msl_equip(struct plnstr *);
|
||||||
extern int msl_hit(struct plnstr *, int, int, int, int, s_char *,
|
extern int msl_hit(struct plnstr *, int, int, int, int, char *,
|
||||||
coord, coord, int);
|
coord, coord, int);
|
||||||
extern void msl_sel(struct emp_qelem *, coord, coord, natid, int,
|
extern void msl_sel(struct emp_qelem *, coord, coord, natid, int,
|
||||||
int, int);
|
int, int);
|
||||||
extern int msl_launch_mindam(struct emp_qelem *, coord, coord, int,
|
extern int msl_launch_mindam(struct emp_qelem *, coord, coord, int,
|
||||||
int, int, s_char *, int, int);
|
int, int, char *, int, int);
|
||||||
/* mtch.c */
|
/* mtch.c */
|
||||||
extern int comtch(register s_char *, struct cmndstr *, int);
|
extern int comtch(char *, struct cmndstr *, int);
|
||||||
/* natarg.c */
|
/* natarg.c */
|
||||||
extern struct natstr *natargp(char *, char *);
|
extern struct natstr *natargp(char *, char *);
|
||||||
extern int natarg(char *, char *);
|
extern int natarg(char *, char *);
|
||||||
|
@ -559,7 +559,7 @@ extern int nxtitem(struct nstr_item *, void *);
|
||||||
/* nxtsct.c */
|
/* nxtsct.c */
|
||||||
extern int nxtsct(struct nstr_sect *, struct sctstr *);
|
extern int nxtsct(struct nstr_sect *, struct sctstr *);
|
||||||
/* plane.c */
|
/* plane.c */
|
||||||
extern s_char *prplane(struct plnstr *);
|
extern char *prplane(struct plnstr *);
|
||||||
extern int pln_postread(int, void *);
|
extern int pln_postread(int, void *);
|
||||||
extern int pln_prewrite(int, void *);
|
extern int pln_prewrite(int, void *);
|
||||||
extern void pln_init(int, void *);
|
extern void pln_init(int, void *);
|
||||||
|
@ -652,9 +652,9 @@ extern void sathead(void);
|
||||||
extern int sct_postread(int, void *);
|
extern int sct_postread(int, void *);
|
||||||
extern int sct_prewrite(int, void *);
|
extern int sct_prewrite(int, void *);
|
||||||
extern void item_prewrite(short *);
|
extern void item_prewrite(short *);
|
||||||
extern int issector(s_char *);
|
extern int issector(char *);
|
||||||
/* ship.c */
|
/* ship.c */
|
||||||
extern s_char *prship(struct shpstr *);
|
extern char *prship(struct shpstr *);
|
||||||
extern int shp_postread(int, void *);
|
extern int shp_postread(int, void *);
|
||||||
extern int shp_prewrite(int, void *);
|
extern int shp_prewrite(int, void *);
|
||||||
extern void shp_init(int, void *);
|
extern void shp_init(int, void *);
|
||||||
|
@ -682,7 +682,7 @@ extern void show_news(int);
|
||||||
extern void shp_sel(struct nstr_item *, struct emp_qelem *);
|
extern void shp_sel(struct nstr_item *, struct emp_qelem *);
|
||||||
extern void shp_nav(struct emp_qelem *, double *, double *, int *, natid);
|
extern void shp_nav(struct emp_qelem *, double *, double *, int *, natid);
|
||||||
extern int shp_sweep(struct emp_qelem *, int, natid);
|
extern int shp_sweep(struct emp_qelem *, int, natid);
|
||||||
extern s_char *shp_path(int, struct shpstr *, s_char *);
|
extern char *shp_path(int, struct shpstr *, char *);
|
||||||
extern void shp_put(struct emp_qelem *, natid);
|
extern void shp_put(struct emp_qelem *, natid);
|
||||||
extern void shp_list(struct emp_qelem *);
|
extern void shp_list(struct emp_qelem *);
|
||||||
extern int shp_check_nav(struct sctstr *, struct shpstr *);
|
extern int shp_check_nav(struct sctstr *, struct shpstr *);
|
||||||
|
@ -731,7 +731,7 @@ extern void delete_old_announcements(void);
|
||||||
/* deliver.c */
|
/* deliver.c */
|
||||||
extern void dodeliver(struct sctstr *);
|
extern void dodeliver(struct sctstr *);
|
||||||
/* distribute.c */
|
/* distribute.c */
|
||||||
extern int dodistribute(struct sctstr *, int, s_char *, double, double);
|
extern int dodistribute(struct sctstr *, int, char *, double, double);
|
||||||
/* finish.c */
|
/* finish.c */
|
||||||
extern void finish_sects(int);
|
extern void finish_sects(int);
|
||||||
/* human.c */
|
/* human.c */
|
||||||
|
|
|
@ -51,6 +51,6 @@ struct telstr {
|
||||||
time_t tel_date; /* when sent */
|
time_t tel_date; /* when sent */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern s_char *mailbox(s_char *buf, natid cn);
|
extern char *mailbox(char *buf, natid cn);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -66,7 +66,7 @@ union trdgenstr {
|
||||||
|
|
||||||
extern int trade_check_ok(struct trdstr *, union trdgenstr *);
|
extern int trade_check_ok(struct trdstr *, union trdgenstr *);
|
||||||
extern int trade_check_item_ok(union trdgenstr *);
|
extern int trade_check_item_ok(union trdgenstr *);
|
||||||
extern s_char *trade_nameof(struct trdstr *, union trdgenstr *);
|
extern char *trade_nameof(struct trdstr *, union trdgenstr *);
|
||||||
extern int trade_desc(struct trdstr *, union trdgenstr *);
|
extern int trade_desc(struct trdstr *, union trdgenstr *);
|
||||||
extern int trade_getitem(struct trdstr *, union trdgenstr *);
|
extern int trade_getitem(struct trdstr *, union trdgenstr *);
|
||||||
extern long get_couval(int);
|
extern long get_couval(int);
|
||||||
|
|
|
@ -54,14 +54,14 @@ arm(void)
|
||||||
struct plnstr pl;
|
struct plnstr pl;
|
||||||
struct plnstr start; /* Used for sanity checking */
|
struct plnstr start; /* Used for sanity checking */
|
||||||
struct nukstr nuke;
|
struct nukstr nuke;
|
||||||
s_char *p;
|
char *p;
|
||||||
int pno;
|
int pno;
|
||||||
int nuketype;
|
int nuketype;
|
||||||
int found;
|
int found;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int disarm = **player->argp == 'd';
|
int disarm = **player->argp == 'd';
|
||||||
s_char *prompt = disarm ? "Disarm plane: " : "Arm plane: ";
|
char *prompt = disarm ? "Disarm plane: " : "Arm plane: ";
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], prompt, buf)) || !*p)
|
if (!(p = getstarg(player->argp[1], prompt, buf)) || !*p)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -46,12 +46,12 @@ army(void)
|
||||||
{
|
{
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int count;
|
int count;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
s_char c;
|
char c;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct lndstr land2;
|
struct lndstr land2;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
cp = getstarg(player->argp[1], "army? ", buf);
|
cp = getstarg(player->argp[1], "army? ", buf);
|
||||||
if (cp == 0)
|
if (cp == 0)
|
||||||
|
|
|
@ -60,8 +60,8 @@ assa(void)
|
||||||
int a_spy = 0; /* the best assaulter scout */
|
int a_spy = 0; /* the best assaulter scout */
|
||||||
double osupport = 1.0; /* assault support */
|
double osupport = 1.0; /* assault support */
|
||||||
double dsupport = 1.0; /* defense support */
|
double dsupport = 1.0; /* defense support */
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int n;
|
int n;
|
||||||
int ourtotal;
|
int ourtotal;
|
||||||
struct emp_qelem *qp, *next;
|
struct emp_qelem *qp, *next;
|
||||||
|
|
|
@ -65,8 +65,8 @@ atta(void)
|
||||||
double osupport = 1.0; /* attack support */
|
double osupport = 1.0; /* attack support */
|
||||||
double dsupport = 1.0; /* defense support */
|
double dsupport = 1.0; /* defense support */
|
||||||
int last, n;
|
int last, n;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int rel;
|
int rel;
|
||||||
|
|
||||||
att_combat_init(def, EF_SECTOR);
|
att_combat_init(def, EF_SECTOR);
|
||||||
|
|
|
@ -45,11 +45,11 @@
|
||||||
int
|
int
|
||||||
bdes(void)
|
bdes(void)
|
||||||
{
|
{
|
||||||
s_char *p, d;
|
char *p, d;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
|
|
|
@ -46,10 +46,10 @@ int
|
||||||
best(void)
|
best(void)
|
||||||
{
|
{
|
||||||
double cost;
|
double cost;
|
||||||
s_char *s;
|
char *s;
|
||||||
struct sctstr s1, s2;
|
struct sctstr s1, s2;
|
||||||
struct nstr_sect nstr, nstr2;
|
struct nstr_sect nstr, nstr2;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -63,8 +63,8 @@ boar(void)
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
int foundland;
|
int foundland;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
att_combat_init(def, EF_SHIP);
|
att_combat_init(def, EF_SHIP);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -86,13 +86,13 @@ static int nbomb = sizeof(bombcomm) / sizeof(*bombcomm);
|
||||||
int
|
int
|
||||||
bomb(void)
|
bomb(void)
|
||||||
{
|
{
|
||||||
s_char *p;
|
char *p;
|
||||||
int mission_flags;
|
int mission_flags;
|
||||||
coord tx, ty;
|
coord tx, ty;
|
||||||
coord ax, ay;
|
coord ax, ay;
|
||||||
int ap_to_target;
|
int ap_to_target;
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
s_char flightpath[MAX_PATH_LEN];
|
char flightpath[MAX_PATH_LEN];
|
||||||
struct nstr_item ni_bomb;
|
struct nstr_item ni_bomb;
|
||||||
struct nstr_item ni_esc;
|
struct nstr_item ni_esc;
|
||||||
struct sctstr target;
|
struct sctstr target;
|
||||||
|
@ -100,10 +100,10 @@ bomb(void)
|
||||||
struct emp_qelem esc_list;
|
struct emp_qelem esc_list;
|
||||||
int wantflags;
|
int wantflags;
|
||||||
struct sctstr ap_sect;
|
struct sctstr ap_sect;
|
||||||
s_char mission;
|
char mission;
|
||||||
int rel;
|
int rel;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
wantflags = 0;
|
wantflags = 0;
|
||||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||||
|
@ -202,13 +202,13 @@ pin_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
int nships;
|
int nships;
|
||||||
int type;
|
int type;
|
||||||
int bad;
|
int bad;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
int nsubs;
|
int nsubs;
|
||||||
int nunits;
|
int nunits;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
int rel;
|
int rel;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
bad = 0;
|
bad = 0;
|
||||||
|
@ -473,7 +473,7 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
struct mchrstr *mcp;
|
struct mchrstr *mcp;
|
||||||
int dam;
|
int dam;
|
||||||
s_char *q;
|
char *q;
|
||||||
int n;
|
int n;
|
||||||
struct emp_qelem *qp;
|
struct emp_qelem *qp;
|
||||||
int shipno;
|
int shipno;
|
||||||
|
@ -481,8 +481,8 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
int nships = 0;
|
int nships = 0;
|
||||||
struct shiplist *head = NULL;
|
struct shiplist *head = NULL;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
int hitchance;
|
int hitchance;
|
||||||
int nukedam;
|
int nukedam;
|
||||||
int flak;
|
int flak;
|
||||||
|
@ -614,7 +614,7 @@ static void
|
||||||
plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
{
|
{
|
||||||
int dam;
|
int dam;
|
||||||
s_char *q;
|
char *q;
|
||||||
int n;
|
int n;
|
||||||
natid own;
|
natid own;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
|
@ -622,8 +622,8 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
int planeno;
|
int planeno;
|
||||||
int ignore;
|
int ignore;
|
||||||
struct plist *plp;
|
struct plist *plp;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int hitchance;
|
int hitchance;
|
||||||
int nukedam;
|
int nukedam;
|
||||||
int nplanes;
|
int nplanes;
|
||||||
|
@ -724,11 +724,11 @@ static void
|
||||||
land_bomb(struct emp_qelem *list, struct sctstr *target)
|
land_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
{
|
{
|
||||||
int dam;
|
int dam;
|
||||||
s_char *q;
|
char *q;
|
||||||
int n;
|
int n;
|
||||||
natid own;
|
natid own;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct emp_qelem *qp;
|
struct emp_qelem *qp;
|
||||||
int unitno;
|
int unitno;
|
||||||
|
@ -862,7 +862,7 @@ pinflak_planedamage(struct plnstr *pp, struct plchrstr *pcp, natid from,
|
||||||
int flak)
|
int flak)
|
||||||
{
|
{
|
||||||
int disp;
|
int disp;
|
||||||
s_char dmess[255];
|
char dmess[255];
|
||||||
int eff;
|
int eff;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
|
|
|
@ -86,11 +86,11 @@ buil(void)
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
struct plchrstr *pp;
|
struct plchrstr *pp;
|
||||||
struct nchrstr *np;
|
struct nchrstr *np;
|
||||||
s_char *p;
|
char *p;
|
||||||
int gotsect = 0;
|
int gotsect = 0;
|
||||||
int built;
|
int built;
|
||||||
int number;
|
int number;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
natp = getnatp(player->cnum);
|
natp = getnatp(player->cnum);
|
||||||
if ((p =
|
if ((p =
|
||||||
|
@ -221,7 +221,7 @@ buil(void)
|
||||||
if (player->argp[4]) {
|
if (player->argp[4]) {
|
||||||
number = atoi(player->argp[4]);
|
number = atoi(player->argp[4]);
|
||||||
if (number > 20) {
|
if (number > 20) {
|
||||||
s_char bstr[80];
|
char bstr[80];
|
||||||
sprintf(bstr,
|
sprintf(bstr,
|
||||||
"Are you sure that you want to build %s of them? ",
|
"Are you sure that you want to build %s of them? ",
|
||||||
player->argp[4]);
|
player->argp[4]);
|
||||||
|
@ -536,8 +536,8 @@ build_bridge(struct sctstr *sp, short *vec)
|
||||||
int newx, newy;
|
int newx, newy;
|
||||||
int avail;
|
int avail;
|
||||||
int nx, ny, i, good = 0;
|
int nx, ny, i, good = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (opt_EASY_BRIDGES == 0) { /* must have a bridge head or tower */
|
if (opt_EASY_BRIDGES == 0) { /* must have a bridge head or tower */
|
||||||
if (sp->sct_type != SCT_BTOWER) {
|
if (sp->sct_type != SCT_BTOWER) {
|
||||||
|
@ -801,8 +801,8 @@ build_tower(struct sctstr *sp, short *vec)
|
||||||
int val;
|
int val;
|
||||||
int newx, newy;
|
int newx, newy;
|
||||||
int avail;
|
int avail;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int good;
|
int good;
|
||||||
int i;
|
int i;
|
||||||
int nx;
|
int nx;
|
||||||
|
|
|
@ -75,7 +75,7 @@ buy(void)
|
||||||
time_t now;
|
time_t now;
|
||||||
double tally;
|
double tally;
|
||||||
double canspend;
|
double canspend;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_MARKET) {
|
if (!opt_MARKET) {
|
||||||
pr("The market is disabled.\n");
|
pr("The market is disabled.\n");
|
||||||
|
|
|
@ -61,11 +61,11 @@ cede(void)
|
||||||
natid to;
|
natid to;
|
||||||
int n;
|
int n;
|
||||||
int is_sector = 0, is_ship = 0;
|
int is_sector = 0, is_ship = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct nstr_sect ns;
|
struct nstr_sect ns;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if ((p = getstarg(player->argp[1], "Cede what? ", buf)) == 0)
|
if ((p = getstarg(player->argp[1], "Cede what? ", buf)) == 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -45,14 +45,14 @@
|
||||||
int
|
int
|
||||||
chan(void)
|
chan(void)
|
||||||
{
|
{
|
||||||
s_char *temp;
|
char *temp;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
register s_char *p;
|
char *p;
|
||||||
natid cn;
|
natid cn;
|
||||||
int charge;
|
int charge;
|
||||||
int nonb;
|
int nonb;
|
||||||
int btucost;
|
int btucost;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
struct natstr *us;
|
struct natstr *us;
|
||||||
|
|
||||||
if ((p =
|
if ((p =
|
||||||
|
|
|
@ -48,7 +48,7 @@ int
|
||||||
comm(void)
|
comm(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char dirstr[12];
|
char dirstr[12];
|
||||||
int nsect;
|
int nsect;
|
||||||
int n;
|
int n;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
struct ltcomstr {
|
struct ltcomstr {
|
||||||
int type; /* EF_LOAN or EF_TREATY */
|
int type; /* EF_LOAN or EF_TREATY */
|
||||||
int num; /* number */
|
int num; /* number */
|
||||||
s_char *name; /* "loan" or "treaty" */
|
char *name; /* "loan" or "treaty" */
|
||||||
s_char *Name; /* "Loan" or "Treaty" */
|
char *Name; /* "Loan" or "Treaty" */
|
||||||
natid proposer; /* country offering */
|
natid proposer; /* country offering */
|
||||||
natid proposee; /* country offered to */
|
natid proposee; /* country offered to */
|
||||||
natid mailee; /* who gets mail about it */
|
natid mailee; /* who gets mail about it */
|
||||||
|
@ -113,11 +113,11 @@ static int
|
||||||
cons_choose(struct ltcomstr *ltcp)
|
cons_choose(struct ltcomstr *ltcp)
|
||||||
{
|
{
|
||||||
static int lon_or_trt[] = { EF_LOAN, EF_TREATY, EF_BAD };
|
static int lon_or_trt[] = { EF_LOAN, EF_TREATY, EF_BAD };
|
||||||
s_char *p;
|
char *p;
|
||||||
struct lonstr *lp;
|
struct lonstr *lp;
|
||||||
struct trtstr *tp;
|
struct trtstr *tp;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
memset(ltcp, 0, sizeof(*ltcp));
|
memset(ltcp, 0, sizeof(*ltcp));
|
||||||
if (getstarg(player->argp[1], "loan or treaty? ", buf) == 0)
|
if (getstarg(player->argp[1], "loan or treaty? ", buf) == 0)
|
||||||
|
|
|
@ -49,7 +49,7 @@ cuto(void)
|
||||||
int nsect;
|
int nsect;
|
||||||
int n;
|
int n;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char dirstr[12];
|
char dirstr[12];
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -49,8 +49,8 @@ decl(void)
|
||||||
int rel;
|
int rel;
|
||||||
int who;
|
int who;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1],
|
if (!(p = getstarg(player->argp[1],
|
||||||
"alliance, friendly, neutrality, hostility, or war? ",
|
"alliance, friendly, neutrality, hostility, or war? ",
|
||||||
|
|
|
@ -53,9 +53,9 @@ deli(void)
|
||||||
int thresh;
|
int thresh;
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char *p;
|
char *p;
|
||||||
|
|
||||||
if ((ich = whatitem(player->argp[1], "deliver what? ")) == 0)
|
if ((ich = whatitem(player->argp[1], "deliver what? ")) == 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static long do_demo(struct natstr *natp, struct nstr_sect nstr, int number,
|
static long do_demo(struct natstr *natp, struct nstr_sect nstr, int number,
|
||||||
s_char *p, int for_real);
|
char *p, int for_real);
|
||||||
|
|
||||||
int
|
int
|
||||||
demo(void)
|
demo(void)
|
||||||
|
@ -57,8 +57,8 @@ demo(void)
|
||||||
long cash;
|
long cash;
|
||||||
long cost;
|
long cost;
|
||||||
int number;
|
int number;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
|
|
||||||
natp = getnatp(player->cnum);
|
natp = getnatp(player->cnum);
|
||||||
|
@ -80,7 +80,7 @@ demo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static long
|
static long
|
||||||
do_demo(struct natstr *natp, struct nstr_sect nstr, int number, s_char *p,
|
do_demo(struct natstr *natp, struct nstr_sect nstr, int number, char *p,
|
||||||
int for_real)
|
int for_real)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
|
||||||
static long do_desi(struct natstr *natp, s_char *sects, s_char *deschar,
|
static long do_desi(struct natstr *natp, char *sects, char *deschar,
|
||||||
long int cash, int for_real);
|
long int cash, int for_real);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -67,11 +67,11 @@ desi(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static long
|
static long
|
||||||
do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
do_desi(struct natstr *natp, char *sects, char *deschar, long int cash,
|
||||||
int for_real)
|
int for_real)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
s_char *p;
|
char *p;
|
||||||
int breaksanct;
|
int breaksanct;
|
||||||
int cap_x;
|
int cap_x;
|
||||||
int cap_y;
|
int cap_y;
|
||||||
|
@ -79,8 +79,8 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct sctstr check;
|
struct sctstr check;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
long cost = 0;
|
long cost = 0;
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
int warned = 0;
|
int warned = 0;
|
||||||
|
|
|
@ -53,10 +53,10 @@ dist(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect, dsect, tsect;
|
struct sctstr sect, dsect, tsect;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char *path, *p;
|
char *path, *p;
|
||||||
double move_cost = 0.0;
|
double move_cost = 0.0;
|
||||||
coord dstx, dsty;
|
coord dstx, dsty;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -54,7 +54,7 @@ drop(void)
|
||||||
coord ax, ay;
|
coord ax, ay;
|
||||||
int ap_to_target;
|
int ap_to_target;
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
s_char flightpath[MAX_PATH_LEN];
|
char flightpath[MAX_PATH_LEN];
|
||||||
struct nstr_item ni_bomb;
|
struct nstr_item ni_bomb;
|
||||||
struct nstr_item ni_esc;
|
struct nstr_item ni_esc;
|
||||||
struct sctstr target;
|
struct sctstr target;
|
||||||
|
@ -62,7 +62,7 @@ drop(void)
|
||||||
struct emp_qelem esc_list;
|
struct emp_qelem esc_list;
|
||||||
int wantflags;
|
int wantflags;
|
||||||
struct sctstr ap_sect;
|
struct sctstr ap_sect;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
wantflags = 0;
|
wantflags = 0;
|
||||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||||
|
|
|
@ -49,7 +49,7 @@ int
|
||||||
dump(void)
|
dump(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char dirstr[20];
|
char dirstr[20];
|
||||||
int nsect;
|
int nsect;
|
||||||
int n, i;
|
int n, i;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
|
|
|
@ -55,10 +55,10 @@ enli(void)
|
||||||
int milwant;
|
int milwant;
|
||||||
int totalmil;
|
int totalmil;
|
||||||
long reserve;
|
long reserve;
|
||||||
s_char *p;
|
char *p;
|
||||||
int quota;
|
int quota;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -46,12 +46,12 @@ flee(void)
|
||||||
{
|
{
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
int count;
|
int count;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
s_char c;
|
char c;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct shpstr ship2;
|
struct shpstr ship2;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
cp = getstarg(player->argp[1], "fleet? ", buf);
|
cp = getstarg(player->argp[1], "fleet? ", buf);
|
||||||
if (cp == 0)
|
if (cp == 0)
|
||||||
|
|
|
@ -55,7 +55,7 @@ fly(void)
|
||||||
coord ax, ay;
|
coord ax, ay;
|
||||||
int ap_to_target;
|
int ap_to_target;
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
s_char flightpath[MAX_PATH_LEN];
|
char flightpath[MAX_PATH_LEN];
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
int cno;
|
int cno;
|
||||||
struct nstr_item ni_bomb;
|
struct nstr_item ni_bomb;
|
||||||
|
@ -67,7 +67,7 @@ fly(void)
|
||||||
struct sctstr ap_sect;
|
struct sctstr ap_sect;
|
||||||
int dst_type;
|
int dst_type;
|
||||||
s_char *dst_ptr;
|
s_char *dst_ptr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
wantflags = 0;
|
wantflags = 0;
|
||||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||||
|
|
|
@ -48,11 +48,11 @@ int
|
||||||
foll(void)
|
foll(void)
|
||||||
{
|
{
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
int good, leader, count = 0;
|
int good, leader, count = 0;
|
||||||
coord x, y;
|
coord x, y;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_SAIL) {
|
if (!opt_SAIL) {
|
||||||
pr("The SAIL option is not enabled, so this command is not valid.\n");
|
pr("The SAIL option is not enabled, so this command is not valid.\n");
|
||||||
|
|
|
@ -48,8 +48,8 @@ fort(void)
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int fort_amt, hard_amt;
|
int fort_amt, hard_amt;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -62,7 +62,7 @@ fuel(void)
|
||||||
int type;
|
int type;
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
struct lchrstr *lcp;
|
struct lchrstr *lcp;
|
||||||
s_char *p;
|
char *p;
|
||||||
int fueled;
|
int fueled;
|
||||||
int land_fuel, ship_fuel;
|
int land_fuel, ship_fuel;
|
||||||
int oil_amt, pet_amt, fuel_amt, tot_fuel, max_amt;
|
int oil_amt, pet_amt, fuel_amt, tot_fuel, max_amt;
|
||||||
|
@ -73,8 +73,8 @@ fuel(void)
|
||||||
int harbor, sector;
|
int harbor, sector;
|
||||||
int fuelled_ship = -1;
|
int fuelled_ship = -1;
|
||||||
struct nstr_item tender, ltender;
|
struct nstr_item tender, ltender;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (opt_FUEL == 0) {
|
if (opt_FUEL == 0) {
|
||||||
pr("Option 'FUEL' not enabled\n");
|
pr("Option 'FUEL' not enabled\n");
|
||||||
|
|
|
@ -56,9 +56,9 @@ give(void)
|
||||||
int amt;
|
int amt;
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
int m, n;
|
int m, n;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(ip = whatitem(player->argp[1], "which commodity? ")))
|
if (!(ip = whatitem(player->argp[1], "which commodity? ")))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -48,10 +48,10 @@ grin(void)
|
||||||
{
|
{
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char *p;
|
char *p;
|
||||||
int i, n, qty;
|
int i, n, qty;
|
||||||
int avail;
|
int avail;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
double grind_eff = 0.8;
|
double grind_eff = 0.8;
|
||||||
|
|
||||||
if ((p = getstarg(player->argp[1], "Sectors? ", buf)) == 0)
|
if ((p = getstarg(player->argp[1], "Sectors? ", buf)) == 0)
|
||||||
|
|
|
@ -54,12 +54,12 @@ hard(void)
|
||||||
struct plchrstr *pcp;
|
struct plchrstr *pcp;
|
||||||
struct plnstr pln;
|
struct plnstr pln;
|
||||||
int level;
|
int level;
|
||||||
s_char *p;
|
char *p;
|
||||||
int hcm;
|
int hcm;
|
||||||
int n;
|
int n;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
long cash;
|
long cash;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,9 @@ improve(void)
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
int nsect;
|
int nsect;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char inbuf[128];
|
char inbuf[128];
|
||||||
int type;
|
int type;
|
||||||
int value;
|
int value;
|
||||||
int ovalue;
|
int ovalue;
|
||||||
|
|
|
@ -52,14 +52,14 @@
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
|
||||||
static s_char *
|
static char *
|
||||||
lowerit(s_char *buf, int n, s_char *orig)
|
lowerit(char *buf, int n, char *orig)
|
||||||
{ /* converts a string to lower case */
|
{ /* converts a string to lower case */
|
||||||
/* lower case output buffer */
|
/* lower case output buffer */
|
||||||
/* size of output buffer */
|
/* size of output buffer */
|
||||||
/* input strig */
|
/* input strig */
|
||||||
int i;
|
int i;
|
||||||
s_char *tmp;
|
char *tmp;
|
||||||
tmp = buf;
|
tmp = buf;
|
||||||
memset(buf, 0, n);
|
memset(buf, 0, n);
|
||||||
for (i = 0; i < n && *orig; i++) {
|
for (i = 0; i < n && *orig; i++) {
|
||||||
|
@ -73,14 +73,14 @@ lowerit(s_char *buf, int n, s_char *orig)
|
||||||
int
|
int
|
||||||
info(void)
|
info(void)
|
||||||
{
|
{
|
||||||
s_char buf[255];
|
char buf[255];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
s_char *name;
|
char *name;
|
||||||
s_char *tmp_name;
|
char *tmp_name;
|
||||||
struct stat statb;
|
struct stat statb;
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
s_char filename[1024];
|
char filename[1024];
|
||||||
s_char last[256];
|
char last[256];
|
||||||
DIR *info_dp;
|
DIR *info_dp;
|
||||||
int nmatch = 0;
|
int nmatch = 0;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
@ -172,11 +172,11 @@ int
|
||||||
apro(void)
|
apro(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
s_char *name, *lbp;
|
char *name, *lbp;
|
||||||
s_char *fbuf;
|
char *fbuf;
|
||||||
s_char *lbuf;
|
char *lbuf;
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
s_char filename[1024];
|
char filename[1024];
|
||||||
DIR *info_dp;
|
DIR *info_dp;
|
||||||
long nf, nhf, nl, nlhl, nhl, nll;
|
long nf, nhf, nl, nlhl, nhl, nll;
|
||||||
int alreadyhit;
|
int alreadyhit;
|
||||||
|
@ -277,17 +277,17 @@ apro(void)
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else /* _WIN32 */
|
||||||
|
|
||||||
int
|
int
|
||||||
info(void)
|
info(void)
|
||||||
{
|
{
|
||||||
s_char buf[255];
|
char buf[255];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
s_char *name;
|
char *name;
|
||||||
s_char *tmp_name;
|
char *tmp_name;
|
||||||
s_char filename[1024];
|
char filename[1024];
|
||||||
s_char last[256];
|
char last[256];
|
||||||
int nmatch = 0;
|
int nmatch = 0;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
char sep;
|
char sep;
|
||||||
|
@ -402,10 +402,10 @@ apro(void)
|
||||||
HANDLE hDir;
|
HANDLE hDir;
|
||||||
WIN32_FIND_DATA fData;
|
WIN32_FIND_DATA fData;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
s_char *name, *lbp;
|
char *name, *lbp;
|
||||||
s_char *fbuf;
|
char *fbuf;
|
||||||
s_char *lbuf;
|
char *lbuf;
|
||||||
s_char filename[1024];
|
char filename[1024];
|
||||||
long nf, nhf, nl, nlhl, nhl, nll;
|
long nf, nhf, nl, nlhl, nhl, nll;
|
||||||
int alreadyhit;
|
int alreadyhit;
|
||||||
int lhitlim;
|
int lhitlim;
|
||||||
|
@ -504,4 +504,4 @@ apro(void)
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* _WIN32 */
|
||||||
|
|
|
@ -177,7 +177,7 @@ static int
|
||||||
launch_as(struct plnstr *pp)
|
launch_as(struct plnstr *pp)
|
||||||
{
|
{
|
||||||
coord sx, sy;
|
coord sx, sy;
|
||||||
s_char *cp, buf[1024];
|
char *cp, buf[1024];
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
int goodtarget;
|
int goodtarget;
|
||||||
|
@ -243,14 +243,14 @@ launch_missile(struct plnstr *pp, int sublaunch)
|
||||||
struct plchrstr *pcp = plchr + pp->pln_type;
|
struct plchrstr *pcp = plchr + pp->pln_type;
|
||||||
coord sx, sy;
|
coord sx, sy;
|
||||||
int n, dam;
|
int n, dam;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
struct mchrstr *mcp;
|
struct mchrstr *mcp;
|
||||||
struct shpstr target_ship;
|
struct shpstr target_ship;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
int nukedam;
|
int nukedam;
|
||||||
int rel;
|
int rel;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (pcp->pl_flags & P_MAR)
|
if (pcp->pl_flags & P_MAR)
|
||||||
cp = getstarg(player->argp[2], "Target ship? ", buf);
|
cp = getstarg(player->argp[2], "Target ship? ", buf);
|
||||||
|
@ -380,9 +380,9 @@ launch_sat(struct plnstr *pp, int sublaunch)
|
||||||
int i;
|
int i;
|
||||||
int dist;
|
int dist;
|
||||||
int dir;
|
int dir;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
pr("\n");
|
pr("\n");
|
||||||
cp = getstarg(player->argp[2], "Target sector? ", buf);
|
cp = getstarg(player->argp[2], "Target sector? ", buf);
|
||||||
|
|
|
@ -59,8 +59,8 @@ lboa(void)
|
||||||
int a_spy = 0; /* the best boarder scout */
|
int a_spy = 0; /* the best boarder scout */
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
att_combat_init(def, EF_LAND);
|
att_combat_init(def, EF_LAND);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -84,8 +84,8 @@ load(void)
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
int retval;
|
int retval;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1],
|
if (!(p = getstarg(player->argp[1],
|
||||||
"What commodity (or 'plane' or 'land')? ", buf))
|
"What commodity (or 'plane' or 'land')? ", buf))
|
||||||
|
@ -223,8 +223,8 @@ lload(void)
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int retval;
|
int retval;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1],
|
if (!(p = getstarg(player->argp[1],
|
||||||
"What commodity (or 'plane' or 'land')? ", buf))
|
"What commodity (or 'plane' or 'land')? ", buf))
|
||||||
|
@ -371,9 +371,9 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct plnstr pln;
|
struct plnstr pln;
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
struct mchrstr *mcp = mchr + sp->shp_type;
|
struct mchrstr *mcp = mchr + sp->shp_type;
|
||||||
|
|
||||||
if (!(mcp->m_flags & (M_CHOPPER | M_XLIGHT | M_FLY | M_MSL))) {
|
if (!(mcp->m_flags & (M_CHOPPER | M_XLIGHT | M_FLY | M_MSL))) {
|
||||||
|
@ -504,9 +504,9 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int load_spy = 0;
|
int load_spy = 0;
|
||||||
|
|
||||||
count_units(sp);
|
count_units(sp);
|
||||||
|
@ -724,9 +724,9 @@ load_comm_ship(struct sctstr *sectp, struct shpstr *sp,
|
||||||
struct mchrstr *mcp = &mchr[(int)sp->shp_type];
|
struct mchrstr *mcp = &mchr[(int)sp->shp_type];
|
||||||
int ship_amt, ship_max, sect_amt, move_amt;
|
int ship_amt, ship_max, sect_amt, move_amt;
|
||||||
int amount;
|
int amount;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
sprintf(prompt, "Number of %s to %s %s at %s? ",
|
sprintf(prompt, "Number of %s to %s %s at %s? ",
|
||||||
ich->i_name,
|
ich->i_name,
|
||||||
|
@ -801,9 +801,9 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct plnstr pln;
|
struct plnstr pln;
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!lp->lnd_maxlight) {
|
if (!lp->lnd_maxlight) {
|
||||||
if (noisy)
|
if (noisy)
|
||||||
|
@ -917,9 +917,9 @@ load_comm_land(struct sctstr *sectp, struct lndstr *lp,
|
||||||
struct lchrstr *lcp = &lchr[(int)lp->lnd_type];
|
struct lchrstr *lcp = &lchr[(int)lp->lnd_type];
|
||||||
int land_amt, land_max, sect_amt, move_amt;
|
int land_amt, land_max, sect_amt, move_amt;
|
||||||
int amount;
|
int amount;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
sprintf(prompt, "Number of %s to %s %s at %s? ",
|
sprintf(prompt, "Number of %s to %s %s at %s? ",
|
||||||
ich->i_name,
|
ich->i_name,
|
||||||
|
@ -999,9 +999,9 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
lnd_count_units(lp);
|
lnd_count_units(lp);
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,8 @@ ltend(void)
|
||||||
int maxtarget;
|
int maxtarget;
|
||||||
int transfer;
|
int transfer;
|
||||||
int total;
|
int total;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(ip = whatitem(player->argp[1], "Transfer what commodity? ")))
|
if (!(ip = whatitem(player->argp[1], "Transfer what commodity? ")))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
int
|
int
|
||||||
map(void)
|
map(void)
|
||||||
{
|
{
|
||||||
register s_char *b;
|
char *b;
|
||||||
int unit_type = 0;
|
int unit_type = 0;
|
||||||
int bmap = 0;
|
int bmap = 0;
|
||||||
struct nstr_sect ns;
|
struct nstr_sect ns;
|
||||||
|
|
|
@ -54,15 +54,15 @@ march(void)
|
||||||
struct emp_qelem land_list;
|
struct emp_qelem land_list;
|
||||||
double minmob, maxmob;
|
double minmob, maxmob;
|
||||||
int together;
|
int together;
|
||||||
s_char *cp = 0;
|
char *cp = 0;
|
||||||
struct lndstr *lnd = 0; /* leader */
|
struct lndstr *lnd = 0; /* leader */
|
||||||
struct nstr_sect ns;
|
struct nstr_sect ns;
|
||||||
s_char origin;
|
s_char origin;
|
||||||
int dir;
|
int dir;
|
||||||
int stopping = 0;
|
int stopping = 0;
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
|
|
||||||
if (!snxtitem(&ni_land, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni_land, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -88,8 +88,8 @@ int
|
||||||
multifire(void)
|
multifire(void)
|
||||||
{
|
{
|
||||||
static int ef_with_guns[] = { EF_SECTOR, EF_SHIP, EF_LAND, EF_BAD };
|
static int ef_with_guns[] = { EF_SECTOR, EF_SHIP, EF_LAND, EF_BAD };
|
||||||
s_char vbuf[20];
|
char vbuf[20];
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
double range2, range;
|
double range2, range;
|
||||||
int trange;
|
int trange;
|
||||||
coord fx;
|
coord fx;
|
||||||
|
@ -117,13 +117,13 @@ multifire(void)
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
struct nstr_item nbst;
|
struct nstr_item nbst;
|
||||||
int type;
|
int type;
|
||||||
s_char *p;
|
char *p;
|
||||||
int nfiring = 0;
|
int nfiring = 0;
|
||||||
int ndefending = 0;
|
int ndefending = 0;
|
||||||
union item_u item;
|
union item_u item;
|
||||||
struct emp_qelem fired, defended;
|
struct emp_qelem fired, defended;
|
||||||
double odds;
|
double odds;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
emp_initque(&fired);
|
emp_initque(&fired);
|
||||||
emp_initque(&defended);
|
emp_initque(&defended);
|
||||||
|
|
|
@ -105,7 +105,7 @@ landmine(void)
|
||||||
int mines_wanted;
|
int mines_wanted;
|
||||||
int mines_laid;
|
int mines_laid;
|
||||||
int total_mines_laid;
|
int total_mines_laid;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -48,10 +48,10 @@ int
|
||||||
mobq(void)
|
mobq(void)
|
||||||
{
|
{
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
s_char *cp, *oldmq;
|
char *cp, *oldmq;
|
||||||
int good, mobquota, count = 0;
|
int good, mobquota, count = 0;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_SAIL) {
|
if (!opt_SAIL) {
|
||||||
pr("The SAIL option is not enabled, so this command is not valid.\n");
|
pr("The SAIL option is not enabled, so this command is not valid.\n");
|
||||||
|
|
|
@ -50,9 +50,9 @@ morale(void)
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
int i, min;
|
int i, min;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char mess[128];
|
char mess[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&np, EF_LAND, player->argp[1]))
|
if (!snxtitem(&np, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -49,9 +49,9 @@ int
|
||||||
name(void)
|
name(void)
|
||||||
{
|
{
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct nstr_item nb;
|
struct nstr_item nb;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -56,17 +56,17 @@ navi(void)
|
||||||
struct emp_qelem ship_list;
|
struct emp_qelem ship_list;
|
||||||
double minmob, maxmob;
|
double minmob, maxmob;
|
||||||
int together;
|
int together;
|
||||||
s_char *cp = 0;
|
char *cp = 0;
|
||||||
struct shpstr *shp = 0; /* flagship */
|
struct shpstr *shp = 0; /* flagship */
|
||||||
struct nstr_sect ns;
|
struct nstr_sect ns;
|
||||||
s_char origin;
|
s_char origin;
|
||||||
int dir;
|
int dir;
|
||||||
int stopping = 0;
|
int stopping = 0;
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char pathtaken[1024]; /* Doubtful we'll have a path longer than this */
|
char pathtaken[1024]; /* Doubtful we'll have a path longer than this */
|
||||||
s_char *pt = pathtaken;
|
char *pt = pathtaken;
|
||||||
|
|
||||||
if (!snxtitem(&ni_ship, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&ni_ship, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -64,8 +64,8 @@ news(void)
|
||||||
short k;
|
short k;
|
||||||
int sectors_were_taken = 0;
|
int sectors_were_taken = 0;
|
||||||
natid i, j;
|
natid i, j;
|
||||||
s_char num[128];
|
char num[128];
|
||||||
s_char *verb;
|
char *verb;
|
||||||
|
|
||||||
if (!snxtitem(&nstr, EF_NEWS, "*"))
|
if (!snxtitem(&nstr, EF_NEWS, "*"))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -176,11 +176,11 @@ news(void)
|
||||||
static void
|
static void
|
||||||
preport(register struct nwsstr *np)
|
preport(register struct nwsstr *np)
|
||||||
{
|
{
|
||||||
register s_char *cp;
|
char *cp;
|
||||||
register int i;
|
register int i;
|
||||||
s_char buf[255];
|
char buf[255];
|
||||||
s_char num[128];
|
char num[128];
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
cp = buf;
|
cp = buf;
|
||||||
sprintf(buf, "%-16.16s ", ctime(&np->nws_when));
|
sprintf(buf, "%-16.16s ", ctime(&np->nws_when));
|
||||||
|
|
|
@ -51,8 +51,8 @@ static int do_loan(void);
|
||||||
int
|
int
|
||||||
offe(void)
|
offe(void)
|
||||||
{
|
{
|
||||||
register s_char *cp;
|
char *cp;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(cp = getstarg(player->argp[1], "loan or treaty? ", buf)) || !*cp)
|
if (!(cp = getstarg(player->argp[1], "loan or treaty? ", buf)) || !*cp)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -79,7 +79,7 @@ offe(void)
|
||||||
static int
|
static int
|
||||||
do_treaty(void)
|
do_treaty(void)
|
||||||
{
|
{
|
||||||
register s_char *cp;
|
char *cp;
|
||||||
register int ourcond;
|
register int ourcond;
|
||||||
register int theircond;
|
register int theircond;
|
||||||
register int j;
|
register int j;
|
||||||
|
@ -90,8 +90,8 @@ do_treaty(void)
|
||||||
time_t now;
|
time_t now;
|
||||||
int n;
|
int n;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if ((n = natarg(player->argp[2], "Treaty offered to? ")) < 0)
|
if ((n = natarg(player->argp[2], "Treaty offered to? ")) < 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -169,7 +169,7 @@ do_loan(void)
|
||||||
struct lonstr loan;
|
struct lonstr loan;
|
||||||
natid recipient;
|
natid recipient;
|
||||||
int n;
|
int n;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
|
|
||||||
if ((n = natarg(player->argp[2], "Lend to? ")) < 0)
|
if ((n = natarg(player->argp[2], "Lend to? ")) < 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -78,10 +78,10 @@ orde(void)
|
||||||
struct ichrstr *i1;
|
struct ichrstr *i1;
|
||||||
coord p0x, p0y, p1x, p1y;
|
coord p0x, p0y, p1x, p1y;
|
||||||
int i;
|
int i;
|
||||||
s_char *p, *p1, *dest;
|
char *p, *p1, *dest;
|
||||||
s_char buf1[128];
|
char buf1[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
|
|
||||||
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -322,7 +322,7 @@ orde(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
eta_calc(struct shpstr *sp, s_char *path, int *len, int *nupdates)
|
eta_calc(struct shpstr *sp, char *path, int *len, int *nupdates)
|
||||||
{
|
{
|
||||||
double mobcost, mobil;
|
double mobcost, mobil;
|
||||||
int i;
|
int i;
|
||||||
|
@ -423,10 +423,10 @@ sorde(void)
|
||||||
{
|
{
|
||||||
int nships = 0;
|
int nships = 0;
|
||||||
int len, updates;
|
int len, updates;
|
||||||
s_char *c;
|
char *c;
|
||||||
struct nstr_item nb;
|
struct nstr_item nb;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&nb, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -45,9 +45,9 @@
|
||||||
int
|
int
|
||||||
orig(void)
|
orig(void)
|
||||||
{
|
{
|
||||||
s_char *p;
|
char *p;
|
||||||
coord x, y;
|
coord x, y;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
natid cnum;
|
natid cnum;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ para(void)
|
||||||
coord tx, ty;
|
coord tx, ty;
|
||||||
coord ax, ay;
|
coord ax, ay;
|
||||||
int ap_to_target;
|
int ap_to_target;
|
||||||
s_char flightpath[MAX_PATH_LEN];
|
char flightpath[MAX_PATH_LEN];
|
||||||
struct nstr_item ni_bomb;
|
struct nstr_item ni_bomb;
|
||||||
struct nstr_item ni_esc;
|
struct nstr_item ni_esc;
|
||||||
struct sctstr target;
|
struct sctstr target;
|
||||||
|
@ -67,7 +67,7 @@ para(void)
|
||||||
struct emp_qelem esc_list;
|
struct emp_qelem esc_list;
|
||||||
int wantflags;
|
int wantflags;
|
||||||
struct sctstr ap_sect;
|
struct sctstr ap_sect;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
wantflags = P_P;
|
wantflags = P_P;
|
||||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||||
|
|
|
@ -58,13 +58,13 @@ path(void)
|
||||||
coord cx, cy;
|
coord cx, cy;
|
||||||
int i;
|
int i;
|
||||||
int y;
|
int y;
|
||||||
s_char *pp, *p;
|
char *pp, *p;
|
||||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||||
around */
|
around */
|
||||||
static s_char *mapbuf = NULL;
|
static char *mapbuf = NULL;
|
||||||
static s_char **map = NULL;
|
static char **map = NULL;
|
||||||
double move_cost;
|
double move_cost;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], "from sector : ", buf)) ||
|
if (!(p = getstarg(player->argp[1], "from sector : ", buf)) ||
|
||||||
!sarg_xy(p, &cx, &cy) || !getsect(cx, cy, §))
|
!sarg_xy(p, &cx, &cy) || !getsect(cx, cy, §))
|
||||||
|
|
|
@ -80,7 +80,7 @@ powe(void)
|
||||||
int use_targets = 0;
|
int use_targets = 0;
|
||||||
int got_targets = 0;
|
int got_targets = 0;
|
||||||
int no_numbers = 0;
|
int no_numbers = 0;
|
||||||
s_char *p;
|
char *p;
|
||||||
|
|
||||||
memset(targets, 0, sizeof(targets));
|
memset(targets, 0, sizeof(targets));
|
||||||
natp = getnatp(player->cnum);
|
natp = getnatp(player->cnum);
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
int
|
int
|
||||||
rada(void)
|
rada(void)
|
||||||
{
|
{
|
||||||
s_char *cp;
|
char *cp;
|
||||||
double tf;
|
double tf;
|
||||||
double tech;
|
double tech;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
|
@ -58,7 +58,7 @@ rada(void)
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
int from_unit;
|
int from_unit;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
from_unit = (**player->argp == 'l');
|
from_unit = (**player->argp == 'l');
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ range(void)
|
||||||
struct nstr_item np;
|
struct nstr_item np;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
int i;
|
int i;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&np, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&np, EF_PLANE, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -53,13 +53,13 @@
|
||||||
int
|
int
|
||||||
rea(void)
|
rea(void)
|
||||||
{
|
{
|
||||||
static s_char *telnames[] = {
|
static char *telnames[] = {
|
||||||
/* must follow TEL_ defines in tel.h */
|
/* must follow TEL_ defines in tel.h */
|
||||||
"Telegram", "Announcement", "BULLETIN", "Production Report"
|
"Telegram", "Announcement", "BULLETIN", "Production Report"
|
||||||
};
|
};
|
||||||
register s_char *p;
|
char *p;
|
||||||
register s_char *mbox;
|
char *mbox;
|
||||||
s_char mbox_buf[256]; /* Maximum path length */
|
char mbox_buf[256]; /* Maximum path length */
|
||||||
struct telstr tgm;
|
struct telstr tgm;
|
||||||
FILE *telfp;
|
FILE *telfp;
|
||||||
int teles;
|
int teles;
|
||||||
|
@ -72,7 +72,7 @@ rea(void)
|
||||||
time_t lastdate;
|
time_t lastdate;
|
||||||
int header;
|
int header;
|
||||||
int filelen;
|
int filelen;
|
||||||
s_char kind[80];
|
char kind[80];
|
||||||
int n;
|
int n;
|
||||||
int num = player->cnum;
|
int num = player->cnum;
|
||||||
struct natstr *np = getnatp(player->cnum);
|
struct natstr *np = getnatp(player->cnum);
|
||||||
|
|
|
@ -52,7 +52,7 @@ reco(void)
|
||||||
coord tx, ty;
|
coord tx, ty;
|
||||||
coord ax, ay;
|
coord ax, ay;
|
||||||
int ap_to_target;
|
int ap_to_target;
|
||||||
s_char flightpath[MAX_PATH_LEN];
|
char flightpath[MAX_PATH_LEN];
|
||||||
int cno;
|
int cno;
|
||||||
struct nstr_item ni_bomb;
|
struct nstr_item ni_bomb;
|
||||||
struct nstr_item ni_esc;
|
struct nstr_item ni_esc;
|
||||||
|
@ -61,7 +61,7 @@ reco(void)
|
||||||
struct emp_qelem esc_list;
|
struct emp_qelem esc_list;
|
||||||
int wantflags;
|
int wantflags;
|
||||||
struct sctstr ap_sect;
|
struct sctstr ap_sect;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
wantflags = 0;
|
wantflags = 0;
|
||||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
int
|
int
|
||||||
reje(void)
|
reje(void)
|
||||||
{
|
{
|
||||||
register s_char *p;
|
char *p;
|
||||||
int rel;
|
int rel;
|
||||||
int do_undo;
|
int do_undo;
|
||||||
struct natstr nat;
|
struct natstr nat;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if ((p = getstarg(player->argp[1], "reject or accept? ", buf)) == 0)
|
if ((p = getstarg(player->argp[1], "reject or accept? ", buf)) == 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -60,7 +60,7 @@ rese(void)
|
||||||
char *p;
|
char *p;
|
||||||
float price;
|
float price;
|
||||||
time_t now;
|
time_t now;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_MARKET) {
|
if (!opt_MARKET) {
|
||||||
pr("The market is disabled.\n");
|
pr("The market is disabled.\n");
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
int
|
int
|
||||||
retr(void)
|
retr(void)
|
||||||
{
|
{
|
||||||
s_char *pq, *fl;
|
char *pq, *fl;
|
||||||
int nships;
|
int nships;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
|
@ -55,8 +55,8 @@ retr(void)
|
||||||
int rflags = -2;
|
int rflags = -2;
|
||||||
int zero;
|
int zero;
|
||||||
unsigned int x;
|
unsigned int x;
|
||||||
s_char buf1[1024];
|
char buf1[1024];
|
||||||
s_char buf2[1024];
|
char buf2[1024];
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&ni, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -195,15 +195,15 @@ retr(void)
|
||||||
int
|
int
|
||||||
lretr(void)
|
lretr(void)
|
||||||
{
|
{
|
||||||
s_char *pq, *fl;
|
char *pq, *fl;
|
||||||
int nunits;
|
int nunits;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int isarmy = 0;
|
int isarmy = 0;
|
||||||
int rflags = -2;
|
int rflags = -2;
|
||||||
int zero;
|
int zero;
|
||||||
s_char buf1[1024];
|
char buf1[1024];
|
||||||
s_char buf2[1024];
|
char buf2[1024];
|
||||||
unsigned int x;
|
unsigned int x;
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||||
|
|
|
@ -61,12 +61,12 @@ rout(void)
|
||||||
int ry;
|
int ry;
|
||||||
i_type i_del;
|
i_type i_del;
|
||||||
int dir;
|
int dir;
|
||||||
s_char *p;
|
char *p;
|
||||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||||
around */
|
around */
|
||||||
static s_char *mapbuf = NULL;
|
static char *mapbuf = NULL;
|
||||||
static s_char **map = NULL;
|
static char **map = NULL;
|
||||||
static s_char *buf = NULL;
|
static char *buf = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((ip = whatitem(player->argp[1], "What item? ")) == 0)
|
if ((ip = whatitem(player->argp[1], "What item? ")) == 0)
|
||||||
|
|
|
@ -62,14 +62,14 @@ scra(void)
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
struct plchrstr *pp;
|
struct plchrstr *pp;
|
||||||
struct lchrstr *lp;
|
struct lchrstr *lp;
|
||||||
s_char *p;
|
char *p;
|
||||||
i_type i;
|
i_type i;
|
||||||
struct nstr_item ni2;
|
struct nstr_item ni2;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct sctstr sect2;
|
struct sctstr sect2;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
float eff;
|
float eff;
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
||||||
|
@ -95,7 +95,7 @@ scra(void)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
if (p && (isalpha(*p) || (*p == '*') || (*p == '~') || issector(p)
|
if (p && (isalpha(*p) || (*p == '*') || (*p == '~') || issector(p)
|
||||||
|| islist(p))) {
|
|| islist(p))) {
|
||||||
s_char y_or_n[80], bbuf[80];
|
char y_or_n[80], bbuf[80];
|
||||||
|
|
||||||
memset(y_or_n, 0, sizeof(y_or_n));
|
memset(y_or_n, 0, sizeof(y_or_n));
|
||||||
if (type == EF_SHIP) {
|
if (type == EF_SHIP) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
s_char buf[512];
|
char buf[512];
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
|
|
||||||
mp = &mchr[(int)sp->shp_type];
|
mp = &mchr[(int)sp->shp_type];
|
||||||
|
@ -138,9 +138,9 @@ scut(void)
|
||||||
union item_u item;
|
union item_u item;
|
||||||
int type;
|
int type;
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -165,7 +165,7 @@ scut(void)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
if (p && (isalpha(*p) || (*p == '*') || (*p == '~') || issector(p)
|
if (p && (isalpha(*p) || (*p == '*') || (*p == '~') || issector(p)
|
||||||
|| islist(p))) {
|
|| islist(p))) {
|
||||||
s_char y_or_n[80], bbuf[80];
|
char y_or_n[80], bbuf[80];
|
||||||
|
|
||||||
if (type == EF_SHIP) {
|
if (type == EF_SHIP) {
|
||||||
if (*p == '*')
|
if (*p == '*')
|
||||||
|
|
|
@ -54,13 +54,13 @@ sct(void)
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
int ncond;
|
int ncond;
|
||||||
int nsect;
|
int nsect;
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
coord y, yval;
|
coord y, yval;
|
||||||
int i;
|
int i;
|
||||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||||
around */
|
around */
|
||||||
static s_char *mapbuf = NULL;
|
static char *mapbuf = NULL;
|
||||||
static s_char **map = NULL;
|
static char **map = NULL;
|
||||||
|
|
||||||
nsect = 0;
|
nsect = 0;
|
||||||
if (!snxtsct(&ns, player->argp[1]))
|
if (!snxtsct(&ns, player->argp[1]))
|
||||||
|
|
|
@ -75,7 +75,7 @@ sell(void)
|
||||||
time_t now;
|
time_t now;
|
||||||
int ii = 0;
|
int ii = 0;
|
||||||
coord x, y;
|
coord x, y;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_MARKET) {
|
if (!opt_MARKET) {
|
||||||
pr("The market is disabled.\n");
|
pr("The market is disabled.\n");
|
||||||
|
|
|
@ -69,7 +69,7 @@ set(void)
|
||||||
int foundslot;
|
int foundslot;
|
||||||
int id;
|
int id;
|
||||||
time_t now;
|
time_t now;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_MARKET) {
|
if (!opt_MARKET) {
|
||||||
pr("The market is disabled.\n");
|
pr("The market is disabled.\n");
|
||||||
|
|
|
@ -53,11 +53,11 @@ int
|
||||||
setres(void)
|
setres(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char *what;
|
char *what;
|
||||||
int amt;
|
int amt;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if ((what = getstarg(player->argp[1],
|
if ((what = getstarg(player->argp[1],
|
||||||
"Set What (iron, gold, oil, uranium, fertility)? ",
|
"Set What (iron, gold, oil, uranium, fertility)? ",
|
||||||
|
|
|
@ -55,12 +55,12 @@ int
|
||||||
setsector(void)
|
setsector(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char *what;
|
char *what;
|
||||||
int amt, current;
|
int amt, current;
|
||||||
s_char *p;
|
char *p;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char char0, char1;
|
char char0, char1;
|
||||||
|
|
||||||
if ((what = getstarg(player->argp[1],
|
if ((what = getstarg(player->argp[1],
|
||||||
"Give What (iron, gold, oil, uranium, fertility, owner, eff., mob., work, avail., oldown, mines)? ",
|
"Give What (iron, gold, oil, uranium, fertility, owner, eff., mob., work, avail., oldown, mines)? ",
|
||||||
|
@ -360,10 +360,10 @@ resbenefit(natid who, int good)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
resnoise(struct sctstr *sptr, int public_amt, s_char *name, int old,
|
resnoise(struct sctstr *sptr, int public_amt, char *name, int old,
|
||||||
int new)
|
int new)
|
||||||
{
|
{
|
||||||
s_char p[100];
|
char p[100];
|
||||||
|
|
||||||
pr("%s of %s changed from %d to %d%%\n",
|
pr("%s of %s changed from %d to %d%%\n",
|
||||||
name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
|
name, xyas(sptr->sct_x, sptr->sct_y, player->cnum), old, new);
|
||||||
|
|
|
@ -45,13 +45,13 @@
|
||||||
int
|
int
|
||||||
show(void)
|
show(void)
|
||||||
{
|
{
|
||||||
s_char *p;
|
char *p;
|
||||||
void (*cfunc)(int);
|
void (*cfunc)(int);
|
||||||
void (*sfunc)(int);
|
void (*sfunc)(int);
|
||||||
void (*bfunc)(int);
|
void (*bfunc)(int);
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
int tlev;
|
int tlev;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
int rlev;
|
int rlev;
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1],
|
if (!(p = getstarg(player->argp[1],
|
||||||
|
|
|
@ -141,7 +141,7 @@ showsat(struct sky **skypp, int x, int y)
|
||||||
struct sky *todelete = 0;
|
struct sky *todelete = 0;
|
||||||
struct sky **prev;
|
struct sky **prev;
|
||||||
struct plchrstr *pcp;
|
struct plchrstr *pcp;
|
||||||
s_char *name;
|
char *name;
|
||||||
int nsat = 0;
|
int nsat = 0;
|
||||||
|
|
||||||
prev = 0;
|
prev = 0;
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
#include "land.h"
|
#include "land.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
|
||||||
static void starv_sects(s_char *range);
|
static void starv_sects(char *range);
|
||||||
static void starv_ships(s_char *range);
|
static void starv_ships(char *range);
|
||||||
static void starv_units(s_char *range);
|
static void starv_units(char *range);
|
||||||
static void sect_hdr(void);
|
static void sect_hdr(void);
|
||||||
static void ship_hdr(void);
|
static void ship_hdr(void);
|
||||||
static void unit_hdr(void);
|
static void unit_hdr(void);
|
||||||
|
@ -61,7 +61,7 @@ starve(void)
|
||||||
int do_sects = 0;
|
int do_sects = 0;
|
||||||
int do_ships = 0;
|
int do_ships = 0;
|
||||||
int do_units = 0;
|
int do_units = 0;
|
||||||
s_char range[1024];
|
char range[1024];
|
||||||
|
|
||||||
if (opt_NOFOOD) { /* no food - no work! */
|
if (opt_NOFOOD) { /* no food - no work! */
|
||||||
pr("No food is required in this game\n");
|
pr("No food is required in this game\n");
|
||||||
|
@ -98,7 +98,7 @@ starve(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
starv_sects(s_char *range)
|
starv_sects(char *range)
|
||||||
{
|
{
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
|
@ -158,7 +158,7 @@ sect_hdr(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
starv_ships(s_char *range)
|
starv_ships(char *range)
|
||||||
{
|
{
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
|
@ -206,7 +206,7 @@ ship_hdr(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
starv_units(s_char *range)
|
starv_units(char *range)
|
||||||
{
|
{
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
|
|
|
@ -61,15 +61,15 @@ surv(void)
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct range range;
|
struct range range;
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
struct nscstr cond[NS_NCOND];
|
struct nscstr cond[NS_NCOND];
|
||||||
int ncond;
|
int ncond;
|
||||||
int i;
|
int i;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||||
around */
|
around */
|
||||||
static s_char *mapbuf = NULL;
|
static char *mapbuf = NULL;
|
||||||
static s_char **map = NULL;
|
static char **map = NULL;
|
||||||
|
|
||||||
nsect = 0;
|
nsect = 0;
|
||||||
ptr = getstarg(player->argp[1], "commodity or variable? ", buf);
|
ptr = getstarg(player->argp[1], "commodity or variable? ", buf);
|
||||||
|
|
|
@ -54,8 +54,8 @@ swaps(void)
|
||||||
{
|
{
|
||||||
struct sctstr secta, sectb;
|
struct sctstr secta, sectb;
|
||||||
coord x, y;
|
coord x, y;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char *p;
|
char *p;
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], "First sector : ", buf)) ||
|
if (!(p = getstarg(player->argp[1], "First sector : ", buf)) ||
|
||||||
!sarg_xy(p, §a.sct_x, §a.sct_y) ||
|
!sarg_xy(p, §a.sct_x, §a.sct_y) ||
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
|
||||||
static void expose_ship(struct shpstr *s1, struct shpstr *s2);
|
static void expose_ship(struct shpstr *s1, struct shpstr *s2);
|
||||||
static int tend_land(struct shpstr *tenderp, s_char *units);
|
static int tend_land(struct shpstr *tenderp, char *units);
|
||||||
|
|
||||||
int
|
int
|
||||||
tend(void)
|
tend(void)
|
||||||
|
@ -71,9 +71,9 @@ tend(void)
|
||||||
int transfer;
|
int transfer;
|
||||||
int total;
|
int total;
|
||||||
int type;
|
int type;
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char prompt[512];
|
char prompt[512];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1],
|
if (!(p = getstarg(player->argp[1],
|
||||||
"Tend what commodity (or 'land')? ", buf)) || !*p)
|
"Tend what commodity (or 'land')? ", buf)) || !*p)
|
||||||
|
@ -205,7 +205,7 @@ expose_ship(struct shpstr *s1, struct shpstr *s2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tend_land(struct shpstr *tenderp, s_char *units)
|
tend_land(struct shpstr *tenderp, char *units)
|
||||||
{
|
{
|
||||||
struct nstr_item lni;
|
struct nstr_item lni;
|
||||||
struct nstr_item targets;
|
struct nstr_item targets;
|
||||||
|
@ -213,7 +213,7 @@ tend_land(struct shpstr *tenderp, s_char *units)
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
struct nstr_item pni;
|
struct nstr_item pni;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&lni, EF_LAND, units))
|
if (!snxtitem(&lni, EF_LAND, units))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -46,12 +46,12 @@ int
|
||||||
terr(void)
|
terr(void)
|
||||||
{
|
{
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char *p;
|
char *p;
|
||||||
int terr_n;
|
int terr_n;
|
||||||
int field;
|
int field;
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtsct(&nstr, player->argp[1]))
|
if (!snxtsct(&nstr, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -54,11 +54,11 @@ thre(void)
|
||||||
struct nstr_sect nstr;
|
struct nstr_sect nstr;
|
||||||
int val;
|
int val;
|
||||||
struct ichrstr *ip;
|
struct ichrstr *ip;
|
||||||
s_char *p;
|
char *p;
|
||||||
int thresh;
|
int thresh;
|
||||||
i_type type;
|
i_type type;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
s_char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
if ((ip = whatitem(player->argp[1], "What commodity? ")) == 0)
|
if ((ip = whatitem(player->argp[1], "What commodity? ")) == 0)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -45,7 +45,7 @@ togg(void)
|
||||||
{
|
{
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
int pos;
|
int pos;
|
||||||
s_char *name;
|
char *name;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
|
|
||||||
np = getnatp(player->cnum);
|
np = getnatp(player->cnum);
|
||||||
|
|
|
@ -70,14 +70,14 @@ torp(void)
|
||||||
double hitchance;
|
double hitchance;
|
||||||
struct shpstr vship;
|
struct shpstr vship;
|
||||||
struct shpstr sub;
|
struct shpstr sub;
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
double mobcost;
|
double mobcost;
|
||||||
struct mchrstr *mcp;
|
struct mchrstr *mcp;
|
||||||
struct nstr_item nbst;
|
struct nstr_item nbst;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
s_char *sav;
|
char *sav;
|
||||||
int ntorping = 0;
|
int ntorping = 0;
|
||||||
s_char prompt[128];
|
char prompt[128];
|
||||||
|
|
||||||
if (!(sav = getstarg(player->argp[1], "From ship(s)? ", buf)))
|
if (!(sav = getstarg(player->argp[1], "From ship(s)? ", buf)))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -470,7 +470,7 @@ fire_torp(struct shpstr *sp, struct shpstr *targ, int range, int ntargets)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
prsub(struct shpstr *sp)
|
prsub(struct shpstr *sp)
|
||||||
{
|
{
|
||||||
if (mchr[(int)sp->shp_type].m_flags & M_SUB)
|
if (mchr[(int)sp->shp_type].m_flags & M_SUB)
|
||||||
|
|
|
@ -79,7 +79,7 @@ trad(void)
|
||||||
double tleft;
|
double tleft;
|
||||||
double tally;
|
double tally;
|
||||||
int q;
|
int q;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_MARKET) {
|
if (!opt_MARKET) {
|
||||||
pr("The market is disabled.\n");
|
pr("The market is disabled.\n");
|
||||||
|
|
|
@ -58,8 +58,8 @@ static int supgr(void);
|
||||||
int
|
int
|
||||||
upgr(void)
|
upgr(void)
|
||||||
{
|
{
|
||||||
s_char *p;
|
char *p;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
if (!(p = getstarg(player->argp[1], "Ship, land, or plane? ", buf)))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -47,10 +47,10 @@ wing(void)
|
||||||
|
|
||||||
struct plnstr plane;
|
struct plnstr plane;
|
||||||
int count;
|
int count;
|
||||||
s_char *cp;
|
char *cp;
|
||||||
s_char c;
|
char c;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!(cp = getstarg(player->argp[1], "wing? ", buf)))
|
if (!(cp = getstarg(player->argp[1], "wing? ", buf)))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -54,9 +54,9 @@ work(void)
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
struct lndstr land;
|
struct lndstr land;
|
||||||
int work_amt, eff_amt, w;
|
int work_amt, eff_amt, w;
|
||||||
s_char *p;
|
char *p;
|
||||||
coord donex = 0, doney = 1;
|
coord donex = 0, doney = 1;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
if (!snxtitem(&ni, EF_LAND, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
|
|
@ -66,7 +66,7 @@ zdon(void)
|
||||||
{
|
{
|
||||||
natid whichcnum;
|
natid whichcnum;
|
||||||
struct natstr *natp;
|
struct natstr *natp;
|
||||||
register s_char *p;
|
char *p;
|
||||||
|
|
||||||
int update;
|
int update;
|
||||||
int checking;
|
int checking;
|
||||||
|
@ -74,7 +74,7 @@ zdon(void)
|
||||||
int totpop;
|
int totpop;
|
||||||
int totwant;
|
int totwant;
|
||||||
int dowant;
|
int dowant;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (!opt_DEMANDUPDATE) {
|
if (!opt_DEMANDUPDATE) {
|
||||||
pr("Demand updates are not enabled.\n");
|
pr("Demand updates are not enabled.\n");
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
mailbox(s_char *buf, natid cn)
|
mailbox(char *buf, natid cn)
|
||||||
{
|
{
|
||||||
(void)sprintf(buf, "%s%d", telfil, cn);
|
(void)sprintf(buf, "%s%d", telfil, cn);
|
||||||
return buf;
|
return buf;
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
|
||||||
static int bmnxtsct(struct nstr_sect *);
|
static int bmnxtsct(struct nstr_sect *);
|
||||||
static s_char map_char(unsigned char type, natid own, int owner_or_god);
|
static char map_char(unsigned char type, natid own, int owner_or_god);
|
||||||
|
|
||||||
int
|
int
|
||||||
draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
||||||
|
@ -67,8 +67,8 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
||||||
/* Note this is not re-entrant anyway, so we keep the buffers
|
/* Note this is not re-entrant anyway, so we keep the buffers
|
||||||
around */
|
around */
|
||||||
static unsigned char *bitmap = NULL;
|
static unsigned char *bitmap = NULL;
|
||||||
static s_char *wmapbuf = NULL;
|
static char *wmapbuf = NULL;
|
||||||
static s_char **wmap = NULL;
|
static char **wmap = NULL;
|
||||||
|
|
||||||
if (!wmapbuf)
|
if (!wmapbuf)
|
||||||
wmapbuf = malloc(WORLD_Y * MAPWIDTH(1));
|
wmapbuf = malloc(WORLD_Y * MAPWIDTH(1));
|
||||||
|
@ -153,7 +153,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char mapch;
|
char mapch;
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
|
|
||||||
if (!player->god) {
|
if (!player->god) {
|
||||||
|
@ -218,7 +218,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (map_flags & MAP_HIGH) {
|
if (map_flags & MAP_HIGH) {
|
||||||
s_char *ptr;
|
char *ptr;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
|
|
||||||
snxtsct_rewind(nsp);
|
snxtsct_rewind(nsp);
|
||||||
|
@ -287,7 +287,7 @@ bmnxtsct(struct nstr_sect *np)
|
||||||
* Return character to use in maps for sector type TYPE owned by OWN.
|
* Return character to use in maps for sector type TYPE owned by OWN.
|
||||||
* If OWNER_OR_GOD, the map is for the sector's owner or a deity.
|
* If OWNER_OR_GOD, the map is for the sector's owner or a deity.
|
||||||
*/
|
*/
|
||||||
static s_char
|
static char
|
||||||
map_char(unsigned char type, natid own, int owner_or_god)
|
map_char(unsigned char type, natid own, int owner_or_god)
|
||||||
{
|
{
|
||||||
if (type > SCT_MAXDEF) {
|
if (type > SCT_MAXDEF) {
|
||||||
|
@ -352,16 +352,16 @@ bmaps_intersect(natid a, natid b)
|
||||||
/* Note that this requires that the BMAP is mapped into memory */
|
/* Note that this requires that the BMAP is mapped into memory */
|
||||||
|
|
||||||
int
|
int
|
||||||
share_bmap(natid from, natid to, struct nstr_sect *ns, s_char des,
|
share_bmap(natid from, natid to, struct nstr_sect *ns, char des,
|
||||||
s_char *from_name)
|
char *from_name)
|
||||||
{
|
{
|
||||||
s_char *from_bmap = ef_ptr(EF_BMAP, from);
|
char *from_bmap = ef_ptr(EF_BMAP, from);
|
||||||
s_char *to_bmap = ef_ptr(EF_BMAP, to);
|
char *to_bmap = ef_ptr(EF_BMAP, to);
|
||||||
int n = 0;
|
int n = 0;
|
||||||
struct sctstr sect;
|
struct sctstr sect;
|
||||||
s_char fromdes;
|
char fromdes;
|
||||||
s_char todes;
|
char todes;
|
||||||
s_char from_des = *from_name;
|
char from_des = *from_name;
|
||||||
|
|
||||||
if (isalpha(from_des))
|
if (isalpha(from_des))
|
||||||
from_des &= ~0x20;
|
from_des &= ~0x20;
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct bestp {
|
||||||
struct as_data *adp;
|
struct as_data *adp;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int bp_path(struct as_path *pp, s_char *buf);
|
static int bp_path(struct as_path *pp, char *buf);
|
||||||
static int bp_neighbors(struct as_coord c, struct as_coord *cp, void *);
|
static int bp_neighbors(struct as_coord c, struct as_coord *cp, void *);
|
||||||
static double bp_lbcost(struct as_coord from, struct as_coord to, void *);
|
static double bp_lbcost(struct as_coord from, struct as_coord to, void *);
|
||||||
static double bp_realcost(struct as_coord from, struct as_coord to, void *);
|
static double bp_realcost(struct as_coord from, struct as_coord to, void *);
|
||||||
|
@ -96,7 +96,7 @@ bp_init(void)
|
||||||
* string in path. Return 0 on success, -1 on error.
|
* string in path. Return 0 on success, -1 on error.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
best_path(struct sctstr *from, struct sctstr *to, s_char *path,
|
best_path(struct sctstr *from, struct sctstr *to, char *path,
|
||||||
int mob_type)
|
int mob_type)
|
||||||
{
|
{
|
||||||
static struct bestp *mybestpath;
|
static struct bestp *mybestpath;
|
||||||
|
@ -138,10 +138,10 @@ best_path(struct sctstr *from, struct sctstr *to, s_char *path,
|
||||||
* success, -1 on failure.
|
* success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bp_path(struct as_path *pp, s_char *buf)
|
bp_path(struct as_path *pp, char *buf)
|
||||||
{
|
{
|
||||||
struct as_path *np;
|
struct as_path *np;
|
||||||
s_char *cp = buf;
|
char *cp = buf;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ bp_clear_cachepath(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
pathcost(struct sctstr *start, s_char *path, int mob_type)
|
pathcost(struct sctstr *start, char *path, int mob_type)
|
||||||
{
|
{
|
||||||
struct sctstr *sectp = (void *)empfile[EF_SECTOR].cache;
|
struct sctstr *sectp = (void *)empfile[EF_SECTOR].cache;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
@ -338,16 +338,16 @@ pathcost(struct sctstr *start, s_char *path, int mob_type)
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
BestDistPath(s_char *path,
|
BestDistPath(char *path,
|
||||||
struct sctstr *from,
|
struct sctstr *from,
|
||||||
struct sctstr *to, double *cost, int mob_type)
|
struct sctstr *to, double *cost, int mob_type)
|
||||||
{
|
{
|
||||||
return BestLandPath(path, from, to, cost, mob_type);
|
return BestLandPath(path, from, to, cost, mob_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
BestLandPath(s_char *path,
|
BestLandPath(char *path,
|
||||||
struct sctstr *from,
|
struct sctstr *from,
|
||||||
struct sctstr *to, double *cost, int mob_type)
|
struct sctstr *to, double *cost, int mob_type)
|
||||||
{
|
{
|
||||||
|
@ -364,8 +364,8 @@ BestLandPath(s_char *path,
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
BestShipPath(s_char *path, int fx, int fy, int tx, int ty, int owner)
|
BestShipPath(char *path, int fx, int fy, int tx, int ty, int owner)
|
||||||
{
|
{
|
||||||
char *map;
|
char *map;
|
||||||
|
|
||||||
|
@ -376,8 +376,8 @@ BestShipPath(s_char *path, int fx, int fy, int tx, int ty, int owner)
|
||||||
return bestownedpath(path, map, fx, fy, tx, ty, owner);
|
return bestownedpath(path, map, fx, fy, tx, ty, owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
BestAirPath(s_char *path, int fx, int fy, int tx, int ty)
|
BestAirPath(char *path, int fx, int fy, int tx, int ty)
|
||||||
{
|
{
|
||||||
return bestownedpath(path, 0, fx, fy, tx, ty, -1);
|
return bestownedpath(path, 0, fx, fy, tx, ty, -1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,11 +44,11 @@
|
||||||
* null terminate
|
* null terminate
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
blankfill(s_char *ptr, register struct range *range, int size)
|
blankfill(char *ptr, struct range *range, int size)
|
||||||
{
|
{
|
||||||
register s_char *p;
|
char *p;
|
||||||
register int row;
|
int row;
|
||||||
register int col;
|
int col;
|
||||||
|
|
||||||
for (row = 0; row < range->height; row++) {
|
for (row = 0; row < range->height; row++) {
|
||||||
col = (range->width + 1) * (size + 1) / 2 - 1;
|
col = (range->width + 1) * (size + 1) / 2 - 1;
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct keymatch configkeys[] = {
|
||||||
#undef EMP_CONFIG_C_OUTPUT
|
#undef EMP_CONFIG_C_OUTPUT
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct keymatch *keylookup(s_char *key, struct keymatch tbl[]);
|
static struct keymatch *keylookup(char *key, struct keymatch tbl[]);
|
||||||
static void set_dirs(char *);
|
static void set_dirs(char *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -159,9 +159,9 @@ done:
|
||||||
|
|
||||||
/* find the key in the table */
|
/* find the key in the table */
|
||||||
static struct keymatch *
|
static struct keymatch *
|
||||||
keylookup(register s_char *command, struct keymatch *tbl)
|
keylookup(char *command, struct keymatch *tbl)
|
||||||
{
|
{
|
||||||
register struct keymatch *kp;
|
struct keymatch *kp;
|
||||||
|
|
||||||
if (command == 0 || *command == 0)
|
if (command == 0 || *command == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -126,7 +126,7 @@ io_close(struct iop *iop)
|
||||||
int
|
int
|
||||||
io_input(struct iop *iop, int waitforinput)
|
io_input(struct iop *iop, int waitforinput)
|
||||||
{
|
{
|
||||||
s_char buf[IO_BUFSIZE];
|
char buf[IO_BUFSIZE];
|
||||||
int cc;
|
int cc;
|
||||||
|
|
||||||
/* Not a read IOP */
|
/* Not a read IOP */
|
||||||
|
@ -278,7 +278,7 @@ io_output(struct iop *iop, int waitforoutput)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
io_peek(struct iop *iop, s_char *buf, int nbytes)
|
io_peek(struct iop *iop, char *buf, int nbytes)
|
||||||
{
|
{
|
||||||
if ((iop->flags & IO_READ) == 0)
|
if ((iop->flags & IO_READ) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -286,7 +286,7 @@ io_peek(struct iop *iop, s_char *buf, int nbytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
io_read(struct iop *iop, s_char *buf, int nbytes)
|
io_read(struct iop *iop, char *buf, int nbytes)
|
||||||
{
|
{
|
||||||
int cc;
|
int cc;
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ io_read(struct iop *iop, s_char *buf, int nbytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
io_write(struct iop *iop, s_char *buf, int nbytes, int doWait)
|
io_write(struct iop *iop, char *buf, int nbytes, int doWait)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ io_output_all(struct iop *iop)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
io_gets(struct iop *iop, s_char *buf, int nbytes)
|
io_gets(struct iop *iop, char *buf, int nbytes)
|
||||||
{
|
{
|
||||||
if ((iop->flags & IO_READ) == 0)
|
if ((iop->flags & IO_READ) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -343,7 +343,7 @@ io_gets(struct iop *iop, s_char *buf, int nbytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
io_puts(struct iop *iop, s_char *buf)
|
io_puts(struct iop *iop, char *buf)
|
||||||
{
|
{
|
||||||
if ((iop->flags & IO_WRITE) == 0)
|
if ((iop->flags & IO_WRITE) == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -49,14 +49,14 @@
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "ioqueue.h"
|
#include "ioqueue.h"
|
||||||
|
|
||||||
static int ioqtocbuf(struct ioqueue *ioq, s_char *buf, int cc,
|
static int ioqtocbuf(struct ioqueue *ioq, char *buf, int cc,
|
||||||
register int stopc);
|
register int stopc);
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
static int ioqtoiov(struct ioqueue *ioq, struct iovec *iov,
|
static int ioqtoiov(struct ioqueue *ioq, struct iovec *iov,
|
||||||
register int max);
|
register int max);
|
||||||
#endif
|
#endif
|
||||||
static int ioqtobuf(struct ioqueue *ioq, s_char *buf, int cc);
|
static int ioqtobuf(struct ioqueue *ioq, char *buf, int cc);
|
||||||
static int appendcc(struct ioqueue *ioq, s_char *buf, int cc);
|
static int appendcc(struct ioqueue *ioq, char *buf, int cc);
|
||||||
static int removecc(struct ioqueue *ioq, register int cc);
|
static int removecc(struct ioqueue *ioq, register int cc);
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
@ -123,7 +123,7 @@ ioq_makeiov(struct ioqueue *ioq, struct iovec *iov, int cc)
|
||||||
* number of bytes actually found.
|
* number of bytes actually found.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ioq_peek(struct ioqueue *ioq, s_char *buf, int cc)
|
ioq_peek(struct ioqueue *ioq, char *buf, int cc)
|
||||||
{
|
{
|
||||||
return ioqtobuf(ioq, buf, cc);
|
return ioqtobuf(ioq, buf, cc);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ ioq_dequeue(struct ioqueue *ioq, int cc)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ioq_append(struct ioqueue *ioq, s_char *buf, int cc)
|
ioq_append(struct ioqueue *ioq, char *buf, int cc)
|
||||||
{
|
{
|
||||||
appendcc(ioq, buf, cc);
|
appendcc(ioq, buf, cc);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ ioq_qsize(struct ioqueue *ioq)
|
||||||
* no input is available
|
* no input is available
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ioq_gets(struct ioqueue *ioq, s_char *buf, int cc)
|
ioq_gets(struct ioqueue *ioq, char *buf, int cc)
|
||||||
{
|
{
|
||||||
int nbytes;
|
int nbytes;
|
||||||
int actual;
|
int actual;
|
||||||
|
@ -173,7 +173,7 @@ ioq_gets(struct ioqueue *ioq, s_char *buf, int cc)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ioq_puts(struct ioqueue *ioq, s_char *buf)
|
ioq_puts(struct ioqueue *ioq, char *buf)
|
||||||
{
|
{
|
||||||
return appendcc(ioq, buf, strlen(buf));
|
return appendcc(ioq, buf, strlen(buf));
|
||||||
}
|
}
|
||||||
|
@ -189,14 +189,14 @@ ioq_puts(struct ioqueue *ioq, s_char *buf)
|
||||||
* left for a higher level.
|
* left for a higher level.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ioqtobuf(struct ioqueue *ioq, s_char *buf, int cc)
|
ioqtobuf(struct ioqueue *ioq, char *buf, int cc)
|
||||||
{
|
{
|
||||||
struct io *io;
|
struct io *io;
|
||||||
struct emp_qelem *qp;
|
struct emp_qelem *qp;
|
||||||
struct emp_qelem *head;
|
struct emp_qelem *head;
|
||||||
register int nbytes;
|
register int nbytes;
|
||||||
register int nleft;
|
register int nleft;
|
||||||
register s_char *offset;
|
char *offset;
|
||||||
|
|
||||||
nleft = cc;
|
nleft = cc;
|
||||||
offset = buf;
|
offset = buf;
|
||||||
|
@ -223,7 +223,7 @@ ioqtobuf(struct ioqueue *ioq, s_char *buf, int cc)
|
||||||
* terminating on the stop character.
|
* terminating on the stop character.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ioqtocbuf(struct ioqueue *ioq, s_char *buf, int cc, register int stopc)
|
ioqtocbuf(struct ioqueue *ioq, char *buf, int cc, register int stopc)
|
||||||
{
|
{
|
||||||
register int nbytes;
|
register int nbytes;
|
||||||
register s_char *p;
|
register s_char *p;
|
||||||
|
@ -294,7 +294,7 @@ ioqtoiov(struct ioqueue *ioq, struct iovec *iov, register int max)
|
||||||
* append a buffer to the end of the ioq.
|
* append a buffer to the end of the ioq.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
appendcc(struct ioqueue *ioq, s_char *buf, int cc)
|
appendcc(struct ioqueue *ioq, char *buf, int cc)
|
||||||
{
|
{
|
||||||
struct io *io;
|
struct io *io;
|
||||||
int len;
|
int len;
|
||||||
|
|
|
@ -37,16 +37,16 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "gen.h"
|
#include "gen.h"
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
numstr(s_char *buf, int n)
|
numstr(char *buf, int n)
|
||||||
{
|
{
|
||||||
static s_char *numnames[] = {
|
static char *numnames[] = {
|
||||||
"zero", "one", "two", "three", "four", "five", "six",
|
"zero", "one", "two", "three", "four", "five", "six",
|
||||||
"seven", "eight", "nine", "ten", "eleven", "twelve",
|
"seven", "eight", "nine", "ten", "eleven", "twelve",
|
||||||
"thirteen", "fourteen", "fifteen", "sixteen",
|
"thirteen", "fourteen", "fifteen", "sixteen",
|
||||||
"seventeen", "eighteen", "nineteen",
|
"seventeen", "eighteen", "nineteen",
|
||||||
};
|
};
|
||||||
static s_char *tennames[] = {
|
static char *tennames[] = {
|
||||||
"", "", "twenty", "thirty", "forty", "fifty",
|
"", "", "twenty", "thirty", "forty", "fifty",
|
||||||
"sixty", "seventy", "eighty", "ninety",
|
"sixty", "seventy", "eighty", "ninety",
|
||||||
"hundred", "hundred ten", "hundred twenty",
|
"hundred", "hundred ten", "hundred twenty",
|
||||||
|
@ -71,10 +71,10 @@ numstr(s_char *buf, int n)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_char *
|
char *
|
||||||
effadv(int n)
|
effadv(int n)
|
||||||
{
|
{
|
||||||
static s_char *effadv_list[] = {
|
static char *effadv_list[] = {
|
||||||
"minimally", "partially", "moderately", "completely",
|
"minimally", "partially", "moderately", "completely",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
#include "gen.h"
|
#include "gen.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
onearg(s_char *arg, s_char *prompt)
|
onearg(char *arg, char *prompt)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
s_char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (arg == 0 || *arg == 0) {
|
if (arg == 0 || *arg == 0) {
|
||||||
if ((arg = getstring(prompt, buf)) == 0)
|
if ((arg = getstring(prompt, buf)) == 0)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue