[Cairo] ELF shared library improvements [0/4]

Richard Henderson rth at twiddle.net
Tue Jul 29 00:07:38 PDT 2003


Finally, the cairo patch.  All plt avoidance here.

I have to apologize; I just noticed that one of the files seems to
have been gratuitously re-indented by my editor.  Since I use vi,
I'd never considered this to be a danger that I needed to watch out
for.  Clearly there's some New Evil in vim that I need to figure out
how to turn off.

Anyway, I can undo this and generate a new patch, but thought I'd
go ahead and post this so that it shows up with the others.


r~
-------------- next part --------------
Index: src/cairo.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo.c,v
retrieving revision 1.2
diff -c -p -d -u -p -r1.2 cairo.c
--- src/cairo.c	24 Jul 2003 04:20:25 -0000	1.2
+++ src/cairo.c	29 Jul 2003 07:02:02 -0000
@@ -103,6 +103,7 @@ cairo_save (cairo_t *cr)
     top->next = cr->gstate;
     cr->gstate = top;
 }
+hidden_def(cairo_save) 
 
 void
 cairo_restore (cairo_t *cr)
@@ -122,6 +123,7 @@ cairo_restore (cairo_t *cr)
 
     _cairo_gstate_destroy (top);
 }
+hidden_def(cairo_restore) 
 
 /* XXX: I want to rethink this API
 void
@@ -159,6 +161,7 @@ cairo_set_target_surface (cairo_t *cr, c
 
     cr->status = _cairo_gstate_set_target_surface (cr->gstate, surface);
 }
+hidden_def(cairo_set_target_surface)
 
 cairo_surface_t *
 cairo_get_target_surface (cairo_t *cr)
@@ -493,6 +496,7 @@ cairo_move_to (cairo_t *cr, double x, do
 
     cr->status = _cairo_gstate_move_to (cr->gstate, x, y);
 }
+hidden_def(cairo_move_to) 
 
 void
 cairo_line_to (cairo_t *cr, double x, double y)
@@ -535,6 +539,7 @@ cairo_rel_line_to (cairo_t *cr, double d
 
     cr->status = _cairo_gstate_rel_line_to (cr->gstate, dx, dy);
 }
+hidden_def(cairo_rel_line_to)
 
 void
 cairo_rel_curve_to (cairo_t *cr,
@@ -574,6 +579,7 @@ cairo_close_path (cairo_t *cr)
 
     cr->status = _cairo_gstate_close_path (cr->gstate);
 }
+hidden_def(cairo_close_path)
 
 void
 cairo_get_current_point (cairo_t *cr, double *x, double *y)
Index: src/cairo.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo.h,v
retrieving revision 1.2
diff -c -p -d -u -p -r1.2 cairo.h
--- src/cairo.h	18 Jul 2003 19:42:49 -0000	1.2
+++ src/cairo.h	29 Jul 2003 07:02:02 -0000
@@ -28,238 +28,243 @@
 #ifndef _CAIRO_H_
 #define _CAIRO_H_
 
+#include <X11/Xfuncproto.h>
 #include <Xc.h>
 
+#ifdef _CAIROINT_H_
+#include <bits/export.h>
+#else
+#include <bits/import.h>
+#endif
+
 typedef struct cairo cairo_t;
 typedef struct cairo_surface cairo_surface_t;
 typedef struct cairo_matrix cairo_matrix_t;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+_XFUNCPROTOBEGIN
 
 /* Functions for manipulating state objects */
-cairo_t *
+extern cairo_t * __external_linkage
 cairo_create (void);
 
