Re: [flac-dev] snprintf and MS Visual Studio

2013-03-17 Thread Erik de Castro Lopo
Janne Hyvärinen wrote: > Patch for snprintf stuff. Applied and pushed. Thats it for me tonight. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ flac-dev mailing list fla

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-17 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Does MSVS have ? Hmm, seems to: http://msdn.microsoft.com/en-us/library/kb57fad8%28v=vs.80%29.aspx Hope it works as expected. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ _

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-17 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Hi all, > > There are a bunch of sprintf calls in the FLAC code base and I'd like > to replace them with calls to snprintf but I know that can cause > problems with at least some versions of Visual Studio. > > Whats the current state of play in this regard? Does MSV

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-14 Thread Erik de Castro Lopo
Ben Allison wrote: > Microsoft provides a surprisingly good (but proprietary) API inside > strsafe.h. All of which are completely useless from cross platform code. I remember looking at that stuff at some time and thinking that their API design was somewhat lacking in clarity or vision (to be gen

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-14 Thread Ben Allison
Microsoft provides a surprisingly good (but proprietary) API inside strsafe.h. StringCchPrintfA can be substituted for snprintf but the return value is different. A small wrapper function around StringCchPrintfExA could get you enough information to emulate snprintf well. But sprintf_s might

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-14 Thread Erik de Castro Lopo
Christoph Terasa wrote: > Since MS refuses to support C99, the common practice is to use either > > sprintf_s: > http://msdn.microsoft.com/en-us/library/ce3zzk1k(v=VS.80).aspx > _snprintf_s: > http://msdn.microsoft.com/de-de/library/f30dzcf6(v=VS.80).aspx > > The former can be used as

Re: [flac-dev] snprintf and MS Visual Studio

2013-03-14 Thread Christoph Terasa
On 3/14/2013 8:00 AM, Erik de Castro Lopo wrote: > Hi all, > > There are a bunch of sprintf calls in the FLAC code base and I'd like > to replace them with calls to snprintf but I know that can cause > problems with at least some versions of Visual Studio. > > Whats the current state of play in thi

[flac-dev] snprintf and MS Visual Studio

2013-03-14 Thread Erik de Castro Lopo
Hi all, There are a bunch of sprintf calls in the FLAC code base and I'd like to replace them with calls to snprintf but I know that can cause problems with at least some versions of Visual Studio. Whats the current state of play in this regard? Erik -- -