[Mplayer-cvslog] CVS: main mp_msg.c,1.18,1.19

Arpi of Ize arpi at mplayerhq.hu
Sat Aug 31 15:44:20 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv25728

Modified Files:
	mp_msg.c 
Log Message:
print only fatal/error/warning to stderr, others go to stdout
(actually reversed Nick's r1.10 commit)


Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mp_msg.c	21 Aug 2002 21:31:18 -0000	1.18
+++ mp_msg.c	31 Aug 2002 13:44:03 -0000	1.19
@@ -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




More information about the MPlayer-cvslog mailing list