2 Copyright 2002 Andrew Tridgell <tridge@samba.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 all global variiables in chessd have been moved here so that they can
21 be maintained over a code reload. As long as the code reload does not change the
22 shape or meaning of any of the following globals then the reload should work
26 /* the EXTERN macro is used to allow ficsmain.c to declare real variables while
27 other modules declare them as extern */
33 GENSTRUCT struct net_globals {
34 int sockfd; /* main listening socket */
35 int numConnections; /* number of active connections */
36 int no_file; /* number of connections allocated */
37 struct connection_t **con; _LEN(no_file)
39 EXTERN struct net_globals net_globals;
43 GENSTRUCT struct game_globals {
45 struct game *garray; _LEN(g_num)
47 EXTERN struct game_globals game_globals;
50 GENSTRUCT struct player_globals {
53 struct player *parray; _LEN(parray_size)
55 EXTERN struct player_globals player_globals;
58 GENSTRUCT struct command_globals {
62 int commanding_player;
64 EXTERN struct command_globals command_globals;
67 GENSTRUCT struct gics_globals {
68 struct userstat_type userstat;
70 EXTERN struct gics_globals gics_globals;
73 GENSTRUCT struct seek_globals {
75 struct pending *pendlist;
77 struct pending *ads; _LEN(max_ads)
79 EXTERN struct seek_globals seek_globals;
82 GENSTRUCT struct timeseal_globals {
85 EXTERN struct timeseal_globals timeseal_globals;
87 /* a structure containing all globals, to make it easy to save
90 GENSTRUCT struct all_globals {
91 struct net_globals *net_globals;
92 struct game_globals *game_globals;
93 struct player_globals *player_globals;
94 struct command_globals *command_globals;
95 struct gics_globals *gics_globals;
96 struct seek_globals *seek_globals;
97 struct timeseal_globals *timeseal_globals;