]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/land.c
Fix trailing whitespace
[empserver] / src / lib / commands / land.c
index bb70f452fdef6075536e7304da47cdf06f29e2c9..b2adc8b6cc92fa02a35a39021ba9599bfa23a605 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *  ---
  *
  *  land.c: List land units
- * 
+ *
  *  Known contributors to this file:
  *     Steve McClure, 1998
  */
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "sect.h"
+#include "commands.h"
 #include "land.h"
-#include "nsc.h"
-#include "file.h"
 #include "optlist.h"
-#include "commands.h"
 
 int
 land(void)
@@ -49,7 +44,7 @@ land(void)
     struct nstr_item ni;
     struct lndstr land;
 
-    if (!snxtitem(&ni, EF_LAND, player->argp[1]))
+    if (!snxtitem(&ni, EF_LAND, player->argp[1], NULL))
        return RET_SYN;
 
     nunits = noff = 0;
@@ -58,15 +53,10 @@ land(void)
            continue;
        if (!player->owner && !player->god)
            continue;
-       count_land_planes(&land);
-       lnd_count_units(&land);
-
        if (nunits++ == 0) {
            if (player->god)
                pr("own ");
            pr("   # unit type          x,y   a   eff mil frt  mu  fd");
-           if (opt_FUEL)
-               pr(" fl");
            pr(" tch retr rd xl ln carry\n");
        }
        if (land.lnd_off)
@@ -82,13 +72,11 @@ land(void)
        pr("%4d", land.lnd_harden);
        pr("%4d", land.lnd_mobil);
        pr("%4d", land.lnd_item[I_FOOD]);
-       if (opt_FUEL)
-           pr("%3d", land.lnd_fuel);
        pr("%4d ", land.lnd_tech);
        pr("%3d%%", land.lnd_retreat);
        pr("%3d", land.lnd_rad_max);
-       pr("%3d", land.lnd_nxlight);
-       pr("%3d", land.lnd_nland);
+       pr("%3d", lnd_nxlight(&land));
+       pr("%3d", lnd_nland(&land));
        if (land.lnd_ship >= 0)
            pr(" %4dS", land.lnd_ship);
        else if (land.lnd_land >= 0)