Mercurial > mplayer.hg
changeset 7195:a5b2566f3c2b
print only fatal/error/warning to stderr, others go to stdout
(actually reversed Nick's r1.10 commit)
author | arpi |
---|---|
date | Sat, 31 Aug 2002 13:44:03 +0000 |
parents | 6df5abe8d967 |
children | 9aca112abac7 |
files | mp_msg.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mp_msg.c Sat Aug 31 13:29:26 2002 +0000 +++ b/mp_msg.c Sat Aug 31 13:44:03 2002 +0000 @@ -53,6 +53,7 @@ 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 @@ } #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