Re: problem with plural-forms - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: problem with plural-forms
Date
Msg-id 200905261732.56706.peter_e@gmx.net
Whole thread Raw
In response to Re: problem with plural-forms  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tuesday 26 May 2009 17:19:50 Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > I think it should use the %2$s style specifier in that case.  This
> > should work:
> >
> > printf (ngettext ("One file removed, containing %2$lu bytes",
> >                   "%d files removed, containing %lu bytes", n),
> >         n, total_bytes);
>
> How's that gonna work?  In the n=1 case, printf would have no idea about
> the type/size of the argument it would need to skip over.

gcc -Wall actually warns if you do this.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: problem with plural-forms
Next
From: Aidan Van Dyk
Date:
Subject: Re: problem with plural-forms