Ben Asselstine <benasselst...@gmail.com> ha escrit:

> On Sat, Jan 31, 2009 at 5:22 PM, Karl Berry <k...@freefriends.org> wrote:
> >    The <...> markup is helpful when the URL is broken into two lines,
> >
> 
> Let's not forget about argp.  Here's a patch to sync it to the new
> format.

That would break too many existing programs. I'd rather use the attached
patch, which would not require any changes in the user code.
Although, frankly speaking, I'm not sure it is necessary, especially
given Karl's and Bruno's feedback on that subject.

Regards,
Sergey

diff --git a/lib/argp-help.c b/lib/argp-help.c
index a9843c0..7d5030e 100644
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -1704,11 +1704,20 @@ Try `%s --help' or `%s --usage' for more information.\n"),
 
   if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
     {
+      const char *addr = argp_program_bug_address;
+      size_t len = strlen (addr);
+      
       if (anything)
 	__argp_fmtstream_putc (fs, '\n');
+
+      if (addr[0] == '<' && addr[len-1] == '>')
+	{
+	  addr ++;
+	  len -= 2;
+	}
       __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
-					     "Report bugs to %s.\n"),
- 			       argp_program_bug_address);
+					     "Report bugs to <%.*s>.\n"),
+ 			       len, addr);
       anything = 1;
     }
 

Reply via email to