fflush disappeared? .so?

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3781 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-27 00:34:00 +00:00
parent e5db7a2071
commit 94ee8d7079
1 changed files with 6 additions and 0 deletions

View File

@ -35,27 +35,33 @@ void mp_msg_c( int x, const char *format, ... ){
switch( x&255 ) { switch( x&255 ) {
case MSGL_FATAL: case MSGL_FATAL:
fprintf( stderr,"%s",tmp ); fprintf( stderr,"%s",tmp );
fflush(stderr);
gtkMessageBox( GTK_MB_FATAL|GTK_MB_SIMPLE,tmp ); gtkMessageBox( GTK_MB_FATAL|GTK_MB_SIMPLE,tmp );
break; break;
case MSGL_ERR: case MSGL_ERR:
fprintf( stderr,"%s",tmp ); fprintf( stderr,"%s",tmp );
fflush(stderr);
gtkMessageBox( GTK_MB_ERROR|GTK_MB_SIMPLE,tmp ); gtkMessageBox( GTK_MB_ERROR|GTK_MB_SIMPLE,tmp );
break; break;
case MSGL_WARN: case MSGL_WARN:
printf( "%s",tmp ); printf( "%s",tmp );
fflush(stdout);
gtkMessageBox( GTK_MB_WARNING|GTK_MB_SIMPLE,tmp ); gtkMessageBox( GTK_MB_WARNING|GTK_MB_SIMPLE,tmp );
break; break;
default: default:
printf( "%s",tmp ); printf( "%s",tmp );
fflush(stdout);
} }
} else } else
#endif #endif
if((x&255)<=MSGL_ERR){ if((x&255)<=MSGL_ERR){
// fprintf(stderr,"%%%%%% "); // fprintf(stderr,"%%%%%% ");
vfprintf(stderr,format, va); vfprintf(stderr,format, va);
fflush(stderr);
} else { } else {
// printf("%%%%%% "); // printf("%%%%%% ");
vprintf(format, va); vprintf(format, va);
fflush(stdout);
} }
va_end(va); va_end(va);
} }