SF.net SVN: geany:[3817] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed May 27 17:21:51 UTC 2009


Revision: 3817
          http://geany.svn.sourceforge.net/geany/?rev=3817&view=rev
Author:   eht16
Date:     2009-05-27 17:21:51 +0000 (Wed, 27 May 2009)

Log Message:
-----------
Remove quote_executable() as it is not used anymore.
When creating the geany_run_script.bat use the "%0" variable expansion and quote it for the "del" command (closes #2797172).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/build.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-05-26 20:45:36 UTC (rev 3816)
+++ trunk/ChangeLog	2009-05-27 17:21:51 UTC (rev 3817)
@@ -1,3 +1,11 @@
+2009-05-27  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/build.c:
+   Remove quote_executable() as it is not used anymore.
+   When creating the geany_run_script.bat use the "%0" variable
+   expansion and quote it for the "del" command (closes #2797172).
+
+
 2009-05-26  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/win32.c:

Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c	2009-05-26 20:45:36 UTC (rev 3816)
+++ trunk/src/build.c	2009-05-27 17:21:51 UTC (rev 3817)
@@ -407,26 +407,6 @@
 
 
 #ifdef G_OS_WIN32
-/* cmd is a command line separated with spaces, first element will be escaped with double quotes
- * and a newly allocated string will be returned */
-static gchar *quote_executable(const gchar *cmd)
-{
-	gchar **fields;
-	gchar *result;
-
-	if (! NZV(cmd))
-		return NULL;
-
-	fields = g_strsplit(cmd, " ", 2);
-	if (fields == NULL || g_strv_length(fields) != 2)
-		return g_strdup(cmd);
-
-	result = g_strconcat("\"", fields[0], "\" ", fields[1], NULL);
-
-	g_strfreev(fields);
-	return result;
-}
-
 static void parse_build_output(const gchar **output, gint status)
 {
 	guint x, i, len;
@@ -998,9 +978,10 @@
 	gchar *str;
 
 	fp = g_fopen(fname, "w");
-	if (! fp) return FALSE;
+	if (! fp)
+		return FALSE;
 #ifdef G_OS_WIN32
-	str = g_strdup_printf("%s\n\n%s\ndel %s\n", cmd, (autoclose) ? "" : "pause", fname);
+	str = g_strdup_printf("%s\n\n%s\ndel \"%%0\"\n\npause\n", cmd, (autoclose) ? "" : "pause");
 #else
 	str = g_strdup_printf(
 		"#!/bin/sh\n\nrm $0\n\n%s\n\necho \"\n\n------------------\n(program exited with code: $?)\" \


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list