This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Prompt user to report bugs
- From: Gary Benson <gbenson at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: Paul_Koning at Dell dot com, dje at google dot com, gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Thu, 15 May 2014 12:37:54 +0100
- Subject: Re: [PATCH] Prompt user to report bugs
- Authentication-results: sourceware.org; auth=none
- References: <20140514110742 dot GA25550 at blade dot nx> <CADPb22T0DvL237NkheQ1h0onABvTPUKkXXxZu2Uzh3WdpSbgVA at mail dot gmail dot com> <1B70C5D6-D845-4F9A-A874-63DF77FB9030 at dell dot com> <01d401cf7025$7f3f4ef0$7dbdecd0$ at muller@ics-cnrs.unistra.fr>
Pierre Muller wrote:
> so why not simply use
>
> + fputs_unfiltered (_("\nThis is a bug, please report it"), gdb_stderr);
> + if (REPORT_BUGS_TO[0])
> + {
> + fputs_unfiltered (_(". For instructions, see:\n"), gdb_stderr);
> + fprintf_unfiltered (gdb_stderr, _(REPORT_BUGS_TO));
> + }
> + fputs_unfiltered (".\n\n", gdb_stderr);
>
> To allow for possible localization of the URL page?
Did you mean:
> + fprintf_unfiltered (gdb_stderr, "%s.", _(REPORT_BUGS_TO));
^^^^^^
The code you posted would break if _(REPORT_BUGS_TO) had a "%" in it.
Thanks,
Gary
--
http://gbenson.net/