mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
committed by
Glenn Randers-Pehrson
parent
f2715a558a
commit
209b3e4b79
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user