Pārlūkot izejas kodu

Remove display/drivers

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33037 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 gadi atpakaļ
vecāks
revīzija
482974834a
39 mainītis faili ar 0 papildinājumiem un 2589 dzēšanām
  1. 0 2
      display/Makefile
  2. 0 29
      display/drivers/Makefile
  3. 0 22
      display/drivers/XDRIVER/Box.c
  4. 0 49
      display/drivers/XDRIVER/Client.c
  5. 0 30
      display/drivers/XDRIVER/Color.c
  6. 0 319
      display/drivers/XDRIVER/Color_table.c
  7. 0 56
      display/drivers/XDRIVER/Draw_bitmap.c
  8. 0 8
      display/drivers/XDRIVER/Draw_line.c
  9. 0 8
      display/drivers/XDRIVER/Draw_point.c
  10. 0 118
      display/drivers/XDRIVER/Get_w_box.c
  11. 0 92
      display/drivers/XDRIVER/Get_w_line.c
  12. 0 49
      display/drivers/XDRIVER/Get_w_pointer.c
  13. 0 10
      display/drivers/XDRIVER/Graph_close.c
  14. 0 375
      display/drivers/XDRIVER/Graph_set.c
  15. 0 10
      display/drivers/XDRIVER/Line_width.c
  16. 0 83
      display/drivers/XDRIVER/Makefile
  17. 0 100
      display/drivers/XDRIVER/Panel.c
  18. 0 47
      display/drivers/XDRIVER/Polydots.c
  19. 0 44
      display/drivers/XDRIVER/Polygon.c
  20. 0 47
      display/drivers/XDRIVER/Polyline.c
  21. 0 80
      display/drivers/XDRIVER/README
  22. 0 161
      display/drivers/XDRIVER/Raster.c
  23. 0 10
      display/drivers/XDRIVER/Respond.c
  24. 0 366
      display/drivers/XDRIVER/Serve_Xevent.c
  25. 0 12
      display/drivers/XDRIVER/Set_window.c
  26. 0 27
      display/drivers/XDRIVER/Work.c
  27. 0 33
      display/drivers/XDRIVER/XDRIVER.h
  28. 0 17
      display/drivers/XDRIVER/alloc.c
  29. 0 84
      display/drivers/XDRIVER/description.html
  30. 0 33
      display/drivers/XDRIVER/icon.bit
  31. 0 33
      display/drivers/XDRIVER/icon.bit.3
  32. 0 33
      display/drivers/XDRIVER/icon.bit.cerl
  33. 0 33
      display/drivers/XDRIVER/icon.bit.grass5
  34. 0 15
      display/drivers/XDRIVER/includes.h
  35. 0 10
      display/drivers/XDRIVER/local_proto.h
  36. 0 27
      display/drivers/XDRIVER/local_vars.h
  37. 0 61
      display/drivers/XDRIVER/main.c
  38. 0 24
      display/drivers/XDRIVER/moncap.entry
  39. 0 32
      display/drivers/description.html

+ 0 - 2
display/Makefile

@@ -39,11 +39,9 @@ SUBDIRS = \
 #	d.what.rast \
 #	d.what.vect \
 #	d.zoom \
-#	drivers
 
 include $(MODULE_TOPDIR)/include/Make/Dir.make
 
 default: parsubdirs
 
-clean: cleansubdirs
 

+ 0 - 29
display/drivers/Makefile

@@ -1,29 +0,0 @@
-
-MODULE_TOPDIR = ../..
-
-SUBDIRS = 
-
-include $(MODULE_TOPDIR)/include/Make/Platform.make
-
-# compile PNGdriver if lib available:
-ifneq ($(HAVE_SOCKET),)
-  SUBDIRS += PNG HTMLMAP PS
-ifneq ($(USE_X11),)
-  SUBDIRS += XDRIVER
-endif
-ifneq ($(USE_CAIRO),)
-  SUBDIRS += cairo
-endif
-endif
-
-include $(MODULE_TOPDIR)/include/Make/Dir.make
-
-default: parsubdirs $(ETC)/monitorcap
-	$(MKDIR) $(GISBASE)/docs/html
-	$(INSTALL_DATA) description.html $(GISBASE)/docs/html/displaydrivers.html
-
-# Touch an empty monitorcap if none exists (e.g. native Windows)
-$(ETC)/monitorcap:
-	if [ ! -f $@ ] ; then touch $@ ; fi
-
-clean: cleansubdirs

+ 0 - 22
display/drivers/XDRIVER/Box.c

@@ -1,22 +0,0 @@
-#include <stdio.h>
-#include "includes.h"
-#include "XDRIVER.h"
-
-void XD_Box_abs(int x1, int y1, int x2, int y2)
-{
-    int tmp;
-
-    if (x1 > x2) {
-	tmp = x1;
-	x1 = x2;
-	x2 = tmp;
-    }
-    if (y1 > y2) {
-	tmp = y1;
-	y1 = y2;
-	y2 = tmp;
-    }
-
-    XFillRectangle(dpy, bkupmap, gc, x1, y1, x2 - x1, y2 - y1);
-    needs_flush = 1;
-}

+ 0 - 49
display/drivers/XDRIVER/Client.c

@@ -1,49 +0,0 @@
-
-#include <unistd.h>
-
-#include "XDRIVER.h"
-#include "includes.h"
-
-#ifdef X11R3
-extern XSizeHints *XAllocSizeHints(void);
-#endif
-
-static XSizeHints *szhints;
-
-static void set_size(int minmax)
-{
-    XWindowAttributes xwa;
-
-    if (!szhints)
-	szhints = XAllocSizeHints();
-
-    if (!XGetWindowAttributes(dpy, grwin, &xwa))
-	return;
-
-    szhints->flags = PSize;
-    szhints->width = xwa.width;
-    szhints->height = xwa.height;
-    szhints->min_width = xwa.width;
-    szhints->min_height = xwa.height;
-    szhints->max_width = xwa.width;
-    szhints->max_height = xwa.height;
-
-    if (minmax)
-	szhints->flags |= PMinSize | PMaxSize;
-
-    XSetWMNormalHints(dpy, grwin, szhints);
-    XFlush(dpy);
-}
-
-void XD_Client_Open(void)
-{
-    set_size(!redraw_pid);
-}
-
-void XD_Client_Close(void)
-{
-    set_size(0);
-    if (redraw_pid)
-	usleep(50000);
-    service_xevent(0);
-}

+ 0 - 30
display/drivers/XDRIVER/Color.c

@@ -1,30 +0,0 @@
-/* Set the GC foreground value to the number passed to color. All
- * subsequent graphics calls will use this number, hence they will be
- * drawn in that color's number.
- * 
- * Called by: Color() in ../lib/Color.c */
-
-#include <stdio.h>
-#include "includes.h"
-#include <grass/colors.h>
-#include <grass/gis.h>
-#include "XDRIVER.h"
-
-int current_color;
-
-void XD_color(int number)
-{
-    if (number >= NCOLORS || number < 0) {
-	G_warning("Color: can't set color %d\n", number);
-	return;
-    }
-
-    current_color = number;
-
-    if (use_visual->class >= TrueColor)
-	current_color = number;
-    else
-	current_color = xpixels[number];
-
-    XSetForeground(dpy, gc, current_color);
-}

+ 0 - 319
display/drivers/XDRIVER/Color_table.c

@@ -1,319 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <grass/gis.h>
-#include "includes.h"
-#include <grass/colors.h>
-#include "XDRIVER.h"
-
-static int Red[256], Grn[256], Blu[256];
-static int Gray[256];
-
-static int r_pos, g_pos, b_pos;
-static int r_size, g_size, b_size;
-static int r_scale, g_scale, b_scale;
-
-static void get_shifts(unsigned mask, int *pos, int *size, int *scale)
-{
-    int i, j;
-
-    for (i = 0; (mask & 1) == 0; i++)
-	mask >>= 1;
-    if (pos)
-	*pos = i;
-
-    for (j = i; (mask & 1) != 0; j++)
-	mask >>= 1;
-    if (size)
-	*size = j - i;
-    if (scale)
-	*scale = 8 - (j - i);
-}
-
-static int get_rgb_shifts(void)
-{
-    get_shifts(use_visual->red_mask, &r_pos, &r_size, &r_scale);
-    get_shifts(use_visual->green_mask, &g_pos, &g_size, &g_scale);
-    get_shifts(use_visual->blue_mask, &b_pos, &b_size, &b_scale);
-
-    return (1 << r_size) * (1 << g_size) * (1 << b_size);
-}
-
-static unsigned long find_color_gray(unsigned int r, unsigned int g,
-				     unsigned int b)
-{
-    unsigned int y = (r + g + b) / 3;
-
-    return xpixels[Gray[y]];
-}
-
-static unsigned long find_color_indexed(unsigned int r, unsigned int g,
-					unsigned int b)
-{
-    return xpixels[Red[r] + Grn[g] + Blu[b]];
-}
-
-static unsigned long find_color_rgb(unsigned int r, unsigned int g,
-				    unsigned int b)
-{
-    unsigned int rr = r >> r_scale;
-    unsigned int gg = g >> g_scale;
-    unsigned int bb = b >> b_scale;
-
-    return (rr << r_pos) + (gg << g_pos) + (bb << b_pos);
-}
-
-unsigned long find_color(unsigned int r, unsigned int g, unsigned int b)
-{
-
-    switch (use_visual->class) {
-    case StaticGray:
-    case GrayScale:
-	return find_color_gray(r, g, b);
-    case StaticColor:
-    case PseudoColor:
-	return find_color_indexed(r, g, b);
-    case TrueColor:
-    case DirectColor:
-	return find_color_rgb(r, g, b);
-    default:
-	G_fatal_error("Unknown visual class %d\n", use_visual->class);
-	return 0;
-    }
-}
-
-static void get_max_levels(int n_colors, int *rr, int *gg, int *bb)
-{
-    int r, g, b, i;
-
-    for (i = 0; i * i * i < n_colors; i++) ;
-
-    for (r = g = b = i;;) {
-	if (r * g * b <= n_colors)
-	    break;
-	b--;
-	if (r * g * b <= n_colors)
-	    break;
-	r--;
-	if (r * g * b <= n_colors)
-	    break;
-	g--;
-    }
-
-    *rr = r;
-    *gg = g;
-    *bb = b;
-}
-
-static int get_fewer_levels(int *rr, int *gg, int *bb)
-{
-    int r = *rr;
-    int g = *gg;
-    int b = *bb;
-
-    /* 888 -> 887 -> 787 -> 777 -> ... */
-
-    if (r > b)			/* 887 -> 787 */
-	r--;
-    else if (g > b)		/* 787 -> 777 */
-	g--;
-    else			/* 888 -> 888 */
-	b--;
-
-    *rr = r;
-    *gg = g;
-    *bb = b;
-
-    return r >= 2 && g >= 2 && b >= 2;
-}
-
-static int try_get_colors(Colormap cmap, int nr, int ng, int nb)
-{
-    XColor xcolor;
-    int n_pixels;
-    int r, g, b;
-
-    xpixels = (unsigned long *)G_realloc(xpixels,
-					 nr * ng * nb *
-					 sizeof(unsigned long));
-    n_pixels = 0;
-
-    xcolor.flags = DoRed | DoGreen | DoBlue;
-
-    for (r = 0; r < nr; r++) {
-	for (g = 0; g < ng; g++) {
-	    for (b = 0; b < nb; b++) {
-		xcolor.red = (unsigned short)(r * 0xFFFF / (nr - 1));
-		xcolor.green = (unsigned short)(g * 0xFFFF / (ng - 1));
-		xcolor.blue = (unsigned short)(b * 0xFFFF / (nb - 1));
-		if (!XAllocColor(dpy, cmap, &xcolor)) {
-		    XFreeColors(dpy, cmap, xpixels, n_pixels, 0);
-		    return 0;
-		}
-
-		xpixels[n_pixels++] = xcolor.pixel;
-	    }
-	}
-    }
-
-    return 1;
-}
-
-static int try_get_grays(Colormap cmap, int ny)
-{
-    XColor xcolor;
-    int n_pixels;
-    int y;
-
-    xpixels = (unsigned long *)G_realloc(xpixels, ny * sizeof(unsigned long));
-    n_pixels = 0;
-
-    xcolor.flags = DoRed | DoGreen | DoBlue;
-
-    for (y = 0; y < ny; y++) {
-	unsigned short v = (unsigned short)(y * 0xFFFF / (ny - 1));
-
-	xcolor.red = v;
-	xcolor.green = v;
-	xcolor.blue = v;
-	if (!XAllocColor(dpy, cmap, &xcolor)) {
-	    XFreeColors(dpy, cmap, xpixels, n_pixels, 0);
-	    return y;
-	}
-
-	xpixels[n_pixels++] = xcolor.pixel;
-    }
-
-    return ny;
-}
-
-static Colormap ramp_colormap(void)
-{
-    int n_colors = use_visual->map_entries;
-    Colormap cmap = XCreateColormap(dpy, RootWindow(dpy, scrn),
-				    use_visual, AllocAll);
-    int i;
-
-    for (i = 0; i < n_colors; i++) {
-	int k = i * 65535 / (n_colors - 1);
-	int l = i * 255 / (n_colors - 1);
-	XColor xcolor;
-
-	xcolor.flags = DoRed | DoGreen | DoBlue;
-	xcolor.blue = k;
-	xcolor.green = k;
-	xcolor.red = k;
-	xcolor.pixel = find_color_rgb(l, l, l);
-
-	XStoreColor(dpy, cmap, &xcolor);
-    }
-
-    return cmap;
-}
-
-Colormap init_color_table(Colormap cmap)
-{
-    int n_colors = use_visual->map_entries;
-    int r, g, b, y, i;
-
-    switch (use_visual->class) {
-    case GrayScale:
-    case PseudoColor:
-	truecolor = 0;
-	break;
-    case StaticGray:
-    case StaticColor:
-    case TrueColor:
-    case DirectColor:
-	truecolor = 1;
-	break;
-    }
-
-    switch (use_visual->class) {
-    case StaticGray:
-    case GrayScale:
-	/* determine how many levels of gray we can actually get */
-	y = try_get_grays(cmap, n_colors);
-	if (y > 2 && y < n_colors)
-	    y = try_get_grays(cmap, y);
-	if (y < 2)
-	    G_fatal_error("Unable to get sufficient gray shades\n");
-
-	NCOLORS = y;
-
-	for (i = 0; i < 256; i++)
-	    Gray[i] = i * y / 256;
-
-	break;
-
-    case StaticColor:
-    case PseudoColor:
-	/* determine how many levels of r, g, and b are possible */
-	get_max_levels(n_colors, &r, &g, &b);
-
-	/* now see how many we can actually get */
-	while (!try_get_colors(cmap, r, g, b))
-	    if (!get_fewer_levels(&r, &g, &b))
-		G_fatal_error("Unable to get sufficient colors\n");
-
-	NCOLORS = r * g * b;
-
-	for (i = 0; i < 256; i++) {
-	    Red[i] = (i * r / 256) * g * b;
-	    Grn[i] = (i * g / 256) * b;
-	    Blu[i] = (i * b / 256);
-	}
-
-	break;
-
-    case DirectColor:
-	G_warning("Using private colormap for DirectColor visual\n");
-
-	/* free any previously-allocated Colormap */
-	if (cmap != DefaultColormap(dpy, scrn))
-	    XFreeColormap(dpy, cmap);
-
-	/* get shift factors for R,G,B masks */
-	NCOLORS = get_rgb_shifts();
-
-	/* create colormap (emulates TrueColor visual) */
-	cmap = ramp_colormap();
-	break;
-
-    case TrueColor:
-	/* get shift factors for R,G,B masks */
-	NCOLORS = get_rgb_shifts();
-	break;
-
-    default:
-	G_fatal_error("Unknown visual class %d\n", use_visual->class);
-	break;
-    }
-
-    return cmap;
-}
-
-
-int XD_lookup_color(int r, int g, int b)
-{
-    switch (use_visual->class) {
-    case StaticGray:
-    case GrayScale:
-	return Gray[(r + g + b) / 3];
-	break;
-
-    case StaticColor:
-    case PseudoColor:
-	return Red[r] + Grn[g] + Blu[b];
-	break;
-
-    case DirectColor:
-    case TrueColor:
-	return find_color_rgb(r, g, b);
-	break;
-
-    default:
-	G_fatal_error("Unknown visual class %d\n", use_visual->class);
-	return 0;
-	break;
-    }
-}

