Make status_message_set a variadic printf-like function. No functional change -

helpful for a couple of things coming soon.
This commit is contained in:
Nicholas Marriott
2009-07-15 17:39:00 +00:00
parent 780fd8f7a6
commit 92da443a9e
6 changed files with 13 additions and 10 deletions

View File

@ -74,14 +74,14 @@ cmd_select_prompt_callback(void *data, const char *s)
idx = strtonum(s, 0, UINT_MAX, &errstr);
if (errstr != NULL) {
xsnprintf(msg, sizeof msg, "Index %s: %s", errstr, s);
status_message_set(c, msg);
status_message_set(c, "%s", msg);
return (0);
}
if (winlink_find_by_index(&c->session->windows, idx) == NULL) {
xsnprintf(msg, sizeof msg,
"Window not found: %s:%d", c->session->name, idx);
status_message_set(c, msg);
status_message_set(c, "%s", msg);
return (0);
}