[geany/geany] e7befb: Remove utils_make_filename() - use g_strconcat instead
Nick Treleaven
git-noreply at xxxxx
Mon Feb 6 16:36:51 UTC 2012
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven at btinternet.com>
Committer: Nick Treleaven <nick.treleaven at btinternet.com>
Date: Mon, 06 Feb 2012 16:36:51
Commit: e7befb410c895b0136a6c38a3b3d534395592729
https://github.com/geany/geany/commit/e7befb410c895b0136a6c38a3b3d534395592729
Log Message:
-----------
Remove utils_make_filename() - use g_strconcat instead
Modified Paths:
--------------
src/filetypes.c
src/utils.c
src/utils.h
Modified: src/filetypes.c
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1276,10 +1276,10 @@ static void add_keys(GKeyFile *dest, const gchar *group, GKeyFile *src)
gchar *f;
if (user)
- f = utils_make_filename(app->configdir,
+ f = g_strconcat(app->configdir, G_DIR_SEPARATOR_S
GEANY_FILEDEFS_SUBDIR G_DIR_SEPARATOR_S, "filetypes.", ext, NULL);
else
- f = utils_make_filename(app->datadir, "filetypes.", ext, NULL);
+ f = g_strconcat(app->datadir, G_DIR_SEPARATOR_S "filetypes.", ext, NULL);
g_free(ext);
return f;
Modified: src/utils.c
24 files changed, 0 insertions(+), 24 deletions(-)
===================================================================
@@ -1793,30 +1793,6 @@ static gboolean utils_string_vappend(GString *buffer, const gchar *sep, va_list
}
-/* Concatenates a path with other strings.
- * @param path A path, which will have a separator added before the other strings.
- * @param ... Strings to concatenate (no directory separators will be
- * inserted between them).
- * E.g. filename = utils_make_filename(app->datadir, "filetypes.", ext, NULL); */
-gchar *utils_make_filename(const gchar *path, ...)
-{
- static GString *buffer = NULL;
- va_list args;
-
- if (! buffer)
- buffer = g_string_new(path);
- else
- g_string_assign(buffer, path);
-
- g_string_append_c(buffer, G_DIR_SEPARATOR);
-
- va_start(args, path);
- utils_string_vappend(buffer, NULL, args);
- va_end(args);
- return g_strdup(buffer->str);
-}
-
-
/* Retrieves the path for the given URI.
* It returns:
* - the path which was determined by g_filename_from_uri() or GIO
Modified: src/utils.h
2 files changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -266,8 +266,6 @@ gboolean utils_spawn_async(const gchar *dir, gchar **argv, gchar **env, GSpawnFl
gchar *utils_build_path(const gchar *first, ...) G_GNUC_NULL_TERMINATED;
-gchar *utils_make_filename(const gchar *path, ...) G_GNUC_NULL_TERMINATED;
-
gchar *utils_get_path_from_uri(const gchar *uri);
gboolean utils_is_uri(const gchar *uri);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Commits
mailing list