Re: GOption & friends



On Mon, 21 Mar 2011 17:29:03 +0100
Colomban Wendling <lists ban herbesfolles org> wrote:

Ok... But if I put d: in getopt's arg list, I do expect an argument,
and -de is parsed as -d e. Why doesn't GOptionEntry, with a specified
G_OPTION_ARG_STRING do the same?

Don't know why, I'm no GLib developer nor never worried about it. But
how getopt handle arguments "d:e" if you give it "-de"? Does this mean
"-d -e" or "-d e"?
I'd think that GOption behavior is at least easier to understand.

Ah, well... If things were really easy to understand, we wouldn't need
mailing lists, would we?

getopt allows combining (-de meaning -d -e) if there are no possible
parameters (i.e., defined in the parameter list as "de").

If a parameter is indicated ("d:e" in the parameter list), they
are not combinable (-de means -d e). Simple really.

Strange that gimp didn't jump out with a google search. Isn't the code
visible on the net?

Of course: http://git.gnome.org/browse/gimp/tree/


Maybe those git pages are not searched by google? In fact I just
randomly picked a (one line) literal text from the Changelog in git -
and google didn't find it (did find two instances in mailing list
copies, but not the one in git).

So, one of the most important sources for info isn't accessible to
google it seems. (to be fair, bing.com doesn't find it either)

John



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