Check ignore windowname for truncation and provide user feedback during

config parse; based on a discussion with Tiago Cunha.
This commit is contained in:
okan
2014-01-28 20:22:21 +00:00
parent df15337a9f
commit c28467cda5
3 changed files with 10 additions and 4 deletions

6
conf.c
View File

@@ -73,16 +73,18 @@ conf_autogroup(struct conf *c, int no, const char *val)
TAILQ_INSERT_TAIL(&c->autogroupq, aw, entry);
}
void
int
conf_ignore(struct conf *c, const char *val)
{
struct winmatch *wm;
wm = xcalloc(1, sizeof(*wm));
(void)strlcpy(wm->title, val, sizeof(wm->title));
if (strlcpy(wm->title, val, sizeof(wm->title)) >= sizeof(wm->title))
return (0);
TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry);
return (1);
}
static const char *color_binds[] = {