[gimp] Move variables to local scopes



commit 7eaba5f8fc04f11acae44897413f122f1fde54b0
Author: Michael Natterer <mitch gimp org>
Date:   Sun Aug 30 21:07:22 2009 +0200

    Move variables to local scopes

 app/xcf/xcf-load.c |    6 ++++--
 app/xcf/xcf-save.c |   30 +++++++++++++++---------------
 2 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 0cd1fcf..fcc0899 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -124,8 +124,6 @@ xcf_load_image (Gimp     *gimp,
                 GError  **error)
 {
   GimpImage          *image;
-  GimpLayer          *layer;
-  GimpChannel        *channel;
   const GimpParasite *parasite;
   guint32             saved_pos;
   guint32             offset;
@@ -170,6 +168,8 @@ xcf_load_image (Gimp     *gimp,
 
   while (TRUE)
     {
+      GimpLayer *layer;
+
       /* read in the offset of the next layer */
       info->cp += xcf_read_int32 (info->fp, &offset, 1);
 
@@ -213,6 +213,8 @@ xcf_load_image (Gimp     *gimp,
 
   while (TRUE)
     {
+      GimpChannel *channel;
+
       /* read in the offset of the next channel */
       info->cp += xcf_read_int32 (info->fp, &offset, 1);
 
diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c
index 010b48c..ebfcb9b 100644
--- a/app/xcf/xcf-save.c
+++ b/app/xcf/xcf-save.c
@@ -213,20 +213,18 @@ xcf_save_image (XcfInfo    *info,
                 GimpImage  *image,
                 GError    **error)
 {
-  GimpLayer   *layer;
-  GimpChannel *channel;
-  GList       *list;
-  guint32      saved_pos;
-  guint32      offset;
-  guint32      value;
-  guint        n_layers;
-  guint        n_channels;
-  guint        progress = 0;
-  guint        max_progress;
-  gboolean     have_selection;
-  gint         t1, t2, t3, t4;
-  gchar        version_tag[16];
-  GError      *tmp_error = NULL;
+  GList    *list;
+  guint32   saved_pos;
+  guint32   offset;
+  guint32   value;
+  guint     n_layers;
+  guint     n_channels;
+  guint     progress = 0;
+  guint     max_progress;
+  gboolean  have_selection;
+  gint      t1, t2, t3, t4;
+  gchar     version_tag[16];
+  GError   *tmp_error = NULL;
 
   /* write out the tag information for the image */
   if (info->file_version > 0)
@@ -283,7 +281,7 @@ xcf_save_image (XcfInfo    *info,
        list;
        list = g_list_next (list))
     {
-      layer = list->data;
+      GimpLayer *layer = list->data;
 
       /* save the start offset of where we are writing
        *  out the next layer.
@@ -325,6 +323,8 @@ xcf_save_image (XcfInfo    *info,
 
   while (list || have_selection)
     {
+      GimpChannel *channel;
+
       if (list)
         {
           channel = list->data;



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