<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39557 >

 This already committed patch fixes some of the current compilation
errors. Server and gui-gtk compile. Several errors were fixed from
gui-sdl, but some were not trivial to fix and I wanted to commit at
least server/gui-gtk part ASAP.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/citydlg_common.h freeciv/client/citydlg_common.h
--- freeciv/client/citydlg_common.h	2007-08-13 20:51:08.000000000 +0300
+++ freeciv/client/citydlg_common.h	2007-08-13 22:31:12.000000000 +0300
@@ -20,6 +20,7 @@
 #include "fc_types.h"
 
 struct canvas;
+struct worklist;
 
 enum citizen_category {
   CITIZEN_HAPPY,
diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/citydlg.c freeciv/client/gui-sdl/citydlg.c
--- freeciv/client/gui-sdl/citydlg.c	2007-08-13 20:51:07.000000000 +0300
+++ freeciv/client/gui-sdl/citydlg.c	2007-08-13 22:33:30.000000000 +0300
@@ -3510,7 +3510,6 @@
   struct widget *pAdd_Dock, *pBuf, *pLast;
   SDL_Surface *pLogo = NULL;
   SDL_String16 *pStr = NULL;
-  struct impr_type *pImpr = NULL;
   struct player *pOwner = city_owner(pCity);
   int prev_y = 0;
     
diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/dialogs.c freeciv/client/gui-sdl/dialogs.c
--- freeciv/client/gui-sdl/dialogs.c	2007-08-09 21:49:47.000000000 +0300
+++ freeciv/client/gui-sdl/dialogs.c	2007-08-13 22:35:24.000000000 +0300
@@ -1568,7 +1568,7 @@
       create_active_iconlabel(pBuf, pWindow->dst, pStr,
 	    cBuf, unit_help_callback);
       set_wstate(pBuf , FC_WS_NORMAL);
-      add_to_gui_list(MAX_ID - pUnitType->index, pBuf);
+      add_to_gui_list(MAX_ID - utype_index(pUnitType), pBuf);
     
       area.w = MAX(area.w, pBuf->size.w);
       units_h += pBuf->size.h;
diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/helpdlg.c freeciv/client/gui-sdl/helpdlg.c
--- freeciv/client/gui-sdl/helpdlg.c	2007-08-13 20:51:07.000000000 +0300
+++ freeciv/client/gui-sdl/helpdlg.c	2007-08-13 22:37:39.000000000 +0300
@@ -634,7 +634,7 @@
 
       set_wstate(pBuf, FC_WS_NORMAL);
       pBuf->action = change_unit_callback;
-      add_to_gui_list(MAX_ID - type->index, pBuf);
+      add_to_gui_list(MAX_ID - utype_index(type), pBuf);
       
       if (++h > 10)
       {
@@ -792,7 +792,7 @@
 	      utype_name_translation(utype),
 	      adj_font(12), WF_RESTORE_BACKGROUND);
     pBuf->string16->fgcol = *get_tech_color(advance_number(utype->require_advance));
-    pBuf->ID = MAX_ID - pUnitType->obsoleted_by->index;
+    pBuf->ID = MAX_ID - utype_index(pUnitType->obsoleted_by);
     pBuf->action = change_unit_callback;
     set_wstate(pBuf, FC_WS_NORMAL);
   }
@@ -1163,7 +1163,7 @@
       }
       set_wstate(pBuf, FC_WS_NORMAL);
       pBuf->action = change_unit_callback;
-      pBuf->ID = MAX_ID - un->index;
+      pBuf->ID = MAX_ID - utype_index(un);
       DownAdd(pBuf, pDock);
       pDock = pBuf;
       unit_count++;
diff -Nurd -X.diff_ignore freeciv/client/tilespec.h freeciv/client/tilespec.h
--- freeciv/client/tilespec.h	2007-08-13 20:51:08.000000000 +0300
+++ freeciv/client/tilespec.h	2007-08-13 22:34:06.000000000 +0300
@@ -26,6 +26,7 @@
 struct sprite;			/* opaque; gui-dep */
 
 struct base_type;
+struct resource;
 
 /* Create the sprite_vector type. */
 #define SPECVEC_TAG sprite
diff -Nurd -X.diff_ignore freeciv/common/effects.h freeciv/common/effects.h
--- freeciv/common/effects.h	2007-08-13 20:51:04.000000000 +0300
+++ freeciv/common/effects.h	2007-08-13 22:28:55.000000000 +0300
@@ -18,6 +18,8 @@
 
 #include "connection.h"
 
+struct requirement;
+
 /* Type of effects. (Used in effect.type field)
  * These must correspond to effect_type_names[] in effects.c. */
 enum effect_type {
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to