[libpng16] Added output flushing to aid debugging under Visual Studio.

This is necessary because the VS2010 output window otherwise simply loses
the error messages on error (they weren't flushed to the window before
the process exited, apparently!)
This commit is contained in:
John Bowler
2012-03-16 07:14:01 -05:00
committed by Glenn Randers-Pehrson
parent f2715a558a
commit 209b3e4b79
3 changed files with 16 additions and 3 deletions

View File

@@ -3374,6 +3374,9 @@ test_one_file(const char *file_name, format_list *formats, png_uint_32 opts,
result = testimage(&image, opts, formats);
freeimage(&image);
/* Ensure that stderr is flushed into any log file */
fflush(stderr);
if (log_pass)
{
if (result)
@@ -3384,6 +3387,8 @@ test_one_file(const char *file_name, format_list *formats, png_uint_32 opts,
print_opts(opts);
printf(" %s\n", file_name);
/* stdout may not be line-buffered if it is piped to a file, so: */
fflush(stdout);
}
else if (!result)