xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] theme packages


From: Tim Mann
Subject: Re: [XBoard-devel] theme packages
Date: Mon, 13 Jan 2014 17:33:06 -0800

That seems fine. Possibly behind Arun's suggestion: I recall there are other programs around that have an option to dump all their build-time options in a nice format. This can be handy if you have a binary and you want to know how it was configured. The output is nice to have in bug reports if the program has a lot of build-time options. I can't remember what program I saw doing this, though.


On Mon, Jan 13, 2014 at 2:39 AM, <address@hidden> wrote:
>> `xboard --show-configure | awk '/Datadir:/ {print $2}` or something
>> similar.

Well, I don't like it so much that another program would have to be
invoked to filter the output. It seems that implementing this
--show-configure option would require to make up a list of names and
values for the various config parameters anyway, and we could implement it
just as easily that

xboard --show-configure Datadir

would print only the value of the parameter that we listed as "Datadir",
and would loop through the list, printing all elements together with their
listed names and separated by linefeeds if there was no second argument.

Which parameters would you like to be in the list, and how should they be
called?

typedef struct { char *name, *value; } ConfigParam;
ConfigParam list[] = {
 {"Datadir", DATADIR},
 ...
}

This could create a problem if DATADIR is #defined as a (char*) variable,
though, like it is in OS X. But that could be solved by using
(char[MSG_SIZ]) in stead, and copying the string returned by
get_bundle_path() as a pointer to this array.




reply via email to

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