-void
+extern void __external_linkage
 cairo_destroy (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_save (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_restore (cairo_t *cr);
 
 /* XXX: I want to rethink this API
-void
-cairo_push_group (cairo_t *cr);
+   extern void __external_linkage
+   cairo_push_group (cairo_t *cr);
 
-void
-cairo_pop_group (cairo_t *cr);
-*/
+   extern void __external_linkage
+   cairo_pop_group (cairo_t *cr);
+ */
 
 /* Modify state */
-void
+extern void __external_linkage
 cairo_set_target_surface (cairo_t *cr, cairo_surface_t *surface);
 
 typedef enum cairo_format {
-    CAIRO_FORMAT_ARGB32 = PictStandardARGB32,
-    CAIRO_FORMAT_RGB24 = PictStandardRGB24,
-    CAIRO_FORMAT_A8 = PictStandardA8,
-    CAIRO_FORMAT_A1 = PictStandardA1
+	CAIRO_FORMAT_ARGB32 = PictStandardARGB32,
+	CAIRO_FORMAT_RGB24 = PictStandardRGB24,
+	CAIRO_FORMAT_A8 = PictStandardA8,
+	CAIRO_FORMAT_A1 = PictStandardA1
 } cairo_format_t;
 
-void
+extern void __external_linkage
 cairo_set_target_drawable (cairo_t	*cr,
-		     Display	*dpy,
-		     Drawable	drawable);
+		Display	*dpy,
+		Drawable	drawable);
 
-void
+extern void __external_linkage
 cairo_set_target_image (cairo_t	*cr,
-		  char		*data,
-		  cairo_format_t	format,
-		  int		width,
-		  int		height,
-		  int		stride);
+		char		*data,
+		cairo_format_t	format,
+		int		width,
+		int		height,
+		int		stride);
 
 typedef enum cairo_operator { 
-    CAIRO_OPERATOR_CLEAR = PictOpClear,
-    CAIRO_OPERATOR_SRC = PictOpSrc,
-    CAIRO_OPERATOR_DST = PictOpDst,
-    CAIRO_OPERATOR_OVER = PictOpOver,
-    CAIRO_OPERATOR_OVER_REVERSE = PictOpOverReverse,
-    CAIRO_OPERATOR_IN = PictOpIn,
-    CAIRO_OPERATOR_IN_REVERSE = PictOpInReverse,
-    CAIRO_OPERATOR_OUT = PictOpOut,
-    CAIRO_OPERATOR_OUT_REVERSE = PictOpOutReverse,
-    CAIRO_OPERATOR_ATOP = PictOpAtop,
-    CAIRO_OPERATOR_ATOP_REVERSE = PictOpAtopReverse,
-    CAIRO_OPERATOR_XOR = PictOpXor,
-    CAIRO_OPERATOR_ADD = PictOpAdd,
-    CAIRO_OPERATOR_SATURATE = PictOpSaturate,
+	CAIRO_OPERATOR_CLEAR = PictOpClear,
+	CAIRO_OPERATOR_SRC = PictOpSrc,
+	CAIRO_OPERATOR_DST = PictOpDst,
+	CAIRO_OPERATOR_OVER = PictOpOver,
+	CAIRO_OPERATOR_OVER_REVERSE = PictOpOverReverse,
+	CAIRO_OPERATOR_IN = PictOpIn,
+	CAIRO_OPERATOR_IN_REVERSE = PictOpInReverse,
+	CAIRO_OPERATOR_OUT = PictOpOut,
+	CAIRO_OPERATOR_OUT_REVERSE = PictOpOutReverse,
+	CAIRO_OPERATOR_ATOP = PictOpAtop,
+	CAIRO_OPERATOR_ATOP_REVERSE = PictOpAtopReverse,
+	CAIRO_OPERATOR_XOR = PictOpXor,
+	CAIRO_OPERATOR_ADD = PictOpAdd,
+	CAIRO_OPERATOR_SATURATE = PictOpSaturate,
 
-    CAIRO_OPERATOR_DISJOINT_CLEAR = PictOpDisjointClear,
-    CAIRO_OPERATOR_DISJOINT_SRC = PictOpDisjointSrc,
-    CAIRO_OPERATOR_DISJOINT_DST = PictOpDisjointDst,
-    CAIRO_OPERATOR_DISJOINT_OVER = PictOpDisjointOver,
-    CAIRO_OPERATOR_DISJOINT_OVER_REVERSE = PictOpDisjointOverReverse,
-    CAIRO_OPERATOR_DISJOINT_IN = PictOpDisjointIn,
-    CAIRO_OPERATOR_DISJOINT_IN_REVERSE = PictOpDisjointInReverse,
-    CAIRO_OPERATOR_DISJOINT_OUT = PictOpDisjointOut,
-    CAIRO_OPERATOR_DISJOINT_OUT_REVERSE = PictOpDisjointOutReverse,
-    CAIRO_OPERATOR_DISJOINT_ATOP = PictOpDisjointAtop,
-    CAIRO_OPERATOR_DISJOINT_ATOP_REVERSE = PictOpDisjointAtopReverse,
-    CAIRO_OPERATOR_DISJOINT_XOR = PictOpDisjointXor,
+	CAIRO_OPERATOR_DISJOINT_CLEAR = PictOpDisjointClear,
+	CAIRO_OPERATOR_DISJOINT_SRC = PictOpDisjointSrc,
+	CAIRO_OPERATOR_DISJOINT_DST = PictOpDisjointDst,
+	CAIRO_OPERATOR_DISJOINT_OVER = PictOpDisjointOver,
+	CAIRO_OPERATOR_DISJOINT_OVER_REVERSE = PictOpDisjointOverReverse,
+	CAIRO_OPERATOR_DISJOINT_IN = PictOpDisjointIn,
+	CAIRO_OPERATOR_DISJOINT_IN_REVERSE = PictOpDisjointInReverse,
+	CAIRO_OPERATOR_DISJOINT_OUT = PictOpDisjointOut,
+	CAIRO_OPERATOR_DISJOINT_OUT_REVERSE = PictOpDisjointOutReverse,
+	CAIRO_OPERATOR_DISJOINT_ATOP = PictOpDisjointAtop,
+	CAIRO_OPERATOR_DISJOINT_ATOP_REVERSE = PictOpDisjointAtopReverse,
+	CAIRO_OPERATOR_DISJOINT_XOR = PictOpDisjointXor,
 
-    CAIRO_OPERATOR_CONJOINT_CLEAR = PictOpConjointClear,
-    CAIRO_OPERATOR_CONJOINT_SRC = PictOpConjointSrc,
-    CAIRO_OPERATOR_CONJOINT_DST = PictOpConjointDst,
-    CAIRO_OPERATOR_CONJOINT_OVER = PictOpConjointOver,
-    CAIRO_OPERATOR_CONJOINT_OVER_REVERSE = PictOpConjointOverReverse,
-    CAIRO_OPERATOR_CONJOINT_IN = PictOpConjointIn,
-    CAIRO_OPERATOR_CONJOINT_IN_REVERSE = PictOpConjointInReverse,
-    CAIRO_OPERATOR_CONJOINT_OUT = PictOpConjointOut,
-    CAIRO_OPERATOR_CONJOINT_OUT_REVERSE = PictOpConjointOutReverse,
-    CAIRO_OPERATOR_CONJOINT_ATOP = PictOpConjointAtop,
-    CAIRO_OPERATOR_CONJOINT_ATOP_REVERSE = PictOpConjointAtopReverse,
-    CAIRO_OPERATOR_CONJOINT_XOR = PictOpConjointXor
+	CAIRO_OPERATOR_CONJOINT_CLEAR = PictOpConjointClear,
+	CAIRO_OPERATOR_CONJOINT_SRC = PictOpConjointSrc,
+	CAIRO_OPERATOR_CONJOINT_DST = PictOpConjointDst,
+	CAIRO_OPERATOR_CONJOINT_OVER = PictOpConjointOver,
+	CAIRO_OPERATOR_CONJOINT_OVER_REVERSE = PictOpConjointOverReverse,
+	CAIRO_OPERATOR_CONJOINT_IN = PictOpConjointIn,
+	CAIRO_OPERATOR_CONJOINT_IN_REVERSE = PictOpConjointInReverse,
+	CAIRO_OPERATOR_CONJOINT_OUT = PictOpConjointOut,
+	CAIRO_OPERATOR_CONJOINT_OUT_REVERSE = PictOpConjointOutReverse,
+	CAIRO_OPERATOR_CONJOINT_ATOP = PictOpConjointAtop,
+	CAIRO_OPERATOR_CONJOINT_ATOP_REVERSE = PictOpConjointAtopReverse,
+	CAIRO_OPERATOR_CONJOINT_XOR = PictOpConjointXor
 } cairo_operator_t;
 
