<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lisp/expand-file-name.scm</filename>
    </added>
    <added>
      <filename>lisp/fileutils.scm</filename>
    </added>
    <added>
      <filename>lisp/find-file.scm</filename>
    </added>
    <added>
      <filename>lisp/gap-buffer.scm</filename>
    </added>
    <added>
      <filename>lisp/minara-bootstrap.scm</filename>
    </added>
    <added>
      <filename>lisp/minara.scm</filename>
    </added>
    <added>
      <filename>lisp/save-buffer.scm</filename>
    </added>
    <added>
      <filename>lisp/slurp.scm</filename>
    </added>
    <added>
      <filename>lisp/split-string-no-nulls.scm</filename>
    </added>
    <added>
      <filename>tools/minaraconv/minaraconv</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,6 +7,16 @@ AM_INIT_AUTOMAKE
 dnl Get the host, important for MacOS X
 AC_CANONICAL_HOST
 
+case $host in
+	*darwin*)
+		dnl set MacOS X Cocoa GL/GLUT flags
+ 		: ${with_apple_opengl_framework=yes}
+		;;
+	*)
+		dnl no extra flags
+		;;
+esac
+
 dnl Checks for programs.
 AC_PROG_CC
      </diff>
      <filename>configure.in</filename>
    </modified>
    <modified>
      <diff>@@ -311,7 +311,7 @@
 				8FB597C105A8C5CB00E06CEA,
 				8FB597C305A8C5CB00E06CEA,
 				8FB597C405A8C5CB00E06CEA,
-				8F5B999C05AC53F1009E9986,
+				8FB6742D05C983C300A308F9,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -333,7 +333,7 @@
 				8FB597BE05A8C5CB00E06CEA,
 				8FB597C005A8C5CB00E06CEA,
 				8FB597C205A8C5CB00E06CEA,
-				8F5B999B05AC53F1009E9986,
+				8FB6742C05C983C300A308F9,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -449,38 +449,10 @@
 //8F2
 //8F3
 //8F4
-		8F5B999905AC53F1009E9986 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			name = text.c;
-			path = ../src/text.c;
-			refType = 2;
-			sourceTree = SOURCE_ROOT;
-		};
-		8F5B999A05AC53F1009E9986 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			name = text.h;
-			path = ../src/text.h;
-			refType = 2;
-			sourceTree = SOURCE_ROOT;
-		};
-		8F5B999B05AC53F1009E9986 = {
-			fileRef = 8F5B999905AC53F1009E9986;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		8F5B999C05AC53F1009E9986 = {
-			fileRef = 8F5B999A05AC53F1009E9986;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
 		8F70B56905A85E3300740B98 = {
 			children = (
+				8FB6742A05C983C300A308F9,
+				8FB6742B05C983C300A308F9,
 				8FB597B005A8C5CB00E06CEA,
 				8FB597B105A8C5CB00E06CEA,
 				8FB597B205A8C5CB00E06CEA,
@@ -492,8 +464,6 @@
 				8FB597B805A8C5CB00E06CEA,
 				8FB597B905A8C5CB00E06CEA,
 				8FB597AF05A8C5CB00E06CEA,
-				8F5B999905AC53F1009E9986,
-				8F5B999A05AC53F1009E9986,
 			);
 			isa = PBXGroup;
 			name = src;
@@ -2064,6 +2034,36 @@
 			settings = {
 			};
 		};
+		8FB6742A05C983C300A308F9 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			lastKnownFileType = sourcecode.c.c;
+			name = minara_cache.c;
+			path = ../src/minara_cache.c;
+			refType = 2;
+			sourceTree = SOURCE_ROOT;
+		};
+		8FB6742B05C983C300A308F9 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			lastKnownFileType = sourcecode.c.h;
+			name = minara_cache.h;
+			path = ../src/minara_cache.h;
+			refType = 2;
+			sourceTree = SOURCE_ROOT;
+		};
+		8FB6742C05C983C300A308F9 = {
+			fileRef = 8FB6742A05C983C300A308F9;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		8FB6742D05C983C300A308F9 = {
+			fileRef = 8FB6742B05C983C300A308F9;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 	};
 	rootObject = 29B97313FDCFA39411CA2CEA;
 }</diff>
      <filename>macosx/minara.xcode/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,15 @@
 		breakpoints = (
 			8FA91B7105AB2D2000BBE102,
 			8FA91B7305AB2D5900BBE102,
+			8FB6742F05C9840500A308F9,
+			8FB6743105C9843E00A308F9,
+			8FB6743305C9844000A308F9,
+			8FB6743505C9847200A308F9,
+			8F6A72C505CAE0E50031901C,
+			8F6A72C705CAE0E60031901C,
+			8F6A72C905CAE0E70031901C,
+			8F6A72CB05CAE0E80031901C,
+			8F6A72CD05CAE0E90031901C,
 		);
 		codeSenseManager = 8F7B9C1D05A717AE0097257C;
 		executables = (
@@ -56,8 +65,8 @@
 				PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_MessageID;
 				PBXFileTableDataSourceColumnWidthsKey = (
 					20,
-					335.8799,
-					189.2085,
+					366.8799,
+					205.2085,
 				);
 				PBXFileTableDataSourceColumnsKey = (
 					PBXErrorsWarningsDataSource_TypeID,
@@ -70,9 +79,9 @@
 				PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
 				PBXFileTableDataSourceColumnWidthsKey = (
 					20,
-					322,
+					362,
 					20,
-					61,
+					68,
 					43,
 					43,
 					20,
@@ -137,7 +146,7 @@
 					PBXFileDataSource_Warnings_ColumnID,
 				);
 			};
-			PBXPerProjectTemplateStateSaveDate = 95179736;
+			PBXPerProjectTemplateStateSaveDate = 97181884;
 			PBXPrepackagedSmartGroups_v2 = (
 				{
 					PBXTransientLocationAtTop = bottom;
@@ -309,7 +318,7 @@
 						PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
 							BoundsStr = &quot;{{0, 0}, {604, 577}}&quot;;
 							Rows = (
-								1,
+								0,
 							);
 							VisibleRectStr = &quot;{{0, 0}, {604, 577}}&quot;;
 						};
@@ -360,12 +369,7 @@
 								);
 								PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
 									(
-										13,
-										1,
-										0,
-									),
-									(
-										14,
+										7,
 										1,
 										0,
 									),
@@ -387,6 +391,29 @@
 			&quot;PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugExpressionsViewModule&quot; = {
 			};
 			&quot;PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule&quot; = {
+				Debugger = {
+					HorizontalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							&quot;{{0, 0}, {283, 209}}&quot;,
+							&quot;{{283, 0}, {462, 209}}&quot;,
+						);
+					};
+					VerticalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							&quot;{{0, 0}, {745, 209}}&quot;,
+							&quot;{{0, 209}, {745, 213}}&quot;,
+						);
+					};
+				};
+				LauncherConfigVersion = 8;
 			};
 			&quot;PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSingleDataValueViewModule&quot; = {
 			};
@@ -398,7 +425,7 @@
 			&quot;PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule&quot; = {
 				PBXProjectWorkspaceModule_StateKey_Rev39 = {
 					PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
-						BoundsStr = &quot;{{0, 0}, {604, 577}}&quot;;
+						BoundsStr = &quot;{{0, 0}, {604, 1635}}&quot;;
 						Rows = (
 							0,
 						);
@@ -451,13 +478,6 @@
 							);
 							PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
 								(
-									13,
-									1,
-									0,
-								),
-								(
-									14,
-									1,
 									0,
 								),
 							);
@@ -469,14 +489,36 @@
 				};
 			};
 			&quot;PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXRunSessionModule&quot; = {
+				LauncherConfigVersion = 3;
+				Runner = {
+					HorizontalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							&quot;{{0, 0}, {365, 167}}&quot;,
+							&quot;{{0, 176}, {365, 267}}&quot;,
+						);
+					};
+					VerticalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							&quot;{{0, 0}, {405, 443}}&quot;,
+							&quot;{{414, 0}, {514, 443}}&quot;,
+						);
+					};
+				};
 			};
 			PBXWorkspaceGeometries = (
 				{
 					Frame = &quot;{{0, 0}, {801, 594}}&quot;;
 					PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
-						PBXProjectWorkspaceModule_RunWindowVisible = true;
 					};
-					RubberWindowFrame = &quot;183 110 801 636 0 0 1024 746 &quot;;
+					RubberWindowFrame = &quot;148 50 801 636 0 0 1024 746 &quot;;
 				},
 			);
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBatchFindModule&quot; = {
@@ -486,12 +528,11 @@
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule&quot; = {
 				Frame = &quot;{{0, 0}, {725, 184}}&quot;;
 				PBXModuleWindowStatusBarHidden = YES;
-				RubberWindowFrame = &quot;178 -3 725 205 0 0 1024 746 &quot;;
+				RubberWindowFrame = &quot;178 5 725 205 0 0 1024 746 &quot;;
 			};
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule&quot; = {
-				Frame = &quot;{{0, 0}, {400, 201}}&quot;;
-				PBXModuleWindowStatusBarHidden = YES;
-				RubberWindowFrame = &quot;50 718 400 222 0 0 1024 746 &quot;;
+				Frame = &quot;{{0, 0}, {500, 258}}&quot;;
+				RubberWindowFrame = &quot;-2 266 500 300 0 0 1024 746 &quot;;
 			};
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugExpressionsViewModule&quot; = {
 				Frame = &quot;{{0, 0}, {557, 481}}&quot;;
@@ -502,8 +543,8 @@
 				DebugConsoleVisible = None;
 				DebugConsoleWindowFrame = &quot;{{52, 38}, {500, 300}}&quot;;
 				DebugSTDIOWindowFrame = &quot;{{-2, 266}, {500, 300}}&quot;;
-				Frame = &quot;{{0, 0}, {745, 442}}&quot;;
-				WindowFrame = &quot;{{194, 147}, {745, 520}}&quot;;
+				Frame = &quot;{{0, 0}, {745, 422}}&quot;;
+				RubberWindowFrame = &quot;115 266 745 464 0 0 1024 746 &quot;;
 			};
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSingleDataValueViewModule&quot; = {
 				Frame = &quot;{{0, 0}, {400, 49}}&quot;;
@@ -512,20 +553,20 @@
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup&quot; = {
 				Frame = &quot;{{0, 0}, {750, 481}}&quot;;
 				PBXModuleWindowStatusBarHidden = YES;
-				RubberWindowFrame = &quot;153 113 750 502 0 0 1024 746 &quot;;
+				RubberWindowFrame = &quot;84 176 750 502 0 0 1024 746 &quot;;
 			};
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule&quot; = {
 				Frame = &quot;{{0, 0}, {801, 594}}&quot;;
 				PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
 					PBXProjectWorkspaceModule_RunWindowVisible = true;
 				};
-				RubberWindowFrame = &quot;183 110 801 636 0 0 1024 746 &quot;;
+				RubberWindowFrame = &quot;318 62 801 636 0 0 1280 832 &quot;;
 			};
 			&quot;PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXRunSessionModule&quot; = {
-				Frame = &quot;{{0, 0}, {745, 442}}&quot;;
-				WindowFrame = &quot;{{426, 105}, {745, 464}}&quot;;
+				Frame = &quot;{{0, 0}, {745, 366}}&quot;;
+				RubberWindowFrame = &quot;255 124 745 408 0 0 1024 746 &quot;;
 			};
-			PBXWorkspaceStateSaveDate = 95179736;
+			PBXWorkspaceStateSaveDate = 97181884;
 		};
 		sourceControlManager = 8F7B9C1C05A717AE0097257C;
 		userBuildSettings = {
@@ -545,21 +586,40 @@
 			sepNavWindowFrame = &quot;{{130, 78}, {750, 558}}&quot;;
 		};
 	};
-	8F5B999905AC53F1009E9986 = {
-		uiCtxt = {
-			sepNavIntBoundsRect = &quot;{{0, 0}, {711, 21391}}&quot;;
-			sepNavSelRange = &quot;{0, 0}&quot;;
-			sepNavVisRect = &quot;{{0, 448}, {711, 449}}&quot;;
-			sepNavWindowFrame = &quot;{{130, 78}, {750, 558}}&quot;;
-		};
+	8F6A72C505CAE0E50031901C = {
+		fileReference = 8FB597B705A8C5CB00E06CEA;
+		functionName = &quot;GlutDisplay()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 118;
+		state = 1;
 	};
-	8F5B999A05AC53F1009E9986 = {
-		uiCtxt = {
-			sepNavIntBoundsRect = &quot;{{0, 0}, {950, 6803}}&quot;;
-			sepNavSelRange = &quot;{0, 0}&quot;;
-			sepNavVisRect = &quot;{{0, 3228}, {711, 449}}&quot;;
-			sepNavWindowFrame = &quot;{{153, 57}, {750, 558}}&quot;;
-		};
+	8F6A72C705CAE0E60031901C = {
+		fileReference = 8FB597B705A8C5CB00E06CEA;
+		functionName = &quot;GlutDisplay()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 120;
+		state = 1;
+	};
+	8F6A72C905CAE0E70031901C = {
+		fileReference = 8FB597B705A8C5CB00E06CEA;
+		functionName = &quot;GlutDisplay()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 122;
+		state = 1;
+	};
+	8F6A72CB05CAE0E80031901C = {
+		fileReference = 8FB597B705A8C5CB00E06CEA;
+		functionName = &quot;GlutDisplay()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 126;
+		state = 1;
+	};
+	8F6A72CD05CAE0E90031901C = {
+		fileReference = 8FB597B705A8C5CB00E06CEA;
+		functionName = &quot;GlutDisplay()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 129;
+		state = 1;
 	};
 	8F7B9C1005A7177F0097257C = {
 		activeArgIndex = 2147483647;
@@ -647,10 +707,10 @@
 	};
 	8FB597B305A8C5CB00E06CEA = {
 		uiCtxt = {
-			sepNavIntBoundsRect = &quot;{{0, 0}, {533, 1399}}&quot;;
+			sepNavIntBoundsRect = &quot;{{0, 0}, {711, 1511}}&quot;;
 			sepNavSelRange = &quot;{1551, 4}&quot;;
-			sepNavVisRect = &quot;{{0, 590}, {533, 235}}&quot;;
-			sepNavWindowFrame = &quot;{{61, 227}, {750, 558}}&quot;;
+			sepNavVisRect = &quot;{{0, 919}, {711, 449}}&quot;;
+			sepNavWindowFrame = &quot;{{84, 120}, {750, 558}}&quot;;
 		};
 	};
 	8FB597B405A8C5CB00E06CEA = {
@@ -679,10 +739,10 @@
 	};
 	8FB597B705A8C5CB00E06CEA = {
 		uiCtxt = {
-			sepNavIntBoundsRect = &quot;{{0, 0}, {533, 2967}}&quot;;
-			sepNavSelRange = &quot;{2250, 4}&quot;;
-			sepNavVisRect = &quot;{{0, 828}, {533, 235}}&quot;;
-			sepNavWindowFrame = &quot;{{130, 164}, {750, 558}}&quot;;
+			sepNavIntBoundsRect = &quot;{{0, 0}, {711, 3093}}&quot;;
+			sepNavSelRange = &quot;{3703, 0}&quot;;
+			sepNavVisRect = &quot;{{0, 1472}, {711, 449}}&quot;;
+			sepNavWindowFrame = &quot;{{61, 141}, {750, 558}}&quot;;
 		};
 	};
 	8FB597B805A8C5CB00E06CEA = {
@@ -701,4 +761,40 @@
 			sepNavWindowFrame = &quot;{{176, 122}, {750, 558}}&quot;;
 		};
 	};
+	8FB6742A05C983C300A308F9 = {
+		uiCtxt = {
+			sepNavIntBoundsRect = &quot;{{0, 0}, {711, 3807}}&quot;;
+			sepNavSelRange = &quot;{0, 0}&quot;;
+			sepNavVisRect = &quot;{{0, 2634}, {711, 449}}&quot;;
+			sepNavWindowFrame = &quot;{{15, 269}, {750, 558}}&quot;;
+		};
+	};
+	8FB6742F05C9840500A308F9 = {
+		fileReference = 8FB6742A05C983C300A308F9;
+		functionName = &quot;minara_cache_make()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 197;
+		state = 1;
+	};
+	8FB6743105C9843E00A308F9 = {
+		fileReference = 8FB597B305A8C5CB00E06CEA;
+		functionName = &quot;RealMain()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 88;
+		state = 1;
+	};
+	8FB6743305C9844000A308F9 = {
+		fileReference = 8FB597B305A8C5CB00E06CEA;
+		functionName = &quot;RealMain()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 90;
+		state = 1;
+	};
+	8FB6743505C9847200A308F9 = {
+		fileReference = 8FB6742A05C983C300A308F9;
+		functionName = &quot;minara_cache_make()&quot;;
+		isa = PBXFileBreakpoint;
+		lineNumber = 198;
+		state = 1;
+	};
 }</diff>
      <filename>macosx/minara.xcode/robmyers.pbxuser</filename>
    </modified>
    <modified>
      <diff>@@ -1,120 +1,120 @@
 ;; The minara logotype as a minara file
 ;; Copyright (c) 2004 Rob Myers
-(%render-set-colour 0.0 0.828 0.387 1.0)
-(%render-path-begin)
-(%render-move-to 130.9441 79.3721)
-(%render-curve-to 125.2566 77.5049 131.3196 69.6743 125.5374 63.8911)
-(%render-curve-to 123.6707 62.0298 121.4358 61.0962 118.9163 61.0962)
-(%render-line-to 118.9163 79.7441)
-(%render-curve-to 118.9163 84.874 123.113 89.0703 128.2424 89.0703)
-(%render-line-to 137.3792 89.0703)
-(%render-curve-to 142.509 89.0703 146.7053 84.874 146.7053 79.7441)
-(%render-line-to 146.7053 61.0962)
-(%render-curve-to 144.1897 61.0962 141.9509 62.0298 140.179 63.8013)
-(%render-curve-to 134.302 69.6743 140.365 77.5049 134.6775 79.3721)
-(%render-line-to 130.9441 79.3721)
+(set-colour 0.0 0.828 0.387 1.0)
+(path-begin)
+(move-to 130.9441 79.3721)
+(curve-to 125.2566 77.5049 131.3196 69.6743 125.5374 63.8911)
+(curve-to 123.6707 62.0298 121.4358 61.0962 118.9163 61.0962)
+(line-to 118.9163 79.7441)
+(curve-to 118.9163 84.874 123.113 89.0703 128.2424 89.0703)
+(line-to 137.3792 89.0703)
+(curve-to 142.509 89.0703 146.7053 84.874 146.7053 79.7441)
+(line-to 146.7053 61.0962)
+(curve-to 144.1897 61.0962 141.9509 62.0298 140.179 63.8013)
+(curve-to 134.302 69.6743 140.365 77.5049 134.6775 79.3721)
+(line-to 130.9441 79.3721)
 
