diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-21 01:14:13 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-23 02:36:53 +0300 |
commit | ef19a23fa852ae419679b74f690363bb39701709 (patch) | |
tree | f69fe2a5caea2c2c8a87c56690dab4cd6bb3d752 /libass/ass_fontselect.c | |
parent | c03ca8b8e0124ab6149b602d35693b8c65d59865 (diff) | |
download | libass-ef19a23fa852ae419679b74f690363bb39701709.tar.bz2 libass-ef19a23fa852ae419679b74f690363bb39701709.tar.xz |
fontselect: use stdbool.h wherever appropriate
Diffstat (limited to 'libass/ass_fontselect.c')
-rw-r--r-- | libass/ass_fontselect.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 2f577f1..e179ed9 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -110,12 +110,12 @@ struct font_data_ft { int idx; }; -static int check_glyph_ft(void *data, uint32_t codepoint) +static bool check_glyph_ft(void *data, uint32_t codepoint) { FontDataFT *fd = (FontDataFT *)data; if (!codepoint) - return 1; + return true; return !!FT_Get_Char_Index(fd->face, codepoint); } @@ -243,7 +243,7 @@ static void ass_font_provider_free_fontinfo(ASS_FontInfo *info) * \param data private data for the font * \return success */ -int +bool ass_font_provider_add_font(ASS_FontProvider *provider, ASS_FontProviderMetaData *meta, const char *path, int index, void *data) @@ -343,11 +343,11 @@ ass_font_provider_add_font(ASS_FontProvider *provider, info->provider = provider; selector->n_font++; - return 0; + return false; error: ass_font_provider_free_fontinfo(info); - return 1; + return true; } /** @@ -487,7 +487,7 @@ static void font_info_dump(ASS_FontInfo *font_infos, size_t len) } #endif -static int check_glyph(ASS_FontInfo *fi, uint32_t code) +static bool check_glyph(ASS_FontInfo *fi, uint32_t code) { ASS_FontProvider *provider = fi->provider; assert(provider && provider->funcs.check_glyph); @@ -727,7 +727,7 @@ char *ass_font_select(ASS_FontSelector *priv, ASS_Library *library, * \param info metadata, returned here * \return success */ -static int +static bool get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info) { int i; @@ -742,7 +742,7 @@ get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info) // we're only interested in outlines if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) - return 0; + return false; for (i = 0; i < num_names; i++) { FT_SfntName name; @@ -816,7 +816,7 @@ get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info) info->n_fullname = num_fullname; } - return 0; + return false; error: for (i = 0; i < num_family; i++) @@ -829,7 +829,7 @@ error: free(info->fullnames); free(postscript_name); - return 1; + return true; } /** |