Author: sveinung
Date: Thu Apr 27 15:19:14 2017
New Revision: 35304
URL: http://svn.gna.org/viewcvs/freeciv?rev=35304&view=rev
Log:
Don't include server_settings.h in fc_interface.h
The fc_interface module needs the sset_type enum and the server_setting_id
type to provide its server setting access abstractions. But fc_interface is
supposed to be used where the client and the server does things differently
yet still needs a common interface. It is already used in many non server
setting related places.
Stop pulling in server_settings.h everywhere fc_interface.h is included.
Move the sset_type enum and the server_setting_id type to fc_types.h and
include them to fc_interface.h from there.
See hrm Feature #655355
Modified:
branches/S3_0/client/client_main.c
branches/S3_0/common/fc_interface.h
branches/S3_0/common/fc_types.h
branches/S3_0/common/server_settings.h
Modified: branches/S3_0/client/client_main.c
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/client_main.c?rev=35304&r1=35303&r2=35304&view=diff
==============================================================================
--- branches/S3_0/client/client_main.c (original)
+++ branches/S3_0/client/client_main.c Thu Apr 27 15:19:14 2017
@@ -57,6 +57,7 @@
#include "packets.h"
#include "player.h"
#include "research.h"
+#include "server_settings.h"
#include "version.h"
/* client/include */
Modified: branches/S3_0/common/fc_interface.h
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/fc_interface.h?rev=35304&r1=35303&r2=35304&view=diff
==============================================================================
--- branches/S3_0/common/fc_interface.h (original)
+++ branches/S3_0/common/fc_interface.h Thu Apr 27 15:19:14 2017
@@ -21,7 +21,7 @@
#include "support.h"
/* common */
-#include "server_settings.h"
+#include "fc_types.h"
#include "vision.h"
struct player;
Modified: branches/S3_0/common/fc_types.h
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/fc_types.h?rev=35304&r1=35303&r2=35304&view=diff
==============================================================================
--- branches/S3_0/common/fc_types.h (original)
+++ branches/S3_0/common/fc_types.h Thu Apr 27 15:19:14 2017
@@ -640,6 +640,19 @@
DIPLO_DISABLED,
};
+/* Server setting types. */
+#define SPECENUM_NAME sset_type
+#define SPECENUM_VALUE0 SST_BOOL
+#define SPECENUM_VALUE1 SST_INT
+#define SPECENUM_VALUE2 SST_STRING
+#define SPECENUM_VALUE3 SST_ENUM
+#define SPECENUM_VALUE4 SST_BITWISE
+#define SPECENUM_COUNT SST_COUNT
+#include "specenum_gen.h"
+
+/* Mark server setting id's. */
+typedef int server_setting_id;
+
/* Used in the network protocol. */
#define SPECENUM_NAME extra_category
#define SPECENUM_VALUE0 ECAT_INFRA
Modified: branches/S3_0/common/server_settings.h
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/server_settings.h?rev=35304&r1=35303&r2=35304&view=diff
==============================================================================
--- branches/S3_0/common/server_settings.h (original)
+++ branches/S3_0/common/server_settings.h Thu Apr 27 15:19:14 2017
@@ -18,21 +18,12 @@
extern "C" {
#endif /* __cplusplus */
-/* Server setting types. */
-#define SPECENUM_NAME sset_type
-#define SPECENUM_VALUE0 SST_BOOL
-#define SPECENUM_VALUE1 SST_INT
-#define SPECENUM_VALUE2 SST_STRING
-#define SPECENUM_VALUE3 SST_ENUM
-#define SPECENUM_VALUE4 SST_BITWISE
-#define SPECENUM_COUNT SST_COUNT
-#include "specenum_gen.h"
+/* common */
+#include "fc_types.h"
+
/* Special value to signal the absence of a server setting. */
#define SERVER_SETTING_NONE ((server_setting_id) -1)
-
-/* Mark server setting id's. */
-typedef int server_setting_id;
/* Pure server settings. */
_______________________________________________
Freeciv-commits mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-commits