Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/
Home

[Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 30 Apr 2004 16:44:33 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Wed, 28 Apr 2004, Per I. Mathisen wrote:
> A few changes need be done to shared.c, but nothing big.

Patch one moves population function into city.c, second patch moves motto
into version.c

split1.diff adds the compile info for the split into common/ and utility/.

  - Per

Index: Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/Makefile.am,v
retrieving revision 1.37
diff -u -r1.37 Makefile.am
--- Makefile.am 27 Apr 2004 04:10:23 -0000      1.37
+++ Makefile.am 30 Apr 2004 23:42:56 -0000
@@ -19,7 +19,7 @@
 endif
 
 
-SUBDIRS=       $(DSUBDIRS) intl common tests $(SSUBDIRS) $(CSUBDIRS) po doc
+SUBDIRS=       $(DSUBDIRS) intl utility common tests $(SSUBDIRS) $(CSUBDIRS) 
po doc
 
 EXTRA_DIST=    acconfig.old                    \
                autogen.sh                      \
Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.63
diff -u -r1.63 configure.ac
--- configure.ac        29 Apr 2004 05:37:14 -0000      1.63
+++ configure.ac        30 Apr 2004 23:42:56 -0000
@@ -683,6 +683,7 @@
          data/scenario/Makefile 
          data/nation/Makefile 
          data/history/Makefile 
+         utility/Makefile
          common/Makefile 
          common/aicore/Makefile 
          ai/Makefile 
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.239
diff -u -r1.239 configure.in
--- configure.in        29 Apr 2004 05:37:14 -0000      1.239
+++ configure.in        30 Apr 2004 23:42:57 -0000
@@ -669,6 +669,7 @@
          data/scenario/Makefile 
          data/nation/Makefile 
          data/history/Makefile 
+         utility/Makefile
          common/Makefile 
           common/aicore/Makefile
          ai/Makefile 
Index: ai/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/Makefile.am,v
retrieving revision 1.16
diff -u -r1.16 Makefile.am
--- ai/Makefile.am      29 Apr 2004 19:59:21 -0000      1.16
+++ ai/Makefile.am      30 Apr 2004 23:42:57 -0000
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libcivai.a
 
-INCLUDES = -I$(srcdir)/../common -I$(srcdir)/../server -I../intl 
-I$(top_srcdir)/common/aicore
+INCLUDES = -I$(top_srcdir)/utility -I$(srcdir)/../common -I$(srcdir)/../server 
-I../intl -I$(top_srcdir)/common/aicore
 
 ## Above, note -I../intl instead of -I$(top_srdir/intl) is deliberate.
 
Index: client/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/Makefile.am,v
retrieving revision 1.56
diff -u -r1.56 Makefile.am
--- client/Makefile.am  23 Apr 2004 22:58:05 -0000      1.56
+++ client/Makefile.am  30 Apr 2004 23:42:57 -0000
@@ -134,7 +134,7 @@
 
 bin_PROGRAMS = civclient
 
-INCLUDES = -I$(srcdir)/include -I$(top_srcdir)/common 
-I$(top_srcdir)/common/aicore -I../intl -I$(srcdir)/agents @SOUND_CFLAGS@
+INCLUDES = -I$(top_srcdir)/utility -I$(srcdir)/include -I$(top_srcdir)/common 
-I$(top_srcdir)/common/aicore -I../intl -I$(srcdir)/agents @SOUND_CFLAGS@
 
 ## Above, note -I../intl instead of -I$(top_srdir/intl) is deliberate.
 
@@ -190,10 +190,11 @@
 
 civclient_LDFLAGS = @CLIENT_LDFLAGS@
 civclient_DEPENDENCIES = @gui_sources@/libguiclient.a \
-       ../common/libcivcommon.a agents/libagents.a \
+       ../utility/libcivutility.a ../common/libcivcommon.a agents/libagents.a \
         ../common/aicore/libaicore.a
 
 civclient_LDADD        = @gui_sources@/libguiclient.a \
        @INTLLIBS@ ../common/aicore/libaicore.a \
-        ../common/libcivcommon.a agents/libagents.a 
../common/aicore/libaicore.a \
+        ../utility/libcivutility.a ../common/libcivcommon.a \
+        agents/libagents.a ../common/aicore/libaicore.a \
        @CLIENT_LIBS@ @SOUND_LIBS@
Index: client/agents/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- client/agents/Makefile.am   14 Apr 2004 17:18:36 -0000      1.3
+++ client/agents/Makefile.am   30 Apr 2004 23:42:57 -0000
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libagents.a
 
-INCLUDES = -I. -I$(srcdir)/.. -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../include -I$(top_srcdir)/common -I../../intl 
-I$(srcdir)/../gui-gtk @CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../include -I$(top_srcdir)/utility -I$(top_srcdir)/common 
-I../../intl -I$(srcdir)/../gui-gtk @CLIENT_CFLAGS@
 
 libagents_a_SOURCES =          \
        agents.c                \
Index: client/gui-gtk/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- client/gui-gtk/Makefile.am  23 Feb 2003 14:11:14 -0000      1.17
+++ client/gui-gtk/Makefile.am  30 Apr 2004 23:42:58 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 noinst_LIBRARIES = libguiclient.a
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/common 
-I$(top_srcdir)/common/aicore -I../../intl -I$(srcdir)/../agents @CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(top_srcdir)/utility -I$(srcdir)/../include 
-I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I../../intl 
-I$(srcdir)/../agents @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir/intl) is deliberate.
 # The INCLUDES "-I." is so resources.c includes the locally generated 
