summaryrefslogtreecommitdiff
path: root/x11/xteddy/patches/patch-ac
blob: c5c26cd600edf7051ed7c5a98322ceda08d26b66 (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
38
39
40
41
42
$NetBSD: patch-ac,v 1.1 2006/09/10 13:39:40 schwarz Exp $

--- xteddy.c.orig	1998-04-23 09:58:17.000000000 +0200
+++ xteddy.c	2006-09-10 15:22:31.000000000 +0200
@@ -69,7 +69,8 @@
 /* Initializing filenames */
 {
 #define FBUFLEN  200
-   int      buflen, w, h, xhotret, yhotret;
+   int      buflen, xhotret, yhotret;
+   unsigned int w, h;
    char     fbuf[FBUFLEN];
 
    if ( !xteddy->teddy || !(strlen(xteddy->teddy)) ) return -1;
@@ -130,8 +131,8 @@
   XSetWindowAttributes setwinattr;
   XGCValues gcvalues;
   unsigned long valuemask, gcvaluemask, inputmask;
-  int x, y, geomflags, xw, xh;
-  unsigned int border_width = 0;
+  int x, y, geomflags;
+  unsigned int xw, xh, border_width = 0;
   unsigned int display_width, display_height, display_depth;
   Pixmap icon_pixmap, background_pixmap, shape_pixmap;
   XSizeHints size_hints;
@@ -168,14 +169,14 @@
   int offs_x, offs_y, new_x, new_y, tmp_x, tmp_y;
   unsigned int tmp_mask;
 
-  teddy.teddy = argv[0]; 
-
   /* Determine program name */
   if ((progname = strrchr(argv[0],'/')) == NULL)
     progname = argv[0];
   else
     progname++;
 
+  teddy.teddy = progname;
+
   /* Option handling: "-wm", "-float", "-noquit", "-mono", "-geometry" */
   /* and "-display" are recognized. See manual page for details. */
   /* -F<name> ... Other pixmap name */