X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftemplate%2Fgnunet-template.c;h=212d56f6e30c51105c5c016a9b3681af8065508d;hb=26d1b687ca01be01505b69ff48ae5d3e0cd4186e;hp=7b1d9dfff85d5929e4017637b72bcd1bd4245a70;hpb=5746309cb4be2073d550ad7a6885e918631dbc38;p=oweals%2Fgnunet.git diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c index 7b1d9dfff..212d56f6e 100644 --- a/src/template/gnunet-template.c +++ b/src/template/gnunet-template.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors) + Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -24,8 +24,7 @@ * @author Christian Grothoff */ #include "platform.h" -#include "gnunet_getopt_lib.h" -#include "gnunet_program_lib.h" +#include "gnunet_util_lib.h" /* #include "gnunet_template_service.h" */ /** @@ -63,10 +62,15 @@ main (int argc, char *const *argv) /* FIMXE: add options here */ GNUNET_GETOPT_OPTION_END }; - return (GNUNET_OK == - GNUNET_PROGRAM_run (argc, argv, "gnunet-template", - gettext_noop ("help text"), options, &run, - NULL)) ? ret : 1; + if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) + return 2; + + ret = (GNUNET_OK == + GNUNET_PROGRAM_run (argc, argv, "gnunet-template", + gettext_noop ("help text"), options, &run, + NULL)) ? ret : 1; + GNUNET_free ((void*) argv); + return ret; } /* end of gnunet-template.c */