]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/scut.c
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / src / lib / commands / scut.c
index 874721ecb0da9c61487cb3f77a29c2748bcb8f02..460180d190061896378be172cf9ed5a4cb4c2e8b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,9 @@
  *
  *  ---
  *
- *  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.
  *
  *  ---
  *
@@ -31,6 +31,8 @@
  *     
  */
 
+#include <config.h>
+
 #include "misc.h"
 #include "player.h"
 #include "sect.h"
@@ -91,7 +93,7 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
 
        if (sect.sct_own != sp->shp_own) {
            ally_cash = cash * trade_ally_cut;
-           cash *= (1.0 + trade_ally_bonus);\r
+           cash *= (1.0 + trade_ally_bonus);
        }
     }
 
@@ -203,7 +205,7 @@ scut(void)
        if (!confirm(y_or_n))
            return RET_FAIL;
     }
-    while (nxtitem(&ni, (s_char *)&item)) {
+    while (nxtitem(&ni, &item)) {
        if (!player->owner)
            continue;
        if (opt_MARKET) {
@@ -241,7 +243,7 @@ scut(void)
            makelost(EF_PLANE, item.plane.pln_own, item.plane.pln_uid,
                     item.plane.pln_x, item.plane.pln_y);
            item.plane.pln_own = 0;
-           putplane(item.plane.pln_uid, (s_char *)&item.plane);
+           putplane(item.plane.pln_uid, &item.plane);
        }
        pr(" scuttled in %s\n",
           xyas(item.ship.shp_x, item.ship.shp_y, player->cnum));
@@ -260,7 +262,7 @@ scuttle_ship(struct shpstr *sp)
 
     getsect(sp->shp_x, sp->shp_y, &sect);
     snxtitem_all(&ni, EF_PLANE);
-    while (nxtitem(&ni, (s_char *)&plane)) {
+    while (nxtitem(&ni, &plane)) {
        if (plane.pln_own == 0)
            continue;
        if (plane.pln_ship == sp->shp_uid) {
@@ -278,11 +280,11 @@ scuttle_ship(struct shpstr *sp)
                   plane.pln_uid, sp->shp_uid,
                   xyas(plane.pln_x, plane.pln_y, plane.pln_own));
            }
-           putplane(plane.pln_uid, (s_char *)&plane);
+           putplane(plane.pln_uid, &plane);
        }
     }
     snxtitem_all(&ni, EF_LAND);
-    while (nxtitem(&ni, (s_char *)&land)) {
+    while (nxtitem(&ni, &land)) {
        if (land.lnd_own == 0)
            continue;
        if (land.lnd_ship == sp->shp_uid) {
@@ -292,7 +294,7 @@ scuttle_ship(struct shpstr *sp)
                   "Land unit %d transferred off ship %d to %s\n",
                   land.lnd_uid, sp->shp_uid,
                   xyas(land.lnd_x, land.lnd_y, land.lnd_own));
-               putland(land.lnd_uid, (s_char *)&land);
+               putland(land.lnd_uid, &land);
            } else
                scuttle_land(&land);
        }
@@ -312,7 +314,7 @@ scuttle_land(struct lndstr *lp)
 
     getsect(lp->lnd_x, lp->lnd_y, &sect);
     snxtitem_all(&ni, EF_PLANE);
-    while (nxtitem(&ni, (s_char *)&plane)) {
+    while (nxtitem(&ni, &plane)) {
        if (plane.pln_own == 0)
            continue;
        if (plane.pln_land == lp->lnd_uid) {
@@ -330,11 +332,11 @@ scuttle_land(struct lndstr *lp)
                   plane.pln_uid, lp->lnd_uid,
                   xyas(plane.pln_x, plane.pln_y, plane.pln_own));
            }
-           putplane(plane.pln_uid, (s_char *)&plane);
+           putplane(plane.pln_uid, &plane);
        }
     }
     snxtitem_all(&ni, EF_LAND);
-    while (nxtitem(&ni, (s_char *)&land)) {
+    while (nxtitem(&ni, &land)) {
        if (land.lnd_own == 0)
            continue;
        if (land.lnd_land == lp->lnd_uid) {
@@ -344,7 +346,7 @@ scuttle_land(struct lndstr *lp)
                   "Land unit %d transferred off unit %d to %s\n",
                   land.lnd_uid, lp->lnd_uid,
                   xyas(land.lnd_x, land.lnd_y, land.lnd_own));
-               putland(land.lnd_uid, (s_char *)&land);
+               putland(land.lnd_uid, &land);
            } else
                scuttle_land(&land);
        }