new_workspace null behavior + testmap functions + regex

This commit is contained in:
taiyu 2015-09-12 02:38:03 -07:00
parent f5343adae4
commit e1d18e42a8
12 changed files with 581 additions and 370 deletions

View file

@ -286,3 +286,28 @@ char *do_var_replacement(char *str) {
}
return str;
}
struct workspace_output *wsop_find_workspace(const char *name) {
int i, len = config->workspace_outputs->length;
struct workspace_output *wsop;
for (i = 0; i < len; ++i) {
wsop = config->workspace_outputs->items[i];
if (strcasecmp(wsop->workspace, name) == 0) {
return wsop;
}
}
return NULL;
}
struct workspace_output *wsop_find_output(const char *name) {
int i, len = config->workspace_outputs->length;
struct workspace_output *wsop;
for (i = 0; i < len; ++i) {
wsop = config->workspace_outputs->items[i];
if (strcasecmp(wsop->output, name) == 0) {
return wsop;
}
}
return NULL;
}