Mercurial > mplayer.hg
comparison mp_msg.c @ 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 | 2e5c07262861 |
children | 9a123ba671fd |
comparison
equal
deleted
inserted
replaced
7194:6df5abe8d967 | 7195:a5b2566f3c2b |
---|---|
51 char tmp[MSGSIZE_MAX]; | 51 char tmp[MSGSIZE_MAX]; |
52 | 52 |
53 if((x&255)>mp_msg_levels[x>>8]) return; // do not display | 53 if((x&255)>mp_msg_levels[x>>8]) return; // do not display |
54 va_start(va, format); | 54 va_start(va, format); |
55 vsnprintf(tmp, MSGSIZE_MAX, mp_gettext(format), va); | 55 vsnprintf(tmp, MSGSIZE_MAX, mp_gettext(format), va); |
56 va_end(va); | |
56 tmp[MSGSIZE_MAX-1] = 0; | 57 tmp[MSGSIZE_MAX-1] = 0; |
57 | 58 |
58 #if defined(HAVE_NEW_GUI) && !defined(FOR_MENCODER) | 59 #if defined(HAVE_NEW_GUI) && !defined(FOR_MENCODER) |
59 if(use_gui) | 60 if(use_gui) |
60 { | 61 { |
71 // break; | 72 // break; |
72 } | 73 } |
73 } | 74 } |
74 #endif | 75 #endif |
75 | 76 |
76 fprintf(stderr, "%s", tmp); | 77 if ((x & 255) <= MSGL_WARN){ |
77 if ((x & 255) <= MSGL_ERR) | 78 fprintf(stderr, "%s", tmp);fflush(stderr); |
78 fflush(stderr); | 79 } else { |
79 else | 80 printf("%s", tmp);fflush(stdout); |
80 fflush(stdout); | 81 } |
81 | |
82 va_end(va); | |
83 #else | 82 #else |
84 va_list va; | 83 va_list va; |
85 if((x&255)>mp_msg_levels[x>>8]) return; // do not display | 84 if((x&255)>mp_msg_levels[x>>8]) return; // do not display |
86 va_start(va, format); | 85 va_start(va, format); |
87 #if defined( HAVE_NEW_GUI ) && !defined( FOR_MENCODER ) | 86 #if defined( HAVE_NEW_GUI ) && !defined( FOR_MENCODER ) |