babl r307 - in trunk: . babl babl/base extensions



Author: neo
Date: Tue Apr 15 10:25:30 2008
New Revision: 307
URL: http://svn.gnome.org/viewvc/babl?rev=307&view=rev

Log:
2008-04-15  Sven Neumann  <sven gimp org>

	* extensions/util.h
	* babl/*.[ch]: removed trailing whitespace.


Modified:
   trunk/ChangeLog
   trunk/babl/babl-classes.h
   trunk/babl/babl-component.c
   trunk/babl/babl-db.c
   trunk/babl/babl-db.h
   trunk/babl/babl-fish-path.c
   trunk/babl/babl-fish-reference.c
   trunk/babl/babl-fish-simple.c
   trunk/babl/babl-fish-stats.c
   trunk/babl/babl-fish.c
   trunk/babl/babl-format.c
   trunk/babl/babl-hash-table.c
   trunk/babl/babl-hash-table.h
   trunk/babl/babl-image.c
   trunk/babl/babl-internal.h
   trunk/babl/babl-introspect.c
   trunk/babl/babl-list.c
   trunk/babl/babl-list.h
   trunk/babl/babl-model.c
   trunk/babl/babl-sanity.c
   trunk/babl/babl-type.c
   trunk/babl/babl.h
   trunk/babl/base/rgb-constants.h
   trunk/babl/base/util.h
   trunk/extensions/util.h

Modified: trunk/babl/babl-classes.h
==============================================================================
--- trunk/babl/babl-classes.h	(original)
+++ trunk/babl/babl-classes.h	Tue Apr 15 10:25:30 2008
@@ -168,7 +168,7 @@
   int              components;
   BablComponent  **component;
   BablType       **type;
-  void            *image_template; /* image template for use with 
+  void            *image_template; /* image template for use with
                                        linear (non-planer) images */
 
   BablSampling   **sampling;
@@ -177,7 +177,7 @@
   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;
 

Modified: trunk/babl/babl-component.c
==============================================================================
--- trunk/babl/babl-component.c	(original)
+++ trunk/babl/babl-component.c	Tue Apr 15 10:25:30 2008
@@ -110,7 +110,7 @@
   va_end (varg);
 
   babl = babl_db_exist (db, id, first_arg);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required id/name,
        * returning the preexistent one instead.

Modified: trunk/babl/babl-db.c
==============================================================================
--- trunk/babl/babl-db.c	(original)
+++ trunk/babl/babl-db.c	Tue Apr 15 10:25:30 2008
@@ -16,7 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-/* Reimplementation of database code using redundant hash tables 
+/* Reimplementation of database code using redundant hash tables
  * for faster searching by id/name and using list for fast item enumeration.
  * Copyright (C) 2008, Jan Heller
  */
@@ -26,7 +26,7 @@
 #include <string.h>
 #include "babl-internal.h"
 
-static int 
+static int
 db_find_by_name (Babl *item, void *data)
 {
   if (!strcmp (item->instance.name, (char *) data))
@@ -34,7 +34,7 @@
   return 0;
 }
 
-static int 
+static int
 db_find_by_id (Babl *item, void *data)
 {
   if (item->instance.id == *((int *) data))
@@ -63,14 +63,14 @@
   db->id_hash = babl_hash_table_init (db_hash_by_id, db_find_by_id);
   db->babl_list = babl_list_init ();
 
-  return db; 
+  return db;
 }
 
 void
 babl_db_destroy (BablDb *db)
 {
   babl_assert (db);
- 
+
   babl_hash_table_destroy (db->name_hash);
   babl_hash_table_destroy (db->id_hash);
   babl_list_destroy (db->babl_list);
@@ -120,7 +120,7 @@
                int        id,
                const char *name)
 {
-  if (id) 
+  if (id)
     return babl_hash_table_find (db->id_hash, babl_hash_by_int (db->id_hash, id), &id);
   return babl_hash_table_find (db->name_hash, babl_hash_by_str (db->name_hash, name), (void *) name);
 }

