summaryrefslogtreecommitdiff
path: root/src/template/gnunet-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/template/gnunet-template.c')
-rw-r--r--src/template/gnunet-template.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c
index 44dec992b..1ebb1b512 100644
--- a/src/template/gnunet-template.c
+++ b/src/template/gnunet-template.c
@@ -16,7 +16,7 @@
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @file template/gnunet-template.c 22 * @file template/gnunet-template.c
@@ -42,10 +42,10 @@ static int ret;
42 * @param cfg configuration 42 * @param cfg configuration
43 */ 43 */
44static void 44static void
45run (void *cls, 45run(void *cls,
46 char *const *args, 46 char *const *args,
47 const char *cfgfile, 47 const char *cfgfile,
48 const struct GNUNET_CONFIGURATION_Handle *cfg) 48 const struct GNUNET_CONFIGURATION_Handle *cfg)
49{ 49{
50 /* main code here */ 50 /* main code here */
51} 51}
@@ -59,24 +59,26 @@ run (void *cls,
59 * @return 0 ok, 1 on error 59 * @return 0 ok, 1 on error
60 */ 60 */
61int 61int
62main (int argc, char *const *argv) 62main(int argc, char *const *argv)
63{ 63{
64 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 64 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
65 /* FIMXE: add options here */ 65 /* FIMXE: add options here */
66 GNUNET_GETOPT_OPTION_END}; 66 GNUNET_GETOPT_OPTION_END
67 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 67 };
68
69 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args(argc, argv, &argc, &argv))
68 return 2; 70 return 2;
69 71
70 ret = (GNUNET_OK == GNUNET_PROGRAM_run (argc, 72 ret = (GNUNET_OK == GNUNET_PROGRAM_run(argc,
71 argv, 73 argv,
72 "gnunet-template", 74 "gnunet-template",
73 gettext_noop ("help text"), 75 gettext_noop("help text"),
74 options, 76 options,
75 &run, 77 &run,
76 NULL)) 78 NULL))
77 ? ret 79 ? ret
78 : 1; 80 : 1;
79 GNUNET_free ((void *) argv); 81 GNUNET_free((void *)argv);
80 return ret; 82 return ret;
81} 83}
82 84