Before, they were stored as short. Wider uids use more space, but the
next commit will recover it by narrowing other members.
The use of short has always limited the number of ships, planes, land
units and nukes to SHRT_MAX (commonly 32768). Only the most extreme
games ever came close.
Commit
49780e2c (v4.3.12) added struct sctstr member sct_uid to make
struct empobj member uid work for sectors. This made the limit apply
to sectors as well. We've had games with more than 32768 sectors.
18 files changed:
struct comstr {
/* initial part must match struct empobj */
short ef_type;
struct comstr {
/* initial part must match struct empobj */
short ef_type;
unsigned com_seqno;
time_t com_timestamp;
natid com_owner;
unsigned com_seqno;
time_t com_timestamp;
natid com_owner;
* valid if EFF_TYPED is set in table's flags
*/
short ef_type;
* valid if EFF_TYPED is set in table's flags
*/
short ef_type;
unsigned seqno;
time_t timestamp;
/* end of part matching struct emptypedstr */
unsigned seqno;
time_t timestamp;
/* end of part matching struct emptypedstr */
struct emptypedstr {
short ef_type;
struct emptypedstr {
short ef_type;
unsigned seqno;
time_t timestamp;
};
unsigned seqno;
time_t timestamp;
};
struct gamestr {
/* initial part must match struct empobj */
short ef_type;
struct gamestr {
/* initial part must match struct empobj */
short ef_type;
unsigned game_seqno;
time_t game_timestamp;
/* end of part matching struct empobj */
unsigned game_seqno;
time_t game_timestamp;
/* end of part matching struct empobj */
struct lndstr {
/* initial part must match struct empobj */
short ef_type;
struct lndstr {
/* initial part must match struct empobj */
short ef_type;
- short lnd_uid; /* unit id (land unit) */
+ int lnd_uid; /* unit id (land #) */
unsigned lnd_seqno;
time_t lnd_timestamp; /* Last time this unit was touched */
natid lnd_own; /* owner's country num */
unsigned lnd_seqno;
time_t lnd_timestamp; /* Last time this unit was touched */
natid lnd_own; /* owner's country num */
short lnd_mission; /* mission code */
short lnd_radius; /* mission radius */
/* end of part matching struct empobj */
short lnd_mission; /* mission code */
short lnd_radius; /* mission radius */
/* end of part matching struct empobj */
- short lnd_ship; /* pointer to transporting ship */
+ int lnd_ship; /* uid of transporting ship, or -1 */
signed char lnd_harden; /* fortification */
short lnd_retreat; /* retreat percentage */
int lnd_rflags; /* When do I retreat? */
signed char lnd_harden; /* fortification */
short lnd_retreat; /* retreat percentage */
int lnd_rflags; /* When do I retreat? */
short lnd_item[I_MAX+1]; /* amount of items on board */
short lnd_pstage; /* plague stage */
short lnd_ptime; /* how many etus remain in this stage */
short lnd_item[I_MAX+1]; /* amount of items on board */
short lnd_pstage; /* plague stage */
short lnd_ptime; /* how many etus remain in this stage */
- short lnd_land; /* pointer to transporting unit */
+ int lnd_land; /* uid of transporting land unit, or -1 */
short lnd_access; /* Last tick mob was updated (MOB_ACCESS) */
};
short lnd_access; /* Last tick mob was updated (MOB_ACCESS) */
};
struct lonstr {
/* initial part must match struct empobj */
short ef_type;
struct lonstr {
/* initial part must match struct empobj */
short ef_type;
unsigned l_seqno;
time_t l_timestamp;
/* end of part matching struct empobj */
unsigned l_seqno;
time_t l_timestamp;
/* end of part matching struct empobj */
struct loststr {
/* initial part must match struct empobj */
short ef_type;
struct loststr {
/* initial part must match struct empobj */
short ef_type;
unsigned lost_seqno;
time_t lost_timestamp; /* When it was lost */
natid lost_owner; /* Who lost it */
/* end of part matching struct empobj */
short lost_type; /* Type of thing (ship, plane, nuke, land, sector) */
unsigned lost_seqno;
time_t lost_timestamp; /* When it was lost */
natid lost_owner; /* Who lost it */
/* end of part matching struct empobj */
short lost_type; /* Type of thing (ship, plane, nuke, land, sector) */
- short lost_id; /* ID of lost thing */
+ int lost_id; /* uid of lost thing (0 for sector)*/
coord lost_x;
coord lost_y;
};
coord lost_x;
coord lost_y;
};
struct realmstr {
/* initial part must match struct empobj */
short ef_type;
struct realmstr {
/* initial part must match struct empobj */
short ef_type;
- short r_uid; /* realm table index */
+ int r_uid; /* realm table index */
unsigned r_seqno;
time_t r_timestamp; /* Last time this realm was touched */
natid r_cnum; /* country number */
unsigned r_seqno;
time_t r_timestamp; /* Last time this realm was touched */
natid r_cnum; /* country number */
struct natstr {
/* initial part must match struct empobj */
short ef_type;
struct natstr {
/* initial part must match struct empobj */
short ef_type;
- short nat_uid; /* equals nat_cnum */
+ int nat_uid; /* equals nat_cnum */
unsigned nat_seqno;
time_t nat_timestamp;
natid nat_cnum; /* our country number */
unsigned nat_seqno;
time_t nat_timestamp;
natid nat_cnum; /* our country number */
int dist; /* NS_DIST: distance selector */
coord cx, cy; /* NS_DIST: center x-y, NS_XY: xy */
char group; /* NS_GROUP: fleet/wing match */
int dist; /* NS_DIST: distance selector */
coord cx, cy; /* NS_DIST: center x-y, NS_XY: xy */
char group; /* NS_GROUP: fleet/wing match */
- short next; /* NS_CARGO: next item */
+ int next; /* NS_CARGO: next item */
int size; /* NS_LIST: size of list */
int index; /* NS_LIST: index */
int list[NS_LSIZE]; /* NS_LIST: item list */
int size; /* NS_LIST: size of list */
int index; /* NS_LIST: index */
int list[NS_LSIZE]; /* NS_LIST: item list */
struct nukstr {
/* initial part must match struct empobj */
short ef_type;
struct nukstr {
/* initial part must match struct empobj */
short ef_type;
+ int nuk_uid; /* unit id (nuke #) */
unsigned nuk_seqno;
time_t nuk_timestamp; /* Last time this nuke was touched */
natid nuk_own;
unsigned nuk_seqno;
time_t nuk_timestamp; /* Last time this nuke was touched */
natid nuk_own;
short nuk_mission; /* mission code, unused */
short nuk_radius; /* mission radius, unused */
/* end of part matching struct empobj */
short nuk_mission; /* mission code, unused */
short nuk_radius; /* mission radius, unused */
/* end of part matching struct empobj */
- short nuk_plane; /* currently aboard plane */
+ int nuk_plane; /* uid of transporting plane, or -1 */
struct plnstr {
/* initial part must match struct empobj */
short ef_type;
struct plnstr {
/* initial part must match struct empobj */
short ef_type;
- short pln_uid; /* plane unit id */
+ int pln_uid; /* unit id (plane #) */
unsigned pln_seqno;
time_t pln_timestamp; /* Last time this plane was touched */
natid pln_own; /* owning country */
unsigned pln_seqno;
time_t pln_timestamp; /* Last time this plane was touched */
natid pln_own; /* owning country */
short pln_radius; /* mission radius */
/* end of part matching struct empobj */
unsigned char pln_range; /* total distance, not radius */
short pln_radius; /* mission radius */
/* end of part matching struct empobj */
unsigned char pln_range; /* total distance, not radius */
- short pln_ship; /* pointer to carrier */
- short pln_land; /* pointer to carrier */
+ int pln_ship; /* uid of carrier, or -1 */
+ int pln_land; /* uid of transporting land unit, or -1 */
signed char pln_harden; /* for missiles */
signed char pln_flags; /* State of the plane */
short pln_access; /* Last tick mob was updated (MOB_ACCESS) */
signed char pln_harden; /* for missiles */
signed char pln_flags; /* State of the plane */
short pln_access; /* Last tick mob was updated (MOB_ACCESS) */
extern struct plchrstr plchr[PLN_TYPE_MAX + 2];
struct shiplist {
extern struct plchrstr plchr[PLN_TYPE_MAX + 2];
struct shiplist {
struct shiplist *next;
};
struct shiplist *next;
};
struct sctstr {
/* initial part must match struct empobj */
short ef_type;
struct sctstr {
/* initial part must match struct empobj */
short ef_type;
- short sct_uid; /* equals XYOFFSET(sct_x, sct_y) */
+ int sct_uid; /* equals XYOFFSET(sct_x, sct_y) */
unsigned sct_seqno;
time_t sct_timestamp; /* Last time this sector was written to */
natid sct_own; /* owner's country num */
unsigned sct_seqno;
time_t sct_timestamp; /* Last time this sector was written to */
natid sct_own; /* owner's country num */
struct shpstr {
/* initial part must match struct empobj */
short ef_type;
struct shpstr {
/* initial part must match struct empobj */
short ef_type;
- short shp_uid; /* unit id (ship #) */
+ int shp_uid; /* unit it (ship #) */
unsigned shp_seqno;
time_t shp_timestamp; /* Last time this ship was touched. */
natid shp_own; /* owner's country num */
unsigned shp_seqno;
time_t shp_timestamp; /* Last time this ship was touched. */
natid shp_own; /* owner's country num */
short shp_access; /* Last tick mob was updated (MOB_ACCESS) */
unsigned char shp_mobquota; /* mobility quota */
char shp_path[MAXSHPPATH];
short shp_access; /* Last tick mob was updated (MOB_ACCESS) */
unsigned char shp_mobquota; /* mobility quota */
char shp_path[MAXSHPPATH];
char shp_name[MAXSHPNAMLEN]; /* name set with the "name" command */
coord shp_orig_x;
coord shp_orig_y; /* Where we were built */
char shp_name[MAXSHPNAMLEN]; /* name set with the "name" command */
coord shp_orig_x;
coord shp_orig_y; /* Where we were built */
struct trdstr {
/* initial part must match struct empobj */
short ef_type;
struct trdstr {
/* initial part must match struct empobj */
short ef_type;
unsigned trd_seqno;
time_t trd_timestamp;
natid trd_owner;
/* end of part matching struct empobj */
short trd_type;
unsigned trd_seqno;
time_t trd_timestamp;
natid trd_owner;
/* end of part matching struct empobj */
short trd_type;
long trd_price;
int trd_maxbidder;
time_t trd_markettime;
long trd_price;
int trd_maxbidder;
time_t trd_markettime;
struct trtstr {
/* initial part must match struct empobj */
short ef_type;
struct trtstr {
/* initial part must match struct empobj */
short ef_type;
unsigned trt_seqno;
time_t trt_timestamp;
/* end of part matching struct empobj */
unsigned trt_seqno;
time_t trt_timestamp;
/* end of part matching struct empobj */
struct flist {
struct emp_qelem queue; /* list of fired things */
short type; /* EF_SECTOR, EF_SHIP or EF_LAND */
struct flist {
struct emp_qelem queue; /* list of fired things */
short type; /* EF_SECTOR, EF_SHIP or EF_LAND */
coord x, y;
int defdam; /* damage defenders did */
natid victim;
coord x, y;
int defdam; /* damage defenders did */
natid victim;
#include "unit.h"
struct clink {
#include "unit.h"
struct clink {
- short next;
- short head[EF_NUKE - EF_PLANE + 1];
+ int next;
+ int head[EF_NUKE - EF_PLANE + 1];
* cargo lists know nothing about that.
*/
static struct clink *clink[EF_NUKE + 1];
* cargo lists know nothing about that.
*/
static struct clink *clink[EF_NUKE + 1];
-static short nclink[EF_NUKE + 1];
+static int nclink[EF_NUKE + 1];
/*
* Return pointer to CL's cargo list head for file type TYPE.
*/
/*
* Return pointer to CL's cargo list head for file type TYPE.
*/
clink_headp(struct clink *cl, int type)
{
clink_headp(struct clink *cl, int type)
{
if (CANT_HAPPEN(type < EF_PLANE || type > EF_NUKE)) {
dummy = -1;
if (CANT_HAPPEN(type < EF_PLANE || type > EF_NUKE)) {
dummy = -1;
* Check whether *UIDP is a valid uid for file type TYPE.
*/
static void
* Check whether *UIDP is a valid uid for file type TYPE.
*/
static void
-clink_check1(short *uidp, int type)
+clink_check1(int *uidp, int type)
{
if (CANT_HAPPEN(*uidp >= nclink[type]))
*uidp = -1;
{
if (CANT_HAPPEN(*uidp >= nclink[type]))
*uidp = -1;
static void
clink_add(struct clink *cl, int type, int uid)
{
static void
clink_add(struct clink *cl, int type, int uid)
{
- short *head = clink_headp(cl, type);
+ int *head = clink_headp(cl, type);
if (CANT_HAPPEN(type < 0 || type > EF_NUKE
|| uid < 0 || uid >= nclink[type]))
if (CANT_HAPPEN(type < 0 || type > EF_NUKE
|| uid < 0 || uid >= nclink[type]))
static void
clink_rem(struct clink *cl, int type, int uid)
{
static void
clink_rem(struct clink *cl, int type, int uid)
{
- short *head = clink_headp(cl, type);
+ int *head = clink_headp(cl, type);
struct clink *linkv;
int n;
struct clink *linkv;
int n;
if (CANT_HAPPEN(type < 0 || type > EF_NUKE))
return;
if (CANT_HAPPEN(type < 0 || type > EF_NUKE))
return;
int
unit_cargo_first(int type, int uid, int cargo_type)
{
int
unit_cargo_first(int type, int uid, int cargo_type)
{
if (CANT_HAPPEN(type < EF_SHIP || type > EF_NUKE))
return -1;
if (CANT_HAPPEN(type < EF_SHIP || type > EF_NUKE))
return -1;
struct castr sect_ca[] = {
#define CURSTR struct sctstr
/* uid needs to be NSC_DEITY because it discloses true origin */
struct castr sect_ca[] = {
#define CURSTR struct sctstr
/* uid needs to be NSC_DEITY because it discloses true origin */
- {"uid", fldoff(sct_uid), NSC_SHORT, 0, NULL,
+ {"uid", fldoff(sct_uid), NSC_INT, 0, NULL,
EF_SECTOR, NSC_DEITY | NSC_EXTRA},
{"timestamp", fldoff(sct_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
EF_SECTOR, NSC_DEITY | NSC_EXTRA},
{"timestamp", fldoff(sct_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
};
#define NSC_GENITEM(ef_type, ef_chr) \
};
#define NSC_GENITEM(ef_type, ef_chr) \
- {"uid", empobjoff(uid), NSC_SHORT, 0, NULL, ef_type, 0}, \
+ {"uid", empobjoff(uid), NSC_INT, 0, NULL, ef_type, 0}, \
{"timestamp", empobjoff(timestamp), NSC_TIME, 0, NULL, EF_BAD, NSC_EXTRA}, \
{"owner", empobjoff(own), NSC_NATID, 0, NULL, EF_NATION, 0}, \
{"xloc", empobjoff(x), NSC_XCOORD, 0, NULL, EF_BAD, 0}, \
{"timestamp", empobjoff(timestamp), NSC_TIME, 0, NULL, EF_BAD, NSC_EXTRA}, \
{"owner", empobjoff(own), NSC_NATID, 0, NULL, EF_NATION, 0}, \
{"xloc", empobjoff(x), NSC_XCOORD, 0, NULL, EF_BAD, 0}, \
{"access", fldoff(shp_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"mquota", fldoff(shp_mobquota), NSC_UCHAR, 0, NULL, EF_BAD, 0},
{"path", fldoff(shp_path), NSC_STRINGY, MAXSHPPATH, NULL, EF_BAD, 0},
{"access", fldoff(shp_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"mquota", fldoff(shp_mobquota), NSC_UCHAR, 0, NULL, EF_BAD, 0},
{"path", fldoff(shp_path), NSC_STRINGY, MAXSHPPATH, NULL, EF_BAD, 0},
- {"follow", fldoff(shp_follow), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"follow", fldoff(shp_follow), NSC_INT, 0, NULL, EF_BAD, 0},
{"name", fldoff(shp_name), NSC_STRINGY, MAXSHPNAMLEN, NULL,
EF_BAD, 0},
/* should let builder access xbuilt, ybuilt, but can't express that: */
{"name", fldoff(shp_name), NSC_STRINGY, MAXSHPNAMLEN, NULL,
EF_BAD, 0},
/* should let builder access xbuilt, ybuilt, but can't express that: */
NSC_GENITEM(EF_PLANE, EF_PLANE_CHR),
{"wing", fldoff(pln_wing), NSC_STRINGY, 1, NULL, EF_BAD, 0},
{"range", fldoff(pln_range), NSC_UCHAR, 0, NULL, EF_BAD, 0},
NSC_GENITEM(EF_PLANE, EF_PLANE_CHR),
{"wing", fldoff(pln_wing), NSC_STRINGY, 1, NULL, EF_BAD, 0},
{"range", fldoff(pln_range), NSC_UCHAR, 0, NULL, EF_BAD, 0},
- {"ship", fldoff(pln_ship), NSC_SHORT, 0, NULL, EF_BAD, 0},
- {"land", fldoff(pln_land), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"ship", fldoff(pln_ship), NSC_INT, 0, NULL, EF_BAD, 0},
+ {"land", fldoff(pln_land), NSC_INT, 0, NULL, EF_BAD, 0},
{"harden", fldoff(pln_harden), NSC_CHAR, 0, NULL, EF_BAD, 0},
{"flags", fldoff(pln_flags), NSC_CHAR, 0, NULL,
EF_PLANE_FLAGS, NSC_BITS},
{"harden", fldoff(pln_harden), NSC_CHAR, 0, NULL, EF_BAD, 0},
{"flags", fldoff(pln_flags), NSC_CHAR, 0, NULL,
EF_PLANE_FLAGS, NSC_BITS},
#define CURSTR struct lndstr
NSC_GENITEM(EF_LAND, EF_LAND_CHR),
{"army", fldoff(lnd_army), NSC_STRINGY, 1, NULL, EF_BAD, 0},
#define CURSTR struct lndstr
NSC_GENITEM(EF_LAND, EF_LAND_CHR),
{"army", fldoff(lnd_army), NSC_STRINGY, 1, NULL, EF_BAD, 0},
- {"ship", fldoff(lnd_ship), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"ship", fldoff(lnd_ship), NSC_INT, 0, NULL, EF_BAD, 0},
{"harden", fldoff(lnd_harden), NSC_CHAR, 0, NULL, EF_BAD, 0},
{"retreat", fldoff(lnd_retreat), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"rflags", fldoff(lnd_rflags), NSC_INT, 0, NULL,
{"harden", fldoff(lnd_harden), NSC_CHAR, 0, NULL, EF_BAD, 0},
{"retreat", fldoff(lnd_retreat), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"rflags", fldoff(lnd_rflags), NSC_INT, 0, NULL,
{"pstage", fldoff(lnd_pstage), NSC_SHORT, 0, NULL,
EF_PLAGUE_STAGES, NSC_DEITY},
{"ptime", fldoff(lnd_ptime), NSC_SHORT, 0, NULL, EF_BAD, NSC_DEITY},
{"pstage", fldoff(lnd_pstage), NSC_SHORT, 0, NULL,
EF_PLAGUE_STAGES, NSC_DEITY},
{"ptime", fldoff(lnd_ptime), NSC_SHORT, 0, NULL, EF_BAD, NSC_DEITY},
- {"land", fldoff(lnd_land), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"land", fldoff(lnd_land), NSC_INT, 0, NULL, EF_BAD, 0},
{"access", fldoff(lnd_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"att", 0, NSC_DOUBLE, 0, nsc_lnd_att, EF_BAD, NSC_EXTRA},
{"def", 0, NSC_DOUBLE, 0, nsc_lnd_def, EF_BAD, NSC_EXTRA},
{"access", fldoff(lnd_access), NSC_SHORT, 0, NULL, EF_BAD, 0},
{"att", 0, NSC_DOUBLE, 0, nsc_lnd_att, EF_BAD, NSC_EXTRA},
{"def", 0, NSC_DOUBLE, 0, nsc_lnd_def, EF_BAD, NSC_EXTRA},
struct castr nuke_ca[] = {
#define CURSTR struct nukstr
NSC_GENITEM(EF_NUKE, EF_NUKE_CHR),
struct castr nuke_ca[] = {
#define CURSTR struct nukstr
NSC_GENITEM(EF_NUKE, EF_NUKE_CHR),
- {"plane", fldoff(nuk_plane), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"plane", fldoff(nuk_plane), NSC_INT, 0, NULL, EF_BAD, 0},
{NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
#undef CURSTR
};
{NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
#undef CURSTR
};
struct castr treaty_ca[] = {
#define CURSTR struct trtstr
struct castr treaty_ca[] = {
#define CURSTR struct trtstr
- {"uid", fldoff(trt_uid), NSC_SHORT, 0, NULL, EF_TREATY, 0},
+ {"uid", fldoff(trt_uid), NSC_INT, 0, NULL, EF_TREATY, 0},
{"timestamp", fldoff(trt_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"cna", fldoff(trt_cna), NSC_NATID, 0, NULL, EF_NATION, 0},
{"timestamp", fldoff(trt_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"cna", fldoff(trt_cna), NSC_NATID, 0, NULL, EF_NATION, 0},
struct castr loan_ca[] = {
#define CURSTR struct lonstr
struct castr loan_ca[] = {
#define CURSTR struct lonstr
- {"uid", fldoff(l_uid), NSC_SHORT, 0, NULL, EF_LOAN, 0},
+ {"uid", fldoff(l_uid), NSC_INT, 0, NULL, EF_LOAN, 0},
{"timestamp", fldoff(l_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"loaner", fldoff(l_loner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"timestamp", fldoff(l_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"loaner", fldoff(l_loner), NSC_NATID, 0, NULL, EF_NATION, 0},
EF_BAD, 0},
{"owner", fldoff(lost_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"type", fldoff(lost_type), NSC_CHAR, 0, NULL, EF_TABLE, 0},
EF_BAD, 0},
{"owner", fldoff(lost_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"type", fldoff(lost_type), NSC_CHAR, 0, NULL, EF_TABLE, 0},
- {"id", fldoff(lost_id), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"id", fldoff(lost_id), NSC_INT, 0, NULL, EF_BAD, 0},
{"x", fldoff(lost_x), NSC_XCOORD, 0, NULL, EF_BAD, 0},
{"y", fldoff(lost_y), NSC_YCOORD, 0, NULL, EF_BAD, 0},
{NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
{"x", fldoff(lost_x), NSC_XCOORD, 0, NULL, EF_BAD, 0},
{"y", fldoff(lost_y), NSC_YCOORD, 0, NULL, EF_BAD, 0},
{NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0}
struct castr commodity_ca[] = {
#define CURSTR struct comstr
struct castr commodity_ca[] = {
#define CURSTR struct comstr
- {"uid", fldoff(com_uid), NSC_SHORT, 0, NULL, EF_COMM, 0},
+ {"uid", fldoff(com_uid), NSC_INT, 0, NULL, EF_COMM, 0},
{"timestamp", fldoff(com_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"owner", fldoff(com_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"timestamp", fldoff(com_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"owner", fldoff(com_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
struct castr trade_ca[] = {
#define CURSTR struct trdstr
struct castr trade_ca[] = {
#define CURSTR struct trdstr
- {"uid", fldoff(trd_uid), NSC_SHORT, 0, NULL, EF_TRADE, 0},
+ {"uid", fldoff(trd_uid), NSC_INT, 0, NULL, EF_TRADE, 0},
{"timestamp", fldoff(trd_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"owner", fldoff(trd_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"type", fldoff(trd_type), NSC_CHAR, 0, NULL, EF_TABLE, 0},
{"timestamp", fldoff(trd_timestamp), NSC_TIME, 0, NULL,
EF_BAD, NSC_EXTRA},
{"owner", fldoff(trd_owner), NSC_NATID, 0, NULL, EF_NATION, 0},
{"type", fldoff(trd_type), NSC_CHAR, 0, NULL, EF_TABLE, 0},
- {"unitid", fldoff(trd_unitid), NSC_SHORT, 0, NULL, EF_BAD, 0},
+ {"unitid", fldoff(trd_unitid), NSC_INT, 0, NULL, EF_BAD, 0},
{"price", fldoff(trd_price), NSC_LONG, 0, NULL, EF_BAD, 0},
{"maxbidder", fldoff(trd_maxbidder), NSC_INT, 0, NULL, EF_NATION, 0},
{"markettime", fldoff(trd_markettime), NSC_TIME, 0, NULL, EF_BAD, 0},
{"price", fldoff(trd_price), NSC_LONG, 0, NULL, EF_BAD, 0},
{"maxbidder", fldoff(trd_maxbidder), NSC_INT, 0, NULL, EF_NATION, 0},
{"markettime", fldoff(trd_markettime), NSC_TIME, 0, NULL, EF_BAD, 0},