mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 11:38:16 +02:00
Move declarations above statements to satisfy pre-C99 compilers. Thanks to Michael Johnson <ahze@ahze.net>.
This commit is contained in:
parent
10deb4c4ae
commit
b6a2e10301
5 changed files with 17 additions and 14 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2004-11-12 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* 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@ahze.net>.
|
||||
|
||||
2004-11-09 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* test/text_rotate.c (NUM_TEXT): Increase size and increase number
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue