Merge branch 'master' into next
This commit is contained in:
commit
afff328c59
|
@ -1001,10 +1001,25 @@ workspace:
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG("Should assign workspace %s to output %s\n", ws_name, $4);
|
DLOG("Should assign workspace %s to output %s\n", ws_name, $4);
|
||||||
struct Workspace_Assignment *assignment = scalloc(sizeof(struct Workspace_Assignment));
|
/* Check for earlier assignments of the same workspace so that we
|
||||||
assignment->name = ws_name;
|
* don’t have assignments of a single workspace to different
|
||||||
assignment->output = $4;
|
* outputs */
|
||||||
TAILQ_INSERT_TAIL(&ws_assignments, assignment, ws_assignments);
|
struct Workspace_Assignment *assignment;
|
||||||
|
bool duplicate = false;
|
||||||
|
TAILQ_FOREACH(assignment, &ws_assignments, ws_assignments) {
|
||||||
|
if (strcasecmp(assignment->name, ws_name) == 0) {
|
||||||
|
ELOG("You have a duplicate workspace assignment for workspace \"%s\"\n",
|
||||||
|
ws_name);
|
||||||
|
assignment->output = $4;
|
||||||
|
duplicate = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!duplicate) {
|
||||||
|
assignment = scalloc(sizeof(struct Workspace_Assignment));
|
||||||
|
assignment->name = ws_name;
|
||||||
|
assignment->output = $4;
|
||||||
|
TAILQ_INSERT_TAIL(&ws_assignments, assignment, ws_assignments);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| TOKWORKSPACE NUMBER workspace_name
|
| TOKWORKSPACE NUMBER workspace_name
|
||||||
|
|
Loading…
Reference in New Issue