]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/dump.c
commands: Rename the command functions
[empserver] / src / lib / commands / dump.c
index 6e697c6146ede4b63361293298e038e3dae1e760..9a88f6c84f624c8694adbcb1f8bdb31b9a84f44e 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
  *  dump.c: Dump sector information
- * 
+ *
  *  Known contributors to this file:
  *     Jeff Wallace, 1989
  *     Steve McClure, 1997 (added timestamping)
  */
 
-#include "misc.h"
-#include "player.h"
-#include "xy.h"
-#include "sect.h"
-#include "nsc.h"
-#include "nat.h"
-#include "path.h"
-#include "file.h"
+#include <config.h>
+
 #include "commands.h"
 #include "optlist.h"
+#include "path.h"
 
 int
-dump(void)
+c_dump(void)
 {
     struct sctstr sect;
-    s_char dirstr[20];
+    char dirstr[20];
     int nsect;
     int n, i;
     struct nstr_sect nstr;
@@ -59,7 +53,6 @@ dump(void)
        return RET_SYN;
     prdate();
     (void)strcpy(dirstr, ".      $");
-    n = 1;
     for (n = 1; n <= 6; n++)
        dirstr[n] = dirch[n];
     nsect = 0;
@@ -510,7 +503,6 @@ dump(void)
            pr("%d ", sect.sct_own);
        pr("%d %d", xrel(np, nstr.x), yrel(np, nstr.y));
 
-       set_coastal(&sect);
        n = 0;
        while (field[n]) {
            pr(" ");
@@ -732,7 +724,7 @@ dump(void)
                pr("%d", sect.sct_rail);
                break;
            case 71:
-               pr("%d", sect.sct_defense);
+               pr("%d", SCT_DEFENSE(&sect));
                break;
            case 72:
                if (opt_FALLOUT)