[librsvg] set proper mode-line and fix indent and styles.



commit 51dac0e509be7a2d5b66d50b62418e0a4560d3d9
Author: Hiroyuki Ikezoe <hiikezoe gnome org>
Date:   Sat May 1 08:12:59 2010 +0900

    set proper mode-line and fix indent and styles.

 rsvg-base.c         |  388 +++++++++++++++++++++++++--------------------------
 rsvg-filter.c       |    3 +-
 rsvg-filter.h       |   47 +++---
 rsvg-gobject.c      |   11 +-
 rsvg-paint-server.c |    3 +-
 rsvg-paint-server.h |   21 ++--
 rsvg-private.h      |  105 +++++++-------
 rsvg-shapes.c       |    3 +-
 rsvg-shapes.h       |    3 +-
 rsvg.h              |   55 ++++----
 10 files changed, 321 insertions(+), 318 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 8572cfd..98df788 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg.c: SAX-based renderer for SVG files into a GdkPixbuf.
 
@@ -263,7 +264,7 @@ rsvg_standard_element_start (RsvgHandle * ctx, const char *name, RsvgPropertyBag
 
     if (newnode) {
         newnode->type = g_string_new (name);
-	newnode->parent = ctx->priv->currentnode;
+        newnode->parent = ctx->priv->currentnode;
         rsvg_node_set_atts (newnode, ctx, atts);
         rsvg_defs_register_memory (ctx->priv->defs, newnode);
         if (ctx->priv->currentnode) {
@@ -710,37 +711,35 @@ rsvg_characters_impl (RsvgHandle * ctx, const xmlChar * ch, int len)
     if (!ch || !len)
         return;
 
-	if (ctx->priv->currentnode)
-		{
-			if (!strcmp ("tspan", ctx->priv->currentnode->type->str) ||
-				!strcmp ("text", ctx->priv->currentnode->type->str))
-				{
-					guint i;
-
-					/* find the last CHARS node in the text or tspan node, so that we
-					   can coalesce the text, and thus avoid screwing up the Pango layouts */
-					self = NULL;
-					for (i = 0; i < ctx->priv->currentnode->children->len; i++) {
-						RsvgNode *node = g_ptr_array_index (ctx->priv->currentnode->children, i);
-						if (!strcmp (node->type->str, "RSVG_NODE_CHARS")) {
-							self = (RsvgNodeChars*)node;
-						}
-					}
-
-					if (self != NULL) {
-						if (!g_utf8_validate ((char *) ch, len, NULL)) {
-							char *utf8;
-							utf8 = rsvg_make_valid_utf8 ((char *) ch, len);
-							g_string_append (self->contents, utf8);
-							g_free (utf8);
-						} else {
-							g_string_append_len (self->contents, (char *)ch, len);
-						}
-
-						return;
-					}
-				}
-		}
+    if (ctx->priv->currentnode) {
+        if (!strcmp ("tspan", ctx->priv->currentnode->type->str) ||
+            !strcmp ("text", ctx->priv->currentnode->type->str)) {
+            guint i;
+
+            /* find the last CHARS node in the text or tspan node, so that we
+               can coalesce the text, and thus avoid screwing up the Pango layouts */
+            self = NULL;
+            for (i = 0; i < ctx->priv->currentnode->children->len; i++) {
+                RsvgNode *node = g_ptr_array_index (ctx->priv->currentnode->children, i);
+                if (!strcmp (node->type->str, "RSVG_NODE_CHARS")) {
+                    self = (RsvgNodeChars*)node;
+                }
+            }
+
+            if (self != NULL) {
+                if (!g_utf8_validate ((char *) ch, len, NULL)) {
+                    char *utf8;
+                    utf8 = rsvg_make_valid_utf8 ((char *) ch, len);
+                    g_string_append (self->contents, utf8);
+                    g_free (utf8);
+                } else {
+                    g_string_append_len (self->contents, (char *)ch, len);
+                }
+
+                return;
+            }
+        }
+    }
 
     self = g_new (RsvgNodeChars, 1);
     _rsvg_node_init (&self->super);
@@ -980,26 +979,27 @@ rsvg_path_is_uri (char const *path)
     char const *p;
 
     if (path == NULL)
-	return FALSE;
+        return FALSE;
 
     if (strlen (path) < 4)
-	return FALSE;
+        return FALSE;
 
-    if (   (path[0] < 'a' || path[0] > 'z')
-	&& (path[0] < 'A' || path[0] > 'Z'))
-	return FALSE;
+    if ((path[0] < 'a' || path[0] > 'z') &&
+        (path[0] < 'A' || path[0] > 'Z')) {
+        return FALSE;
+    }
 
     for (p = &path[1];
-	    (*p >= 'a' && *p <= 'z') 
-	 || (*p >= 'A' && *p <= 'Z') 
-	 || (*p >= '0' && *p <= '9') 
-	 || *p == '+' 
-	 || *p == '-' 
-	 || *p == '.';
-	 p++);
+	    (*p >= 'a' && *p <= 'z') ||
+        (*p >= 'A' && *p <= 'Z') ||
+        (*p >= '0' && *p <= '9') ||
+         *p == '+' ||
+         *p == '-' ||
+         *p == '.';
+        p++);
 
     if (strlen (p) < 3)
-	return FALSE;
+        return FALSE;
 
     return (p[0] == ':' && p[1] == '/' && p[2] == '/');
 }
@@ -1045,9 +1045,9 @@ rsvg_handle_set_base_uri (RsvgHandle * handle, const char *base_uri)
 	return;
 
     if (rsvg_path_is_uri (base_uri)) 
-	uri = g_strdup (base_uri);
+        uri = g_strdup (base_uri);
     else
-	uri = rsvg_get_base_uri_from_filename (base_uri);
+        uri = rsvg_get_base_uri_from_filename (base_uri);
 
     if (uri) {
         if (handle->priv->base_uri)
@@ -1091,19 +1091,19 @@ rsvg_error_quark (void)
 static void
 rsvg_set_error (GError **error, xmlParserCtxtPtr ctxt)
 {
-  xmlErrorPtr xerr;
+    xmlErrorPtr xerr;
 
-  xerr = xmlCtxtGetLastError (ctxt);
-  if (xerr) {
-    g_set_error (error, rsvg_error_quark (), 0,
-                 _("Error domain %d code %d on line %d column %d of %s: %s"),
-                 xerr->domain, xerr->code,
-                 xerr->line, xerr->int2,
-                 xerr->file ? xerr->file : "data",
-                 xerr->message ? xerr->message: "-");
-  } else {
-    g_set_error (error, rsvg_error_quark (), 0, _("Error parsing XML data"));
-  }
+    xerr = xmlCtxtGetLastError (ctxt);
+    if (xerr) {
+        g_set_error (error, rsvg_error_quark (), 0,
+                     _("Error domain %d code %d on line %d column %d of %s: %s"),
+                     xerr->domain, xerr->code,
+                     xerr->line, xerr->int2,
+                     xerr->file ? xerr->file : "data",
+                     xerr->message ? xerr->message: "-");
+    } else {
+        g_set_error (error, rsvg_error_quark (), 0, _("Error parsing XML data"));
+    }
 }
 
 static gboolean
@@ -1289,13 +1289,13 @@ rsvg_handle_get_dimensions (RsvgHandle * handle, RsvgDimensionData * dimension_d
      * To prevent an infinite loop we are saving the state.
      */
     if (!handle->priv->in_loop) {
-	handle->priv->in_loop = TRUE;
-	rsvg_handle_get_dimensions_sub (handle, dimension_data, NULL);
-	handle->priv->in_loop = FALSE;
+        handle->priv->in_loop = TRUE;
+        rsvg_handle_get_dimensions_sub (handle, dimension_data, NULL);
+        handle->priv->in_loop = FALSE;
     } else {
-	/* Called within the size function, so return a standard size */
-	dimension_data->em = dimension_data->width = 1;
-	dimension_data->ex = dimension_data->height = 1;
+        /* Called within the size function, so return a standard size */
+        dimension_data->em = dimension_data->width = 1;
+        dimension_data->ex = dimension_data->height = 1;
     }
 }
 
@@ -1330,78 +1330,78 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
     memset (dimension_data, 0, sizeof (RsvgDimensionData));
 
     if (id && *id) {
-	sself = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
+        sself = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
 
-	if (sself == (RsvgNode *) handle->priv->treebase)
-	    id = NULL;
+        if (sself == (RsvgNode *) handle->priv->treebase)
+            id = NULL;
     }
     else
-	sself = (RsvgNode *) handle->priv->treebase;
+        sself = (RsvgNode *) handle->priv->treebase;
 
     if (!sself && id)
-	return FALSE;
+        return FALSE;
 
     root = (RsvgNodeSvg *) handle->priv->treebase;
 
     if (!root)
-	return FALSE;
+        return FALSE;
 
     bbox.x = bbox.y = 0;
     bbox.w = bbox.h = 1;
 
     if (!id && (root->w.factor == 'p' || root->h.factor == 'p')
-	    && !root->vbox.active)
-	handle_subelement = TRUE;
+            && !root->vbox.active)
+        handle_subelement = TRUE;
     else if (!id && root->w.length != -1 && root->h.length != -1)
-	handle_subelement = FALSE;
+        handle_subelement = FALSE;
 
     if (handle_subelement == TRUE) {
-	target = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
-					 1, 1);
-	cr = cairo_create  (target);
+        target = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+                                             1, 1);
+        cr = cairo_create  (target);
 