-(%render-move-to 243.6045 70.4224)
-(%render-curve-to 243.6045 65.2915 239.4082 61.0962 234.2783 61.0962)
-(%render-line-to 224.9521 61.0962)
-(%render-curve-to 219.8232 61.0962 215.6299 65.2915 215.6299 70.4224)
-(%render-line-to 215.6299 79.7441)
-(%render-curve-to 215.6299 84.874 219.8232 89.0703 224.9521 89.0703)
-(%render-line-to 243.6045 89.0703)
-(%render-curve-to 248.7344 89.0703 252.9307 84.874 252.9307 79.7441)
-(%render-line-to 252.9307 61.0962)
-(%render-curve-to 247.8008 61.0962 243.6045 65.2915 243.6045 70.4224)
+(move-to 243.6045 70.4224)
+(curve-to 243.6045 65.2915 239.4082 61.0962 234.2783 61.0962)
+(line-to 224.9521 61.0962)
+(curve-to 219.8232 61.0962 215.6299 65.2915 215.6299 70.4224)
+(line-to 215.6299 79.7441)
+(curve-to 215.6299 84.874 219.8232 89.0703 224.9521 89.0703)
+(line-to 243.6045 89.0703)
+(curve-to 248.7344 89.0703 252.9307 84.874 252.9307 79.7441)
+(line-to 252.9307 61.0962)
+(curve-to 247.8008 61.0962 243.6045 65.2915 243.6045 70.4224)
 
-(%render-move-to 243.2334 77.042)
-(%render-curve-to 242.5801 79.0908 240.9941 79.7441 238.9414 79.7441)
-(%render-line-to 224.9521 79.7441)
-(%render-curve-to 224.9521 78.3477 224.9521 74.3364 225.3242 73.1235)
-(%render-curve-to 225.9775 71.0747 227.5635 70.4224 229.6152 70.4224)
-(%render-line-to 243.6045 70.4224)
-(%render-curve-to 243.6045 71.8169 243.6045 75.8281 243.2334 77.042)
+(move-to 243.2334 77.042)
+(curve-to 242.5801 79.0908 240.9941 79.7441 238.9414 79.7441)
+(line-to 224.9521 79.7441)
+(curve-to 224.9521 78.3477 224.9521 74.3364 225.3242 73.1235)
+(curve-to 225.9775 71.0747 227.5635 70.4224 229.6152 70.4224)
+(line-to 243.6045 70.4224)
+(curve-to 243.6045 71.8169 243.6045 75.8281 243.2334 77.042)
  
-(%render-move-to 207.3291 79.7441)
-(%render-line-to 202.8584 79.7441)
-(%render-curve-to 200.8096 79.7441 199.2236 79.0908 198.5713 77.042)
-(%render-curve-to 198.2002 75.8281 198.2002 71.7271 198.2002 70.4224)
-(%render-curve-to 198.2002 67.9028 197.2668 65.6646 195.4983 63.8911)
-(%render-curve-to 193.6321 62.0298 191.3938 61.0962 188.8743 61.0962)
-(%render-line-to 188.8743 79.7441)
-(%render-curve-to 188.8743 84.874 193.0696 89.0703 198.2002 89.0703)
-(%render-line-to 216.6543 89.0703)
-(%render-curve-to 216.6543 83.9404 212.458 79.7441 207.3291 79.7441)
+(move-to 207.3291 79.7441)
+(line-to 202.8584 79.7441)
+(curve-to 200.8096 79.7441 199.2236 79.0908 198.5713 77.042)
+(curve-to 198.2002 75.8281 198.2002 71.7271 198.2002 70.4224)
+(curve-to 198.2002 67.9028 197.2668 65.6646 195.4983 63.8911)
+(curve-to 193.6321 62.0298 191.3938 61.0962 188.8743 61.0962)
+(line-to 188.8743 79.7441)
+(curve-to 188.8743 84.874 193.0696 89.0703 198.2002 89.0703)
+(line-to 216.6543 89.0703)
+(curve-to 216.6543 83.9404 212.458 79.7441 207.3291 79.7441)
  
-(%render-move-to 94.4856 89.0703)
-(%render-line-to 66.5149 89.0703)
-(%render-curve-to 61.385 89.0703 57.1887 84.874 57.1887 79.7441)
-(%render-line-to 57.1887 61.0962)
-(%render-curve-to 59.7083 61.0962 61.947 62.0298 63.8137 63.8911)
-(%render-curve-to 69.5959 69.6743 63.533 77.5049 69.2166 79.3721)
-(%render-curve-to 70.3396 79.7441 73.8831 79.7441 75.0974 79.7441)
-(%render-line-to 75.6516 79.7441)
-(%render-line-to 75.6516 61.0962)
-(%render-curve-to 78.1707 61.0962 80.4094 62.0298 82.2761 63.8911)
-(%render-curve-to 84.0442 65.6646 84.9778 67.9028 84.9778 70.4224)
-(%render-curve-to 84.9778 71.7271 84.9778 75.8281 85.3494 77.042)
-(%render-line-to 85.2659 79.7441)
-(%render-line-to 85.9109 79.7441)
-(%render-curve-to 87.1252 79.7441 90.6687 79.7441 91.7844 79.3721)
-(%render-curve-to 97.4758 77.5049 91.4124 69.6743 97.2859 63.8013)
-(%render-curve-to 99.0618 62.0298 101.3 61.0962 103.8118 61.0962)
-(%render-line-to 103.8118 79.7441)
-(%render-curve-to 103.8118 84.874 99.6155 89.0703 94.4856 89.0703)
+(move-to 94.4856 89.0703)
+(line-to 66.5149 89.0703)
+(curve-to 61.385 89.0703 57.1887 84.874 57.1887 79.7441)
+(line-to 57.1887 61.0962)
+(curve-to 59.7083 61.0962 61.947 62.0298 63.8137 63.8911)
+(curve-to 69.5959 69.6743 63.533 77.5049 69.2166 79.3721)
+(curve-to 70.3396 79.7441 73.8831 79.7441 75.0974 79.7441)
+(line-to 75.6516 79.7441)
+(line-to 75.6516 61.0962)
+(curve-to 78.1707 61.0962 80.4094 62.0298 82.2761 63.8911)
+(curve-to 84.0442 65.6646 84.9778 67.9028 84.9778 70.4224)
+(curve-to 84.9778 71.7271 84.9778 75.8281 85.3494 77.042)
+(line-to 85.2659 79.7441)
+(line-to 85.9109 79.7441)
+(curve-to 87.1252 79.7441 90.6687 79.7441 91.7844 79.3721)
+(curve-to 97.4758 77.5049 91.4124 69.6743 97.2859 63.8013)
+(curve-to 99.0618 62.0298 101.3 61.0962 103.8118 61.0962)
+(line-to 103.8118 79.7441)
+(curve-to 103.8118 84.874 99.6155 89.0703 94.4856 89.0703)
  
-(%render-move-to 69.1482 104.2012)
-(%render-curve-to 63.2747 98.3242 55.4436 104.3867 53.5769 98.6992)
-(%render-curve-to 53.2053 97.5801 53.2053 94.0361 53.2053 92.8223)
-(%render-line-to 53.2053 58.6099)
-(%render-curve-to 53.2053 57.397 53.2053 53.8521 53.5769 52.7329)
-(%render-curve-to 55.4436 47.0454 63.2747 53.1079 69.0569 47.3267)
-(%render-curve-to 70.9202 45.4595 71.8538 43.2251 71.8538 40.7056)
-(%render-line-to 53.2053 40.7056)
-(%render-curve-to 48.0754 40.7056 43.8792 44.9028 43.8792 50.0317)
-(%render-line-to 43.8792 101.4014)
-(%render-curve-to 43.8792 106.5313 48.0754 110.7271 53.2053 110.7271)
-(%render-line-to 71.8538 110.7271)
-(%render-curve-to 71.8538 108.2114 70.9202 105.9727 69.1482 104.2012)
+(move-to 69.1482 104.2012)
+(curve-to 63.2747 98.3242 55.4436 104.3867 53.5769 98.6992)
+(curve-to 53.2053 97.5801 53.2053 94.0361 53.2053 92.8223)
+(line-to 53.2053 58.6099)
+(curve-to 53.2053 57.397 53.2053 53.8521 53.5769 52.7329)
+(curve-to 55.4436 47.0454 63.2747 53.1079 69.0569 47.3267)
+(curve-to 70.9202 45.4595 71.8538 43.2251 71.8538 40.7056)
+(line-to 53.2053 40.7056)
+(curve-to 48.0754 40.7056 43.8792 44.9028 43.8792 50.0317)
+(line-to 43.8792 101.4014)
+(curve-to 43.8792 106.5313 48.0754 110.7271 53.2053 110.7271)
+(line-to 71.8538 110.7271)
+(curve-to 71.8538 108.2114 70.9202 105.9727 69.1482 104.2012)
  