Index: client/gui-gtk-2.0/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- client/gui-gtk-2.0/Makefile.am      23 Feb 2003 14:11:14 -0000      1.4
+++ client/gui-gtk-2.0/Makefile.am      30 Apr 2004 23:42:58 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 noinst_LIBRARIES = libguiclient.a
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/common 
-I$(top_srcdir)/common/aicore -I../../intl -I$(srcdir)/../agents @CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/utility 
-I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I../../intl 
-I$(srcdir)/../agents @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir/intl) is deliberate.
 # The INCLUDES "-I." is so resources.c includes the locally generated 
Index: client/gui-sdl/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- client/gui-sdl/Makefile.am  8 May 2003 03:24:44 -0000       1.6
+++ client/gui-sdl/Makefile.am  30 Apr 2004 23:42:59 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 noinst_LIBRARIES = libguiclient.a
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/common 
-I$(top_srcdir)/common/aicore -I../../intl -I$(srcdir)/../agents @CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/utility 
-I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I../../intl 
-I$(srcdir)/../agents @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir/intl) is deliberate.
 # The INCLUDES "-I." is so resources.c includes the locally generated 
Index: client/gui-stub/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-stub/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- client/gui-stub/Makefile.am 23 Feb 2003 14:11:14 -0000      1.3
+++ client/gui-stub/Makefile.am 30 Apr 2004 23:42:59 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 noinst_LIBRARIES = libguiclient.a
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/common 
-I../../intl @CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/utility 
-I$(top_srcdir)/common -I../../intl @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir)/intl is deliberate.
 
Index: client/gui-win32/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-win32/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- client/gui-win32/Makefile.am        3 Apr 2004 21:29:54 -0000       1.9
+++ client/gui-win32/Makefile.am        30 Apr 2004 23:42:59 -0000
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libguiclient.a
 
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../agents -I$(srcdir)/../include 
-I$(top_srcdir)/common/aicore -I$(top_srcdir)/common -I../../intl 
@CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../agents -I$(top_srcdir)/utility 
-I$(srcdir)/../include -I$(top_srcdir)/common/aicore -I$(top_srcdir)/common 
-I../../intl @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir)/intl is deliberate.
 
