Make window name and window class separate parameters to conf_autogroup.

No functional change, but will be used shortly.

ok okan@
This commit is contained in:
kspillner
2015-05-17 04:34:01 +00:00
parent 557cd382dc
commit d328f63c7d
3 changed files with 17 additions and 7 deletions

19
conf.c
View File

@@ -71,19 +71,28 @@ conf_cmd_remove(struct conf *c, const char *name)
}
}
void
conf_autogroup(struct conf *c, int num, const char *val)
conf_autogroup(struct conf *c, int num, const char *name, const char *class)
{
struct autogroupwin *aw;
char *p;
aw = xmalloc(sizeof(*aw));
if ((p = strchr(val, ',')) == NULL) {
aw->name = NULL;
aw->class = xstrdup(val);
if ((p = strchr(class, ',')) == NULL) {
if (name == NULL)
aw->name = NULL;
else
aw->name = xstrdup(name);
aw->class = xstrdup(class);
} else {
*(p++) = '\0';
aw->name = xstrdup(val);
if (name == NULL)
aw->name = xstrdup(class);
else
aw->name = xstrdup(name);
aw->class = xstrdup(p);
}
aw->num = num;