babl r311 - in trunk: . babl



Author: neo
Date: Wed May 14 15:18:26 2008
New Revision: 311
URL: http://svn.gnome.org/viewvc/babl?rev=311&view=rev

Log:
2008-05-14  Sven Neumann  <sven gimp org>

	* babl/babl-format.c (format_new): initialize format.visited.

	* babl/babl-format.h
	* babl/babl-fish-path.c: formatting.


Modified:
   trunk/ChangeLog
   trunk/babl/babl-fish-path.c
   trunk/babl/babl-format.c
   trunk/babl/babl-format.h

Modified: trunk/babl/babl-fish-path.c
==============================================================================
--- trunk/babl/babl-fish-path.c	(original)
+++ trunk/babl/babl-fish-path.c	Wed May 14 15:18:26 2008
@@ -152,7 +152,8 @@
                * let's copy it into our new fish */
               fish_path->fish_path.cost = path_cost;
               fish_path->fish.error  = path_error;
-              babl_list_copy (current_path, fish_path->fish_path.conversion_list);
+              babl_list_copy (current_path,
+                              fish_path->fish_path.conversion_list);
             }
         }
     }
@@ -169,7 +170,7 @@
           /* Mark the current format in conversion path as visited */
           current_format->format.visited = 1;
 
-           /* Iterate through unvisited formats from the current format ...*/
+          /* Iterate through unvisited formats from the current format ...*/
           for (i = 0; i < babl_list_size (list); i++)
             {
               Babl *next_conversion = BABL (list->items[i]);
@@ -372,7 +373,7 @@
 
 // FishPath instrumentation
 
-static Babl *fmt_rgba_double = NULL;
+static Babl   *fmt_rgba_double = NULL;
 static double *test = NULL;
 static void   *source;
 static void   *destination;
@@ -382,8 +383,8 @@
 static Babl   *fish_rgba_to_source;
 static Babl   *fish_reference;
 static Babl   *fish_destination_to_rgba;
-static double reference_cost;
-static int    init_instrumentation_done = 0;
+static double  reference_cost;
+static int     init_instrumentation_done = 0;
 
 static void
 init_path_instrumentation (Babl *fmt_source,

Modified: trunk/babl/babl-format.c
==============================================================================
--- trunk/babl/babl-format.c	(original)
+++ trunk/babl/babl-format.c	Wed May 14 15:18:26 2008
@@ -103,6 +103,7 @@
   }
 
   babl->format.loss = -1.0;
+  babl->format.visited = 0;
   babl->format.image_template = NULL;
 
   return babl;

Modified: trunk/babl/babl-format.h
==============================================================================
--- trunk/babl/babl-format.h	(original)
+++ trunk/babl/babl-format.h	Wed May 14 15:18:26 2008
@@ -17,7 +17,7 @@
  */
 
 #ifndef _BABL_H
-#error  this file is only to be included by babl.h 
+#error  this file is only to be included by babl.h
 #endif
 
 /****************************************************************/
@@ -42,10 +42,10 @@
  */
 Babl *babl_format_id     (int id);
 void  babl_format_each   (BablEachFunction  each_fun,
-                        void             *user_data);
+                          void             *user_data);
 Babl * babl_format       (const char       *name);
 Babl * babl_format_new   (void             *first_arg,
-                        ...) BABL_ARG_NULL_TERMINATED;
+                          ...) BABL_ARG_NULL_TERMINATED;
 
 typedef struct
 {
@@ -54,8 +54,8 @@
   int              components;
   BablComponent  **component;
   BablType       **type;
-  void            *image_template; /* image template for use with 
-                                       linear (non-planer) images */
+  void            *image_template; /* image template for use with
+                                      linear (non-planer) images */
 
   BablSampling   **sampling;
   BablModel       *model;
@@ -63,6 +63,6 @@
   int              planar;
   double           loss; /*< average relative error when converting
                              from and to RGBA double */
-  int              visited; /* for convenience in code while searching 
+  int              visited; /* for convenience in code while searching
                                for conversion paths */
 } BablFormat;



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