Index: client/gui-xaw/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/Makefile.am,v
retrieving revision 1.14
diff -u -r1.14 Makefile.am
--- client/gui-xaw/Makefile.am  28 Jul 2003 01:11:48 -0000      1.14
+++ client/gui-xaw/Makefile.am  30 Apr 2004 23:42:59 -0000
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 noinst_LIBRARIES = libguiclient.a
-INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/common 
-I../../intl -I$(top_srcdir)/common/aicore -I../../intl -I$(srcdir)/../agents 
@CLIENT_CFLAGS@
+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../include -I$(top_srcdir)/utility 
-I$(top_srcdir)/common -I../../intl -I$(top_srcdir)/common/aicore -I../../intl 
-I$(srcdir)/../agents @CLIENT_CFLAGS@
 
 ## Above, note -I../../intl instead of -I$(top_srdir/intl) is deliberate.
 # The INCLUDES "-I." is so resources.c includes the locally generated 
Index: common/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/Makefile.am,v
retrieving revision 1.49
diff -u -r1.49 Makefile.am
--- common/Makefile.am  13 Feb 2004 07:57:58 -0000      1.49
+++ common/Makefile.am  30 Apr 2004 23:43:00 -0000
@@ -4,15 +4,11 @@
 
 noinst_LIBRARIES = libcivcommon.a
 
-INCLUDES = -I../intl -I$(srcdir)/aicore
+INCLUDES = -I../intl -I$(top_srcdir)/utility -I$(srcdir)/aicore
 
-## Above, note -I../intl instead of -I$(top_srdir/intl) is deliberate.
+## Above, note -I../intl instead of -I$(top_srcdir/intl) is deliberate.
 
 libcivcommon_a_SOURCES = \
-               astring.c       \
-               astring.h       \
-               capability.c    \
-               capability.h    \
                capstr.c        \
                capstr.h        \
                city.c          \
@@ -28,33 +24,19 @@
                effects.c       \
                effects.h       \
                events.h        \
-               fcintl.c        \
-               fcintl.h        \
                game.c          \
                game.h          \
                generate_packets.py \
-               genlist.c       \
-               genlist.h       \
                government.c    \
                government.h    \
-               hash.c          \
-               hash.h          \
                idex.c          \
                idex.h          \
                improvement.c   \
                improvement.h   \
-               inputfile.c     \
-               inputfile.h     \
-               ioz.c           \
-               ioz.h           \
-               log.c           \
-               log.h           \
                map.c           \
                map.h           \
                nation.c        \
                nation.h        \
-               netintf.c       \
-               netintf.h       \
                packets.c       \
                packets.h       \
                packets_gen.c   \
@@ -62,32 +44,12 @@
                packets.def     \
                player.c        \
                player.h        \
-               pqueue.c        \
-               pqueue.h        \
-               mem.c           \
-               mem.h           \
-               rand.c          \
-               rand.h          \
-               registry.c      \
-               registry.h      \
-               sbuffer.c       \
-               sbuffer.h       \
-               shared.c        \
-               shared.h        \
                spaceship.c     \
                spaceship.h     \
-               speclist.h      \
-               speclist_c.h    \
-               specvec.h       \
-               specvec_c.h     \
-               support.c       \
-               support.h       \
                tech.c          \
                tech.h          \
                terrain.c       \
                terrain.h       \
-               timing.c        \
-               timing.h        \
                unit.c          \
                unit.h          \
                unittype.c      \
@@ -100,3 +62,7 @@
 BUILT_SOURCES = packets_gen.c packets_gen.h
 packets_gen.h packets_gen.c: packets.def generate_packets.py
        ./generate_packets.py
+
+#libcivcommon_a_DEPENDENCIES = ../utility/libcivutility.a
+#libcivcommon_a_LIBADD       = ../utility/libcivutility.a
+
Index: common/aicore/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/Makefile.am,v
retrieving revision 1.5
diff -u -r1.5 Makefile.am
--- common/aicore/Makefile.am   8 Aug 2003 22:11:42 -0000       1.5
+++ common/aicore/Makefile.am   30 Apr 2004 23:43:00 -0000
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libaicore.a
 
