New xdump updates:

(EF_UPDATES, update_ca): New.
(empfile): Add it.
(update_time): Move to src/lib/global/updtime.c.
This commit is contained in:
Markus Armbruster 2007-07-18 06:16:33 +00:00
parent e9cfbdc241
commit 7dd8b8a305
8 changed files with 55 additions and 9 deletions

View file

@ -28,7 +28,7 @@
* file.c: Empire game data file descriptions.
*
* Known contributors to this file:
* Markus Armbruster, 2005
* Markus Armbruster, 2005-2007
*/
#include <config.h>
@ -49,6 +49,7 @@
#include "product.h"
#include "sect.h"
#include "ship.h"
#include "server.h"
#include "trade.h"
#include "treaty.h"
@ -162,6 +163,8 @@ struct empfile empfile[] = {
ARRAY_TABLE(rpt, EFF_CFG)},
{EF_INFRASTRUCTURE, "infrastructure", "infra.config", intrchr_ca,
ARRAY_CACHE(intrchr, EFF_CFG)},
{EF_UPDATES, "updates", NULL, update_ca,
ARRAY_TABLE(update_time, EFF_CFG)},
{EF_TABLE, "table", NULL, empfile_ca,
ARRAY_TABLE(empfile, EFF_CFG)},
{EF_META, "meta", NULL, mdchr_ca,

View file

@ -28,7 +28,7 @@
* nsc.c: Empire selection global structures
*
* Known contributors to this file:
* Markus Armbruster, 2004-2006
* Markus Armbruster, 2004-2007
*/
/*
@ -576,6 +576,11 @@ struct castr rpt_ca[] = {
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};
struct castr update_ca[] = {
{NSC_TIME, 0, 0, 0, "time", EF_BAD},
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
};
struct castr empfile_ca[] = {
{NSC_INT, 0, 0, offsetof(struct empfile, uid), "uid", EF_TABLE},
{NSC_STRING, NSC_CONST, 0, offsetof(struct empfile, name), "name", EF_BAD},

38
src/lib/global/updtime.c Normal file
View file

@ -0,0 +1,38 @@
/*
* Empire - A multi-player, client/server Internet based war game.
* Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* 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
*
* ---
*
* 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.
*
* ---
*
* updtime.c: Scheduled update times
*
* Known contributors to this file:
* Markus Armbruster, 2007
*/
#include <config.h>
#include "server.h"
time_t update_time[];