]> git.pond.sub.org Git - empserver/commitdiff
(getpath): Parameter showxy makes no sense and is not used. Remove.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Sep 2005 17:00:50 +0000 (17:00 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Sep 2005 17:00:50 +0000 (17:00 +0000)
Get rid of s_char.  Callers changed.

include/path.h
src/lib/commands/bomb.c
src/lib/commands/drop.c
src/lib/commands/fly.c
src/lib/commands/para.c
src/lib/commands/reco.c
src/lib/commands/sail.c
src/lib/subs/paths.c

index d91d481836829cc1468f6b8bcc4e20ad284ab99b..07bf3104c71993f58017eb9b30856574f29a0fe2 100644 (file)
@@ -56,8 +56,7 @@ extern int diroff[][2];
 extern s_char dirch[];
 
 /* src/lib/subs/paths.c */
-extern s_char *getpath(s_char *, s_char *, coord, coord, int, int,
-                      int, int);
+extern char *getpath(char *, char *, coord, coord, int, int, int);
 extern double fcost(struct sctstr *, natid);
 extern double ncost(struct sctstr *, natid);
 extern double pathtoxy(s_char *, coord *, coord *,
index 13ed9243394b05b456ff26eabfcd8819ea81a3b1..61937d39f2a8393dce2c9e466f1af448074e3758 100644 (file)
@@ -128,7 +128,7 @@ bomb(void)
     }
     ax = x;
     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)
        return RET_SYN;
     tx = ax;
index 3fdf7206fb3339c996c1ce892bfbc471f3fc2636..1c319880a7e584ada99d9902a0d800e3ef104953 100644 (file)
@@ -82,7 +82,7 @@ drop(void)
     }
     ax = x;
     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)
        return RET_SYN;
     tx = ax;
index ef737c37669e9266ea65e8cc2df22572645e1ef6..78d2f85cdc796bcc576b6d677299da90172148cf 100644 (file)
@@ -87,7 +87,7 @@ fly(void)
     }
     ax = x;
     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)
        return RET_SYN;
     tx = ax;
index 525412cc81d3a00c933a4794320862edfba29533..804781393155f691ec77cd2acbc42f235d31922b 100644 (file)
@@ -87,7 +87,7 @@ para(void)
     }
     ax = x;
     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)
        return RET_SYN;
     tx = ax;
index dd041399228483be7b840eaf4c902ec8824504a6..fdfdc2b3d104dbbd49c73e6d49e85d942a85819d 100644 (file)
@@ -81,7 +81,7 @@ reco(void)
     }
     ax = x;
     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)
        return RET_SYN;
     tx = ax;
index ac2a4f554a0432167fd930b9115c9096d1bfb24d..4d63382749aab195e3e9490bcbfc5927eed4ec88 100644 (file)
@@ -138,7 +138,7 @@ cmd_sail_ship(struct nstr_item *nstr)
        pr("Ship #%d at %s\n", ship.shp_uid,
           xyas(ship.shp_x, ship.shp_y, ship.shp_own));
        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))
            continue;
        if (!player->aborted) {
index 322c57f1e033d9b970a095339165ae34e21c893c..ea1d0e4cacfa5e480582fd989ee848304435e8b7 100644 (file)
@@ -88,18 +88,17 @@ diridx(char dir)
  * move commands, and isn't valid for those commands
  * which do not accept partial moves.
  */
-s_char *
-getpath(s_char *buf, s_char *arg, coord x, coord y, int onlyown,
-       int showdes, int showxy, int destinations)
+char *
+getpath(char *buf, char *arg, coord x, coord y, int onlyown,
+       int showdes, int destinations)
 {
-    s_char *p = buf;
-    s_char *bp;
-    s_char prompt[128];
+    char *p = buf;
+    char *bp;
+    char prompt[128];
     coord dx, dy;
     struct sctstr sect, dsect;
     coord nx, ny;
     int dir;
-    s_char *execute;
     double mv_cost;
 
     if (arg) {
@@ -109,11 +108,6 @@ getpath(s_char *buf, s_char *arg, coord x, coord y, int onlyown,
        *p = 0;
     }
 
-    if (showxy)
-       execute = " & '%c' to execute\n";
-    else
-       execute = "\n";
-
     getsect(x, y, &sect);
     nx = x;
     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);
        if (dir < 0) {
            pr("\"%c\" is not legal...", *p);
-           direrr("'%c' to stop", (s_char *)0, execute);
+           direrr("'%c' to stop\n", NULL, NULL);
            *p = 0;
            break;
        }