summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorMarcin BaczyƄski <marbacz@gmail.com>2010-03-13 14:26:45 +0100
committerIan Romanick <ian.d.romanick@intel.com>2010-03-15 08:38:24 -0700
commit346298c7658f2ec8b105e5e53101637af232724f (patch)
tree986b382e8be6eba02eb2fa213fad1efd1782fa8b /src/mesa/shader
parent63af29bfbe265318bcf5be69e420de361b900321 (diff)
Replace _mesa_strtod with _mesa_strtof.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/lex.yy.c8
-rw-r--r--src/mesa/shader/nvfragparse.c2
-rw-r--r--src/mesa/shader/program_lexer.l8
-rw-r--r--src/mesa/shader/slang/slang_compile.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c
index a08617ff8d4..4c5c644a6ed 100644
--- a/src/mesa/shader/lex.yy.c
+++ b/src/mesa/shader/lex.yy.c
@@ -2198,7 +2198,7 @@ case 142:
YY_RULE_SETUP
#line 326 "program_lexer.l"
{
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
YY_BREAK
@@ -2210,7 +2210,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 330 "program_lexer.l"
{
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
YY_BREAK
@@ -2218,7 +2218,7 @@ case 144:
YY_RULE_SETUP
#line 334 "program_lexer.l"
{
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
YY_BREAK
@@ -2226,7 +2226,7 @@ case 145:
YY_RULE_SETUP
#line 338 "program_lexer.l"
{
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
YY_BREAK
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index d03cb4e493b..0de3c5804d2 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -456,7 +456,7 @@ Parse_ScalarConstant(struct parse_state *parseState, GLfloat *number)
{
char *end = NULL;
- *number = (GLfloat) _mesa_strtod((const char *) parseState->pos, &end);
+ *number = (GLfloat) _mesa_strtof((const char *) parseState->pos, &end);
if (end && end > (char *) parseState->pos) {
/* got a number */
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index b00765793dc..fe18272cdba 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -324,19 +324,19 @@ ARRAYSHADOW2D { return_token_or_IDENTIFIER(require_ARB_fp && require
return INTEGER;
}
{num}?{frac}{exp}? {
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
{num}"."/[^.] {
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
{num}{exp} {
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
{num}"."{exp} {
- yylval->real = (float) _mesa_strtod(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
}
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index b95c15fea61..ad866761570 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -246,7 +246,7 @@ parse_general_number(slang_parse_ctx *ctx, float *number)
if (flt[strlen(flt) - 1] == 'f' || flt[strlen(flt) - 1] == 'F') {
flt[strlen(flt) - 1] = '\0';
}
- *number = (float)_mesa_strtod(flt, (char **)NULL);
+ *number = _mesa_strtof(flt, (char **)NULL);
free(flt);
return 1;
@@ -312,7 +312,7 @@ parse_float(slang_parse_ctx * C, float *number)
slang_string_concat(whole, "E");
slang_string_concat(whole, exponent);
- *number = (float) (_mesa_strtod(whole, (char **) NULL));
+ *number = _mesa_strtof(whole, (char **) NULL);
_slang_free(whole);
}