-	draw = rsvg_cairo_new_drawing_ctx (cr, handle);
-    
-	if (!draw) {
-	    cairo_destroy (cr);
-	    cairo_surface_destroy (target);
-	    
-	    return FALSE;
-	}
+        draw = rsvg_cairo_new_drawing_ctx (cr, handle);
 
-	while (sself != NULL) {
-	    draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, sself);
-	    sself = sself->parent;
-	}
+        if (!draw) {
+            cairo_destroy (cr);
+            cairo_surface_destroy (target);
+
+            return FALSE;
+        }
+
+        while (sself != NULL) {
+            draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, sself);
+            sself = sself->parent;
+        }
 
-	rsvg_state_push (draw);
-	cairo_save (cr);
+        rsvg_state_push (draw);
+        cairo_save (cr);
 
-	rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
-	render = (RsvgCairoRender *) draw->render;
+        rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
+        render = (RsvgCairoRender *) draw->render;
 
-	bbox.x = render->bbox.x;
-	bbox.y = render->bbox.y;
-	bbox.w = render->bbox.w;
-	bbox.h = render->bbox.h;
+        bbox.x = render->bbox.x;
+        bbox.y = render->bbox.y;
+        bbox.w = render->bbox.w;
+        bbox.h = render->bbox.h;
 