-(%render-move-to 177.0208 70.4224)
-(%render-curve-to 177.0208 65.2915 172.8235 61.0962 167.6946 61.0962)
-(%render-line-to 158.3684 61.0962)
-(%render-curve-to 153.2385 61.0962 149.0461 65.2915 149.0461 70.4224)
-(%render-line-to 149.0461 79.7441)
-(%render-curve-to 149.0461 84.874 153.2385 89.0703 158.3684 89.0703)
-(%render-line-to 177.0208 89.0703)
-(%render-curve-to 182.1497 89.0703 186.3469 84.874 186.3469 79.7441)
-(%render-line-to 186.3469 61.0962)
-(%render-curve-to 181.217 61.0962 177.0208 65.2915 177.0208 70.4224)
+(move-to 177.0208 70.4224)
+(curve-to 177.0208 65.2915 172.8235 61.0962 167.6946 61.0962)
+(line-to 158.3684 61.0962)
+(curve-to 153.2385 61.0962 149.0461 65.2915 149.0461 70.4224)
+(line-to 149.0461 79.7441)
+(curve-to 149.0461 84.874 153.2385 89.0703 158.3684 89.0703)
+(line-to 177.0208 89.0703)
+(curve-to 182.1497 89.0703 186.3469 84.874 186.3469 79.7441)
+(line-to 186.3469 61.0962)
+(curve-to 181.217 61.0962 177.0208 65.2915 177.0208 70.4224)
  
-(%render-move-to 176.6487 77.042)
-(%render-curve-to 175.9963 79.0908 174.4104 79.7441 172.3577 79.7441)
-(%render-line-to 158.3684 79.7441)
-(%render-curve-to 158.3684 78.3477 158.3684 74.3364 158.7395 73.1235)
-(%render-curve-to 159.3928 71.0747 160.9788 70.4224 163.0315 70.4224)
-(%render-line-to 177.0208 70.4224)
-(%render-curve-to 177.0208 71.8169 177.0208 75.8281 176.6487 77.042)
+(move-to 176.6487 77.042)
+(curve-to 175.9963 79.0908 174.4104 79.7441 172.3577 79.7441)
+(line-to 158.3684 79.7441)
+(curve-to 158.3684 78.3477 158.3684 74.3364 158.7395 73.1235)
+(curve-to 159.3928 71.0747 160.9788 70.4224 163.0315 70.4224)
+(line-to 177.0208 70.4224)
+(curve-to 177.0208 71.8169 177.0208 75.8281 176.6487 77.042)
  
-(%render-move-to 241.2256 47.231)
-(%render-curve-to 247.0986 53.1079 254.9307 47.0454 256.7969 52.7329)
-(%render-curve-to 257.1689 53.8521 257.1689 57.397 257.1689 58.6099)
-(%render-line-to 257.1689 92.8223)
-(%render-curve-to 257.1689 94.0361 257.1689 97.5801 256.7969 98.6992)
-(%render-curve-to 254.9307 104.3867 247.0986 98.3242 241.3174 104.1064)
-(%render-curve-to 239.4541 105.9727 238.5205 108.2085 238.5205 110.7271)
-(%render-line-to 257.1689 110.7271)
-(%render-curve-to 262.2979 110.7271 266.4951 106.5313 266.4951 101.4014)
-(%render-line-to 266.4951 50.0317)
-(%render-curve-to 266.4951 44.9028 262.2979 40.7056 257.1689 40.7056)
-(%render-line-to 238.5205 40.7056)
-(%render-curve-to 238.5205 43.2212 239.4541 45.4595 241.2256 47.231)
+(move-to 241.2256 47.231)
+(curve-to 247.0986 53.1079 254.9307 47.0454 256.7969 52.7329)
+(curve-to 257.1689 53.8521 257.1689 57.397 257.1689 58.6099)
+(line-to 257.1689 92.8223)
+(curve-to 257.1689 94.0361 257.1689 97.5801 256.7969 98.6992)
+(curve-to 254.9307 104.3867 247.0986 98.3242 241.3174 104.1064)
+(curve-to 239.4541 105.9727 238.5205 108.2085 238.5205 110.7271)
+(line-to 257.1689 110.7271)
+(curve-to 262.2979 110.7271 266.4951 106.5313 266.4951 101.4014)
+(line-to 266.4951 50.0317)
+(curve-to 266.4951 44.9028 262.2979 40.7056 257.1689 40.7056)
+(line-to 238.5205 40.7056)
+(curve-to 238.5205 43.2212 239.4541 45.4595 241.2256 47.231)
  
-(%render-move-to 116.0027 70.4224)
-(%render-curve-to 116.0027 67.9028 115.0691 65.6646 113.301 63.8911)
-(%render-curve-to 111.4343 62.0298 109.1956 61.0962 106.6765 61.0962)
-(%render-line-to 106.6765 79.7441)
-(%render-curve-to 106.6765 84.874 110.8728 89.0703 116.0027 89.0703)
-(%render-line-to 116.0027 70.4224)
-(%render-path-end)
+(move-to 116.0027 70.4224)
+(curve-to 116.0027 67.9028 115.0691 65.6646 113.301 63.8911)
+(curve-to 111.4343 62.0298 109.1956 61.0962 106.6765 61.0962)
+(line-to 106.6765 79.7441)
+(curve-to 106.6765 84.874 110.8728 89.0703 116.0027 89.0703)
+(line-to 116.0027 70.4224)
+(path-end)</diff>
      <filename>minara.minara</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 bin_PROGRAMS = minara