-INCLUDES = -I.. -I$(top_srcdir)/common -I../../intl
+INCLUDES = -I$(top_srcdir)/utility -I.. -I$(top_srcdir)/common -I../../intl
 
 libaicore_a_SOURCES =          \
        aisupport.c             \
Index: server/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/Makefile.am,v
retrieving revision 1.32
diff -u -r1.32 Makefile.am
--- server/Makefile.am  6 Dec 2003 19:23:51 -0000       1.32
+++ server/Makefile.am  30 Apr 2004 23:43:03 -0000
@@ -4,7 +4,7 @@
 
 bin_PROGRAMS = civserver
 noinst_LIBRARIES = libcivserver.a
-INCLUDES = -I$(srcdir)/../common -I$(srcdir)/../ai -I../intl 
-I$(top_srcdir)/common/aicore -I$(srcdir)/userdb
+INCLUDES = -I$(top_srcdir)/utility -I$(srcdir)/../common -I$(srcdir)/../ai 
-I../intl -I$(top_srcdir)/common/aicore -I$(srcdir)/userdb
 
 ## Above, note -I../intl instead of -I$(top_srdir/intl) is deliberate.
 
@@ -76,6 +76,6 @@
                unittools.c     \
                unittools.h
 
-civserver_DEPENDENCIES = ../common/libcivcommon.a ../ai/libcivai.a 
./libcivserver.a ../common/aicore/libaicore.a $(USER_DB_DEP)
-civserver_LDADD        = ../common/libcivcommon.a ../ai/libcivai.a 
./libcivserver.a @INTLLIBS@ ../common/libcivcommon.a ../ai/libcivai.a 
./libcivserver.a ../common/aicore/libaicore.a $(USER_DB_LIB) $(SERVER_LIBS)
+civserver_DEPENDENCIES = ../utility/libcivutility.a ../common/libcivcommon.a 
../ai/libcivai.a ./libcivserver.a ../utility/libcivutility.a 
../common/aicore/libaicore.a $(USER_DB_DEP)
+civserver_LDADD        = ../utility/libcivutility.a ../common/libcivcommon.a 
../ai/libcivai.a ./libcivserver.a @INTLLIBS@ ../utility/libcivutility.a 
../common/libcivcommon.a ../ai/libcivai.a ./libcivserver.a 
../common/aicore/libaicore.a $(USER_DB_LIB) $(SERVER_LIBS)
 
Index: server/userdb/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/userdb/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- server/userdb/Makefile.am   12 Sep 2003 02:31:40 -0000      1.2
+++ server/userdb/Makefile.am   30 Apr 2004 23:43:03 -0000
@@ -2,7 +2,7 @@
 
 noinst_LIBRARIES = libuserdb.a
 
-INCLUDES = -I$(top_srcdir)/common
+INCLUDES = -I$(top_srcdir)/utility -I$(top_srcdir)/common
 
 libuserdb_a_SOURCES = \
        lockfile.c      \
Index: common/version.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/version.h,v
retrieving revision 1.52
diff -u -r1.52 version.h
--- common/version.h    28 Jul 2003 20:16:18 -0000      1.52
+++ common/version.h    30 Apr 2004 23:40:26 -0000
@@ -62,6 +62,8 @@
 const char *freeciv_name_version(void);
 const char *word_version(void);
 
+const char *freeciv_motto(void);
+
 /* If returns NULL, not a beta version. */
 const char *beta_message(void);
 
Index: common/version.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/version.c,v
retrieving revision 1.6
diff -u -r1.6 version.c
--- common/version.c    14 Nov 2002 09:15:03 -0000      1.6
+++ common/version.c    30 Apr 2004 23:40:26 -0000
@@ -90,3 +90,14 @@
   return NULL;
 #endif
 }
