~ubuntu-branches/ubuntu/maverick/crossfire-client/maverick

« back to all changes in this revision

Viewing changes to common/init.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2007-04-13 21:15:44 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070413211544-vjo6zesj6g0wgmwf
Tags: 1.10.0-1
* New upstream release
* Install the README, README-dev and TODO files specific to the GTK2
  client to the corresponding package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
const char *rcsid_common_init_c =
2
 
    "$Id: init.c,v 1.31 2006/05/15 05:57:43 mwedel Exp $";
 
2
    "$Id: init.c 5076 2006-11-04 08:15:16Z mwedel $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
26
26
 * the I_IMAGE and I_ARCH commands.
27
27
 */
28
28
 
 
29
#ifdef WIN32
 
30
#define srandom(x) srand(x)
 
31
#endif
29
32
#include <client.h>
30
33
#include "p_cmd.h" /* init_commands() */
31
34
 
49
52
 
50
53
sint16 want_config[CONFIG_NUMS], use_config[CONFIG_NUMS];
51
54
 
52
 
#define TEST_FREE_AND_CLEAR(xyz) {if (xyz) { free(xyz); xyz=NULL; } }
 
55
#define FREE_AND_CLEAR(xyz) { free(xyz); xyz=NULL; }
53
56
 
54
57
void VersionCmd(char *data, int len)
55
58
{
107
110
        client_libdir=CLIENT_LIBDIR;
108
111
#endif
109
112
 
 
113
    if (exp_table) {
 
114
        free(exp_table);
 
115
        exp_table=NULL;
 
116
    }
 
117
    exp_table_max=0;
 
118
 
110
119
    cpl.count_left = 0;
111
120
    cpl.container = NULL;
112
121
    memset(&cpl.stats,0, sizeof(Stats));
169
178
    want_config[CONFIG_FOGWAR] = TRUE;
170
179
    want_config[CONFIG_ICONSCALE] = 100;
171
180
    want_config[CONFIG_MAPSCALE] = 100;
172
 
    want_config[CONFIG_POPUPS] = TRUE;
 
181
    want_config[CONFIG_POPUPS] = FALSE;
173
182
    want_config[CONFIG_DISPLAYMODE] = CFG_DM_PIXMAP;
174
183
    want_config[CONFIG_SHOWICON] = FALSE;
175
184
    want_config[CONFIG_TOOLTIPS] = TRUE;
277
286
    face_info.cache_misses=0;
278
287
    face_info.have_faceset_info=0;
279
288
    for (i=0; i<MAX_FACE_SETS; i++) {
280
 
        TEST_FREE_AND_CLEAR(face_info.facesets[i].prefix);
281
 
        TEST_FREE_AND_CLEAR(face_info.facesets[i].fullname);
 
289
        FREE_AND_CLEAR(face_info.facesets[i].prefix);
 
290
        FREE_AND_CLEAR(face_info.facesets[i].fullname);
282
291
        face_info.facesets[i].fallback = 0;
283
 
        TEST_FREE_AND_CLEAR(face_info.facesets[i].size);
284
 
        TEST_FREE_AND_CLEAR(face_info.facesets[i].extension);
285
 
        TEST_FREE_AND_CLEAR(face_info.facesets[i].comment);
 
292
        FREE_AND_CLEAR(face_info.facesets[i].size);
 
293
        FREE_AND_CLEAR(face_info.facesets[i].extension);
 
294
        FREE_AND_CLEAR(face_info.facesets[i].comment);
286
295
    }
287
296
    reset_player_data();
288
297
    for (i=0; i<MAX_SKILL; i++)
289
 
        skill_names[i] = NULL;
 
298
        FREE_AND_CLEAR(skill_names[i]);
290
299
 
291
300
}