[Freeciv-Dev] Re: (PR#12629) Make each header file self-contained
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12629 >
On Fri, Mar 25, 2005 at 10:19:19AM -0800, Jason Short wrote:
> > So what about a patch to remove these?
>
> If you like. I did this some time ago but new ones may have been
> introduce since then.
The patch.
Raimar
--
email: i-freeciv-lists@xxxxxxxxxxxxx
"Any sufficiently advanced technology is indistinguishable from magic."
-- Arthur C. Clarke
Index: ai/aisettler.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aisettler.h,v
retrieving revision 1.3
diff -u -u -r1.3 aisettler.h
--- ai/aisettler.h 25 Mar 2005 10:20:48 -0000 1.3
+++ ai/aisettler.h 26 Mar 2005 10:26:18 -0000
@@ -14,10 +14,9 @@
#define FC__AISETTLER_H
#include "city.h"
+#include "fc_types.h"
#include "shared.h" /* bool type */
-struct player;
-struct tile;
struct ai_data;
struct citytile {
Index: client/gui-ftwl/gui_text.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-ftwl/gui_text.h,v
retrieving revision 1.4
diff -u -u -r1.4 gui_text.h
--- client/gui-ftwl/gui_text.h 25 Mar 2005 11:25:08 -0000 1.4
+++ client/gui-ftwl/gui_text.h 26 Mar 2005 10:26:18 -0000
@@ -14,9 +14,7 @@
#ifndef FC__GUI_TEXT_H
#define FC__GUI_TEXT_H
-struct tile;
-struct unit;
-struct city;
+#include "fc_types.h"
const char *mapview_get_terrain_tooltip_text(struct tile *ptile);
const char *mapview_get_unit_action_tooltip(struct unit *punit,
Index: client/gui-gtk-2.0/cma_fe.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/cma_fe.h,v
retrieving revision 1.6
diff -u -u -r1.6 cma_fe.h
--- client/gui-gtk-2.0/cma_fe.h 2 Feb 2005 02:15:35 -0000 1.6
+++ client/gui-gtk-2.0/cma_fe.h 26 Mar 2005 10:26:18 -0000
@@ -16,9 +16,9 @@
#include <gtk/gtk.h>
-#include "cma_core.h"
+#include "fc_types.h"
-struct city;
+#include "cma_core.h"
enum cma_refresh {
REFRESH_ALL,
Index: client/gui-gtk-2.0/dialogs.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.h,v
retrieving revision 1.7
diff -u -u -r1.7 dialogs.h
--- client/gui-gtk-2.0/dialogs.h 13 Nov 2004 23:35:49 -0000 1.7
+++ client/gui-gtk-2.0/dialogs.h 26 Mar 2005 10:26:18 -0000
@@ -15,9 +15,9 @@
#include <gtk/gtk.h>
-#include "dialogs_g.h"
+#include "fcintl.h"
-struct tile;
+#include "dialogs_g.h"
void popup_revolution_dialog(int government);
void message_dialog_button_set_sensitive(GtkWidget *shl, int button,
Index: client/gui-gtk-2.0/mapctrl.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapctrl.h,v
retrieving revision 1.8
diff -u -u -r1.8 mapctrl.h
--- client/gui-gtk-2.0/mapctrl.h 14 Nov 2003 12:26:57 -0000 1.8
+++ client/gui-gtk-2.0/mapctrl.h 26 Mar 2005 10:26:18 -0000
@@ -15,9 +15,9 @@
#include <gtk/gtk.h>
-#include "mapctrl_g.h"
+#include "fc_types.h"
-struct unit;
+#include "mapctrl_g.h"
void key_city_workers(GtkWidget *w, GdkEventKey *ev);
Index: client/gui-gtk-2.0/mapview.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.h,v
retrieving revision 1.20
diff -u -u -r1.20 mapview.h
--- client/gui-gtk-2.0/mapview.h 23 Mar 2005 18:13:21 -0000 1.20
+++ client/gui-gtk-2.0/mapview.h 26 Mar 2005 10:26:18 -0000
@@ -15,6 +15,8 @@
#include <gtk/gtk.h>
+#include "fc_types.h"
+
#include "gtkpixcomm.h"
#include "citydlg_common.h"
@@ -24,9 +26,6 @@
#include "canvas.h"
#include "graphics.h"
-struct unit;
-struct city;
-
GdkPixbuf *get_thumb_pixbuf(int onoff);
gboolean overview_canvas_expose(GtkWidget *w, GdkEventExpose *ev, gpointer
data);
Index: client/gui-sdl/cma_fe.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/cma_fe.h,v
retrieving revision 1.2
diff -u -u -r1.2 cma_fe.h
--- client/gui-sdl/cma_fe.h 7 Jul 2003 20:15:31 -0000 1.2
+++ client/gui-sdl/cma_fe.h 26 Mar 2005 10:26:18 -0000
@@ -14,9 +14,9 @@
#ifndef FC__SDL_CMA_H
#define FC__SDL_CMA_H
-#include "cma_core.h"
+#include "fc_types.h"
-struct city;
+#include "cma_core.h"
void update_city_cma_dialog(void);
void popup_city_cma_dialog(struct city *pCity);
Index: client/gui-sdl/dialogs.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/dialogs.h,v
retrieving revision 1.10
diff -u -u -r1.10 dialogs.h
--- client/gui-sdl/dialogs.h 20 Nov 2004 21:27:17 -0000 1.10
+++ client/gui-sdl/dialogs.h 26 Mar 2005 10:26:18 -0000
@@ -22,10 +22,10 @@
#ifndef FC__DIALOGS_H
#define FC__DIALOGS_H
+#include "fcintl.h"
#include "dialogs_g.h"
-struct tile;
struct GUI;
void popup_advanced_terrain_dialog(int x , int y);
Index: client/gui-sdl/gui_stuff.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/gui_stuff.h,v
retrieving revision 1.26
diff -u -u -r1.26 gui_stuff.h
--- client/gui-sdl/gui_stuff.h 20 Nov 2004 21:27:18 -0000 1.26
+++ client/gui-sdl/gui_stuff.h 26 Mar 2005 10:26:19 -0000
@@ -22,6 +22,8 @@
#ifndef FC__GUI_STUFF_H
#define FC__GUI_STUFF_H
+#include "fc_types.h"
+
#include "gui_mem.h"
#define WINDOW_TILE_HIGH 20
@@ -96,10 +98,6 @@
ED_FORCE_EXIT = 4
};
-struct city;
-struct unit;
-struct player;
-
struct CONTAINER {
int id0;
int id1;
Index: client/gui-sdl/mapctrl.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/mapctrl.h,v
retrieving revision 1.8
diff -u -u -r1.8 mapctrl.h
--- client/gui-sdl/mapctrl.h 20 Nov 2004 21:27:18 -0000 1.8
+++ client/gui-sdl/mapctrl.h 26 Mar 2005 10:26:19 -0000
@@ -22,9 +22,9 @@
#ifndef FC__MAPCTRL_H
#define FC__MAPCTRL_H
-#include "mapctrl_g.h"
+#include "fc_types.h"
-struct unit;
+#include "mapctrl_g.h"
#define BLOCK_W 30
#define HIDDEN_UNITS_W 36 /* BLOCK_W + DOUBLE_FRAME_WH */
Index: client/gui-sdl/mapview.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/mapview.h,v
retrieving revision 1.16
diff -u -u -r1.16 mapview.h
--- client/gui-sdl/mapview.h 10 Feb 2005 18:35:17 -0000 1.16
+++ client/gui-sdl/mapview.h 26 Mar 2005 10:26:19 -0000
@@ -22,12 +22,11 @@
#ifndef FC__MAPVIEW_H
#define FC__MAPVIEW_H
+#include "fc_types.h"
+
#include "mapview_g.h"
#include "mapview_common.h"
-struct unit;
-struct city;
-
void center_minimap_on_minimap_window(void);
void tmp_map_surfaces_init(void);
void redraw_unit_info_label(struct unit *pUnit);
Index: client/gui-xaw/dialogs.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/dialogs.h,v
retrieving revision 1.9
diff -u -u -r1.9 dialogs.h
--- client/gui-xaw/dialogs.h 17 Nov 2004 19:31:14 -0000 1.9
+++ client/gui-xaw/dialogs.h 26 Mar 2005 10:26:19 -0000
@@ -15,9 +15,9 @@
#include <X11/Intrinsic.h>
-#include "dialogs_g.h"
+#include "fcintl.h"
-struct tile;
+#include "dialogs_g.h"
void popup_revolution_dialog(int government);
Widget popup_message_dialog(Widget parent, const char *shellname,
Index: client/gui-xaw/mapview.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.h,v
retrieving revision 1.24
diff -u -u -r1.24 mapview.h
--- client/gui-xaw/mapview.h 10 Jul 2004 18:48:19 -0000 1.24
+++ client/gui-xaw/mapview.h 26 Mar 2005 10:26:19 -0000
@@ -15,15 +15,14 @@
#include <X11/Intrinsic.h>
+#include "fc_types.h"
+
#include "mapview_g.h"
#include "citydlg_common.h"
#include "graphics.h"
-struct unit;
-struct city;
-
Pixmap get_thumb_pixmap(int onoff);
Pixmap get_citizen_pixmap(struct citizen_type type, int cnum,
struct city *pcity);
Index: client/gui-xaw/wldlg.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/wldlg.h,v
retrieving revision 1.2
diff -u -u -r1.2 wldlg.h
--- client/gui-xaw/wldlg.h 15 Jan 2002 19:01:39 -0000 1.2
+++ client/gui-xaw/wldlg.h 26 Mar 2005 10:26:19 -0000
@@ -15,9 +15,7 @@
#include <X11/Intrinsic.h>
-struct worklist;
-struct player;
-struct city;
+#include "fc_types.h"
typedef void (*WorklistOkCallback) (struct worklist *pwl, void *data);
typedef void (*WorklistCancelCallback) (void *data);
Index: common/aicore/citymap.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/citymap.h,v
retrieving revision 1.6
diff -u -u -r1.6 citymap.h
--- common/aicore/citymap.h 25 Mar 2005 10:20:49 -0000 1.6
+++ common/aicore/citymap.h 26 Mar 2005 10:26:19 -0000
@@ -14,12 +14,10 @@
#define FC__CITYMAP_H
#include "fcintl.h"
+#include "fc_types.h"
#include "shared.h" /* bool type */
-struct tile;
-struct player;
-
void citymap_turn_init(struct player *pplayer);
void citymap_reserve_city_spot(struct tile *ptile, int id);
void citymap_free_city_spot(struct tile *ptile, int id);
Index: server/generator/mapgen_topology.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/mapgen_topology.h,v
retrieving revision 1.6
diff -u -u -r1.6 mapgen_topology.h
--- server/generator/mapgen_topology.h 25 Mar 2005 10:20:49 -0000 1.6
+++ server/generator/mapgen_topology.h 26 Mar 2005 10:26:19 -0000
@@ -13,10 +13,9 @@
#ifndef FC__MAPGEN_TOPOLOGY_H
#define FC__MAPGEN_TOPOLOGY_H
+#include "fcintl.h"
#include "shared.h" /* bool type */
-struct tile;
-
/* this is the maximal colatitude at equators returned by
map_colatitude */
Index: server/generator/temperature_map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/temperature_map.h,v
retrieving revision 1.4
diff -u -u -r1.4 temperature_map.h
--- server/generator/temperature_map.h 25 Mar 2005 10:20:49 -0000 1.4
+++ server/generator/temperature_map.h 26 Mar 2005 10:26:19 -0000
@@ -13,10 +13,9 @@
#ifndef FC__TEMPERATURE_MAP_H
#define FC__TEMPERATURE_MAP_H
+#include "fcintl.h"
#include "shared.h" /* bool type */
-struct tile;
-
/*
* temperature_map[] stores the temperature of each tile
* values on tmap can get one of these 4 values
Index: server/generator/utilities.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/utilities.h,v
retrieving revision 1.6
diff -u -u -r1.6 utilities.h
--- server/generator/utilities.h 25 Mar 2005 10:20:49 -0000 1.6
+++ server/generator/utilities.h 26 Mar 2005 10:26:20 -0000
@@ -13,10 +13,9 @@
#ifndef FC__UTILITIES_H
#define FC__UTILITIES_H
+#include "fcintl.h"
#include "shared.h" /* bool type */
-struct tile;
-
/* Provide a block to convert from native to map coordinates. For instance
* do_in_map_pos(mx, my, xn, yn) {
* map_set_terrain(mx, my, T_OCEAN);
|
|