Re: Gtksourceview doesn't compile with gcc 2.95



<petri kanerva surfeu fi> writes:

> >
> > 	Debian woody has gcc 2.95.4 (I think). Gtksourceview
> > 	0.2.0 doesn't compile with 2.95, but it does compile with
> > 	3.0.

> Let's just add to that, that it compiles also with gcc 3.2.2 on my
> Slackware 9.

It uses new C99 features. The attached patch fixes it.

Søren

? blah.patch
? c89.patch
? gtksourceview.pc
? src/Makefile
? src/Makefile.in
? src/gtksourceview-marshal.c
? src/gtksourceview-marshal.h
? src/test-widget
? src/test.html
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtksourceview/ChangeLog,v
retrieving revision 1.40
diff -u -p -u -r1.40 ChangeLog
--- ChangeLog	5 May 2003 03:24:12 -0000	1.40
+++ ChangeLog	10 May 2003 09:38:27 -0000
@@ -1,3 +1,10 @@
+Fri May  9 00:45:28 2003  Soeren Sandmann  <sandmann daimi au dk>
+
+	* gtksourceview/gtksourcebuffer.c (get_tags_func): make it
+	compile with a C89 compiler
+
+	* gtksourceview/gtksourceview.c (gtk_source_view_move_cursor): ditto
+
 === gtksourceview 0.2.0 ===
 	
 2003-05-05  Gustavo Giraldez  <gustavo giraldez gmx net>
Index: gtksourceview/gtksourcebuffer.c
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/gtksourcebuffer.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 gtksourcebuffer.c
--- gtksourceview/gtksourcebuffer.c	2 May 2003 17:27:49 -0000	1.23
+++ gtksourceview/gtksourcebuffer.c	10 May 2003 09:38:28 -0000
@@ -686,9 +686,9 @@ gtk_source_buffer_can_redo_handler (GtkS
 static void
 get_tags_func (GtkTextTag *tag, gpointer data)
 {
-	g_return_if_fail (data != NULL);
-
 	GSList **list = (GSList **) data;
+
+	g_return_if_fail (data != NULL);
 
 	if (GTK_IS_SOURCE_TAG (tag))
 	{
Index: gtksourceview/gtksourceview.c
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/gtksourceview.c,v
retrieving revision 1.20
diff -u -p -u -r1.20 gtksourceview.c
--- gtksourceview/gtksourceview.c	2 May 2003 17:27:53 -0000	1.20
+++ gtksourceview/gtksourceview.c	10 May 2003 09:38:28 -0000
@@ -762,8 +762,9 @@ gtk_source_view_move_cursor (GtkTextView
 			gtk_text_iter_forward_to_line_end (&cur);
 		while (!gtk_text_iter_starts_line (&cur))
 		{
+			gunichar c;
 			gtk_text_iter_backward_char (&cur);
-			gunichar c = gtk_text_iter_get_char (&cur);
+			c = gtk_text_iter_get_char (&cur);
 			if (!g_unichar_isspace (c))
 			{
 				/* We've gone one character too far. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]