#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
-#include <X11/cursorfont.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
len = strlen(text);
buf[0] = 0;
- num = XLookupString(e, buf, sizeof(buf), &ksym, 0);
+ num = XLookupString(e, buf, sizeof buf, &ksym, 0);
if(IsFunctionKey(ksym) || IsKeypadKey(ksym)
|| IsMiscFunctionKey(ksym) || IsPFKey(ksym)
|| IsPrivateKeypadKey(ksym))
case XK_Tab:
if(!sel)
return;
- strncpy(text, sel->text, sizeof(text));
+ strncpy(text, sel->text, sizeof text);
match(text);
break;
case XK_Right:
if(num && !iscntrl((int) buf[0])) {
buf[num] = 0;
if(len > 0)
- strncat(text, buf, sizeof(text));
+ strncat(text, buf, sizeof text);
else
- strncpy(text, buf, sizeof(text));
+ strncpy(text, buf, sizeof text);
match(text);
}
}
Item *i, *new;
i = 0;
- while(fgets(buf, sizeof(buf), stdin)) {
+ while(fgets(buf, sizeof buf, stdin)) {
len = strlen(buf);
if (buf[len - 1] == '\n')
buf[len - 1] = 0;
DefaultDepth(dpy, screen), CopyFromParent,
DefaultVisual(dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
- XDefineCursor(dpy, win, XCreateFontCursor(dpy, XC_xterm));
/* pixmap */
dc.drawable = XCreatePixmap(dpy, root, mw, mh, DefaultDepth(dpy, screen));
dc.gc = XCreateGC(dpy, root, 0, 0);