diff options
author | James Booth <boothj5@gmail.com> | 2012-10-03 22:06:04 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-10-03 22:06:04 +0100 |
commit | 6aa1fe55133b2a06addd598ee19c14dc0bae32d6 (patch) | |
tree | 881fc2b9707b1d91ddf1e24ecc50d9530ef84bea /src/windows.c | |
parent | a1476f1780044014d273fcb6f5facf82c1be724f (diff) | |
download | profani-tty-6aa1fe55133b2a06addd598ee19c14dc0bae32d6.tar.gz |
cons_show now uses vargs
Diffstat (limited to 'src/windows.c')
-rw-r--r-- | src/windows.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/windows.c b/src/windows.c index f6b8b24a..befb5a20 100644 --- a/src/windows.c +++ b/src/windows.c @@ -631,10 +631,16 @@ cons_bad_show(const char * const msg) } void -cons_show(const char * const msg) +cons_show(const char * const msg, ...) { + va_list arg; + va_start(arg, msg); + GString *fmt_msg = g_string_new(NULL); + g_string_vprintf(fmt_msg, msg, arg); _win_show_time(_cons_win); - wprintw(_cons_win, "%s\n", msg); + wprintw(_cons_win, "%s\n", fmt_msg->str); + g_string_free(fmt_msg, TRUE); + va_end(arg); if (_curr_prof_win == 0) dirty = TRUE; |