/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
- * Ken Stevens, Steve McClure
+ * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Ken Stevens, Steve McClure, Markus Armbruster
*
- * This program is free software; you can redistribute it and/or modify
+ * Empire is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ---
*
*
* ---
*
- * file.c: Empire game data file descriptions.
- *
+ * filetable.c: Empire game data file descriptions.
+ *
* Known contributors to this file:
* Markus Armbruster, 2005-2008
*/
/* Initializers for members flags... */
/* Unmapped cache */
#define UNMAPPED_CACHE(type, flags) \
- sizeof(type), (flags), NULL, 0, 0, 0, 0, -1, NULL, NULL
+ sizeof(type), (flags), NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL, NULL
/*
* Mapped cache, array with known size.
* Members cids, fids are not set.
*/
#define ARRAY_CACHE(array, flags) \
sizeof(*(array)), (flags), (char *)(array), \
- SZ((array)), 0, 0, 0, -1, NULL, NULL
+ SZ((array)), 0, 0, 0, -1, NULL, NULL, NULL, NULL
/*
* Mapped cache, array with unknown size.
* Members csize, cids, fids are not set.
*/
#define PTR_CACHE(ptr, flags) \
sizeof(*(ptr)), (flags), (char *)(ptr), \
- 0, 0, 0, 0, -1, NULL, NULL
+ 0, 0, 0, 0, -1, NULL, NULL, NULL, NULL
/*
* Array-backed table.
* The array's last element is the sentinel.
*/
-#define ARRAY_TABLE(array, flags) \
- sizeof(*(array)), (flags), (char *)(array), \
- SZ((array)), 0, SZ((array)) - 1, SZ((array)) - 1, -1, NULL, NULL
+#define ARRAY_TABLE(array, flags) \
+ sizeof(*(array)), (flags), (char *)(array), \
+ SZ((array)), 0, SZ((array)) - 1, SZ((array)) - 1, -1, \
+ NULL, NULL, NULL, NULL
/* Common configuration table flags */
#define EFF_CFG (EFF_PRIVATE | EFF_MEM | EFF_STATIC | EFF_SENTINEL)
{EF_NUKE, "nuke", "nuke", nuke_ca,
UNMAPPED_CACHE(struct nukstr, EFF_TYPED | EFF_XY | EFF_OWNER)},
{EF_NEWS, "news", "news", news_ca,
- UNMAPPED_CACHE(struct nwsstr, EFF_TYPED)},
+ UNMAPPED_CACHE(struct nwsstr, 0)},
{EF_TREATY, "treaty", "treaty", treaty_ca,
UNMAPPED_CACHE(struct trtstr, EFF_TYPED)},
{EF_TRADE, "trade", "trade", trade_ca,
{EF_LOAN, "loan", "loan", loan_ca,
UNMAPPED_CACHE(struct lonstr, EFF_TYPED)},
{EF_MAP, "map", "map", NULL,
- 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
+ 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL, NULL},
{EF_BMAP, "bmap", "bmap", NULL,
- 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
+ 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL, NULL},
{EF_COMM, "commodity", "commodity", commodity_ca,
UNMAPPED_CACHE(struct comstr, EFF_TYPED | EFF_OWNER)},
{EF_LOST, "lost", "lostitems", lost_ca,
ARRAY_TABLE(empfile, EFF_CFG)},
{EF_VERSION, "version", NULL, NULL,
sizeof(PACKAGE_STRING), EFF_STATIC, version, 1, 0, 1, 1, -1,
- NULL, NULL},
+ NULL, NULL, NULL, NULL},
{EF_META, "meta", NULL, mdchr_ca,
PTR_CACHE(mdchr_ca, EFF_CFG)},
UNMAPPED_CACHE(struct natstr, EFF_TYPED | EFF_OWNER)},
/* Sentinel */
- {EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
+ {EF_BAD, NULL, NULL, NULL,
+ 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL, NULL},
};
static void