I started to do some simple testing of snprintf.c after doing the
cleanup work I had in mind, and soon found that neither my version
nor the original actually do parameter reordering correctly:

$ ./testf 'abc%2$sfoo%1$s' DEF GHI
sys:
abcGHIfooDEF                    <--- looks right to me
ours:
abcDEFfooGHI                    <--- wrong
done

I haven't dug into this too closely yet (offhand I think the problem
is that the loop at line 541ff is searching fmtpar[] and then using
fmtparptr[]) but was wondering why it hadn't been noticed before.
Which of our platforms actually use port/snprintf.c, and hasn't anyone
tried any of the internationalized message databases on one?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to