commit - 2b2d2872b6aacc66cdcc7af08ab684c12616c33d
commit + 7f963c410faa911376fc67144d2ca817d7cfeae8
blob - 13a09a1ddd29c5bb8469aca4f7fe0280cf245ddd
blob + b2b5ba11415b0529872c05bb984076dcc8674f38
--- cmd.c
+++ cmd.c
#include "telescope.h"
#include "cmd.gen.h"
-
-#define message ui_notify
void
cmd_previous_line(struct buffer *buffer)
blob - a18a392efaceabe18fa5d414c9d28b25a932ddd3
blob + 8f703a8004b5c1182a58ab48dc598b2fab8dc327
--- telescope.c
+++ telescope.c
memcpy(&res, imsg->data, sizeof(res));
if (res == 0)
- ui_notify("Added to bookmarks!");
+ message("Added to bookmarks!");
else
- ui_notify("Failed to add to bookmarks: %s",
+ message("Failed to add to bookmarks: %s",
strerror(res));
}
die();
memcpy(&res, imsg->data, datalen);
if (res != 0)
- ui_notify("Failed to save the cert for: %s",
+ message("Failed to save the cert for: %s",
strerror(res));
}
die();
memcpy(&res, imsg->data, datalen);
if (!res)
- ui_notify("Failed to update the certificate");
+ message("Failed to update the certificate");
}
static void
blob - f6f9fc1db5be5a52a95bb4725e7ba43ed15fd45f
blob + b2fda67e5ed87f070bdd5c087176db0c911d9125
--- telescope.h
+++ telescope.h
void lu_self_insert(void);
void lu_select(void);
void bp_select(void);
+void vmessage(const char*, va_list);
+void message(const char*, ...) __attribute__((format(printf, 1, 2)));
void start_loading_anim(struct tab *tab);
void load_url_in_tab(struct tab *, const char *);
void enter_minibuffer(void(*)(void), void(*)(void), void(*)(void), struct histhead *);
void ui_require_input(struct tab*, int);
void ui_read(const char*, void(*)(const char*, unsigned int), unsigned int);
void ui_yornp(const char*, void (*)(int, unsigned int), unsigned int);
-void ui_notify(const char*, ...) __attribute__((format(printf, 1, 2)));
void ui_end(void);
/* utf.8 */
blob - 867e350f864d47b60e15ec7ac4d51321c54c334a
blob + 090f91e96b4d0ed0c5f340ab971aa688af5a4ad0
--- ui.c
+++ ui.c
static void emit_help_item(char*, void*);
static void rec_compute_help(struct kmap*, char*, size_t);
static void recompute_help(void);
-static void vmessage(const char*, va_list);
-static void message(const char*, ...) __attribute__((format(printf, 1, 2)));
static void update_loading_anim(int, short, void*);
static void stop_loading_anim(struct tab*);
static void session_new_tab_cb(const char*);
wrap_page(&helpwin, help_cols);
}
-static void
+void
vmessage(const char *fmt, va_list ap)
{
if (evtimer_pending(&clminibufev, NULL))
}
}
-static void
+void
message(const char *fmt, ...)
{
va_list ap;
strlcpy(ministate.prompt, prompt, len);
strlcat(ministate.prompt, ": ", len);
redraw_tab(current_tab());
-}
-
-void
-ui_notify(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vmessage(fmt, ap);
- va_end(ap);
}
void