Merge remote branch 'jrmuizel/master'

This commit is contained in:
Behdad Esfahbod 2010-05-03 22:46:52 -04:00
commit 6b84198f9d
4 changed files with 14 additions and 6 deletions

View File

@ -62,7 +62,7 @@ typedef struct {
#define HB_DEBUG_OBJECT HB_DEBUG+0 #define HB_DEBUG_OBJECT HB_DEBUG+0
#endif #endif
static HB_UNUSED inline hb_bool_t /* always returns TRUE */ static inline hb_bool_t /* always returns TRUE */
_hb_object_debug_out (const void *obj, _hb_object_debug_out (const void *obj,
hb_reference_count_t *ref_count, hb_reference_count_t *ref_count,
const char *function) const char *function)

View File

@ -193,6 +193,8 @@ struct OpenTypeFontFile
static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O');
static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 );
static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f');
static const hb_tag_t TrueTag = HB_TAG ('t','r','u','e');
static const hb_tag_t Typ1Tag = HB_TAG ('t','y','p','1');
inline hb_tag_t get_tag (void) const { return u.tag; } inline hb_tag_t get_tag (void) const { return u.tag; }
@ -200,6 +202,8 @@ struct OpenTypeFontFile
{ {
switch (u.tag) { switch (u.tag) {
case CFFTag: /* All the non-collection tags */ case CFFTag: /* All the non-collection tags */
case TrueTag:
case Typ1Tag:
case TrueTypeTag: return 1; case TrueTypeTag: return 1;
case TTCTag: return u.ttcHeader->get_face_count (); case TTCTag: return u.ttcHeader->get_face_count ();
default: return 0; default: return 0;
@ -212,6 +216,8 @@ struct OpenTypeFontFile
* Apple dfont container is a container of SFNT's. So each SFNT is a * Apple dfont container is a container of SFNT's. So each SFNT is a
* non-TTC, but the index is more than zero. */ * non-TTC, but the index is more than zero. */
case CFFTag: /* All the non-collection tags */ case CFFTag: /* All the non-collection tags */
case TrueTag:
case Typ1Tag:
case TrueTypeTag: return u.fontFace[0]; case TrueTypeTag: return u.fontFace[0];
case TTCTag: return u.ttcHeader->get_face (i); case TTCTag: return u.ttcHeader->get_face (i);
default: return Null(OpenTypeFontFace); default: return Null(OpenTypeFontFace);
@ -223,6 +229,8 @@ struct OpenTypeFontFile
if (!SANITIZE (u.tag)) return false; if (!SANITIZE (u.tag)) return false;
switch (u.tag) { switch (u.tag) {
case CFFTag: /* All the non-collection tags */ case CFFTag: /* All the non-collection tags */
case TrueTag:
case Typ1Tag:
case TrueTypeTag: return u.fontFace->sanitize (SANITIZE_ARG); case TrueTypeTag: return u.fontFace->sanitize (SANITIZE_ARG);
case TTCTag: return u.ttcHeader->sanitize (SANITIZE_ARG); case TTCTag: return u.ttcHeader->sanitize (SANITIZE_ARG);
default: return true; default: return true;

View File

@ -168,7 +168,7 @@ _hb_sanitize_fini (hb_sanitize_context_t *context HB_UNUSED,
hb_blob_unlock (blob); hb_blob_unlock (blob);
} }
static HB_UNUSED inline bool static inline bool
_hb_sanitize_check (SANITIZE_ARG_DEF, _hb_sanitize_check (SANITIZE_ARG_DEF,
const char *base, const char *base,
unsigned int len) unsigned int len)
@ -188,7 +188,7 @@ _hb_sanitize_check (SANITIZE_ARG_DEF,
return ret; return ret;
} }
static HB_UNUSED inline bool static inline bool
_hb_sanitize_array (SANITIZE_ARG_DEF, _hb_sanitize_array (SANITIZE_ARG_DEF,
const char *base, const char *base,
unsigned int record_size, unsigned int record_size,
@ -208,7 +208,7 @@ _hb_sanitize_array (SANITIZE_ARG_DEF,
return HB_LIKELY (!overflows) && _hb_sanitize_check (SANITIZE_ARG, base, record_size * len); return HB_LIKELY (!overflows) && _hb_sanitize_check (SANITIZE_ARG, base, record_size * len);
} }
static HB_UNUSED inline bool static inline bool
_hb_sanitize_edit (SANITIZE_ARG_DEF, _hb_sanitize_edit (SANITIZE_ARG_DEF,
const char *base HB_UNUSED, const char *base HB_UNUSED,
unsigned int len HB_UNUSED) unsigned int len HB_UNUSED)

View File

@ -161,7 +161,7 @@
* in libgcc in case a target does not have one, which should be just as * in libgcc in case a target does not have one, which should be just as
* good as the open-coded solution below, (which is "HACKMEM 169"). * good as the open-coded solution below, (which is "HACKMEM 169").
*/ */
static HB_UNUSED inline unsigned int static inline unsigned int
_hb_popcount32 (uint32_t mask) _hb_popcount32 (uint32_t mask)
{ {
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@ -240,7 +240,7 @@ typedef int hb_mutex_t;
#define HB_DEBUG 0 #define HB_DEBUG 0
#endif #endif
static HB_UNUSED inline hb_bool_t /* always returns TRUE */ static inline hb_bool_t /* always returns TRUE */
_hb_trace (const char *what, _hb_trace (const char *what,
const char *function, const char *function,
const void *obj, const void *obj,