]> git.pond.sub.org Git - empserver/blobdiff - include/nat.h
Use int instead of long for military reserves
[empserver] / include / nat.h
index 4a09cd4a4855c4695459649a8464d1096e9e4ffa..fc7f6aeab3b0ca15923ee799eea5bfba31a958c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -31,7 +31,7 @@
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
  *     Ron Koenderink, 2005-2008
- *     Markus Armbruster, 2005-2008
+ *     Markus Armbruster, 2005-2013
  */
 
 #ifndef NAT_H
@@ -91,9 +91,10 @@ struct natstr {
     natid nat_cnum;            /* our country number */
     /* end of part matching struct empobj */
     enum nat_status nat_stat;
+    int nat_flags;             /* nation flags */
     char nat_cnam[20];         /* country name */
     char nat_pnam[20];         /* representative */
-    char nat_hostaddr[32];     /* host addr of last user */
+    char nat_hostaddr[46];     /* host addr of last user */
     char nat_hostname[512];    /* hostname of last user, may be empty */
     char nat_userid[32];       /* userid of last user, may be empty */
     coord nat_xcap, nat_ycap;  /* cap location in abs coords */
@@ -104,7 +105,7 @@ struct natstr {
     int nat_timeused;          /* number of seconds used today */
     short nat_btu;             /* bureaucratic time units */
     short nat_access;          /* The tick when BTUs were last updated */
-    long nat_reserve;          /* military reserves */
+    int nat_reserve;           /* military reserves */
     long nat_money;            /* moola */
     time_t nat_last_login;     /* time of last login, 0 menas never */
     time_t nat_last_logout;    /* time of last logout, 0 means never */
@@ -114,7 +115,6 @@ struct natstr {
     unsigned char nat_relate[MAXNOC];
     unsigned char nat_contact[MAXNOC];
     unsigned char nat_rejects[MAXNOC];
-    long nat_flags;            /* nation flags */
 };
 
        /* nation relation codes */
@@ -177,10 +177,10 @@ extern void putreject(struct natstr *np, natid them, int how, int what);
 extern void putcontact(struct natstr *np, natid them, int contact);
 extern void agecontact(struct natstr *np);
 extern int influx(struct natstr *np);
+extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
+                               enum nat_status);
 
-extern struct natstr *nat_reset(struct natstr *, enum nat_status,
-                               coord, coord);
-extern int check_nat_name(char *cname);
+extern int check_nat_name(char *, natid);
 
 extern int grant_btus(struct natstr *, int);