Author: sveinung
Date: Sun May 21 11:32:52 2017
New Revision: 35681

URL: http://svn.gna.org/viewcvs/freeciv?rev=35681&view=rev
Log:
Move tools_fc_interface.[c|h] to tools/shared.

Use it to form a new library, libtoolsshared, for stuff otherwise unrelated
(by task) tools may need.

See hrm Feature #661963

Added:
    branches/S3_0/tools/shared/
    branches/S3_0/tools/shared/Makefile.am
    branches/S3_0/tools/shared/tools_fc_interface.c
      - copied, changed from r35679, branches/S3_0/tools/tools_fc_interface.c
    branches/S3_0/tools/shared/tools_fc_interface.h
      - copied, changed from r35679, branches/S3_0/tools/tools_fc_interface.h
Removed:
    branches/S3_0/tools/tools_fc_interface.c
    branches/S3_0/tools/tools_fc_interface.h
Modified:
    branches/S3_0/configure.ac
    branches/S3_0/tools/Makefile.am

Modified: branches/S3_0/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/configure.ac?rev=35681&r1=35680&r2=35681&view=diff
==============================================================================
--- branches/S3_0/configure.ac  (original)
+++ branches/S3_0/configure.ac  Sun May 21 11:32:52 2017
@@ -1776,6 +1776,7 @@
           tools/Makefile
           tools/ruledit/Makefile
           tools/ruleutil/Makefile
+          tools/shared/Makefile
           gen_headers/Makefile
           translations/Makefile
          translations/core/Makefile.in

Modified: branches/S3_0/tools/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/Makefile.am?rev=35681&r1=35680&r2=35681&view=diff
==============================================================================
--- branches/S3_0/tools/Makefile.am     (original)
+++ branches/S3_0/tools/Makefile.am     Sun May 21 11:32:52 2017
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = ruleutil
+SUBDIRS = shared ruleutil
 
 if RULEDIT
 SUBDIRS += ruledit
@@ -47,6 +47,7 @@
        -I$(top_srcdir)/client \
        -I$(top_srcdir)/client/include \
        -I$(top_srcdir)/tools/ruleutil \
+       -I$(top_srcdir)/tools/shared \
        -I$(top_srcdir)/dependencies/tinycthread
 
 AM_CPPFLAGS = $(common_cppflags)
@@ -94,8 +95,6 @@
 
 if FCMANUAL
 freeciv_manual_SOURCES =                                                   \
-               tools_fc_interface.c                                       \
-               tools_fc_interface.h                                       \
                civmanual.c
 
 freeciv_manual_LDFLAGS = $(GGZDMOD_LDFLAGS)
@@ -106,6 +105,7 @@
  $(top_builddir)/server/libfreeciv-srv.la \
  ../client/helpdata.lo \
  $(top_builddir)/common/libfreeciv.la \
+ $(top_builddir)/tools/shared/libtoolsshared.la \
  $(INTLLIBS) $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \
  $(SERVER_LIBS) $(LIB_GGZDMOD)
 endif

Added: branches/S3_0/tools/shared/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/shared/Makefile.am?rev=35681&view=auto
==============================================================================
--- branches/S3_0/tools/shared/Makefile.am      (added)
+++ branches/S3_0/tools/shared/Makefile.am      Sun May 21 11:32:52 2017
@@ -0,0 +1,14 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_LTLIBRARIES = libtoolsshared.la
+
+AM_CPPFLAGS =                                                              \
+        -I$(top_srcdir)/utility                                            \
+        -I$(top_srcdir)/common                                             \
+        -I$(top_srcdir)/common/networking                                  \
+        -I$(top_srcdir)/server                                             \
+        -I$(top_srcdir)/dependencies/tinycthread
+
+libtoolsshared_la_SOURCES =                                                \
+                tools_fc_interface.c                                       \
+                tools_fc_interface.h