+ 0 - 56
display/drivers/XDRIVER/Draw_bitmap.c

@@ -1,56 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <grass/gis.h>
-#include "includes.h"
-#include "XDRIVER.h"
-
-void XD_draw_bitmap(int ncols, int nrows, int threshold,
-		    const unsigned char *array)
-{
-    static GC and_gc, or_gc;
-    static int have_gcs;
-    XImage *grimage;
-    XWindowAttributes xwa;
-    int bytes_per_line = (ncols + 7) / 8;
-    int bytes = bytes_per_line * nrows;
-    unsigned char *data = G_malloc(bytes);
-    int i, j;
-
-    if (!XGetWindowAttributes(dpy, grwin, &xwa))
-	return;
-
-    if (!have_gcs) {
-	XGCValues new;
-
-	new.background = ~0UL;
-	new.foreground = 0UL;
-	new.function = GXand;
-	and_gc =
-	    XCreateGC(dpy, grwin, GCForeground | GCBackground | GCFunction,
-		      &new);
-
-	new.background = 0UL;
-	new.function = GXor;
-	or_gc = XCreateGC(dpy, grwin, GCBackground | GCFunction, &new);
-
-	have_gcs = 1;
-    }
-
-    grimage = XCreateImage(dpy, xwa.visual, 1, XYBitmap,
-			   0, data, ncols, nrows, 8, bytes_per_line);
-
-    for (j = 0; j < nrows; j++)
-	for (i = 0; i < ncols; i++)
-	    XPutPixel(grimage, i, j,
-		      array[j * ncols + i] > threshold ? 1 : 0);
-
-    XPutImage(dpy, bkupmap, and_gc, grimage, 0, 0, cur_x, cur_y, ncols,
-	      nrows);
-
-    XSetForeground(dpy, or_gc, current_color);
-    XPutImage(dpy, bkupmap, or_gc, grimage, 0, 0, cur_x, cur_y, ncols, nrows);
-
-    XDestroyImage(grimage);
-
-    needs_flush = 1;
-}

+ 0 - 8
display/drivers/XDRIVER/Draw_line.c

@@ -1,8 +0,0 @@
-#include "includes.h"
-/* draw a line between two given points in the current color. X version */
-
-void XD_draw_line(int cur_x, int cur_y, int x, int y)
-{
-    XDrawLine(dpy, bkupmap, gc, cur_x, cur_y, x, y);
-    needs_flush = 1;
-}

+ 0 - 8
display/drivers/XDRIVER/Draw_point.c

@@ -1,8 +0,0 @@
-#include "includes.h"
-/* draw a point in the current color. X version */
-
-void XD_draw_point(int x, int y)
-{
-    XDrawPoint(dpy, bkupmap, gc, x, y);
-    needs_flush = 1;
-}

+ 0 - 118
display/drivers/XDRIVER/Get_w_box.c

@@ -1,118 +0,0 @@
-/* Using mouse device, get a new screen coordinate and button number.
- * Button numbers must be the following values which correspond to the
- * following software meanings: 1 - left button 2 - middle button 3 -
- * right button
- * 
- * This is called directly by the application programs.
- * 
- * A "rubberband" line is used.  One end is fixed at the (cx, cy)
- * coordinate. The opposite end starts out at (*nx, *ny) and then
- * tracks the mouse. Upon button depression, the current coordinate is
- * returned in (*nx, *ny) and the button pressed in returned in
- * *button. */
-
-#include <grass/gis.h>
-#include "includes.h"
-#include <grass/glocale.h>
-
-int XD_Get_location_with_box(int cx, int cy,	/* current x and y */
-			     int *nx, int *ny,	/* new x and y */
-			     int *button)
-{
-    int drawn = 0;
-    long event_mask;
-    unsigned width, height, oldwidth, oldheight;
-    int oldx, oldy;
-    XEvent event;
-    int leftx, topy;
-    GC xor_gc;
-    XGCValues gcValues;
-    unsigned gcMask;
-    int done;
-
-    if (redraw_pid) {
-	G_warning(_("Monitor: interactive command in redraw"));
-	return -1;
-    }
-
-    G_debug(5, "Get_location_with_box()");
-
-    /* Get events that track the pointer to resize the RubberBox until
-     * ButtonReleased */
-    event_mask = ButtonPressMask | PointerMotionMask;
-    XSelectInput(dpy, grwin, event_mask);
-
-    /* XOR, so double drawing returns pixels to original state */
-    gcMask = GCFunction | GCPlaneMask | GCForeground | GCLineWidth;
-    gcValues.function = GXxor;
-    gcValues.line_width = 1;
-    gcValues.plane_mask = BlackPixel(dpy, scrn) ^ WhitePixel(dpy, scrn);
-    gcValues.foreground = 0xffffffff;
-    xor_gc = XCreateGC(dpy, grwin, gcMask, &gcValues);
-
-    /* Set the crosshair cursor */
-    XDefineCursor(dpy, grwin, cur_xh);
-
-    for (done = 0; !done;) {
-	if (!get_xevent(event_mask, &event))
-	    break;
-
-	switch (event.type) {
-	case ButtonPress:
-	    *button = event.xbutton.button;
-	    *nx = event.xbutton.x;
-	    *ny = event.xbutton.y;
-	    done = 1;
-	    break;
-
-	case MotionNotify:
-	    *nx = event.xbutton.x;
-	    *ny = event.xbutton.y;
-	    /* do a double draw to 'erase' previous rectangle */
-	    if (drawn)
-		XDrawRectangle(dpy, grwin, xor_gc, oldx, oldy, oldwidth,
-			       oldheight);
-	    /* need to draw a rectangle with (cx,cy) as one corner and
-	     * (*nx,*ny) as opposite corner. Figure the top left coords
-	     * of such a rectangle */
-	    if (cx < *nx) {
-		leftx = cx;
-		width = *nx - cx;
-	    }
-	    else {
-		leftx = *nx;
-		width = cx - *nx;
-	    }
-	    if (cy < *ny) {
-		topy = cy;
-		height = *ny - cy;
-	    }
-	    else {
-		topy = *ny;
-		height = cy - *ny;
-	    }
-	    /* don't draw a zero volume rectangle */
-	    if (width && height) {
-		XDrawRectangle(dpy, grwin, xor_gc, leftx, topy, width,
-			       height);
-		oldwidth = width;
-		oldheight = height;
-		oldx = leftx;
-		oldy = topy;
-		drawn = 1;
-	    }
-	    else
-		drawn = 0;
-	    break;
-	}
-    }
-
-    if (drawn)
-	XDrawRectangle(dpy, grwin, xor_gc, oldx, oldy, oldwidth, oldheight);
-    drawn = 0;
-    XUndefineCursor(dpy, grwin);	/* reset cursor */
-    XSelectInput(dpy, grwin, gemask);	/* restore normal events */
-    XFreeGC(dpy, xor_gc);
-
-    return 0;
-}

+ 0 - 92
display/drivers/XDRIVER/Get_w_line.c

