From d9708580e6679a9b9924856b59b0133d15fda2c2 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 5 Jul 2020 08:18:09 -0500 Subject: subsume got multiple group globbing and actually works again --- src/hackvr.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/hackvr.c b/src/hackvr.c index 6dea5b9..775564a 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -156,7 +156,7 @@ int hackvr_handler(char *line) { int len; int j,i,k,l; unsigned int key_count; - c3_group_rel_t *gr; + c3_group_rel_t *gr,*pgr; real tmpx,tmpy,tmpz; char **a; char **keys; @@ -447,8 +447,21 @@ int hackvr_handler(char *line) { /* ---------- */ if(helping) fprintf(stderr,"# subsume child-group\n"); if(!strcmp(command,"subsume")) { - gr=get_group_relative(a[2]);//we need the child's group relative... - gr->parent = gr->id; + if(strchr(a[2],'*')) { + for(i=0;i < global.ht_group.kl;i++) { + for(m=global.ht_group.bucket[global.ht_group.keys[i]]->ll;m;m=m->next) { + if(!glob_match(id,m->original)) { + gr=m->target; + pgr=get_group_relative(id); + gr->parent = pgr->id; + } + } + } + } else { + gr=get_group_relative(a[2]);//we need the child's group relative... + pgr=get_group_relative(id); + gr->parent = pgr->id; + } ret=0; return ret; } -- cgit v1.2.3