Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: split server into library and main
Home

[Freeciv-Dev] Re: split server into library and main

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: split server into library and main
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Fri, 11 Aug 2000 18:05:17 +1000 (EST)

Jeff Mallatt <jjm@xxxxxxxxxxxx> wrote:
> At 2000/08/10 22:56 , David Pfitzner wrote:

> >Looks good, but is there a reason for moving most of civserver.c
> >to a new module (srv_main.c) instead of leaving most in civserver.c
> >and just moving main() to the new module?
> 
> Just a "minimal change" philosophy.  (Actually, srv_main is the old module
> (just renamed), and civserver is the new module made from a few parts of
> the old one.)  
> 
> I figured that if things continue to work after this change is committed,
> we can in the future migrate things that would be useless to utility
> programs out of srv_main.c into civserver.c -- in fact, we might want to
> migrate whole modules from the library to the program (what would a utility
> want with sernet.[hc]?).

Right, but I'm not disagreeing about the substance of the split, 
I'm disagreeing about the filenames of the two components which 
have been created from the split.

Your patch does:
   most of old civserver.c -> "srv_main.c", library libcivserver.a
   minimal main() -> "civserver.c", program which links to library

I'm suggesting:
   most of old civserver.c -> "civserver.c", library libcivserver.a
   minimal main() -> "(something.c)", program which links to library

(Unless there is some technical naming requirement I'm missing.)

If its just a naming preference, then either way doesn't actually
seem that clear:

- Your way it seems a bit perverse to me that a module named
  "srv_main.c" doesn't actually contain main()...

- My way civserver.c doesn't contain the main() for civserver(.exe), 
  but OTOH it does contain code for libcivserver.a, which seems not 
  unreasonable.

Of course the main motivation for my suggestion is simply that much 
less code gets moved around, but since thats a one-off thing its not 
that big a concern if there are reasons to do it your way.

-- David



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