>From e0b0bd62037f4d40eb370e4dcfd96d70503508e7 Mon Sep 17 00:00:00 2001 From: Alessio Vanni Date: Thu, 8 Aug 2019 16:27:28 +0200 Subject: [PATCH] Print help on GNU software only when project is GNU software --- src/include/gnunet_os_lib.h | 5 +++++ src/util/getopt_helpers.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 41c75e513..d43711a99 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h @@ -271,6 +271,11 @@ struct GNUNET_OS_ProjectData * String identifying the current project version. */ const char *version; + + /** + * Non-zero means this project is part of GNU. + */ + int is_gnu; }; diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index 05856beee..80d1037bb 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c @@ -178,10 +178,13 @@ format_help (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, } pd = GNUNET_OS_project_data_get (); printf ("Report bugs to %s.\n" - "GNUnet home page: %s\n" - "General help using GNU software: http://www.gnu.org/gethelp/\n", + "Home page: %s\n", pd->bug_email, pd->homepage); + + if (0 != pd->is_gnu) + printf ("General help using GNU software: http://www.gnu.org/gethelp/\n"); + return GNUNET_NO; } -- 2.21.0