1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 21:31:52 +00:00

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

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