-void
+extern void __external_linkage
 cairo_set_operator (cairo_t *cr, cairo_operator_t op);
 
 /* XXX: Probably want to bite the bullet and expose a cairo_color_t object */
 
-void
+extern void __external_linkage
 cairo_set_rgb_color (cairo_t *cr, double red, double green, double blue);
 
-void
+extern void __external_linkage
 cairo_set_pattern (cairo_t *cr, cairo_surface_t *pattern);
 
-void
+extern void __external_linkage
 cairo_set_tolerance (cairo_t *cr, double tolerance);
 
-void
+extern void __external_linkage
 cairo_set_alpha (cairo_t *cr, double alpha);
 
 typedef enum cairo_fill_rule {
-    CAIRO_FILL_RULE_WINDING,
-    CAIRO_FILL_RULE_EVEN_ODD
+	CAIRO_FILL_RULE_WINDING,
+	CAIRO_FILL_RULE_EVEN_ODD
 } cairo_fill_rule_t;
 
-void
+extern void __external_linkage
 cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
 
-void
+extern void __external_linkage
 cairo_set_line_width (cairo_t *cr, double width);
 
 typedef enum cairo_line_cap {
-    CAIRO_LINE_CAP_BUTT,
-    CAIRO_LINE_CAP_ROUND,
-    CAIRO_LINE_CAP_SQUARE
+	CAIRO_LINE_CAP_BUTT,
+	CAIRO_LINE_CAP_ROUND,
+	CAIRO_LINE_CAP_SQUARE
 } cairo_line_cap_t;
 
-void
+extern void __external_linkage
 cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap);
 
 typedef enum cairo_line_join {
-    CAIRO_LINE_JOIN_MITER,
-    CAIRO_LINE_JOIN_ROUND,
-    CAIRO_LINE_JOIN_BEVEL
+	CAIRO_LINE_JOIN_MITER,
+	CAIRO_LINE_JOIN_ROUND,
+	CAIRO_LINE_JOIN_BEVEL
 } cairo_line_join_t;
 
-void
+extern void __external_linkage
 cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join);
 
-void
+extern void __external_linkage
 cairo_set_dash (cairo_t *cr, double *dashes, int ndash, double offset);
 
-void
+extern void __external_linkage
 cairo_set_miter_limit (cairo_t *cr, double limit);
 
-void
+extern void __external_linkage
 cairo_translate (cairo_t *cr, double tx, double ty);
 
-void
+extern void __external_linkage
 cairo_scale (cairo_t *cr, double sx, double sy);
 
-void
+extern void __external_linkage
 cairo_rotate (cairo_t *cr, double angle);
 
-void
+extern void __external_linkage
 cairo_concat_matrix (cairo_t *cr,
-	       cairo_matrix_t *matrix);
+		cairo_matrix_t *matrix);
 
-void
+extern void __external_linkage
 cairo_set_matrix (cairo_t *cr,
-	    cairo_matrix_t *matrix);
+		cairo_matrix_t *matrix);
 
-void
+extern void __external_linkage
 cairo_default_matrix (cairo_t *cr);
 
 /* XXX: There's been a proposal to add cairo_default_matrix_exact */
 
-void
+extern void __external_linkage
 cairo_identity_matrix (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_transform_point (cairo_t *cr, double *x, double *y);
 
-void
+extern void __external_linkage
 cairo_transform_distance (cairo_t *cr, double *dx, double *dy);
 
-void
+extern void __external_linkage
 cairo_inverse_transform_point (cairo_t *cr, double *x, double *y);
 
-void
+extern void __external_linkage
 cairo_inverse_transform_distance (cairo_t *cr, double *dx, double *dy);
 
 /* Path creation functions */
-void
+extern void __external_linkage
 cairo_new_path (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_move_to (cairo_t *cr, double x, double y);
 
-void
+extern void __external_linkage
 cairo_line_to (cairo_t *cr, double x, double y);
 
-void
+extern void __external_linkage
 cairo_curve_to (cairo_t *cr,
-	  double x1, double y1,
-	  double x2, double y2,
-	  double x3, double y3);
+		double x1, double y1,
+		double x2, double y2,
+		double x3, double y3);
 
-void
+extern void __external_linkage
 cairo_rel_move_to (cairo_t *cr, double dx, double dy);
 
-void
+extern void __external_linkage
 cairo_rel_line_to (cairo_t *cr, double dx, double dy);
 
-void
+extern void __external_linkage
 cairo_rel_curve_to (cairo_t *cr,
-	     double dx1, double dy1,
-	     double dx2, double dy2,
-	     double dx3, double dy3);
+		double dx1, double dy1,
+		double dx2, double dy2,
+		double dx3, double dy3);
 
