Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8652) Cleanup sys-includes
Home

[Freeciv-Dev] Re: (PR#8652) Cleanup sys-includes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8652) Cleanup sys-includes
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 2 May 2004 06:17:07 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Sun, May 02, 2004 at 05:55:25AM -0700, Raimar Falke wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8652 >
> 
> 
> The attached script matches the used functions with the included files
> and reports missing and unneeded includes. The attached patch fixes
> the most obvious problems for common/ (the old one) and ai/.
> 
> Without objections I will apply the patch soon.

And the patch for client/* and common/aicore/*

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I heard if you play the NT-4.0-CD backwards, you get a satanic message."
 "That's nothing, if you play it forward, it installs NT-4.0"

Index: client/attribute.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/attribute.c,v
retrieving revision 1.18
diff -u -u -r1.18 attribute.c
--- client/attribute.c  4 Apr 2003 15:47:45 -0000       1.18
+++ client/attribute.c  2 May 2004 13:13:25 -0000
@@ -16,7 +16,6 @@
 #endif
 
 #include <assert.h>
-#include <string.h>
 
 #include "dataio.h"
 #include "fcintl.h"
Index: client/audio_alsa.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/audio_alsa.c,v
retrieving revision 1.2
diff -u -u -r1.2 audio_alsa.c
--- client/audio_alsa.c 19 Apr 2004 21:40:39 -0000      1.2
+++ client/audio_alsa.c 2 May 2004 13:13:25 -0000
@@ -15,8 +15,6 @@
 #include <config.h>
 #endif
 
-#include <unistd.h>
-
 #include <audiofile.h>
 #include <alsa/asoundlib.h>
 
Index: client/audio_esd.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/audio_esd.c,v
retrieving revision 1.4
diff -u -u -r1.4 audio_esd.c
--- client/audio_esd.c  4 Apr 2003 15:47:45 -0000       1.4
+++ client/audio_esd.c  2 May 2004 13:13:26 -0000
@@ -15,7 +15,6 @@
 #include <config.h>
 #endif
 
-#include <assert.h>
 #include <string.h>
 #include <unistd.h>            /* close */
 
Index: client/audio_sdl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/audio_sdl.c,v
retrieving revision 1.6
diff -u -u -r1.6 audio_sdl.c
--- client/audio_sdl.c  4 Apr 2003 15:47:45 -0000       1.6
+++ client/audio_sdl.c  2 May 2004 13:13:26 -0000
@@ -15,7 +15,6 @@
 #include <config.h>
 #endif
 
-#include <assert.h>
 #include <string.h>
 
 #include <SDL.h>
Index: client/audio_winmm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/audio_winmm.c,v
retrieving revision 1.7
diff -u -u -r1.7 audio_winmm.c
--- client/audio_winmm.c        29 May 2003 13:24:57 -0000      1.7
+++ client/audio_winmm.c        2 May 2004 13:13:26 -0000
@@ -15,8 +15,6 @@
 #include <config.h>
 #endif
 
-#include <assert.h>
-#include <string.h>
 /************************************************************************* 
  This two includes are misordered, but it does not compile otherwise
 *************************************************************************/
Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.31
diff -u -u -r1.31 citydlg_common.c
--- client/citydlg_common.c     4 Apr 2004 14:49:09 -0000       1.31
+++ client/citydlg_common.c     2 May 2004 13:13:26 -0000
@@ -15,6 +15,8 @@
 #include <config.h>
 #endif
 
+#include <assert.h>
+
 #include "city.h"
 #include "fcintl.h"
 #include "log.h"
Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.187
diff -u -u -r1.187 civclient.c
--- client/civclient.c  21 Apr 2004 19:46:37 -0000      1.187
+++ client/civclient.c  2 May 2004 13:13:26 -0000
@@ -18,18 +18,7 @@
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <time.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_WINSOCK
-#include <winsock.h>
-#endif
 
 #include "capstr.h"
 #include "diptreaty.h"
Index: client/climisc.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/climisc.c,v
retrieving revision 1.133
diff -u -u -r1.133 climisc.c
--- client/climisc.c    1 May 2004 03:34:57 -0000       1.133
+++ client/climisc.c    2 May 2004 13:13:27 -0000
@@ -26,10 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "city.h"
 #include "diptreaty.h"
 #include "fcintl.h"
Index: client/connectdlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/connectdlg_common.c,v
retrieving revision 1.10
diff -u -u -r1.10 connectdlg_common.c
--- client/connectdlg_common.c  25 Apr 2004 19:03:40 -0000      1.10
+++ client/connectdlg_common.c  2 May 2004 13:13:27 -0000
@@ -13,12 +13,11 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-  
+
+#include <assert.h>  
 #include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
-#include <signal.h>
 #include <time.h>
 
 #ifdef HAVE_SYS_SOCKET_H
Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.134
diff -u -u -r1.134 control.c
--- client/control.c    16 Apr 2004 17:27:08 -0000      1.134
+++ client/control.c    2 May 2004 13:13:27 -0000
@@ -16,7 +16,6 @@
 #endif
 
 #include <assert.h>
-#include <stdio.h>
 
 #include "fcintl.h"
 #include "log.h"
Index: client/mapctrl_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapctrl_common.c,v
retrieving revision 1.34
diff -u -u -r1.34 mapctrl_common.c
--- client/mapctrl_common.c     23 Apr 2004 22:58:05 -0000      1.34
+++ client/mapctrl_common.c     2 May 2004 13:13:28 -0000
@@ -16,7 +16,7 @@
 #endif
 
 #include <assert.h>
-#include <stdarg.h>
+#include <stdlib.h>            /* qsort */
 
 #include "combat.h"
 #include "fcintl.h"
Index: client/messagewin_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/messagewin_common.c,v
retrieving revision 1.13
diff -u -u -r1.13 messagewin_common.c
--- client/messagewin_common.c  28 Nov 2003 17:37:19 -0000      1.13
+++ client/messagewin_common.c  2 May 2004 13:13:28 -0000
@@ -19,6 +19,7 @@
 #include <string.h>
 
 #include "fcintl.h"
+#include "map.h"
 #include "mem.h"
 
 #include "citydlg_g.h"
Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.98
diff -u -u -r1.98 options.c
--- client/options.c    22 Apr 2004 02:15:38 -0000      1.98
+++ client/options.c    2 May 2004 13:13:28 -0000
@@ -16,8 +16,6 @@
 #endif
 
 #include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.363
diff -u -u -r1.363 packhand.c
--- client/packhand.c   28 Apr 2004 00:54:24 -0000      1.363
+++ client/packhand.c   2 May 2004 13:13:29 -0000
@@ -16,12 +16,7 @@
 #endif
 
 #include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
 
 #include "capability.h"
 #include "capstr.h"
Index: client/repodlgs_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/repodlgs_common.c,v
retrieving revision 1.9
diff -u -u -r1.9 repodlgs_common.c
--- client/repodlgs_common.c    24 Apr 2004 17:32:47 -0000      1.9
+++ client/repodlgs_common.c    2 May 2004 13:13:30 -0000
@@ -19,6 +19,7 @@
 
 #include "game.h"
 #include "government.h"
+#include "mem.h"               /* free */
 
 #include "repodlgs_g.h"
 
Index: client/text.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/text.c,v
retrieving revision 1.1
diff -u -u -r1.1 text.c
--- client/text.c       23 Apr 2004 22:58:05 -0000      1.1
+++ client/text.c       2 May 2004 13:13:30 -0000
@@ -17,6 +17,7 @@
 
 #include <assert.h>
 #include <stdarg.h>
+#include <string.h>
 
 #include "map.h"
 #include "combat.h"
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.165
diff -u -u -r1.165 tilespec.c
--- client/tilespec.c   29 Apr 2004 15:11:32 -0000      1.165
+++ client/tilespec.c   2 May 2004 13:13:31 -0000
@@ -22,8 +22,8 @@
 #endif
 
 #include <assert.h>
-#include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>            /* exit */
 #include <string.h>
 
 #include "astring.h"
Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.20
diff -u -u -r1.20 cm.c
--- common/aicore/cm.c  26 Feb 2004 04:05:10 -0000      1.20
+++ common/aicore/cm.c  2 May 2004 13:13:32 -0000
@@ -17,6 +17,7 @@
 
 #include <assert.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "city.h"
 #include "fcintl.h"
Index: common/aicore/path_finding.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/path_finding.c,v
retrieving revision 1.18
diff -u -u -r1.18 path_finding.c
--- common/aicore/path_finding.c        19 Jan 2004 06:01:22 -0000      1.18
+++ common/aicore/path_finding.c        2 May 2004 13:13:32 -0000
@@ -16,7 +16,6 @@
 #endif
 
 #include <assert.h>
-#include <string.h>
 
 #include "game.h"
 #include "log.h"
Index: common/aicore/pf_tools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/pf_tools.c,v
retrieving revision 1.13
diff -u -u -r1.13 pf_tools.c
--- common/aicore/pf_tools.c    29 Apr 2004 19:59:21 -0000      1.13
+++ common/aicore/pf_tools.c    2 May 2004 13:13:33 -0000
@@ -15,6 +15,7 @@
 #include <config.h>
 #endif
 
+#include <assert.h>
 #include <string.h>
 
 #include "mem.h"

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#8652) Cleanup sys-includes, Raimar Falke <=