Browse Source

replace _mesa_strtof() with _mesa_strtod()

tags/vtx-0-2-21112003-freeze
Brian Paul 22 years ago
parent
commit
92d7935074
3 changed files with 11 additions and 11 deletions
  1. 5
    5
      src/mesa/main/imports.c
  2. 3
    3
      src/mesa/main/imports.h
  3. 3
    3
      src/mesa/main/nvfragparse.c

+ 5
- 5
src/mesa/main/imports.c View File

@@ -1,4 +1,4 @@
/* $Id: imports.c,v 1.30 2003/01/19 15:27:38 brianp Exp $ */
/* $Id: imports.c,v 1.31 2003/02/08 15:56:34 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -378,13 +378,13 @@ _mesa_atoi(const char *s)
}


float
_mesa_strtof( const char *s, char **end )
double
_mesa_strtod( const char *s, char **end )
{
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strtof(s, end);
return xf86strtod(s, end);
#else
return (float) strtod(s, end);
return strtod(s, end);
#endif
}


+ 3
- 3
src/mesa/main/imports.h View File

@@ -1,4 +1,4 @@
/* $Id: imports.h,v 1.11 2003/01/14 03:05:38 brianp Exp $ */
/* $Id: imports.h,v 1.12 2003/02/08 15:56:34 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -173,8 +173,8 @@ _mesa_strdup( const char *s );
extern int
_mesa_atoi( const char *s );

extern float
_mesa_strtof( const char *s, char **end );
extern double
_mesa_strtod( const char *s, char **end );

extern int
_mesa_sprintf( char *str, const char *fmt, ... );

+ 3
- 3
src/mesa/main/nvfragparse.c View File

@@ -1,10 +1,10 @@
/* $Id: nvfragparse.c,v 1.2 2003/01/19 15:27:37 brianp Exp $ */
/* $Id: nvfragparse.c,v 1.3 2003/02/08 15:56:34 brianp Exp $ */

/*
* Mesa 3-D graphics library
* Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -484,7 +484,7 @@ Parse_ScalarConstant(const char **s, GLfloat *number)
{
char *end;

*number = _mesa_strtof(*s, &end);
*number = (GLfloat) _mesa_strtod(*s, &end);

if (end && end > *s) {
/* got a number */

Loading…
Cancel
Save