From 446d7a2cce64aeee26b94f59a3f518e61c6d5c41 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 19 Aug 2009 16:17:24 -0400 Subject: [PATCH] [HB] s/writeable/writable/g --- pango/opentype/hb-blob.c | 38 +++++++++++++++++----------------- pango/opentype/hb-blob.h | 10 ++++----- pango/opentype/hb-open-type-private.hh | 6 +++--- pango/pango-ot-info.c | 4 ++-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pango/opentype/hb-blob.c b/pango/opentype/hb-blob.c index 68dcfc1..a1ab7f3 100644 --- a/pango/opentype/hb-blob.c +++ b/pango/opentype/hb-blob.c @@ -111,7 +111,7 @@ hb_blob_create (const char *data, if (blob->mode == HB_MEMORY_MODE_DUPLICATE) { blob->mode = HB_MEMORY_MODE_READONLY; - if (!hb_blob_try_writeable (blob)) { + if (!hb_blob_try_writable (blob)) { hb_blob_destroy (blob); return &_hb_blob_nil; } @@ -218,7 +218,7 @@ hb_blob_unlock (hb_blob_t *blob) } hb_bool_t -hb_blob_is_writeable (hb_blob_t *blob) +hb_blob_is_writable (hb_blob_t *blob) { hb_memory_mode_t mode; @@ -231,12 +231,12 @@ hb_blob_is_writeable (hb_blob_t *blob) hb_mutex_unlock (blob->lock); - return mode == HB_MEMORY_MODE_WRITEABLE; + return mode == HB_MEMORY_MODE_WRITABLE; } static hb_bool_t -_try_make_writeable_inplace_unix_locked (hb_blob_t *blob) +_try_make_writable_inplace_unix_locked (hb_blob_t *blob) { #if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT) unsigned int pagesize = -1, mask, length; @@ -276,7 +276,7 @@ _try_make_writeable_inplace_unix_locked (hb_blob_t *blob) } #if HB_DEBUG - fprintf (stderr, "%p %s: successfully made [%p..%p] (%d bytes) writeable\n", + fprintf (stderr, "%p %s: successfully made [%p..%p] (%d bytes) writable\n", blob, __FUNCTION__, addr, addr+length, length); #endif @@ -288,7 +288,7 @@ _try_make_writeable_inplace_unix_locked (hb_blob_t *blob) hb_bool_t -hb_blob_try_writeable_inplace (hb_blob_t *blob) +hb_blob_try_writable_inplace (hb_blob_t *blob) { hb_memory_mode_t mode; @@ -297,22 +297,22 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob) hb_mutex_lock (blob->lock); - if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE) { + if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE) { #if HB_DEBUG - fprintf (stderr, "%p %s: making writeable\n", blob, __FUNCTION__); + fprintf (stderr, "%p %s: making writable\n", blob, __FUNCTION__); #endif - if (_try_make_writeable_inplace_unix_locked (blob)) { + if (_try_make_writable_inplace_unix_locked (blob)) { #if HB_DEBUG - fprintf (stderr, "%p %s: making writeable -> succeeded\n", blob, __FUNCTION__); + fprintf (stderr, "%p %s: making writable -> succeeded\n", blob, __FUNCTION__); #endif - blob->mode = HB_MEMORY_MODE_WRITEABLE; + blob->mode = HB_MEMORY_MODE_WRITABLE; } else { #if HB_DEBUG - fprintf (stderr, "%p %s: making writeable -> FAILED\n", blob, __FUNCTION__); + fprintf (stderr, "%p %s: making writable -> FAILED\n", blob, __FUNCTION__); #endif - /* Failed to make writeable inplace, mark that */ + /* Failed to make writable inplace, mark that */ blob->mode = HB_MEMORY_MODE_READONLY; } } @@ -321,11 +321,11 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob) hb_mutex_unlock (blob->lock); - return mode == HB_MEMORY_MODE_WRITEABLE; + return mode == HB_MEMORY_MODE_WRITABLE; } hb_bool_t -hb_blob_try_writeable (hb_blob_t *blob) +hb_blob_try_writable (hb_blob_t *blob) { hb_memory_mode_t mode; @@ -356,7 +356,7 @@ hb_blob_try_writeable (hb_blob_t *blob) #endif memcpy (new_data, blob->data, blob->length); blob->data = new_data; - blob->mode = HB_MEMORY_MODE_WRITEABLE; + blob->mode = HB_MEMORY_MODE_WRITABLE; _hb_blob_destroy_user_data (blob); } } @@ -366,8 +366,8 @@ done: hb_mutex_unlock (blob->lock); - if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE) - return hb_blob_try_writeable_inplace (blob); + if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE) + return hb_blob_try_writable_inplace (blob); - return mode == HB_MEMORY_MODE_WRITEABLE; + return mode == HB_MEMORY_MODE_WRITABLE; } diff --git a/pango/opentype/hb-blob.h b/pango/opentype/hb-blob.h index 1dd26f4..1a58f15 100644 --- a/pango/opentype/hb-blob.h +++ b/pango/opentype/hb-blob.h @@ -34,9 +34,9 @@ HB_BEGIN_DECLS typedef enum { HB_MEMORY_MODE_DUPLICATE, HB_MEMORY_MODE_READONLY, - HB_MEMORY_MODE_WRITEABLE, + HB_MEMORY_MODE_WRITABLE, HB_MEMORY_MODE_READONLY_NEVER_DUPLICATE, - HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE } hb_memory_mode_t; typedef struct _hb_blob_t hb_blob_t; @@ -75,13 +75,13 @@ void hb_blob_unlock (hb_blob_t *blob); hb_bool_t -hb_blob_is_writeable (hb_blob_t *blob); +hb_blob_is_writable (hb_blob_t *blob); hb_bool_t -hb_blob_try_writeable_inplace (hb_blob_t *blob); +hb_blob_try_writable_inplace (hb_blob_t *blob); hb_bool_t -hb_blob_try_writeable (hb_blob_t *blob); +hb_blob_try_writable (hb_blob_t *blob); HB_END_DECLS diff --git a/pango/opentype/hb-open-type-private.hh b/pango/opentype/hb-open-type-private.hh index 075dc83..59e0fb5 100644 --- a/pango/opentype/hb-open-type-private.hh +++ b/pango/opentype/hb-open-type-private.hh @@ -217,7 +217,7 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF, const char *base HB_GNUC_UNUSED, unsigned int len HB_GNUC_UNUSED) { - bool perm = hb_blob_try_writeable_inplace (context->blob); + bool perm = hb_blob_try_writable_inplace (context->blob); context->edit_count++; #if HB_DEBUG @@ -298,8 +298,8 @@ struct Sanitizer } else { unsigned int edit_count = context.edit_count; _hb_sanitize_fini (&context, true); - if (edit_count && !hb_blob_is_writeable (blob) && hb_blob_try_writeable (blob)) { - /* ok, we made it writeable by relocating. try again */ + if (edit_count && !hb_blob_is_writable (blob) && hb_blob_try_writable (blob)) { + /* ok, we made it writable by relocating. try again */ #if HB_DEBUG fprintf (stderr, "Sanitizer %p retry %s\n", blob, __PRETTY_FUNCTION__); #endif diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c index cade38f..4e7571d 100644 --- a/pango/pango-ot-info.c +++ b/pango/pango-ot-info.c @@ -111,7 +111,7 @@ _get_table (hb_tag_t tag, void *user_data) return hb_blob_create_empty (); return hb_blob_create ((const char *) buffer, length, - HB_MEMORY_MODE_WRITEABLE, + HB_MEMORY_MODE_WRITABLE, g_free, NULL); } @@ -149,7 +149,7 @@ pango_ot_info_get (FT_Face face) blob = hb_blob_create ((const char *) face->stream->base, (unsigned int) face->stream->size, - HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, NULL, NULL); info->hb_face = hb_face_create_for_data (blob, face->face_index); hb_blob_destroy (blob); -- 2.7.4