SF.net SVN: geany:[3466] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Jan 14 16:45:24 UTC 2009


Revision: 3466
          http://geany.svn.sourceforge.net/geany/?rev=3466&view=rev
Author:   eht16
Date:     2009-01-14 16:45:24 +0000 (Wed, 14 Jan 2009)

Log Message:
-----------
Strip the compiler error messages to fix possibly broken message parsing.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-01-14 16:08:00 UTC (rev 3465)
+++ trunk/ChangeLog	2009-01-14 16:45:24 UTC (rev 3466)
@@ -11,6 +11,9 @@
    add the new format specification.
    Update global tags files.
    Add documentation for the two supported global tags files formats.
+ * src/msgwindow.c:
+   Strip the compiler error messages to fix possibly broken message
+   parsing.
 
 
 2009-01-12  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c	2009-01-14 16:08:00 UTC (rev 3465)
+++ trunk/src/msgwindow.c	2009-01-14 16:45:24 UTC (rev 3466)
@@ -576,10 +576,13 @@
 			gint line;
 			gchar *filename, *dir;
 			GtkTreePath *path;
+			/* save the beginning of the string to use when free'ing it after it was stripped */
+			gchar *string_start = string;
 
 			path = gtk_tree_model_get_path(model, &iter);
 			find_prev_build_dir(path, model, &dir);
 			gtk_tree_path_free(path);
+			g_strchug(string); /* remove possible leading whitespace */
 			msgwin_parse_compiler_error_line(string, dir, &filename, &line);
 
 			if (dir != NULL)
@@ -605,8 +608,8 @@
 				}
 			}
 			g_free(filename);
+			g_free(string_start);
 		}
-		g_free(string);
 	}
 	return ret;
 }


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