-	cairo_restore (cr);
-	rsvg_state_pop (draw);
-	rsvg_drawing_ctx_free (draw);
-	cairo_destroy (cr);
-	cairo_surface_destroy (target);
+        cairo_restore (cr);
+        rsvg_state_pop (draw);
+        rsvg_drawing_ctx_free (draw);
+        cairo_destroy (cr);
+        cairo_surface_destroy (target);
 
-	dimension_data->width = bbox.w;
-	dimension_data->height = bbox.h;
+        dimension_data->width = bbox.w;
+        dimension_data->height = bbox.h;
     } else {
-	bbox.w = root->vbox.w; 
-	bbox.h = root->vbox.h; 
-
-	dimension_data->width = (int) (_rsvg_css_hand_normalize_length (&root->w, handle->priv->dpi_x,
-									bbox.w + bbox.x * 2, 12) + 0.5);
-	dimension_data->height = (int) (_rsvg_css_hand_normalize_length (&root->h, handle->priv->dpi_y, 
-									bbox.h + bbox.y * 2,
-									12) + 0.5);
+        bbox.w = root->vbox.w;
+        bbox.h = root->vbox.h;
+
+        dimension_data->width = (int) (_rsvg_css_hand_normalize_length (&root->w, handle->priv->dpi_x,
+                                       bbox.w + bbox.x * 2, 12) + 0.5);
+        dimension_data->height = (int) (_rsvg_css_hand_normalize_length (&root->h, handle->priv->dpi_y,
+                                         bbox.h + bbox.y * 2,
+                                         12) + 0.5);
     }
     
     dimension_data->em = dimension_data->width;
@@ -1430,87 +1430,87 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
 gboolean
 rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_data, const char *id)
 {
-	RsvgDrawingCtx		*draw;
-	RsvgNodeSvg			*root;
-	RsvgNode			*node;
-	RsvgBbox			 bbox;
-	RsvgDimensionData    dimension_data;
-	cairo_surface_t		*target = NULL;
-	cairo_t				*cr = NULL;
-	gboolean			 ret = FALSE;
-
-	g_return_val_if_fail (handle, FALSE);
-	g_return_val_if_fail (position_data, FALSE);
-
-	/* Short-cut when no id is given. */
-	if (NULL == id || '\0' == *id) {
-		position_data->x = 0;
-		position_data->y = 0;
-		return TRUE;
-	}
+    RsvgDrawingCtx		*draw;
+    RsvgNodeSvg			*root;
+    RsvgNode			*node;
+    RsvgBbox			 bbox;
+    RsvgDimensionData    dimension_data;
+    cairo_surface_t		*target = NULL;
+    cairo_t				*cr = NULL;
+    gboolean			 ret = FALSE;
 
-	memset (position_data, 0, sizeof (*position_data));
-	memset (&dimension_data, 0, sizeof (dimension_data));
+    g_return_val_if_fail (handle, FALSE);
+    g_return_val_if_fail (position_data, FALSE);
 
-	node = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
-	if (!node) {
-		return FALSE;
-	} else if (node == (RsvgNode *) handle->priv->treebase) {
-		/* Root node. */
-		position_data->x = 0;
-		position_data->y = 0;
-		return TRUE;
-	}
+    /* Short-cut when no id is given. */
+    if (NULL == id || '\0' == *id) {
+        position_data->x = 0;
+        position_data->y = 0;
+        return TRUE;
+    }
 
-	root = (RsvgNodeSvg *) handle->priv->treebase;
-	if (!root)
-		return FALSE;
+    memset (position_data, 0, sizeof (*position_data));
+    memset (&dimension_data, 0, sizeof (dimension_data));
 
-	target = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
-	cr = cairo_create  (target);
-	draw = rsvg_cairo_new_drawing_ctx (cr, handle);
-	if (!draw)
-	    goto bail;
+    node = (RsvgNode *) rsvg_defs_lookup (handle->priv->defs, id);
+    if (!node) {
+        return FALSE;
+    } else if (node == (RsvgNode *) handle->priv->treebase) {
+        /* Root node. */
+        position_data->x = 0;
+        position_data->y = 0;
+        return TRUE;
+    }
 
-	while (node != NULL) {
-	    draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, node);
-	    node = node->parent;
-	}
+    root = (RsvgNodeSvg *) handle->priv->treebase;
+    if (!root)
+        return FALSE;
 
-	rsvg_state_push (draw);
-	cairo_save (cr);
+    target = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
+    cr = cairo_create  (target);
+    draw = rsvg_cairo_new_drawing_ctx (cr, handle);
+    if (!draw)
+        goto bail;
 
