taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 34adcfaf4a98ed28347b1ada7fb212e6b1eb5db9
parent 584f4bcb2543af6c8270b8a79e10d771e304d94e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 31 Oct 2019 13:38:56 +0100

feedback

Diffstat:
MREADME | 42++++++++++++++++++++++++++++++++++++++++--
Msrc/main.c | 4++--
2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/README b/README @@ -7,12 +7,12 @@ #### Prerequisite * GNU gcc tool-chain * C standard libraries - * libnfc + * libnfc * libcurl * pthread * Gnu make -#### Tested on +#### Tested on * Ubuntu LTS (18.04) #### Description @@ -29,3 +29,40 @@ * Taler wallet does not receive a second message when the payment was aborted, the wallet has to be started again to receive a message via nfc * Wallet does not show succes url string + + +=================== + +TODO: + +- Use common prefix for all exported symbols in your + codebase, i.e. 'SNACK_'; you can then continue with + a file-specific prefix, i.e. 'SNACK_nfc_'. But you + MUST NOT use only 'nfc_', as that is "reserved" + for functions from libnfc! +- Consider to use GNUNET_log() for logging, + (#include <gnunet/gnunet_util_lib.h>, -lgnunetutil) -- + or define your own wrapper, but never printf, and + avoid using 'fprintf' directly (logging abstraction!) +- Consider using GNUNET_CONFIGURATION_* to obtain + configuration data (CURRENCY, Taler backend!) -- + or write your own configuration parser, but avoid + hard-coding parameters users would want to change! +- Consider using GNUNET_GETOPT_* to parse command-line + arguments -- + or use getopt() and implement --help yourself... +- Strongly consider using GNUNET_strdup(), GNUNET_malloc() + and other 'fundamental' functions of libgnunetutil, + instead of re-inventing that wheel... +- Consider using event loop (GNUNET_SCHEDULER_()) + instead of pthreads with cancellation +- stick to c89 style for local variables, i.e. do + not introduce variables in the middle of the scope +- stick to c89 style comments /* foo */, not // +- document your functions Doxygen-style, in particular + you must document every function, every argument, + every struct, every member of every struct +- Use '&foo' if you want to use 'foo' as an argument + (higher order function) instead of calling 'foo()'. + -- makes no difference in C, but more readable +- +\ No newline at end of file diff --git a/src/main.c b/src/main.c @@ -82,7 +82,7 @@ main ( ) return EXIT_FAILURE; } - // inizialize taler + // initialize taler CURL *curl = NULL; if (taler_init (&curl) ) { @@ -90,7 +90,7 @@ main ( ) return EXIT_FAILURE; } - // inizialize product + // initialize product if (product_init (&product, CURRENCY) ) { printf ("Unable to init product\n");