]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/distrea.c
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / src / lib / subs / distrea.c
index 2ee977021b2ff52b0ba47b72276ffef5b1b6d47c..58db18d28e79539a621f89a45af3d9d8f58fb156 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2000, 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.
  *
  *  ---
  *
  *     
  */
 
+#include <config.h>
+
 #include "misc.h"
 #include "player.h"
 #include "treaty.h"
 #include "nat.h"
-#include "deity.h"
 #include "file.h"
 #include "prototypes.h"
 
@@ -55,17 +56,11 @@ distrea(int n, register struct trtstr *tp)
        return 0;
     (void)time(&now);
     if (now > tp->trt_exp) {
-       if (!ef_lock(EF_TREATY)) {
-           pr("Can't lock treaty file; get help!\n");
-           return 0;
-       }
        tp->trt_status = TS_FREE;
        if (!puttre(n, tp)) {
            pr("Couldn't save treaty; get help!\n");
-           (void)ef_unlock(EF_TREATY);
            return 0;
        }
-       (void)ef_unlock(EF_TREATY);
        pr("Treaty #%d expired %s", n, ctime(&tp->trt_exp));
        return 0;
     }
@@ -76,16 +71,16 @@ distrea(int n, register struct trtstr *tp)
     pr("%s  expires %s", cname(tp->trt_cnb), ctime(&tp->trt_exp));
     pr("%24.24s terms", cname(tp->trt_cna));
     pr(" - %s terms\n", cname(tp->trt_cnb));
-    for (i = 0; 0 != (cond = tchr[i].t_cond); i++) {
+    for (i = 0; 0 != (cond = treaty_flags[i].value); i++) {
        acond = tp->trt_acond & cond;
        bcond = tp->trt_bcond & cond;
        if (acond | bcond) {
            if (acond)
-               pr("%30s", tchr[i].t_name);
+               pr("%30s", treaty_flags[i].name);
            else
                pr("%30s", "");
            if (bcond)
-               pr(" - %s\n", tchr[i].t_name);
+               pr(" - %s\n", treaty_flags[i].name);
            else
                pr(" -\n");
        }