-minara_SOURCES = minara_buffer.c minara_events.c minara_guile.c minara_main.c minara_rendering.c minara_window.c text.c
+minara_SOURCES = minara_cache.c minara_events.c minara_guile.c minara_main.c minara_rendering.c minara_window.c
 ##minara_CPPFLAGS =
 minara_CFLAGS =  $(GUILE_CFLAGS)
 minara_LDFLAGS =  $(GUILE_LDFLAGS) $(GLUT_CFLAGS) $(GLUT_LIBS) -lguile</diff>
      <filename>src/Makefile.am</filename>
    </modified>
    <modified>
      <diff>@@ -19,8 +19,7 @@
 
 /*
     Make sure that mouse move/drag events only flow when the mouse pointer is
-    in a window.
-  Introduce making windows to Guile...
+    in a window?
 */
 
 /*-----------------------------------------------------------------------------
@@ -114,10 +113,17 @@ void EventsStartup () {
 */
 
 void GlutDisplay () {
-  int win = glutGetWindow();
-  scm_call_1 (gDrawHook, scm_long2num (win));
-  // Blit the bitmap to the screen
-  MinaraWindowDraw (gWindows, win);
+  // This may change as the renderer evolves
+  glShadeModel (GL_FLAT);
+  //TODO: Anti-aliasing. Allow enabling/disabling from Scheme/preferences
+  // Disable costly functions
+  //    (most are disabled anyway)
+  glDisable (GL_DITHER);
+  glDisable (GL_DEPTH_TEST);
+  glClearColor (1.0, 1.0, 1.0, 1.0);
+  glClear (GL_COLOR_BUFFER_BIT);
+  scm_call_1 (gDrawHook, MinaraWindowCurrent ());
+  glFlush ();
 }
 
 /**
@@ -127,7 +133,6 @@ void GlutDisplay () {
 */
 
 void GlutResize (int width, int height) {
-  int win = glutGetWindow();
   // Reshape the OpenGL viewport
   glViewport (0, 0, (GLsizei)width, (GLsizei)height);
   glMatrixMode (GL_PROJECTION);
@@ -135,11 +140,9 @@ void GlutResize (int width, int height) {
   gluOrtho2D (0.0, (GLdouble)width, 0.0, (GLdouble)height);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
-  MinaraWindowResize (gWindows, win, 
-		      width, height);
   // Tell guile
-  scm_call_3 (gResizeHook, scm_long2num (win),
-	      scm_long2num (width),
+  scm_call_3 (gResizeHook, MinaraWindowCurrent (),
+  	      scm_long2num (width),
 	      scm_long2num (height));
   
 }
@@ -152,7 +155,7 @@ void GlutResize (int width, int height) {
 */
 
 void GlutKeyPress (unsigned char key, int x, int y) {
-  scm_call_2 (gKeyPressHook, scm_long2num (glutGetWindow()),
+  scm_call_2 (gKeyPressHook, MinaraWindowCurrent (),
 	      scm_long2num (key));
 }
 
@@ -178,11 +181,11 @@ void GlutMouseButton (int button, int state, int x, int y) {
     break;
   }
   if (state == GLUT_UP) {
-    scm_call_4 (gMouseButtonUpHook, scm_long2num (glutGetWindow()),
+    scm_call_4 (gMouseButtonUpHook, MinaraWindowCurrent (),
 		scm_long2num(buttonNum), 
 		scm_long2num (x), scm_long2num (y));
   } else {
-    scm_call_4 (gMouseButtonDownHook, scm_long2num (glutGetWindow()),
+    scm_call_4 (gMouseButtonDownHook, MinaraWindowCurrent (),
 		scm_long2num(buttonNum), 
 		scm_long2num (x), scm_long2num (y));
   }
@@ -195,7 +198,7 @@ void GlutMouseButton (int button, int state, int x, int y) {
 */
 
 void GlutMouseDrag (int x, int y) {
-  scm_call_3 (gMouseMoveHook, scm_long2num (glutGetWindow()),
+  scm_call_3 (gMouseMoveHook, MinaraWindowCurrent (),
 	      scm_long2num (x), scm_long2num (y));
 }
 
@@ -206,6 +209,6 @@ void GlutMouseDrag (int x, int y) {
 */
 
 void GlutMouseMove (int x, int y) {
-  scm_call_3 (gMouseMoveHook, scm_long2num (glutGetWindow()),
+  scm_call_3 (gMouseMoveHook, MinaraWindowCurrent (),
 	      scm_long2num (x), scm_long2num (y));
 }</diff>
      <filename>src/minara_events.c</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,9 @@
   minara - a programmable graphics program editor
   Copyright (C) 2004  Rob Myers rob@robmyers.org
 
+  Some code
+  Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
@@ -42,6 +45,73 @@ char * gGuileDoNothingEventHandlers = \
   (define %mouse-move-hook (lambda (win x y) (write-line \&quot;mouse-move-hook\&quot; (current-error-port)) (force-output (current-error-port)))) \
   (define %key-press-hook (lambda (win key) (write-line \&quot;key-press-hook\&quot; (current-error-port)) (force-output (current-error-port))))&quot;;
 
+
+/*-----------------------------------------------------------------------------
+  Functions
+  ---------------------------------------------------------------------------*/
+
+// Scheme functions
+
+/* Evaluating strings in modules
+   -----------------------------
+   One of the foundations of Minara is the idea that the same code can be
+   evaluated with different bindings for the same functions. So line-to has
+   a different effect when rendering and picking for example.
+   We could set! the function bindings before each render/pick, we could have 
+   the functions dispatch differently depending on a global (bound by a macro
+   for the duration of render/pick then restored).
+   But I wanted to try it like this. Better implementations are welcomed. :-)
+   - robmyers.
+*/
+
+/**
+   Evaluate a string port. Copied from strport.c in libguile.
+   @param port The prot to read the Scheme code from to evaluate
+   @param module The module to evaluate the code in
+   @return The result of evaluation
+*/
+
+SCM our_inner_eval_string (SCM port) {
+  SCM form;
+  SCM ans = SCM_UNSPECIFIED;
+
+  /* Read expressions from that port; ignore the values.  */
+  while (!SCM_EOF_OBJECT_P (form = scm_read (port)))
+    ans = scm_primitive_eval_x (form);
+
+  /* Don't close the port here; if we re-enter this function via a
+     continuation, then the next time we enter it, we'll get an error.
+     It's a string port anyway, so there's no advantage to closing it
+     early.  */
+
+  return ans;
+}
+
+/**
+   Evaluate a port in the given module 
+   @param port The prot to read the Scheme code from to evaluate
+   @param module The module to evaluate the code in
+   @return The result of evaluation
+*/
+
+SCM minara_port_eval_with_module (SCM port, SCM module) {
+  return scm_c_call_with_current_module (module, our_inner_eval_string, (void *)port);
+}
+
+/**
+   Evaluate a port in the given module 
+   @param port The prot to read the Scheme code from to evaluate
+   @param module The module to evaluate the code in
+   @return The result of evaluation
+*/
+
+SCM minara_string_eval_with_module (SCM string, SCM module) {
+  SCM port = scm_mkstrport (SCM_INUM0, string, SCM_OPN | SCM_RDNG,
+			    &quot;eval-string&quot;);
+  return minara_port_eval_with_module (port, module);
+}
+
+
 /*-----------------------------------------------------------------------------
   Program Lifecycle
   
@@ -58,10 +128,10 @@ char * gGuileDoNothingEventHandlers = \
  */
 
 void GuileStartup () {
+  // Register our scheme functions
+  scm_c_define_gsubr (&quot;port-eval-with-module&quot;, 2, 0, 0, minara_port_eval_with_module);
+  scm_c_define_gsubr (&quot;string-eval-with-module&quot;, 2, 0, 0, minara_string_eval_with_module);
   // Ensure we have do-nothing event handlers installed
   scm_c_eval_string (gGuileDoNothingEventHandlers);
   // Add our extensions to %load-entensions in scheme
-  // Load our library code from ?
-  // Load .minara without searching, and without failing if it isn't there
-  //scm_primitive_load ( scm_makfrom0str (&quot;~/.minara&quot;));
 }</diff>
      <filename>src/minara_guile.c</filename>
    </modified>
    <modified>
      <diff>@@ -44,16 +44,19 @@
 #include &quot;minara_events.h&quot;
 #include &quot;minara_guile.h&quot;
 #include &quot;minara_rendering.h&quot;
+#include &quot;minara_cache.h&quot;
 #include &quot;minara_window.h&quot;
 
 /*-----------------------------------------------------------------------------
+  Constants    
+  ---------------------------------------------------------------------------*/
+
+static const char * kBootstrapFile = &quot;../lisp/minara-bootstrap.scm&quot;;
+
+/*-----------------------------------------------------------------------------
   Globals    
   ---------------------------------------------------------------------------*/
 
-/** A copy of argc */
-int gArgC = 0;
-/** A reference to argv */
-char ** gArgV = NULL;
 
 /*-----------------------------------------------------------------------------
   Functions
@@ -68,16 +71,15 @@ char ** gArgV = NULL;
 */
 
 void RealMain () {
-  MinaraWindow * startWindow;
+  // Register all the Guile extensions
   GuileStartup ();
   RenderingStartup ();
+  CacheStartup ();
   WindowStartup ();
-  EventsStartup ();
-  // Init GLUT
-  glutInit(&amp;gArgC, gArgV);
-  // GLUT dies if we don't start with a window created...
-  MinaraWindowMake (&amp;startWindow, gScreenWidth, gScreenHeight, &quot;minara&quot;);
-  MinaraWindowInsert (&amp;gWindows, startWindow);
+  EventsStartup (); 
+  // Bootstrap the Guile code (libraries, tools, etc.)
+  // Here so all the C extensions are loaded first and GLUT is initialised
+  scm_primitive_load_path ( scm_makfrom0str (kBootstrapFile));
   // Main event loop
   glutMainLoop ();
   // We quit here
@@ -89,9 +91,8 @@ void RealMain () {
 */
 
 int main (int argc, char ** argv) {
-  // Taka a copy of argc and argv
-  gArgC = argc;
-  gArgV = argv;
+  // Init GLUT
+  glutInit (&amp;argc, argv);
   // never returns
   scm_boot_guile (argc, argv, RealMain, NULL);
   // Keep the compiler happy...</diff>
      <filename>src/minara_main.c</filename>
    </modified>
    <modified>
      <diff>@@ -57,9 +57,10 @@
   ---------------------------------------------------------------------------*/
 
 /** Our tesselator point cache.
-    gluTessVertex doesn't access the vertex data until later, so we need to make sure any data passed
-    in is live when we finish the poly. So we cache it in buffers of doubles in a linked list that
-    can be quickly allocated as needed, then deallocated if ever needed.*/
+    gluTessVertex doesn't access the vertex data until later, so we need to 
+    make sure any data passed in is live when we finish the poly. So we cache 
+    it in buffers of doubles in a linked list that can be quickly allocated 
+    as needed, then quickly deallocated when finished with.*/
 typedef struct PointCache {
   struct PointCache * next;
   GLdouble * current;
@@ -190,6 +191,7 @@ SCM render_path_begin () {
   gPathStarted = 0;
   gPreviousPoint[0] = 0.0;
   gPreviousPoint[1] = 0.0;
+  //fprintf (stderr, &quot;render-path-begin\n&quot;);
   return SCM_EOL;
 }
 
@@ -204,6 +206,7 @@ SCM render_path_end () {
     gPathStarted = 0;
   }
   gluTessEndPolygon (gTess);
+  //fprintf (stderr, &quot;render-path-end\n&quot;);
   return SCM_EOL;
 }
 
@@ -230,6 +233,7 @@ SCM render_move_to (SCM horizontal, SCM vertical) {
   gPathStarted = 1;
   gPreviousPoint[0] = h;
   gPreviousPoint[1] = v;
+  //fprintf (stderr, &quot;render-path-move-to %f %f\n&quot;, h, v);
   return SCM_EOL;
 }
 
@@ -251,6 +255,7 @@ SCM render_line_to (SCM horizontal, SCM vertical) {
   gluTessVertex (gTess, coords, coords);
   gPreviousPoint[0] = h;
   gPreviousPoint[1] = v;
+  //fprintf (stderr, &quot;render-path-line-to %f %f\n&quot;, h, v);
   return SCM_EOL;
 }
 
@@ -302,6 +307,7 @@ SCM render_curve_to (SCM x1, SCM y1, SCM x2, SCM y2, SCM x3, SCM y3) {
   gluTessVertex (gTess, coords, coords);
   gPreviousPoint[0] = h3;
   gPreviousPoint[1] = v3;
+  //fprintf (stderr, &quot;render-path-curve-to %f %f %f %f %f %f\n&quot;, h1, v1, h2, v2, h3, v3);
   return SCM_EOL;
 }
 
@@ -327,6 +333,7 @@ SCM render_set_colour (SCM r, SCM g, SCM b, SCM a) {
   bf = scm_num2dbl (b, &quot;render-fill&quot;);
   af = scm_num2dbl (a, &quot;render-fill&quot;);
   glColor4f (rf, gf, bf, af);
+  //fprintf (stderr, &quot;render-set-color %f %f %f %f\n&quot;, rf, gf, bf, af);
   return SCM_EOL;
 }
 
@@ -350,21 +357,28 @@ void TessErrorCallback (GLenum err) {
    Register the Guile methods for rendering, and set up our polygon tesselator.
 */
 
-void RenderingStartup () {
-  //FIXME: Set the rendering module/lexenv
+void DefineRenderingModule () {
   // Register our functions
-  scm_c_define_gsubr (&quot;%render-path-begin&quot;, 0, 0, 0,  
+  scm_c_define_gsubr (&quot;path-begin&quot;, 0, 0, 0,  
 		      render_path_begin);
-  scm_c_define_gsubr (&quot;%render-path-end&quot;, 0, 0, 0,
+  scm_c_define_gsubr (&quot;path-end&quot;, 0, 0, 0,
 		      render_path_end);
-  scm_c_define_gsubr (&quot;%render-move-to&quot;, 2, 0, 0, render_move_to);
-  scm_c_define_gsubr (&quot;%render-line-to&quot;, 2, 0, 0, render_line_to);
-  scm_c_define_gsubr (&quot;%render-curve-to&quot;, 6, 0, 0, render_curve_to);
-  scm_c_define_gsubr (&quot;%render-set-colour&quot;, 4, 0, 0, render_set_colour);
+  scm_c_define_gsubr (&quot;move-to&quot;, 2, 0, 0, render_move_to);
+  scm_c_define_gsubr (&quot;line-to&quot;, 2, 0, 0, render_line_to);
+  scm_c_define_gsubr (&quot;curve-to&quot;, 6, 0, 0, render_curve_to);
+  scm_c_define_gsubr (&quot;set-colour&quot;, 4, 0, 0, render_set_colour);
+  // Export them
+  scm_c_export (&quot;path-begin&quot;, &quot;path-end&quot;, &quot;move-to&quot;,
+		&quot;line-to&quot;, &quot;curve-to&quot;, &quot;set-colour&quot;, NULL);
+}
+
+void RenderingStartup () {
   // Make our tesselator
   gTess = gluNewTess ();
   gluTessCallback (gTess, GLU_TESS_VERTEX, glVertex3dv);
   gluTessCallback (gTess, GLU_TESS_BEGIN, glBegin);
   gluTessCallback (gTess, GLU_TESS_END, glEnd);
   gluTessCallback (gTess, GLU_TESS_ERROR, TessErrorCallback);
+  // Define our module
+  scm_c_define_module (&quot;rendering&quot;, DefineRenderingModule, NULL);
 }</diff>
      <filename>src/minara_rendering.c</filename>
    </modified>
    <modified>
      <diff>@@ -18,19 +18,20 @@
 */
 
 /*
-  Introduce making windows to Guile...
+  NOTES.
+  We represent a window as an integer ID, the same as the GLUT id.
+  This isn't typesafe but is efficient, and we need to pass the
+  ID into the event loop from C code, so it's for the best.
 */
 
 
 /*-----------------------------------------------------------------------------
-  Includes
+  Includes  
   ---------------------------------------------------------------------------*/
 
-#include &lt;stdlib.h&gt;
 #include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
 
-#include &quot;libguile.h&quot;
+#include &lt;libguile.h&gt;
 
 #ifdef __APPLE__
 #include &lt;OpenGL/gl.h&gt;
@@ -45,13 +46,13 @@
 #endif
 
 #include &quot;minara_events.h&quot;
+
 #include &quot;minara_window.h&quot;
 
 /*-----------------------------------------------------------------------------
   Local Prototypes
   ---------------------------------------------------------------------------*/
 
-static int MinaraWindowGlutMake(char * name, int width, int height);
 static void GlutWindowSet (int win);
 
 /*-----------------------------------------------------------------------------
@@ -64,387 +65,115 @@ int gScreenWidth = 640;
 /** The window startup height */
 int gScreenHeight = 480;
 
-/**The windows*/
-MinaraWindow * gWindows = NULL;
-
-// Development code!!!
-
-char * gDevDraw = /*
-  &quot;(%render-set-colour 1.0 0.0 0.0 1.0) \
-         (%render-path-begin) \
-         (%render-move-to 50.0 50.0) \
-         (%render-line-to 200.0 50.0) \
-         (%render-line-to 200.0 200.0) \
-         (%render-line-to 50.0 200.0) \
-	 (%render-path-end)(%render-set-colour 0.0 0.0 1.0 1.0) \
-         (%render-path-begin) \
-         (%render-move-to 50.0 50.0) \
-         (%render-curve-to 50.0 200.0 200.0 200.0 200.0 50.0) \
-         (%render-line-to 200.0 200.0) \
-         (%render-line-to 50.0 200.0) \
-	 (%render-path-end)&quot;; */
-
-&quot;(%render-set-colour 0.0 0.828 0.387 1.0)\
-(%render-path-begin)\
-(%render-move-to 130.9441 79.3721)\
-(%render-curve-to 125.2566 77.5049 131.3196 69.6743 125.5374 63.8911)\
-(%render-curve-to 123.6707 62.0298 121.4358 61.0962 118.9163 61.0962)\
-(%render-line-to 118.9163 79.7441)\
-(%render-curve-to 118.9163 84.874 123.113 89.0703 128.2424 89.0703)\
-(%render-line-to 137.3792 89.0703)\
-(%render-curve-to 142.509 89.0703 146.7053 84.874 146.7053 79.7441)\
-(%render-line-to 146.7053 61.0962)\
-(%render-curve-to 144.1897 61.0962 141.9509 62.0298 140.179 63.8013)\
-(%render-curve-to 134.302 69.6743 140.365 77.5049 134.6775 79.3721)\
-(%render-line-to 130.9441 79.3721)\
-\
-(%render-move-to 243.6045 70.4224)\
-(%render-curve-to 243.6045 65.2915 239.4082 61.0962 234.2783 61.0962)\
-(%render-line-to 224.9521 61.0962)\
-(%render-curve-to 219.8232 61.0962 215.6299 65.2915 215.6299 70.4224)\
-(%render-line-to 215.6299 79.7441)\
-(%render-curve-to 215.6299 84.874 219.8232 89.0703 224.9521 89.0703)\
-(%render-line-to 243.6045 89.0703)\
-(%render-curve-to 248.7344 89.0703 252.9307 84.874 252.9307 79.7441)\
-(%render-line-to 252.9307 61.0962)\
-(%render-curve-to 247.8008 61.0962 243.6045 65.2915 243.6045 70.4224)\
-\
-(%render-move-to 243.2334 77.042)\
-(%render-curve-to 242.5801 79.0908 240.9941 79.7441 238.9414 79.7441)\
-(%render-line-to 224.9521 79.7441)\
-(%render-curve-to 224.9521 78.3477 224.9521 74.3364 225.3242 73.1235)\
-(%render-curve-to 225.9775 71.0747 227.5635 70.4224 229.6152 70.4224)\
-(%render-line-to 243.6045 70.4224)\
-(%render-curve-to 243.6045 71.8169 243.6045 75.8281 243.2334 77.042)\
- \
-(%render-move-to 207.3291 79.7441)\
-(%render-line-to 202.8584 79.7441)\
-(%render-curve-to 200.8096 79.7441 199.2236 79.0908 198.5713 77.042)\
-(%render-curve-to 198.2002 75.8281 198.2002 71.7271 198.2002 70.4224)\
-(%render-curve-to 198.2002 67.9028 197.2668 65.6646 195.4983 63.8911)\
-(%render-curve-to 193.6321 62.0298 191.3938 61.0962 188.8743 61.0962)\
-(%render-line-to 188.8743 79.7441)\
-(%render-curve-to 188.8743 84.874 193.0696 89.0703 198.2002 89.0703)\
-(%render-line-to 216.6543 89.0703)\
-(%render-curve-to 216.6543 83.9404 212.458 79.7441 207.3291 79.7441)\
- \
-(%render-move-to 94.4856 89.0703)\
-(%render-line-to 66.5149 89.0703)\
-(%render-curve-to 61.385 89.0703 57.1887 84.874 57.1887 79.7441)\
-(%render-line-to 57.1887 61.0962)\
-(%render-curve-to 59.7083 61.0962 61.947 62.0298 63.8137 63.8911)\
-(%render-curve-to 69.5959 69.6743 63.533 77.5049 69.2166 79.3721)\
-(%render-curve-to 70.3396 79.7441 73.8831 79.7441 75.0974 79.7441)\
-(%render-line-to 75.6516 79.7441)\
-(%render-line-to 75.6516 61.0962)\
-(%render-curve-to 78.1707 61.0962 80.4094 62.0298 82.2761 63.8911)\
-(%render-curve-to 84.0442 65.6646 84.9778 67.9028 84.9778 70.4224)\
-(%render-curve-to 84.9778 71.7271 84.9778 75.8281 85.3494 77.042)\
-(%render-line-to 85.2659 79.7441)\
-(%render-line-to 85.9109 79.7441)\
-(%render-curve-to 87.1252 79.7441 90.6687 79.7441 91.7844 79.3721)\
-(%render-curve-to 97.4758 77.5049 91.4124 69.6743 97.2859 63.8013)\
-(%render-curve-to 99.0618 62.0298 101.3 61.0962 103.8118 61.0962)\
-(%render-line-to 103.8118 79.7441)\
-(%render-curve-to 103.8118 84.874 99.6155 89.0703 94.4856 89.0703)\
- \
-(%render-move-to 69.1482 104.2012)\
-(%render-curve-to 63.2747 98.3242 55.4436 104.3867 53.5769 98.6992)\
-(%render-curve-to 53.2053 97.5801 53.2053 94.0361 53.2053 92.8223)\
-(%render-line-to 53.2053 58.6099)\
-(%render-curve-to 53.2053 57.397 53.2053 53.8521 53.5769 52.7329)\
-(%render-curve-to 55.4436 47.0454 63.2747 53.1079 69.0569 47.3267)\
-(%render-curve-to 70.9202 45.4595 71.8538 43.2251 71.8538 40.7056)\
-(%render-line-to 53.2053 40.7056)\
-(%render-curve-to 48.0754 40.7056 43.8792 44.9028 43.8792 50.0317)\
-(%render-line-to 43.8792 101.4014)\
-(%render-curve-to 43.8792 106.5313 48.0754 110.7271 53.2053 110.7271)\
-(%render-line-to 71.8538 110.7271)\
-(%render-curve-to 71.8538 108.2114 70.9202 105.9727 69.1482 104.2012)\
- \
-(%render-move-to 177.0208 70.4224)\
-(%render-curve-to 177.0208 65.2915 172.8235 61.0962 167.6946 61.0962)\
-(%render-line-to 158.3684 61.0962)\
-(%render-curve-to 153.2385 61.0962 149.0461 65.2915 149.0461 70.4224)\
-(%render-line-to 149.0461 79.7441)\
-(%render-curve-to 149.0461 84.874 153.2385 89.0703 158.3684 89.0703)\
-(%render-line-to 177.0208 89.0703)\
-(%render-curve-to 182.1497 89.0703 186.3469 84.874 186.3469 79.7441)\
-(%render-line-to 186.3469 61.0962)\
-(%render-curve-to 181.217 61.0962 177.0208 65.2915 177.0208 70.4224)\
- \
-(%render-move-to 176.6487 77.042)\
-(%render-curve-to 175.9963 79.0908 174.4104 79.7441 172.3577 79.7441)\
-(%render-line-to 158.3684 79.7441)\
-(%render-curve-to 158.3684 78.3477 158.3684 74.3364 158.7395 73.1235)\
-(%render-curve-to 159.3928 71.0747 160.9788 70.4224 163.0315 70.4224)\
-(%render-line-to 177.0208 70.4224)\
-(%render-curve-to 177.0208 71.8169 177.0208 75.8281 176.6487 77.042)\
- \
-(%render-move-to 241.2256 47.231)\
-(%render-curve-to 247.0986 53.1079 254.9307 47.0454 256.7969 52.7329)\
-(%render-curve-to 257.1689 53.8521 257.1689 57.397 257.1689 58.6099)\
-(%render-line-to 257.1689 92.8223)\
-(%render-curve-to 257.1689 94.0361 257.1689 97.5801 256.7969 98.6992)\
-(%render-curve-to 254.9307 104.3867 247.0986 98.3242 241.3174 104.1064)\
-(%render-curve-to 239.4541 105.9727 238.5205 108.2085 238.5205 110.7271)\
-(%render-line-to 257.1689 110.7271)\
-(%render-curve-to 262.2979 110.7271 266.4951 106.5313 266.4951 101.4014)\
-(%render-line-to 266.4951 50.0317)\
-(%render-curve-to 266.4951 44.9028 262.2979 40.7056 257.1689 40.7056)\
-(%render-line-to 238.5205 40.7056)\
-(%render-curve-to 238.5205 43.2212 239.4541 45.4595 241.2256 47.231)\
- \
-(%render-move-to 116.0027 70.4224)\
-(%render-curve-to 116.0027 67.9028 115.0691 65.6646 113.301 63.8911)\
-(%render-curve-to 111.4343 62.0298 109.1956 61.0962 106.6765 61.0962)\
-(%render-line-to 106.6765 79.7441)\
-(%render-curve-to 106.6765 84.874 110.8728 89.0703 116.0027 89.0703)\
-(%render-line-to 116.0027 70.4224)\
-(%render-path-end)&quot;;
-
-
-
-         
 /*-----------------------------------------------------------------------------
   Functions
   ---------------------------------------------------------------------------*/
 
-// Window list management
+// Utilities
 
-/**
-   Insert a newly allocated window into the list.
-   @param root A pointer to the root pointer of the list.
-   @param win The window id of the window.
-   @param pixmap The Pixmap for the window
-   @param path The path for the window.
+/*
+  Set the window, allowing for being passed an invalid window.
+  @param win The window id. If zero, nothing will be done.
 */
 
-void MinaraWindowInsert (MinaraWindow ** root, MinaraWindow * con) {
-  if (con != NULL) {
-    con-&gt;next = *root;
-    *root = con;
+static void GlutWindowSet (int win) {
+  if (win != 0) {
+    glutSetWindow (win);
   }
 }
 
+// Scheme methods
 /**
-   Delete the window, but *NOT* the contained pointers.
-   @param root A pointer to the root pointer of the list.
-   @param win The window id to match.
+   Make a window, set up the callbacks.
+   @return The window ID or '()
 */
 
-void MinaraWindowRemove (MinaraWindow ** root, int win) {
-  // Empty list? Return
-  if (*root == NULL) {
-    return;
-    // Deleting the first item? Replace and return
-    // If next is NULL that's OK, it just sets the list to empty
-  } else if ((*root)-&gt;window == win) {
-    MinaraWindow * temp = *root;
-    *root = (*root)-&gt;next;
-    free (temp);
-    return;
-  } else {
-    // Iterate through until we run out of items or find a match
-    MinaraWindow * before = *root;
-    MinaraWindow * current = before-&gt;next;
-    // When current == null we've exhausted the list without a match
-    while (current != NULL) {
-      // Found a match?
-      if (current-&gt;window == win) {
-	// Remove the link and free the item
-	before-&gt;next = current-&gt;next;
-	free (current);
-	break;
-	// Otherwise
-      } else {
-	// Advance to the next node
-	before = current;
-	current = current-&gt;next;
-      }
-    }
+SCM minara_window_make () {
+  int win = 0;
+  glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
+  glutInitWindowSize (gScreenWidth, gScreenHeight); 
+  //glutInitWindowPosition (0, 0); 
+  win = glutCreateWindow (&quot;&quot;);
+  if (win == 0) {
+    return SCM_EOL;
   }
-}
-
-/**
-   Get the window, returns NULL on failure.
-   @param root The root pointer of the list.
-   @param win The window id to match.
-   @return A pointer to the window for the window id, or NULL if no match.
-*/
+  // Install the event handlers
+  glutReshapeFunc (GlutResize);
+  glutDisplayFunc (GlutDisplay);
+  glutKeyboardFunc (GlutKeyPress);
+  glutMouseFunc (GlutMouseButton);
+  glutMotionFunc (GlutMouseDrag);
+  glutPassiveMotionFunc (GlutMouseMove);
 
-MinaraWindow * MinaraWindowGet (MinaraWindow * root, int win) {
-  MinaraWindow * con = root;
-  while (con != NULL) {
-    if (con-&gt;window == win) {
-      break;
-    } else {
-      con = con-&gt;next;
-    }
-  }
-  return con;
+  // Return the new window ID
+  return scm_int2num(win);
 }
 
+
 /**
-   Allocate a window structure and insert it into the list
-   @param con A pointer to the list root window pointer. *con may be NULL.
-   @param width The window width.
-   @param height The window height.
-   @param name The window name.
+   Dispose of a window's OS resources.
+   @param window The window to finalise and deallocate.
+   @return '()
 */
 
-void MinaraWindowMake (MinaraWindow ** con, int width, int height, char * name) {
-  // Make the window
-  MinaraWindow * win = (MinaraWindow*)malloc (sizeof (MinaraWindow));
-  if (win != NULL) {
-    win-&gt;window = MinaraWindowGlutMake (name, width, height);
-    win-&gt;displayList = glGenLists(1);
-    win-&gt;buffer = gDevDraw;
-    win-&gt;shouldRedraw = 1;
-    win-&gt;next = NULL;
-  }
-  *con = win;
+SCM minara_window_dispose (SCM window) {
+  GLuint win = 0;
+  GLuint oldWin = glutGetWindow ();
+  SCM_ASSERT(SCM_NUMBERP(window), window, SCM_ARG1, &quot;minara-window-dispose&quot;);
+  win = (GLuint)scm_num2int (window, SCM_ARG1, &quot;minara-window-dispose&quot;);
+  GlutWindowSet (win);
+  glutHideWindow ();
+  GlutWindowSet (oldWin);
+  glutDestroyWindow (win);
+  return SCM_EOL;
 }
 
 /**
-   Deallocate a window structure, which must have been removed from the list.
-   @param con A pointer to the window structure.
-   @param width The window width.
-   @param height The window height.
-   @param name The window name.
+   Get the current window.
+   @return A fresh smob for the window, don't (dispose)!
 */
 
-void MinaraWindowDestroy (MinaraWindow * con) {
-  if (con != NULL) {
-    int win = con-&gt;window;
-    int oldWin = glutGetWindow ();
-    GlutWindowSet (win);
-    glutHideWindow ();
-    GlutWindowSet (oldWin);
-    glutDestroyWindow (win);
-    glDeleteLists (con-&gt;displayList, 1);
-    con-&gt;displayList = 0;
-    // Deallocate the buffer properly!
-    con-&gt;buffer = NULL;
-    con-&gt;window = -1;
-    con-&gt;next = NULL;
-  }
+SCM minara_window_current () {
+  return scm_uint2num (glutGetWindow ());
 }
 
 /**
-   Allocate a window structure and insert it into the list
-   @param con The list root window pointer.
-   @param width The new window width.
-   @param height The new window height.
+   Set the current window.
+   @param win The window ID to set as current.
+   @return '()
 */
 
-void MinaraWindowResize (MinaraWindow * root, int win, 
-			 int width, int height) {
-  MinaraWindow * con = MinaraWindowGet (root, win);
-  if (con != NULL) {
-    con-&gt;shouldRedraw = 1;
-  }
+SCM minara_window_set (SCM win) {
+  GLuint w = 0;
+  SCM_ASSERT(SCM_NUMBERP(win), win, SCM_ARG1, &quot;minara-window-set&quot;);
+  w = (GLuint)scm_num2int (win, SCM_ARG1, &quot;minara-window-set&quot;);
+  GlutWindowSet (w);
+  return SCM_EOL;
 }
 
-/*
-  Make a new glut window and set up the data structures and callbacks.
-  @param name The title to diplay on the window title bar.
-  @return The ID of the created window.
-*/
+// TODO:
 
-int MinaraWindowGlutMake(char * name, int width, int height) {
-  int win;
-  int oldWin;
-  oldWin = glutGetWindow ();
-  win = glutCreateWindow (name);
-  GlutWindowSet (win);
-  glutInitWindowSize (width, height); 
-  glutInitWindowPosition (0, 0); 
-  glutInitDisplayMode (GLUT_RGBA | GLUT_SINGLE);
-
-  glClearColor (1.0, 1.0, 1.0, 1.0);
-  // This may change as the renderer evolves
-  glShadeModel (GL_FLAT);
-  
-  //TODO: Anti-aliasing. Allow enabling/disabling from Scheme/preferences
-  
-  // Disable costly functions
-  //    (most are disabled anyway)
-  glDisable (GL_DITHER);
-  glDisable (GL_DEPTH_TEST);
+// Window name getter and setter
+// Window position and size getter and setter
 
-  glutDisplayFunc (GlutDisplay);
-  glutReshapeFunc (GlutResize);
-  glutKeyboardFunc (GlutKeyPress);
-  glutMouseFunc (GlutMouseButton);
-  glutMotionFunc (GlutMouseDrag);
-  glutPassiveMotionFunc (GlutMouseMove);
 
-  GlutWindowSet (oldWin);
-  
-  return win;
-}
+// Utilities
 
-/**
-   Redraw the window graphics by evaluating the window script buffer in the rendering context.
-   Either:
-   Evaluate the script buffer for the window in the rendering context, capturing the output
-   in an OpenGL display list.
-   Or:
-   Draw the display list.
-   If we can't allocate the display list, we just re-evaluate.
-   @param root The window list root pointer.
-   @param win The window id to redraw.
-*/
-
-void MinaraWindowDraw (MinaraWindow * root, int win) {
-  MinaraWindow * con = MinaraWindowGet (root, win);
-  if (con != NULL) {
-    GLuint list = con-&gt;displayList;
-    char * buffer = con-&gt;buffer;
-    // If we don't need to redraw and we have a display list, just draw it
-    if ((con-&gt;shouldRedraw == 0) &amp;&amp; (list != 0)) {
-      glCallList (list);
-      glFlush ();
-    } else {
-      // Otherwise, regenerate the list and redraw
-      // Or, if we don't have a list, just redraw
-      if (list != 0) {
-	glNewList (list, GL_COMPILE_AND_EXECUTE);
-      }
-      //FIXME: Make an environ nested in render environ, get/save/set/reset values...
-      //FIXME: Much error handling!!!
-      // Clear the buffer
-      glClear (GL_COLOR_BUFFER_BIT);
-      // Evaluate the buffer to draw the graphics
-      scm_c_eval_string (buffer);
-      // make sure we finish drawing (not captured by display lists!)
-      glFlush ();
-      if (list != 0) {
-        glEndList ();
-      }
-      con-&gt;shouldRedraw = 0;
-    }
-  }
+SCM MinaraWindowCurrent () {
+  return minara_window_current ();
 }
 
-/*
-  Set the window, allowing for being passed an invalid window.
-  @param win The window id. If zero, nothing will be done.
-*/
-
-static void GlutWindowSet (int win) {
-  if (win != 0) {
-    glutSetWindow (win);
-  }
-}
 
 // Program lifecycle
 
 /**
-   Register any callbacks, allocate any globals.
+   Register our Guile functions
 */
 
 void WindowStartup () {
-  // Register menu items and/or scheme hooks
+  // Register our scheme functions
+  scm_c_define_gsubr (&quot;window-make&quot;, 0, 0, 0, minara_window_make);
+  scm_c_define_gsubr (&quot;window-dispose&quot;, 0, 0, 0, minara_window_dispose);
+  scm_c_define_gsubr (&quot;window-current&quot;, 0, 0, 0, minara_window_current);
+  scm_c_define_gsubr (&quot;window-set&quot;, 1, 0, 0, minara_window_set);
 }</diff>
      <filename>src/minara_window.c</filename>
    </modified>
    <modified>
      <diff>@@ -20,36 +20,15 @@
 #ifndef MINARA_WINDOW_INCLUDE
 #define MINARA_WINDOW_INCLUDE
 
-#ifdef __APPLE__
-#include &lt;OpenGL/gl.h&gt;
-#else
-#include &lt;GL/gl.h&gt;
-#endif
-
-// Our main window structure
-typedef struct MinaraWindow {
-  int window;
-  GLuint displayList;
-  char * buffer;
-  int shouldRedraw;
-  struct MinaraWindow * next;
-} MinaraWindow;
-
-// The list of windows
-extern MinaraWindow * gWindows;
+#include &lt;libguile.h&gt;
 
 // Default window size
 extern int gScreenWidth;
 extern int gScreenHeight;
 
-void MinaraWindowInsert (MinaraWindow ** root, MinaraWindow * con);
-void MinaraWindowRemove (MinaraWindow ** root, int win);
-MinaraWindow * MinaraWindowGet (MinaraWindow * root, int win);
-void MinaraWindowMake (MinaraWindow ** con, int width, int height, char * name);
-void MinaraWindowDestroy (MinaraWindow * con);
-void MinaraWindowResize (MinaraWindow * root, int win, 
-			 int width, int height);
-void MinaraWindowDraw (MinaraWindow * root, int win);
+// Functions
+
+SCM MinaraWindowCurrent ();
 
 void WindowStartup ();
 </diff>
      <filename>src/minara_window.h</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>src/minara_buffer.c</filename>
    </removed>
    <removed>
      <filename>src/minara_buffer.h</filename>
    </removed>
    <removed>
      <filename>src/text.c</filename>
    </removed>
    <removed>
      <filename>src/text.h</filename>
    </removed>
    <removed>
      <filename>tools/minaraconv/minaraconv.scm</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>6f6241415f02ee03c0461165b16be71864c21e6d</id>
    </parent>
  </parents>
  <author>
    <name>Rob Myers</name>
    <email>rob@robmyers.org</email>
  </author>
  <url>http://github.com/robmyers/minara-scheme/commit/dbf32bc55f48d245b0ba16dc8714919220d0436a</url>
  <id>dbf32bc55f48d245b0ba16dc8714919220d0436a</id>
  <committed-date>2004-02-01T06:46:49-08:00</committed-date>
  <authored-date>2004-02-01T06:46:49-08:00</authored-date>
  <message>Minara now uses Scheme more extensively for basic application functions. Removed dependencies on libraries other than GLUT and Guile.</message>
  <tree>abb48dc7575395564990375fa116902627f058cd</tree>
  <committer>
    <name>Rob Myers</name>
    <email>rob@robmyers.org</email>
  </committer>
</commit>
