/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2010, 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/>.
*
* ---
*
static void help(char *);
static void usage(void);
static void parse_args(int argc, char *argv[]);
-static int allocate_memory(void);
+static void allocate_memory(void);
static void init(void);
static int drift(void);
static void grow_continents(void);
exit(1);
empfile_fixup();
- if (allocate_memory() == -1)
- exit(-1);
+ allocate_memory();
print_vars();
do {
fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno));
exit(EXIT_FAILURE);
}
- if (!ef_open(EF_SECTOR, EFF_MEM | EFF_NOTIME, WORLD_SZ())) {
- perror("ef_open");
+ if (!ef_open(EF_SECTOR, EFF_MEM | EFF_NOTIME))
exit(1);
- }
write_sects();
qprint("writing to sectors file...\n");
if (!ef_close(EF_SECTOR))
- exit(-1);
+ exit(1);
output();
qprint("\n\nA script for adding all the countries can be found in \"%s\".\n",
VARIABLE INITIALIZATION
****************************************************************************/
-static int
+static void
allocate_memory(void)
{
int i;
sectc[i] = calloc(is * 2, sizeof(int));
}
- return 0;
}
static void
}
for (c = 0; c < nc; ++c) {
- fprintf(script, "add %d %d %d n i\n", c + 1, c + 1, c + 1);
+ fprintf(script, "add %d %d %d n\n", c + 1, c + 1, c + 1);
if (AIRPORT_MARKER)
fprintf(script, "des %d,%d -\n", capx[c], capy[c]);
fprintf(script, "newcap %d %d,%d\n", c + 1, capx[c], capy[c]);
}
- fprintf(script, "add %d visitor visitor v i\n", c + 1);
+ fprintf(script, "add %d visitor visitor v\n", c + 1);
fclose(script);
return 0;
}