$OpenBSD: patch-gui_MyGL_AppController_m,v 1.4 2012/07/08 14:15:11 sebastia Exp $

fix for gcc-2.95

--- gui/MyGL/AppController.m.orig	Thu Apr 15 01:01:19 2010
+++ gui/MyGL/AppController.m	Mon Jul  2 19:26:06 2012
@@ -3,7 +3,9 @@
 #include <AppKit/AppKit.h>
 #include <AppKit/NSOpenGLView.h>
 #include "AppController.h"
+#define id gl_id
 #include <GL/gl.h>
+#undef id
 #include <GL/glu.h>
 #include <GNUstepBase/GSXML.h>
 
@@ -76,11 +78,11 @@ static void Normalize (Vector *v)
 	int t;
 	Vector light;
 	Vector vv;
+	float xx;
 	light.X = 1.0f + rtx;
 	light.Y = 1.0f + rty;
 	light.Z = 1.0f + rtz;;
 	Normalize(&light);
-	float xx;
 
 	for(t = 0; t < pcount; t++)
 	{
@@ -181,10 +183,11 @@ static void Normalize (Vector *v)
 	if (trackMeshVertices)
 	{
 		NSArray *ar;
+		NSArray *parray;
 		str = [[str stringByTrimmingSpaces]
 			stringByReplacingString:@"\t"
 						 withString:@""];
-		NSArray *parray = [str componentsSeparatedByString:@"\n"];
+		parray = [str componentsSeparatedByString:@"\n"];
 		mesh->vcount = [parray count];
 		mesh->vertices = malloc(sizeof(Vector) * mesh->vcount);
 
@@ -207,10 +210,11 @@ static void Normalize (Vector *v)
 	else if (trackNormalVertices)
 	{
 		NSArray *ar;
+		NSArray *parray;
 		str = [[str stringByTrimmingSpaces]
 			stringByReplacingString:@"\t"
 						 withString:@""];
-		NSArray *parray = [str componentsSeparatedByString:@"\n"];
+		parray = [str componentsSeparatedByString:@"\n"];
 		mesh->nvcount = [parray count];
 		mesh->nvertices = malloc(sizeof(Vector) * mesh->nvcount);
 
@@ -360,11 +364,11 @@ static void Normalize (Vector *v)
 
 - (void) reshape
 {
+	GLfloat ratio;
+	NSRect sceneBounds;
 	[super reshape];
+	sceneBounds = [self bounds];
 
-	GLfloat ratio;
-	NSRect sceneBounds = [self bounds];
-
 	ratio = NSWidth(sceneBounds)/ NSHeight(sceneBounds);
 
 	glViewport(0, 0, NSWidth(sceneBounds), NSHeight(sceneBounds));
@@ -410,7 +414,7 @@ static void Normalize (Vector *v)
 
 	h = [MySAX new];
 	p = [GSXMLParser parserWithSAXHandler:h
-					   withContentsOfFile:@"girl.dae"];
+					   withContentsOfFile:@"!!PREFIX!!/libexec/GNUstep/MyGL.app/Resources/girl.dae"];
 	if ([p parse])
 	{
 		[meshArray addObject:[h currentMesh]];
