[cairo-commit] 2 commits - src/cairoint.h src/cairo-type1-subset.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jul 18 07:31:18 UTC 2021
src/cairo-type1-subset.c | 2 +-
src/cairoint.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit ff2a95d6e5e12c5930d451401024f8521446c997
Merge: a6f7c20be 30a0ae56d
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Sun Jul 18 07:31:16 2021 +0000
Merge branch 'isxdigit' into 'master'
Create cairo version of isxdigit()
Closes #335
See merge request cairo/cairo!199
commit 30a0ae56d8eaf7735d6f4a8a889e9c54bc0debc1
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Sun Jul 18 08:42:16 2021 +0930
Create cairo version of isxdigit()
Fixes #335
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index a51e34f62..c7ab367e8 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -254,7 +254,7 @@ cairo_type1_font_subset_find_segments (cairo_type1_font_subset_t *font)
font->eexec_segment = (char *) p + font->header_segment_size;
font->eexec_segment_is_ascii = TRUE;
for (i = 0; i < 4; i++) {
- if (!isxdigit(font->eexec_segment[i]))
+ if (!_cairo_isxdigit (font->eexec_segment[i]))
font->eexec_segment_is_ascii = FALSE;
}
}
diff --git a/src/cairoint.h b/src/cairoint.h
index 03ca09c10..832d80f3f 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -286,6 +286,12 @@ _cairo_isdigit (int c)
return (c >= '0' && c <= '9');
}
+static inline int cairo_const
+_cairo_isxdigit (int c)
+{
+ return ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
+}
+
static inline int cairo_const
_cairo_isalpha (int c)
{
More information about the cairo-commit
mailing list