diff options
-rw-r--r-- | doc/gnunet-c-tutorial.pdf | bin | 253517 -> 389563 bytes | |||
-rw-r--r-- | doc/gnunet-c-tutorial.tex | 7 |
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/gnunet-c-tutorial.pdf b/doc/gnunet-c-tutorial.pdf index 1b5af84c6..03ceed9b6 100644 --- a/doc/gnunet-c-tutorial.pdf +++ b/doc/gnunet-c-tutorial.pdf | |||
Binary files differ | |||
diff --git a/doc/gnunet-c-tutorial.tex b/doc/gnunet-c-tutorial.tex index 8ad4d3019..86d68b84b 100644 --- a/doc/gnunet-c-tutorial.tex +++ b/doc/gnunet-c-tutorial.tex | |||
@@ -594,6 +594,8 @@ static int a_flag; | |||
594 | &GNUNET_GETOPT_set_one, &a_flag}, | 594 | &GNUNET_GETOPT_set_one, &a_flag}, |
595 | GNUNET_GETOPT_OPTION_END | 595 | GNUNET_GETOPT_OPTION_END |
596 | }; | 596 | }; |
597 | string_option = NULL; | ||
598 | a_flag = GNUNET_SYSERR; | ||
597 | // ... | 599 | // ... |
598 | \end{lstlisting} | 600 | \end{lstlisting} |
599 | 601 | ||
@@ -602,7 +604,10 @@ the {\tt --help} argument and error handling are taken care of when | |||
602 | using this approach. Other {\tt GNUNET\_GETOPT\_}-functions can be used | 604 | using this approach. Other {\tt GNUNET\_GETOPT\_}-functions can be used |
603 | to obtain integer value options, increment counters, etc. You can | 605 | to obtain integer value options, increment counters, etc. You can |
604 | even write custom option parsers for special circumstances not covered | 606 | even write custom option parsers for special circumstances not covered |
605 | by the available handlers. | 607 | by the available handlers. To check if an argument was specified by the |
608 | user you initialize the variable with a specific value (e.g. NULL for | ||
609 | a string and GNUNET\_SYSERR for a integer) and check after parsing | ||
610 | happened if the values were modified. | ||
606 | 611 | ||
607 | Inside the {\tt run} method, the program would perform the | 612 | Inside the {\tt run} method, the program would perform the |
608 | application-specific logic, which typically involves initializing and | 613 | application-specific logic, which typically involves initializing and |