[cairo-commit] cairo/src cairo_font.c, 1.27, 1.28 cairo_ft_font.c, 1.26, 1.27

Carl Worth commit at pdx.freedesktop.org
Fri Nov 12 06:12:22 PST 2004


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv25821/src

Modified Files:
	cairo_font.c cairo_ft_font.c 
Log Message:

        * 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 <ahze at ahze.net>.


Index: cairo_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_font.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- cairo_font.c	22 Oct 2004 01:40:50 -0000	1.27
+++ cairo_font.c	12 Nov 2004 14:12:20 -0000	1.28
@@ -54,9 +54,9 @@
 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 @@
 			  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

Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cairo_ft_font.c	5 Nov 2004 18:57:50 -0000	1.26
+++ cairo_ft_font.c	12 Nov 2004 14:12:20 -0000	1.27
@@ -481,6 +481,9 @@
 			       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 @@
     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)




More information about the cairo-commit mailing list