10 void ui_helpline__pop(void)
15 void ui_helpline__push(const char *msg)
17 newtPushHelpLine(msg);
20 void ui_helpline__vpush(const char *fmt, va_list ap)
24 if (vasprintf(&s, fmt, ap) < 0)
25 vfprintf(stderr, fmt, ap);
32 void ui_helpline__fpush(const char *fmt, ...)
37 ui_helpline__vpush(fmt, ap);
41 void ui_helpline__puts(const char *msg)
44 ui_helpline__push(msg);
47 void ui_helpline__init(void)
49 ui_helpline__puts(" ");
52 char ui_helpline__last_msg[1024];
54 int ui_helpline__show_help(const char *format, va_list ap)
59 pthread_mutex_lock(&ui__lock);
60 ret = vsnprintf(ui_helpline__last_msg + backlog,
61 sizeof(ui_helpline__last_msg) - backlog, format, ap);
64 if (ui_helpline__last_msg[backlog - 1] == '\n') {
65 ui_helpline__puts(ui_helpline__last_msg);
69 pthread_mutex_unlock(&ui__lock);