[Freeciv-Dev] (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] (PR#8615) RFC: Splitting common/ |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Wed, 28 Apr 2004 15:21:24 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8615 >
I want to split the common/ directory in two, one which remains common/
and one new directory which is renamed utility/ or something like that.
The first directory is for freeciv-specific code, while the latter is for
general purpose utility code which can have any number of uses.
The reason for this split is to better enable code reuse, which means
freeciv may get some freebies from other using our code. In addition,
splitting common/ leads to increased code readability (fewer files to wade
through, more logical where to find the right file).
Files in utility/:
astring.c capability.c fcintl.c genlist.c
hash.c inputfile.c ioz.c log.c
mem.c netintf.c pqueue.c rand.c
registry.c sbuffer.c shared.c support.c
timing.c
Files in common/:
capstr.c city.c combat.c connection.c
dataio.c diptreaty.c effects.c game.c
government.c idex.c improvement.c map.c
nation.c packets.c packets_gen.c player.c
spaceship.c tech.c terrain.c unit.c
unittype.c version.c worklist.c
A few changes need be done to shared.c, but nothing big. The
freeciv_motto() function should be moved into game.c, population_to_text()
should be moved to city.c, a few MAX_* definitions should be moved into
more appropriate headers (why are they here?), and a few strings made more
general or moved to autoconf.
The other files look quite clean.
We can copy the files in the cvs repository to preserve cvs history.
Eventually dataio.c should be generalized and moved over to utility/, but
now it contains several hard-coded exceptions (bad).
- Per
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#8615) RFC: Splitting common/,
Per I. Mathisen <=
|
|