Merge branch 'isxdigit' into 'master'

Create cairo version of isxdigit()

Closes #335

See merge request cairo/cairo!199
This commit is contained in:
Adrian Johnson 2021-07-18 07:31:16 +00:00
commit ff2a95d6e5
2 changed files with 7 additions and 1 deletions

View file

@ -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;
}
}

View file

@ -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)
{