Copied: branches/S3_0/tools/shared/tools_fc_interface.c (from r35679, 
branches/S3_0/tools/tools_fc_interface.c)
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/shared/tools_fc_interface.c?p2=branches/S3_0/tools/shared/tools_fc_interface.c&p1=branches/S3_0/tools/tools_fc_interface.c&r1=35679&r2=35681&rev=35681&view=diff
==============================================================================
    (empty)

Copied: branches/S3_0/tools/shared/tools_fc_interface.h (from r35679, 
branches/S3_0/tools/tools_fc_interface.h)
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/shared/tools_fc_interface.h?p2=branches/S3_0/tools/shared/tools_fc_interface.h&p1=branches/S3_0/tools/tools_fc_interface.h&r1=35679&r2=35681&rev=35681&view=diff
==============================================================================
    (empty)

Removed: branches/S3_0/tools/tools_fc_interface.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/tools_fc_interface.c?rev=35680&view=auto
==============================================================================
--- branches/S3_0/tools/tools_fc_interface.c    (original)
+++ branches/S3_0/tools/tools_fc_interface.c    (removed)
@@ -1,78 +0,0 @@
-/***********************************************************************
- Freeciv - Copyright (C) 2017 - Freeciv Development Team
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-***********************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <fc_config.h>
-#endif
-
-/* common */
-#include "fc_interface.h"
-
-/* server */
-#include "srv_main.h"
-
-
-#include "tools_fc_interface.h"
-
-
-/***************************************************************************
-  Unused but required by fc_interface_init()
-***************************************************************************/
-static bool tool_player_tile_vision_get(const struct tile *ptile,
-                                        const struct player *pplayer,
-                                        enum vision_layer vision)
-{
-  log_error("Assumed unused function %s called.",  __FUNCTION__);
-  return FALSE;
-}
-
-/***************************************************************************
-  Unused but required by fc_interface_init()
-***************************************************************************/
-static int tool_player_tile_city_id_get(const struct tile *ptile,
-                                        const struct player *pplayer)
-{
-  log_error("Assumed unused function %s called.",  __FUNCTION__);
-  return IDENTITY_NUMBER_ZERO;
-}
-
-/***************************************************************************
-  Unused but required by fc_interface_init()
-***************************************************************************/
-static void tool_gui_color_free(struct color *pcolor)
-{
-  log_error("Assumed unused function %s called.",  __FUNCTION__);
-}
-
-/***************************************************************
-  Initialize tool specific functions.
-***************************************************************/
-void fc_interface_init_tool(void)
-{
-  struct functions *funcs = fc_interface_funcs();
-
-  /* May be used when generating help texts */
-  funcs->server_setting_by_name = server_ss_by_name;
-  funcs->server_setting_name_get = server_ss_name_get;
-  funcs->server_setting_type_get = server_ss_type_get;
-  funcs->server_setting_val_bool_get = server_ss_val_bool_get;
-
-  /* Not used. Set to dummy functions. */
-  funcs->player_tile_vision_get = tool_player_tile_vision_get;
-  funcs->player_tile_city_id_get = tool_player_tile_city_id_get;
-  funcs->gui_color_free = tool_gui_color_free;
-
-  /* Keep this function call at the end. It checks if all required functions
-     are defined. */
-  fc_interface_init();
-}

Removed: branches/S3_0/tools/tools_fc_interface.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/tools/tools_fc_interface.h?rev=35680&view=auto
==============================================================================
--- branches/S3_0/tools/tools_fc_interface.h    (original)
+++ branches/S3_0/tools/tools_fc_interface.h    (removed)
@@ -1,27 +0,0 @@
-/***********************************************************************
- Freeciv - Copyright (C) 2017 - Freeciv Development Team
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-***********************************************************************/
-
-#ifndef FC_TOOLS_FC_INTERFACE_H
-#define FC_TOOLS_FC_INTERFACE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-void fc_interface_init_tool(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* FC_TOOLS_FC_INTERFACE_H */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to