[MPlayer-cvslog] CVS: main/libmpcodecs ad_libvorbis.c, 1.15, 1.16 vf_eq2.c, 1.9, 1.10 vf_smartblur.c, 1.7, 1.8 vf_unsharp.c, 1.6, 1.7

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Jan 20 14:22:55 CET 2005


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	ad_libvorbis.c vf_eq2.c vf_smartblur.c vf_unsharp.c 
Log Message:
remove all setlocale calls, they break the behaviour of sscanf and
strcasecmp, especially with tr_TR locale - and do not seem to be good for
anything.


Index: ad_libvorbis.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_libvorbis.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ad_libvorbis.c	14 Oct 2004 15:09:33 -0000	1.15
+++ ad_libvorbis.c	20 Jan 2005 13:22:52 -0000	1.16
@@ -8,10 +8,6 @@
 #include "config.h"
 #include "ad_internal.h"
 
-#ifdef USE_SETLOCALE
-#include <locale.h>
-#endif
-
 #ifdef HAVE_OGGVORBIS
 
 static ad_info_t info = 
@@ -50,13 +46,7 @@
 
   va_start( va, format );
   clen = strlen( comment );
-#ifdef USE_SETLOCALE
-  setlocale( LC_NUMERIC, "C" );
-#endif
   ret = strncasecmp( ptr, comment, clen) == 0 ? vsscanf( ptr+clen, format, va ) : 0;
-#ifdef USE_SETLOCALE
-  setlocale( LC_NUMERIC, "" );
-#endif
   va_end( va );
 
   return ret;

Index: vf_eq2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_eq2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_eq2.c	21 Oct 2004 11:55:19 -0000	1.9
+++ vf_eq2.c	20 Jan 2005 13:22:52 -0000	1.10
@@ -23,10 +23,6 @@
 #include "mp_image.h"
 #include "vf.h"
 
-#ifdef USE_SETLOCALE
-#include <locale.h>
-#endif
-
 #define LUT16
 
 /* Per channel parameters */
@@ -481,15 +477,9 @@
     par[5] = 1.0;
     par[6] = 1.0;
     par[7] = 1.0;
-#ifdef USE_SETLOCALE
-    setlocale (LC_NUMERIC, "C");
-#endif
     sscanf (args, "%lf:%lf:%lf:%lf:%lf:%lf:%lf:%lf",
       par, par + 1, par + 2, par + 3, par + 4, par + 5, par + 6, par + 7
     );
-#ifdef USE_SETLOCALE
-    setlocale (LC_NUMERIC, "");
-#endif
 
     eq2->rgamma = par[4];
     eq2->ggamma = par[5];

Index: vf_smartblur.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_smartblur.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vf_smartblur.c	18 Sep 2004 00:08:16 -0000	1.7
+++ vf_smartblur.c	20 Jan 2005 13:22:52 -0000	1.8
@@ -25,10 +25,6 @@
 #include "../config.h"
 #include "../mp_msg.h"
 
-#ifdef USE_SETLOCALE
-#include <locale.h>
-#endif
-
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
@@ -235,9 +231,6 @@
 
 	if(args==NULL) return 0;
 	
-#ifdef USE_SETLOCALE
-    setlocale( LC_NUMERIC, "C" );
-#endif
 	e=sscanf(args, "%f:%f:%d:%f:%f:%d",
 		&vf->priv->luma.radius,
 		&vf->priv->luma.strength,
@@ -246,9 +239,6 @@
 		&vf->priv->chroma.strength,
 		&vf->priv->chroma.threshold
 		);
-#ifdef USE_SETLOCALE
-    setlocale( LC_NUMERIC, "" );
-#endif
 
 	vf->priv->luma.quality = vf->priv->chroma.quality= 3.0;
 	

Index: vf_unsharp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_unsharp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_unsharp.c	20 May 2003 18:36:55 -0000	1.6
+++ vf_unsharp.c	20 Jan 2005 13:22:52 -0000	1.7
@@ -27,10 +27,6 @@
 #include "../mp_msg.h"
 #include "../cpudetect.h"
 
-#ifdef USE_SETLOCALE
-#include <locale.h>
-#endif
-
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
@@ -267,13 +263,7 @@
 
     // parse amount
     pos = strchr( pos+1, ':' );
-#ifdef USE_SETLOCALE
-    setlocale( LC_NUMERIC, "C" );
-#endif
     fp->amount = ( pos && pos+1<max ) ? atof( pos+1 ) : 0;
-#ifdef USE_SETLOCALE
-    setlocale( LC_NUMERIC, "" );
-#endif
 }
 
 //===========================================================================//




More information about the MPlayer-cvslog mailing list