[gegl] gegl: make function header style more consistent



commit 61166ba2e582dddf81821f705e90cd98886d4f47
Author: Nuno Ferreira <nuno360 gmail com>
Date:   Thu Feb 28 06:33:51 2019 +0000

    gegl: make function header style more consistent
    
    fixed style of function headers in the gegl/gegl folder

 gegl/gegl-apply.c                 | 20 ++++++------
 gegl/gegl-gio.c                   | 14 +++++++--
 gegl/gegl-init.c                  | 15 ++++++---
 gegl/gegl-instrument.c            | 25 ++++++++++-----
 gegl/gegl-introspection-support.c |  9 ++++--
 gegl/gegl-matrix.c                |  3 +-
 gegl/gegl-serialize.c             |  7 +++--
 gegl/gegl-utils.c                 | 30 ++++++++++++------
 gegl/gegl-xml.c                   | 66 ++++++++++++++++++++++-----------------
 9 files changed, 120 insertions(+), 69 deletions(-)
---
diff --git a/gegl/gegl-apply.c b/gegl/gegl-apply.c
index b0fe3f242..63c0685c9 100644
--- a/gegl/gegl-apply.c
+++ b/gegl/gegl-apply.c
@@ -114,7 +114,7 @@ gegl_node_set_props (GeglNode *node,
 
 
 void
-gegl_apply_op (GeglBuffer *buffer,
+gegl_apply_op (GeglBuffer  *buffer,
                const gchar *first_property_name,
                ...)
 {
@@ -179,9 +179,10 @@ gegl_apply_op_valist (GeglBuffer  *buffer,
   g_object_unref (buffer);
 }
 
-GeglBuffer *gegl_filter_op_valist (GeglBuffer    *buffer,
-                                   const gchar   *first_property_name,
-                                   va_list        var_args)
+GeglBuffer *
+gegl_filter_op_valist (GeglBuffer  *buffer,
+                       const gchar *first_property_name,
+                       va_list      var_args)
 {
   GeglBuffer  *tempbuf = NULL;
   GeglNode    *node;
@@ -223,9 +224,10 @@ GeglBuffer *gegl_filter_op_valist (GeglBuffer    *buffer,
   return tempbuf;
 }
 
-GeglBuffer *gegl_filter_op     (GeglBuffer    *buffer,
-                                const gchar   *first_property_name,
-                                ...)
+GeglBuffer *
+gegl_filter_op (GeglBuffer  *buffer,
+                const gchar *first_property_name,
+                ...)
 {
   GeglBuffer *ret;
   va_list var_args;
@@ -241,8 +243,8 @@ GeglBuffer *gegl_filter_op     (GeglBuffer    *buffer,
 
 
 void
-gegl_render_op (GeglBuffer *source_buffer,
-                GeglBuffer *target_buffer,
+gegl_render_op (GeglBuffer  *source_buffer,
+                GeglBuffer  *target_buffer,
                 const gchar *first_property_name,
                 ...)
 {
diff --git a/gegl/gegl-gio.c b/gegl/gegl-gio.c
index 73fca6dd8..65d67f0ad 100644
--- a/gegl/gegl-gio.c
+++ b/gegl/gegl-gio.c
@@ -40,7 +40,9 @@
  * Note: currently private API
  */
 static gchar **
-datauri_parse_header(const gchar *uri, gchar **raw_data_out, gint *header_items_no_out)
+datauri_parse_header(const gchar *uri, 
+                     gchar      **raw_data_out, 
+                     gint        *header_items_no_out)
 {
   // Determine data format
   const gchar * header_end = g_strstr_len (uri, -1, ",");
@@ -122,7 +124,10 @@ gegl_gio_uri_is_datauri(const gchar *uri)
  * Note: currently private API
  */
 GInputStream *
-gegl_gio_open_input_stream(const gchar *uri, const gchar *path, GFile **out_file, GError **err)
+gegl_gio_open_input_stream(const gchar *uri, 
+                           const gchar *path, 
+                           GFile      **out_file, 
+                           GError     **err)
 {
   GFile *infile = NULL;
   GInputStream *fis = NULL;
@@ -179,7 +184,10 @@ gegl_gio_open_input_stream(const gchar *uri, const gchar *path, GFile **out_file
  * Note: currently private API.
  */
 GOutputStream *
-gegl_gio_open_output_stream(const gchar *uri, const gchar *path, GFile **out_file, GError **err)
+gegl_gio_open_output_stream(const gchar *uri, 
+                            const gchar *path, 
+                            GFile      **out_file, 
+                            GError     **err)
 {
   GOutputStream *stream = NULL;
   const gboolean close = FALSE;
diff --git a/gegl/gegl-init.c b/gegl/gegl-init.c
index bf5b367c8..9509281cd 100644
--- a/gegl/gegl-init.c
+++ b/gegl/gegl-init.c
@@ -267,7 +267,8 @@ gegl_get_option_group (void)
   return group;
 }
 
-static void gegl_config_parse_env (GeglConfig *config)
+static void 
+gegl_config_parse_env (GeglConfig *config)
 {
   if (g_getenv ("GEGL_MIPMAP_RENDERING"))
     {
@@ -362,7 +363,8 @@ static void gegl_config_parse_env (GeglConfig *config)
     }
 }
 
-GeglConfig *gegl_config (void)
+GeglConfig *
+gegl_config (void)
 {
   if (!config)
     config = g_object_new (GEGL_TYPE_CONFIG, NULL);
@@ -370,7 +372,8 @@ GeglConfig *gegl_config (void)
   return config;
 }
 
-GeglStats *gegl_stats (void)
+GeglStats *
+gegl_stats (void)
 {
   if (! stats)
     stats = g_object_new (GEGL_TYPE_STATS, NULL);
@@ -378,12 +381,14 @@ GeglStats *gegl_stats (void)
   return stats;
 }
 
-void gegl_reset_stats (void)
+void 
+gegl_reset_stats (void)
 {
   gegl_stats_reset (gegl_stats ());
 }
 
-void gegl_temp_buffer_free (void);
+void 
+gegl_temp_buffer_free (void);
 
 void
 gegl_exit (void)
diff --git a/gegl/gegl-instrument.c b/gegl/gegl-instrument.c
index f14b4337b..ce6bf1c98 100644
--- a/gegl/gegl-instrument.c
+++ b/gegl/gegl-instrument.c
@@ -22,7 +22,9 @@
 #include "gegl-instrument.h"
 
 long babl_ticks (void);
-long gegl_ticks (void)
+
+long 
+gegl_ticks (void)
 {
   return babl_ticks ();
 }
@@ -42,7 +44,8 @@ gboolean gegl_instrument_enabled = FALSE;
 
 static Timing *root = NULL;
 
-static Timing *iter_next (Timing *iter)
+static Timing *
+iter_next (Timing *iter)
 {
   if (iter->children)
     {
@@ -64,7 +67,8 @@ static Timing *iter_next (Timing *iter)
   return iter;
 }
 
-static gint timing_depth (Timing *timing)
+static gint 
+timing_depth (Timing *timing)
 {
   Timing *iter = timing;
   gint    ret  = 0;
@@ -79,8 +83,9 @@ static gint timing_depth (Timing *timing)
   return ret;
 }
 
-static Timing *timing_find (Timing      *root,
-                            const gchar *name)
+static Timing *
+timing_find (Timing      *root,
+             const gchar *name)
 {
   Timing *iter = root;
 
@@ -137,7 +142,8 @@ real_gegl_instrument (const gchar *parent_name,
 }
 
 
-static glong timing_child_sum (Timing *timing)
+static glong 
+timing_child_sum (Timing *timing)
 {
   Timing *iter = timing->children;
   glong   sum  = 0;
@@ -151,7 +157,8 @@ static glong timing_child_sum (Timing *timing)
   return sum;
 }
 
-static glong timing_other (Timing *timing)
+static glong 
+timing_other (Timing *timing)
 {
   if (timing->children)
     return timing->usecs - timing_child_sum (timing);
@@ -213,7 +220,9 @@ static gchar *eight[] = {
 };
 
 static GString *
-bar (GString *string, gint width, gfloat value)
+bar (GString *string, 
+     gint     width, 
+     gfloat   value)
 {
   gboolean utf8 = TRUE;
   gint     i;
diff --git a/gegl/gegl-introspection-support.c b/gegl/gegl-introspection-support.c
index be2a2d2af..7ade818fc 100644
--- a/gegl/gegl-introspection-support.c
+++ b/gegl/gegl-introspection-support.c
@@ -61,7 +61,9 @@ gegl_format_get_name (GValue *value)
 }
 
 gdouble *
-gegl_color_get_components (GeglColor *color, GValue *value, gint *components_length)
+gegl_color_get_components (GeglColor *color,
+                           GValue    *value,
+                           gint      *components_length)
 {
   Babl *format;
 
@@ -142,7 +144,10 @@ gegl_color_get_components (GeglColor *color, GValue *value, gint *components_len
 }
 
 void
-gegl_color_set_components (GeglColor *color, GValue *value, gdouble *components, gint components_length)
+gegl_color_set_components (GeglColor *color,
+                           GValue    *value,
+                           gdouble   *components,
+                           gint       components_length)
 {
   Babl *format;
 
diff --git a/gegl/gegl-matrix.c b/gegl/gegl-matrix.c
index 83da9f872..c089db737 100644
--- a/gegl/gegl-matrix.c
+++ b/gegl/gegl-matrix.c
@@ -26,7 +26,8 @@
 #define EPSILON 1e-6
 
 #if 0
-static void gegl_matrix3_debug (GeglMatrix3 *matrix)
+static void 
+gegl_matrix3_debug (GeglMatrix3 *matrix)
 {
   if (matrix)
     {
diff --git a/gegl/gegl-serialize.c b/gegl/gegl-serialize.c
index fe553e1a1..eb1dea940 100644
--- a/gegl/gegl-serialize.c
+++ b/gegl/gegl-serialize.c
@@ -745,8 +745,11 @@ gegl_create_chain (const char *str, GeglNode *op_start, GeglNode *op_end,
 
 /* TODO: serialize keyframed properties */
 static gchar *
-gegl_serialize2 (GeglNode *start, GeglNode *end, const char *basepath,
-                 GHashTable *ht, GeglSerializeFlag flags)
+gegl_serialize2 (GeglNode         *start, 
+                 GeglNode         *end, 
+                 const char       *basepath,
+                 GHashTable       *ht, 
+                 GeglSerializeFlag flags)
 {
   char *ret = NULL;
   gboolean trim_defaults = flags & GEGL_SERIALIZE_TRIM_DEFAULTS;
diff --git a/gegl/gegl-utils.c b/gegl/gegl-utils.c
index 1fcad4ac9..fb5563eb2 100644
--- a/gegl/gegl-utils.c
+++ b/gegl/gegl-utils.c
@@ -43,7 +43,8 @@ gegl_buffer_set_color (GeglBuffer          *dst,
 }
 
 
-static const Babl *gegl_babl_format_linear_float (const Babl *format)
+static const Babl *
+gegl_babl_format_linear_float (const Babl *format)
 {
   const Babl *space = babl_format_get_space (format);
   const Babl *model = NULL;
@@ -100,7 +101,8 @@ static const Babl *gegl_babl_format_linear_float (const Babl *format)
   return format;
 }
 
-static const Babl *gegl_babl_format_perceptual_float (const Babl *format)
+static const Babl *
+gegl_babl_format_perceptual_float (const Babl *format)
 {
   const Babl *space = babl_format_get_space (format);
   const Babl *model = NULL;
@@ -157,7 +159,8 @@ static const Babl *gegl_babl_format_perceptual_float (const Babl *format)
   return format;
 }
 
-static const Babl *gegl_babl_format_nonlinear_float (const Babl *format)
+static const Babl *
+gegl_babl_format_nonlinear_float (const Babl *format)
 {
   const Babl *space = babl_format_get_space (format);
   const Babl *model = NULL;
@@ -214,7 +217,8 @@ static const Babl *gegl_babl_format_nonlinear_float (const Babl *format)
   return format;
 }
 
-static const Babl *gegl_babl_format_premultiplied_linear_float (const Babl *format)
+static const Babl *
+gegl_babl_format_premultiplied_linear_float (const Babl *format)
 {
   const Babl *space = babl_format_get_space (format);
   const Babl *model = NULL;
@@ -266,7 +270,8 @@ static const Babl *gegl_babl_format_premultiplied_linear_float (const Babl *form
   return format;
 }
 
-static const Babl *gegl_babl_format_premultiplied_perceptual_float (const Babl *format)
+static const Babl *
+gegl_babl_format_premultiplied_perceptual_float (const Babl *format)
 {
   const Babl *space = babl_format_get_space (format);
   const Babl *model = NULL;
@@ -318,7 +323,8 @@ static const Babl *gegl_babl_format_premultiplied_perceptual_float (const Babl *
   return format;
 }
 
-static const Babl *gegl_babl_format_float (const Babl *format)
+static const Babl *
+gegl_babl_format_float (const Babl *format)
 {
   const Babl *space;
   const char *encoding;
@@ -341,7 +347,8 @@ static const Babl *gegl_babl_format_float (const Babl *format)
   return format;
 }
 
-static const Babl *gegl_babl_format_alpha (const Babl *format)
+static const Babl *
+gegl_babl_format_alpha (const Babl *format)
 {
   const Babl *model = babl_format_get_model (format);
   BablModelFlag model_flags = babl_get_model_flags (model);
@@ -401,7 +408,8 @@ static const Babl *gegl_babl_format_alpha (const Babl *format)
 }
 
 
-static const Babl *gegl_babl_format_float_premultiplied_linear_if_alpha (const Babl *format)
+static const Babl *
+gegl_babl_format_float_premultiplied_linear_if_alpha (const Babl *format)
 {
   if (!format)
     return NULL;
@@ -410,7 +418,8 @@ static const Babl *gegl_babl_format_float_premultiplied_linear_if_alpha (const B
   return gegl_babl_format_float (format);
 }
 
-static const Babl *gegl_babl_format_float_premultiplied_perceptual_if_alpha (const Babl *format)
+static const Babl *
+gegl_babl_format_float_premultiplied_perceptual_if_alpha (const Babl *format)
 {
   if (!format)
     return NULL;
@@ -419,7 +428,8 @@ static const Babl *gegl_babl_format_float_premultiplied_perceptual_if_alpha (con
   return gegl_babl_format_float (format);
 }
 
-const Babl *gegl_babl_variant (const Babl *format, GeglBablVariant variant)
+const Babl *
+gegl_babl_variant (const Babl *format, GeglBablVariant variant)
 {
   if (!format)
     return NULL;
diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c
index db8546a32..d2f7e9883 100644
--- a/gegl/gegl-xml.c
+++ b/gegl/gegl-xml.c
@@ -64,9 +64,10 @@ struct _ParseData
 /* Search a paired attribute name/value arrays for an entry with a specific
  * name, return the value or null if not found.
  */
-static const gchar *name2val (const gchar **attribute_names,
-                              const gchar **attribute_values,
-                              const gchar  *name)
+static const gchar *
+name2val (const gchar **attribute_names,
+          const gchar **attribute_values,
+          const gchar  *name)
 {
   while (*attribute_names)
     {
@@ -81,10 +82,11 @@ static const gchar *name2val (const gchar **attribute_names,
   return NULL;
 }
 
-static void param_set (ParseData   *pd,
-                       GeglNode    *new,
-                       const gchar *param_name,
-                       const gchar *param_value)
+static void 
+param_set (ParseData   *pd,
+           GeglNode    *new,
+           const gchar *param_name,
+           const gchar *param_value)
 {
   if (!strcmp (param_name, "name"))
     {
@@ -286,12 +288,13 @@ set_clone_prop_as_well:
     }                                                                   \
 }
 
-static void start_element (GMarkupParseContext *context,
-                           const gchar         *element_name,
-                           const gchar        **attribute_names,
-                           const gchar        **attribute_values,
-                           gpointer             user_data,
-                           GError             **error)
+static void 
+start_element (GMarkupParseContext *context,
+               const gchar         *element_name,
+               const gchar        **attribute_names,
+               const gchar        **attribute_values,
+               gpointer             user_data,
+               GError             **error)
 {
   const gchar **a  = attribute_names;
   const gchar **v  = attribute_values;
@@ -443,11 +446,12 @@ static void start_element (GMarkupParseContext *context,
     }
 }
 
-static void text (GMarkupParseContext *context,
-                  const gchar         *text,
-                  gsize                text_len,
-                  gpointer             user_data,
-                  GError             **error)
+static void 
+text (GMarkupParseContext *context,
+      const gchar         *text,
+      gsize                text_len,
+      gpointer             user_data,
+      GError             **error)
 {
   ParseData *pd = user_data;
 
@@ -458,10 +462,11 @@ static void text (GMarkupParseContext *context,
 }
 
 /* Called for close tags </foo> */
-static void end_element (GMarkupParseContext *context,
-                         const gchar         *element_name,
-                         gpointer             user_data,
-                         GError             **error)
+static void 
+end_element (GMarkupParseContext *context,
+             const gchar         *element_name,
+             gpointer             user_data,
+             GError             **error)
 {
   ParseData *pd = user_data;
 
@@ -526,9 +531,10 @@ static void end_element (GMarkupParseContext *context,
 /* Called on error, including one set by other
  * methods in the vtable. The GError should not be freed.
  */
-static void error (GMarkupParseContext *context,
-                   GError              *error,
-                   gpointer             user_data)
+static void 
+error (GMarkupParseContext *context,
+       GError              *error,
+       gpointer             user_data)
 {
   gint  line_number;
   gint  char_number;
@@ -546,8 +552,9 @@ static GMarkupParser parser = {
   error
 };
 
-static void each_ref (gpointer value,
-                      gpointer user_data)
+static void 
+each_ref (gpointer value,
+          gpointer user_data)
 {
   ParseData *pd        = user_data;
   GeglNode  *dest_node = value;
@@ -560,8 +567,9 @@ static void each_ref (gpointer value,
   gegl_node_connect_from (dest_node, "input", source_node, "output");
 }
 
-GeglNode *gegl_node_new_from_xml (const gchar *xmldata,
-                                  const gchar *path_root)
+GeglNode *
+gegl_node_new_from_xml (const gchar *xmldata,
+                        const gchar *path_root)
 {
   ParseData            pd   = { 0, };
   GMarkupParseContext *context;


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