This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Prompt user to report bugs


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]