Hi Lorenzo,

> I think a possible solution is to allow a .ggo file to include another one,
> which is something is still to be implemented in gengetopt...

Yes, I read about the plans. Before that is being implemented it is
always possible to use
cmake or some other tool to generate out the .ggo files.

> however, this would have the same semantics of C include, and would only
> copy the contents of the included .ggo file.
>
> implementation of such include feature would be quite easy...
>
> otherwise, that include, in order to have what you need, should have a
> semantics similar to C++ inheritance which is not possible in C...
>
> or, as you suggest, to have pointer to the common struct... that semantics
> of include would require a more involved implementation though...  I guess
> at least...

You understood me perfectly.

> do you have other ideas?

Not really.

> Note, however, that the generated struct passed to the generated parser is
> not thought to be used by other functions...  but only to collect command
> line arguments and values...  those values are better to be copied into your
> own variables

Yes, you are probably right. I think I will use my own struct instead.
If I for instance later want to publish an open source library, there
better be no dependencies on gengetopt in the functions of the library.

cheers,
Erik

_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt

Reply via email to