aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2016-10-04 15:18:20 +0000
committerokan2016-10-04 15:18:20 +0000
commit2e16db28638cf0e78e6ddae11521a1f589179f67 (patch)
treef968e38ac24cbd0b42a301ffcc7cefd2a5052415 /group.c
parentda816a4a2336765be3b75ca8c08375463fdf31b8 (diff)
downloadcwm-2e16db28638cf0e78e6ddae11521a1f589179f67.tar.gz
Turn CALMWM_NGROUPS define into variable, ngroups.
Diffstat (limited to 'group.c')
-rw-r--r--group.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/group.c b/group.c
index 93c72b9..abf3b7b 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.122 2016/09/02 16:07:11 okan Exp $
+ * $OpenBSD: group.c,v 1.123 2016/10/04 15:18:20 okan Exp $
*/
#include <sys/types.h>
@@ -154,7 +154,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
struct screen_ctx *sc = cc->sc;
struct group_ctx *gc;
- if (idx < 0 || idx >= CALMWM_NGROUPS)
+ if (idx < 0 || idx >= Conf.ngroups)
errx(1, "group_movetogroup: index out of range (%d)", idx);
TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -222,7 +222,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
{
struct group_ctx *gc;
- if (idx < 0 || idx >= CALMWM_NGROUPS)
+ if (idx < 0 || idx >= Conf.ngroups)
errx(1, "group_hidetoggle: index out of range (%d)", idx);
TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -245,7 +245,7 @@ group_only(struct screen_ctx *sc, int idx)
{
struct group_ctx *gc;
- if (idx < 0 || idx >= CALMWM_NGROUPS)
+ if (idx < 0 || idx >= Conf.ngroups)
errx(1, "group_only: index out of range (%d)", idx);
TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -335,7 +335,7 @@ group_restore(struct client_ctx *cc)
return(0);
num = (*grpnum == -1) ? 0 : *grpnum;
- num = MIN(num, (CALMWM_NGROUPS - 1));
+ num = MIN(num, (Conf.ngroups - 1));
XFree(grpnum);
TAILQ_FOREACH(gc, &sc->groupq, entry) {