print only fatal/error/warning to stderr, others go to stdout

(actually reversed Nick's r1.10 commit)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7196 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-08-31 13:44:03 +00:00
parent bf8fb7478f
commit 90be7cf00c
1 changed files with 6 additions and 7 deletions

View File

@ -53,6 +53,7 @@ void mp_msg_c( int x, const char *format, ... ){
if((x&255)>mp_msg_levels[x>>8]) return; // do not display
va_start(va, format);
vsnprintf(tmp, MSGSIZE_MAX, mp_gettext(format), va);
va_end(va);
tmp[MSGSIZE_MAX-1] = 0;
#if defined(HAVE_NEW_GUI) && !defined(FOR_MENCODER)
@ -73,13 +74,11 @@ void mp_msg_c( int x, const char *format, ... ){
}
#endif
fprintf(stderr, "%s", tmp);
if ((x & 255) <= MSGL_ERR)
fflush(stderr);
else
fflush(stdout);
va_end(va);
if ((x & 255) <= MSGL_WARN){
fprintf(stderr, "%s", tmp);fflush(stderr);
} else {
printf("%s", tmp);fflush(stdout);
}
#else
va_list va;
if((x&255)>mp_msg_levels[x>>8]) return; // do not display