Remove a dead MASTER_SITE. Use PLIST_SUBST instead of local hack. Create app-defaults dir if missing (solves pkg/13179). Don't hardwire incorrect app-defaults path in patch-at.
83 lines
3 KiB
Text
83 lines
3 KiB
Text
$NetBSD: patch-at,v 1.5 2001/11/29 18:00:32 wiz Exp $
|
|
|
|
--- x11.c.orig Mon Nov 18 23:00:50 1991
|
|
+++ x11.c Fri Feb 2 20:01:06 2001
|
|
@@ -19,8 +19,9 @@
|
|
#include <stdio.h>
|
|
#include <ctype.h>
|
|
-#if ( !defined(mips) && !defined(TOPIX) ) || defined(ultrix)
|
|
+#include <sys/param.h>
|
|
+#if ( !defined(mips) && !defined(TOPIX) ) || defined(ultrix) || (defined(BSD) && BSD >= 199306)
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
-#include <sys/param.h>
|
|
+#include <string.h>
|
|
#else
|
|
#ifdef SYSTYPE_BSD43
|
|
@@ -31,13 +32,14 @@
|
|
#include <bsd/sys/types.h>
|
|
#include <bsd/sys/time.h>
|
|
-#include <sys/param.h>
|
|
#else
|
|
#include <sys/bsd_time.h>
|
|
#endif /*TOPIX*/
|
|
#endif /*SYSTYPE_BSD43*/
|
|
-#endif /*( !defined(mips) && !defined(TOPIX) ) || defined(ultrix)*/
|
|
+#endif /*( !defined(mips) && !defined(TOPIX) ) || defined(ultrix) || (defined(BSD) && BSD >= 199306) */
|
|
#include "faces.h"
|
|
#include "extern.h"
|
|
|
|
+#include <sys/param.h>
|
|
+
|
|
#ifdef HASPOLL
|
|
#include <poll.h>
|
|
@@ -59,5 +61,4 @@
|
|
#define F_ICON 0 /* Icon index to frame array. */
|
|
#define F_WINDOW 1 /* Window index to frame array. */
|
|
-#define FACES_BORDER_WIDTH 2
|
|
#define FRAME_MASK (ButtonPressMask | ExposureMask | \
|
|
ButtonMotionMask | KeyPressMask)
|
|
@@ -365,9 +366,11 @@
|
|
gc_mask = GCFont | GCForeground | GCBackground | GCGraphicsExposures ;
|
|
gc_val.font = sfont->fid ;
|
|
- gc_val.foreground = foregnd ;
|
|
- gc_val.background = backgnd ;
|
|
+ gc_val.foreground = BlackPixel(dpy, screen) ;
|
|
+ gc_val.background = WhitePixel(dpy, screen) ;
|
|
gc_val.graphics_exposures = False ;
|
|
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
|
|
|
|
+ gc_val.foreground = foregnd ;
|
|
+ gc_val.background = backgnd ;
|
|
tilegc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
|
|
if (depth == 1) XSetFillStyle(dpy, tilegc, FillOpaqueStippled) ;
|
|
@@ -460,5 +463,9 @@
|
|
home = getenv("HOME") ;
|
|
XrmInitialize() ;
|
|
+#if (defined(BSD) && BSD >= 199306)
|
|
+ STRCPY(name, "@x11prefix@/lib/X11/app-defaults/Faces") ;
|
|
+#else
|
|
STRCPY(name, "/usr/lib/X11/app-defaults/Faces") ;
|
|
+#endif
|
|
|
|
/* Get applications defaults file, if any. */
|
|
@@ -577,5 +584,5 @@
|
|
|
|
frame[F_WINDOW] = XCreateWindow(dpy, root, size.x, size.y,
|
|
- size.width, size.height, FACES_BORDER_WIDTH,
|
|
+ size.width, size.height, border_width,
|
|
CopyFromParent, InputOutput, CopyFromParent,
|
|
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
|
|
@@ -584,5 +591,5 @@
|
|
|
|
frame[F_ICON] = XCreateWindow(dpy, root,
|
|
- ix, iy, imagewidth, imageheight, FACES_BORDER_WIDTH,
|
|
+ ix, iy, imagewidth, imageheight, border_width,
|
|
CopyFromParent, InputOutput, CopyFromParent,
|
|
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
|
|
@@ -857,4 +864,5 @@
|
|
(unsigned int) textwidth+2, 13) ;
|
|
XSetFunction(dpy, gc, GXxor) ;
|
|
+ XSetForeground(dpy, gc, WhitePixel(dpy, screen));
|
|
XDrawImageString(dpy, pr[(int) dtype], gc, x, y, str, len) ;
|
|
XSetFunction(dpy, gc, GXcopy) ;
|