Lines Matching refs:endptr
165 static lua_Number lua_strx2number (const char *s, char **endptr) { in lua_strx2number() argument
173 *endptr = cast_charp(s); /* nothing is valid yet */ in lua_strx2number()
195 *endptr = cast_charp(s); /* valid up to here */ in lua_strx2number()
208 *endptr = cast_charp(s); /* valid up to here */ in lua_strx2number()
229 char *endptr; in l_str2dloc() local
230 *result = (mode == 'x') ? lua_strx2number(s, &endptr) /* try to convert */ in l_str2dloc()
231 : lua_str2number(s, &endptr); in l_str2dloc()
232 if (endptr == s) return NULL; /* nothing recognized? */ in l_str2dloc()
233 while (lisspace(cast_uchar(*endptr))) endptr++; /* skip trailing spaces */ in l_str2dloc()
234 return (*endptr == '\0') ? endptr : NULL; /* OK iff no trailing chars */ in l_str2dloc()
252 const char *endptr; in l_str2d() local
257 endptr = l_str2dloc(s, result, mode); /* try to convert */ in l_str2d()
258 if (endptr == NULL) { /* failed? may be a different locale */ in l_str2d()
265 endptr = l_str2dloc(buff, result, mode); /* try again */ in l_str2d()
266 if (endptr != NULL) in l_str2d()
267 endptr = s + (endptr - buff); /* make relative to 's' */ in l_str2d()
269 return endptr; in l_str2d()