summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-24 18:07:56 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-24 18:07:56 +0200
commitd6e4b2cc87b6c38bd79f3c1b7350717ded8f4b7b (patch)
tree531d33220ec33d450eda1b35570a064621065b96
parent175a4e2fa5a751a10e783d33e4c4bec66b2a9a3a (diff)
downloadweechat-d6e4b2cc87b6c38bd79f3c1b7350717ded8f4b7b.zip
core: add date and date_printed of each line in dump of buffers
-rw-r--r--src/gui/gui-buffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 40961501a..8e5c2ce13 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -3006,6 +3006,7 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer)
struct t_gui_line *ptr_line;
int num_line;
char *prefix_without_colors, *message_without_colors, *tags;
+ char buf[256];
log_printf ("[buffer dump hexa (addr:0x%lx)]", buffer);
num_line = 1;
@@ -3031,6 +3032,12 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer)
log_printf (" tags: %s", (tags) ? tags : "(none)");
if (tags)
free (tags);
+ snprintf (buf, sizeof (buf), "%s", ctime (&ptr_line->data->date));
+ buf[strlen (buf) - 1] = '\0';
+ log_printf (" date: %d = %s", ptr_line->data->date, buf);
+ snprintf (buf, sizeof (buf), "%s", ctime (&ptr_line->data->date_printed));
+ buf[strlen (buf) - 1] = '\0';
+ log_printf (" date_printed: %d = %s", ptr_line->data->date_printed, buf);
/* display raw message for line */
if (ptr_line->data->message)