[MPlayer-cvslog] CVS: main/input input.c,1.107,1.108

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/input
In directory mail:/var2/tmp/cvs-serv20581/input

Modified Files:
	input.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: input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- input.c	3 Jan 2005 13:56:48 -0000	1.107
+++ input.c	20 Jan 2005 13:22:52 -0000	1.108
@@ -12,10 +12,6 @@
 #include <fcntl.h>
 #include <ctype.h>
 
-#ifdef USE_SETLOCALE
-#include <locale.h>
-#endif
-
 #include "input.h"
 #include "mouse.h"
 #ifdef MP_DEBUG
@@ -599,14 +595,7 @@
       break;
     case MP_CMD_ARG_FLOAT:
       errno = 0;
-      /* <olo at altkom.com.pl> Use portable C locale for parsing floats: */
-#ifdef USE_SETLOCALE
-      setlocale(LC_NUMERIC, "C");
-#endif
       cmd->args[i].v.f = atof(ptr);
-#ifdef USE_SETLOCALE
-      setlocale(LC_NUMERIC, "");
-#endif
       if(errno != 0) {
 	mp_msg(MSGT_INPUT,MSGL_ERR,"Command %s: argument %d isn't a float.\n",cmd_def->name,i+1);
 	ptr = NULL;




More information about the MPlayer-cvslog mailing list