diff -r -u degas-original/lib/libggi2d/configure degas/lib/libggi2d/configure
--- degas-original/lib/libggi2d/configure	Thu Jan 25 16:46:25 2001
+++ degas/lib/libggi2d/configure	Fri Jan 26 22:49:07 2001
@@ -2071,7 +2071,7 @@
 
 
 DISPLAYSUBDIRS=""
-DEFAULTSUBDIRS="stubs" # linear_8 linear_16
+DEFAULTSUBDIRS="stubs linear_8 linear_16"
 
 
 
diff -r -u degas-original/lib/libggi2d/default/linear_16/hline.c degas/lib/libggi2d/default/linear_16/hline.c
--- degas-original/lib/libggi2d/default/linear_16/hline.c	Wed Jan 13 16:38:58 1999
+++ degas/lib/libggi2d/default/linear_16/hline.c	Fri Jan 26 22:58:21 2001
@@ -41,9 +41,27 @@
 
 static void drawHLine(struct ggi_visual *vis, ggi_sint x1, ggi_sint x2, ggi_sint y, pixel color)
 {
-	ggi_sint	width;
-	pixel	*ptr;
+        /* The current implementation will not work with 16-bpp modes, as the width
+	   is calculated by just finding the difference between the two values and
+	   then doing a memset - this is fine for 8-bpp but not for anything else. You
+	   end up with filled objects that are only half the horizontal size they should be
+	   
+	   So for now I have temporarily reworked the code to use the ggiDrawHLine function
+	   which does the operation correctly, however bitwise operations will not work
+	   properly. This code is used to draw things like filled objects so at least it
+	   can draw these correctly.
+	   
+	   Change contributed by Wayne Piekarski - wayne@cs.unisa.edu.au - UniSA Tinmith Project */
+
+	ggi_sint width = x2 - x1 + 1;
 	
+	ggiSetGCForeground (vis, color);
+	if (width < 0)
+	  width = -width;
+	ggiDrawHLine (vis, x1, y, width);
+	
+	/*
+	pixel	*ptr;
 	CLIPHLINE(vis, x1, x2, y, width);
 	ptr	= LFBADDR(vis, x1, y);
 	width	= x2 - x1 + 1;
@@ -69,6 +87,7 @@
 	DRAWHLINE(ADD, *ptr + color )
 	DRAWHLINE(SUB, *ptr - color )
 	}
+	*/
 }
 
 void	GGIEXP(scanline)(struct ggi_visual *vis, ggi_sint x1, ggi_sint x2, ggi_sint y)
diff -r -u degas-original/lib/libggi2d/default/linear_16/setup.c degas/lib/libggi2d/default/linear_16/setup.c
--- degas-original/lib/libggi2d/default/linear_16/setup.c	Wed Jan 13 16:38:59 1999
+++ degas/lib/libggi2d/default/linear_16/setup.c	Fri Jan 26 23:06:24 2001
@@ -19,6 +19,7 @@
  *
  */
 
+#include "ggi2d/internal.h"
 #include "lib.h"
 
 /*----------------------------------------------------------------------*/
