diff --git a/src/mu-util.c b/src/mu-util.c index 39081560..34d96f39 100644 --- a/src/mu-util.c +++ b/src/mu-util.c @@ -52,37 +52,6 @@ mu_util_dir_expand (const char *path) -GSList * -mu_util_strlist_from_args (int argc, char *argv[]) -{ - GSList *lst; - int i; - - g_return_val_if_fail (argc >= 0, NULL); - if (argc == 0) - return NULL; - g_return_val_if_fail (argv, NULL); - - /* we prepend args in opposite direction; - * prepending is faster - */ - for (i = argc - 1, lst = NULL; i >= 0; --i) { - if (!argv[i]) - continue; - lst = g_slist_prepend (lst, g_strdup(argv[i])); - } - return lst; -} - - -void -mu_util_strlist_free (GSList *lst) -{ - g_slist_foreach (lst, (GFunc)g_free, NULL); - g_slist_free (lst); -} - - static gboolean _is_readable_dir (const gchar* path) { diff --git a/src/mu-util.h b/src/mu-util.h index a6916d2f..950be18b 100644 --- a/src/mu-util.h +++ b/src/mu-util.h @@ -44,27 +44,6 @@ char* mu_util_dir_expand (const char* path); */ char* mu_util_guess_maildir (void); -/** - * take a char*[] and turn it into a GSList - * - * @param argc numbers of strings - * @param argv array of strings - * - * @return a newly allocated GSList of the arguments; or NULL in case - * of error. use mu_exprs_helpers_strlist_free when done with the list - */ -GSList *mu_util_strlist_from_args (int argc, char *argv[]); - - - -/** - * free a list of strings, as produced by mu_expr_helpers_strlist_from_args or - * mu_expr_helpers_strlist_from_str - * - * @param lst a list or NULL - */ -void mu_util_strlist_free (GSList *lst); - G_END_DECLS