Windows flac_snprintf tweaks.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 17 Mar 2013 11:05:58 +0000 (22:05 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 17 Mar 2013 11:06:11 +0000 (22:06 +1100)
Patch from Janne Hyv√§rinen <cse@sci.fi>.

FLAC.sln
src/monkeys_audio_utilities/flac_mac/main.c
src/share/grabbag/snprintf.c

index 374b7e1..84bcf7b 100644 (file)
--- a/FLAC.sln
+++ b/FLAC.sln
@@ -39,6 +39,9 @@ Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "iffscan", "src\flac\iffscan
        EndProjectSection\r
 EndProject\r
 Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "flac_mac", "src\monkeys_audio_utilities\flac_mac\flac_mac.vcproj", "{4cefbc7e-c215-11db-8314-0800200c9a66}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {4cefbc81-c215-11db-8314-0800200c9a66} = {4cefbc81-c215-11db-8314-0800200c9a66}\r
+       EndProjectSection\r
 EndProject\r
 Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "flac_ren", "src\monkeys_audio_utilities\flac_ren\flac_ren.vcproj", "{4cefbc7f-c215-11db-8314-0800200c9a66}"\r
 EndProject\r
@@ -125,6 +128,9 @@ Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "test_seeking", "src\test_se
        EndProjectSection\r
 EndProject\r
 Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "test_streams", "src\test_streams\test_streams.vcproj", "{4cefbc91-c215-11db-8314-0800200c9a66}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {4cefbc81-c215-11db-8314-0800200c9a66} = {4cefbc81-c215-11db-8314-0800200c9a66}\r
+       EndProjectSection\r
 EndProject\r
 Project("{4cefbc7c-c215-11db-8314-0800200c9a66}") = "utf8_static", "src\share\utf8\utf8_static.vcproj", "{4cefbc92-c215-11db-8314-0800200c9a66}"\r
 EndProject\r
index 21d4f71..c93a9c9 100644 (file)
@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
                strcpy(strrchr(to,'.'), ".flac");
 
                flac_snprintf(prog, sizeof (prog), "%sflac_ren.exe", macdir);
-               flac_snprintf(cmdline, sizeof (smdline), "\"%s\" \"%s\" \"%s\"", prog, from, to);
+               flac_snprintf(cmdline, sizeof (cmdline), "\"%s\" \"%s\" \"%s\"", prog, from, to);
 
                flac_return_val = forkit(prog, cmdline);
        }
index f57a6a9..a7d59d7 100644 (file)
@@ -62,7 +62,7 @@ flac_snprintf(char *str, size_t size, const char *fmt, ...)
        va_start (va, fmt);
 
 #ifdef _MSC_VER
-       rc = vsnprintf_s (str, size, fmt, va);
+       rc = vsnprintf_s (str, size, _TRUNCATE, fmt, va);
        rc = (rc > 0) ? rc : (size == 0 ? 1024 : size * 2);
 #else
        rc = vsnprintf (str, size, fmt, va);