summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-07-05 08:18:09 -0500
committerepoch <epoch@hacking.allowed.org>2020-07-05 08:18:09 -0500
commitd9708580e6679a9b9924856b59b0133d15fda2c2 (patch)
tree11658e7f6f207d937f87229f3e79c9222e770736 /src
parentf0083dfdcb930b1014bbbd7c98207b7255bcc4c8 (diff)
downloadhackvr-d9708580e6679a9b9924856b59b0133d15fda2c2.tar.gz
hackvr-d9708580e6679a9b9924856b59b0133d15fda2c2.zip
subsume got multiple group globbing and actually works again
Diffstat (limited to 'src')
-rw-r--r--src/hackvr.c19
1 files 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;
}