diff options
author | Carl Worth <cworth@cworth.org> | 2004-11-12 06:12:20 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2004-11-12 06:12:20 +0000 |
commit | b6a2e10301a6670b9678afcc7fda8c1826dd72c8 (patch) | |
tree | 6fd81878b56e69648e75ebe3106ffe76d7a3d897 /src | |
parent | 10deb4c4ae149cb3677f84aef0a8f72d4e919074 (diff) |
Move declarations above statements to satisfy pre-C99 compilers. Thanks to Michael Johnson <ahze@ahze.net>.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-font.c | 5 | ||||
-rw-r--r-- | src/cairo-ft-font.c | 7 | ||||
-rw-r--r-- | src/cairo_font.c | 5 | ||||
-rw-r--r-- | src/cairo_ft_font.c | 7 |
4 files changed, 10 insertions, 14 deletions
diff --git a/src/cairo-font.c b/src/cairo-font.c index 5ad9f041..81ead6a1 100644 --- a/src/cairo-font.c +++ b/src/cairo-font.c @@ -54,9 +54,9 @@ typedef struct { static unsigned long _font_cache_hash (void *cache, void *key) { + unsigned long hash; cairo_font_cache_key_t *in; in = (cairo_font_cache_key_t *) key; - unsigned long hash; /* 1607 and 1451 are just a couple random primes. */ hash = _cairo_hash_string (in->family); @@ -86,12 +86,11 @@ _font_cache_create_entry (void *cache, void *key, void **return_value) { + const struct cairo_font_backend *backend = CAIRO_FONT_BACKEND_DEFAULT; cairo_font_cache_key_t *k; cairo_font_cache_entry_t *entry; k = (cairo_font_cache_key_t *) key; - const struct cairo_font_backend *backend = CAIRO_FONT_BACKEND_DEFAULT; - /* XXX: The current freetype backend may return NULL, (for example * if no fonts are installed), but I would like to guarantee that * the toy API always returns at least *some* font, so I would diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index ca1dc218..8a6dcb77 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -481,6 +481,9 @@ _cairo_ft_font_text_to_glyphs (void *abstract_font, cairo_glyph_t **glyphs, int *nglyphs) { + double x = 0., y = 0.; + size_t i; + FT_ULong *ucs4 = NULL; cairo_ft_font_t *font = abstract_font; FT_Face face = font->val->face; cairo_glyph_cache_key_t key; @@ -490,10 +493,6 @@ _cairo_ft_font_text_to_glyphs (void *abstract_font, key.unscaled = &font->base; key.scale = *sc; - double x = 0., y = 0.; - size_t i; - FT_ULong *ucs4 = NULL; - _utf8_to_ucs4 (utf8, &ucs4, nglyphs); if (ucs4 == NULL) diff --git a/src/cairo_font.c b/src/cairo_font.c index 5ad9f041..81ead6a1 100644 --- a/src/cairo_font.c +++ b/src/cairo_font.c @@ -54,9 +54,9 @@ typedef struct { static unsigned long _font_cache_hash (void *cache, void *key) { + unsigned long hash; cairo_font_cache_key_t *in; in = (cairo_font_cache_key_t *) key; - unsigned long hash; /* 1607 and 1451 are just a couple random primes. */ hash = _cairo_hash_string (in->family); @@ -86,12 +86,11 @@ _font_cache_create_entry (void *cache, void *key, void **return_value) { + const struct cairo_font_backend *backend = CAIRO_FONT_BACKEND_DEFAULT; cairo_font_cache_key_t *k; cairo_font_cache_entry_t *entry; k = (cairo_font_cache_key_t *) key; - const struct cairo_font_backend *backend = CAIRO_FONT_BACKEND_DEFAULT; - /* XXX: The current freetype backend may return NULL, (for example * if no fonts are installed), but I would like to guarantee that * the toy API always returns at least *some* font, so I would diff --git a/src/cairo_ft_font.c b/src/cairo_ft_font.c index ca1dc218..8a6dcb77 100644 --- a/src/cairo_ft_font.c +++ b/src/cairo_ft_font.c @@ -481,6 +481,9 @@ _cairo_ft_font_text_to_glyphs (void *abstract_font, cairo_glyph_t **glyphs, int *nglyphs) { + double x = 0., y = 0.; + size_t i; + FT_ULong *ucs4 = NULL; cairo_ft_font_t *font = abstract_font; FT_Face face = font->val->face; cairo_glyph_cache_key_t key; @@ -490,10 +493,6 @@ _cairo_ft_font_text_to_glyphs (void *abstract_font, key.unscaled = &font->base; key.scale = *sc; - double x = 0., y = 0.; - size_t i; - FT_ULong *ucs4 = NULL; - _utf8_to_ucs4 (utf8, &ucs4, nglyphs); if (ucs4 == NULL) |