int zBits;
const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS");
if (zEnv)
- zBits = _mesa_atoi(zEnv);
+ zBits = atoi(zEnv);
else
zBits = DEFAULT_SOFTWARE_DEPTH_BITS;
return zBits;
int aBits;
const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS");
if (aEnv)
- aBits = _mesa_atoi(aEnv);
+ aBits = atoi(aEnv);
else
aBits = 0;
return aBits;
int zBits;
const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS");
if (zEnv)
- zBits = _mesa_atoi(zEnv);
+ zBits = atoi(zEnv);
else
zBits = DEFAULT_SOFTWARE_DEPTH_BITS;
return zBits;
int aBits;
const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS");
if (aEnv)
- aBits = _mesa_atoi(aEnv);
+ aBits = atoi(aEnv);
else
aBits = 0;
return aBits;
}
}
-/** Wrapper around atoi() */
-int
-_mesa_atoi(const char *s)
-{
- return atoi(s);
-}
-
/** Wrapper around strtod() */
double
_mesa_strtod( const char *s, char **end )
* set *to any value*.
*/
#ifdef DEBUG
- debug = (env != NULL && _mesa_atoi(env) == 0) ? 0 : 1;
+ debug = (env != NULL && atoi(env) == 0) ? 0 : 1;
#else
debug = (env != NULL) ? 1 : 0;
#endif
extern char *
_mesa_strdup( const char *s );
-extern int
-_mesa_atoi( const char *s );
-
extern double
_mesa_strtod( const char *s, char **end );
imageSrc[2] != 'X') {
RETURN_ERROR1("Expected TEX# source");
}
- unit = _mesa_atoi((const char *) imageSrc + 3);
+ unit = atoi((const char *) imageSrc + 3);
if ((unit < 0 || unit > MAX_TEXTURE_IMAGE_UNITS) ||
(unit == 0 && (imageSrc[3] != '0' || imageSrc[4] != 0))) {
RETURN_ERROR1("Invalied TEX# source index");
RETURN_ERROR1("Expected R## or H##");
if (IsDigit(token[1])) {
- GLint reg = _mesa_atoi((const char *) (token + 1));
+ GLint reg = atoi((const char *) (token + 1));
if (token[0] == 'H')
reg += 32;
if (reg >= MAX_NV_FRAGMENT_PROGRAM_TEMPS)
if (IsDigit(token[0])) {
/* a numbered program parameter register */
- GLint reg = _mesa_atoi((const char *) token);
+ GLint reg = atoi((const char *) token);
if (reg >= MAX_NV_FRAGMENT_PROGRAM_PARAMS)
RETURN_ERROR1("Invalid constant program number");
*regNum = reg;
RETURN_ERROR1("Expected R##");
if (IsDigit(token[1])) {
- GLint reg = _mesa_atoi((char *) (token + 1));
+ GLint reg = atoi((char *) (token + 1));
if (reg >= MAX_NV_VERTEX_PROGRAM_TEMPS)
RETURN_ERROR1("Bad temporary register name");
*tempRegNum = reg;
if (IsDigit(token[0])) {
/* a numbered program parameter register */
- GLint reg = _mesa_atoi((char *) token);
+ GLint reg = atoi((char *) token);
if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS)
RETURN_ERROR1("Bad program parameter number");
*regNum = reg;
/* a numbered program parameter register */
GLint reg;
(void) Parse_Token(parseState, token);
- reg = _mesa_atoi((char *) token);
+ reg = atoi((char *) token);
if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS)
RETURN_ERROR1("Bad program parameter number");
srcReg->File = PROGRAM_ENV_PARAM;
RETURN_ERROR;
if (IsDigit(token[0])) {
- const GLint k = _mesa_atoi((char *) token);
+ const GLint k = atoi((char *) token);
if (sign == '-') {
if (k > 64)
RETURN_ERROR1("Bad address offset");
RETURN_ERROR1("Only v[0] accessible in vertex state programs");
if (IsDigit(token[0])) {
- GLint reg = _mesa_atoi((char *) token);
+ GLint reg = atoi((char *) token);
if (reg >= MAX_NV_VERTEX_PROGRAM_INPUTS)
RETURN_ERROR1("Bad vertex attribute register name");
*tempRegNum = reg;
location = _mesa_lookup_uniform(shProg->Uniforms, newName);
if (location >= 0) {
- const GLint element = _mesa_atoi(c + 1);
+ const GLint element = atoi(c + 1);
if (element > 0) {
/* get type of the uniform array element */
struct gl_program_parameter *p;