Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line parameter parsing #3

Open
pfasante opened this issue Dec 20, 2015 · 3 comments
Open

command line parameter parsing #3

pfasante opened this issue Dec 20, 2015 · 3 comments
Assignees

Comments

@pfasante
Copy link
Contributor

at the moment command line parameter parsing is done by a custom parsing implementation.
maybe it would be easier to use automatic generated parsing code from e.g. gengetopt. I made the experience, that it is relatively easy to handle, and if we include the generated .c and .h files, we would not add any dependencies to the project.
If you think this might be interesting and I find some spare time, I'll add an example implementation, using gengetopt, in the near future.

@pfasante
Copy link
Contributor Author

Oh, I forgot to mention the initial problem with the current parsing implementation: only arguments in the form '-i Value' seems to be accepted, while both forms '-iValue' and '-i Value' are common to be accepted. Gengetopt generated parser handle both cases correct.

@cdobraunig cdobraunig self-assigned this Dec 21, 2015
@cdobraunig
Copy link
Contributor

Thank you for the comment.

We have written a lot of the code new and tried to not rely on third party libraries to prevent possible copyright issues. We just wanted to be able to put the code into public domain. I have never heard of gengetop, but I will have a look a it. Thank you for the tip.

@pfasante
Copy link
Contributor Author

I've checked the gengetopt page again, it explicitly says:

gengetopt is free software. Please see the file LICENSE and COPYING for details.
Notice that: Use of gengetopt does not impose any particular license on the generated code: the code generated is not under any license.

While I'm not a lawyer, I read this as: its no problem to use it..

pfasante added a commit to pfasante/lineartrails that referenced this issue Jan 26, 2016
this commit start working on issue iaikkrypto#3, replace commandlineParser with a
parser generated by gengetopt.
not all code depending on the initial commandlineParser is changed, so
in this commit we have both variants..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants