Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 2, 2002
1 parent 89d3b0f commit 2818209
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/main/win32/SDL_main.c
Expand Up @@ -144,20 +144,24 @@ static void __cdecl cleanup_output(void)

#ifndef NO_STDIO_REDIRECT
/* See if the files have any output in them */
file = fopen(stdoutPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stdoutPath);
if ( stdoutPath[0] ) {
file = fopen(stdoutPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stdoutPath);
}
}
}
file = fopen(stderrPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stderrPath);
if ( stderrPath[0] ) {
file = fopen(stderrPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stderrPath);
}
}
}
#endif
Expand Down

0 comments on commit 2818209

Please sign in to comment.