-void
+extern void __external_linkage
 cairo_rectangle (cairo_t *cr,
-	     double x, double y,
-	     double width, double height);
+		double x, double y,
+		double width, double height);
 
-void
+extern void __external_linkage
 cairo_close_path (cairo_t *cr);
 
 /* Painting functions */
-void
+extern void __external_linkage
 cairo_stroke (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_fill (cairo_t *cr);
 
 /* Clipping */
-void
+extern void __external_linkage
 cairo_clip (cairo_t *cr);
 
 /* Font/Text functions */
@@ -267,97 +272,97 @@ cairo_clip (cairo_t *cr);
 /* XXX: The font support should probably expose a cairo_font_t object with
    several functions, (cairo_font_transform, etc.) in a parallel manner as
    cairo_matrix_t and (eventually) cairo_color_t */
-void
+extern void __external_linkage
 cairo_select_font (cairo_t *cr, const char *key);
 
-void
+extern void __external_linkage
 cairo_scale_font (cairo_t *cr, double scale);
 
 /* XXX: Probably want to use a cairo_matrix_t here, (to fix as part of the
    big text support rewrite) */
-void
+extern void __external_linkage
 cairo_transform_font (cairo_t *cr,
 		double a, double b,
 		double c, double d);
 
-void
+extern void __external_linkage
 cairo_text_extents (cairo_t *cr,
-	      const unsigned char *utf8,
-	      double *x, double *y,
-	      double *width, double *height,
-	      double *dx, double *dy);
+		const unsigned char *utf8,
+		double *x, double *y,
+		double *width, double *height,
+		double *dx, double *dy);
 
-void
+extern void __external_linkage
 cairo_show_text (cairo_t *cr, const unsigned char *utf8);
 
 /* Image functions */
 
-void
+extern void __external_linkage
 cairo_show_surface (cairo_t		*cr,
-	       cairo_surface_t	*surface,
-	       int		width,
-	       int		height);
+		cairo_surface_t	*surface,
+		int		width,
+		int		height);
 
 /* Query functions */
 
-cairo_operator_t
+extern cairo_operator_t __external_linkage
 cairo_get_operator (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_get_rgb_color (cairo_t *cr, double *red, double *green, double *blue);
 
 /* XXX: Do we want cairo_get_pattern as well? */
 
-double
+extern double __external_linkage
 cairo_get_tolerance (cairo_t *cr);
 
-double
+extern double __external_linkage
 cairo_get_alpha (cairo_t *cr);
 
-void
+extern void __external_linkage
 cairo_get_current_point (cairo_t *cr, double *x, double *y);
 
-cairo_fill_rule_t
+extern cairo_fill_rule_t __external_linkage
 cairo_get_fill_rule (cairo_t *cr);
 
-double
+extern double __external_linkage
 cairo_get_line_width (cairo_t *cr);
 
-cairo_line_cap_t
+extern cairo_line_cap_t __external_linkage
 cairo_get_line_cap (cairo_t *cr);
 
-cairo_line_join_t
+extern cairo_line_join_t __external_linkage
 cairo_get_line_join (cairo_t *cr);
 
-double
+extern double __external_linkage
 cairo_get_miter_limit (cairo_t *cr);
 
 /* XXX: How to do cairo_get_dash??? Do we want to switch to a cairo_dash object? */
 
-void
+extern void __external_linkage
 cairo_get_matrix (cairo_t *cr,
-	    double *a, double *b,
-	    double *c, double *d,
-	    double *tx, double *ty);
+		double *a, double *b,
+		double *c, double *d,
+		double *tx, double *ty);
 
-cairo_surface_t *
+extern cairo_surface_t * __external_linkage
 cairo_get_target_surface (cairo_t *cr);
 
 /* Error status queries */
 
 typedef enum cairo_status {
-    CAIRO_STATUS_SUCCESS = 0,
-    CAIRO_STATUS_NO_MEMORY,
-    CAIRO_STATUS_INVALID_RESTORE,
-    CAIRO_STATUS_INVALID_POP_GROUP,
-    CAIRO_STATUS_NO_CURRENT_POINT,
-    CAIRO_STATUS_INVALID_MATRIX
+	CAIRO_STATUS_SUCCESS = 0,
+	CAIRO_STATUS_NO_MEMORY,
+	CAIRO_STATUS_INVALID_RESTORE,
+	CAIRO_STATUS_INVALID_POP_GROUP,
+	CAIRO_STATUS_NO_CURRENT_POINT,
+	CAIRO_STATUS_INVALID_MATRIX
 } cairo_status_t;
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_get_status (cairo_t *cr);
 
-const char *
+extern const char * __external_linkage
 cairo_get_status_string (cairo_t *cr);
 
 /* Surface mainpulation */