-	rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
-	bbox.x = ((RsvgCairoRender *) draw->render)->bbox.x;
-	bbox.y = ((RsvgCairoRender *) draw->render)->bbox.y;
-	bbox.w = ((RsvgCairoRender *) draw->render)->bbox.w;
-	bbox.h = ((RsvgCairoRender *) draw->render)->bbox.h;
+    while (node != NULL) {
+        draw->drawsub_stack = g_slist_prepend (draw->drawsub_stack, node);
+        node = node->parent;
+    }
+
+    rsvg_state_push (draw);
+    cairo_save (cr);
+
+    rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);
+    bbox.x = ((RsvgCairoRender *) draw->render)->bbox.x;
+    bbox.y = ((RsvgCairoRender *) draw->render)->bbox.y;
+    bbox.w = ((RsvgCairoRender *) draw->render)->bbox.w;
+    bbox.h = ((RsvgCairoRender *) draw->render)->bbox.h;
 
-	cairo_restore (cr);
-	rsvg_state_pop (draw);
-	rsvg_drawing_ctx_free (draw);
+    cairo_restore (cr);
+    rsvg_state_pop (draw);
+    rsvg_drawing_ctx_free (draw);
 
-	position_data->x = bbox.x;
-	position_data->y = bbox.y;
-	dimension_data.width = bbox.w;
-	dimension_data.height = bbox.h;
+    position_data->x = bbox.x;
+    position_data->y = bbox.y;
+    dimension_data.width = bbox.w;
+    dimension_data.height = bbox.h;
 
-	dimension_data.em = dimension_data.width;
-	dimension_data.ex = dimension_data.height;
+    dimension_data.em = dimension_data.width;
+    dimension_data.ex = dimension_data.height;
 
-	if (handle->priv->size_func)
-	    (*handle->priv->size_func) (&dimension_data.width, &dimension_data.height,
-	                                handle->priv->user_data);
+    if (handle->priv->size_func)
+        (*handle->priv->size_func) (&dimension_data.width, &dimension_data.height,
+                                    handle->priv->user_data);
 
-        ret = TRUE;
+    ret = TRUE;
 
 bail:
-	if (cr)
-		cairo_destroy (cr);
-	if (target)
-		cairo_surface_destroy (target);
+    if (cr)
+        cairo_destroy (cr);
+    if (target)
+        cairo_surface_destroy (target);
 