Modified: trunk/babl/babl-db.h
==============================================================================
--- trunk/babl/babl-db.h	(original)
+++ trunk/babl/babl-db.h	Tue Apr 15 10:25:30 2008
@@ -39,18 +39,18 @@
 BablDb *
 babl_db_init (void);
 
-void 
+void
 babl_db_destroy (BablDb *db);
 
-void 
-babl_db_each (BablDb           *db, 
+void
+babl_db_each (BablDb           *db,
               BablEachFunction  each_fun,
               void             *user_data);
 
 int
 babl_db_count (BablDb *db);
 
-Babl * 
+Babl *
 babl_db_insert (BablDb *db,
                 Babl   *entry);
 
@@ -59,7 +59,7 @@
                int        id,
                const char *name);
 
-Babl * 
+Babl *
 babl_db_exist_by_name (BablDb     *db,
                        const char *name);
 Babl *

Modified: trunk/babl/babl-fish-path.c
==============================================================================
--- trunk/babl/babl-fish-path.c	(original)
+++ trunk/babl/babl-fish-path.c	Tue Apr 15 10:25:30 2008
@@ -23,15 +23,15 @@
 #define BABL_MAX_COST_VALUE 2000000
 
 static void
-init_path_instrumentation (Babl *fmt_source, 
+init_path_instrumentation (Babl *fmt_source,
                            Babl *fmt_destination);
 
 static void
 destroy_path_instrumentation (void);
 
 static void
-get_path_instrumentation (BablList *path, 
-                          double   *path_cost, 
+get_path_instrumentation (BablList *path,
+                          double   *path_cost,
                           double   *ref_cost,
                           double   *path_error);
 
@@ -43,7 +43,7 @@
 
 static void
 get_conversion_path (Babl *current_format,
-                     int current_length, 
+                     int current_length,
                      int max_length);
 
 static double *
@@ -99,13 +99,13 @@
 /* The task of BablFishPath construction is to compute
  * the shortest path in a graph where formats are the vertices
  * and conversions are the edges. However, there is an additional
- * constraint to the shortest path, that limits conversion error 
+ * constraint to the shortest path, that limits conversion error
  * introduced by such a path to be less than BABL_ERROR. This
- * prohibits usage of any reasonable shortest path construction 
+ * prohibits usage of any reasonable shortest path construction
  * algorithm such as Dijkstra's algorithm. The shortest path is
- * constructed by enumerating all available paths that are less 
- * than BABL_PATH_LENGTH long, computing their costs and 
- * conversion errors and backtracking. The backtracking is 
+ * constructed by enumerating all available paths that are less
+ * than BABL_PATH_LENGTH long, computing their costs and
+ * conversion errors and backtracking. The backtracking is
  * implemented by recursive function get_conversion_path ().
  */
 
@@ -115,10 +115,10 @@
 
 static void
 get_conversion_path (Babl *current_format,
-                     int current_length, 
+                     int current_length,
                      int max_length)
 {
-  if (current_length > max_length) 
+  if (current_length > max_length)
     {
       /* We have reached the maximum recursion
        * depth, let's bail out */
@@ -126,7 +126,7 @@
     }
   else if ((current_length > 0) && (current_format == to_format))
     {
-       /* We have found a candidate path, let's 
+       /* We have found a candidate path, let's
         * see about it's properties */
       double path_cost  = 0.0;
       double ref_cost   = 0.0;
@@ -138,14 +138,14 @@
           path_error *= (1.0 + babl_conversion_error ((BablConversion *) current_path->items[i]));
         }
 
-      if (path_error - 1.0 <= legal_error ()) /* check this before the next; 
+      if (path_error - 1.0 <= legal_error ()) /* check this before the next;
                                                  which does a more accurate
                                                  measurement of the error */
         {
           get_path_instrumentation (current_path, &path_cost, &ref_cost, &path_error);
 
           if ((path_cost < ref_cost) && /* do not use paths that took longer to compute than reference */
-              (path_cost < fish_path->fish_path.cost) && 
+              (path_cost < fish_path->fish_path.cost) &&
               (path_error <= legal_error ()))
             {
               /* We have found the best path so far,
@@ -156,9 +156,9 @@
             }
         }
     }
-  else 
+  else
     {
-      /* 
+      /*
        * Bummer, we have to search deeper... */
       BablList *list;
       int i;
@@ -184,7 +184,7 @@
             }
 
           /* Remove the current format from current path */
-          current_format->format.visited = 0;  
+          current_format->format.visited = 0;
         }
       }
 }
@@ -211,7 +211,7 @@
 
   name = create_name (source, destination, 1);
   babl = babl_db_exist_by_name (babl_fish_db (), name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required name,
        * returning the preexistent one instead.
@@ -236,7 +236,7 @@
   babl->fish_path.loss            = BABL_MAX_COST_VALUE;
   babl->fish_path.conversion_list = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH);
 
-  current_path = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH); 
+  current_path = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH);
   fish_path = babl;
   to_format = (Babl *) destination;
 