@@ -366,129 +371,127 @@ cairo_get_status_string (cairo_t *cr);
    cairo_format_t control what render format is used? Maybe I can have
    cairo_surface_create_for_window with a visual, and
    cairo_surface_create_for_pixmap with a cairo_format_t. Would that work?
-*/
-cairo_surface_t *
+ */
+extern cairo_surface_t * __external_linkage
 cairo_surface_create_for_drawable (Display	*dpy,
-			    Drawable	drawable,
-			    Visual	*visual,
-			    cairo_format_t	format,
-			    Colormap	colormap);
+		Drawable	drawable,
+		Visual	*visual,
+		cairo_format_t	format,
+		Colormap	colormap);
 
-cairo_surface_t *
+extern cairo_surface_t * __external_linkage
 cairo_surface_create_for_image (char		*data,
-			 cairo_format_t	format,
-			 int		width,
-			 int		height,
-			 int		stride);
+		cairo_format_t	format,
+		int		width,
+		int		height,
+		int		stride);
 
-cairo_surface_t *
+extern cairo_surface_t * __external_linkage
 cairo_surface_create_similar (cairo_surface_t	*other,
-		       cairo_format_t		format,
-		       int		width,
-		       int		height);
+		cairo_format_t		format,
+		int		width,
+		int		height);
 
 /* XXX: One problem with having RGB and A here in one function is that
    it introduces the question of pre-multiplied vs. non-pre-multiplied
    alpha. Do I want to export a cairo_color_t structure instead? So far, no
    other public functions need it. */
-cairo_surface_t *
+extern cairo_surface_t * __external_linkage
 cairo_surface_create_similar_solid (cairo_surface_t	*other,
-			    cairo_format_t	format,
-			    int		width,
-			    int		height,
-			    double	red,
-			    double	green,
-			    double	blue,
-			    double	alpha);
+		cairo_format_t	format,
+		int		width,
+		int		height,
+		double	red,
+		double	green,
+		double	blue,
+		double	alpha);
 
-void
+extern void __external_linkage
 cairo_surface_destroy (cairo_surface_t *surface);
 
 /* XXX: Should this take an X/Y offset as well? (Probably) */
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_surface_put_image (cairo_surface_t	*surface,
-		   char		*data,
-		   int		width,
-		   int		height,
-		   int		stride);
+		char		*data,
+		int		width,
+		int		height,
+		int		stride);
 
 /* XXX: The Xc version of this function isn't quite working yet
-cairo_status_t
-cairo_surface_set_clip_region (cairo_surface_t *surface, Region region);
-*/
+   extern cairo_status_t __external_linkage
+   cairo_surface_set_clip_region (cairo_surface_t *surface, Region region);
+ */
 
 /* XXX: Note: The current Render/Ic implementations don't do the right
    thing with repeat when the surface has a non-identity matrix. */
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_surface_set_repeat (cairo_surface_t *surface, int repeat);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_surface_set_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
 
 typedef enum cairo_filter {
-    CAIRO_FILTER_FAST = XcFilterFast,
-    CAIRO_FILTER_GOOD = XcFilterGood,
-    CAIRO_FILTER_BEST = XcFilterBest,
-    CAIRO_FILTER_NEAREST = XcFilterNearest,
-    CAIRO_FILTER_BILINEAR = XcFilterBilinear
+	CAIRO_FILTER_FAST = XcFilterFast,
+	CAIRO_FILTER_GOOD = XcFilterGood,
+	CAIRO_FILTER_BEST = XcFilterBest,
+	CAIRO_FILTER_NEAREST = XcFilterNearest,
+	CAIRO_FILTER_BILINEAR = XcFilterBilinear
 } cairo_filter_t;
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_surface_set_filter (cairo_surface_t *surface, cairo_filter_t filter);
 
 /* Matrix functions */
 
-cairo_matrix_t *
+extern cairo_matrix_t * __external_linkage
 cairo_matrix_create (void);
 
-void
+extern void __external_linkage
 cairo_matrix_destroy (cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_copy (cairo_matrix_t *matrix, const cairo_matrix_t *other);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_set_identity (cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_set_affine (cairo_matrix_t *cr,
-		   double a, double b,
-		   double c, double d,
-		   double tx, double ty);
+		double a, double b,
+		double c, double d,
+		double tx, double ty);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_get_affine (cairo_matrix_t *matrix,
-		   double *a, double *b,
- 		   double *c, double *d,
- 		   double *tx, double *ty);
+		double *a, double *b,
+		double *c, double *d,
+		double *tx, double *ty);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_rotate (cairo_matrix_t *matrix, double radians);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_invert (cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy);
 
-cairo_status_t
+extern cairo_status_t __external_linkage
 cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y);
 
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+_XFUNCPROTOEND
+#undef __external_linkage
 
+#endif /* _CAIRO_H_ */
Index: src/cairo_matrix.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_matrix.c,v
retrieving revision 1.1
diff -c -p -d -u -p -r1.1 cairo_matrix.c
--- src/cairo_matrix.c	18 Jul 2003 18:34:19 -0000	1.1
+++ src/cairo_matrix.c	29 Jul 2003 07:02:02 -0000
@@ -84,6 +84,7 @@ cairo_matrix_copy (cairo_matrix_t *matri
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_copy) 
 
 cairo_status_t
 cairo_matrix_set_identity (cairo_matrix_t *matrix)
