iaikkrypto / lineartrails

Tool to automatically search for linear characteristics
39 stars 12 forks source link

command line parameter parsing #3

Open pfasante opened 8 years ago

pfasante commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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..