xboard-devel
[Top][All Lists]
Advanced

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

Re: [XBoard-devel] theme packages


From: h . g . muller
Subject: Re: [XBoard-devel] theme packages
Date: Mon, 13 Jan 2014 11:39:49 +0100
User-agent: SquirrelMail

>> `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]