+
+/***************************************************************************
+  Return the Freeciv motto.
+  (The motto is common code:
+   only one instance of the string in the source;
+   only one time gettext needs to translate it. --jjm)
+***************************************************************************/
+const char *freeciv_motto(void)
+{
+  return _("'Cause civilization should be free!");
+}
Index: common/shared.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.c,v
retrieving revision 1.109
diff -u -r1.109 shared.c
--- common/shared.c     10 Apr 2004 01:40:17 -0000      1.109
+++ common/shared.c     30 Apr 2004 23:40:27 -0000
@@ -1257,17 +1257,6 @@
 }
 
 /***************************************************************************
-  Return the Freeciv motto.
-  (The motto is common code:
-   only one instance of the string in the source;
-   only one time gettext needs to translate it. --jjm)
-***************************************************************************/
-const char *freeciv_motto(void)
-{
-  return _("'Cause civilization should be free!");
-}
-
-/***************************************************************************
  Return whether two vectors: vec1 and vec2 have common
  bits. I.e. (vec1 & vec2) != 0.
 
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.124
diff -u -r1.124 shared.h
--- common/shared.h     10 Apr 2004 03:47:49 -0000      1.124
+++ common/shared.h     30 Apr 2004 23:40:27 -0000
@@ -233,8 +233,6 @@
                               const char *prefix,
                               int *ind_result);
 
-const char *freeciv_motto(void);
-
 char *get_multicast_group(void);
 
 #endif  /* FC__SHARED_H */
Index: common/shared.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.c,v
retrieving revision 1.109
diff -u -r1.109 shared.c
--- common/shared.c     10 Apr 2004 01:40:17 -0000      1.109
+++ common/shared.c     30 Apr 2004 23:37:15 -0000
@@ -280,7 +280,7 @@
   works for numbers >= zero.) The actually number used for the
   formatting is: nr*10^decade_exponent
 ***************************************************************/
-static const char *general_int_to_text(int nr, int decade_exponent)
+const char *general_int_to_text(int nr, int decade_exponent)
 {
   static char buf[64]; /* Note that we'll be filling this in right to left. */
   char *grp = grouping;
@@ -342,14 +342,6 @@
 const char *int_to_text(int nr)
 {
   return general_int_to_text(nr, 0);
-}
-
-/***************************************************************
-...
-***************************************************************/
-const char *population_to_text(int thousand_citizen)
-{
-  return general_int_to_text(thousand_citizen, 3);
 }
 
 /***************************************************************
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.124
diff -u -r1.124 shared.h
--- common/shared.h     10 Apr 2004 03:47:49 -0000      1.124
+++ common/shared.h     30 Apr 2004 23:37:15 -0000
@@ -170,8 +170,8 @@
 bool is_option(const char *option_name,char *option);
 int get_tokens(const char *str, char **tokens, size_t num_tokens,
               const char *delimiterset);
+const char *general_int_to_text(int nr, int decade_exponent);
 const char *int_to_text(int nr);
-const char *population_to_text(int thousand_citizen);
 
 bool is_sane_name(const char *name);
 const char *textyear(int year);
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.206
diff -u -r1.206 city.c
--- common/city.c       22 Apr 2004 22:58:28 -0000      1.206
+++ common/city.c       30 Apr 2004 23:37:17 -0000
@@ -461,6 +461,14 @@
   return pcity->size * (pcity->size + 1) * 5;
 }
 
+/***************************************************************
+...
+***************************************************************/
+const char *population_to_text(int thousand_citizen)
+{
+  return general_int_to_text(thousand_citizen, 3);
+}
+
 /**************************************************************************
 ...
 **************************************************************************/
Index: common/city.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.h,v
retrieving revision 1.141
diff -u -r1.141 city.h
--- common/city.h       22 Apr 2004 22:58:28 -0000      1.141
+++ common/city.h       30 Apr 2004 23:37:17 -0000
@@ -338,6 +338,7 @@
 
 struct player *city_owner(struct city *pcity);
 int city_population(struct city *pcity);
+const char *population_to_text(int thousand_citizen);
 int city_gold_surplus(struct city *pcity);
 int city_buy_cost(struct city *pcity);
 bool city_happy(struct city *pcity);  /* generally use celebrating instead */

[Prev in Thread] Current Thread [Next in Thread]