diff --git a/calmwm.c b/calmwm.c index c20c018..65dc49f 100644 --- a/calmwm.c +++ b/calmwm.c @@ -165,7 +165,7 @@ x_errorhandler(Display *dpy, XErrorEvent *e) XGetErrorDatabaseText(X_Dpy, "XRequest", number, "", req, sizeof(req)); - warnx("%s(0x%x): %s", req, (u_int)e->resourceid, msg); + warnx("%s(0x%x): %s", req, (unsigned int)e->resourceid, msg); #endif return (0); } diff --git a/calmwm.h b/calmwm.h index dbeddc7..831fbe2 100644 --- a/calmwm.h +++ b/calmwm.h @@ -149,7 +149,7 @@ struct client_ctx { struct screen_ctx *sc; Window win; Colormap colormap; - u_int bwidth; /* border width */ + unsigned int bwidth; /* border width */ struct geom geom, savegeom, fullgeom; struct { long flags; /* defined hints */ @@ -257,7 +257,7 @@ struct keybinding { TAILQ_ENTRY(keybinding) entry; void (*callback)(struct client_ctx *, union arg *); union arg argument; - u_int modmask; + unsigned int modmask; KeySym keysym; #define KBFLAG_NEEDCLIENT 0x0001 int flags; @@ -269,8 +269,8 @@ struct mousebinding { TAILQ_ENTRY(mousebinding) entry; void (*callback)(struct client_ctx *, union arg *); union arg argument; - u_int modmask; - u_int button; + unsigned int modmask; + unsigned int button; #define MOUSEBIND_CTX_ROOT 0x0001 #define MOUSEBIND_CTX_WIN 0x0002 int flags; @@ -323,9 +323,9 @@ struct conf { /* MWM hints */ struct mwm_hints { - u_long flags; - u_long functions; - u_long decorations; + unsigned long flags; + unsigned long functions; + unsigned long decorations; }; #define MWM_NUMHINTS 3 #define PROP_MWM_HINTS_ELEMENTS 3 @@ -540,15 +540,15 @@ void conf_screen(struct screen_ctx *); void xev_loop(void); -void xu_btn_grab(Window, int, u_int); +void xu_btn_grab(Window, int, unsigned int); void xu_btn_ungrab(Window); int xu_getprop(Window, Atom, Atom, long, unsigned char **); int xu_getstrprop(Window, Atom, char **); -void xu_key_grab(Window, u_int, KeySym); +void xu_key_grab(Window, unsigned int, KeySym); void xu_key_ungrab(Window); void xu_ptr_getpos(Window, int *, int *); -int xu_ptr_grab(Window, u_int, Cursor); -int xu_ptr_regrab(u_int, Cursor); +int xu_ptr_grab(Window, unsigned int, Cursor); +int xu_ptr_regrab(unsigned int, Cursor); void xu_ptr_setpos(Window, int, int); void xu_ptr_ungrab(void); void xu_xft_draw(struct screen_ctx *, const char *, diff --git a/conf.c b/conf.c index fd81863..55ca659 100644 --- a/conf.c +++ b/conf.c @@ -31,7 +31,7 @@ #include "calmwm.h" -static const char *conf_bind_getmask(const char *, u_int *); +static const char *conf_bind_getmask(const char *, unsigned int *); static void conf_unbind_kbd(struct conf *, struct keybinding *); static void conf_unbind_mouse(struct conf *, struct mousebinding *); @@ -100,7 +100,7 @@ static char *color_binds[] = { void conf_screen(struct screen_ctx *sc) { - u_int i; + unsigned int i; XftColor xc; sc->gap = Conf.gap; @@ -224,7 +224,7 @@ mouse_binds[] = { void conf_init(struct conf *c) { - u_int i; + unsigned int i; (void)memset(c, 0, sizeof(*c)); @@ -454,11 +454,11 @@ static struct { }; static const char * -conf_bind_getmask(const char *name, u_int *mask) +conf_bind_getmask(const char *name, unsigned int *mask) { char *dash; const char *ch; - u_int i; + unsigned int i; *mask = 0; if ((dash = strchr(name, '-')) == NULL) @@ -477,7 +477,7 @@ conf_bind_kbd(struct conf *c, char *name, char *binding) { struct keybinding *current_binding; const char *substring; - u_int i, mask; + unsigned int i, mask; current_binding = xcalloc(1, sizeof(*current_binding)); substring = conf_bind_getmask(name, &mask); @@ -564,7 +564,7 @@ conf_bind_mouse(struct conf *c, char *name, char *binding) { struct mousebinding *current_binding; const char *errstr, *substring; - u_int button, i, mask; + unsigned int button, i, mask; current_binding = xcalloc(1, sizeof(*current_binding)); substring = conf_bind_getmask(name, &mask); @@ -634,7 +634,7 @@ static int cursor_binds[] = { void conf_cursor(struct conf *c) { - u_int i; + unsigned int i; for (i = 0; i < nitems(cursor_binds); i++) c->cursor[i] = XCreateFontCursor(X_Dpy, cursor_binds[i]); diff --git a/kbfunc.c b/kbfunc.c index 394acc4..1f7d57a 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -58,7 +58,7 @@ kbfunc_client_moveresize(struct client_ctx *cc, union arg *arg) struct screen_ctx *sc = cc->sc; struct geom xine; int x, y, flags, amt; - u_int mx, my; + unsigned int mx, my; if (cc->flags & CLIENT_FREEZE) return; diff --git a/menu.c b/menu.c index e243140..7e3cb7b 100644 --- a/menu.c +++ b/menu.c @@ -522,8 +522,8 @@ menu_calc_entry(struct menu_ctx *mc, int x, int y) static int menu_keycode(XKeyEvent *ev, enum ctltype *ctl, char *chr) { - KeySym ks; - u_int state = ev->state; + KeySym ks; + unsigned int state = ev->state; *ctl = CTL_NONE; chr[0] = '\0'; diff --git a/screen.c b/screen.c index 0e2c0a1..6dfc0d4 100644 --- a/screen.c +++ b/screen.c @@ -37,7 +37,7 @@ screen_init(int which) Window *wins, w0, w1; XWindowAttributes winattr; XSetWindowAttributes rootattr; - u_int nwins, i; + unsigned int nwins, i; sc = xcalloc(1, sizeof(*sc)); @@ -105,7 +105,7 @@ screen_updatestackingorder(struct screen_ctx *sc) { Window *wins, w0, w1; struct client_ctx *cc; - u_int nwins, i, s; + unsigned int nwins, i, s; if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) return; diff --git a/search.c b/search.c index bde8319..c34e0b0 100644 --- a/search.c +++ b/search.c @@ -253,8 +253,8 @@ search_match_exec_path(struct menu_q *menuq, struct menu_q *resultq, char *searc static int strsubmatch(char *sub, char *str, int zeroidx) { - size_t len, sublen; - u_int n, flen; + size_t len, sublen; + unsigned int n, flen; if (sub == NULL || str == NULL) return (0); diff --git a/xevents.c b/xevents.c index f638fac..4b77e82 100644 --- a/xevents.c +++ b/xevents.c @@ -265,7 +265,7 @@ xev_handle_keypress(XEvent *ee) struct client_ctx *cc = NULL, fakecc; struct keybinding *kb; KeySym keysym, skeysym; - u_int modshift; + unsigned int modshift; keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0); skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1); @@ -308,7 +308,7 @@ xev_handle_keyrelease(XEvent *ee) XKeyEvent *e = &ee->xkey; struct screen_ctx *sc; KeySym keysym; - u_int i; + unsigned int i; sc = screen_fromroot(e->root); diff --git a/xutil.c b/xutil.c index bc37558..1884d5f 100644 --- a/xutil.c +++ b/xutil.c @@ -33,9 +33,9 @@ static unsigned int ign_mods[] = { 0, LockMask, Mod2Mask, Mod2Mask | LockMask }; void -xu_btn_grab(Window win, int mask, u_int btn) +xu_btn_grab(Window win, int mask, unsigned int btn) { - u_int i; + unsigned int i; for (i = 0; i < nitems(ign_mods); i++) XGrabButton(X_Dpy, btn, (mask | ign_mods[i]), win, @@ -50,10 +50,10 @@ xu_btn_ungrab(Window win) } void -xu_key_grab(Window win, u_int mask, KeySym keysym) +xu_key_grab(Window win, unsigned int mask, KeySym keysym) { - KeyCode code; - u_int i; + KeyCode code; + unsigned int i; code = XKeysymToKeycode(X_Dpy, keysym); if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) && @@ -72,7 +72,7 @@ xu_key_ungrab(Window win) } int -xu_ptr_grab(Window win, u_int mask, Cursor curs) +xu_ptr_grab(Window win, unsigned int mask, Cursor curs) { return (XGrabPointer(X_Dpy, win, False, mask, GrabModeAsync, GrabModeAsync, @@ -80,7 +80,7 @@ xu_ptr_grab(Window win, u_int mask, Cursor curs) } int -xu_ptr_regrab(u_int mask, Cursor curs) +xu_ptr_regrab(unsigned int mask, Cursor curs) { return (XChangeActivePointerGrab(X_Dpy, mask, curs, CurrentTime) == GrabSuccess ? 0 : -1); @@ -95,9 +95,9 @@ xu_ptr_ungrab(void) void xu_ptr_getpos(Window win, int *x, int *y) { - Window w0, w1; - int tmp0, tmp1; - u_int tmp2; + Window w0, w1; + int tmp0, tmp1; + unsigned int tmp2; XQueryPointer(X_Dpy, win, &w0, &w1, &tmp0, &tmp1, x, y, &tmp2); } @@ -111,9 +111,9 @@ xu_ptr_setpos(Window win, int x, int y) int xu_getprop(Window win, Atom atm, Atom type, long len, unsigned char **p) { - Atom realtype; - u_long n, extra; - int format; + Atom realtype; + unsigned long n, extra; + int format; if (XGetWindowProperty(X_Dpy, win, atm, 0L, len, False, type, &realtype, &format, &n, &extra, p) != Success || *p == NULL) @@ -321,7 +321,7 @@ void xu_ewmh_handle_net_wm_state_msg(struct client_ctx *cc, int action, Atom first, Atom second) { - u_int i; + unsigned int i; static struct handlers { int atom; int property;