Hi, thank you for the contribution!
A few points: 1. The first thing you should do it use GNUNET_PROGRAM*. Please look at the main of, for example, gnunet-ecc.c. This is how argument parsing and program invocation in gnunet is done. This also applies for gnunet-qr. 2. Instead of calling the gnunet-uri CLI through a fork, you should just handle the value inside the QR code. This means that you need to look at what happens in gnunet-uri and follow that logic mostly. This will automatically allow you to do proper error handling in combination with (1). Calling binaries like this is only a last report IMO. 3. No code in headers unless it is shared functionality (looking at you, gnunet-qr-utils.h). I would assume that you do not need a header for this program at all. Just put it all in 1 file (gnunet-qr,c) BR Martin > On 3. Mar 2019, at 11:03, Hartmut Goebel <[email protected]> wrote: > > Hi, > > I just pushed the branch "gnunt-qt-c". > > Please review and give feedback. And somebody is asked to implement > c-style error handling (or guide me): The "processor" must be cleaned up > at the end, even if an error occurred. How is this done in C? > > Please do not merge yet! IMHO error handling should be done first. > > -- > Regards > Hartmut Goebel > > | Hartmut Goebel | [email protected] | > | www.crazy-compilers.com | compilers which you thought are impossible | > > > _______________________________________________ > GNUnet-developers mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnunet-developers
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ GNUnet-developers mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnunet-developers
