SF.net SVN: geany: [1009] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Nov 17 17:49:17 UTC 2006


Revision: 1009
          http://svn.sourceforge.net/geany/?rev=1009&view=rev
Author:   eht16
Date:     2006-11-17 09:49:16 -0800 (Fri, 17 Nov 2006)

Log Message:
-----------
Fixed compile error under Win32. Ignore pressed Stop button under Win32 (at least for the moment, not yet implemented).

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/ChangeLog	2006-11-17 17:49:16 UTC (rev 1009)
@@ -1,3 +1,11 @@
+2006-11-17  Enrico Tröger  <enrico.troeger at uvena.de>
+
+ * src/build.c, src/main.c:
+   Fixed compile error under Win32.
+   Ignore pressed Stop button under Win32 (at least for the moment,
+   not yet implemented).
+
+
 2006-11-17  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * src/search.c:

Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c	2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/src/build.c	2006-11-17 17:49:16 UTC (rev 1009)
@@ -65,10 +65,11 @@
 static void on_make_target_entry_activate(GtkEntry *entry, gpointer user_data);
 static void set_stop_button(gboolean stop);
 static void build_exit_cb(GPid child_pid, gint status, gpointer user_data);
+static void free_pointers(gpointer first, ...);
+#ifndef G_OS_WIN32
 static void kill_process(gint pid);
-static void free_pointers(gpointer first, ...);
+#endif
 
-
 void build_finalize()
 {
 	g_free(build_info.dir);
@@ -886,9 +887,7 @@
 	GtkWidget *menu, *item, *image, *separator;
 	GtkAccelGroup *accel_group = gtk_accel_group_new();
 	GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(app->window, "tooltips"));
-#ifndef G_OS_WIN32
 	filetype *ft = filetypes[GEANY_FILETYPES_LATEX];
-#endif
 
 	menu = gtk_menu_new();
 
@@ -1202,14 +1201,15 @@
 {
 	gint idx = document_get_cur_idx();
 
-#ifndef G_OS_WIN32 // on Windows there is no PID returned (resp. it is a handle)
 	// make the process "stopable"
-	if (build_info.pid > 1)
+	if (build_info.pid > (GPid) 1)
 	{
+		// on Windows there is no PID returned (resp. it is a handle), currently unsupported
+#ifndef G_OS_WIN32
 		kill_process(build_info.pid);
+#endif
 		return;
 	}
-#endif
 
 	if (doc_list[idx].file_type->id == GEANY_FILETYPES_LATEX)
 	{	// run LaTeX file
@@ -1333,6 +1333,7 @@
 }
 
 
+#ifndef G_OS_WIN32
 static void kill_process(gint pid)
 {
 	/* SIGQUIT is not the best signal to use because it causes a core dump (this should not
@@ -1353,6 +1354,7 @@
 		set_stop_button(FALSE);
 	}
 }
+#endif
 
 
 // frees all passed pointers if they are non-NULL, the first argument is nothing special,

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/src/main.c	2006-11-17 17:49:16 UTC (rev 1009)
@@ -482,10 +482,10 @@
 	gtk_set_locale();
 
 	signal(SIGTERM, signal_cb);
+#ifdef G_OS_UNIX
 	// SIGQUIT is used to kill spawned children and we get also this signal, so ignore
 	signal(SIGQUIT, SIG_IGN);
-#ifdef G_OS_UNIX
-	/* ignore SIGPIPE signal for preventing sudden death of program */
+	// ignore SIGPIPE signal for preventing sudden death of program
 	signal(SIGPIPE, SIG_IGN);
 #endif
 


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