From: handa Date: Mon, 23 Nov 2009 23:26:41 +0000 (+0000) Subject: Include internal.h instead of otferror.h. X-Git-Tag: REL-0-9-11~31 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8004fd62c8bc4d08c289bcc5a7a09244f854c26a;p=m17n%2Flibotf.git Include internal.h instead of otferror.h. (prepare_drive_log): New function. (OTF_drive_gpos_internal): Make it static. (OTF_get_drive_log): New function. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index 72d2434..aca83bc 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -27,7 +27,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite #include #include "otf.h" -#include "otferror.h" +#include "internal.h" extern int debug_flag; @@ -121,6 +121,27 @@ gstring_subst (OTF *otf, OTF_GlyphString *gstring, int from, int to, int flag, return 0; } +static int +prepare_drive_log (OTF_DriveLog *log, int size) +{ + if (size > log->allocated) + { + OTF_Tag *tags; + int allocated = log->allocated; + + while (size > allocated) + allocated <<= 1; + tags = realloc (log->tags, sizeof (OTF_Tag) * log->allocated); + if (! tags) + return -1; + log->allocated = allocated; + log->tags = tags; + } + log->size = 0; + return 0; +} + + static int get_coverage_index (OTF_Coverage *coverage, OTF_GlyphID id) @@ -1779,7 +1800,7 @@ OTF_drive_gsub (OTF *otf, OTF_GlyphString *gstring, return OTF_drive_gsub_internal (otf, gstring, script, language, features, 0); } -int +static int OTF_drive_gpos_internal (OTF *otf, OTF_GlyphString *gstring, const char *script, const char *language, const char *features, @@ -2045,3 +2066,12 @@ OTF_iterate_gsub_feature (OTF *otf, OTF_Feature_Callback callback, return -1; return 0; } + +OTF_Tag * +OTF_get_drive_log (OTF *otf) +{ + OTF_DriveLog *log = get_drive_log (otf); + + return (log ? log->tags : NULL); +} +