diff options
Diffstat (limited to '')
-rw-r--r-- | libfonts_decode_font_description.c | 7 | ||||
-rw-r--r-- | libfonts_encode_font_description.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libfonts_decode_font_description.c b/libfonts_decode_font_description.c index 7a8591d..46031de 100644 --- a/libfonts_decode_font_description.c +++ b/libfonts_decode_font_description.c @@ -16,11 +16,13 @@ X(average_width)\ X(charset_registry) + struct range { uint32_t first; uint32_t last; }; + static int parse_hexadecimal(const char *s, const char **endp, uint32_t *valuep) { @@ -42,6 +44,7 @@ parse_hexadecimal(const char *s, const char **endp, uint32_t *valuep) return 0; } + static int parse_decimal(const char *s, const char **endp, uint32_t *valuep) { @@ -58,6 +61,7 @@ parse_decimal(const char *s, const char **endp, uint32_t *valuep) return 0; } + static int parse_number(const char *s, const char **endp, uint32_t *valuep) { @@ -67,6 +71,7 @@ parse_number(const char *s, const char **endp, uint32_t *valuep) return parse_decimal(&s[0], endp, valuep); } + static int cmprange(const void *av, const void *bv) { @@ -74,6 +79,7 @@ cmprange(const void *av, const void *bv) return a->first < b->first ? -1 : a->first > b->first; } + static int fix_charset_subset(char *out, const char *in) { @@ -130,6 +136,7 @@ fix_charset_subset(char *out, const char *in) return 0; } + int libfonts_decode_font_description(struct libfonts_font_description *desc, const char *in) { diff --git a/libfonts_encode_font_description.c b/libfonts_encode_font_description.c index b594754..5bbac5f 100644 --- a/libfonts_encode_font_description.c +++ b/libfonts_encode_font_description.c @@ -26,6 +26,7 @@ encode(char *out, const char *s) return out; } + static char * encode_range(char *out, const char *s) { @@ -38,6 +39,7 @@ encode_range(char *out, const char *s) return out; } + int libfonts_encode_font_description(const struct libfonts_font_description *desc, char out[static 256]) { |