@@ -55,7 +56,7 @@
 int GGIdlinit(struct ggi_visual *vis,const char *args, void *argptr)
 {
 	DPRINT("initializing 2d " TARGETNAME "\n");
-	GGI2DregisterUpdateFunc(visual, update, 
+	GGI2DregisterUpdateFunc(vis, update, 
 		GGI2D_UPD_LINEMODE + 
 		GGI2D_UPD_APPENDMODE + 
 		GGI2D_UPD_TEXTUREMODE + 
@@ -70,3 +71,57 @@
 	
 #include <ggi/internal/ggidlinit.h>	
 /*----------------------------------------------------------------------*/
+
+
+/* These following functions are an interface to the new GGI extension
+   code. The GGI2D code used to work and then broke when changes were
+   made elsewhere. This interface allows GGI2D to work properly again,
+   although it is a bit of a hack so what I've done might not be perfect.
+   The code was taken from various other extension modules in the project.
+
+   Contributed by Wayne Piekarski - wayne@cs.unisa.edu.au - UniSA Tinmith Project */
+
+
+static int GGIopen(ggi_visual *vis, struct ggi_dlhandle *dlh,
+		   const char *args, void *argptr, uint32 *dlret)
+{
+  DPRINT ("GGIopen(%p, %p, %s, %p, %p) called for stubs sublib\n",
+	  vis, dlh, args ? args : "(NULL)", argptr, dlret);
+  
+  return (GGIdlinit (vis, args, argptr));
+}
+
+
+
+
+static int GGIclose(ggi_visual *vis, struct ggi_dlhandle *dlh)
+{
+  DPRINT ("GGIclose(%p, %p) called for stubs sublib\n", vis, dlh);
+  
+  return (GGIdlcleanup (vis));
+}
+
+
+
+
+int GGIdl_linear_16_2d (int func, void **funcptr)
+{
+	DPRINT ("GGIdl_stubs() called\n");
+	
+	switch (func) {
+	    case GGIFUNC_open:
+		*funcptr = GGIopen;
+		return 0;
+	    case GGIFUNC_exit:
+		*funcptr = NULL;
+		return 0;
+	    case GGIFUNC_close:
+		*funcptr = GGIclose;
+		return 0;
+	    default:
+		*funcptr = NULL;
+	}
+	
+ 	return GGI_ENOTFOUND;
+}
+
diff -r -u degas-original/lib/libggi2d/default/linear_8/setup.c degas/lib/libggi2d/default/linear_8/setup.c
--- degas-original/lib/libggi2d/default/linear_8/setup.c	Wed Jan 13 16:39:00 1999
+++ degas/lib/libggi2d/default/linear_8/setup.c	Fri Jan 26 23:06:36 2001
@@ -19,6 +19,7 @@
  *
  */
 
+#include "ggi2d/internal.h"
 #include "lib.h"
 
 /*----------------------------------------------------------------------*/
@@ -55,7 +56,7 @@
 int GGIdlinit(struct ggi_visual *vis,const char *args, void *argptr)
 {
 	DPRINT("initializing 2d " TARGETNAME "\n");
-	GGI2DregisterUpdateFunc(visual, update, 
+	GGI2DregisterUpdateFunc(vis, update, 
 		GGI2D_UPD_LINEMODE + 
 		GGI2D_UPD_APPENDMODE + 
 		GGI2D_UPD_TEXTUREMODE + 
@@ -70,3 +71,57 @@
 	
 #include <ggi/internal/ggidlinit.h>	
 /*----------------------------------------------------------------------*/
+
+
+/* These following functions are an interface to the new GGI extension
+   code. The GGI2D code used to work and then broke when changes were
+   made elsewhere. This interface allows GGI2D to work properly again,
+   although it is a bit of a hack so what I've done might not be perfect.
+   The code was taken from various other extension modules in the project.
+
+   Contributed by Wayne Piekarski - wayne@cs.unisa.edu.au - UniSA Tinmith Project */
+
+
+static int GGIopen(ggi_visual *vis, struct ggi_dlhandle *dlh,
+		   const char *args, void *argptr, uint32 *dlret)
+{
+  DPRINT ("GGIopen(%p, %p, %s, %p, %p) called for stubs sublib\n",
+	  vis, dlh, args ? args : "(NULL)", argptr, dlret);
+  
+  return (GGIdlinit (vis, args, argptr));
+}
+
+
+
+
+static int GGIclose(ggi_visual *vis, struct ggi_dlhandle *dlh)
+{
+  DPRINT ("GGIclose(%p, %p) called for stubs sublib\n", vis, dlh);
+  
+  return (GGIdlcleanup (vis));
+}
+
+
+
+
+int GGIdl_linear_8_2d (int func, void **funcptr)
+{
+	DPRINT ("GGIdl_stubs() called\n");
+	
+	switch (func) {
+	    case GGIFUNC_open:
+		*funcptr = GGIopen;
+		return 0;
+	    case GGIFUNC_exit:
+		*funcptr = NULL;
+		return 0;
+	    case GGIFUNC_close:
+		*funcptr = GGIclose;
+		return 0;
+	    default:
+		*funcptr = NULL;
+	}
+	
+ 	return GGI_ENOTFOUND;
+}
+
diff -r -u degas-original/lib/libggi2d/default/stubs/setup.c degas/lib/libggi2d/default/stubs/setup.c
--- degas-original/lib/libggi2d/default/stubs/setup.c	Sat May  1 14:46:42 1999
+++ degas/lib/libggi2d/default/stubs/setup.c	Fri Jan 26 23:06:45 2001
@@ -21,6 +21,7 @@
 
 #include "lib.h"
 #include "ggi2dutil.h"
+#include "../ggi2d/internal.h"
 
 /*----------------------------------------------------------------------*/
 
@@ -108,3 +109,56 @@
 #include <ggi/internal/ggidlinit.h>
 	
 /*----------------------------------------------------------------------*/
+
+
+/* These following functions are an interface to the new GGI extension
+   code. The GGI2D code used to work and then broke when changes were
+   made elsewhere. This interface allows GGI2D to work properly again,
+   although it is a bit of a hack so what I've done might not be perfect.
+   The code was taken from various other extension modules in the project.
+   
+   Contributed by Wayne Piekarski - wayne@cs.unisa.edu.au - UniSA Tinmith Project */
+
+
+static int GGIopen(ggi_visual *vis, struct ggi_dlhandle *dlh,
+		   const char *args, void *argptr, uint32 *dlret)
+{
+  DPRINT ("GGIopen(%p, %p, %s, %p, %p) called for stubs sublib\n",
+	  vis, dlh, args ? args : "(NULL)", argptr, dlret);
+  
+  return (GGIdlinit (vis, args, argptr));
+}
+
+
+
+
+static int GGIclose(ggi_visual *vis, struct ggi_dlhandle *dlh)
+{
+  DPRINT ("GGIclose(%p, %p) called for stubs sublib\n", vis, dlh);
+  
+  return (GGIdlcleanup (vis));
+}
+
+
+
+
+int GGIdl_stubs_2d (int func, void **funcptr)
+{
+	DPRINT ("GGIdl_stubs() called\n");
+	
+	switch (func) {
+	    case GGIFUNC_open:
+		*funcptr = GGIopen;
+		return 0;
+	    case GGIFUNC_exit:
+		*funcptr = NULL;
+		return 0;
+	    case GGIFUNC_close:
+		*funcptr = GGIclose;
+		return 0;
+	    default:
+		*funcptr = NULL;
+	}
+	
+ 	return GGI_ENOTFOUND;
+}
Only in degas/lib/libggi2d/demos: demo-old.c
Only in degas-original/lib/libggi2d/demos: demo.c
Only in degas/lib/libggi2d/demos: out
diff -r -u degas-original/lib/libggi2d/ggi2d/main.c degas/lib/libggi2d/ggi2d/main.c
--- degas-original/lib/libggi2d/ggi2d/main.c	Wed May 26 14:40:40 1999
+++ degas/lib/libggi2d/ggi2d/main.c	Fri Jan 26 23:05:12 2001
@@ -40,6 +40,12 @@
 
 ggi_extid ggi2dID=-1;
 
+
+
+#define GGI_SYMNAME_PREFIX   "GGIdl_"
+
+
+
 void	DPRINT(const char *format, ...)
 {
 	va_list args;
@@ -63,14 +69,31 @@
 			int temp;
 			ggi_dlhandle *lib;
 			char api[256],args[256];
-		
+			const char *fname;
+			
 			DPRINT("changed() APILIST \n");
 			for(temp = 0; ggiGetAPI(vis,temp,api,args) == 0; temp++) 
 			{
 				DPRINT("Trying #%d: %s(%s)\n",temp,api,args);
-				lib=ggiExtensionLoadDL(vis, 
-					ggMatchConfig(_ggi2dConfigHandle, api, NULL),
-					args, NULL);
+
+				/* This code did not skip the API if the return
+				   value was NULL, and then would seg fault deep
+				   within the GGI dynamic library code, so looking
+				   at other libraries I came up with this to make
+				   it work right
+
+				   Wayne Piekarski - wayne@cs.unisa.edu.au - UniSA Tinmith Project */
+				
+				
+				fname = ggMatchConfig (_ggi2dConfigHandle, api, NULL);
+				if (fname == NULL)
+				  {
+				    /* No special implementation for this sublib */
+				    continue;
+				  }
+				DPRINT ("Loading from filename %s\n", fname);
+				lib=ggiExtensionLoadDL(vis, fname,
+						       args, NULL, GGI_SYMNAME_PREFIX);
                 		DPRINT("Loading #%d %s: %s(%s) : %p\n",temp,lib ? "o.k. " : "fail " ,api,args,lib);
                 		if (!lib && strcmp(api,"generic-stubs")==0 ) {
                 			fprintf(stderr,"Cannot load 'generic-stubs'.\n"