@@ -1,92 +0,0 @@
-/* Using mouse device, get a new screen coordinate and button number.
- * Button numbers must be the following values which correspond to the
- * following software meanings: 1 - left button 2 - middle button 3 -
- * right button
- * 
- * This is called directly by the application programs.
- * 
- * A "rubberband" line is used.  One end is fixed at the (cx, cy)
- * coordinate. The opposite end starts out at (*nx, *ny) and then
- * tracks the mouse. Upon button depression, the current coordinate is
- * returned in (*nx, *ny) and the button pressed in returned in
- * *button. */
-
-#include <grass/gis.h>
-#include "includes.h"
-#include <grass/glocale.h>
-
-/* Returns: -1  error
- *            0
- */
-int XD_Get_location_with_line(int cx, int cy,	/* current x and y */
-			      int *nx, int *ny,	/* new x and y */
-			      int *button)
-{
-    int drawn = 0;
-    long event_mask;
-    int oldx, oldy;
-    XEvent event;
-    GC xor_gc;
-    XGCValues gcValues;
-    unsigned gcMask;
-    int done;
-
-    if (redraw_pid) {
-	G_warning(_("Monitor: interactive command in redraw"));
-	return -1;
-    }
-
-    G_debug(5, "Get_location_with_line()");
-
-    /* Get events that track the pointer to resize the RubberBox until
-     * ButtonReleased */
-    event_mask = ButtonPressMask | PointerMotionMask;
-    XSelectInput(dpy, grwin, event_mask);
-
-    /* XOR, so double drawing returns pixels to original state */
-    gcMask = GCFunction | GCPlaneMask | GCForeground | GCLineWidth;
-    gcValues.function = GXxor;
-    gcValues.line_width = 1;
-    gcValues.plane_mask = BlackPixel(dpy, scrn) ^ WhitePixel(dpy, scrn);
-    gcValues.foreground = 0xffffffff;
-    xor_gc = XCreateGC(dpy, grwin, gcMask, &gcValues);
-
-    /* Set the crosshair cursor */
-    XDefineCursor(dpy, grwin, cur_xh);
-
-    for (done = 0; !done;) {
-	if (!get_xevent(event_mask, &event))
-	    break;
-
-	switch (event.type) {
-	case ButtonPress:
-	    *button = event.xbutton.button;
-	    *nx = event.xbutton.x;
-	    *ny = event.xbutton.y;
-	    done = 1;
-	    break;
-
-	case MotionNotify:
-	    *nx = event.xbutton.x;
-	    *ny = event.xbutton.y;
-	    /* do a double draw to 'erase' previous rectangle */
-	    if (drawn)
-		XDrawLine(dpy, grwin, xor_gc, cx, cy, oldx, oldy);
-	    XDrawLine(dpy, grwin, xor_gc, cx, cy, *nx, *ny);
-	    oldx = *nx;
-	    oldy = *ny;
-	    drawn = 1;
-	    break;
-	}
-    }
-
-    /* delete old line if any */
-    if (drawn)
-	XDrawLine(dpy, grwin, xor_gc, cx, cy, oldx, oldy);
-    drawn = 0;
-    XUndefineCursor(dpy, grwin);	/* reset cursor */
-    XSelectInput(dpy, grwin, gemask);	/* restore normal events */
-    XFreeGC(dpy, xor_gc);
-
-    return 0;
-}

+ 0 - 49
display/drivers/XDRIVER/Get_w_pointer.c

@@ -1,49 +0,0 @@
-/* Using mouse device, get a new screen coordinate and button number.
- * Button numbers must be the following values which correspond to the
- * following software meanings: 1 - left button 2 - middle button 3 -
- * right button
- * 
- * This is called directly by the application programs.
- * 
- * A "pointing hand" pointer is used. Upon button depression, the current
- * coordinate is returned in (*wx, *wy) and the button pressed in
- * returned in *button. */
-
-#include <grass/gis.h>
-#include "includes.h"
-#include <grass/glocale.h>
-
-int XD_Get_location_with_pointer(int *wx, int *wy, int *button)
-{
-    XEvent bpevent;
-
-    if (redraw_pid) {
-	G_warning(_("Monitor: interactive command in redraw"));
-	return -1;
-    }
-
-    G_debug(5, "Get_location_with_pointer()");
-
-    /* set the grass cursor on (defined in Graph_Set.c) */
-    XDefineCursor(dpy, grwin, cur_xh);
-
-    /* wait for a button-push event in the grass window, and return the
-     * x,y coord and button number */
-
-    XSelectInput(dpy, grwin, ButtonPressMask | PointerMotionMask);
-
-    do {
-	if (!get_xevent(ButtonPressMask, &bpevent))
-	    break;
-    } while (bpevent.type != ButtonPress);
-
-    XSelectInput(dpy, grwin, gemask);
-
-    *wx = bpevent.xbutton.x;
-    *wy = bpevent.xbutton.y;
-    *button = bpevent.xbutton.button;
-
-    XUndefineCursor(dpy, grwin);
-
-    return 0;
-}

+ 0 - 10
display/drivers/XDRIVER/Graph_close.c

@@ -1,10 +0,0 @@
-/* Close down the graphics processing.  This gets called only at driver
- * termination time. */
-
-#include "includes.h"
-
-void XD_Graph_close(void)
-{
-    XFreePixmap(dpy, bkupmap);
-    XDestroyWindow(dpy, grwin);
-}

+ 0 - 375
display/drivers/XDRIVER/Graph_set.c

@@ -1,375 +0,0 @@
-
-/* Changed for truecolor 24bit support by
- * Roberto Flor/ITC-Irst, Trento, Italy
- * August 1999
- *
- * Heavily modified by Glynn Clements, May 2001
- */
-
-#include <grass/config.h>
-
-/* This driver extensively updated by P. Thompson
- * (phils@athena.mit.edu) on 9/13/90 Driver modified to work with
- * Decstation X11r3 by David B. Satnik on 8/90 */
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
-#include "includes.h"
-#include <X11/Xatom.h>
-#include <X11/cursorfont.h>
-#include <grass/gis.h>
-#include "icon.bit"
-#include <grass/winname.h>
-#include <grass/glocale.h>
-#include "XDRIVER.h"
-
-/* This program is a rewrite of the original Grah_Set from the GRASS
- * 3.0 version. All suncore and sunview related stuff (which was the
- * bulk of the original code) has been replaced by X11 library calls.
- * All non-suncore code has been retained. */
-
-/* declare global variables */
-
-const char *monitor_name;
-
-Display *dpy;
-Window grwin;
-
-Visual *use_visual;
-int use_bit_depth;
-
-int scrn;
-Screen *use_screen;
-GC gc;
-Colormap fixedcmap;
-Cursor cur_xh, cur_clock;
-u_long gemask = StructureNotifyMask;
-Pixmap bkupmap;
-int truecolor;
-
-int external_window;
-
-unsigned long *xpixels;		/* lookup table for FIXED color mode */
-
-#ifdef X11R3
-
-/* compatibility functions for X11R3 */
-
-static Status
-XSetWMProtocols(Display * dpy, Window w, Atom * protocols, int count)
-{
-    Atom wmProtocols;
-
-    wmProtocols = XInternAtom(dpy, "WM_PROTOCOLS", False);
-    if (!wmProtocols)
-	return 0;
-
-    XChangeProperty(dpy, w, wmProtocols, XA_ATOM, 32, PropModeReplace,
-		    (unsigned char *)protocols, count);
-    return 1;
-}
-
-XSizeHints *XAllocSizeHints(void)
-{
-    return (XSizeHints *) G_malloc(sizeof(XSizeHints));
-}
-
-XWMHints *XAllocWMHints(void)
-{
-    return (XWMHints *) G_malloc(sizeof(XWMHints));
-}
-
-XClassHint *XAllocClassHint(void)
-{
-    return (XClassHint *) G_malloc(sizeof(XClassHint));
-}
-
-#endif
-
-static RETSIGTYPE sigint(int sig)
-{
-    XD_Graph_close();
-    exit(1);
-}
-
-static void find_truecolor_visual(void)
-{
-    static int search_mask = VisualClassMask | VisualScreenMask;
-    XVisualInfo search_template;
-    XVisualInfo *mvisual_info;
-    int num_visuals;
-    int vis_num;
-    int highest_bit_depth = 0;
-
-    search_template.class = TrueColor;
-    search_template.screen = scrn;
-
-    mvisual_info =
-	XGetVisualInfo(dpy, search_mask, &search_template, &num_visuals);
-
-    G_message(_("found %d visuals of type TrueColor"), num_visuals);
-
-    G_message(_("searching for highest bit depth"));
-
-    for (vis_num = 0; vis_num < num_visuals; vis_num++) {
-	if (mvisual_info[vis_num].depth <= highest_bit_depth)
-	    continue;
-
-	use_visual = mvisual_info[vis_num].visual;
-	use_bit_depth = mvisual_info[vis_num].depth;
-	highest_bit_depth = use_bit_depth;
-    }
-
-    XFree(mvisual_info);
-
-    if (highest_bit_depth == 0)
-	G_warning("unable to find a TrueColor visual\n");
-    else
-	G_message(_("selected %d bit depth"), use_bit_depth);
-}
-
-static void use_window(int win_id)
-{
-    XWindowAttributes xwa;
-
-    external_window = 1;
-
-    grwin = (Window) win_id;
-    XSelectInput(dpy, grwin, gemask);
-
-    if (!XGetWindowAttributes(dpy, grwin, &xwa))
-	G_fatal_error("Graph_Set: cannot get window attributes\n");
-
-    use_screen = xwa.screen;
-    scrn = XScreenNumberOfScreen(xwa.screen);
-
-    use_visual = xwa.visual;
-
-    use_bit_depth = xwa.depth;
-}
-
-static void create_window(int argc, char **argv)
-{
-    static const char *const classname[6] = {
-	"StaticGray", "GrayScale",
-	"StaticColor", "PseudoColor",
-	"TrueColor", "DirectColor"
-    };
-    XSetWindowAttributes xswa;	/* Set Window Attribute struct */
-    Atom closedownAtom;
-
-#ifndef X11R3
-    XTextProperty windowName, iconName;
-#endif /* X11R3 */
-    XSizeHints *szhints;
-    XClassHint *clshints;
-    XWMHints *wmhints;
-    char title[1024];
-    char *p;
-
-    external_window = 0;
-
-    /* scrn is the screen number */
-    scrn = DefaultScreen(dpy);
-    /* use_screen is a pointer to that screen structure */
-    use_screen = ScreenOfDisplay(dpy, scrn);
-
-    use_visual = NULL;
-
-    /* special flag to indicate a search for a True Color Display */
-    p = getenv("XDRIVER_TRUECOLOR");
-    if (p && strcmp(p, "TRUE") == 0)
-	find_truecolor_visual();
-
-    /*  If we can't find a TrueColor visual then use the default visual     */
-    if (!use_visual) {
-	use_visual = DefaultVisual(dpy, scrn);
-	use_bit_depth = DefaultDepth(dpy, scrn);
-	G_message(_("using default visual which is %s"),
-		  classname[use_visual->class]);
-    }
-
-    /* Deal with providing the window with an initial size.
-     * Window is resizable */
-    szhints = XAllocSizeHints();
-
-    szhints->flags = USSize;
-    szhints->height = screen_bottom - screen_top;
-    szhints->width = screen_right - screen_left;
-
-    /* Create the Window with the information in the XSizeHints */
-
-    xswa.event_mask = gemask;
-    xswa.backing_store = NotUseful;
-
-    grwin = XCreateWindow(dpy, RootWindow(dpy, scrn),
-			  0, 0,
-			  (unsigned)szhints->width,
-			  (unsigned)szhints->height,
-			  0,
-			  use_bit_depth,
-			  InputOutput,
-			  use_visual, (CWEventMask | CWBackingStore), &xswa);
-
-    /* properties for window manager */
-    wmhints = XAllocWMHints();
-    wmhints->icon_pixmap = XCreateBitmapFromData(dpy, grwin, icon_bits,
-						 icon_width, icon_height);
-    wmhints->flags |= IconPixmapHint;
-
-    clshints = XAllocClassHint();
-    clshints->res_name = NULL;
-    clshints->res_class = WIN_NAME;
-
-#ifndef X11R3
-    sprintf(title, "GRASS %s - Monitor: %s - Location: %s", WIN_NAME,
-	    monitor_name, G_location());
-
-    iconName.encoding = XA_STRING;
-    iconName.format = 8;
-    iconName.value = (u_char *) title;
-    iconName.nitems = strlen((char *)iconName.value);
-
-    windowName.encoding = iconName.encoding = XA_STRING;
-    windowName.format = iconName.format = 8;
-    windowName.value = (u_char *) title;
-    windowName.nitems = strlen((char *)windowName.value);
-
-    XSetWMProperties(dpy, grwin, &windowName, &iconName, argv, argc,
-		     szhints, wmhints, clshints);
-#endif
-
-    closedownAtom = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
-    XSetWMProtocols(dpy, grwin, &closedownAtom, 1);
-
-    /* Map the window to make it visible. This causes an expose event */
-    XMapWindow(dpy, grwin);
-}
-
-static Cursor create_cross_cursor(void)
-{
-    static int width = 16;
-    static int height = 16;
-    static int x0 = 7;
-    static int y0 = 7;
-
-    /* Old cursor */
-    /*
-       static const unsigned char pix_data[] = {
-       0x00, 0x00, 0xa0, 0x02, 0xa0, 0x02, 0xa0, 0x02,
-       0xa0, 0x02, 0xbe, 0x3e, 0x80, 0x00, 0x7e, 0x3f,
-       0x80, 0x00, 0xbe, 0x3e, 0xa0, 0x02, 0xa0, 0x02,
-       0xa0, 0x02, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00
-       };
-       static const unsigned char mask_data[] = {
-       0x00, 0x00, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03,
-       0xe0, 0x03, 0xfe, 0x3f, 0xfe, 0x3f, 0x7e, 0x3f,
-       0xfe, 0x3f, 0xfe, 0x3f, 0xe0, 0x03, 0xe0, 0x03,
-       0xe0, 0x03, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00
-       };
-     */
-    static const unsigned char pix_data[] = {
-	0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x7c,
-	0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00,
-	0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00
-    };
-    static const unsigned char mask_data[] = {
-	0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
-	0xc0, 0x01, 0x00, 0x00, 0x1f, 0x7c, 0x1f, 0x7c,
-	0x1f, 0x7c, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01,
-	0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00,
-    };
-    Pixmap pix, mask;
-    XColor fg, bg;
-
-    fg.pixel = BlackPixel(dpy, scrn);
-    XQueryColor(dpy, fixedcmap, &fg);
-
-    bg.pixel = WhitePixel(dpy, scrn);
-    XQueryColor(dpy, fixedcmap, &bg);
-
-    pix = XCreateBitmapFromData(dpy, grwin, pix_data, width, height);
-    mask = XCreateBitmapFromData(dpy, grwin, mask_data, width, height);
-
-    return XCreatePixmapCursor(dpy, pix, mask, &fg, &bg, x0, y0);
-}
-
-int XD_Graph_set(int argc, char **argv)
-{
-    XWindowAttributes xwa;	/* Get Window Attribute struct */
-    const char *privcmap;
-    char *p;
-    int win_id;
-
-    monitor_name = argv[1];
-
-    /* Open the display using the $DISPLAY environment variable to
-     * locate the X server. Return 0 if cannot open. */
-    if (!(dpy = XOpenDisplay(NULL)))
-	G_fatal_error("Graph_Set: can't open Display %s\n",
-		      XDisplayName(NULL));
-
-    privcmap = getenv("XDRIVER_PRIVATE_CMAP");
-
-    if ((p = getenv("XDRIVER_WINDOW")) && sscanf(p, "%i", &win_id) == 1)
-	use_window(win_id);
-    else
-	create_window(argc, argv);
-
-    /* this next bit forces the use of a private colormap                */
-    /* a must have for read only visuals                                 */
-    /* since we could allow any type to be selected above assume that    */
-    /* if this is not the default visual we must use a private colormap  */
-
-    if (use_visual != DefaultVisual(dpy, scrn) || (privcmap && privcmap[0]))
-	fixedcmap = XCreateColormap(dpy, DefaultRootWindow(dpy),
-				    use_visual, AllocNone);
-    else
-	fixedcmap = DefaultColormap(dpy, scrn);
-
-    fixedcmap = init_color_table(fixedcmap);
-
-    G_message("ncolors: %d", NCOLORS);
-
-    XSetWindowColormap(dpy, grwin, fixedcmap);
-
-    /* Create the cursors to be used later */
-
-    cur_xh = create_cross_cursor();
-    cur_clock = XCreateFontCursor(dpy, XC_watch);
-
-    /* Create the GC. */
-    gc = XCreateGC(dpy, grwin, 0UL, NULL);
-
-    /* Find out how big the window really is (in case window manager
-     * overrides our request) and set the SCREEN values. */
-    screen_left = screen_top = 0;
-    if (!XGetWindowAttributes(dpy, grwin, &xwa))
-	G_fatal_error("Graph_Set: cannot get window attributes\n");
-
-    screen_right = xwa.width;
-    screen_bottom = xwa.height;
-
-    /* Now create a pixmap that will contain same contents as the
-     * window. It will be used to redraw from after expose events */
-    bkupmap = XCreatePixmap(dpy, grwin, xwa.width, xwa.height, xwa.depth);
-    XSetWindowBackgroundPixmap(dpy, grwin, bkupmap);
-    XSetForeground(dpy, gc, WhitePixel(dpy, scrn));
-    XFillRectangle(dpy, bkupmap, gc, 0, 0, xwa.width, xwa.height);
-
-    XSetBackground(dpy, gc, BlackPixel(dpy, scrn));
-    XSetForeground(dpy, gc, WhitePixel(dpy, scrn));
-
-    XClearWindow(dpy, grwin);
-
-    /* prepare to catch signals */
-    signal(SIGHUP, sigint);
-    signal(SIGINT, sigint);
-    signal(SIGQUIT, sigint);
-    signal(SIGILL, sigint);
-    signal(SIGTSTP, SIG_IGN);
-
-    XFlush(dpy);
-    return 0;
-}

+ 0 - 10
display/drivers/XDRIVER/Line_width.c

@@ -1,10 +0,0 @@
-#include "includes.h"
-
-void XD_Line_width(int width)
-{
-    XGCValues gc_values;
-
-    gc_values.line_width = (width < 0 ? 0 : width);
-    gc_values.cap_style = CapRound;
-    XChangeGC(dpy, gc, GCLineWidth | GCCapStyle, &gc_values);
-}

+ 0 - 83
display/drivers/XDRIVER/Makefile

@@ -1,83 +0,0 @@
-
-MODULE_TOPDIR = ../../..
-
-PGM=xdriver
-
-include $(MODULE_TOPDIR)/include/Make/Platform.make
-include $(MODULE_TOPDIR)/include/Make/Grass.make
-include $(MODULE_TOPDIR)/include/Make/Rules.make
-
-LIBES = $(DRIVERLIB) $(GISLIB) $(FTLIB) $(ICONVLIB)
-DEPENDENCIES = $(DRIVERDEP) $(GISDEP)
-
-# if you are compiling under X11R3 add this define
-#R3DEFINE=-DX11R3
-# and comment out this line
-R3DEFINE=
-
-# For those compiling on Intergraph machines, uncomment the following 2 lines:
-#XCFLAGS=-DINTERGRAPH -DX11R3
-
-# these are for the CDC mips machine
-#XCFLAGS=-systype bsd43
-#XLDFLAGS=-systype bsd43
-
-# One user reported that he had to load -lsockstub for SCO-UNIX under X11R3
-# we record his comment here for anyone that may have problems under SCO-UNIX
-# This problem was NOT reported when CWU did the port to SCO-UNIX
-#XEXTRALIBS=-lsockstub
-
-# On the Silcon Graphics Boxes, the standard XOpenDisplay() fails when
-# trying to display to another machine if the machine is named on
-# the DISPLAY variable instead of it IP address. Loading the -lsun
-# library resolves this problem
-#XEXTRALIBS=-lsun
-
-EXTRA_CFLAGS=$(XCFLAGS) $(R3DEFINE) -I../../../lib/driver
-
-OBJS =  \
-	Box.o\
-	Client.o\
-	Color_table.o\
-	Color.o\
-	Draw_bitmap.o\
-	Draw_line.o\
-	Draw_point.o\
-	Get_w_box.o\
-	Get_w_line.o\
-	Get_w_pointer.o\
-	Graph_close.o\
-	Graph_set.o\
-	Line_width.o\
-	Panel.o\
-	Polydots.o\
-	Polygon.o\
-	Polyline.o\
-	Raster.o\
-	Respond.o\
-	Serve_Xevent.o\
-	Set_window.o\
-	Work.o\
-	alloc.o\
-	main.o
-
-ARCH_OBJS := $(foreach obj,$(OBJS),OBJ.$(ARCH)/$(obj))
-
-#FREETYPEBASED = Draw_point.o
-#compile if FreeType Lib present:
-#ifneq ($(strip $(FTLIB)),)
-#    OBJS += $(FREETYPEBASED)
-#endif
-
-default: $(DRIVERDIR)/XDRIVER $(HTMLDIR)/$(PGM).html moncap
-
-moncap:
-	@if [ -f $(ETC)/monitorcap ] && egrep '^x0' $(ETC)/monitorcap >/dev/null 2>&1 ; then \
-	echo XDRIVER already defined in $(ETC)/monitorcap ; \
-	else \
-	echo adding XDRIVER to $(ETC)/monitorcap ; \
-	cat moncap.entry >> $(ETC)/monitorcap ; \
-	fi
-
-$(DRIVERDIR)/XDRIVER: $(ARCH_OBJS) $(DEPENDENCIES)
-	$(CC) $(LDFLAGS) -o $@ $(XLDFLAGS) $(LIBPATH) $(ARCH_OBJS) $(LIBES) $(XLIBPATH) $(XLIB) $(XEXTRALIBS) $(MATHLIB) $(XDRLIB)

+ 0 - 100
display/drivers/XDRIVER/Panel.c

@@ -1,100 +0,0 @@
-#include <grass/gis.h>
-#include "includes.h"
-
-#include <stdio.h>
-
-void XD_Panel_save(const char *name, int top, int bottom, int left, int right)
-{
-    Pixmap pix;
-    Window root;
-    int dummy;
-    unsigned int depth;
-    FILE *fp;
-    int width, height;
-
-    /* Adjust panel edges if outside window necessary */
-    if (top < screen_top)
-	top = screen_top;
-    if (bottom > screen_bottom)
-	bottom = screen_bottom;
-    if (left < screen_left)
-	left = screen_left;
-    if (right > screen_right)
-	right = screen_right;
-
-    height = bottom - top;
-    width = right - left;
-
-    if (!XGetGeometry
-	(dpy, bkupmap, &root, &dummy, &dummy, &dummy, &dummy, &dummy,
-	 &depth)) {
-	perror("Panel_Save: cannot get depth");
-	return;
-    }
-
-    pix = XCreatePixmap(dpy, bkupmap, width, height, depth);
-    XCopyArea(dpy, bkupmap, pix, gc, left, top, width, height, 0, 0);
-
-    /* open the file */
-    fp = fopen(name, "w");
-    if (!fp) {
-	perror("unable to create panel file");
-	return;
-    }
-
-    fprintf(fp, "%lx %d %d %d %d\n", (unsigned long)pix, left, top, width,
-	    height);
-    fclose(fp);
-}
-
-void XD_Panel_restore(const char *name)
-{
-    FILE *fp;
-    unsigned long pix;
-    int top, left, width, height;
-
-    fp = fopen(name, "r");
-    if (!fp) {
-	perror("unable to open panel file");
-	return;
-    }
-
-    if (fscanf(fp, "%lx %d %d %d %d", &pix, &left, &top, &width, &height) !=
-	5) {
-	G_warning("error reading panel file");
-	fclose(fp);
-	return;
-    }
-
-    fclose(fp);
-
-    XCopyArea(dpy, (Pixmap) pix, bkupmap, gc, 0, 0, width, height, left, top);
-
-    needs_flush = 1;
-}
-
-void XD_Panel_delete(const char *name)
-{
-    FILE *fp = NULL;
-    unsigned long pix = 0;
-
-    fp = fopen(name, "r");
-    if (!fp) {
-	perror("unable to open panel file");
-	goto done;
-    }
-
-    if (fscanf(fp, "%lx", &pix) != 1) {
-	G_warning("error reading panel file");
-	goto done;
-    }
-
-  done:
-    if (fp)
-	fclose(fp);
-
-    if (pix)
-	XFreePixmap(dpy, (Pixmap) pix);
-
-    remove(name);
-}

+ 0 - 47
display/drivers/XDRIVER/Polydots.c

@@ -1,47 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "includes.h"
-#include "XDRIVER.h"
-
-void XD_Polydots_abs(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    for (i = 0; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-    }
-
-    XDrawPoints(dpy, bkupmap, gc, xpnts, number, CoordModeOrigin);
-    cur_x = xpnts[number - 1].x;
-    cur_y = xpnts[number - 1].y;
-    needs_flush = 1;
-}
-
-void XD_Polydots_rel(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    xpnts[0].x = (short)(xarray[0] + cur_x);
-    xpnts[0].y = (short)(yarray[0] + cur_y);
-    cur_x = xpnts[0].x;
-    cur_y = xpnts[0].y;
-
-    for (i = 1; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-	cur_x += xpnts[i].x;
-	cur_y += xpnts[i].y;
-    }
-
-    XDrawLines(dpy, bkupmap, gc, xpnts, number, CoordModePrevious);
-    needs_flush = 1;
-}

+ 0 - 44
display/drivers/XDRIVER/Polygon.c

@@ -1,44 +0,0 @@
-#include "includes.h"
-#include "XDRIVER.h"
-
-/* A polygon is drawn using the current color.  It has "number"
- * verticies which are found in the absolute coordinate pairs
- * represented in the "xarray" and "yarray" arrays.  NOTE: Cursor
- * location is NOT updated in Polygon_rel(). */
-
-void XD_Polygon_abs(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    for (i = 0; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-    }
-
-    XFillPolygon(dpy, bkupmap, gc, xpnts, number, Complex, CoordModeOrigin);
-    needs_flush = 1;
-}
-
-void XD_Polygon_rel(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    xpnts[0].x = (short)(xarray[0] + cur_x);
-    xpnts[0].y = (short)(yarray[0] + cur_y);
-
-    for (i = 1; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-    }
-
-    XFillPolygon(dpy, bkupmap, gc, xpnts, number, Complex, CoordModePrevious);
-    needs_flush = 1;
-}

+ 0 - 47
display/drivers/XDRIVER/Polyline.c

@@ -1,47 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "includes.h"
-#include "XDRIVER.h"
-
-void XD_Polyline_abs(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    for (i = 0; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-    }
-
-    XDrawLines(dpy, bkupmap, gc, xpnts, number, CoordModeOrigin);
-    cur_x = xpnts[number - 1].x;
-    cur_y = xpnts[number - 1].y;
-    needs_flush = 1;
-}
-
-void XD_Polyline_rel(const int *xarray, const int *yarray, int number)
-{
-    XPoint *xpnts = alloc_xpoints(number);
-    int i;
-
-    if (number < 1)
-	return;
-
-    xpnts[0].x = (short)(xarray[0] + cur_x);
-    xpnts[0].y = (short)(yarray[0] + cur_y);
-    cur_x = xpnts[0].x;
-    cur_y = xpnts[0].y;
-
-    for (i = 1; i < number; i++) {
-	xpnts[i].x = (short)xarray[i];
-	xpnts[i].y = (short)yarray[i];
-	cur_x += xpnts[i].x;
-	cur_y += xpnts[i].y;
-    }
-
-    XDrawLines(dpy, bkupmap, gc, xpnts, number, CoordModePrevious);
-    needs_flush = 1;
-}

+ 0 - 80
display/drivers/XDRIVER/README

@@ -1,80 +0,0 @@
-To get information about your X11 color depth
-use:
-
- xdpyinfo
----------------------------------------------------------------
-Date: Tue, 11 Apr 2000 23:06:16 -0400               
-From: Carl Anderson <candrsn@mindspring.com>
-This seems good enough to rollout ...               
-                        
-The problem you were experiencing was from a bug in 
-XFree86. I have coded around that and not been able to                          
-reproduce the dead looping behaviour.               
-                        
-I appreciate your desire to maintain backward compatibility.                    
-                        
-As much as possible I have coded this to be generic and to maintain             
-the previous behaviour. 
-                        
-Of course where I have converted reliance on DefaultXXX to                      
-parameters, I may have introduced errors.           
-                        
-I tested this code as much as possible for me       
-                        
-under Linux - i386 (using an ATI Mach64 card, and an S3 Virge Card)             
-  startx -bpp 8  (after editing /etc/X11/XF86config)                          
-        I changed the desired visual in Graph_Set.c to each of                  
-        TrueColor, DirectColor, PseudoColor, StaticColor,                       
-        GrayColor, and StaticGray      
-  startx -bpp 16 (after editing /etc/X11/XF86config)
-        my visual is TrueColor Only                 
-  startx -bpp 24 (after editing /etc/X11/XF86config)
-        TrueColor only  
-                        
-under Linux - sparc (using a cgsix card)          
-  startx -bpp 8  (after editing /etc/X11/XF86config)                          
-        I changed the desired visual in Graph_Set.c to each of                  
-        TrueColor, DirectColor, PseudoColor, StaticColor,                       
-        GrayColor, and StaticGray                   
-                        
-under Solaris 2.7 - sparc and utlrasparc            
-  /usr/openwin/bin/openwin  (using a cgsix card in 8bit mode)                 
-        I changed the desired visual in Graph_Set.c to each of                  
-        TrueColor, DirectColor, PseudoColor, StaticColor,                       
-        GrayColor, and StaticGray                 
-                      
-  /usr/openwin/bin/openwin (using a pgx24 card in 8 bit mode)                   
-        I changed the desired visual in Graph_Set.c to each of                  
-        TrueColor, DirectColor, PseudoColor, StaticColor,    
-        GrayColor, and StaticGray                 
-                        
-  /usr/openwin/bin/openwin (using a ffb card in 8/24 bit mode)                  
-        I changed the desired visual in Graph_Set.c to each of                  
-        TrueColor, DirectColor, PseudoColor, StaticColor,                       
-        GrayColor, and StaticGray                 
-                        
-under each test the driver ran,                     
-        Truecolor and PsuedoColor ran correctly (with correct colors)           
-        DirectColor,StaticColor,StaticGray ran correctly (with alien colors)    
-                        
-I have not seen a Display which was limited to StaticColor or StaticGray        
-or DirectColor without either PsuedoColor or TrueColor available.          
-                        
-As this patch fixes a deficiency in GRASS for XFree86                           
-and the limitations of teh patch don't seem likely to be exposed (IMHO), 
-BTW  without this patch I cannot run GRASS  under        
-        startx -bpp 8 on the XFree86 Linux Machines 
-I additionally have trouble with Solaris            
-        when running 8 bit visuals.                 
-                        
-should you reqiure a dump of xdpyinfo for each of these card i tested           
-it on I can provide them.                           
-                        
-The differences between this patch and the one I posted to Grass-List           
-is better error trapping and better informational messages.                     
-                        
-of course the new parameter                         
-   nlev=-1   to force TrueColor, if possible        
-needs to be advertised.      
-
-Carl Anderson

+ 0 - 161
display/drivers/XDRIVER/Raster.c

@@ -1,161 +0,0 @@
-
-/******************************************************************************
- * These routines support the drawing of multi-band images on the graphics
- * device.
- *
- * All intensity values are represented in unsigned (8-byte) values.  That is
- * with values between and including 0 and 255.
- *
- ******************************************************************************
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include "includes.h"
-#include <grass/gis.h>
-#include "XDRIVER.h"
-
-static int *trans;
-static int ncols;
-static int nalloc;
-static int masked;
-static int src[2][2];
-static int dst[2][2];
-static XImage *img;
-
-extern unsigned long find_color(unsigned int r, unsigned int g,
-				unsigned int b);
-
-static double scale(double k, const int src[2], const int dst[2])
-{
-    return dst[0] + (double)(k - src[0]) * (dst[1] - dst[0]) / (src[1] -
-								src[0]);
-}
-
-static int scale_fwd_y(int sy)
-{
-    return (int)floor(scale(sy, src[1], dst[1]) + 0.5);
-}
-
-static int scale_rev_x(int dx)
-{
-    return (int)floor(scale(dx + 0.5, dst[0], src[0]));
-}
-
-static int next_row(int sy, int dy)
-{
-    sy++;
-
-    for (;;) {
-	int y = scale_fwd_y(sy);
-
-	if (y > dy)
-	    return sy - 1;
-	sy++;
-    }
-}
-
-static void alloc_buffers(void)
-{
-    if (nalloc >= ncols)
-	return;
-
-    nalloc = ncols;
-    trans = G_realloc(trans, nalloc * sizeof(int));
-}
-
-static void raster_row(int x0, int y0, int ncols, int nrows,
-		       const unsigned char *nul)
-{
-    int i, j;
-
-    if (!masked || !nul) {
-	for (j = 0; j < nrows; j++)
-	    XPutImage(dpy, bkupmap, gc, img, 0, 0, x0, y0 + j, ncols, 1);
-	return;
-    }
-
-    for (i = 0; i < ncols;) {
-	int i0;
-
-	for (; i < ncols && nul[trans[i]]; i++) ;
-
-	i0 = i;
-
-	for (; i < ncols && !nul[trans[i]]; i++) ;
-
-	if (i == i0)
-	    continue;
-
-	for (j = 0; j < nrows; j++)
-	    XPutImage(dpy, bkupmap, gc, img, i0, 0, x0 + i0, y0 + j, i - i0,
-		      1);
-    }
-}
-
-static void alloc_ximage(void)
-{
-    XWindowAttributes attr;
-
-    if (img)
-	XDestroyImage(img);
-
-    XGetWindowAttributes(dpy, grwin, &attr);
-
-    img = XCreateImage(dpy, attr.visual, attr.depth, ZPixmap,
-		       0, NULL, ncols, 1, 8, 0);
-
-    img->data = G_malloc(img->bytes_per_line + 4);
-    *(int *)(img->data + img->bytes_per_line) = 0xDEADBEEF;
-
-    if (!img)
-	G_fatal_error("unable to allocate XImage");
-}
-
-void XD_begin_scaled_raster(int mask, int s[2][2], int d[2][2])
-{
-    int i;
-
-    ncols = d[0][1] - d[0][0];
-
-    memcpy(src, s, sizeof(src));
-    memcpy(dst, d, sizeof(dst));
-    masked = mask;
-
-    alloc_buffers();
-    alloc_ximage();
-
-    for (i = 0; i < ncols; i++)
-	trans[i] = scale_rev_x(d[0][0] + i);
-}
-
-int XD_scaled_raster(int n, int row,
-		     const unsigned char *red, const unsigned char *grn,
-		     const unsigned char *blu, const unsigned char *nul)
-{
-    int d_y0 = scale_fwd_y(row + 0);
-    int d_y1 = scale_fwd_y(row + 1);
-    int d_rows = d_y1 - d_y0;
-    int x;
-
-    if (d_rows <= 0)
-	return next_row(row, d_y0);
-
-    for (x = 0; x < ncols; x++) {
-	int j = trans[x];
-	int c;
-
-	if (masked && nul && nul[j])
-	    continue;
-
-	c = find_color(red[j], grn[j], blu[j]);
-
-	XPutPixel(img, x, 0, c);
-    }
-
-    raster_row(dst[0][0], d_y0, ncols, d_rows, nul);
-
-    needs_flush = 1;
-
-    return next_row(row, d_y1);
-}

+ 0 - 10
display/drivers/XDRIVER/Respond.c

@@ -1,10 +0,0 @@
-
-#include "XDRIVER.h"
-#include "includes.h"
-
-void XD_Respond(void)
-{
-    XClearWindow(dpy, grwin);
-    XSync(dpy, 1);
-    needs_flush = 0;
-}

+ 0 - 366
display/drivers/XDRIVER/Serve_Xevent.c

@@ -1,366 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#ifdef __MINGW32__
-#include <process.h>
-#else
-#include <sys/wait.h>
-#endif
-#include "includes.h"
-#include <grass/colors.h>
-#include "pad.h"
-#include <grass/gis.h>
-#include <grass/glocale.h>
-#include "XDRIVER.h"
-
-static void spawn_redraw_process(void);
-static void check_redraw_process(void);
-static void handle_resize_event(void);
-static void check_flush(void);
-static void set_busy(int);
-static void set_title_busy(int);
-
-pid_t redraw_pid;
-
-int needs_flush;
-
-int get_xevent(long event_mask, XEvent * event)
-{
-    int input_fd = LIB_command_get_input();
-    int display_fd = ConnectionNumber(dpy);
-
-    for (;;) {
-	fd_set waitset;
-	struct timeval tv;
-
-	if (XCheckWindowEvent(dpy, grwin, event_mask, event))
-	    return 1;
-
-	tv.tv_sec = 0;
-	tv.tv_usec = 200;
-
-	FD_ZERO(&waitset);
-	FD_SET(input_fd, &waitset);
-	FD_SET(display_fd, &waitset);
-	if (select(FD_SETSIZE, &waitset, NULL, NULL, &tv) < 0) {
-	    perror("monitor: get_event: select");
-	    return 0;
-	}
-
-	if (FD_ISSET(input_fd, &waitset))
-	    return 0;
-    }
-}
-
-int service_xevent(int opened)
-{
-    static int do_resize;
-    Atom WM_DELETE_WINDOW;
-    XEvent event;
-
-    check_redraw_process();
-
-    while (XPending(dpy)) {
-	/* NOTE: This won't die if server terminates */
-	XNextEvent(dpy, &event);
-	switch (event.type) {
-	case ConfigureNotify:
-	    if (event.xconfigure.width != screen_right ||
-		event.xconfigure.height != screen_bottom)
-		do_resize = 1;	/* group requests into one */
-	    break;
-
-	case ClientMessage:
-	    WM_DELETE_WINDOW = XInternAtom(event.xclient.display,
-					   "WM_DELETE_WINDOW", False);
-	    if (event.xclient.data.l[0] != WM_DELETE_WINDOW)
-		break;
-	    XD_Graph_close();
-	    exit(0);
-	    break;
-	}
-    }				/* while() */
-
-    /* Now process resize or expose events */
-    if (do_resize && !redraw_pid && !opened) {
-	spawn_redraw_process();
-	handle_resize_event();
-	do_resize = 0;
-    }
-
-    check_flush();
-
-    return 0;
-}
-
-int _time_stamp(PAD * pad)
-{
-    append_item(pad, "time", "1", 1);
-
-    return 0;
-}
-
-static void check_redraw_process(void)
-{
-    int status;
-    pid_t pid;
-
-    if (!redraw_pid)
-	return;
-
-    pid = waitpid(redraw_pid, &status, WNOHANG);
-    if (pid < 0) {
-	perror("Monitor: check_redraw_process: waitpid");
-	return;
-    }
-
-    if (pid == 0)
-	return;
-
-    if (pid != redraw_pid) {
-	G_warning(_("Monitor: waitpid: expected %d but got %d"),
-		  redraw_pid, pid);
-	return;
-    }
-
-    set_busy(0);
-    redraw_pid = 0;
-}
-
-static LIST *list_push(char *s, LIST * tail)
-{
-    LIST *l = (LIST *) G_malloc(sizeof(LIST));
-
-    l->value = G_store(s);
-    l->next = tail;
-    return l;
-}
-
-static LIST *list_copy(LIST * list, LIST * tail)
-{
-    if (!list)
-	return tail;
-
-    return list_push(list->value, list_copy(list->next, tail));
-}
-
-static void list_free(LIST * l)
-{
-    if (!l)
-	return;
-    if (l->value)
-	G_free(l->value);
-    list_free(l->next);
-    G_free(l);
-}
-
-static void spawn_redraw_process(void)
-{
-    char buff[1024];
-    pid_t pid;
-    LIST *commands = NULL;
-    PAD *pad;
-
-    if (redraw_pid)
-	return;
-
-    for (pad = pad_list(); pad != NULL; pad = pad->next) {
-	ITEM *list, *d_win;
-	int b0, t0, l0, r0;
-	double b, t, l, r;
-
-	list = find_item(pad, "list");
-	if (!list || !list->list)
-	    continue;
-
-	d_win = find_item(pad, "d_win");
-	if (!d_win || !d_win->list || !d_win->list->value)
-	    continue;
-
-	if (sscanf(d_win->list->value, "%d %d %d %d", &t0, &b0, &l0, &r0) !=
-	    4)
-	    continue;
-
-	commands = list_copy(list->list, commands);
-
-	sprintf(buff, "d.frame -s %s", pad->name);
-	commands = list_push(buff, commands);
-
-	b = 100.0 - 100.0 * b0 / (screen_bottom - screen_top);
-	t = 100.0 - 100.0 * t0 / (screen_bottom - screen_top);
-	l = 100.0 * l0 / (screen_right - screen_left);
-	r = 100.0 * r0 / (screen_right - screen_left);
-
-	sprintf(buff, "d.frame -c %s at=%f,%f,%f,%f", pad->name, b, t, l, r);
-	commands = list_push(buff, commands);
-    }
-
-    if (!commands)
-	return;
-
-    pid = fork();
-    if (pid < 0) {
-	perror("Monitor: fork");
-	return;
-    }
-
-    if (pid != 0) {		/* parent */
-	set_busy(1);
-	redraw_pid = pid;
-	list_free(commands);
-	return;
-    }
-
-    /* child */
-
-    sprintf(buff, "MONITOR_OVERRIDE=%s", monitor_name);
-    putenv(buff);
-
-    close(0);
-    open("/dev/null", O_RDONLY);
-    close(1);
-    open("/dev/null", O_WRONLY);
-    close(2);
-    open("/dev/null", O_WRONLY);
-    for (; commands; commands = commands->next)
-	system(commands->value);
-    exit(0);
-}
-
-static void handle_resize_event(void)
-{
-    PAD *curpad, *nextpad;
-    char buf[64];
-    XWindowAttributes xwa;
-    XGCValues gc_values;
-
-    /* Get the window's current attributes. */
-    if (!XGetWindowAttributes(dpy, grwin, &xwa))
-	return;
-
-    screen_right = xwa.width;
-    screen_bottom = xwa.height;
-
-    /* do a d.frame -e (essentially) */
-    /* Dclearscreen() */
-    /* delete the time and current window out of the scratch pad */
-    curpad = find_pad("");
-    delete_item(curpad, "time");
-    delete_item(curpad, "cur_w");
-
-    /* delete all other pads */
-    for (curpad = pad_list(); curpad != NULL; curpad = nextpad) {
-	nextpad = curpad->next;
-	if (*curpad->name)
-	    delete_pad(curpad);
-    }
-
-    curpad = NULL;
-
-    /* Dnew("full_screen") */
-    /* find a pad called "full_screen" */
-    create_pad("full_screen");
-    sprintf(buf, "%d %d %d %d",
-	    screen_top, screen_bottom, screen_left, screen_right);
-    curpad = find_pad("full_screen");
-    append_item(curpad, "d_win", buf, 0);
-    _time_stamp(curpad);
-    /* Dchoose("full_screen") */
-
-    /* set the time and window name in no-name pad */
-    curpad = find_pad("");
-    append_item(curpad, "cur_w", "full_screen", 0);
-    _time_stamp(curpad);
-
-    /* set the window */
-    XD_Set_window(screen_top, screen_bottom, screen_left, screen_right);
-
-    /* Handle backing store */
-    XFreePixmap(dpy, bkupmap);
-    bkupmap = XCreatePixmap(dpy, grwin, xwa.width, xwa.height, xwa.depth);
-    XGetGCValues(dpy, gc, GCForeground, &gc_values);
-    XSetForeground(dpy, gc, WhitePixel(dpy, scrn));
-    XFillRectangle(dpy, bkupmap, gc, 0, 0, xwa.width, xwa.height);
-    XSetForeground(dpy, gc, gc_values.foreground);
-    XSetWindowBackgroundPixmap(dpy, grwin, bkupmap);
-    XClearWindow(dpy, grwin);
-
-    needs_flush = 0;
-}
-
-static void check_flush(void)
-{
-    static struct timeval last_flush;
-    struct timeval now;
-    long delta;
-
-    if (!needs_flush)
-	return;
-
-    if (gettimeofday(&now, NULL) < 0) {
-	perror("Monitor: gettimeofday");
-	return;
-    }
-
-    delta = (now.tv_sec - last_flush.tv_sec) * 1000000 +
-	(now.tv_usec - last_flush.tv_usec);
-    if (last_flush.tv_sec && delta < 250000)
-	return;
-
-    XClearWindow(dpy, grwin);
-
-    last_flush = now;
-    needs_flush = 0;
-}
-
-static void set_title_busy(int busy)
-{
-#ifndef X11R3
-    static const char text[] = " [redraw]";
-    XTextProperty prop;
-    char title[1024], *p;
-
-    if (external_window)
-	return;
-
-    if (!XGetWMName(dpy, grwin, &prop)) {
-	G_warning(_("Monitor: XGetWMName failed"));
-	return;
-    }
-
-    if (!prop.value || !prop.nitems || prop.format != 8) {
-	G_warning(_("Monitor: XGetWMName: bad result"));
-	return;
-    }
-
-    strcpy(title, prop.value);
-    XFree(prop.value);
-
-    p = strstr(title, text);
-    if (p)
-	*p = '\0';
-    if (busy)
-	strcat(title, text);
-
-    prop.value = title;
-    prop.nitems = strlen(title);
-
-    XSetWMName(dpy, grwin, &prop);
-#endif
-}
-
-static void set_busy(int busy)
-{
-    set_title_busy(busy);
-
-    if (busy)
-	XDefineCursor(dpy, grwin, cur_clock);
-    else
-	XUndefineCursor(dpy, grwin);
-
-    XFlush(dpy);
-}

+ 0 - 12
display/drivers/XDRIVER/Set_window.c

@@ -1,12 +0,0 @@
-#include "includes.h"
-
-void XD_Set_window(int t, int b, int l, int r)
-{
-    XRectangle rect;
-
-    rect.x = rect.y = 0;
-    rect.width = r - l;
-    rect.height = b - t;
-
-    XSetClipRectangles(dpy, gc, l, t, &rect, 1, YXBanded);
-}

+ 0 - 27
display/drivers/XDRIVER/Work.c

@@ -1,27 +0,0 @@
-
-#include "XDRIVER.h"
-#include "includes.h"
-
-#define LOOP_PER_SERVICE 15
-
-int XD_Work_stream(void)
-{
-    return ConnectionNumber(dpy);
-}
-
-void XD_Do_work(int opened)
-{
-    static int cmd_loop_count;
-
-    if (opened) {
-	if (--cmd_loop_count <= 0) {
-	    service_xevent(opened);	/* take care of any events */
-	    cmd_loop_count = LOOP_PER_SERVICE;
-	}
-    }
-    else {
-	service_xevent(opened);
-	XNoOp(dpy);		/* see if X is still running */
-	cmd_loop_count = 0;
-    }
-}

+ 0 - 33
display/drivers/XDRIVER/XDRIVER.h

@@ -1,33 +0,0 @@
-#include "driver.h"
-
-extern void XD_Box_abs(int, int, int, int);
-extern void XD_Client_Close(void);
-extern void XD_Client_Open(void);
-extern void XD_Do_work(int);
-extern int XD_Get_location_with_box(int, int, int *, int *, int *);
-extern int XD_Get_location_with_line(int, int, int *, int *, int *);
-extern int XD_Get_location_with_pointer(int *, int *, int *);
-extern void XD_Graph_close(void);
-extern int XD_Graph_set(int, char **);
-extern void XD_Line_width(int);
-extern void XD_Panel_delete(const char *);
-extern void XD_Panel_restore(const char *);
-extern void XD_Panel_save(const char *, int, int, int, int);
-extern void XD_Polydots_abs(const int *, const int *, int);
-extern void XD_Polydots_rel(const int *, const int *, int);
-extern void XD_Polygon_abs(const int *, const int *, int);
-extern void XD_Polygon_rel(const int *, const int *, int);
-extern void XD_Polyline_abs(const int *, const int *, int);
-extern void XD_Polyline_rel(const int *, const int *, int);
-extern void XD_Set_window(int, int, int, int);
-extern void XD_begin_scaled_raster(int, int[2][2], int[2][2]);
-extern int XD_scaled_raster(int, int, const unsigned char *,
-			    const unsigned char *, const unsigned char *,
-			    const unsigned char *);
-extern void XD_Respond(void);
-extern int XD_Work_stream(void);
-extern void XD_color(int);
-extern void XD_draw_bitmap(int, int, int, const unsigned char *);
-extern void XD_draw_line(int, int, int, int);
-extern void XD_draw_point(int, int);
-extern int XD_lookup_color(int, int, int);

+ 0 - 17
display/drivers/XDRIVER/alloc.c

@@ -1,17 +0,0 @@
-#include <grass/gis.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "includes.h"
-
-XPoint *alloc_xpoints(int count)
-{
-    static size_t num_alloc;
-    static XPoint *pnts;
-
-    if (num_alloc < count) {
-	num_alloc = count;
-	pnts = G_realloc(pnts, num_alloc * sizeof(XPoint));
-    }
-
-    return pnts;
-}

+ 0 - 84
display/drivers/XDRIVER/description.html

@@ -1,84 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <title>XDRIVER</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="GRASS Development Team">
- <link rel="stylesheet" href="grassdocs.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF">
-
-<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
-
-<H2>NAME</H2>
-
-<EM><B>XDRIVER - GRASS Monitor</B></EM>  - driver to display GRASS maps in
-X11 environment.<BR> 
-<EM>(drivers)</EM>
-
-<H2>DESCRIPTION</H2>
-
-The GRASS XDRIVER can be used to display GRASS maps in X11 environment.
-
-<h2>Usage in details</h2>
-
-Variables:
-<ul>
-  <li><b>GRASS_WIDTH</b><br>
-    set the x size in pixel for the XDRIVER (default: 640)</li><br>
-  <li><b>GRASS_HEIGHT</b><br>
-    set the y size in pixel for the XDRIVER (default: 480)</li></br>
-  <!-- ??? -->
-  <li><b>XDRIVER_TRUECOLOR=[TRUE|FALSE]</b><br>
-    Look for a TrueColor visual (?)</li><br>
-  <li><b>XDRIVER_WINDOW</b><br>
-    ?</li><br>
-  <li><b>XDRIVER_PRIVATE_CMAP</b><br>
-    Private color map (?)</li><br>
-  <!-- removed? -->
-  <li><b>XDRIVER_LEFT</b><br>
-    defines the left position of GRASS monitor (<i>removed?</i>)</li><br>
-  <li><b>XDRIVER_TOP</b><br>
-    define the upper position of GRASS monitor (<i>removed?</i>)</li><br>
-</ul>
-
-<h3>Set the XDRIVER size</h3>
-
-<div class="code"><pre>
-# bash shell syntax:
-export GRASS_WIDTH=xxx
-export GRASS_HEIGHT=yyy
-</pre></div>
-
-<div class="code"><pre>
-# c shell syntax:
-setenv GRASS_WIDTH xxx
-setenv GRASS_HEIGHT yyy
-</pre></div>
-
-To control the XDRIVER, use the <em><A HREF="d.mon.html">d.mon</A></em> module.
-<p>
-The maximum color depth depends on the current X Server settings.
-
-<H2>SEE ALSO</H2>
-<EM>
-  <a href="displaydrivers.html">Display drivers</a>
-  <br>
-  <A HREF="htmlmapdriver.html">HTMLMAP driver</A>,
-  <A HREF="pngdriver.html">PNG driver</A>,
-  <A HREF="psdriver.html">PostScript driver</A>
-  <BR>
-  <A HREF="d.frame.html">d.frame</A>,
-  <A HREF="d.mon.html">d.mon</A>,
-  <A HREF="g.region.html">g.region</A>
-  <a href="d.rast.html">d.rast</A>, 
-  <a href="d.vect.html">d.vect</A>
-</EM>
-
-<H2>AUTHORS</H2>
-CERL<br>
-various improvements from several authors.<br>
-Rewritten 2001 by Glynn Clements
-
-<p>
-<i>Last changed: $Date$</i>

+ 0 - 33
display/drivers/XDRIVER/icon.bit

@@ -1,33 +0,0 @@
-#define icon_width 50
-#define icon_height 50
-static char icon_bits[] = {
-   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
-   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x0c, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc6, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x03, 0x86, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x07,
-   0x03, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x60,
-   0x00, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x04, 0x18, 0x00, 0x00,
-   0x00, 0x18, 0x00, 0x04, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x04, 0x60,
-   0x00, 0x00, 0x00, 0x06, 0x02, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x06,
-   0x06, 0x80, 0x01, 0x00, 0x80, 0x01, 0x04, 0x02, 0x00, 0x03, 0x00, 0xc0,
-   0x00, 0x08, 0x02, 0x04, 0x06, 0x00, 0x60, 0x00, 0x18, 0x02, 0x02, 0x0c,
-   0x00, 0x30, 0x00, 0x10, 0x02, 0x02, 0x18, 0x00, 0x18, 0x00, 0x21, 0x02,
-   0x01, 0x30, 0x00, 0x30, 0x00, 0x42, 0x82, 0x00, 0x18, 0x00, 0x60, 0x00,
-   0xc2, 0x42, 0x00, 0x0c, 0x00, 0xc0, 0x00, 0x84, 0x42, 0x10, 0x06, 0x00,
-   0x80, 0x41, 0x0c, 0x33, 0x08, 0x03, 0x00, 0x00, 0xc3, 0x08, 0x93, 0x84,
-   0x01, 0x00, 0x00, 0x06, 0x19, 0x9b, 0xc4, 0x00, 0x00, 0x00, 0x0d, 0x11,
-   0x4e, 0x62, 0x01, 0x00, 0x00, 0x1a, 0x32, 0x46, 0xb1, 0x00, 0x00, 0x00,
-   0x34, 0x22, 0xcb, 0x58, 0x00, 0x00, 0x00, 0x68, 0x64, 0xd3, 0x2c, 0x00,
-   0x00, 0x00, 0xd0, 0x64, 0x7b, 0x16, 0x00, 0x00, 0x00, 0xa8, 0xf9, 0x29,
-   0x2b, 0x00, 0x00, 0x00, 0x50, 0xf3, 0x89, 0x15, 0x00, 0x00, 0x00, 0xa0,
-   0xc6, 0xc9, 0x0a, 0x00, 0x00, 0x00, 0x40, 0x8d, 0x61, 0x05, 0x00, 0x00,
-   0x00, 0xe0, 0x1a, 0xb1, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x35, 0x58, 0x07,
-   0x00, 0x00, 0x00, 0x80, 0x6b, 0xac, 0x03, 0x00, 0x00, 0x00, 0x00, 0xd7,
-   0xd6, 0x01, 0x00, 0x00, 0x00, 0x00, 0xae, 0xeb, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x5c, 0x75, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x06, 0xc1,
-   0x71, 0x00, 0x00, 0x00, 0x22, 0x89, 0x22, 0x49, 0x00, 0x00, 0x00, 0x02,
-   0x49, 0x24, 0x08, 0x00, 0x00, 0x00, 0x3a, 0xc7, 0xc7, 0x30, 0x00, 0x00,
-   0x00, 0x22, 0x49, 0x24, 0x49, 0x00, 0x00, 0x00, 0x3c, 0x51, 0xe4, 0x38,
-   0x00, 0x00};

+ 0 - 33
display/drivers/XDRIVER/icon.bit.3

@@ -1,33 +0,0 @@
-#define icon_width 50
-#define icon_height 50
-static char icon_bits[] = {
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x80, 0x99, 0x01, 0x00,
-   0x33, 0x03, 0xfc, 0x80, 0x99, 0x01, 0x00, 0x33, 0x03, 0xfc, 0x80, 0xff,
-   0x99, 0x33, 0xff, 0x03, 0xfc, 0x80, 0xff, 0x99, 0x33, 0xff, 0x03, 0xfc,
-   0x00, 0xe7, 0xf8, 0x3f, 0xce, 0x01, 0xfc, 0x00, 0xe7, 0xf0, 0x1f, 0xce,
-   0x01, 0xfc, 0x00, 0xe7, 0xf0, 0x1f, 0xce, 0x01, 0xfc, 0x00, 0xff, 0xf0,
-   0x1f, 0xfe, 0x01, 0xfc, 0x00, 0xff, 0xf0, 0x1f, 0xfe, 0x01, 0xfc, 0x00,
-   0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01,
-   0xfc, 0x00, 0xff, 0x3f, 0xf8, 0xff, 0x01, 0xfc, 0x00, 0xff, 0x1f, 0xf0,
-   0xff, 0x01, 0xfc, 0x00, 0xe7, 0x19, 0x30, 0xcf, 0x01, 0xfc, 0x00, 0xe7,
-   0x19, 0x30, 0xcf, 0x01, 0xfc, 0x00, 0xe7, 0x1f, 0xf0, 0xcf, 0x01, 0xfc,
-   0x00, 0xe7, 0x1f, 0xf0, 0xcf, 0x01, 0xfc, 0x00, 0xe7, 0x1f, 0xf0, 0xcf,
-   0x01, 0xfc, 0x80, 0xff, 0x1f, 0xf0, 0xff, 0x03, 0xfc, 0x80, 0xff, 0x1f,
-   0xf0, 0xff, 0x03, 0xfc, 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0x80,
-   0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0x00, 0xc3, 0x83, 0x83, 0xc3, 0x00, 0xfc, 0x80, 0xc7, 0x8e, 0xe3,
-   0xe7, 0x03, 0xfc, 0xc0, 0x6f, 0x8c, 0x63, 0x6c, 0x0e, 0xfc, 0xe0, 0x6c,
-   0xc8, 0x66, 0x60, 0x00, 0xfc, 0x70, 0x6c, 0xcc, 0xe6, 0xc0, 0x01, 0xfc,
-   0x38, 0xf0, 0xcf, 0xc7, 0x1f, 0x0f, 0xfc, 0x1c, 0xf0, 0xe7, 0x0f, 0x3c,
-   0x3c, 0xfc, 0x9e, 0x37, 0xe1, 0xce, 0xb8, 0x71, 0xfc, 0xbe, 0x1b, 0x63,
-   0xcc, 0xb8, 0xf1, 0xfc, 0xfc, 0x19, 0x73, 0xdc, 0xbf, 0xff, 0xfd, 0xf8,
-   0x1c, 0x77, 0x9c, 0x1f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf7, 0x67,
-   0xf4, 0xff, 0xff, 0xff, 0x7f, 0xf7, 0x5b, 0xf5, 0xff, 0xff, 0xff, 0x3f,
-   0x57, 0x7b, 0xf6, 0xff, 0xff, 0xff, 0x7f, 0xb7, 0x5b, 0xf5, 0xff, 0xff,
-   0xff, 0x1f, 0x55, 0x67, 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff};

+ 0 - 33
display/drivers/XDRIVER/icon.bit.cerl

@@ -1,33 +0,0 @@
-#define icon_width 50
-#define icon_height 50
-static char icon_bits[] = {
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x80, 0x99, 0x01, 0x00,
-   0x33, 0x03, 0xfc, 0x80, 0x99, 0x01, 0x00, 0x33, 0x03, 0xfc, 0x80, 0xff,
-   0x99, 0x33, 0xff, 0x03, 0xfc, 0x80, 0xff, 0x99, 0x33, 0xff, 0x03, 0xfc,
-   0x00, 0xe7, 0xf8, 0x3f, 0xce, 0x01, 0xfc, 0x00, 0xe7, 0xf0, 0x1f, 0xce,
-   0x01, 0xfc, 0x00, 0xe7, 0xf0, 0x1f, 0xce, 0x01, 0xfc, 0x00, 0xff, 0xf0,
-   0x1f, 0xfe, 0x01, 0xfc, 0x00, 0xff, 0xf0, 0x1f, 0xfe, 0x01, 0xfc, 0x00,
-   0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0x00, 0xff, 0x7f, 0xfc, 0xff, 0x01,
-   0xfc, 0x00, 0xff, 0x3f, 0xf8, 0xff, 0x01, 0xfc, 0x00, 0xff, 0x1f, 0xf0,
-   0xff, 0x01, 0xfc, 0x00, 0xe7, 0x19, 0x30, 0xcf, 0x01, 0xfc, 0x00, 0xe7,
-   0x19, 0x30, 0xcf, 0x01, 0xfc, 0x00, 0xe7, 0x1f, 0xf0, 0xcf, 0x01, 0xfc,
-   0x00, 0xe7, 0x1f, 0xf0, 0xcf, 0x01, 0xfc, 0x00, 0xe7, 0x1f, 0xf0, 0xcf,
-   0x01, 0xfc, 0x80, 0xff, 0x1f, 0xf0, 0xff, 0x03, 0xfc, 0x80, 0xff, 0x1f,
-   0xf0, 0xff, 0x03, 0xfc, 0x80, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0x80,
-   0xff, 0xff, 0xff, 0xff, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0x00, 0xc3, 0x83, 0x83, 0xc3, 0x00, 0xfc, 0x80, 0xc7, 0x8e, 0xe3,
-   0xe7, 0x03, 0xfc, 0xc0, 0x6f, 0x8c, 0x63, 0x6c, 0x0e, 0xfc, 0xe0, 0x6c,
-   0xc8, 0x66, 0x60, 0x00, 0xfc, 0x70, 0x6c, 0xcc, 0xe6, 0xc0, 0x01, 0xfc,
-   0x38, 0xf0, 0xcf, 0xc7, 0x1f, 0x0f, 0xfc, 0x1c, 0xf0, 0xe7, 0x0f, 0x3c,
-   0x3c, 0xfc, 0x9e, 0x37, 0xe1, 0xce, 0xb8, 0x71, 0xfc, 0xbe, 0x1b, 0x63,
-   0xcc, 0xb8, 0xf1, 0xfc, 0xfc, 0x19, 0x73, 0xdc, 0xbf, 0xff, 0xfd, 0xf8,
-   0x1c, 0x77, 0x9c, 0x1f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff};

+ 0 - 33
display/drivers/XDRIVER/icon.bit.grass5

@@ -1,33 +0,0 @@
-#define icon_width 50
-#define icon_height 50
-static unsigned char icon_bits[] = {
-   0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
-   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x0c, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc6, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x03, 0x86, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x07,
-   0x03, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x60,
-   0x00, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x04, 0x18, 0x00, 0x00,
-   0x00, 0x18, 0x00, 0x04, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x04, 0x60,
-   0x00, 0x00, 0x00, 0x06, 0x02, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x06,
-   0x06, 0x80, 0x01, 0x00, 0x80, 0x01, 0x04, 0x02, 0x00, 0x03, 0x00, 0xc0,
-   0x00, 0x08, 0x02, 0x04, 0x06, 0x00, 0x60, 0x00, 0x18, 0x02, 0x02, 0x0c,
-   0x00, 0x30, 0x00, 0x10, 0x02, 0x02, 0x18, 0x00, 0x18, 0x00, 0x21, 0x02,
-   0x01, 0x30, 0x00, 0x30, 0x00, 0x42, 0x82, 0x00, 0x18, 0x00, 0x60, 0x00,
-   0xc2, 0x42, 0x00, 0x0c, 0x00, 0xc0, 0x00, 0x84, 0x42, 0x10, 0x06, 0x00,
-   0x80, 0x41, 0x0c, 0x33, 0x08, 0x03, 0x00, 0x00, 0xc3, 0x08, 0x93, 0x84,
-   0x01, 0x00, 0x00, 0x06, 0x19, 0x9b, 0xc4, 0x00, 0x00, 0x00, 0x0d, 0x11,
-   0x4e, 0x62, 0x01, 0x00, 0x00, 0x1a, 0x32, 0x46, 0xb1, 0x00, 0x00, 0x00,
-   0x34, 0x22, 0xcb, 0x58, 0x00, 0x00, 0x00, 0x68, 0x64, 0xd3, 0x2c, 0x00,
-   0x00, 0x00, 0xd0, 0x64, 0x7b, 0x16, 0x00, 0x00, 0x00, 0xa8, 0xf9, 0x29,
-   0x2b, 0x00, 0x00, 0x00, 0x50, 0xf3, 0x89, 0x15, 0x00, 0x00, 0x00, 0xa0,
-   0xc6, 0xc9, 0x0a, 0x00, 0x00, 0x00, 0x40, 0x8d, 0x61, 0x05, 0x00, 0x00,
-   0x00, 0xe0, 0x1a, 0xb1, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x35, 0x58, 0x07,
-   0x00, 0x00, 0x00, 0x80, 0x6b, 0xac, 0x03, 0x00, 0x00, 0x00, 0x00, 0xd7,
-   0xd6, 0x01, 0x00, 0x00, 0x00, 0x00, 0xae, 0xeb, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x5c, 0x75, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x06, 0xc1,
-   0x71, 0x00, 0x00, 0x00, 0x22, 0x89, 0x22, 0x49, 0x00, 0x00, 0x00, 0x02,
-   0x49, 0x24, 0x08, 0x00, 0x00, 0x00, 0x3a, 0xc7, 0xc7, 0x30, 0x00, 0x00,
-   0x00, 0x22, 0x49, 0x24, 0x49, 0x00, 0x00, 0x00, 0x3c, 0x51, 0xe4, 0x38,
-   0x00, 0x00};

+ 0 - 15
display/drivers/XDRIVER/includes.h

@@ -1,15 +0,0 @@
-#ifdef INTERGRAPH
-#include <string.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#else
-#include <X11/Xos.h>
-#endif
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "XDRIVER.h"
-#include "local_proto.h"
-#include "local_vars.h"

+ 0 - 10
display/drivers/XDRIVER/local_proto.h

@@ -1,10 +0,0 @@
-
-/* Clr_table.c */
-Colormap init_color_table(Colormap cmap);
-
-/* Serve_Xevent.c */
-int get_xevent(long event_mask, XEvent * event);
-int service_xevent(int);
-
-/* alloc.c */
-XPoint *alloc_xpoints(int);

+ 0 - 27
display/drivers/XDRIVER/local_vars.h

@@ -1,27 +0,0 @@
-/* variables used within XDRIVER */
-
-extern const char *monitor_name;
-
-extern Display *dpy;
-extern Window grwin;
-
-extern Visual *use_visual;
-extern int use_bit_depth;
-
-extern int scrn;
-extern GC gc;
-extern Colormap fixedcmap;
-extern Cursor cur_xh, cur_clock;
-extern u_long gemask;
-extern Pixmap bkupmap;
-extern int truecolor;
-
-extern int external_window;
-
-extern unsigned long *xpixels;
-
-extern int needs_flush;
-
-extern pid_t redraw_pid;
-
-extern int current_color;

+ 0 - 61
display/drivers/XDRIVER/main.c

@@ -1,61 +0,0 @@
-
-/****************************************************************************
- *
- * MODULE:       XDRIVER
- * AUTHOR(S):    various authors at CERL (original contributor)
- *               Glynn Clements <glynn gclements.plus.com> 
- *               Huidae Cho <grass4u gmail.com>
- * PURPOSE:      display driver for displaying in X11 environment
- * COPYRIGHT:    (C) 2006-2007 by the GRASS Development Team
- *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
- *
- *****************************************************************************/
-
-#include <stdio.h>
-#include "XDRIVER.h"
-
-int main(int argc, char **argv)
-{
-    struct driver drv;
-
-    drv.Box_abs = XD_Box_abs;
-    drv.Box_rel = NULL;
-    drv.Client_Open = XD_Client_Open;
-    drv.Client_Close = XD_Client_Close;
-    drv.Erase = NULL;
-    drv.Get_with_box = XD_Get_location_with_box;
-    drv.Get_with_line = XD_Get_location_with_line;
-    drv.Get_with_pointer = XD_Get_location_with_pointer;
-    drv.Graph_set = XD_Graph_set;
-    drv.Graph_close = XD_Graph_close;
-    drv.Line_width = XD_Line_width;
-    drv.Panel_save = XD_Panel_save;
-    drv.Panel_restore = XD_Panel_restore;
-    drv.Panel_delete = XD_Panel_delete;
-    drv.Polydots_abs = XD_Polydots_abs;
-    drv.Polydots_rel = XD_Polydots_rel;
-    drv.Polyline_abs = XD_Polyline_abs;
-    drv.Polyline_rel = XD_Polyline_rel;
-    drv.Polygon_abs = XD_Polygon_abs;
-    drv.Polygon_rel = XD_Polygon_rel;
-    drv.Set_window = XD_Set_window;
-    drv.Begin_scaled_raster = XD_begin_scaled_raster;
-    drv.Scaled_raster = XD_scaled_raster;
-    drv.End_scaled_raster = NULL;
-    drv.Respond = XD_Respond;
-    drv.Work_stream = XD_Work_stream;
-    drv.Do_work = XD_Do_work;
-    drv.lookup_color = XD_lookup_color;
-    drv.color = XD_color;
-    drv.draw_line = XD_draw_line;
-    drv.draw_point = XD_draw_point;
-    drv.draw_bitmap = XD_draw_bitmap;
-    drv.draw_text = NULL;
-
-    LIB_init(&drv, argc, argv);
-
-    return LIB_main(argc, argv);
-}

+ 0 - 24
display/drivers/XDRIVER/moncap.entry

@@ -1,24 +0,0 @@
-x0:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.0a dev/fifo.0b \
-     ::any terminal
-x1:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.1a dev/fifo.1b \
-     ::any terminal
-x2:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.2a dev/fifo.2b \
-     ::any terminal
-x3:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.3a dev/fifo.3b \
-     ::any terminal
-x4:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.4a dev/fifo.4b \
-     ::any terminal
-x5:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.5a dev/fifo.5b \
-     ::any terminal
-x6:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.6a dev/fifo.6b \
-     ::any terminal
-x7:driver/XDRIVER:X-windows graphics display: \
-     dev/fifo.7a dev/fifo.7b \
-     ::any terminal

+ 0 - 32
display/drivers/description.html

@@ -1,32 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <title>GRASS GIS Reference Manual</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="GRASS Development Team">
- <link rel="stylesheet" href="grassdocs.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF">
-<h2>GRASS GIS Reference Manual</h2>
-
-This reference manual details the use of modules distributed with
-Geographic Resources Analysis Support System (GRASS), an open source (GNU
-GPL'ed), image processing and geographic information system (GIS).
-<p>
-
-<b>Display drivers:</b>
-<ul>
-<li><a href="cairodriver.html">Cairo driver</a>
-<li><a href="htmlmapdriver.html">HTML map driver</a>
-<li><a href="pngdriver.html">PNG driver</a>
-<li><a href="psdriver.html">PostScript driver</a>
-<li><a href="xdriver.html">XDRIVER</a>
-</ul>
-<p>
-<hr>
-<a href="index.html">Help Index</a> | <a href="full_index.html">Full Index</a>
-<br>
-&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a>
-
-</body>
-</html>