Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6779) CM usage cleanup
Home

[Freeciv-Dev] (PR#6779) CM usage cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6779) CM usage cleanup
From: rt@xxxxxxxxxxx
Date: Thu, 6 Nov 2003 02:50:37 -0800

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6779 >


cm_init and cm_free are moved into game_init and game_free.

This is related to PR#6396.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  One nuclear bomb can ruin your whole day.

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.179
diff -u -u -r1.179 civclient.c
--- client/civclient.c  2003/11/06 10:40:46     1.179
+++ client/civclient.c  2003/11/06 10:50:42
@@ -627,7 +627,6 @@
   game_init();
   attribute_init();
   agents_init();
-  cm_init();
   target_government_init();
 }
 
Index: client/agents/agents.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/agents.c,v
retrieving revision 1.25
diff -u -u -r1.25 agents.c
--- client/agents/agents.c      2003/04/04 15:47:46     1.25
+++ client/agents/agents.c      2003/11/06 10:50:43
@@ -314,7 +314,6 @@
    * for a simple disconnect and a client quit. for right now, we just
    * let the OS free the memory on exit instead of doing it ourselves. */
   /* cmafec_free(); */
-  cm_free();
 
   for (;;) {
     struct call *pcall = remove_and_return_a_call();
Index: common/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/Makefile.am,v
retrieving revision 1.44
diff -u -u -r1.44 Makefile.am
--- common/Makefile.am  2003/08/10 13:46:13     1.44
+++ common/Makefile.am  2003/11/06 10:50:43
@@ -4,7 +4,7 @@
 
 noinst_LIBRARIES = libcivcommon.a
 
-INCLUDES = -I../intl
+INCLUDES = -I../intl -Iaicore
 
 ## Above, note -I../intl instead of -I$(top_srdir/intl) is deliberate.
 
Index: common/game.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.c,v
retrieving revision 1.170
diff -u -u -r1.170 game.c
--- common/game.c       2003/09/23 22:01:41     1.170
+++ common/game.c       2003/11/06 10:50:44
@@ -22,6 +22,7 @@
 
 #include "capstr.h"
 #include "city.h"
+#include "cm.h"
 #include "connection.h"
 #include "fcintl.h"
 #include "government.h"
@@ -294,6 +295,7 @@
   init_our_capability();    
   map_init();
   idex_init();
+  cm_init();
   
   for(i=0; i<MAX_NUM_PLAYERS+MAX_NUM_BARBARIANS; i++)
     player_init(&game.players[i]);
@@ -328,6 +330,7 @@
   map_free();
   idex_free();
   ruleset_data_free();
+  cm_free();
 }
 
 /***************************************************************
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.143
diff -u -u -r1.143 srv_main.c
--- server/srv_main.c   2003/11/04 11:29:19     1.143
+++ server/srv_main.c   2003/11/06 10:50:47
@@ -92,8 +92,6 @@
 #include "unithand.h"
 #include "unittools.h"
 
-#include "cm.h"
-
 #include "advdiplomacy.h"
 #include "advmilitary.h"
 #include "aidata.h"
@@ -1620,7 +1618,6 @@
 
   /* Run server loop */
   while (TRUE) {
-    cm_init(); /* initialize CM */
     srv_loop();
     if (game.timeout == -1) {
       server_quit();
@@ -1842,7 +1839,6 @@
 **************************************************************************/
 void server_game_free()
 {
-  cm_free();
   players_iterate(pplayer) {
     player_map_free(pplayer);
   } players_iterate_end;
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.300
diff -u -u -r1.300 stdinhand.c
--- server/stdinhand.c  2003/10/27 14:25:25     1.300
+++ server/stdinhand.c  2003/11/06 10:50:51
@@ -31,7 +31,6 @@
 
 #include "astring.h"
 #include "capability.h"
-#include "cm.h"
 #include "events.h"
 #include "fcintl.h"
 #include "game.h"
@@ -3762,7 +3761,6 @@
   server_game_free();
 
   game_init();
-  cm_init();
 
   loadtimer = new_timer_start(TIMER_CPU, TIMER_ACTIVE);
   uloadtimer = new_timer_start(TIMER_USER, TIMER_ACTIVE);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6779) CM usage cleanup, rt <=