diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2019-03-01 14:32:02 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2019-03-01 14:32:02 +0000 |
commit | a4eb3a9ada31159b77e429e16f84989af8947759 (patch) | |
tree | a114daa3aab0dcbaf2e8af6a425a7cbf0fb4edab /app/cwm/group.c | |
parent | d6c519554efc91144b6187b3c4ab21ea0ce64402 (diff) |
Tie group number and name together during config.
Diffstat (limited to 'app/cwm/group.c')
-rw-r--r-- | app/cwm/group.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/cwm/group.c b/app/cwm/group.c index c51bf5124..289c29466 100644 --- a/app/cwm/group.c +++ b/app/cwm/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.132 2019/02/28 23:26:12 okan Exp $ + * $OpenBSD: group.c,v 1.133 2019/03/01 14:32:01 okan Exp $ */ #include <sys/types.h> @@ -37,11 +37,6 @@ static struct group_ctx *group_prev(struct group_ctx *); static void group_restack(struct group_ctx *); static void group_setactive(struct group_ctx *); -const char *num_to_name[] = { - "nogroup", "one", "two", "three", "four", "five", "six", - "seven", "eight", "nine" -}; - void group_assign(struct group_ctx *gc, struct client_ctx *cc) { @@ -124,13 +119,13 @@ group_restack(struct group_ctx *gc) } void -group_init(struct screen_ctx *sc, int num) +group_init(struct screen_ctx *sc, int num, const char *name) { struct group_ctx *gc; gc = xmalloc(sizeof(*gc)); gc->sc = sc; - gc->name = xstrdup(num_to_name[num]); + gc->name = xstrdup(name); gc->num = num; TAILQ_INIT(&gc->clientq); |