diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2022-04-09 21:54:38 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2022-04-09 22:08:57 +0930 |
commit | 5b18aeffbbd1641962f2ae374a3cb773fe7a6d6e (patch) | |
tree | 372b56c4369e8d49856ac74e98c17a716cb6efc3 /boilerplate | |
parent | 20a54465c597b4f90ab35d73cab25b6e89dfa9bb (diff) | |
download | cairo-5b18aeffbbd1641962f2ae374a3cb773fe7a6d6e.tar.gz |
Replace use of ctype functions with internal version where only ASCII chars are used
In !309 Taylor R Campbell found a number of instances of ctype
incorrectly passed a signed char. In many cases, where only ASCII
characters are used, the code should have been using the cairo version
of the ctype function to avoid locale issues.
Diffstat (limited to 'boilerplate')
-rw-r--r-- | boilerplate/cairo-boilerplate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index c5d3ad236..a3e710f08 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -30,6 +30,7 @@ #include <pixman.h> +#include <cairo-ctype-inline.h> #include <cairo-types-private.h> #include <cairo-scaled-font-private.h> @@ -39,7 +40,6 @@ #include <stddef.h> #include <stdlib.h> -#include <ctype.h> #include <assert.h> #include <errno.h> @@ -561,7 +561,7 @@ _cairo_boilerplate_target_matches_name (const cairo_boilerplate_target_t *target if (! (name_len == 1 && 0 == strncmp (tname, "?", 1))) { /* wildcard? */ if (0 != strncmp (target->name, tname, name_len)) /* exact match? */ return FALSE; - if (isalnum (target->name[name_len])) + if (_cairo_isalnum (target->name[name_len])) return FALSE; } |