gimp r26857 - in trunk: . tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26857 - in trunk: . tools
- Date: Thu, 4 Sep 2008 11:58:48 +0000 (UTC)
Author: mitch
Date: Thu Sep 4 11:58:48 2008
New Revision: 26857
URL: http://svn.gnome.org/viewvc/gimp?rev=26857&view=rev
Log:
2008-09-04 Michael Natterer <mitch gimp org>
* tools/gimptool.c: add tons of const.
Modified:
trunk/ChangeLog
trunk/tools/gimptool.c
Modified: trunk/tools/gimptool.c
==============================================================================
--- trunk/tools/gimptool.c (original)
+++ trunk/tools/gimptool.c Thu Sep 4 11:58:48 2008
@@ -36,16 +36,16 @@
#include "libgimpbase/gimpversion.h"
-static gboolean silent = FALSE;
-static gboolean dry_run = FALSE;
-static gchar *prefix;
-static gchar *exec_prefix;
-
-static gchar *env_cc;
-static gboolean msvc_syntax = FALSE;
-static gchar *env_cflags;
-static gchar *env_ldflags;
-static gchar *env_libs;
+static gboolean silent = FALSE;
+static gboolean dry_run = FALSE;
+static gchar *prefix;
+static const gchar *exec_prefix;
+
+static gboolean msvc_syntax = FALSE;
+static const gchar *env_cc;
+static const gchar *env_cflags;
+static const gchar *env_ldflags;
+static const gchar *env_libs;
#ifdef G_OS_WIN32
@@ -64,7 +64,7 @@
static struct {
const gchar *option;
- gchar *value;
+ const gchar *value;
} dirs[] = {
{ "prefix", PREFIX },
{ "exec-prefix", EXEC_PREFIX },
@@ -105,16 +105,16 @@
#endif
static gboolean
-starts_with_dir (gchar *string,
- gchar *test)
+starts_with_dir (const gchar *string,
+ const gchar *test)
{
return g_str_has_prefix (string, g_strconcat (test, "/", NULL)) ||
strcmp (string, test) == 0;
}
static gchar *
-one_line_output (gchar *program,
- gchar *args)
+one_line_output (const gchar *program,
+ const gchar *args)
{
gchar *command = g_strconcat (program, " ", args, NULL);
FILE *pipe = popen (command, "r");
@@ -146,7 +146,7 @@
}
static gchar *
-pkg_config (gchar *args)
+pkg_config (const gchar *args)
{
#ifdef G_OS_WIN32
if (msvc_syntax)
@@ -156,7 +156,7 @@
return one_line_output ("pkg-config", args);
}
-static gchar *
+static const gchar *
get_runtime_prefix (gchar slash)
{
#ifdef G_OS_WIN32
@@ -204,7 +204,7 @@
#endif
}
-static gchar *
+static const gchar *
get_exec_prefix (gchar slash)
{
#ifdef G_OS_WIN32
@@ -222,7 +222,7 @@
}
static gchar *
-expand_and_munge (gchar *value)
+expand_and_munge (const gchar *value)
{
if (starts_with_dir (value, "${prefix}"))
value = g_strconcat (PREFIX, value + strlen ("${prefix}"), NULL);
@@ -417,18 +417,18 @@
}
static void
-do_build_2 (gchar *cflags,
- gchar *libs,
- gchar *install_dir,
- gchar *what)
-{
- gchar *cmd;
- gchar *dest_dir;
- gchar *output_flag;
- gchar *dest_exe;
- gchar *here_comes_linker_flags = "";
- gchar *windows_subsystem_flag = "";
- gchar *p, *q;
+do_build_2 (const gchar *cflags,
+ const gchar *libs,
+ const gchar *install_dir,
+ const gchar *what)
+{
+ gchar *cmd;
+ gchar *dest_dir;
+ const gchar *output_flag;
+ gchar *dest_exe;
+ const gchar *here_comes_linker_flags = "";
+ const gchar *windows_subsystem_flag = "";
+ gchar *p, *q;
if (install_dir != NULL)
dest_dir = g_strconcat (install_dir, "/", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]