This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

printf problem: "%1$s" not handled?


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

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]