@@ -293,14 +293,14 @@
                                destination_buffer,
                                n);
     }
-  else 
+  else
     {
       void *aux1_buffer = babl_malloc (n * sizeof (double) * 5);
       void *aux2_buffer = NULL;
       void *swap_buffer = NULL;
       int   i;
 
-      if (conversions > 2) 
+      if (conversions > 2)
         {
           /* We'll need one more auxiliary buffer */
           aux2_buffer = babl_malloc (n * sizeof (double) * 5);
@@ -312,7 +312,7 @@
                                aux1_buffer,
                                n);
 
-      /* Process, if any, conversions between the first and the last 
+      /* Process, if any, conversions between the first and the last
        * conversion in the path, in a loop */
       for (i = 1; i < conversions - 1; i++)
         {
@@ -386,7 +386,7 @@
 static int    init_instrumentation_done = 0;
 
 static void
-init_path_instrumentation (Babl *fmt_source, 
+init_path_instrumentation (Babl *fmt_source,
                            Babl *fmt_destination)
 {
   long   ticks_start = 0;
@@ -435,7 +435,7 @@
                 source, ref_destination, NUM_TEST_PIXELS);
   ticks_end = babl_ticks ();
   reference_cost = babl_process_cost (ticks_start, ticks_end);
-  
+
   /* transform the reference destination buffer to RGBA */
   babl_process (fish_destination_to_rgba,
                 ref_destination, ref_destination_rgba_double, NUM_TEST_PIXELS);
@@ -444,7 +444,7 @@
 static void
 destroy_path_instrumentation (void)
 {
-  if (init_instrumentation_done) 
+  if (init_instrumentation_done)
     {
       babl_free (source);
       babl_free (destination);
@@ -458,8 +458,8 @@
 }
 
 static void
-get_path_instrumentation (BablList *path, 
-                          double   *path_cost, 
+get_path_instrumentation (BablList *path,
+                          double   *path_cost,
                           double   *ref_cost,
                           double   *path_error)
 {
@@ -468,7 +468,7 @@
 
   if (!init_instrumentation_done)
     {
-      /* this initialization can be done only once since the 
+      /* this initialization can be done only once since the
        * source and destination formats do not change during
        * the search */
       Babl *fmt_source = (Babl *) BABL (babl_list_get_first (path))->conversion.source;

Modified: trunk/babl/babl-fish-reference.c
==============================================================================
--- trunk/babl/babl-fish-reference.c	(original)
+++ trunk/babl/babl-fish-reference.c	Tue Apr 15 10:25:30 2008
@@ -52,7 +52,7 @@
   char *name = create_name (source, destination, 1);
 
   babl = babl_db_exist_by_name (babl_fish_db (), name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required name,
        * returning the preexistent one instead.

Modified: trunk/babl/babl-fish-simple.c
==============================================================================
--- trunk/babl/babl-fish-simple.c	(original)
+++ trunk/babl/babl-fish-simple.c	Tue Apr 15 10:25:30 2008
@@ -34,7 +34,7 @@
 
   name = create_name (conversion);
   babl = babl_db_exist_by_name (babl_fish_db (), name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required name,
        * returning the preexistent one instead.

Modified: trunk/babl/babl-fish-stats.c
==============================================================================
--- trunk/babl/babl-fish-stats.c	(original)
+++ trunk/babl/babl-fish-stats.c	Tue Apr 15 10:25:30 2008
@@ -72,9 +72,9 @@
                 {
                   fprintf (output_file, "<tr>");
                   fprintf (output_file, "<td>%s</td>", BABL (fish->fish_path.conversion_list->items[i])->instance.name);
-                  fprintf (output_file, "<td class='r'>%li</td>", 
+                  fprintf (output_file, "<td class='r'>%li</td>",
                     babl_conversion_cost (&BABL (fish->fish_path.conversion_list->items[i])->conversion));
-                  fprintf (output_file, "<td class='r'>%e</td>", 
+                  fprintf (output_file, "<td class='r'>%e</td>",
                     babl_conversion_error (&BABL (fish->fish_path.conversion_list->items[i])->conversion));
                   fprintf (output_file, "</tr>");
                 }

Modified: trunk/babl/babl-fish.c
==============================================================================
--- trunk/babl/babl-fish.c	(original)
+++ trunk/babl/babl-fish.c	Tue Apr 15 10:25:30 2008
@@ -38,11 +38,11 @@
                   void *inout);
 
 static int
-find_fish_path (Babl *item, 
+find_fish_path (Babl *item,
                 void *data);
 
 static int
-find_memcpy_fish (Babl *item, 
+find_memcpy_fish (Babl *item,
                   void *data);
 
 static int
@@ -54,7 +54,7 @@
 
 
 static int
-find_fish_path (Babl *item, 
+find_fish_path (Babl *item,
                 void *data)
 {
   BablFindFish *ffish = (BablFindFish *) data;
@@ -65,7 +65,7 @@
         {
           ffish->fish_ref = item;
           ffish->fishes++;
-        }  
+        }
       else if (item->instance.class_type == BABL_FISH_PATH)
         {
           ffish->fish_path = item;
@@ -84,7 +84,7 @@
 }
 
 static int
-find_memcpy_fish (Babl *item, 
+find_memcpy_fish (Babl *item,
                   void *data)
 {
   BablFindFish *ffish = (BablFindFish *) data;
@@ -96,7 +96,7 @@
         {
           ffish->fish_ref = item;
           return 1;
-        }  
+        }
     }
 
   return 0;
@@ -133,7 +133,7 @@
                   const Babl *destination)
 {
   /* value of 'id' will be used as argument for hash function,
-   * substraction serves as simple combination of 
+   * substraction serves as simple combination of
    * source/destination values. */
   int id = (int) source - (int) destination;
   /* instances with id 0 won't be inserted into database */
@@ -188,11 +188,11 @@
   {
     int            hashval;
     BablHashTable *id_htable;
-    BablFindFish   ffish = {(Babl *) NULL, 
-                            (Babl *) NULL, 
-                            (Babl *) NULL, 
+    BablFindFish   ffish = {(Babl *) NULL,
+                            (Babl *) NULL,
+                            (Babl *) NULL,
                             0,
-                            source_format, 
+                            source_format,
                             destination_format};
 
     id_htable = (babl_fish_db ())->id_hash;
@@ -201,21 +201,21 @@
     if (source_format == destination_format)
       {
         /* In the case of equal source and destination formats
-         * we will search through the fish database for reference fish 
+         * we will search through the fish database for reference fish
          * to handle the memcpy */
         id_htable->find_func = find_memcpy_fish;
         babl_hash_table_find (id_htable, hashval, (void *) &ffish);
       }
-    else 
+    else
       {
         /* In the case of different source and destination formats
          * we will search through the fish database for appropriate fish path
          * to handle the conversion. In the case that preexistent
          * fish path is found, we'll return it. In the case BABL_FISH
          * instance with the same source/destination is found, we'll
-         * return reference fish. 
-         * In the case neither fish path nor BABL_FISH path are found, 
-         * we'll try to construct new fish path for requested 
+         * return reference fish.
+         * In the case neither fish path nor BABL_FISH path are found,
+         * we'll try to construct new fish path for requested
          * source/destination. In the case new fish path is found, we'll
          * return it, otherwise we'll create dummy BABL_FISH instance and
          * insert it into the fish database to indicate non-existent fish
@@ -228,7 +228,7 @@
           {
             /* we have found suitable fish path in the database */
             return ffish.fish_path;
-          }  
+          }
         if (!ffish.fish_fish)
           {
             /* we haven't tried to search for suitable path yet */
@@ -238,7 +238,7 @@
               {
                 return fish_path;
               }
-            else 
+            else
               {
                 /* there isn't a suitable path for requested formats,
                  * let's create a dummy BABL_FISH instance and insert
@@ -247,7 +247,7 @@
                  */
                 char *name = "X"; /* name does not matter */
                 Babl *fish = babl_calloc (1, sizeof (BablFish) + strlen (name) + 1);
-                
+
                 fish->class_type                = BABL_FISH;
                 fish->instance.id               = babl_fish_get_id (source_format, destination_format);
                 fish->instance.name             = ((char *) fish) + sizeof (BablFish);
@@ -264,7 +264,7 @@
         /* we have already found suitable reference fish */
         return ffish.fish_ref;
       }
-    else 
+    else
       {
         /* we have to create new reference fish */
         return babl_fish_reference (source_format, destination_format);

Modified: trunk/babl/babl-format.c
==============================================================================
--- trunk/babl/babl-format.c	(original)
+++ trunk/babl/babl-format.c	Tue Apr 15 10:25:30 2008
@@ -56,9 +56,9 @@
             {
               component_found = 1;
               break;
-            }  
+            }
         }
-      if (!component_found) 
+      if (!component_found)
         {
           component_found = 0;
           babl_fatal ("matching source component for %s in model %s not found",
@@ -297,18 +297,18 @@
 
   va_end (varg);
 
-  if (!name) 
+  if (!name)
     name = create_name (model, components, component, type);
 
   babl = babl_db_exist (db, id, name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required id/name,
        * returning the preexistent one instead.
        */
       return babl;
     }
-    
+
   babl = format_new (name,
                      id,
                      planar, components, model,

Modified: trunk/babl/babl-hash-table.c
==============================================================================
--- trunk/babl/babl-hash-table.c	(original)
+++ trunk/babl/babl-hash-table.c	Tue Apr 15 10:25:30 2008
@@ -16,7 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-/* Implementation of hash table data structure based on coalesced hashing. 
+/* Implementation of hash table data structure based on coalesced hashing.
  * Copyright (C) 2008, Jan Heller
  */
 
@@ -25,20 +25,20 @@
 #define BABL_HASH_TABLE_INITIAL_MASK   0x7F
 
 /* static functions declarations */
-static inline int 
+static inline int
 hash_insert (BablHashTable *htab,
              Babl          *item);
 
-static void 
+static void
 hash_rehash (BablHashTable *htab);
 
 
-inline int 
+inline int
 babl_hash_by_str (BablHashTable *htab,
                   const char    *str)
 {
   int   hash = 0;
-  
+
   while (*str)
   {
     hash += *str++;
@@ -52,13 +52,13 @@
   return (hash & htab->mask);
 }
 
-inline int 
-babl_hash_by_int (BablHashTable *htab, 
+inline int
+babl_hash_by_int (BablHashTable *htab,
                   int           id)
 {
   int   hash = 0;
   int   i;
-  
+
   for (i = 0; i < sizeof (int); i++)
   {
     hash +=  id & 0xFF;
@@ -73,7 +73,7 @@
   return (hash & htab->mask);
 }
 
-static inline int 
+static inline int
 hash_insert (BablHashTable *htab,
              Babl          *item)
 {
@@ -84,31 +84,31 @@
       /* create new chain */
       htab->data_table[hash] = item;
     }
-  else 
+  else
     {
       int it, oit, cursor = 0;
 
       while ((cursor < (htab->mask + 1)) && (htab->data_table[cursor] != NULL))
         ++cursor;
-      
+
       htab->data_table[cursor] = item;
 
       for (oit = hash, it = htab->chain_table[oit]; it != -1; oit = it, it = htab->chain_table[oit])
         ;
-      htab->chain_table[oit] = cursor; 
+      htab->chain_table[oit] = cursor;
     }
 
   htab->count++;
   return 0;
 }
 
-static void 
+static void
 hash_rehash (BablHashTable *htab)
 {
   Babl *item;
   int  i;
   BablHashTable *nhtab = babl_calloc (sizeof (BablHashTable), 1);
-  
+
   nhtab->data_table = NULL;
   nhtab->chain_table = NULL;
   nhtab->mask = (htab->mask << 1) + 1;
@@ -121,7 +121,7 @@
       nhtab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(nhtab));
       memset (nhtab->chain_table, -1, sizeof (int) * babl_hash_table_size(nhtab));
     }
-  
+
   for (i = 0; i < babl_hash_table_size (htab); i++)
     {
       item = htab->data_table[i];
@@ -143,11 +143,11 @@
 }
 
 BablHashTable *
-babl_hash_table_init (BablHashValFunction  hfunc, 
+babl_hash_table_init (BablHashValFunction  hfunc,
                       BablHashFindFunction ffunc)
 {
   BablHashTable *htab;
-  
+
   babl_assert(hfunc);
   babl_assert(ffunc);
 
@@ -166,7 +166,7 @@
       htab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(htab));
       memset (htab->chain_table, -1, sizeof (int) * babl_hash_table_size(htab));
   }
-  
+
   return htab;
 }
 
@@ -187,7 +187,7 @@
   babl_assert (htab);
   babl_assert (BABL_IS_BABL(item));
 
-  if (babl_hash_table_size (htab) < htab->count + 1) 
+  if (babl_hash_table_size (htab) < htab->count + 1)
     hash_rehash (htab);
   return hash_insert (htab, item);
 }
@@ -207,7 +207,7 @@
 
   if (!item)
     return NULL;
-  
+
   for (;;)
     {
       if (htab->find_func (item, data))
@@ -217,7 +217,7 @@
         break;
       item = htab->data_table[it];
     }
-    
+
   return NULL;
 }
 

Modified: trunk/babl/babl-hash-table.h
==============================================================================
--- trunk/babl/babl-hash-table.h	(original)
+++ trunk/babl/babl-hash-table.h	Tue Apr 15 10:25:30 2008
@@ -41,15 +41,15 @@
 
 
 BablHashTable *
-babl_hash_table_init (BablHashValFunction  hfunc, 
+babl_hash_table_init (BablHashValFunction  hfunc,
                       BablHashFindFunction ffunc);
 
-inline int 
+inline int
 babl_hash_by_str (BablHashTable *htab,
                   const char    *str);
 
-inline int 
-babl_hash_by_int (BablHashTable *htab, 
+inline int
+babl_hash_by_int (BablHashTable *htab,
                   int           id);
 
 inline int

Modified: trunk/babl/babl-image.c
==============================================================================
--- trunk/babl/babl-image.c	(original)
+++ trunk/babl/babl-image.c	Tue Apr 15 10:25:30 2008
@@ -95,7 +95,7 @@
                                                       up subsequent use of linear buffers
                                                       for subsequent accesses
                                                     */
-          { 
+          {
             babl = format->format.image_template;
             format->format.image_template = NULL;
             for (i = 0; i < components; i++)

Modified: trunk/babl/babl-internal.h
==============================================================================
--- trunk/babl/babl-internal.h	(original)
+++ trunk/babl/babl-internal.h	Tue Apr 15 10:25:30 2008
@@ -129,7 +129,7 @@
 {
   Babl *extender = babl_extender();
   va_list  varg;
-  
+
 
   if (extender != babl_extension_quiet_log())
     {
@@ -261,7 +261,7 @@
 BABL_DEFINE_DESTROY        (type_name)                        \
 BABL_DEFINE_LOOKUP_BY_NAME (type_name)                        \
 BABL_DEFINE_EACH           (type_name)                        \
-BABL_DEFINE_LOOKUP_BY_ID   (type_name)               
+BABL_DEFINE_LOOKUP_BY_ID   (type_name)
 
 #define BABL(obj)  ((Babl*)(obj))
 

Modified: trunk/babl/babl-introspect.c
==============================================================================
--- trunk/babl/babl-introspect.c	(original)
+++ trunk/babl/babl-introspect.c	Tue Apr 15 10:25:30 2008
@@ -86,7 +86,7 @@
   BablList *list;
 
   list = babl->type.from_list;
-  if (list) 
+  if (list)
     {
       babl_log ("\t\tconversions from %s: %i",
                 babl->instance.name, babl_list_size (list));

Modified: trunk/babl/babl-list.c
==============================================================================
--- trunk/babl/babl-list.c	(original)
+++ trunk/babl/babl-list.c	Tue Apr 15 10:25:30 2008
@@ -16,7 +16,7 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-/* Implementation of list data structure. 
+/* Implementation of list data structure.
  * Copyright (C) 2008, Jan Heller
  */
 
@@ -42,7 +42,7 @@
   list->size = initial_size;
   list->count = 0;
   list->items = NULL;
-  if (list->size) 
+  if (list->size)
     {
       list->items = babl_calloc (sizeof (BablInstance *), list->size);
     }
@@ -114,7 +114,7 @@
   return (list->items[list->count - 1]);
 }
 
-inline void 
+inline void
 babl_list_copy (BablList *from,
                 BablList *to)
 {
@@ -144,7 +144,7 @@
 
   babl_assert(list);
   babl_assert(each_fun);
- 
+
   for (i = 0; i < list->count; i++)
     {
       if (list->items[i])

Modified: trunk/babl/babl-list.h
==============================================================================
--- trunk/babl/babl-list.h	(original)
+++ trunk/babl/babl-list.h	Tue Apr 15 10:25:30 2008
@@ -60,7 +60,7 @@
 inline Babl *
 babl_list_get_last (BablList *list);
 
-inline void 
+inline void
 babl_list_copy (BablList *from,
                 BablList *to);
 

Modified: trunk/babl/babl-model.c
==============================================================================
--- trunk/babl/babl-model.c	(original)
+++ trunk/babl/babl-model.c	Tue Apr 15 10:25:30 2008
@@ -165,7 +165,7 @@
   name = create_name (name, components, component);
 
   babl = babl_db_exist (db, id, name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required id/name,
        * returning the preexistent one instead.

Modified: trunk/babl/babl-sanity.c
==============================================================================
--- trunk/babl/babl-sanity.c	(original)
+++ trunk/babl/babl-sanity.c	Tue Apr 15 10:25:30 2008
@@ -114,7 +114,7 @@
 babl_sanity (void)
 {
   OK=1;
-  
+
   babl_type_each         (id_sanity, NULL);
   babl_component_each    (id_sanity, NULL);
   babl_model_each        (id_sanity, NULL);

Modified: trunk/babl/babl-type.c
==============================================================================
--- trunk/babl/babl-type.c	(original)
+++ trunk/babl/babl-type.c	Tue Apr 15 10:25:30 2008
@@ -130,7 +130,7 @@
   va_end (varg);
 
   babl = babl_db_exist (db, id, first_arg);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required id/name,
        * returning the preexistent one instead.

Modified: trunk/babl/babl.h
==============================================================================
--- trunk/babl/babl.h	(original)
+++ trunk/babl/babl.h	Tue Apr 15 10:25:30 2008
@@ -77,7 +77,7 @@
                         ...);
 
 /** Process n pixels from source to destination using babl_fish,
- *  returns number of pixels converted. 
+ *  returns number of pixels converted.
  */
 long   babl_process    (Babl *babl_fish,
                         void *source,
@@ -92,7 +92,7 @@
  * passed to babl_process, two different babl_process() functions will be
  * needed for this since the polymorphism cannot be trusted to work on linear
  * buffers.
- * 
+ *
  * Babl * babl_image (BablComponent *component1,
  *                    void          *data,
  *                    int            pitch,
@@ -115,13 +115,13 @@
  * A data type that babl can have in it's buffers, requires
  * conversions to and from "double" to be registered before
  * passing sanity.
- * 
+ *
  * Babl * babl_type_new (  const char *name,
  *                         "bits",     int bits,
- *                         ["min_val", double min_val,] 
- *                         ["max_val", double max_val,] 
+ *                         ["min_val", double min_val,]
+ *                         ["max_val", double max_val,]
  *                         NULL);
- */  
+ */
 
 
 /****************************************************************/
@@ -129,7 +129,7 @@
 /*
  * Babl * babl_component_new (const char *name,
  *                            NULL);
- */  
+ */
 
 
 /****************************************************************/
@@ -143,7 +143,7 @@
  * If no name is provided a name is generated by concatenating the
  * name of all the involved components.
  *
- */  
+ */
 
 /****************************************************************/
 /* BablSampling */                   BABL_CLASS_NO_NAME (sampling)
@@ -169,7 +169,7 @@
  * Provided BablType and|or BablSampling is valid for the following
  * components as well. If no name is provided a (long) descriptive
  * name is used.
- */  
+ */
 
 
 /****************************************************************/
@@ -186,7 +186,7 @@
  *                              BablType   *source, BablType   *destination>,
  *                             <"linear"|"planar">, BablConversionFunc conv_func,
  *                              NULL);
- */  
+ */
 
 
 const char *babl_name (const Babl *babl);  /* returns the name of a babl object */

Modified: trunk/babl/base/rgb-constants.h
==============================================================================
--- trunk/babl/base/rgb-constants.h	(original)
+++ trunk/babl/base/rgb-constants.h	Tue Apr 15 10:25:30 2008
@@ -28,7 +28,7 @@
   #define RGB_LUMA_RED         (0.299)
   #define RGB_LUMA_GREEN       (0.587)
   #define RGB_LUMA_BLUE        (0.114)
-  #define RGB_LUMINANCE_RED    RGB_LUMA_RED   
-  #define RGB_LUMINANCE_GREEN  RGB_LUMA_GREEN 
+  #define RGB_LUMINANCE_RED    RGB_LUMA_RED
+  #define RGB_LUMINANCE_GREEN  RGB_LUMA_GREEN
   #define RGB_LUMINANCE_BLUE   RGB_LUMA_BLUE
 #endif

Modified: trunk/babl/base/util.h
==============================================================================
--- trunk/babl/base/util.h	(original)
+++ trunk/babl/base/util.h	Tue Apr 15 10:25:30 2008
@@ -32,7 +32,7 @@
     assert(*dst);           \
     assert(n>0);            \
     assert(*src_pitch);     \
-  } 
+  }
 
 #define BABL_PLANAR_STEP          \
   {                               \

Modified: trunk/extensions/util.h
==============================================================================
--- trunk/extensions/util.h	(original)
+++ trunk/extensions/util.h	Tue Apr 15 10:25:30 2008
@@ -32,7 +32,7 @@
     assert(*dst);           \
     assert(n>0);            \
     assert(*src_pitch);     \
-  } 
+  }
 
 #define BABL_PLANAR_STEP          \
   {                               \



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