-	return ret;
+    return ret;
 }
 
 /** 
@@ -1874,15 +1874,12 @@ rsvg_bbox_insert (RsvgBbox * dst, RsvgBbox * src)
     if (src->virgin)
         return;
 
-    if (!dst->virgin)
-        {
-            xmin = dst->x, ymin = dst->y;
-            xmax = dst->x + dst->w, ymax = dst->y + dst->h;
-        }
-    else
-        {
-            xmin = ymin = xmax = ymax = 0;
-        }
+    if (!dst->virgin) {
+        xmin = dst->x, ymin = dst->y;
+        xmax = dst->x + dst->w, ymax = dst->y + dst->h;
+    } else {
+        xmin = ymin = xmax = ymax = 0;
+    }
 
     _rsvg_affine_invert (affine, dst->affine);
     _rsvg_affine_multiply (affine, src->affine, affine);
@@ -1925,15 +1922,12 @@ rsvg_bbox_clip (RsvgBbox * dst, RsvgBbox * src)
     if (src->virgin)
         return;
 
-	if (!dst->virgin)
-		{
-			xmin = dst->x + dst->w, ymin = dst->y + dst->h;
-			xmax = dst->x, ymax = dst->y;
-		}
-	else
-		{
-			xmin = ymin = xmax = ymax = 0;
-		}
+	if (!dst->virgin) {
+        xmin = dst->x + dst->w, ymin = dst->y + dst->h;
+        xmax = dst->x, ymax = dst->y;
+    } else {
+        xmin = ymin = xmax = ymax = 0;
+    }
 
     _rsvg_affine_invert (affine, dst->affine);
     _rsvg_affine_multiply (affine, src->affine, affine);
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 1b7646f..4c43b03 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /* 
    rsvg-filter.c: Provides filters
  
diff --git a/rsvg-filter.h b/rsvg-filter.h
index 49d54c6..b8e3e73 100644
--- a/rsvg-filter.h
+++ b/rsvg-filter.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-filter.h : Provides filters
 
@@ -42,36 +43,36 @@ struct _RsvgFilter {
 };
 
 GdkPixbuf   *rsvg_filter_render	    (RsvgFilter * self, GdkPixbuf * source, GdkPixbuf * bg,
-				     RsvgDrawingCtx * context, RsvgBbox * dimentions, char *channelmap);
+                                     RsvgDrawingCtx * context, RsvgBbox * dimentions, char *channelmap);
 
 RsvgNode    *rsvg_new_filter	    (void);
 RsvgFilter  *rsvg_filter_parse	    (const RsvgDefs * defs, const char *str);
 
-RsvgNode    *rsvg_new_filter_primitive_blend		    (void);
-RsvgNode    *rsvg_new_filter_primitive_convolve_matrix	    (void);
-RsvgNode    *rsvg_new_filter_primitive_gaussian_blur	    (void);
-RsvgNode    *rsvg_new_filter_primitive_offset		    (void);
-RsvgNode    *rsvg_new_filter_primitive_merge		    (void);
-RsvgNode    *rsvg_new_filter_primitive_merge_node	    (void);
-RsvgNode    *rsvg_new_filter_primitive_colour_matrix	    (void);
+RsvgNode    *rsvg_new_filter_primitive_blend                (void);
+RsvgNode    *rsvg_new_filter_primitive_convolve_matrix      (void);
+RsvgNode    *rsvg_new_filter_primitive_gaussian_blur        (void);
+RsvgNode    *rsvg_new_filter_primitive_offset               (void);
+RsvgNode    *rsvg_new_filter_primitive_merge                (void);
+RsvgNode    *rsvg_new_filter_primitive_merge_node           (void);
+RsvgNode    *rsvg_new_filter_primitive_colour_matrix        (void);
 RsvgNode    *rsvg_new_filter_primitive_component_transfer   (void);
-RsvgNode    *rsvg_new_node_component_transfer_function	    (char channel);
-RsvgNode    *rsvg_new_filter_primitive_erode		    (void);
-RsvgNode    *rsvg_new_filter_primitive_composite	    (void);
-RsvgNode    *rsvg_new_filter_primitive_flood		    (void);
-RsvgNode    *rsvg_new_filter_primitive_displacement_map	    (void);
-RsvgNode    *rsvg_new_filter_primitive_turbulence	    (void);
-RsvgNode    *rsvg_new_filter_primitive_image		    (void);
+RsvgNode    *rsvg_new_node_component_transfer_function      (char channel);
+RsvgNode    *rsvg_new_filter_primitive_erode                (void);
+RsvgNode    *rsvg_new_filter_primitive_composite            (void);
+RsvgNode    *rsvg_new_filter_primitive_flood                (void);
+RsvgNode    *rsvg_new_filter_primitive_displacement_map     (void);
+RsvgNode    *rsvg_new_filter_primitive_turbulence           (void);
+RsvgNode    *rsvg_new_filter_primitive_image                (void);
 RsvgNode    *rsvg_new_filter_primitive_diffuse_lighting	    (void);
-RsvgNode    *rsvg_new_filter_primitive_light_source	    (char type);
+RsvgNode    *rsvg_new_filter_primitive_light_source	        (char type);
 RsvgNode    *rsvg_new_filter_primitive_specular_lighting    (void);
-RsvgNode    *rsvg_new_filter_primitive_tile		    (void);
+RsvgNode    *rsvg_new_filter_primitive_tile                 (void);
 
-void	     rsvg_alpha_blt		(GdkPixbuf * src, gint srcx, gint srcy,
-					 gint srcwidth, gint srcheight, 
-					 GdkPixbuf * dst, gint dstx, gint dsty);
-void	     rsvg_art_affine_image	(const GdkPixbuf * img, GdkPixbuf * intermediate,
-					 double *affine, double w, double h);
+void         rsvg_alpha_blt         (GdkPixbuf * src, gint srcx, gint srcy,
+                                     gint srcwidth, gint srcheight,
+                                     GdkPixbuf * dst, gint dstx, gint dsty);
+void         rsvg_art_affine_image	(const GdkPixbuf * img, GdkPixbuf * intermediate,
+                                     double *affine, double w, double h);
 
 G_END_DECLS
 
diff --git a/rsvg-gobject.c b/rsvg-gobject.c
index 09a67b2..62c6670 100644
--- a/rsvg-gobject.c
+++ b/rsvg-gobject.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-gobject.c: GObject support.
 
@@ -84,7 +85,7 @@ rsvg_ctx_free_helper (gpointer key, gpointer value, gpointer user_data)
     xmlFree (entval->orig);
     xmlFree (entval);
 #else
-	xmlFreeNode((xmlNode *) entval);
+    xmlFreeNode((xmlNode *) entval);
 #endif
 }
 
@@ -201,9 +202,9 @@ class_init (RsvgHandleClass * klass)
     gobject_class->set_property = set_property;
     gobject_class->get_property = get_property;
 
-        /**
-	 * dpi-x:
-	 */
+    /**
+     * dpi-x:
+     */
     g_object_class_install_property (gobject_class,
                                      PROP_DPI_X,
                                      g_param_spec_double ("dpi-x", _("Horizontal resolution"),
diff --git a/rsvg-paint-server.c b/rsvg-paint-server.c
index 1c1cb53..4967e03 100644
--- a/rsvg-paint-server.c
+++ b/rsvg-paint-server.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /* 
    rsvg-paint-server.c: Implement the SVG paint server abstraction.
  
diff --git a/rsvg-paint-server.h b/rsvg-paint-server.h
index b6e37aa..2aab05c 100644
--- a/rsvg-paint-server.h
+++ b/rsvg-paint-server.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-paint-server.h : RSVG colors
 
@@ -141,19 +142,19 @@ struct _RsvgPaintServer {
 };
 
 /* Create a new paint server based on a specification string. */
-RsvgPaintServer	    *rsvg_paint_server_parse	(gboolean * inherit, const RsvgDefs * defs,
-						 const char *str, guint32 current_color);
-void		     rsvg_paint_server_ref	(RsvgPaintServer * ps);
-void		     rsvg_paint_server_unref	(RsvgPaintServer * ps);
+RsvgPaintServer	    *rsvg_paint_server_parse    (gboolean * inherit, const RsvgDefs * defs,
+                                                 const char *str, guint32 current_color);
+void                 rsvg_paint_server_ref      (RsvgPaintServer * ps);
+void                 rsvg_paint_server_unref    (RsvgPaintServer * ps);
 RsvgRadialGradient  *rsvg_clone_radial_gradient (const RsvgRadialGradient * grad,
-						 gboolean * shallow_cloned);
+                                                 gboolean * shallow_cloned);
 RsvgLinearGradient  *rsvg_clone_linear_gradient (const RsvgLinearGradient * grad,
-						 gboolean * shallow_cloned);
+                                                 gboolean * shallow_cloned);
 RsvgNode *rsvg_new_linear_gradient  (void);
 RsvgNode *rsvg_new_radial_gradient  (void);
