mirror of https://github.com/mpv-player/mpv
vo_opengl: use misc/ctype.h instead of <ctype.h>
Locale-independent, and doesn't have the char vs. unsigned char problem. (Although in this case, the code was fine, because bstr.start is unsigned char.)
This commit is contained in:
parent
eacf4a7d9b
commit
2b6ac866c0
|
@ -15,9 +15,9 @@
|
||||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "misc/ctype.h"
|
||||||
#include "user_shaders.h"
|
#include "user_shaders.h"
|
||||||
|
|
||||||
static bool parse_rpn_szexpr(struct bstr line, struct szexp out[MAX_SZEXP_SIZE])
|
static bool parse_rpn_szexpr(struct bstr line, struct szexp out[MAX_SZEXP_SIZE])
|
||||||
|
@ -56,7 +56,7 @@ static bool parse_rpn_szexpr(struct bstr line, struct szexp out[MAX_SZEXP_SIZE])
|
||||||
case '<': exp->tag = SZEXP_OP2; exp->val.op = SZEXP_OP_LT; continue;
|
case '<': exp->tag = SZEXP_OP2; exp->val.op = SZEXP_OP_LT; continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdigit(word.start[0])) {
|
if (mp_isdigit(word.start[0])) {
|
||||||
exp->tag = SZEXP_CONST;
|
exp->tag = SZEXP_CONST;
|
||||||
if (bstr_sscanf(word, "%f", &exp->val.cval) != 1)
|
if (bstr_sscanf(word, "%f", &exp->val.cval) != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue