summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_lexer.lpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-12-13 08:41:08 -0700
committerBrian Paul <[email protected]>2010-12-14 12:38:38 -0700
commitbb10e081c8ddc452bca44ba583f239219a5b9372 (patch)
tree5aaaf091bb32aef3d04cca04cc9acac07f85c2c6 /src/glsl/glsl_lexer.lpp
parentdfbc20593ec89ef5ddcb0dba3b05ea95e296861e (diff)
glsl: new glsl_strtod() wrapper to fix decimal point interpretation
We always want to use '.' as the decimal point. See http://bugs.freedesktop.org/show_bug.cgi?id=24531 NOTE: this is a candidate for the 7.10 branch.
Diffstat (limited to 'src/glsl/glsl_lexer.lpp')
-rw-r--r--src/glsl/glsl_lexer.lpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.lpp
index 7a3f1a67e66..15742ac3636 100644
--- a/src/glsl/glsl_lexer.lpp
+++ b/src/glsl/glsl_lexer.lpp
@@ -22,6 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
+#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
@@ -293,23 +294,23 @@ layout {
}
[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[eE][+-]?[0-9]+[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[fF] {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}