void setup(void);
void spawn(const void *arg);
void tag(const void *arg);
-uint textnw(const char *text, uint len);
+int textnw(const char *text, uint len);
void tile(void);
void togglebar(const void *arg);
void togglefloating(const void *arg);
void
buttonpress(XEvent *e) {
- uint i, x, mask;
+ uint i, mask;
+ int x;
Client *c;
XButtonPressedEvent *ev = &e->xbutton;
if(!len)
return;
if(len < olen)
- for(i = len; i && i > len - 3; buf[--i] = '.');
+ for(i = len; i >= MAX(0, len - 3); buf[i--] = '.');
XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
if(dc.font.set)
XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
void
setup(void) {
- uint i, w;
+ uint i;
+ int w;
XSetWindowAttributes wa;
/* init screen */
}
}
-uint
+int
textnw(const char *text, uint len) {
XRectangle r;