From e1d11722a750db804d9c601e9bf771ec5b8ec868 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 1 Mar 2019 14:32:01 +0000 Subject: Tie group number and name together during config. --- group.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'group.c') diff --git a/group.c b/group.c index c51bf51..289c294 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.132 2019/02/28 23:26:12 okan Exp $ + * $OpenBSD: group.c,v 1.133 2019/03/01 14:32:01 okan Exp $ */ #include @@ -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); -- cgit v1.2.3-2-gb3c3