(getpath): Parameter showxy makes no sense and is not used. Remove.

Get rid of s_char.  Callers changed.
This commit is contained in:
Markus Armbruster 2005-09-25 17:00:50 +00:00
parent 21a39fd9dd
commit 269913baee
8 changed files with 14 additions and 21 deletions

View file

@ -56,8 +56,7 @@ extern int diroff[][2];
extern s_char dirch[]; extern s_char dirch[];
/* src/lib/subs/paths.c */ /* src/lib/subs/paths.c */
extern s_char *getpath(s_char *, s_char *, coord, coord, int, int, extern char *getpath(char *, char *, coord, coord, int, int, int);
int, int);
extern double fcost(struct sctstr *, natid); extern double fcost(struct sctstr *, natid);
extern double ncost(struct sctstr *, natid); extern double ncost(struct sctstr *, natid);
extern double pathtoxy(s_char *, coord *, coord *, extern double pathtoxy(s_char *, coord *, coord *,

View file

@ -128,7 +128,7 @@ bomb(void)
} }
ax = x; ax = x;
ay = y; ay = y;
if (getpath(flightpath, player->argp[5], ax, ay, 0, 0, 0, P_FLYING) == 0 if (getpath(flightpath, player->argp[5], ax, ay, 0, 0, P_FLYING) == 0
|| *flightpath == 0) || *flightpath == 0)
return RET_SYN; return RET_SYN;
tx = ax; tx = ax;

View file

@ -82,7 +82,7 @@ drop(void)
} }
ax = x; ax = x;
ay = y; ay = y;
if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, 0, P_FLYING) == 0 if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, P_FLYING) == 0
|| *flightpath == 0) || *flightpath == 0)
return RET_SYN; return RET_SYN;
tx = ax; tx = ax;

View file

@ -87,7 +87,7 @@ fly(void)
} }
ax = x; ax = x;
ay = y; ay = y;
if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, 0, P_FLYING) == 0 if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, P_FLYING) == 0
|| *flightpath == 0) || *flightpath == 0)
return RET_SYN; return RET_SYN;
tx = ax; tx = ax;

View file

@ -87,7 +87,7 @@ para(void)
} }
ax = x; ax = x;
ay = y; ay = y;
if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, 0, P_FLYING) == 0 if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, P_FLYING) == 0
|| *flightpath == 0) || *flightpath == 0)
return RET_SYN; return RET_SYN;
tx = ax; tx = ax;

View file

@ -81,7 +81,7 @@ reco(void)
} }
ax = x; ax = x;
ay = y; ay = y;
if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, 0, P_FLYING) == 0 if (getpath(flightpath, player->argp[4], ax, ay, 0, 0, P_FLYING) == 0
|| *flightpath == 0) || *flightpath == 0)
return RET_SYN; return RET_SYN;
tx = ax; tx = ax;

View file

@ -138,7 +138,7 @@ cmd_sail_ship(struct nstr_item *nstr)
pr("Ship #%d at %s\n", ship.shp_uid, pr("Ship #%d at %s\n", ship.shp_uid,
xyas(ship.shp_x, ship.shp_y, ship.shp_own)); xyas(ship.shp_x, ship.shp_y, ship.shp_own));
cp = getpath(navpath, player->argp[2], cp = getpath(navpath, player->argp[2],
ship.shp_x, ship.shp_y, 0, 0, 0, P_SAILING); ship.shp_x, ship.shp_y, 0, 0, P_SAILING);
if (!check_ship_ok(&ship)) if (!check_ship_ok(&ship))
continue; continue;
if (!player->aborted) { if (!player->aborted) {

View file

@ -88,18 +88,17 @@ diridx(char dir)
* move commands, and isn't valid for those commands * move commands, and isn't valid for those commands
* which do not accept partial moves. * which do not accept partial moves.
*/ */
s_char * char *
getpath(s_char *buf, s_char *arg, coord x, coord y, int onlyown, getpath(char *buf, char *arg, coord x, coord y, int onlyown,
int showdes, int showxy, int destinations) int showdes, int destinations)
{ {
s_char *p = buf; char *p = buf;
s_char *bp; char *bp;
s_char prompt[128]; char prompt[128];
coord dx, dy; coord dx, dy;
struct sctstr sect, dsect; struct sctstr sect, dsect;
coord nx, ny; coord nx, ny;
int dir; int dir;
s_char *execute;
double mv_cost; double mv_cost;
if (arg) { if (arg) {
@ -109,11 +108,6 @@ getpath(s_char *buf, s_char *arg, coord x, coord y, int onlyown,
*p = 0; *p = 0;
} }
if (showxy)
execute = " & '%c' to execute\n";
else
execute = "\n";
getsect(x, y, &sect); getsect(x, y, &sect);
nx = x; nx = x;
ny = y; ny = y;
@ -151,7 +145,7 @@ getpath(s_char *buf, s_char *arg, coord x, coord y, int onlyown,
dir = chkdir(*p, DIR_STOP, DIR_LAST); dir = chkdir(*p, DIR_STOP, DIR_LAST);
if (dir < 0) { if (dir < 0) {
pr("\"%c\" is not legal...", *p); pr("\"%c\" is not legal...", *p);
direrr("'%c' to stop", (s_char *)0, execute); direrr("'%c' to stop\n", NULL, NULL);
*p = 0; *p = 0;
break; break;
} }