From: Felix <fx...@gm...> - 2004-01-07 19:01:32
|
On Wed, 7 Jan 2004 16:41:38 +0100 (CET) Pavel harry_x Pal=E1t <ha...@ba...> wrote: > > Looks like a problem with the new def_max_anisotropy option. It's the > > first floating-point option. I don't understand why this is happening, > > though. It works just fine in the radeon driver and the definitions of > > __driConfigOptions are identical in both drivers (see r200_screen.c). > > > > Also, you should see the same problem with any OpenGL app. If this is > > application-specific then it's really mysterious. > > > > Can you send the output of "xdriinfo options r200"? >=20 > I have just experienced the same problem. The problem is that character > which strtod recognise as decimal point depends on current locale. >=20 > And in xmlconfig.c there is this part of code: > case DRI_FLOAT: > v->_float =3D strtod (string, (char **)&tail); > break; > And if the locale is set (which could be done by application or library > like Xt), the parser will fail. Thanks for this important piece of information. I didn't know that strtod depends on the locale. I just double checked it in the libc manual and you're right. Even about strtol it says: In a locale other than the standard `"C"' locale, this function may recognize additional implementation-dependent syntax. Apperently I shouldn't rely on libc functions for number parsing in the config file parser at all. >=20 > Because of that I think that this code shouldn't depend on strtod(). The > GNU extensions that allow to select locale in strtod call are non-standar= d. > I think that best approach would be to have internal strtod do the conver= sion. > Here is small trivial patch that do it. Ok. I'm going apply your patch plus a __strtol function when I get home. Thanks again. >=20 > Sincerely >=20 > Pavel Pal=E1t >=20 > P.S.: This is my first post and patch here, so sorry for any inconvenience > ;-) No inconvenience at all. I'm no expert but I believe your mail would even meet the standards for lklm ;o) >=20 > -- > Pavel "harry_x" Pal=E1t > ha...@ba... > irc: #mistral.cz on IRCnet >=20 > The only way of finding the limits to the possible is by going beyond= them to the impossible > Arthur C. Clark Cheers, Felix ------------ __\|/__ ___ ___ ------------------------- Felix ___\_e -_/___/ __\___/ __\_____ You can do anything, K=FChling (_____\=C4/____/ /_____/ /________) just not everything fx...@gm... \___/ \___/ U at the same time. |