Re: problem with plural-forms

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>
Subject: Re: problem with plural-forms
Date: 2009-05-26 14:32:56
Message-ID: 200905261732.56706.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday 26 May 2009 17:19:50 Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-05-26 14:34:32 Re: problem with plural-forms
Previous Message Tom Lane 2009-05-26 14:29:10 Re: problem with plural-forms