Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2000:
[Freeciv-Dev] Re: --help
Home

[Freeciv-Dev] Re: --help

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Per.Inge.Mathisen@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: --help
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Wed, 19 Jan 2000 13:58:28 +1100 (EST)

Per Inge Mathisen wrote:

> I noticed that client/civclient.c and client/gui-*/gui_main.c both
> contain code to handle "--help". Not only is this redundant, it
> also produces some strange behaviour. 

I agree this is a bit of a mess and should be fixed.  
One complication to note is that the clients are not
actually the same in their option handling -- similar,
but not identical.  Its unclear whether its worth trying 
to make them identical, given that the command-line 
arguments are at some stage passed on to gui-dependent 
handling.  

One approach would be to have the gui-dep code provide a 
function (or functions) to print out the help text for 
that client.  That is, then the function could be called 
by the pre-gui-startup --help parsing code, to provide
appropriate/consistent --help for each client.)

(Another oddity of the current code is that the Xaw client
doesn't recognise --help or --version except as the
first argument.  I once had a script which prepended
'--tiles foo' to the arg list, and calling the script
with --help thus didn't work, which was annoying...)

-- David

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