Subject: Re: standards/19556: printf: %n$ type format strings not supported
To: None <wiz@netbsd.org>
From: Bang Jun-Young <junyoung@netbsd.org>
List: netbsd-bugs
Date: 12/25/2002 14:47:23
On Wed, Dec 25, 2002 at 05:41:06AM +0100, wiz@netbsd.org wrote:
> #include <stdio.h>
> 
> int
> main (void)
> {
>     char buffer[128];
> 
>     sprintf (buffer, "%2\$d %3\$d %1\$d", 1, 2, 3);
>     if (strcmp ("2 3 1", buffer) == 0) {
> 	printf("Success!\n");
> 	exit(0);
>     }
>     printf("Result is not 2 3 1, but ``%s''\n", buffer);
>     exit (1);
> }
> 
> Output is:
> Result is not 2 3 1, but `` $d   $d $d''

Isn't this PR the same as lib/1862?

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>