]> git.street.me.uk Git - andy/viking.git/commitdiff
[QA] Extract utility function from viktrwlayer
authorGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Thu, 13 Dec 2012 13:10:57 +0000 (14:10 +0100)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Thu, 13 Dec 2012 13:10:57 +0000 (14:10 +0100)
File src/viktrwlayer.c is huge enough to avoid utility functions.

src/util.c
src/util.h
src/viktrwlayer.c

index 4acc70ec77cc0ec5fb5778a7c11c44a8f0814cdf..fe23e8461c860f3caa12683487cc5017b9e9d90f 100644 (file)
@@ -116,3 +116,12 @@ gchar *uri_escape(gchar *str)
   return(esc_str);
 }
 
   return(esc_str);
 }
 
+
+GList * str_array_to_glist(gchar* data[])
+{
+  GList *gl = NULL;
+  gpointer * p;
+  for (p = (gpointer)data; *p; p++)
+    gl = g_list_prepend(gl, *p);
+  return g_list_reverse(gl);
+}
index 5132b85e9ca6d50ce9686fff45e1ef5c028c6fb7..12a07fc1d80c444c34ad35107fbe4be41ec0ccb0 100644 (file)
@@ -34,6 +34,8 @@ void new_email(GtkWindow *parent, const gchar * address);
 
 gchar *uri_escape(gchar *str);
 
 
 gchar *uri_escape(gchar *str);
 
+GList * str_array_to_glist(gchar* data[]);
+
 G_END_DECLS
 
 #endif
 G_END_DECLS
 
 #endif
index e50bc35677d744c79822067e3666cd2e8cdc5f25..465cff7acf6d4b890f2193f42dde8982a9d35671 100644 (file)
@@ -980,15 +980,6 @@ static VikTrwLayer *trw_layer_unmarshall( guint8 *data, gint len, VikViewport *v
   return rv;
 }
 
   return rv;
 }
 
-static GList * str_array_to_glist(gchar* data[])
-{
-  GList *gl = NULL;
-  gpointer * p;
-  for (p = (gpointer)data; *p; p++)
-    gl = g_list_prepend(gl, *p);
-  return(g_list_reverse(gl));
-}
-
 // Keep interesting hash function at least visible
 /*
 static guint strcase_hash(gconstpointer v)
 // Keep interesting hash function at least visible
 /*
 static guint strcase_hash(gconstpointer v)