]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/ef_verify.c
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / src / lib / common / ef_verify.c
index ab1e54d24fa8a17eecc876f379ae1e4af92a23df..84484f4cca1406147d6348deec28c801f8251077 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, 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.
  *
  *  ---
  *
@@ -32,6 +32,8 @@
  *  
  */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <time.h>
 
@@ -57,7 +59,6 @@ verify_row(int type, int row)
     } else 
        row_ref = ef_ptr(type, row); 
 
-//    if (ef_flags(type) & EFF_OWNER) != 0
     for (i = 0; ca[i].ca_name; ++i) {
        if (ca[i].ca_flags & NSC_EXTRA)
            continue;
@@ -85,7 +86,7 @@ verify_row(int type, int row)
                            );
                        continue;
                    }
-                   for (k = 0; k < sizeof(long) * 8; k++) {
+                   for (k = 0; k < (int)sizeof(long) * 8; k++) {
                        if (val.val_as.lng & (1 << k))
                            if (!symbol_by_value(1 << k, ef_ptr(ca[i].ca_table, 0))) {
                                fprintf(stderr,
@@ -100,7 +101,7 @@ verify_row(int type, int row)
                    if (ca_sym != symbol_ca) {
                        if (val.val_as.lng >= ef_nelem(ca[i].ca_table) ||
                            val.val_as.lng < -2) {
-                           fprintf(stderr, "Table index %d to table %s "
+                           fprintf(stderr, "Table index %ld to table %s "
                                "out of range, nelements %d for table %s "
                                "row %d field %s\n",
                                val.val_as.lng, ef_nameof(ca[i].ca_table),
@@ -112,7 +113,7 @@ verify_row(int type, int row)
                        if (val.val_as.lng > -1) {
                            if (!symbol_by_value(val.val_as.lng,
                                       ef_ptr(ca[i].ca_table,0))) {
-                               fprintf(stderr, "value %d not found in "
+                               fprintf(stderr, "value %ld not found in "
                                    "symbol table %s when verify table %s "
                                    "row %d field %s\n",
                                    val.val_as.lng,
@@ -129,7 +130,7 @@ verify_row(int type, int row)
     } 
     if (!in_mem)
         free(row_ref);
-    return(ret_val);
+    return ret_val;
 }
 
 int