[gimp] tools: clean up patch from merge request !36.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] tools: clean up patch from merge request !36.
- Date: Mon, 16 Sep 2019 07:58:03 +0000 (UTC)
commit 8fa7b5bc746c25b52b352334789cc72735ea9330
Author: Jehan <jehan girinstud io>
Date: Mon Sep 16 09:53:24 2019 +0200
tools: clean up patch from merge request !36.
Commit 283ec1da0f previously pushed had some coding style bugs, which
unfortunately couldn't be fixed before pushing because the platform
doesn't allow it and the original contributor is not available lately.
Let's fix these.
tools/gimptool.c | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
---
diff --git a/tools/gimptool.c b/tools/gimptool.c
index 0b0b2236e0..5e51f45cf6 100644
--- a/tools/gimptool.c
+++ b/tools/gimptool.c
@@ -566,16 +566,16 @@ do_build_2 (const gchar *cflags,
q++;
if (install_dir)
- {
- tmp = dest_dir;
- dest_dir = g_strconcat (dest_dir, q, G_DIR_SEPARATOR_S, NULL);
- g_free (tmp);
-
- g_mkdir_with_parents (dest_dir,
- S_IRUSR | S_IXUSR | S_IWUSR |
- S_IRGRP | S_IXGRP |
- S_IROTH | S_IXOTH);
- }
+ {
+ tmp = dest_dir;
+ dest_dir = g_strconcat (dest_dir, q, G_DIR_SEPARATOR_S, NULL);
+ g_free (tmp);
+
+ g_mkdir_with_parents (dest_dir,
+ S_IRUSR | S_IXUSR | S_IWUSR |
+ S_IRGRP | S_IXGRP |
+ S_IROTH | S_IXOTH);
+ }
tmp = g_strconcat (dest_dir, q, NULL);
g_free (dest_dir);
@@ -656,21 +656,23 @@ get_user_plugin_dir (void)
}
static gchar *
-get_plugin_dir (const gchar *base_dir, const gchar *what)
+get_plugin_dir (const gchar *base_dir,
+ const gchar *what)
{
gchar *separator, *dot, *plugin_name, *plugin_dir;
gchar *tmp = g_strdup (what);
separator = strrchr (tmp, G_DIR_SEPARATOR);
#ifdef G_OS_WIN32
- {
- gchar *alt_separator = strrchr (tmp, '/');
- if (alt_separator != NULL &&
- (separator == NULL || alt_separator > separator))
{
- separator = alt_separator;
+ gchar *alt_separator = strrchr (tmp, '/');
+
+ if (alt_separator != NULL &&
+ (separator == NULL || alt_separator > separator))
+ {
+ separator = alt_separator;
+ }
}
- }
#endif
dot = strrchr (tmp, '.');
@@ -684,9 +686,9 @@ get_plugin_dir (const gchar *base_dir, const gchar *what)
*dot = '\0';
plugin_dir = g_strconcat (base_dir,
- G_DIR_SEPARATOR_S,
- plugin_name,
- NULL);
+ G_DIR_SEPARATOR_S,
+ plugin_name,
+ NULL);
g_free (tmp);
@@ -807,6 +809,7 @@ do_install_bin_2 (const gchar *dir,
gchar *quoted_dir;
gchar *dest_dir = g_strconcat (dir, G_DIR_SEPARATOR_S, NULL);
+
g_mkdir_with_parents (dest_dir,
S_IRUSR | S_IXUSR | S_IWUSR |
S_IRGRP | S_IXGRP |
@@ -852,6 +855,7 @@ do_uninstall (const gchar *dir)
{
gchar *cmd;
gchar *quoted_src;
+
quoted_src = g_shell_quote (dir);
cmd = g_strconcat (REMOVE_DIR, " ", quoted_src, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]