mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
more nitems usage.
ok oga@
This commit is contained in:
parent
c8ea76a965
commit
d39f5b9183
6
conf.c
6
conf.c
@ -414,7 +414,6 @@ static struct {
|
|||||||
{.i = (CWM_LEFT|CWM_PTRMOVE|CWM_BIGMOVE)} },
|
{.i = (CWM_LEFT|CWM_PTRMOVE|CWM_BIGMOVE)} },
|
||||||
{ "bigptrmoveright", kbfunc_moveresize, 0,
|
{ "bigptrmoveright", kbfunc_moveresize, 0,
|
||||||
{.i = (CWM_RIGHT|CWM_PTRMOVE|CWM_BIGMOVE)} },
|
{.i = (CWM_RIGHT|CWM_PTRMOVE|CWM_BIGMOVE)} },
|
||||||
{ NULL, NULL, 0, {0}},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -503,7 +502,7 @@ conf_bindname(struct conf *c, char *name, char *binding)
|
|||||||
if (strcmp("unmap", binding) == 0)
|
if (strcmp("unmap", binding) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (iter = 0; name_to_kbfunc[iter].tag != NULL; iter++) {
|
for (iter = 0; iter < nitems(name_to_kbfunc); iter++) {
|
||||||
if (strcmp(name_to_kbfunc[iter].tag, binding) != 0)
|
if (strcmp(name_to_kbfunc[iter].tag, binding) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -558,7 +557,6 @@ static struct {
|
|||||||
{ "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT },
|
{ "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT },
|
||||||
{ "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT },
|
{ "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT },
|
||||||
{ "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },
|
{ "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },
|
||||||
{ NULL, NULL, 0 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -594,7 +592,7 @@ conf_mousebind(struct conf *c, char *name, char *binding)
|
|||||||
if (strcmp("unmap", binding) == 0)
|
if (strcmp("unmap", binding) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (iter = 0; name_to_mousefunc[iter].tag != NULL; iter++) {
|
for (iter = 0; iter < nitems(name_to_mousefunc); iter++) {
|
||||||
if (strcmp(name_to_mousefunc[iter].tag, binding) != 0)
|
if (strcmp(name_to_mousefunc[iter].tag, binding) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user