-RsvgNode *rsvg_new_stop		    (void);
-RsvgNode *rsvg_new_pattern	    (void);
-void rsvg_pattern_fix_fallback		(RsvgPattern * pattern);
+RsvgNode *rsvg_new_stop	        (void);
+RsvgNode *rsvg_new_pattern      (void);
+void rsvg_pattern_fix_fallback          (RsvgPattern * pattern);
 void rsvg_linear_gradient_fix_fallback	(RsvgLinearGradient * grad);
 void rsvg_radial_gradient_fix_fallback	(RsvgRadialGradient * grad);
 
diff --git a/rsvg-private.h b/rsvg-private.h
index 25b952f..737ed13 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-private.h: Internals of RSVG
 
@@ -196,18 +197,18 @@ struct RsvgDrawingCtx {
 struct RsvgRender {
     void (*free) (RsvgRender * self);
 
-    PangoContext    *(*create_pango_context)	(RsvgDrawingCtx * ctx);
-    void	     (*render_pango_layout)	(RsvgDrawingCtx * ctx, PangoLayout *layout, 
-						 double x, double y);
-    void	     (*render_path)		(RsvgDrawingCtx * ctx, const RsvgBpathDef * path);
-    void	     (*render_image)		(RsvgDrawingCtx * ctx, const GdkPixbuf * pixbuf,
-						 double x, double y, double w, double h);
-    void	     (*pop_discrete_layer)	(RsvgDrawingCtx * ctx);
-    void	     (*push_discrete_layer)	(RsvgDrawingCtx * ctx);
-    void	     (*add_clipping_rect)	(RsvgDrawingCtx * ctx, double x, double y, 
-						 double w, double h);
-    GdkPixbuf	    *(*get_image_of_node)	(RsvgDrawingCtx * ctx, RsvgNode * drawable, 
-						 double w, double h);
+    PangoContext    *(*create_pango_context)    (RsvgDrawingCtx * ctx);
+    void             (*render_pango_layout)	    (RsvgDrawingCtx * ctx, PangoLayout *layout,
+                                                 double x, double y);
+    void             (*render_path)             (RsvgDrawingCtx * ctx, const RsvgBpathDef * path);
+    void             (*render_image)            (RsvgDrawingCtx * ctx, const GdkPixbuf * pixbuf,
+                                                 double x, double y, double w, double h);
+    void             (*pop_discrete_layer)      (RsvgDrawingCtx * ctx);
+    void             (*push_discrete_layer)     (RsvgDrawingCtx * ctx);
+    void             (*add_clipping_rect)       (RsvgDrawingCtx * ctx, double x, double y,
+                                                 double w, double h);
+    GdkPixbuf       *(*get_image_of_node)       (RsvgDrawingCtx * ctx, RsvgNode * drawable,
+                                                 double w, double h);
 };
 
 
@@ -266,13 +267,13 @@ struct _RsvgNodeChars {
 
 typedef void (*RsvgPropertyBagEnumFunc) (const char *key, const char *value, gpointer user_data);
 
-RsvgPropertyBag	    *rsvg_property_bag_new	(const char **atts);
-RsvgPropertyBag	    *rsvg_property_bag_ref	(RsvgPropertyBag * bag);
-void		     rsvg_property_bag_free	(RsvgPropertyBag * bag);
-G_CONST_RETURN char *rsvg_property_bag_lookup	(RsvgPropertyBag * bag, const char *key);
-guint		     rsvg_property_bag_size	(RsvgPropertyBag * bag);
-void		     rsvg_property_bag_enumerate (RsvgPropertyBag * bag, RsvgPropertyBagEnumFunc func, 
-						  gpointer user_data);
+RsvgPropertyBag	    *rsvg_property_bag_new       (const char **atts);
+RsvgPropertyBag	    *rsvg_property_bag_ref       (RsvgPropertyBag * bag);
+void                 rsvg_property_bag_free      (RsvgPropertyBag * bag);
+G_CONST_RETURN char *rsvg_property_bag_lookup    (RsvgPropertyBag * bag, const char *key);
+guint                rsvg_property_bag_size	     (RsvgPropertyBag * bag);
+void                 rsvg_property_bag_enumerate (RsvgPropertyBag * bag, RsvgPropertyBagEnumFunc func,
+                                                  gpointer user_data);
 
 GdkPixbuf *rsvg_pixbuf_from_data_with_size_data (const guchar * buff,
                                                  size_t len,
@@ -280,20 +281,20 @@ GdkPixbuf *rsvg_pixbuf_from_data_with_size_data (const guchar * buff,
                                                  const char *base_uri, GError ** error);
 
 gboolean     rsvg_eval_switch_attributes	(RsvgPropertyBag * atts, gboolean * p_has_cond);
-GdkPixbuf   *_rsvg_pixbuf_new_cleared		(GdkColorspace colorspace, gboolean has_alpha,
-						 int bits_per_sample, int width, int height);
-
-gchar	    *rsvg_get_base_uri_from_filename	(const gchar * file_name);
-GByteArray  *_rsvg_acquire_xlink_href_resource	(const char *href,
-						 const char *base_uri, GError ** err);
-
-void rsvg_pop_discrete_layer	(RsvgDrawingCtx * ctx);
-void rsvg_push_discrete_layer	(RsvgDrawingCtx * ctx);
-void rsvg_render_path		(RsvgDrawingCtx * ctx, const char *d);
-void rsvg_render_image		(RsvgDrawingCtx * ctx, GdkPixbuf * pb,
-				 double x, double y, double w, double h);
-void rsvg_render_free		(RsvgRender * render);
-void rsvg_add_clipping_rect	(RsvgDrawingCtx * ctx, double x, double y, double w, double h);
+GdkPixbuf   *_rsvg_pixbuf_new_cleared       (GdkColorspace colorspace, gboolean has_alpha,
+                                             int bits_per_sample, int width, int height);
+
+gchar       *rsvg_get_base_uri_from_filename    (const gchar * file_name);
+GByteArray  *_rsvg_acquire_xlink_href_resource  (const char *href,
+                                                 const char *base_uri, GError ** err);
+
+void rsvg_pop_discrete_layer    (RsvgDrawingCtx * ctx);
+void rsvg_push_discrete_layer   (RsvgDrawingCtx * ctx);
+void rsvg_render_path           (RsvgDrawingCtx * ctx, const char *d);
+void rsvg_render_image          (RsvgDrawingCtx * ctx, GdkPixbuf * pb,
+                                 double x, double y, double w, double h);
+void rsvg_render_free           (RsvgRender * render);
+void rsvg_add_clipping_rect     (RsvgDrawingCtx * ctx, double x, double y, double w, double h);
 GdkPixbuf *rsvg_get_image_of_node (RsvgDrawingCtx * ctx, RsvgNode * drawable, double w, double h);
 
 
@@ -336,13 +337,13 @@ void rsvg_node_set_atts (RsvgNode * node, RsvgHandle * ctx, RsvgPropertyBag * at
 
 void rsvg_drawing_ctx_free (RsvgDrawingCtx * handle);
 
-void rsvg_bbox_init	(RsvgBbox * self, double *affine);
-void rsvg_bbox_insert	(RsvgBbox * dst, RsvgBbox * src);
-void rsvg_bbox_clip	(RsvgBbox * dst, RsvgBbox * src);
+void rsvg_bbox_init     (RsvgBbox * self, double *affine);
+void rsvg_bbox_insert   (RsvgBbox * dst, RsvgBbox * src);
+void rsvg_bbox_clip     (RsvgBbox * dst, RsvgBbox * src);
 
-double _rsvg_css_normalize_length	(const RsvgLength * in, RsvgDrawingCtx * ctx, char dir);
-double _rsvg_css_hand_normalize_length	(const RsvgLength * in, gdouble pixels_per_inch,
-					 gdouble width_or_height, gdouble font_size);
+double _rsvg_css_normalize_length       (const RsvgLength * in, RsvgDrawingCtx * ctx, char dir);
+double _rsvg_css_hand_normalize_length  (const RsvgLength * in, gdouble pixels_per_inch,
+                                         gdouble width_or_height, gdouble font_size);
 
 RsvgLength _rsvg_css_parse_length (const char *str);
 
@@ -356,20 +357,20 @@ char *rsvg_get_url_string (const char *str);
 void rsvg_return_if_fail_warning (const char *pretty_function,
                                   const char *expression, GError ** error);
 
-#define rsvg_return_if_fail(expr, error)		G_STMT_START{			\
-     if G_LIKELY(expr) { } else       					\
-       {								\
-	 rsvg_return_if_fail_warning (G_STRFUNC,			\
-		                   #expr, error);			\
-	 return;							\
+#define rsvg_return_if_fail(expr, error)    G_STMT_START{			\
+     if G_LIKELY(expr) { } else                                     \
+       {                                                            \
+           rsvg_return_if_fail_warning (G_STRFUNC,                  \
+                                        #expr, error);              \
+           return;                                                  \
        };				}G_STMT_END
 
-#define rsvg_return_val_if_fail(expr,val,error)	G_STMT_START{			\
-     if G_LIKELY(expr) { } else						\
-       {								\
-	 rsvg_return_if_fail_warning (G_STRFUNC,	    		\
-		                   #expr, error);			\
-	 return (val);							\
+#define rsvg_return_val_if_fail(expr,val,error)	G_STMT_START{       \
+     if G_LIKELY(expr) { } else                                     \
+       {                                                            \
+           rsvg_return_if_fail_warning (G_STRFUNC,                  \
+                                        #expr, error);              \
+           return (val);                                            \
        };				}G_STMT_END
 
 G_END_DECLS
diff --git a/rsvg-shapes.c b/rsvg-shapes.c
index 164409b..d481abf 100644
--- a/rsvg-shapes.c
+++ b/rsvg-shapes.c
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-shapes.c: Draw SVG shapes
 
diff --git a/rsvg-shapes.h b/rsvg-shapes.h
index b4ed0b3..7cf6621 100644
--- a/rsvg-shapes.h
+++ b/rsvg-shapes.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /*
    rsvg-shapes.h: Draw SVG shapes
 
diff --git a/rsvg.h b/rsvg.h
index b1fa906..85ce82f 100644
--- a/rsvg.h
+++ b/rsvg.h
@@ -1,4 +1,5 @@
-/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: set sw=4 sts=4 ts=4 expandtab: */
 /* 
    rsvg.h: SAX-based renderer for SVG files into a GdkPixbuf.
  
@@ -77,24 +78,24 @@ struct _RsvgHandle {
 /* RsvgDimensionData
  */
 struct _RsvgDimensionData {
-        /**
-	 * SVG's width, in pixels
-	 */
+    /**
+     * SVG's width, in pixels
+     */
     int width;
 
-        /**
-	 * SVG's height, in pixels
-	 */
+    /**
+     * SVG's height, in pixels
+     */
     int height;
 
-        /**
-	 * em
-	 */
+    /**
+     * em
+     */
     gdouble em;
 
-        /**
-	 * ex
-	 */
+    /**
+     * ex
+     */
     gdouble ex;
 };
 
@@ -117,13 +118,13 @@ void rsvg_handle_set_dpi_x_y	(RsvgHandle * handle, double dpi_x, double dpi_y);
 
 RsvgHandle  *rsvg_handle_new		(void);
 gboolean     rsvg_handle_write		(RsvgHandle * handle, const guchar * buf, 
-					 gsize count, GError ** error);
+                                     gsize count, GError ** error);
 gboolean     rsvg_handle_close		(RsvgHandle * handle, GError ** error);
 GdkPixbuf   *rsvg_handle_get_pixbuf	(RsvgHandle * handle);
 GdkPixbuf   *rsvg_handle_get_pixbuf_sub (RsvgHandle * handle, const char *id);
 
 G_CONST_RETURN char	*rsvg_handle_get_base_uri (RsvgHandle * handle);
-void			 rsvg_handle_set_base_uri (RsvgHandle * handle, const char *base_uri);
+void                 rsvg_handle_set_base_uri (RsvgHandle * handle, const char *base_uri);
 
 void rsvg_handle_get_dimensions (RsvgHandle * handle, RsvgDimensionData * dimension_data);
 
@@ -160,22 +161,22 @@ void rsvg_handle_free (RsvgHandle * handle);
  */
 typedef void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data);
 void rsvg_handle_set_size_callback (RsvgHandle * handle,
-				    RsvgSizeFunc size_func,
-				    gpointer user_data, GDestroyNotify user_data_destroy);
+                                    RsvgSizeFunc size_func,
+                                    gpointer user_data, GDestroyNotify user_data_destroy);
 
 /* GdkPixbuf convenience API */
 
-GdkPixbuf *rsvg_pixbuf_from_file		(const gchar * file_name, GError ** error);
-GdkPixbuf *rsvg_pixbuf_from_file_at_zoom	(const gchar * file_name,
-						 double x_zoom, double y_zoom, GError ** error);
-GdkPixbuf *rsvg_pixbuf_from_file_at_size	(const gchar * file_name, gint width, gint height, 
-						 GError ** error);
-GdkPixbuf *rsvg_pixbuf_from_file_at_max_size	(const gchar * file_name,
-						 gint max_width, gint max_height, GError ** error);
+GdkPixbuf *rsvg_pixbuf_from_file            (const gchar * file_name, GError ** error);
+GdkPixbuf *rsvg_pixbuf_from_file_at_zoom    (const gchar * file_name,
+                                             double x_zoom, double y_zoom, GError ** error);
+GdkPixbuf *rsvg_pixbuf_from_file_at_size    (const gchar * file_name, gint width, gint height,
+                                             GError ** error);
+GdkPixbuf *rsvg_pixbuf_from_file_at_max_size    (const gchar * file_name,
+                                                 gint max_width, gint max_height, GError ** error);
 GdkPixbuf *rsvg_pixbuf_from_file_at_zoom_with_max (const gchar * file_name,
-						   double x_zoom,
-						   double y_zoom,
-						   gint max_width, gint max_height, GError ** error);
+                                                   double x_zoom,
+                                                   double y_zoom,
+                                                   gint max_width, gint max_height, GError ** error);
 
 #endif                          /* RSVG_DISABLE_DEPRECATED */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]