Crossfire Server, Branches 1.12  R18729
glue.c
Go to the documentation of this file.
1 /*
2  * static char *rcsid_glue_c =
3  * "$Id: glue.c 11578 2009-02-23 22:02:27Z lalo $";
4  */
5 
6 /*
7  CrossFire, A Multiplayer game for X-windows
8 
9  Copyright (C) 2002 Mark Wedel & Crossfire Development Team
10  Copyright (C) 1992 Frank Tore Johansen
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 
26  The authors can be reached via e-mail at crossfire-devel@real-time.com
27 */
28 
29 #include <global.h>
30 #include <sproto.h>
31 
47 static const char *const fatalmsgs[80] = {
48  "Failed to allocate memory",
49  "Failed repeatedly to load maps",
50  "Hashtable for archetypes is too small",
51 };
52 
60 void fatal(int err) {
61  fprintf(logfile, "Fatal: %s\n", fatalmsgs[err]);
62  emergency_save(0);
64  fprintf(logfile, "Exiting...\n");
65  exit(err);
66 }
EXTERN FILE * logfile
Definition: global.h:220
void clean_tmp_files(void)
Definition: standalone.c:194
void fatal(int err)
Definition: glue.c:60
void emergency_save(int flag)
Definition: standalone.c:191
static const char *const fatalmsgs[80]
Definition: glue.c:47