[Mplayer-cvslog] CVS: main divx4_vbr.c, 1.8, 1.9 fifo.c, 1.4, 1.5 find_sub.c, 1.12, 1.13 m_config.c, 1.9, 1.10

Diego Biurrun CVS syncmail at mplayerhq.hu
Wed Oct 20 03:32:58 CEST 2004


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv14207

Modified Files:
	divx4_vbr.c fifo.c find_sub.c m_config.c 
Log Message:
printf --> mp_msg by the Wanderer <inverseparadox at comcast dot net>


Index: divx4_vbr.c
===================================================================
RCS file: /cvsroot/mplayer/main/divx4_vbr.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- divx4_vbr.c	23 Nov 2002 10:57:44 -0000	1.8
+++ divx4_vbr.c	20 Oct 2004 01:32:56 -0000	1.9
@@ -23,6 +23,9 @@
 
 #include "divx4_vbr.h"
 
+#include "mp_msg.h"
+#include "help_mp.h"
+
 //#include "transcode.h"
 
 #define FALSE 0
@@ -201,7 +204,7 @@
 		
 		m_vFrames = (entry*)malloc(iNumFrames*sizeof(entry));
 		if (!m_vFrames) 
-		{	printf("out of memory");
+		{	mp_msg(MSGT_FIXME, MSGL_FIXME,MSGTR_OutOfMemory);
 			return -2; //TC_EXPORT_ERROR;
 		}
 			
@@ -228,9 +231,7 @@
 	if(desired_bits<=non_text_bits)
 	{
 /*		char s[200];*/
-		printf("Specified bitrate is too low for this clip.\n"
-			"Minimum possible bitrate for the clip is %.0f kbps. Overriding\n"
-			"user-specified value.\n",
+		mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_OverridingTooLowBitrate,
 				(float)(non_text_bits*framerate/(int64_t)iNumFrames));
 
 		desired_bits=non_text_bits*3/2;

Index: fifo.c
===================================================================
RCS file: /cvsroot/mplayer/main/fifo.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fifo.c	4 Apr 2003 20:02:53 -0000	1.4
+++ fifo.c	20 Oct 2004 01:32:56 -0000	1.5
@@ -7,7 +7,7 @@
 
 static void make_pipe(int* pr,int* pw){
   int temp[2];
-  if(pipe(temp)!=0) printf("Cannot make PIPE!\n");
+  if(pipe(temp)!=0) mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_CannotMakePipe);
   *pr=temp[0];
   *pw=temp[1];
 }

Index: find_sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/find_sub.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- find_sub.c	24 Apr 2003 08:20:10 -0000	1.12
+++ find_sub.c	20 Oct 2004 01:32:56 -0000	1.13
@@ -12,6 +12,9 @@
 #include "libvo/sub.h"
 #include "subreader.h"
 
+#include "mp_msg.h"
+#include "help_mp.h"
+
 static int current_sub=0;
 
 //static subtitle* subtitles=NULL;
@@ -144,7 +147,7 @@
       }
     }
     
-    printf("SUB ERROR:  %d  ?  %d --- %d  [%d]  \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub);
+    mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR:  %d  ?  %d --- %d  [%d]  \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub);
 
     vo_sub=NULL; // no sub here
 }

Index: m_config.c
===================================================================
RCS file: /cvsroot/mplayer/main/m_config.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- m_config.c	13 Aug 2003 16:44:39 -0000	1.9
+++ m_config.c	20 Oct 2004 01:32:56 -0000	1.10
@@ -11,6 +11,7 @@
 #include "m_config.h"
 #include "m_option.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 m_config_t*
 m_config_new(void) {
@@ -104,7 +105,7 @@
     if(co->flags & M_CFG_OPT_ALIAS)
       continue;
     if(co->slots->lvl > config->lvl)
-      mp_msg(MSGT_CFGPARSER, MSGL_WARN,"Too old save slot found from lvl %d : %d !!!\n",config->lvl,co->slots->lvl);
+      mp_msg(MSGT_CFGPARSER, MSGL_WARN,MSGTR_SaveSlotTooOld,config->lvl,co->slots->lvl);
     
     while(co->slots->lvl >= config->lvl) {
       m_option_free(co->opt,co->slots->data);
@@ -239,11 +240,11 @@
 
   // Check if this option isn't forbiden in the current mode
   if((config->mode == M_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) {
-    mp_msg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used in a config file\n",arg);
+    mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCfgfileOption,arg);
     return M_OPT_INVALID;
   }
   if((config->mode == M_COMMAND_LINE) && (co->opt->flags & M_OPT_NOCMD)) {
-    mp_msg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used on the command line\n",arg);
+    mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCmdlineOption,arg);
     return M_OPT_INVALID;
   }
 
@@ -264,11 +265,11 @@
 	sr = m_config_parse_option(config,n,lst[2*i+1],set);
 	if(sr < 0){
 	  if(sr == M_OPT_UNKNOWN){
-	    mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' has no suboption '%s'\n",co->name,lst[2*i]);
+	    mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidSuboption,co->name,lst[2*i]);
 	    r = M_OPT_INVALID;
 	  } else
 	  if(sr == M_OPT_MISSING_PARAM){
-	    mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: suboption '%s' of '%s' must have a parameter!\n",lst[2*i],co->name);
+	    mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingSuboptionParameter,lst[2*i],co->name);
 	    r = M_OPT_INVALID;
 	  } else
 	    r = sr;
@@ -305,7 +306,7 @@
   mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Checking %s=%s\n",arg,param);
   r=m_config_parse_option(config,arg,param,0);
   if(r==M_OPT_MISSING_PARAM){
-    mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' must have a parameter!\n",arg);
+    mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingOptionParameter,arg);
     return M_OPT_INVALID;
   }
   return r;
@@ -351,7 +352,7 @@
 
   if(!config->opts) return;
 
-  printf("\n Name                 Type            Min        Max      Global  CL    Cfg\n\n");
+  mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_OptionListHeader);
   for(co = config->opts ; co ; co = co->next) {
     m_option_t* opt = co->opt;
     if(opt->type->flags & M_OPT_TYPE_HAS_CHILD) continue;
@@ -363,7 +364,7 @@
       sprintf(max,"%-8.0f",opt->max);
     else
       strcpy(max,"No");
-    printf(" %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s   %-3.3s   %-3.3s\n",
+    mp_msg(MSGT_FIXME, MSGL_FIXME, " %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s   %-3.3s   %-3.3s\n",
 	   co->name,
 	   co->opt->type->name,
 	   min,
@@ -373,5 +374,5 @@
 	   opt->flags & CONF_NOCFG ? "No" : "Yes");
     count++;
   }
-  printf("\nTotal: %d options\n",count);
+  mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_TotalOptions,count);
 }




More information about the MPlayer-cvslog mailing list