diff --git a/ChangeLog b/ChangeLog index 26e6ca2f0..c7ff0a898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-11-12 Carl Worth + + * src/cairo_font.c (_font_cache_hash, _font_cache_create_entry): + * src/cairo_ft_font.c (_cairo_ft_font_text_to_glyphs): Move + declarations above statements to satisfy pre-C99 compilers. Thanks + to Michael Johnson . + 2004-11-09 Carl Worth * test/text_rotate.c (NUM_TEXT): Increase size and increase number diff --git a/src/cairo-font.c b/src/cairo-font.c index 5ad9f0417..81ead6a1b 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 ca1dc2182..8a6dcb777 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 5ad9f0417..81ead6a1b 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 ca1dc2182..8a6dcb777 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)