comparison libmpcodecs/vf_unsharp.c @ 14542:4a6b79a1ad52

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.
author reimar
date Thu, 20 Jan 2005 13:22:53 +0000
parents 7d6a854a5fe5
children 6ff3379a0862
comparison
equal deleted inserted replaced
14541:bef9d6dc2333 14542:4a6b79a1ad52
24 #include <math.h> 24 #include <math.h>
25 25
26 #include "../config.h" 26 #include "../config.h"
27 #include "../mp_msg.h" 27 #include "../mp_msg.h"
28 #include "../cpudetect.h" 28 #include "../cpudetect.h"
29
30 #ifdef USE_SETLOCALE
31 #include <locale.h>
32 #endif
33 29
34 #ifdef HAVE_MALLOC_H 30 #ifdef HAVE_MALLOC_H
35 #include <malloc.h> 31 #include <malloc.h>
36 #endif 32 #endif
37 33
265 fp->msizeX = 1 | MIN( MAX( fp->msizeX, MIN_MATRIX_SIZE ), MAX_MATRIX_SIZE ); 261 fp->msizeX = 1 | MIN( MAX( fp->msizeX, MIN_MATRIX_SIZE ), MAX_MATRIX_SIZE );
266 fp->msizeY = 1 | MIN( MAX( fp->msizeY, MIN_MATRIX_SIZE ), MAX_MATRIX_SIZE ); 262 fp->msizeY = 1 | MIN( MAX( fp->msizeY, MIN_MATRIX_SIZE ), MAX_MATRIX_SIZE );
267 263
268 // parse amount 264 // parse amount
269 pos = strchr( pos+1, ':' ); 265 pos = strchr( pos+1, ':' );
270 #ifdef USE_SETLOCALE
271 setlocale( LC_NUMERIC, "C" );
272 #endif
273 fp->amount = ( pos && pos+1<max ) ? atof( pos+1 ) : 0; 266 fp->amount = ( pos && pos+1<max ) ? atof( pos+1 ) : 0;
274 #ifdef USE_SETLOCALE
275 setlocale( LC_NUMERIC, "" );
276 #endif
277 } 267 }
278 268
279 //===========================================================================// 269 //===========================================================================//
280 270
281 static unsigned int fmt_list[] = { 271 static unsigned int fmt_list[] = {