Hi,

On Wed, Aug 1, 2012 at 2:31 PM, Uoti Urpala <[email protected]> wrote:
> On Wed, 2012-08-01 at 21:55 +0100, Måns Rullgård wrote:
>> Uoti Urpala <[email protected]> writes:
>> > On Wed, 2012-08-01 at 21:34 +0100, Måns Rullgård wrote:
>> >> It is not possible to get those semantics using the regular Windows
>> >> functions.
>> >
>> > Of course it is, with enough workarounds (this is already an attempt at
>> > a workaround, getting it right would just require more code). I think
>> > there are rather obvious ways to fix both issues (besides the most
>> > obvious but more work-requiring alternative of writing correct snprintf
>> > from scratch): rewrite the format string with different modifiers for
>> > the first, try printing the string into temporary storage and double its
>> > size until you succeed for the second.
>>
>> Of course writing your own, correct snprintf() is possible.  You are
>> then, however, not using the Windows-provided functions.
>>
>> Writing into temp buffers is not exactly equivalent to the standard
>> behaviour.  The standard function can succeed in calculating the size
>> that *would* be required even actually allocating it fails.
>
> Yes, it can have more failure cases. However, I meant that from a more
> practical perspective. You can do that to get a correctly working
> snprintf for practical use.
>
>> If you insist on arguing, I politely request that you at least be right.
>
> If you get to that level of completely literal nitpicking, you could as
> well say that it's possible to "get those semantics using the regular
> Windows functions" by writing your own snprintf from scratch, while
> using the regular Windows functions for something other than doing the
> main formatting. I don't think that's a meaningful discussion any more
> though.

And this discussion is so utterly useful as-is, right?

I've asked this a few times now: please stay out of discussions on
MSVC support. You're not interested in it, you're not intending to
contribute to it or help out in any way, and you're not commonly a
Libav contributor who would provide constructive reviews, so to the
best of my definitions, you're just here to troll. Let's not. Leave it
to the people that care.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to