Subject: Re: printf problem: "%1$s" not handled?
From: [email-masked] (Richard H. Gumpertz)

20 Apr 1998 01:50:56 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
To: [email-masked] (Christopher Lee)
Cc: [email-masked]

> Hi,
> I'm having trouble on gnu-win32-b19.1 with the printf/sprintf functions.
> Basically, positional parameters don't seem to be working:
> 
> #include <string.h>
> 
> int main()
> {
>   printf("<%1$s> <%2$s> <%3$s> <%4$s>\n","one","two","three","four");
>   return 0;
> }
> 
> Should print (e.g. on LINUX, SUN, SGI, DEC, etc.):
> <one> <two> <three> <four>
> 
> on GNU-WIN32 prints:
> <$s> < $s> <  $s> <   $s>
> 
> Any way to fix this?  e.g. to replace printf/sprintf in B19.1 with ANSI
> versions?
> 
> Yours,
> 
> Chris Lee

What is the '$' in your control strings?  I've never seen that in printf
control strings.  Is that the source of your problem?  Is it some sort of
local extension?

		Rick Gumpertz
-- 
 ========================================================================
 | Richard H. Gumpertz, PhD     VOICE: (913) 642-1777 or (913) 534-5062 |
 | Computer Problem Solving     FAX:   (913) 752-6615 or (913) 642-8777 |
 | 4518 West 89th Street, Suite 220, Prairie Village, KS 66207-2293     |
 ========================================================================
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".