Re: [dwm] [skb] skb-0.2 Simple xkb status

From: pancake <pancake_AT_youterm.com>
Date: Sat, 3 Mar 2007 20:32:11 +0100

Fix the missing initialization.

--- skb.c.orig 2007-03-03 20:28:19.000000000 +0100
+++ skb.c 2007-03-03 20:31:13.000000000 +0100
@@ -77,6 +77,7 @@
        char active[256];
        int active_group;
        int i=0,j=0,k=0;
+ groups[0] = active[0] = '\0';
         if(!(dpy = XOpenDisplay(0)))
                fprintf(stderr,"skb: cannot open display\n");
         if (!(kb = XkbAllocKeyboard()))
@@ -107,7 +108,7 @@
                i++;
        }
 
- active[strlen(active)]='\0';
+ active[3]='\0';
        puts(active);
        //printf("num of gr: %d, active_group: %d, groups: %s act: %s\n", num_groups, active_group, groups, active);
        return 0;

On Sat, 3 Mar 2007 20:51:33 +0300
Alexander Polakov <polachok_AT_gmail.com> wrote:

> * pancake <pancake_AT_youterm.com> [070303 20:45]:
> > BTW Can't understand how this tool works/should be used.
> >
> It should print current xkb layout on stdin for use with dwm status bar if you have sth like:
> Option "XkbLayout" "us,ru(winkeys)" in /etc/X11/xorg.conf
> --
> Alexander Polakov | http://polachok.livejournal.com
>

  --pancake
Received on Sat Mar 03 2007 - 19:32:20 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:38:30 UTC