10 char ui_helpline__current[512];
12 static void nop_helpline__pop(void)
16 static void nop_helpline__push(const char *msg __maybe_unused)
20 static int nop_helpline__show(const char *fmt __maybe_unused,
21 va_list ap __maybe_unused)
26 static struct ui_helpline default_helpline_fns = {
27 .pop = nop_helpline__pop,
28 .push = nop_helpline__push,
29 .show = nop_helpline__show,
32 struct ui_helpline *helpline_fns = &default_helpline_fns;
34 void ui_helpline__pop(void)
39 void ui_helpline__push(const char *msg)
41 helpline_fns->push(msg);
44 void ui_helpline__vpush(const char *fmt, va_list ap)
48 if (vasprintf(&s, fmt, ap) < 0)
49 vfprintf(stderr, fmt, ap);
56 void ui_helpline__fpush(const char *fmt, ...)
61 ui_helpline__vpush(fmt, ap);
65 void ui_helpline__puts(const char *msg)
68 ui_helpline__push(msg);
71 int ui_helpline__vshow(const char *fmt, va_list ap)
73 return helpline_fns->show(fmt, ap);