about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/ui.h1
-rw-r--r--src/ui_windows.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/src/ui.h b/src/ui.h
index 4e94b1da..d336af08 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -155,6 +155,7 @@ void cons_show_connection_prefs(void);
 void cons_show_account(ProfAccount *account);
 void cons_bad_command(const char * const cmd);
 void cons_show(const char * const cmd, ...);
+void cons_debug(const char * const msg, ...);
 void cons_show_time(void);
 void cons_show_word(const char * const word);
 void cons_bad_show(const char * const cmd, ...);
diff --git a/src/ui_windows.c b/src/ui_windows.c
index e6b343d3..ba755ff2 100644
--- a/src/ui_windows.c
+++ b/src/ui_windows.c
@@ -1636,6 +1636,30 @@ cons_show(const char * const msg, ...)
 }
 
 void
+cons_debug(const char * const msg, ...)
+{
+    if (strcmp(PACKAGE_STATUS, "development") == 0) {
+        va_list arg;
+        va_start(arg, msg);
+        GString *fmt_msg = g_string_new(NULL);
+        g_string_vprintf(fmt_msg, msg, arg);
+        _win_show_time(console->win, '-');
+        wprintw(console->win, "%s\n", fmt_msg->str);
+        g_string_free(fmt_msg, TRUE);
+        va_end(arg);
+
+        if (current_index == 0) {
+            dirty = TRUE;
+        } else {
+            status_bar_new(0);
+        }
+
+        win_current_page_off();
+        ui_refresh();
+    }
+}
+
+void
 cons_show_word(const char * const word)
 {
     wprintw(console->win, "%s", word);