l...@gnu.org (Ludovic Courtès) writes: > Hello, > > Simon Josefsson <si...@josefsson.org> writes: > >> I suggest a new gnulib module emit-bug-reporting-address. I have the >> following code in GNU Libidn, which is strongly influenced by GNU >> CoreUtils. Removing the 'static' keyword and putting it in a gnulib >> module would make it easy to re-use the code, and possibly also the >> translation messages. I would use it in several of my projects. >> Thoughts? I'll propose a patch shortly. > > Is there any reason this cannot be made part of `version-etc'?
No reason. It seems like a better place actually. Jim, how about this patch? /Simon diff --git a/ChangeLog b/ChangeLog index a6e5634..3e0827e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-22 Simon Josefsson <si...@josefsson.org> + + * lib/version-etc.h: Add emit_bug_reporting_address. + * lib/version-etc.c (emit_bug_reporting_address): New function. + * modules/version-etc (Description): Reflect new features. + 2009-01-21 Bruno Haible <br...@clisp.org> * lib/getloadavg.c (getloadavg): Check c_strtod result against error diff --git a/lib/version-etc.c b/lib/version-etc.c index 6ef1cca..58d34ed 100644 --- a/lib/version-etc.c +++ b/lib/version-etc.c @@ -1,4 +1,4 @@ -/* Utility to help print --version output in a consistent format. +/* Print --version and bug reporting information in a consistent format. Copyright (C) 1999-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -170,3 +170,16 @@ version_etc (FILE *stream, va_start (authors, version); version_etc_va (stream, command_name, package, version, authors); } + +void +emit_bug_reporting_address (void) +{ + /* TRANSLATORS: The placeholder indicates the bug-reporting address + for this package. Please add _another line_ saying + "Report translation bugs to <...>\n" with the address for translation + bugs (typically your translation team's web or email address). */ + printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf (_("%s home page: http://www.gnu.org/software/%s/\n"), + PACKAGE_NAME, PACKAGE); + printf (_("General help using GNU software: http://www.gnu.org/gethelp/\n")); +} diff --git a/lib/version-etc.h b/lib/version-etc.h index d9d1340..810993c 100644 --- a/lib/version-etc.h +++ b/lib/version-etc.h @@ -1,5 +1,5 @@ -/* Utility to help print --version output in a consistent format. - Copyright (C) 1999, 2003, 2005 Free Software Foundation, Inc. +/* Print --version and bug reporting information in a consistent format. + Copyright (C) 1999, 2003, 2005, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,8 @@ extern void version_etc_va (FILE *stream, extern void version_etc (FILE *stream, const char *command_name, const char *package, const char *version, - /* const char *author1, ...*/ ...); + /* const char *author1, ...*/ ...); + +extern void emit_bug_reporting_address (void); #endif /* VERSION_ETC_H */ diff --git a/modules/version-etc b/modules/version-etc index 2b6d015..01f443f 100644 --- a/modules/version-etc +++ b/modules/version-etc @@ -1,5 +1,5 @@ Description: -Print --version output. +Print --version and bug reporting information in a consistent format. Files: lib/version-etc.h