From 763f5a9d014656c09c4684bc69a0e45862882f43 Mon Sep 17 00:00:00 2001 From: Samuel Degrande Date: Wed, 2 Sep 2009 16:27:22 +0100 Subject: [PATCH] DOT3_RGB[A] cannot be used in a Blend String The blend string compiler checks that the syntax of a function name is [A-Za-z_]*, preventing the use of DOT3_RGB[A]. Signed-off-by: Emmanuele Bassi --- clutter/cogl/common/cogl-blend-string.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clutter/cogl/common/cogl-blend-string.c b/clutter/cogl/common/cogl-blend-string.c index c13a24545..0df732d20 100644 --- a/clutter/cogl/common/cogl-blend-string.c +++ b/clutter/cogl/common/cogl-blend-string.c @@ -482,6 +482,12 @@ is_symbol_char (const char c) return (g_ascii_isalpha (c) || c == '_') ? TRUE : FALSE; } +static gboolean +is_alphanum_char (const char c) +{ + return (g_ascii_isalnum (c) || c == '_') ? TRUE : FALSE; +} + static gboolean parse_argument (const char *string, /* original user string */ const char **ret_p, /* start of argument IN:OUT */ @@ -845,7 +851,7 @@ _cogl_blend_string_compile (const char *string, case PARSER_STATE_SCRAPING_FUNCTION_NAME: if (*p != '(') { - if (!is_symbol_char (*p)) + if (!is_alphanum_char (*p)) { error_string = "non alpha numeric character in function" "name";