[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-cvs] weechat/src guigui-buffer.c common/weelist.h co...
From: |
FlashCode |
Subject: |
[Weechat-cvs] weechat/src guigui-buffer.c common/weelist.h co... |
Date: |
Wed, 14 Jun 2006 15:43:33 +0000 |
CVSROOT: /sources/weechat
Module name: weechat
Changes by: FlashCode <flashcode> 06/06/14 15:43:33
Modified files:
src/gui : gui-buffer.c
src/common : weelist.h weelist.c completion.h completion.c
Log message:
Added completion info for buffers in crash/debug dump
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/weechat/src/gui/gui-buffer.c?cvsroot=weechat&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/weechat/src/common/weelist.h?cvsroot=weechat&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/weechat/src/common/weelist.c?cvsroot=weechat&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/weechat/src/common/completion.h?cvsroot=weechat&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/weechat/src/common/completion.c?cvsroot=weechat&r1=1.58&r2=1.59
Patches:
Index: gui/gui-buffer.c
===================================================================
RCS file: /sources/weechat/weechat/src/gui/gui-buffer.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gui/gui-buffer.c 10 Jun 2006 17:35:11 -0000 1.6
+++ gui/gui-buffer.c 14 Jun 2006 15:43:33 -0000 1.7
@@ -906,6 +906,7 @@
weechat_log_printf (" input_buffer_length. . : %d\n",
buffer->input_buffer_length);
weechat_log_printf (" input_buffer_pos . . . : %d\n",
buffer->input_buffer_pos);
weechat_log_printf (" input_buffer_1st_disp. : %d\n",
buffer->input_buffer_1st_display);
+ weechat_log_printf (" completion . . . . . . : 0x%X\n",
&(buffer->completion));
weechat_log_printf (" history. . . . . . . . : 0x%X\n", buffer->history);
weechat_log_printf (" last_history . . . . . : 0x%X\n",
buffer->last_history);
weechat_log_printf (" ptr_history. . . . . . : 0x%X\n",
buffer->ptr_history);
@@ -935,4 +936,7 @@
ptr_line = ptr_line->next_line;
}
+
+ weechat_log_printf ("\n");
+ completion_print_log (&(buffer->completion));
}
Index: common/weelist.h
===================================================================
RCS file: /sources/weechat/weechat/src/common/weelist.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- common/weelist.h 4 Jan 2006 08:56:01 -0000 1.2
+++ common/weelist.h 14 Jun 2006 15:43:33 -0000 1.3
@@ -30,8 +30,9 @@
t_weelist *next_weelist;
};
-t_weelist *weelist_search (t_weelist *, char *);
-t_weelist *weelist_add (t_weelist **, t_weelist **, char *);
-void weelist_remove (t_weelist **, t_weelist **, t_weelist *);
+extern t_weelist *weelist_search (t_weelist *, char *);
+extern t_weelist *weelist_add (t_weelist **, t_weelist **, char *);
+extern void weelist_remove (t_weelist **, t_weelist **, t_weelist *);
+extern void weelist_print_log (t_weelist *, char *);
#endif /* weelist.h */
Index: common/weelist.c
===================================================================
RCS file: /sources/weechat/weechat/src/common/weelist.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- common/weelist.c 4 Jan 2006 08:56:01 -0000 1.4
+++ common/weelist.c 14 Jun 2006 15:43:33 -0000 1.5
@@ -29,6 +29,7 @@
#include "weechat.h"
#include "weelist.h"
+#include "log.h"
/*
@@ -163,3 +164,22 @@
free (element);
*weelist = new_weelist;
}
+
+/*
+ * weelist_print_log: print weelist in log (usually for crash dump)
+ */
+
+void
+weelist_print_log (t_weelist *weelist, char *name)
+{
+ t_weelist *ptr_weelist;
+
+ for (ptr_weelist = weelist; ptr_weelist;
+ ptr_weelist = ptr_weelist->next_weelist)
+ {
+ weechat_log_printf ("[%s (addr:0x%X)]\n", name, ptr_weelist);
+ weechat_log_printf (" data . . . . . . . . . : '%s'\n",
ptr_weelist->data);
+ weechat_log_printf (" prev_weelist . . . . . : 0x%X\n",
ptr_weelist->prev_weelist);
+ weechat_log_printf (" next_weelist . . . . . : 0x%X\n",
ptr_weelist->next_weelist);
+ }
+}
Index: common/completion.h
===================================================================
RCS file: /sources/weechat/weechat/src/common/completion.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- common/completion.h 13 May 2006 00:06:18 -0000 1.11
+++ common/completion.h 14 Jun 2006 15:43:33 -0000 1.12
@@ -59,5 +59,6 @@
extern void completion_init (t_completion *, void *, void *);
extern void completion_free (t_completion *);
extern void completion_search (t_completion *, int, char *, int, int);
+extern void completion_print_log (t_completion *);
#endif /* completion.h */
Index: common/completion.c
===================================================================
RCS file: /sources/weechat/weechat/src/common/completion.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- common/completion.c 13 May 2006 00:06:18 -0000 1.58
+++ common/completion.c 14 Jun 2006 15:43:33 -0000 1.59
@@ -30,6 +30,7 @@
#include "weechat.h"
#include "completion.h"
#include "command.h"
+#include "log.h"
#include "utf8.h"
#include "weelist.h"
#include "weeconfig.h"
@@ -1350,3 +1351,36 @@
}
}
}
+
+/*
+ * completion_print_log: print completion list in log (usually for crash dump)
+ */
+
+void
+completion_print_log (t_completion *completion)
+{
+ weechat_log_printf ("[completion (addr:0x%X)]\n", completion);
+ weechat_log_printf (" server . . . . . . . . : 0x%X\n",
completion->server);
+ weechat_log_printf (" channel. . . . . . . . : 0x%X\n",
completion->channel);
+ weechat_log_printf (" context. . . . . . . . : %d\n",
completion->context);
+ weechat_log_printf (" base_command . . . . . : '%s'\n",
completion->base_command);
+ weechat_log_printf (" base_command_arg . . . : %d\n",
completion->base_command_arg);
+ weechat_log_printf (" arg_is_nick. . . . . . : %d\n",
completion->arg_is_nick);
+ weechat_log_printf (" base_word. . . . . . . : '%s'\n",
completion->base_word);
+ weechat_log_printf (" base_word_pos. . . . . : %d\n",
completion->base_word_pos);
+ weechat_log_printf (" position . . . . . . . : %d\n",
completion->position);
+ weechat_log_printf (" args . . . . . . . . . : '%s'\n", completion->args);
+ weechat_log_printf (" direction. . . . . . . : %d\n",
completion->direction);
+ weechat_log_printf (" completion_list. . . . : 0x%X\n",
completion->completion_list);
+ weechat_log_printf (" last_completion. . . . : 0x%X\n",
completion->last_completion);
+ weechat_log_printf (" word_found . . . . . . : '%s'\n",
completion->word_found);
+ weechat_log_printf (" position_replace . . . : %d\n",
completion->position_replace);
+ weechat_log_printf (" diff_size. . . . . . . : %d\n",
completion->diff_size);
+ weechat_log_printf (" diff_length. . . . . . : %d\n",
completion->diff_length);
+ if (completion->completion_list)
+ {
+ weechat_log_printf ("\n");
+ weelist_print_log (completion->completion_list,
+ "completion list element");
+ }
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Weechat-cvs] weechat/src guigui-buffer.c common/weelist.h co...,
FlashCode <=