This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] better error output from ar when given a directory
On Fri, Oct 27, 2006 at 11:00:34AM -0400, Daniel Jacobowitz wrote:
> On Sat, Oct 28, 2006 at 12:27:06AM +0930, Alan Modra wrote:
> > @@ -300,6 +303,7 @@ const char *const bfd_errmsgs[] =
> > N_("Bad value"),
> > N_("File truncated"),
> > N_("File too big"),
> > + N_("Error reading "),
> > N_("#<Invalid error code>")
> > };
> >
>
> That's practically a contradiction: N_ means to translate the string,
> but you're assuming the translation will have the filename at the end.
> I think you probably want to put something bogus there, like a copy of
> the following error, and use a separate format string...
>
> > + if (error_tag == bfd_error_on_input)
> > + return concat (_(bfd_errmsgs [error_tag]), input_bfd->filename, ": ",
> > + bfd_errmsg (input_error), NULL);
> > +
>
> here.
I'd need something like asprintf because we're returning a string.
Oh... There is one of them in libiberty. OK, I'll fix that.
--
Alan Modra
IBM OzLabs - Linux Technology Centre