]> git.pond.sub.org Git - empserver/commitdiff
Move show_mission() to sole caller, give it internal linkage
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 22 Nov 2008 20:02:18 +0000 (15:02 -0500)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 25 Dec 2008 10:47:32 +0000 (11:47 +0100)
include/prototypes.h
src/lib/commands/miss.c
src/lib/subs/mission.c

index cf6f0847fc353d3edd6b184c52306b04540ca743..cef69112e4c0ef1667f30567b195de96be6204c2 100644 (file)
@@ -486,7 +486,6 @@ extern int def_support(coord, coord, natid, natid);
 extern int oprange(struct empobj *, int);
 extern int in_oparea(struct empobj *, coord, coord);
 extern int cando(int, int);
-extern void show_mission(int, struct nstr_item *);
 extern int air_defense(coord, coord, natid, struct emp_qelem *,
                       struct emp_qelem *);
 /* move.c */
index 40a667e9017e9bf7bcfa677e82900057588f4fdf..7a98fb054fa64ada9a8a9100efab427a8f9ded93 100644 (file)
@@ -40,6 +40,8 @@
 #include "optlist.h"
 #include "path.h"
 
+static void show_mission(int, struct nstr_item *);
+
 /*
  *  mission <type> <planes/ships/units> <mission type> <op sector> [<radius>]
  */
@@ -301,3 +303,45 @@ mission(void)
     pr("%d %s%s\n", num, ef_nameof(type), splur(num));
     return RET_OK;
 }
+
+static void
+show_mission(int type, struct nstr_item *np)
+{
+    int first = 1;
+    union empobj_storage item;
+    struct empobj *gp;
+
+    while (nxtitem(np, &item)) {
+       gp = (struct empobj *)&item;
+       if (!player->owner || gp->own == 0)
+           continue;
+
+       if (first) {
+           pr("Thing                         x,y   op-sect rad mission\n");
+           first = 0;
+       }
+       pr("%-25s", obj_nameof(gp));
+       prxy(" %3d,%-3d", gp->x, gp->y, player->cnum);
+       switch (gp->mission) {
+       case MI_INTERDICT:
+       case MI_SUPPORT:
+       case MI_RESERVE:
+       case MI_ESCORT:
+       case MI_AIR_DEFENSE:
+       case MI_DSUPPORT:
+       case MI_OSUPPORT:
+           prxy(" %3d,%-3d", gp->opx, gp->opy, player->cnum);
+           pr("  %4d", gp->radius);
+           break;
+       default:
+           CANT_REACH();
+           /* fall through */
+       case MI_NONE:
+           pr("              ");
+       }
+       if (gp->mission)
+           pr(" is on %s mission\n", mission_name(gp->mission));
+       else
+           pr(" has no mission.\n");
+    }
+}
index c4243b4f9149645c255016b487a7ff3bed580ba0..e39f4a7711f4f8fcaa762e9761f146848977a624 100644 (file)
@@ -741,48 +741,6 @@ mission_name(short mission)
     return "a mysterious";
 }
 
-void
-show_mission(int type, struct nstr_item *np)
-{
-    int first = 1;
-    union empobj_storage item;
-    struct empobj *gp;
-
-    while (nxtitem(np, &item)) {
-       gp = (struct empobj *)&item;
-       if (!player->owner || gp->own == 0)
-           continue;
-
-       if (first) {
-           pr("Thing                         x,y   op-sect rad mission\n");
-           first = 0;
-       }
-       pr("%-25s", obj_nameof(gp));
-       prxy(" %3d,%-3d", gp->x, gp->y, player->cnum);
-       switch (gp->mission) {
-       case MI_INTERDICT:
-       case MI_SUPPORT:
-       case MI_RESERVE:
-       case MI_ESCORT:
-       case MI_AIR_DEFENSE:
-       case MI_DSUPPORT:
-       case MI_OSUPPORT:
-           prxy(" %3d,%-3d", gp->opx, gp->opy, player->cnum);
-           pr("  %4d", gp->radius);
-           break;
-       default:
-           CANT_REACH();
-           /* fall through */
-       case MI_NONE:
-           pr("              ");
-       }
-       if (gp->mission)
-           pr(" is on %s mission\n", mission_name(gp->mission));
-       else
-           pr(" has no mission.\n");
-    }
-}
-
 int
 oprange(struct empobj *gp, int mission)
 {