@@ -92,6 +93,7 @@ cairo_matrix_set_identity (cairo_matrix_
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_set_identity) 
 
 cairo_status_t
 cairo_matrix_set_affine (cairo_matrix_t *matrix,
@@ -105,6 +107,7 @@ cairo_matrix_set_affine (cairo_matrix_t 
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_set_affine) 
 
 cairo_status_t
 cairo_matrix_get_affine (cairo_matrix_t *matrix,
@@ -158,6 +161,7 @@ cairo_matrix_scale (cairo_matrix_t *matr
 
     return cairo_matrix_multiply (matrix, &tmp, matrix);
 }
+hidden_def(cairo_matrix_scale) 
 
 cairo_status_t
 _cairo_matrix_set_rotate (cairo_matrix_t *matrix,
@@ -203,6 +207,7 @@ cairo_matrix_multiply (cairo_matrix_t *r
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_multiply) 
 
 cairo_status_t
 cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
@@ -219,6 +224,7 @@ cairo_matrix_transform_distance (cairo_m
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_transform_distance) 
 
 cairo_status_t
 cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y)
@@ -230,6 +236,7 @@ cairo_matrix_transform_point (cairo_matr
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_transform_point) 
 
 cairo_status_t
 cairo_matrix_transform_bounding_box (cairo_matrix_t *matrix,
@@ -331,6 +338,7 @@ cairo_matrix_invert (cairo_matrix_t *mat
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_matrix_invert) 
 
 cairo_status_t
 _cairo_matrix_compute_determinant (cairo_matrix_t *matrix, double *det)
Index: src/cairo_surface.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_surface.c,v
retrieving revision 1.1
diff -c -p -d -u -p -r1.1 cairo_surface.c
--- src/cairo_surface.c	18 Jul 2003 18:34:19 -0000	1.1
+++ src/cairo_surface.c	29 Jul 2003 07:02:02 -0000
@@ -58,6 +58,7 @@ cairo_surface_create_for_drawable (Displ
 
     return surface;
 }
+hidden_def(cairo_surface_create_for_drawable) 
 
 /* XXX: These definitions are 100% bogus. The problem that needs to be
    fixed is that Ic needs to export a real API for passing in
@@ -166,6 +167,7 @@ cairo_surface_create_for_image (char		*d
 
     return surface;
 }
+hidden_def(cairo_surface_create_for_image) 
 
 cairo_surface_t *
 cairo_surface_create_similar (cairo_surface_t	*other,
@@ -250,6 +252,7 @@ cairo_surface_create_similar_solid (cair
     _cairo_surface_fill_rectangle (surface, CAIRO_OPERATOR_SRC, &color, 0, 0, width, height);
     return surface;
 }
+hidden_def(cairo_surface_create_similar_solid) 
 
 void
 _cairo_surface_reference (cairo_surface_t *surface)
@@ -281,6 +284,7 @@ cairo_surface_destroy (cairo_surface_t *
 
     free (surface);
 }
+hidden_def(cairo_surface_destroy) 
 
 cairo_status_t
 cairo_surface_put_image (cairo_surface_t	*surface,
@@ -322,6 +326,7 @@ cairo_surface_set_matrix (cairo_surface_
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_surface_set_matrix) 
 
 cairo_status_t
 cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix)
@@ -340,6 +345,7 @@ cairo_surface_get_matrix (cairo_surface_
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_surface_get_matrix) 
 
 cairo_status_t
 cairo_surface_set_filter (cairo_surface_t *surface, cairo_filter_t filter)
@@ -365,6 +371,7 @@ cairo_surface_set_repeat (cairo_surface_
 
     return CAIRO_STATUS_SUCCESS;
 }
+hidden_def(cairo_surface_set_repeat) 
 
 /* XXX: This function is going away, right? */
 Picture
Index: src/cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.5
diff -c -p -d -u -p -r1.5 cairoint.h
--- src/cairoint.h	26 Jul 2003 06:16:31 -0000	1.5
+++ src/cairoint.h	29 Jul 2003 07:02:03 -0000
@@ -44,6 +44,8 @@
 
 #include "cairo.h"
 
+#include <bits/internal.h>
+
 #ifndef __GCC__
 #define __attribute__(x)
 #endif
@@ -301,304 +303,304 @@ typedef struct cairo_stroke_face {
 } cairo_stroke_face_t;
 
 /* cairo_gstate_t.c */
-cairo_gstate_t *
+extern cairo_gstate_t * __internal_linkage
 _cairo_gstate_create (void);
 
-void
+extern void __internal_linkage
 _cairo_gstate_init (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other);
 
-void
+extern void __internal_linkage
 _cairo_gstate_fini (cairo_gstate_t *gstate);
 
-void
+extern void __internal_linkage
 _cairo_gstate_destroy (cairo_gstate_t *gstate);
 
-cairo_gstate_t *
+extern cairo_gstate_t * __internal_linkage
 _cairo_gstate_clone (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_begin_group (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_end_group (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_drawable (cairo_gstate_t *gstate, Drawable drawable);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_visual (cairo_gstate_t *gstate, Visual *visual);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_format (cairo_gstate_t *gstate, cairo_format_t format);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surface);
 
-cairo_surface_t *
+extern cairo_surface_t * __internal_linkage
 _cairo_gstate_get_target_surface (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_surface_t *pattern);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator);
 
-cairo_operator_t
+extern cairo_operator_t __internal_linkage
 _cairo_gstate_get_operator (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_rgb_color (cairo_gstate_t *gstate, double red, double green, double blue);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_get_rgb_color (cairo_gstate_t *gstate, double *red, double *green, double *blue);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_tolerance (cairo_gstate_t *gstate, double tolerance);
 
-double
+extern double __internal_linkage
 _cairo_gstate_get_tolerance (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_alpha (cairo_gstate_t *gstate, double alpha);
 
-double
+extern double __internal_linkage
 _cairo_gstate_get_alpha (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_fill_rule (cairo_gstate_t *gstate, cairo_fill_rule_t fill_rule);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_line_width (cairo_gstate_t *gstate, double width);
 
-double
+extern double __internal_linkage
 _cairo_gstate_get_line_width (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_line_cap (cairo_gstate_t *gstate, cairo_line_cap_t line_cap);
 
-cairo_line_cap_t
+extern cairo_line_cap_t __internal_linkage
 _cairo_gstate_get_line_cap (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_line_join (cairo_gstate_t *gstate, cairo_line_join_t line_join);
 
-cairo_line_join_t
+extern cairo_line_join_t __internal_linkage
 _cairo_gstate_get_line_join (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_dash (cairo_gstate_t *gstate, double *dash, int num_dashes, double offset);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_miter_limit (cairo_gstate_t *gstate, double limit);
 
-double
+extern double __internal_linkage
 _cairo_gstate_get_miter_limit (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_gstate_translate (cairo_gstate_t *gstate, double tx, double ty);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_scale (cairo_gstate_t *gstate, double sx, double sy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_rotate (cairo_gstate_t *gstate, double angle);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_concat_matrix (cairo_gstate_t *gstate,
 			     cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_set_matrix (cairo_gstate_t *gstate,
 			  cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_default_matrix (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_identity_matrix (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_gstateransform_point (cairo_gstate_t *gstate, double *x, double *y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_gstateransform_distance (cairo_gstate_t *gstate, double *dx, double *dy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_inverse_transform_point (cairo_gstate_t *gstate, double *x, double *y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_inverse_transform_distance (cairo_gstate_t *gstate, double *dx, double *dy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_new_path (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_move_to (cairo_gstate_t *gstate, double x, double y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_line_to (cairo_gstate_t *gstate, double x, double y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_curve_to (cairo_gstate_t *gstate,
 			double x1, double y1,
 			double x2, double y2,
 			double x3, double y3);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_rel_move_to (cairo_gstate_t *gstate, double dx, double dy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_rel_line_to (cairo_gstate_t *gstate, double dx, double dy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_rel_curve_to (cairo_gstate_t *gstate,
 			    double dx1, double dy1,
 			    double dx2, double dy2,
 			    double dx3, double dy3);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_close_path (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x, double *y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_stroke (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_fill (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_clip (cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_select_font (cairo_gstate_t *gstate, const char *key);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_scale_font (cairo_gstate_t *gstate, double scale);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_gstateransform_font (cairo_gstate_t *gstate,
 			   double a, double b,
 			   double c, double d);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_gstateext_extents (cairo_gstate_t *gstate,
 			 const unsigned char *utf8,
 			 double *x, double *y,
 			 double *width, double *height,
 			 double *dx, double *dy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_show_text (cairo_gstate_t *gstate, const unsigned char *utf8);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_gstate_show_surface (cairo_gstate_t	*gstate,
 			    cairo_surface_t	*surface,
 			    int			width,
 			    int			height);
 
 /* cairo_color_t.c */
-void
+extern void __internal_linkage
 _cairo_color_init (cairo_color_t *color);
 
-void
+extern void __internal_linkage
 _cairo_color_fini (cairo_color_t *color);
 
-void
+extern void __internal_linkage
 _cairo_color_set_rgb (cairo_color_t *color, double red, double green, double blue);
 
-void
+extern void __internal_linkage
 _cairo_color_get_rgb (cairo_color_t *color, double *red, double *green, double *blue);
 
-void
+extern void __internal_linkage
 _cairo_color_set_alpha (cairo_color_t *color, double alpha);
 
 /* cairo_font_t.c */
 
-void
+extern void __internal_linkage
 _cairo_font_init (cairo_font_t *font);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_font_init_copy (cairo_font_t *font, cairo_font_t *other);
 
-void
+extern void __internal_linkage
 _cairo_font_fini (cairo_font_t *font);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_font_select (cairo_font_t *font, const char *key);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_font_scale (cairo_font_t *font, double scale);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_font_transform (cairo_font_t *font,
 		      double a, double b,
 		      double c, double d);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_font_resolve_xft_font (cairo_font_t *font, cairo_gstate_t *gstate, XftFont **xft_font);
 
 /* cairo_path_t.c */
-void
+extern void __internal_linkage
 _cairo_path_init (cairo_path_t *path);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_init_copy (cairo_path_t *path, cairo_path_t *other);
 
-void
+extern void __internal_linkage
 _cairo_path_fini (cairo_path_t *path);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_move_to (cairo_path_t *path, double x, double y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_line_to (cairo_path_t *path, double x, double y);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_curve_to (cairo_path_t *path,
 		      double x1, double y1,
 		      double x2, double y2,
 		      double x3, double y3);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_close_path (cairo_path_t *path);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_interpret (cairo_path_t *path,
 		       cairo_path_direction_t dir,
 		       const cairo_path_callbacks_t *cb,
 		       void *closure);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, double *y2);
 
 /* cairo_path_tfill.c */
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_fill_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_traps_t *traps);
 
 /* cairo_path_tstroke.c */
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_path_stroke_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_traps_t *traps);
 
 /* cairo_surface_t.c */
 
-void
+extern void __internal_linkage
 _cairo_surface_reference (cairo_surface_t *surface);
 
-XcSurface *
+extern XcSurface * __internal_linkage
 _cairo_surface_get_xc_surface (cairo_surface_t *surface);
 
 /* XXX: This function is going away, right? */
-Picture
+extern Picture __internal_linkage
 _cairo_surface_get_picture (cairo_surface_t *surface);
 
-void
+extern void __internal_linkage
 _cairo_surface_fill_rectangle (cairo_surface_t	*surface,
 			       cairo_operator_t	operator,
 			       cairo_color_t	*color,
@@ -608,125 +610,149 @@ _cairo_surface_fill_rectangle (cairo_sur
 			       int		height);
 
 /* cairo_pen_t.c */
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_init_empty (cairo_pen_t *pen);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_init_copy (cairo_pen_t *pen, cairo_pen_t *other);
 
-void
+extern void __internal_linkage
 _cairo_pen_fini (cairo_pen_t *pen);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_add_points (cairo_pen_t *pen, XPointFixed *pt, int num_pts);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_add_points_for_slopes (cairo_pen_t *pen,
 				  XPointFixed *a,
 				  XPointFixed *b,
 				  XPointFixed *c,
 				  XPointFixed *d);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_find_active_cw_vertex_index (cairo_pen_t *pen,
 					cairo_slope_fixed_t *slope,
 					int *active);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_find_active_ccw_vertex_index (cairo_pen_t *pen,
 					 cairo_slope_fixed_t *slope,
 					 int *active);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_pen_stroke_spline (cairo_pen_t *pen,
 			  cairo_spline_t *spline,
 			  double tolerance,
 			  cairo_traps_t *traps);
 
 /* cairo_polygon_t.c */
-void
+extern void __internal_linkage
 _cairo_polygon_init (cairo_polygon_t *polygon);
 
-void
+extern void __internal_linkage
 _cairo_polygon_fini (cairo_polygon_t *polygon);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_polygon_add_edge (cairo_polygon_t *polygon, XPointFixed *p1, XPointFixed *p2);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_polygon_add_point (cairo_polygon_t *polygon, XPointFixed *pt);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_polygon_close (cairo_polygon_t *polygon);
 
 /* cairo_spline_t.c */
-cairo_int_status_t
+extern cairo_int_status_t __internal_linkage
 _cairo_spline_init (cairo_spline_t *spline,
 		    XPointFixed *a,
 		    XPointFixed *b,
 		    XPointFixed *c,
 		    XPointFixed *d);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_spline_decompose (cairo_spline_t *spline, double tolerance);
 
-void
+extern void __internal_linkage
 _cairo_spline_fini (cairo_spline_t *spline);
 
 /* cairo_matrix_t.c */
-void
+extern void __internal_linkage
 _cairo_matrix_init (cairo_matrix_t *matrix);
 
-void
+extern void __internal_linkage
 _cairo_matrix_fini (cairo_matrix_t *matrix);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_matrix_set_translate (cairo_matrix_t *matrix,
 			     double tx, double ty);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_matrix_set_scale (cairo_matrix_t *matrix,
 			 double sx, double sy);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_matrix_set_rotate (cairo_matrix_t *matrix,
 			  double angle);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_matrix_transform_bounding_box (cairo_matrix_t *matrix,
 				     double *x, double *y,
 				     double *width, double *height);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_matrix_compute_determinant (cairo_matrix_t *matrix, double *det);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 _cairo_matrix_compute_eigen_values (cairo_matrix_t *matrix, double *lambda1, double *lambda2);
 
 /* cairo_traps.c */
-void
+extern void __internal_linkage
 cairo_traps_init (cairo_traps_t *traps);
 
-void
+extern void __internal_linkage
 cairo_traps_fini (cairo_traps_t *traps);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_traps_tessellate_triangle (cairo_traps_t *traps, XPointFixed t[3]);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_traps_tessellate_rectangle (cairo_traps_t *traps, XPointFixed q[4]);
 
-cairo_status_t
+extern cairo_status_t __internal_linkage
 cairo_traps_tessellate_polygon (cairo_traps_t *traps,
 				cairo_polygon_t *poly,
 				cairo_fill_rule_t fill_rule);
 
 /* cairo_misc.c */
 
-void
+extern void __internal_linkage
 _compute_slope (XPointFixed *a, XPointFixed *b, cairo_slope_fixed_t *slope);
+
+/* Avoid unnecessary PLT entries.  */
+
+hidden_proto(cairo_close_path)
+hidden_proto(cairo_matrix_copy)
+hidden_proto(cairo_matrix_invert)
+hidden_proto(cairo_matrix_multiply)
+hidden_proto(cairo_matrix_scale)
+hidden_proto(cairo_matrix_set_affine)
+hidden_proto(cairo_matrix_set_identity)
+hidden_proto(cairo_matrix_transform_distance)
+hidden_proto(cairo_matrix_transform_point)
+hidden_proto(cairo_move_to)
+hidden_proto(cairo_rel_line_to)
+hidden_proto(cairo_restore)
+hidden_proto(cairo_save)
+hidden_proto(cairo_set_target_surface)
+hidden_proto(cairo_surface_create_for_drawable)
+hidden_proto(cairo_surface_create_for_image)
+hidden_proto(cairo_surface_create_similar_solid)
+hidden_proto(cairo_surface_destroy)
+hidden_proto(cairo_surface_get_matrix)
+hidden_proto(cairo_surface_set_matrix)
+hidden_proto(cairo_surface_set_repeat)
 
 #endif


More information about the cairo mailing list