summaryrefslogtreecommitdiff
path: root/games/jetpack/patches/patch-ad
blob: 349e86160ebe083aa5ea6e5522b6a8b5db3a549f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-ad,v 1.3 1998/11/12 23:34:31 frueauf Exp $

--- initx.c.orig	Sun Mar 29 12:41:21 1992
+++ initx.c	Thu Aug 27 10:32:51 1998
@@ -44,14 +44,19 @@
 	resulting fontname right into the code.
 */
 
-static char	*fontname = "-*-fixed-medium-r-normal--*-70-*-*-c-*-*-*";
+static char	*fontname = "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-*-*-*";
 static char	*bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*";
 
 /*	init_X opens the display and sets up all the color stuff
 */
 init_X()
 {
-    display = XOpenDisplay(NULL);
+    int saved_euid;
+
+    saved_euid = geteuid();
+    seteuid(getuid());
+    display = XOpenDisplay("");
+    seteuid(saved_euid);
     if (display == NULL) {
        fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n",
                XDisplayName(NULL));
@@ -162,8 +167,8 @@
 				case CWHITE:
 					tmpcolor.pixel = pixel | planes[2] | planes[1] | planes[0];
 					break;
-			}
-			XStoreColor(display, colormap, &tmpcolor);
+			} /*Store*/
+			XAllocColor(display, colormap, &tmpcolor);
 			ctable[i].pixelvalue = tmpcolor.pixel;
 		}
 	}