10 void ui_helpline__pop(void)
14 void ui_helpline__push(const char *msg)
16 SLsmg_gotorc(SLtt_Screen_Rows - 1, 0);
18 SLsmg_write_nstring((char *)msg, SLtt_Screen_Cols);
22 void ui_helpline__vpush(const char *fmt, va_list ap)
26 if (vasprintf(&s, fmt, ap) < 0)
27 vfprintf(stderr, fmt, ap);
34 void ui_helpline__fpush(const char *fmt, ...)
39 ui_helpline__vpush(fmt, ap);
43 void ui_helpline__puts(const char *msg)
46 ui_helpline__push(msg);
49 void ui_helpline__init(void)
51 ui_helpline__puts(" ");
54 char ui_helpline__last_msg[1024];
56 int ui_helpline__show_help(const char *format, va_list ap)
61 pthread_mutex_lock(&ui__lock);
62 ret = vsnprintf(ui_helpline__last_msg + backlog,
63 sizeof(ui_helpline__last_msg) - backlog, format, ap);
66 if (ui_helpline__last_msg[backlog - 1] == '\n') {
67 ui_helpline__puts(ui_helpline__last_msg);
71 pthread_mutex_unlock(&ui__lock);