mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 04:58:04 +02:00
Fixes to eliminate a few compiler warnings. Bump version to 0.1.8 for recent font API changes.
This commit is contained in:
parent
6498351f49
commit
965ab2ff55
8 changed files with 40 additions and 50 deletions
19
ChangeLog
19
ChangeLog
|
|
@ -1,5 +1,24 @@
|
|||
2003-10-24 Carl Worth <cworth@east.isi.edu>
|
||||
|
||||
* src/cairo_ft_font.c (_init_cairo_ft_lib): Fix missing void from
|
||||
function prototype.
|
||||
(_utf8_to_ucs4): Mark static.
|
||||
|
||||
* src/cairo_xlib_surface.c: Remove unused function
|
||||
_cairo_xlib_surface_get_picture.
|
||||
|
||||
* src/cairo_ft_font.c (_cairo_ft_font_copy)
|
||||
(_cairo_ft_font_glyph_extents, _cairo_ft_font_glyph_path):
|
||||
Internal functions can't receive a NULL font pointer.
|
||||
|
||||
* src/cairo.c (cairo_text_extents, cairo_glyph_extents)
|
||||
(cairo_text_path, cairo_glyph_path): Comment-out functions without
|
||||
complete implementations to squelch compiler warnings.
|
||||
|
||||
* configure.in: Bump version to 0.1.8 for font API changes.
|
||||
|
||||
* src/cairo.c (cairo_current_font): Fix missing return value.
|
||||
|
||||
* src/cairoint.h: No need for CAIRO_INT_STATUS_NULL_POINTER
|
||||
(CAIRO_FONT_BACKEND_DEFAULT): Move declaration of default font
|
||||
backend up into cairoint.h
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ AC_INIT(src/cairo.h)
|
|||
dnl ===========================================================================
|
||||
|
||||
# Package version number, (as distinct from shared library version)
|
||||
CAIRO_VERSION=0.1.7
|
||||
CAIRO_VERSION=0.1.8
|
||||
|
||||
# libtool shared library version
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ typedef struct {
|
|||
+ ((double)((t) & 0xFFFF) / 65535.0))
|
||||
|
||||
static FT_Library _cairo_ft_lib = NULL;
|
||||
static int _init_cairo_ft_lib ()
|
||||
static int
|
||||
_init_cairo_ft_lib (void)
|
||||
{
|
||||
if (_cairo_ft_lib != NULL)
|
||||
return 1;
|
||||
|
|
@ -190,9 +191,6 @@ _cairo_ft_font_copy (cairo_font_t *font)
|
|||
cairo_ft_font_t * ft_font_new = NULL;
|
||||
cairo_ft_font_t * ft_font = NULL;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft_font = (cairo_ft_font_t *)font;
|
||||
|
||||
ft_font_new = (cairo_ft_font_t *)cairo_ft_font_create_for_ft_face (ft_font->face);
|
||||
|
|
@ -310,10 +308,11 @@ _install_font_matrix(cairo_matrix_t *matrix, FT_Face face)
|
|||
}
|
||||
|
||||
|
||||
int _utf8_to_glyphs (cairo_font_t *font,
|
||||
const unsigned char *utf8,
|
||||
cairo_glyph_t **glyphs,
|
||||
size_t *nglyphs)
|
||||
static int
|
||||
_utf8_to_glyphs (cairo_font_t *font,
|
||||
const unsigned char *utf8,
|
||||
cairo_glyph_t **glyphs,
|
||||
size_t *nglyphs)
|
||||
{
|
||||
cairo_ft_font_t *ft;
|
||||
double x = 0., y = 0.;
|
||||
|
|
@ -384,9 +383,6 @@ _cairo_ft_font_glyph_extents (cairo_font_t *font,
|
|||
cairo_ft_font_t *ft;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft = (cairo_ft_font_t *)font;
|
||||
|
||||
/* FIXME: lift code from xft to do this */
|
||||
|
|
@ -511,9 +507,6 @@ _cairo_ft_font_glyph_path (cairo_font_t *font,
|
|||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_ft_font_t *ft;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft = (cairo_ft_font_t *)font;
|
||||
|
||||
/* FIXME: lift code from xft to do this */
|
||||
|
|
|
|||
|
|
@ -463,15 +463,6 @@ static const struct cairo_surface_backend cairo_xlib_surface_backend = {
|
|||
composite_trapezoids: (void *) _cairo_xlib_surface_composite_trapezoids,
|
||||
};
|
||||
|
||||
static Picture
|
||||
_cairo_xlib_surface_get_picture (cairo_surface_t *surface)
|
||||
{
|
||||
if (surface->backend != &cairo_xlib_surface_backend)
|
||||
return 0;
|
||||
|
||||
return ((cairo_xlib_surface *) surface)->picture;
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
cairo_xlib_surface_create (Display *dpy,
|
||||
Drawable drawable,
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ cairo_font_t *
|
|||
cairo_current_font (cairo_t *cr)
|
||||
{
|
||||
if (cr->status)
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
cairo_font_t *ret;
|
||||
cr->status = _cairo_gstate_current_font (cr->gstate, &ret);
|
||||
|
|
@ -654,6 +654,7 @@ cairo_transform_font (cairo_t *cr, cairo_matrix_t *matrix)
|
|||
}
|
||||
|
||||
|
||||
/* XXX: NYI
|
||||
void
|
||||
cairo_text_extents (cairo_t *cr,
|
||||
const unsigned char *utf8,
|
||||
|
|
@ -677,6 +678,7 @@ cairo_glyph_extents (cairo_t *cr,
|
|||
cr->status = _cairo_gstate_glyph_extents (cr->gstate, glyphs, num_glyphs,
|
||||
extents);
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
cairo_show_text (cairo_t *cr, const unsigned char *utf8)
|
||||
|
|
@ -696,6 +698,7 @@ cairo_show_glyphs (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs)
|
|||
cr->status = _cairo_gstate_show_glyphs (cr->gstate, glyphs, num_glyphs);
|
||||
}
|
||||
|
||||
/* XXX: NYI
|
||||
void
|
||||
cairo_text_path (cairo_t *cr, const unsigned char *utf8)
|
||||
{
|
||||
|
|
@ -713,7 +716,7 @@ cairo_glyph_path (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs)
|
|||
|
||||
cr->status = _cairo_gstate_glyph_path (cr->gstate, glyphs, num_glyphs);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void
|
||||
cairo_show_surface (cairo_t *cr,
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ extern void __external_linkage
|
|||
cairo_set_font (cairo_t *ct, cairo_font_t *font);
|
||||
|
||||
|
||||
/* NYI
|
||||
/* XXX: NYI
|
||||
|
||||
extern void __external_linkage
|
||||
cairo_text_extents (cairo_t *ct,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ typedef struct {
|
|||
+ ((double)((t) & 0xFFFF) / 65535.0))
|
||||
|
||||
static FT_Library _cairo_ft_lib = NULL;
|
||||
static int _init_cairo_ft_lib ()
|
||||
static int
|
||||
_init_cairo_ft_lib (void)
|
||||
{
|
||||
if (_cairo_ft_lib != NULL)
|
||||
return 1;
|
||||
|
|
@ -190,9 +191,6 @@ _cairo_ft_font_copy (cairo_font_t *font)
|
|||
cairo_ft_font_t * ft_font_new = NULL;
|
||||
cairo_ft_font_t * ft_font = NULL;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft_font = (cairo_ft_font_t *)font;
|
||||
|
||||
ft_font_new = (cairo_ft_font_t *)cairo_ft_font_create_for_ft_face (ft_font->face);
|
||||
|
|
@ -310,10 +308,11 @@ _install_font_matrix(cairo_matrix_t *matrix, FT_Face face)
|
|||
}
|
||||
|
||||
|
||||
int _utf8_to_glyphs (cairo_font_t *font,
|
||||
const unsigned char *utf8,
|
||||
cairo_glyph_t **glyphs,
|
||||
size_t *nglyphs)
|
||||
static int
|
||||
_utf8_to_glyphs (cairo_font_t *font,
|
||||
const unsigned char *utf8,
|
||||
cairo_glyph_t **glyphs,
|
||||
size_t *nglyphs)
|
||||
{
|
||||
cairo_ft_font_t *ft;
|
||||
double x = 0., y = 0.;
|
||||
|
|
@ -384,9 +383,6 @@ _cairo_ft_font_glyph_extents (cairo_font_t *font,
|
|||
cairo_ft_font_t *ft;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft = (cairo_ft_font_t *)font;
|
||||
|
||||
/* FIXME: lift code from xft to do this */
|
||||
|
|
@ -511,9 +507,6 @@ _cairo_ft_font_glyph_path (cairo_font_t *font,
|
|||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_ft_font_t *ft;
|
||||
|
||||
if (font == NULL)
|
||||
return;
|
||||
|
||||
ft = (cairo_ft_font_t *)font;
|
||||
|
||||
/* FIXME: lift code from xft to do this */
|
||||
|
|
|
|||
|
|
@ -463,15 +463,6 @@ static const struct cairo_surface_backend cairo_xlib_surface_backend = {
|
|||
composite_trapezoids: (void *) _cairo_xlib_surface_composite_trapezoids,
|
||||
};
|
||||
|
||||
static Picture
|
||||
_cairo_xlib_surface_get_picture (cairo_surface_t *surface)
|
||||
{
|
||||
if (surface->backend != &cairo_xlib_surface_backend)
|
||||
return 0;
|
||||
|
||||
return ((cairo_xlib_surface *) surface)->picture;
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
cairo_xlib_surface_create (Display *dpy,
|
||||
Drawable drawable,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue