diff options
-rw-r--r-- | graphics/xdl/files/patch-ab | 34 | ||||
-rw-r--r-- | graphics/xdl/files/patch-ac | 63 |
2 files changed, 97 insertions, 0 deletions
diff --git a/graphics/xdl/files/patch-ab b/graphics/xdl/files/patch-ab new file mode 100644 index 0000000..f2f6a40 --- /dev/null +++ b/graphics/xdl/files/patch-ab @@ -0,0 +1,34 @@ +--- Makefile.orig Thu Feb 4 07:08:27 1993 ++++ Makefile Sat Jan 29 02:12:57 2000 +@@ -23,15 +23,15 @@ + + # + # Modify these to fit the compiler setup on your system. +-CC = gcc +-CFLAGS = -O2 +-LIBS = -lX11 $(IXLIBS) ++CC ?= gcc ++CFLAGS += -I${X11BASE}/include ++LIBS += -L${X11BASE}/lib -lX11 $(IXLIBS) + + # + # These specify where to install the binary + # and the manual. +-BINDIR = /usr/local/bin +-MANDIR = /usr/local/man/man1 ++BINDIR = ${PREFIX}/bin ++MANDIR = ${PREFIX}/man/man1 + MANEXT = 1 + + all: xdl +@@ -40,8 +40,8 @@ + $(CC) $(CFLAGS) $(TIMER) $(BSDT) -o xdl xdl.c $(LIBS) + + install: xdl xdl.man +- cp xdl $(BINDIR) +- cp xdl.man $(MANDIR)/xdl.$(MANEXT) ++ ${BSD_INSTALL_PROGRAM} xdl $(BINDIR) ++ ${BSD_INSTALL_MAN} xdl.man $(MANDIR)/xdl.$(MANEXT) + + clean: + $(RM) xdl *.o *~ core diff --git a/graphics/xdl/files/patch-ac b/graphics/xdl/files/patch-ac new file mode 100644 index 0000000..1d6d055 --- /dev/null +++ b/graphics/xdl/files/patch-ac @@ -0,0 +1,63 @@ +--- xdl.c.orig Thu Feb 4 08:14:02 1993 ++++ xdl.c Sat Jan 29 02:13:28 2000 +@@ -20,7 +20,11 @@ + + #include <stdio.h> + #include <signal.h> ++#ifdef __STDC__ ++#include <stdlib.h> ++#else + #include <malloc.h> ++#endif + #include <sys/types.h> + #ifdef BSDTYPES + #include <sys/bsdtypes.h> +@@ -215,6 +219,16 @@ + } + + ++void ++freepixmaps(dlinfo) ++ DL_info dlinfo; ++{ ++ int i, j; ++ for (j = 0; j < dlinfo.num_screen; j++) ++ for (i = 0; i < dlinfo.images_per_screen; i++) ++ XFreePixmap(x_display, pixmap[j * (dlinfo.format * 3 + 1) + i]); ++} ++ + static void die(s)char*s;{fprintf(stderr,"%s\n",s);exit(1);} + static void dummy(){}; + +@@ -468,6 +482,18 @@ + } else if (x_depth == 8) { + x_image->data[pixelcount++] = (u_char)pixels[*src]; + ++ } else if (x_depth == 16) { ++ if (x_image->byte_order == MSBFirst) { ++ x_image->data[pixelcount++] ++ = (pixels[*src]>>8) & 0xff; ++ x_image->data[pixelcount++] ++ = pixels[*src] & 0xff; ++ } else { ++ x_image->data[pixelcount++] ++ = pixels[*src] & 0xff; ++ x_image->data[pixelcount++] ++ = (pixels[*src]>>8) & 0xff; ++ } + } else { /* 24 or 32 bits */ + if (x_image->byte_order == MSBFirst) { + x_image->data[pixelcount++] = 0; +@@ -607,8 +633,11 @@ + #endif + if (x_depth == 8) + XFreeColormap(x_display, cmap); ++ freepixmaps(dlinfo); + return; +- case 3: exit(0); ++ case 3: ++ freepixmaps(dlinfo); ++ exit(0); + } + } + } |