core: many improvements on hdata

New features:
- add optional hdata name for variables in hdata
- add plugin API functions: hdata_get_var_hdata
- use hashtable to store hdata (created by WeeChat and plugins)
- free hdata and infolists created by plugin on plugin unload
- free all hdata on exit
- add "free" option to command /debug hdata
- remove hdata for hooks
v2.8-utf8proc
Sebastien Helleu 2011-06-26 18:15:42 +02:00
parent 2a630031fd
commit 19bc95b961
58 changed files with 2049 additions and 3052 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.6-dev, 2011-06-22
v0.3.6-dev, 2011-06-26
Version 0.3.6 (under dev!)
@ -16,6 +16,11 @@ Version 0.3.6 (under dev!)
* core: add options "infolists", "hdata" and "tags" for command /debug
* core: add horizontal scrolling for buffers with free content (command
/window scroll_horiz) (task #11112)
* api: add new functions hdata_new, hdata_new_var, hdata_new_list, hdata_get,
hdata_get_var_offset, hdata_get_var_type, hdata_get_var_type_string,
hdata_get_var_hdata, hdata_get_var, hdata_get_var_at_offset, hdata_get_list,
hdata_move, hdata_integer, hdata_string, hdata_pointer, hdata_time,
hdata_get_string
* api: fix bug with function config_set_desc_plugin (use immediately
description for option when function is called)
* irc: add prefix "#" for all channels on join (if no prefix given)

View File

@ -1,3 +1,6 @@
body {
margin: 1em 2em 1em 2em;
}
div.sectionbody {
font-family: serif,Helvetica,arial;
}

View File

@ -19,22 +19,22 @@
'pv_remote_nick_color' (string) +
'hook_autorejoin' (pointer) +
'nicks_count' (integer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'nicks' (pointer, hdata: 'irc_nick') +
'last_nick' (pointer, hdata: 'irc_nick') +
'nicks_speaking' (pointer) +
'nicks_speaking_time' (pointer) +
'last_nick_speaking_time' (pointer) +
'buffer' (pointer) +
'nicks_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'last_nick_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'prev_channel' (pointer) +
'next_channel' (pointer) |
'prev_channel' (pointer, hdata: 'irc_channel') +
'next_channel' (pointer, hdata: 'irc_channel') |
-
| irc | irc_channel_speaking | IRC channel_speaking |
'nick' (string) +
'time_last_message' (time) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_channel_speaking') +
'next_nick' (pointer, hdata: 'irc_channel_speaking') |
-
| irc | irc_ignore | IRC ignorieren |
@ -43,8 +43,8 @@
'regex_mask' (pointer) +
'server' (string) +
'channel' (string) +
'prev_ignore' (pointer) +
'next_ignore' (pointer) |
'prev_ignore' (pointer, hdata: 'irc_ignore') +
'next_ignore' (pointer, hdata: 'irc_ignore') |
'irc_ignore_list' +
'last_irc_ignore'
@ -55,23 +55,23 @@
'prefix' (string) +
'away' (integer) +
'color' (string) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_nick') +
'next_nick' (pointer, hdata: 'irc_nick') |
-
| irc | irc_notify | IRC-Benachrichtigungen |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'nick' (string) +
'check_away' (integer) +
'is_on_server' (integer) +
'away_message' (string) +
'ison_received' (integer) +
'prev_notify' (pointer) +
'next_notify' (pointer) |
'prev_notify' (pointer, hdata: 'irc_notify') +
'next_notify' (pointer, hdata: 'irc_notify') |
-
| irc | irc_redirect | IRC Umlenkung |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'pattern' (string) +
'signal' (string) +
'count' (integer) +
@ -88,8 +88,8 @@
'cmd_filter' (pointer) +
'output' (string) +
'output_size' (integer) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect') +
'next_redirect' (pointer, hdata: 'irc_redirect') |
-
| irc | irc_redirect_pattern | Muster für IRC Umlenkung |
@ -99,8 +99,8 @@
'cmd_start' (string) +
'cmd_stop' (string) +
'cmd_extra' (string) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect_pattern') +
'next_redirect' (pointer, hdata: 'irc_redirect_pattern') |
'irc_redirect_patterns' +
'last_irc_redirect_pattern'
@ -118,10 +118,10 @@
'current_ip' (string) +
'current_port' (integer) +
'sock' (integer) +
'hook_connect' (pointer) +
'hook_fd' (pointer) +
'hook_timer_connection' (pointer) +
'hook_timer_sasl' (pointer) +
'hook_connect' (pointer, hdata: 'hook') +
'hook_fd' (pointer, hdata: 'hook') +
'hook_timer_connection' (pointer, hdata: 'hook') +
'hook_timer_sasl' (pointer, hdata: 'hook') +
'is_connected' (integer) +
'ssl_connected' (integer) +
'gnutls_sess' (other) +
@ -153,17 +153,17 @@
'last_away_check' (time) +
'outqueue' (pointer) +
'last_outqueue' (pointer) +
'redirects' (pointer) +
'last_redirect' (pointer) +
'notify_list' (pointer) +
'last_notify' (pointer) +
'redirects' (pointer, hdata: 'irc_redirect') +
'last_redirect' (pointer, hdata: 'irc_redirect') +
'notify_list' (pointer, hdata: 'irc_notify') +
'last_notify' (pointer, hdata: 'irc_notify') +
'manual_joins' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'channels' (pointer) +
'last_channel' (pointer) +
'prev_server' (pointer) +
'next_server' (pointer) |
'channels' (pointer, hdata: 'irc_channel') +
'last_channel' (pointer, hdata: 'irc_channel') +
'prev_server' (pointer, hdata: 'irc_server') +
'next_server' (pointer, hdata: 'irc_server') |
'irc_servers' +
'last_irc_server'
@ -177,23 +177,23 @@
'items_array' (pointer) +
'bar_window' (pointer) +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer) +
'next_bar' (pointer) |
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
'gui_bars' +
'last_gui_bar'
| weechat | bar_item | Bar-Item |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'build_callback' (pointer) +
'build_callback_data' (pointer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'bar_item') +
'next_item' (pointer, hdata: 'bar_item') |
'gui_bar_items' +
'last_gui_bar_item'
| weechat | buffer | Buffer |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
'merge_for_upgrade' (pointer) +
'number' (integer) +
@ -209,14 +209,14 @@
'close_callback' (pointer) +
'close_callback_data' (pointer) +
'title' (string) +
'own_lines' (pointer) +
'mixed_lines' (pointer) +
'lines' (pointer) +
'own_lines' (pointer, hdata: 'lines') +
'mixed_lines' (pointer, hdata: 'lines') +
'lines' (pointer, hdata: 'lines') +
'time_for_each_line' (integer) +
'chat_refresh_needed' (integer) +
'nicklist' (integer) +
'nicklist_case_sensitive' (integer) +
'nicklist_root' (pointer) +
'nicklist_root' (pointer, hdata: 'nick_group') +
'nicklist_max_length' (integer) +
'nicklist_display_groups' (integer) +
'nicklist_visible_count' (integer) +
@ -230,15 +230,15 @@
'input_buffer_length' (integer) +
'input_buffer_pos' (integer) +
'input_buffer_1st_display' (integer) +
'input_undo_snap' (pointer) +
'input_undo' (pointer) +
'last_input_undo' (pointer) +
'ptr_input_undo' (pointer) +
'input_undo_snap' (pointer, hdata: 'input_undo') +
'input_undo' (pointer, hdata: 'input_undo') +
'last_input_undo' (pointer, hdata: 'input_undo') +
'ptr_input_undo' (pointer, hdata: 'input_undo') +
'input_undo_count' (integer) +
'completion' (pointer) +
'history' (pointer) +
'last_history' (pointer) +
'ptr_history' (pointer) +
'completion' (pointer, hdata: 'completion') +
'history' (pointer, hdata: 'history') +
'last_history' (pointer, hdata: 'history') +
'ptr_history' (pointer, hdata: 'history') +
'num_history' (integer) +
'text_search' (integer) +
'text_search_exact' (integer) +
@ -251,17 +251,17 @@
'highlight_tags_count' (integer) +
'highlight_tags_array' (pointer) +
'hotlist_max_level_nicks' (pointer) +
'keys' (pointer) +
'last_key' (pointer) +
'keys' (pointer, hdata: 'key') +
'last_key' (pointer, hdata: 'key') +
'keys_count' (integer) +
'local_variables' (pointer) +
'prev_buffer' (pointer) +
'next_buffer' (pointer) |
'prev_buffer' (pointer, hdata: 'buffer') +
'next_buffer' (pointer, hdata: 'buffer') |
'gui_buffers' +
'last_gui_buffer'
| weechat | completion | Struktur mit Vervollständigung |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'context' (integer) +
'base_command' (string) +
'base_command_arg_index' (integer) +
@ -278,34 +278,34 @@
'position_replace' (integer) +
'diff_size' (integer) +
'diff_length' (integer) +
'partial_completion_list' (pointer) +
'last_partial_completion' (pointer) |
'partial_completion_list' (pointer, hdata: 'completion_partial') +
'last_partial_completion' (pointer, hdata: 'completion_partial') |
-
| weechat | completion_partial | Struktur mit teilweise Vervollständigung |
'word' (string) +
'count' (integer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'completion_partial') +
'next_item' (pointer, hdata: 'completion_partial') |
-
| weechat | config_file | Konfigurationsdatei |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'filename' (string) +
'file' (pointer) +
'callback_reload' (pointer) +
'callback_reload_data' (pointer) +
'sections' (pointer) +
'last_section' (pointer) +
'prev_config' (pointer) +
'next_config' (pointer) |
'sections' (pointer, hdata: 'config_section') +
'last_section' (pointer, hdata: 'config_section') +
'prev_config' (pointer, hdata: 'config_file') +
'next_config' (pointer, hdata: 'config_file') |
'config_files' +
'last_config_file'
| weechat | config_option | Konfigurationsoptionen |
'config_file' (pointer) +
'section' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'section' (pointer, hdata: 'config_section') +
'name' (string) +
'type' (integer) +
'description' (string) +
@ -322,12 +322,12 @@
'callback_delete' (pointer) +
'callback_delete_data' (pointer) +
'loaded' (integer) +
'prev_option' (pointer) +
'next_option' (pointer) |
'prev_option' (pointer, hdata: 'config_option') +
'next_option' (pointer, hdata: 'config_option') |
-
| weechat | config_section | Konfigurationssektion |
'config_file' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'name' (string) +
'user_can_add_options' (integer) +
'user_can_delete_options' (integer) +
@ -341,10 +341,10 @@
'callback_create_option_data' (pointer) +
'callback_delete_option' (pointer) +
'callback_delete_option_data' (pointer) +
'options' (pointer) +
'last_option' (pointer) +
'prev_section' (pointer) +
'next_section' (pointer) |
'options' (pointer, hdata: 'config_option') +
'last_option' (pointer, hdata: 'config_option') +
'prev_section' (pointer, hdata: 'config_section') +
'next_section' (pointer, hdata: 'config_section') |
-
| weechat | filter | Filter |
@ -359,206 +359,42 @@
'regex' (string) +
'regex_prefix' (pointer) +
'regex_message' (pointer) +
'prev_filter' (pointer) +
'next_filter' (pointer) |
'prev_filter' (pointer, hdata: 'filter') +
'next_filter' (pointer, hdata: 'filter') |
'gui_filters' +
'last_gui_filter'
| weechat | history | Verlaufspeicher von Befehlen in einem Buffer |
'text' (string) +
'next_history' (pointer) +
'prev_history' (pointer) |
'next_history' (pointer, hdata: 'history') +
'prev_history' (pointer, hdata: 'history') |
-
| weechat | hook | Hook (Variablen die für alle Hook-Typen geläufig sind) |
'plugin' (pointer) +
'type' (integer) +
'deleted' (integer) +
'running' (integer) +
'priority' (integer) +
'callback_data' (pointer) +
'hook_data' (pointer) +
'prev_hook' (pointer) +
'next_hook' (pointer) |
-
| weechat | hook_command | Hook des Typs "command" |
'callback' (pointer) +
'command' (string) +
'description' (string) +
'args' (string) +
'args_description' (string) +
'completion' (string) +
'cplt_num_templates' (integer) +
'cplt_templates' (pointer) +
'cplt_templates_static' (pointer) +
'cplt_template_num_args' (pointer) +
'cplt_template_args' (pointer) +
'cplt_template_num_args_concat' (integer) +
'cplt_template_args_concat' (pointer) |
'last_weechat_hook_command' +
'weechat_hooks_command'
| weechat | hook_command_run | Hook vom Typ "command_run" |
'callback' (pointer) +
'command' (string) |
'last_weechat_hook_command_run' +
'weechat_hooks_command_run'
| weechat | hook_completion | Hook vom Typ "completion" |
'callback' (pointer) +
'completion_item' (string) +
'description' (string) |
'last_weechat_hook_completion' +
'weechat_hooks_completion'
| weechat | hook_config | Hook vom Typ "config" |
'callback' (pointer) +
'option' (string) |
'last_weechat_hook_config' +
'weechat_hooks_config'
| weechat | hook_connect | Hook vom Typ "connect" |
'callback' (pointer) +
'proxy' (string) +
'address' (string) +
'port' (integer) +
'sock' (integer) +
'ipv6' (integer) +
'gnutls_sess' (pointer) +
'gnutls_cb' (pointer) +
'gnutls_dhkey_size' (integer) +
'gnutls_priorities' (string) +
'local_hostname' (string) +
'child_read' (integer) +
'child_write' (integer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'handshake_hook_fd' (pointer) +
'handshake_hook_timer' (pointer) +
'handshake_fd_flags' (integer) +
'handshake_ip_address' (string) |
'last_weechat_hook_connect' +
'weechat_hooks_connect'
| weechat | hook_fd | Hook vom Typ "fd" |
'callback' (pointer) +
'fd' (integer) +
'flags' (integer) +
'error' (integer) |
'last_weechat_hook_fd' +
'weechat_hooks_fd'
| weechat | hook_hdata | Hook vom Typ "hdata" |
'callback' (pointer) +
'hdata_name' (string) +
'description' (string) |
'last_weechat_hook_hdata' +
'weechat_hooks_hdata'
| weechat | hook_hsignal | Hook vom Typ "" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_hsignal' +
'weechat_hooks_hsignal'
| weechat | hook_info | Hook vom Typ "info" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) |
'last_weechat_hook_info' +
'weechat_hooks_info'
| weechat | hook_info_hashtable | Hook vom Typ "info_hashtable" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) +
'output_description' (string) |
'last_weechat_hook_info_hashtable' +
'weechat_hooks_info_hashtable'
| weechat | hook_infolist | Hook vom Typ "infolist" |
'callback' (pointer) +
'infolist_name' (string) +
'description' (string) +
'pointer_description' (string) +
'args_description' (string) |
'last_weechat_hook_infolist' +
'weechat_hooks_infolist'
| weechat | hook_modifier | Hook vom Typ "modifier" |
'callback' (pointer) +
'modifier' (string) |
'last_weechat_hook_modifier' +
'weechat_hooks_modifier'
| weechat | hook_print | Hook vom Typ "print" |
'callback' (pointer) +
'buffer' (pointer) +
'tags_count' (integer) +
'tags_array' (pointer) +
'message' (string) +
'strip_colors' (integer) |
'last_weechat_hook_print' +
'weechat_hooks_print'
| weechat | hook_process | Hook vom Typ "process" |
'callback' (pointer) +
'command' (string) +
'timeout' (long) +
'child_read' (pointer) +
'child_write' (pointer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'hook_timer' (pointer) +
'buffer' (pointer) +
'buffer_size' (pointer) |
'last_weechat_hook_process' +
'weechat_hooks_process'
| weechat | hook_signal | Hook vom Typ "signal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_signal' +
'weechat_hooks_signal'
| weechat | hook_timer | Hook vom Typ "timer" |
'callback' (pointer) +
'interval' (long) +
'align_second' (integer) +
'remaining_calls' (integer) +
'last_exec' (other) +
'next_exec' (other) |
'last_weechat_hook_timer' +
'weechat_hooks_timer'
| weechat | input_undo | Struktur der Rücknahmen für die Befehlszeile |
'data' (string) +
'pos' (integer) +
'prev_undo' (pointer) +
'next_undo' (pointer) |
'prev_undo' (pointer, hdata: 'input_undo') +
'next_undo' (pointer, hdata: 'input_undo') |
-
| weechat | key | Tastenbelegung (Tastaturkurzbefehl) |
'key' (string) +
'command' (string) +
'prev_key' (pointer) +
'next_key' (pointer) |
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_keys' +
'last_gui_default_key' +
'last_gui_key'
| weechat | line | Struktur mit einer Zeile |
'data' (pointer) +
'prev_line' (pointer) +
'next_line' (pointer) |
'data' (pointer, hdata: 'line_data') +
'prev_line' (pointer, hdata: 'line') +
'next_line' (pointer, hdata: 'line') |
-
| weechat | line_data | Struktur mit einzeiligen Daten |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'y' (integer) +
'date' (time) +
'date_printed' (time) +
@ -574,9 +410,9 @@
-
| weechat | lines | Struktur mit Zeilen |
'first_line' (pointer) +
'last_line' (pointer) +
'last_read_line' (pointer) +
'first_line' (pointer, hdata: 'line') +
'last_line' (pointer, hdata: 'line') +
'last_read_line' (pointer, hdata: 'line') +
'lines_count' (integer) +
'first_line_not_read' (integer) +
'lines_hidden' (integer) +
@ -585,14 +421,14 @@
-
| weechat | nick | Nick in Nickliste |
'group' (pointer) +
'group' (pointer, hdata: 'nick_group') +
'name' (string) +
'color' (string) +
'prefix' (string) +
'prefix_color' (string) +
'visible' (integer) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'nick') +
'next_nick' (pointer, hdata: 'nick') |
-
| weechat | nick_group | Gruppen in Nickliste |
@ -600,15 +436,30 @@
'color' (string) +
'visible' (integer) +
'level' (integer) +
'parent' (pointer) +
'childs' (pointer) +
'last_child' (pointer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'prev_group' (pointer) +
'next_group' (pointer) |
'parent' (pointer, hdata: 'nick_group') +
'childs' (pointer, hdata: 'nick_group') +
'last_child' (pointer, hdata: 'nick_group') +
'nicks' (pointer, hdata: 'nick') +
'last_nick' (pointer, hdata: 'nick') +
'prev_group' (pointer, hdata: 'nick_group') +
'next_group' (pointer, hdata: 'nick_group') |
-
| weechat | plugin | plugin |
'filename' (string) +
'handle' (pointer) +
'name' (string) +
'description' (string) +
'author' (string) +
'version' (string) +
'license' (string) +
'charset' (string) +
'debug' (integer) +
'prev_plugin' (pointer, hdata: 'plugin') +
'next_plugin' (pointer, hdata: 'plugin') |
'last_weechat_plugin' +
'weechat_plugins'
| weechat | window | Fenster |
'win_x' (integer) +
'win_y' (integer) +
@ -626,37 +477,37 @@
'last_bar_window' (pointer) +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'layout_plugin_name' (string) +
'layout_buffer_name' (string) +
'scroll' (pointer) +
'ptr_tree' (pointer) +
'prev_window' (pointer) +
'next_window' (pointer) |
'scroll' (pointer, hdata: 'window_scroll') +
'ptr_tree' (pointer, hdata: 'window_tree') +
'prev_window' (pointer, hdata: 'window') +
'next_window' (pointer, hdata: 'window') |
'gui_current_window' +
'gui_windows' +
'last_gui_window'
| weechat | window_scroll | Scroll-Info in Fenstern |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'first_line_displayed' (integer) +
'start_line' (pointer) +
'start_line' (pointer, hdata: 'line') +
'start_line_pos' (integer) +
'scrolling' (integer) +
'start_col' (integer) +
'lines_after' (integer) +
'reset_allowed' (integer) +
'prev_scroll' (pointer) +
'next_scroll' (pointer) |
'prev_scroll' (pointer, hdata: 'window_scroll') +
'next_scroll' (pointer, hdata: 'window_scroll') |
-
| weechat | window_tree | Baumstruktur der Fenster |
'parent_node' (pointer) +
'parent_node' (pointer, hdata: 'window_tree') +
'split_pct' (integer) +
'split_horizontal' (integer) +
'child1' (pointer) +
'child2' (pointer) +
'window' (pointer) |
'child1' (pointer, hdata: 'window_tree') +
'child2' (pointer, hdata: 'window_tree') +
'window' (pointer, hdata: 'window') |
'gui_windows_tree'
|========================================

View File

@ -145,21 +145,22 @@ Erweiterung: Name der Erweiterung ('weechat' für interne WeeChat Befehle)
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|hdata|infolists|memory|tags|term|windows
buffer|color|infolists|memory|tags|term|windows
hdata [free]
list: zeigt alle Erweiterungen mit Debuglevel an
set: setzt den Level der Protokollierung für eine Erweiterung
plugin: Name der Erweiterung ("core" für den WeeChat Kern)
level: Debuglevel der Erweiterung (0 = deaktiviert das Debug)
dump: Speicherabbild in die WeeChat Protokolldatei schreiben (wie bei einem Programmabsturz)
buffer: speichert den Bufferinhalt als hexadezimale Ausgabe in die Protokolldatei
color: zeigt Informationen über die aktuellen Farbpaarungen an
hdata: zeigt Informationen zu hdata an (direkter Daten-Zugriff auf WeeChat/Erweiterungen)
infolists: zeigt Information über die Infolists an
memory: gibt Informationen über den genutzten Speicher aus
tags: zeigt für jede einzelne Zeile die dazugehörigen Tags an
term: gibt Informationen über das Terminal und verfügbare Farben aus
windows: zeigt die Fensterstruktur an
list: list plugins with debug levels
set: set debug level for plugin
plugin: name of plugin ("core" for WeeChat core)
level: debug level for plugin (0 = disable debug)
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
tags: display tags for lines
term: display infos about terminal
windows: display windows tree
........................................
[command]*`filter`* Filterfunktion um Nachrichten in Buffern zu aus- oder einzublenden, dazu können Tags oder regulären Ausdrücken verwendet werden::

View File

@ -332,7 +332,9 @@ sub get_hdata
my $type = int($value) >> 16;
my $offset = int($value) & 0xFFFF;
my $stroffset = sprintf("%08d", $offset);
$hdata2{$stroffset} = "'".$key."' (".weechat::hdata_get_var_type_string($ptr_hdata, $key).")";
my $var_hdata = weechat::hdata_get_var_hdata($ptr_hdata, $key);
$var_hdata = ", hdata: '".$var_hdata."'" if ($var_hdata ne "");
$hdata2{$stroffset} = "'".$key."' (".weechat::hdata_get_var_type_string($ptr_hdata, $key).$var_hdata.")";
}
foreach my $offset (sort keys %hdata2)
{

View File

@ -19,22 +19,22 @@
'pv_remote_nick_color' (string) +
'hook_autorejoin' (pointer) +
'nicks_count' (integer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'nicks' (pointer, hdata: 'irc_nick') +
'last_nick' (pointer, hdata: 'irc_nick') +
'nicks_speaking' (pointer) +
'nicks_speaking_time' (pointer) +
'last_nick_speaking_time' (pointer) +
'buffer' (pointer) +
'nicks_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'last_nick_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'prev_channel' (pointer) +
'next_channel' (pointer) |
'prev_channel' (pointer, hdata: 'irc_channel') +
'next_channel' (pointer, hdata: 'irc_channel') |
-
| irc | irc_channel_speaking | irc channel_speaking |
'nick' (string) +
'time_last_message' (time) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_channel_speaking') +
'next_nick' (pointer, hdata: 'irc_channel_speaking') |
-
| irc | irc_ignore | irc ignore |
@ -43,8 +43,8 @@
'regex_mask' (pointer) +
'server' (string) +
'channel' (string) +
'prev_ignore' (pointer) +
'next_ignore' (pointer) |
'prev_ignore' (pointer, hdata: 'irc_ignore') +
'next_ignore' (pointer, hdata: 'irc_ignore') |
'irc_ignore_list' +
'last_irc_ignore'
@ -55,23 +55,23 @@
'prefix' (string) +
'away' (integer) +
'color' (string) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_nick') +
'next_nick' (pointer, hdata: 'irc_nick') |
-
| irc | irc_notify | irc notify |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'nick' (string) +
'check_away' (integer) +
'is_on_server' (integer) +
'away_message' (string) +
'ison_received' (integer) +
'prev_notify' (pointer) +
'next_notify' (pointer) |
'prev_notify' (pointer, hdata: 'irc_notify') +
'next_notify' (pointer, hdata: 'irc_notify') |
-
| irc | irc_redirect | irc redirect |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'pattern' (string) +
'signal' (string) +
'count' (integer) +
@ -88,8 +88,8 @@
'cmd_filter' (pointer) +
'output' (string) +
'output_size' (integer) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect') +
'next_redirect' (pointer, hdata: 'irc_redirect') |
-
| irc | irc_redirect_pattern | pattern for irc redirect |
@ -99,8 +99,8 @@
'cmd_start' (string) +
'cmd_stop' (string) +
'cmd_extra' (string) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect_pattern') +
'next_redirect' (pointer, hdata: 'irc_redirect_pattern') |
'irc_redirect_patterns' +
'last_irc_redirect_pattern'
@ -118,10 +118,10 @@
'current_ip' (string) +
'current_port' (integer) +
'sock' (integer) +
'hook_connect' (pointer) +
'hook_fd' (pointer) +
'hook_timer_connection' (pointer) +
'hook_timer_sasl' (pointer) +
'hook_connect' (pointer, hdata: 'hook') +
'hook_fd' (pointer, hdata: 'hook') +
'hook_timer_connection' (pointer, hdata: 'hook') +
'hook_timer_sasl' (pointer, hdata: 'hook') +
'is_connected' (integer) +
'ssl_connected' (integer) +
'gnutls_sess' (other) +
@ -153,17 +153,17 @@
'last_away_check' (time) +
'outqueue' (pointer) +
'last_outqueue' (pointer) +
'redirects' (pointer) +
'last_redirect' (pointer) +
'notify_list' (pointer) +
'last_notify' (pointer) +
'redirects' (pointer, hdata: 'irc_redirect') +
'last_redirect' (pointer, hdata: 'irc_redirect') +
'notify_list' (pointer, hdata: 'irc_notify') +
'last_notify' (pointer, hdata: 'irc_notify') +
'manual_joins' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'channels' (pointer) +
'last_channel' (pointer) +
'prev_server' (pointer) +
'next_server' (pointer) |
'channels' (pointer, hdata: 'irc_channel') +
'last_channel' (pointer, hdata: 'irc_channel') +
'prev_server' (pointer, hdata: 'irc_server') +
'next_server' (pointer, hdata: 'irc_server') |
'irc_servers' +
'last_irc_server'
@ -177,23 +177,23 @@
'items_array' (pointer) +
'bar_window' (pointer) +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer) +
'next_bar' (pointer) |
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
'gui_bars' +
'last_gui_bar'
| weechat | bar_item | bar item |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'build_callback' (pointer) +
'build_callback_data' (pointer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'bar_item') +
'next_item' (pointer, hdata: 'bar_item') |
'gui_bar_items' +
'last_gui_bar_item'
| weechat | buffer | buffer |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
'merge_for_upgrade' (pointer) +
'number' (integer) +
@ -209,14 +209,14 @@
'close_callback' (pointer) +
'close_callback_data' (pointer) +
'title' (string) +
'own_lines' (pointer) +
'mixed_lines' (pointer) +
'lines' (pointer) +
'own_lines' (pointer, hdata: 'lines') +
'mixed_lines' (pointer, hdata: 'lines') +
'lines' (pointer, hdata: 'lines') +
'time_for_each_line' (integer) +
'chat_refresh_needed' (integer) +
'nicklist' (integer) +
'nicklist_case_sensitive' (integer) +
'nicklist_root' (pointer) +
'nicklist_root' (pointer, hdata: 'nick_group') +
'nicklist_max_length' (integer) +
'nicklist_display_groups' (integer) +
'nicklist_visible_count' (integer) +
@ -230,15 +230,15 @@
'input_buffer_length' (integer) +
'input_buffer_pos' (integer) +
'input_buffer_1st_display' (integer) +
'input_undo_snap' (pointer) +
'input_undo' (pointer) +
'last_input_undo' (pointer) +
'ptr_input_undo' (pointer) +
'input_undo_snap' (pointer, hdata: 'input_undo') +
'input_undo' (pointer, hdata: 'input_undo') +
'last_input_undo' (pointer, hdata: 'input_undo') +
'ptr_input_undo' (pointer, hdata: 'input_undo') +
'input_undo_count' (integer) +
'completion' (pointer) +
'history' (pointer) +
'last_history' (pointer) +
'ptr_history' (pointer) +
'completion' (pointer, hdata: 'completion') +
'history' (pointer, hdata: 'history') +
'last_history' (pointer, hdata: 'history') +
'ptr_history' (pointer, hdata: 'history') +
'num_history' (integer) +
'text_search' (integer) +
'text_search_exact' (integer) +
@ -251,17 +251,17 @@
'highlight_tags_count' (integer) +
'highlight_tags_array' (pointer) +
'hotlist_max_level_nicks' (pointer) +
'keys' (pointer) +
'last_key' (pointer) +
'keys' (pointer, hdata: 'key') +
'last_key' (pointer, hdata: 'key') +
'keys_count' (integer) +
'local_variables' (pointer) +
'prev_buffer' (pointer) +
'next_buffer' (pointer) |
'prev_buffer' (pointer, hdata: 'buffer') +
'next_buffer' (pointer, hdata: 'buffer') |
'gui_buffers' +
'last_gui_buffer'
| weechat | completion | structure with completion |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'context' (integer) +
'base_command' (string) +
'base_command_arg_index' (integer) +
@ -278,34 +278,34 @@
'position_replace' (integer) +
'diff_size' (integer) +
'diff_length' (integer) +
'partial_completion_list' (pointer) +
'last_partial_completion' (pointer) |
'partial_completion_list' (pointer, hdata: 'completion_partial') +
'last_partial_completion' (pointer, hdata: 'completion_partial') |
-
| weechat | completion_partial | structure with partial completion |
'word' (string) +
'count' (integer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'completion_partial') +
'next_item' (pointer, hdata: 'completion_partial') |
-
| weechat | config_file | config file |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'filename' (string) +
'file' (pointer) +
'callback_reload' (pointer) +
'callback_reload_data' (pointer) +
'sections' (pointer) +
'last_section' (pointer) +
'prev_config' (pointer) +
'next_config' (pointer) |
'sections' (pointer, hdata: 'config_section') +
'last_section' (pointer, hdata: 'config_section') +
'prev_config' (pointer, hdata: 'config_file') +
'next_config' (pointer, hdata: 'config_file') |
'config_files' +
'last_config_file'
| weechat | config_option | config option |
'config_file' (pointer) +
'section' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'section' (pointer, hdata: 'config_section') +
'name' (string) +
'type' (integer) +
'description' (string) +
@ -322,12 +322,12 @@
'callback_delete' (pointer) +
'callback_delete_data' (pointer) +
'loaded' (integer) +
'prev_option' (pointer) +
'next_option' (pointer) |
'prev_option' (pointer, hdata: 'config_option') +
'next_option' (pointer, hdata: 'config_option') |
-
| weechat | config_section | config section |
'config_file' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'name' (string) +
'user_can_add_options' (integer) +
'user_can_delete_options' (integer) +
@ -341,10 +341,10 @@
'callback_create_option_data' (pointer) +
'callback_delete_option' (pointer) +
'callback_delete_option_data' (pointer) +
'options' (pointer) +
'last_option' (pointer) +
'prev_section' (pointer) +
'next_section' (pointer) |
'options' (pointer, hdata: 'config_option') +
'last_option' (pointer, hdata: 'config_option') +
'prev_section' (pointer, hdata: 'config_section') +
'next_section' (pointer, hdata: 'config_section') |
-
| weechat | filter | filter |
@ -359,206 +359,42 @@
'regex' (string) +
'regex_prefix' (pointer) +
'regex_message' (pointer) +
'prev_filter' (pointer) +
'next_filter' (pointer) |
'prev_filter' (pointer, hdata: 'filter') +
'next_filter' (pointer, hdata: 'filter') |
'gui_filters' +
'last_gui_filter'
| weechat | history | history of commands in buffer |
'text' (string) +
'next_history' (pointer) +
'prev_history' (pointer) |
'next_history' (pointer, hdata: 'history') +
'prev_history' (pointer, hdata: 'history') |
-
| weechat | hook | hook (variables common to all hook types) |
'plugin' (pointer) +
'type' (integer) +
'deleted' (integer) +
'running' (integer) +
'priority' (integer) +
'callback_data' (pointer) +
'hook_data' (pointer) +
'prev_hook' (pointer) +
'next_hook' (pointer) |
-
| weechat | hook_command | hook of type "command" |
'callback' (pointer) +
'command' (string) +
'description' (string) +
'args' (string) +
'args_description' (string) +
'completion' (string) +
'cplt_num_templates' (integer) +
'cplt_templates' (pointer) +
'cplt_templates_static' (pointer) +
'cplt_template_num_args' (pointer) +
'cplt_template_args' (pointer) +
'cplt_template_num_args_concat' (integer) +
'cplt_template_args_concat' (pointer) |
'last_weechat_hook_command' +
'weechat_hooks_command'
| weechat | hook_command_run | hook of type "command_run" |
'callback' (pointer) +
'command' (string) |
'last_weechat_hook_command_run' +
'weechat_hooks_command_run'
| weechat | hook_completion | hook of type "completion" |
'callback' (pointer) +
'completion_item' (string) +
'description' (string) |
'last_weechat_hook_completion' +
'weechat_hooks_completion'
| weechat | hook_config | hook of type "config" |
'callback' (pointer) +
'option' (string) |
'last_weechat_hook_config' +
'weechat_hooks_config'
| weechat | hook_connect | hook of type "connect" |
'callback' (pointer) +
'proxy' (string) +
'address' (string) +
'port' (integer) +
'sock' (integer) +
'ipv6' (integer) +
'gnutls_sess' (pointer) +
'gnutls_cb' (pointer) +
'gnutls_dhkey_size' (integer) +
'gnutls_priorities' (string) +
'local_hostname' (string) +
'child_read' (integer) +
'child_write' (integer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'handshake_hook_fd' (pointer) +
'handshake_hook_timer' (pointer) +
'handshake_fd_flags' (integer) +
'handshake_ip_address' (string) |
'last_weechat_hook_connect' +
'weechat_hooks_connect'
| weechat | hook_fd | hook of type "fd" |
'callback' (pointer) +
'fd' (integer) +
'flags' (integer) +
'error' (integer) |
'last_weechat_hook_fd' +
'weechat_hooks_fd'
| weechat | hook_hdata | hook of type "hdata" |
'callback' (pointer) +
'hdata_name' (string) +
'description' (string) |
'last_weechat_hook_hdata' +
'weechat_hooks_hdata'
| weechat | hook_hsignal | hook of type "hsignal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_hsignal' +
'weechat_hooks_hsignal'
| weechat | hook_info | hook of type "info" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) |
'last_weechat_hook_info' +
'weechat_hooks_info'
| weechat | hook_info_hashtable | hook of type "info_hashtable" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) +
'output_description' (string) |
'last_weechat_hook_info_hashtable' +
'weechat_hooks_info_hashtable'
| weechat | hook_infolist | hook of type "infolist" |
'callback' (pointer) +
'infolist_name' (string) +
'description' (string) +
'pointer_description' (string) +
'args_description' (string) |
'last_weechat_hook_infolist' +
'weechat_hooks_infolist'
| weechat | hook_modifier | hook of type "modifier" |
'callback' (pointer) +
'modifier' (string) |
'last_weechat_hook_modifier' +
'weechat_hooks_modifier'
| weechat | hook_print | hook of type "print" |
'callback' (pointer) +
'buffer' (pointer) +
'tags_count' (integer) +
'tags_array' (pointer) +
'message' (string) +
'strip_colors' (integer) |
'last_weechat_hook_print' +
'weechat_hooks_print'
| weechat | hook_process | hook of type "process" |
'callback' (pointer) +
'command' (string) +
'timeout' (long) +
'child_read' (pointer) +
'child_write' (pointer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'hook_timer' (pointer) +
'buffer' (pointer) +
'buffer_size' (pointer) |
'last_weechat_hook_process' +
'weechat_hooks_process'
| weechat | hook_signal | hook of type "signal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_signal' +
'weechat_hooks_signal'
| weechat | hook_timer | hook of type "timer" |
'callback' (pointer) +
'interval' (long) +
'align_second' (integer) +
'remaining_calls' (integer) +
'last_exec' (other) +
'next_exec' (other) |
'last_weechat_hook_timer' +
'weechat_hooks_timer'
| weechat | input_undo | structure with undo for input line |
'data' (string) +
'pos' (integer) +
'prev_undo' (pointer) +
'next_undo' (pointer) |
'prev_undo' (pointer, hdata: 'input_undo') +
'next_undo' (pointer, hdata: 'input_undo') |
-
| weechat | key | a key (keyboard shortcut) |
'key' (string) +
'command' (string) +
'prev_key' (pointer) +
'next_key' (pointer) |
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_keys' +
'last_gui_default_key' +
'last_gui_key'
| weechat | line | structure with one line |
'data' (pointer) +
'prev_line' (pointer) +
'next_line' (pointer) |
'data' (pointer, hdata: 'line_data') +
'prev_line' (pointer, hdata: 'line') +
'next_line' (pointer, hdata: 'line') |
-
| weechat | line_data | structure with one line data |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'y' (integer) +
'date' (time) +
'date_printed' (time) +
@ -574,9 +410,9 @@
-
| weechat | lines | structure with lines |
'first_line' (pointer) +
'last_line' (pointer) +
'last_read_line' (pointer) +
'first_line' (pointer, hdata: 'line') +
'last_line' (pointer, hdata: 'line') +
'last_read_line' (pointer, hdata: 'line') +
'lines_count' (integer) +
'first_line_not_read' (integer) +
'lines_hidden' (integer) +
@ -585,14 +421,14 @@
-
| weechat | nick | nick in nicklist |
'group' (pointer) +
'group' (pointer, hdata: 'nick_group') +
'name' (string) +
'color' (string) +
'prefix' (string) +
'prefix_color' (string) +
'visible' (integer) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'nick') +
'next_nick' (pointer, hdata: 'nick') |
-
| weechat | nick_group | group in nicklist |
@ -600,15 +436,30 @@
'color' (string) +
'visible' (integer) +
'level' (integer) +
'parent' (pointer) +
'childs' (pointer) +
'last_child' (pointer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'prev_group' (pointer) +
'next_group' (pointer) |
'parent' (pointer, hdata: 'nick_group') +
'childs' (pointer, hdata: 'nick_group') +
'last_child' (pointer, hdata: 'nick_group') +
'nicks' (pointer, hdata: 'nick') +
'last_nick' (pointer, hdata: 'nick') +
'prev_group' (pointer, hdata: 'nick_group') +
'next_group' (pointer, hdata: 'nick_group') |
-
| weechat | plugin | plugin |
'filename' (string) +
'handle' (pointer) +
'name' (string) +
'description' (string) +
'author' (string) +
'version' (string) +
'license' (string) +
'charset' (string) +
'debug' (integer) +
'prev_plugin' (pointer, hdata: 'plugin') +
'next_plugin' (pointer, hdata: 'plugin') |
'last_weechat_plugin' +
'weechat_plugins'
| weechat | window | window |
'win_x' (integer) +
'win_y' (integer) +
@ -626,37 +477,37 @@
'last_bar_window' (pointer) +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'layout_plugin_name' (string) +
'layout_buffer_name' (string) +
'scroll' (pointer) +
'ptr_tree' (pointer) +
'prev_window' (pointer) +
'next_window' (pointer) |
'scroll' (pointer, hdata: 'window_scroll') +
'ptr_tree' (pointer, hdata: 'window_tree') +
'prev_window' (pointer, hdata: 'window') +
'next_window' (pointer, hdata: 'window') |
'gui_current_window' +
'gui_windows' +
'last_gui_window'
| weechat | window_scroll | scroll info in window |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'first_line_displayed' (integer) +
'start_line' (pointer) +
'start_line' (pointer, hdata: 'line') +
'start_line_pos' (integer) +
'scrolling' (integer) +
'start_col' (integer) +
'lines_after' (integer) +
'reset_allowed' (integer) +
'prev_scroll' (pointer) +
'next_scroll' (pointer) |
'prev_scroll' (pointer, hdata: 'window_scroll') +
'next_scroll' (pointer, hdata: 'window_scroll') |
-
| weechat | window_tree | tree of windows |
'parent_node' (pointer) +
'parent_node' (pointer, hdata: 'window_tree') +
'split_pct' (integer) +
'split_horizontal' (integer) +
'child1' (pointer) +
'child2' (pointer) +
'window' (pointer) |
'child1' (pointer, hdata: 'window_tree') +
'child2' (pointer, hdata: 'window_tree') +
'window' (pointer, hdata: 'window') |
'gui_windows_tree'
|========================================

View File

@ -145,7 +145,8 @@ command: command to execute (a '/' is automatically added if not found at beginn
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|hdata|infolists|memory|tags|term|windows
buffer|color|infolists|memory|tags|term|windows
hdata [free]
list: list plugins with debug levels
set: set debug level for plugin
@ -154,7 +155,7 @@ command: command to execute (a '/' is automatically added if not found at beginn
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
hdata: display infos about hdata
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
tags: display tags for lines

View File

@ -11686,7 +11686,8 @@ Prototype:
[source,C]
----------------------------------------
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type);
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type,
const char *hdata_name);
----------------------------------------
Arguments:
@ -11701,6 +11702,7 @@ Arguments:
** WEECHAT_HDATA_POINTER
** WEECHAT_HDATA_TIME
** WEECHAT_HDATA_OTHER
* 'hdata_name': name of a hdata (if it's a pointer to a structure with hdata)
C example:
@ -11718,22 +11720,22 @@ struct t_myplugin_list
/* ... */
struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next");
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, NULL);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, NULL);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER, NULL);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, "myplugin_list");
----------------------------------------
The macro "WEECHAT_HDATA_VAR" can be used to shorten code:
[source,C]
----------------------------------------
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, "myplugin_list");
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, "myplugin_list");
----------------------------------------
[NOTE]
@ -11778,11 +11780,11 @@ struct t_myplugin_list *last_buffer = NULL;
/* ... */
struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next");
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, NULL);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, NULL);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER, NULL);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_list (hdata, "buffers", &buffers);
weechat_hdata_new_list (hdata, "last_buffer", &last_buffer);
----------------------------------------
@ -11961,8 +11963,7 @@ C example:
[source,C]
----------------------------------------
weechat_printf (NULL, "type = %s",
weechat_hdata_get_var_type_string (hdata, "name"));
weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "name"));
----------------------------------------
Script (Python):
@ -11976,6 +11977,47 @@ type = weechat.hdata_get_var_type_string(hdata, name)
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name"))
----------------------------------------
weechat_hdata_get_var_hdata
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_New in version 0.3.6._
Return hdata for a variable in hdata.
Prototype:
[source,C]
----------------------------------------
const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name);
----------------------------------------
Arguments:
* 'hdata': hdata pointer
* 'name': variable name
Return value:
* hdata for variable, NULL if no hdata or if an error occured
C example:
[source,C]
----------------------------------------
weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name"));
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
hdata_name = weechat.hdata_get_var_hdata(hdata, name)
# example
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
----------------------------------------
weechat_hdata_get_var
^^^^^^^^^^^^^^^^^^^^^

View File

@ -19,22 +19,22 @@
'pv_remote_nick_color' (string) +
'hook_autorejoin' (pointer) +
'nicks_count' (integer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'nicks' (pointer, hdata: 'irc_nick') +
'last_nick' (pointer, hdata: 'irc_nick') +
'nicks_speaking' (pointer) +
'nicks_speaking_time' (pointer) +
'last_nick_speaking_time' (pointer) +
'buffer' (pointer) +
'nicks_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'last_nick_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'prev_channel' (pointer) +
'next_channel' (pointer) |
'prev_channel' (pointer, hdata: 'irc_channel') +
'next_channel' (pointer, hdata: 'irc_channel') |
-
| irc | irc_channel_speaking | channel_speaking irc |
'nick' (string) +
'time_last_message' (time) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_channel_speaking') +
'next_nick' (pointer, hdata: 'irc_channel_speaking') |
-
| irc | irc_ignore | ignore irc |
@ -43,8 +43,8 @@
'regex_mask' (pointer) +
'server' (string) +
'channel' (string) +
'prev_ignore' (pointer) +
'next_ignore' (pointer) |
'prev_ignore' (pointer, hdata: 'irc_ignore') +
'next_ignore' (pointer, hdata: 'irc_ignore') |
'irc_ignore_list' +
'last_irc_ignore'
@ -55,23 +55,23 @@
'prefix' (string) +
'away' (integer) +
'color' (string) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_nick') +
'next_nick' (pointer, hdata: 'irc_nick') |
-
| irc | irc_notify | notify irc |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'nick' (string) +
'check_away' (integer) +
'is_on_server' (integer) +
'away_message' (string) +
'ison_received' (integer) +
'prev_notify' (pointer) +
'next_notify' (pointer) |
'prev_notify' (pointer, hdata: 'irc_notify') +
'next_notify' (pointer, hdata: 'irc_notify') |
-
| irc | irc_redirect | redirection irc |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'pattern' (string) +
'signal' (string) +
'count' (integer) +
@ -88,8 +88,8 @@
'cmd_filter' (pointer) +
'output' (string) +
'output_size' (integer) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect') +
'next_redirect' (pointer, hdata: 'irc_redirect') |
-
| irc | irc_redirect_pattern | modèle pour une redirection irc |
@ -99,8 +99,8 @@
'cmd_start' (string) +
'cmd_stop' (string) +
'cmd_extra' (string) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect_pattern') +
'next_redirect' (pointer, hdata: 'irc_redirect_pattern') |
'irc_redirect_patterns' +
'last_irc_redirect_pattern'
@ -118,10 +118,10 @@
'current_ip' (string) +
'current_port' (integer) +
'sock' (integer) +
'hook_connect' (pointer) +
'hook_fd' (pointer) +
'hook_timer_connection' (pointer) +
'hook_timer_sasl' (pointer) +
'hook_connect' (pointer, hdata: 'hook') +
'hook_fd' (pointer, hdata: 'hook') +
'hook_timer_connection' (pointer, hdata: 'hook') +
'hook_timer_sasl' (pointer, hdata: 'hook') +
'is_connected' (integer) +
'ssl_connected' (integer) +
'gnutls_sess' (other) +
@ -153,17 +153,17 @@
'last_away_check' (time) +
'outqueue' (pointer) +
'last_outqueue' (pointer) +
'redirects' (pointer) +
'last_redirect' (pointer) +
'notify_list' (pointer) +
'last_notify' (pointer) +
'redirects' (pointer, hdata: 'irc_redirect') +
'last_redirect' (pointer, hdata: 'irc_redirect') +
'notify_list' (pointer, hdata: 'irc_notify') +
'last_notify' (pointer, hdata: 'irc_notify') +
'manual_joins' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'channels' (pointer) +
'last_channel' (pointer) +
'prev_server' (pointer) +
'next_server' (pointer) |
'channels' (pointer, hdata: 'irc_channel') +
'last_channel' (pointer, hdata: 'irc_channel') +
'prev_server' (pointer, hdata: 'irc_server') +
'next_server' (pointer, hdata: 'irc_server') |
'irc_servers' +
'last_irc_server'
@ -177,23 +177,23 @@
'items_array' (pointer) +
'bar_window' (pointer) +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer) +
'next_bar' (pointer) |
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
'gui_bars' +
'last_gui_bar'
| weechat | bar_item | objet de barre |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'build_callback' (pointer) +
'build_callback_data' (pointer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'bar_item') +
'next_item' (pointer, hdata: 'bar_item') |
'gui_bar_items' +
'last_gui_bar_item'
| weechat | buffer | tampon |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
'merge_for_upgrade' (pointer) +
'number' (integer) +
@ -209,14 +209,14 @@
'close_callback' (pointer) +
'close_callback_data' (pointer) +
'title' (string) +
'own_lines' (pointer) +
'mixed_lines' (pointer) +
'lines' (pointer) +
'own_lines' (pointer, hdata: 'lines') +
'mixed_lines' (pointer, hdata: 'lines') +
'lines' (pointer, hdata: 'lines') +
'time_for_each_line' (integer) +
'chat_refresh_needed' (integer) +
'nicklist' (integer) +
'nicklist_case_sensitive' (integer) +
'nicklist_root' (pointer) +
'nicklist_root' (pointer, hdata: 'nick_group') +
'nicklist_max_length' (integer) +
'nicklist_display_groups' (integer) +
'nicklist_visible_count' (integer) +
@ -230,15 +230,15 @@
'input_buffer_length' (integer) +
'input_buffer_pos' (integer) +
'input_buffer_1st_display' (integer) +
'input_undo_snap' (pointer) +
'input_undo' (pointer) +
'last_input_undo' (pointer) +
'ptr_input_undo' (pointer) +
'input_undo_snap' (pointer, hdata: 'input_undo') +
'input_undo' (pointer, hdata: 'input_undo') +
'last_input_undo' (pointer, hdata: 'input_undo') +
'ptr_input_undo' (pointer, hdata: 'input_undo') +
'input_undo_count' (integer) +
'completion' (pointer) +
'history' (pointer) +
'last_history' (pointer) +
'ptr_history' (pointer) +
'completion' (pointer, hdata: 'completion') +
'history' (pointer, hdata: 'history') +
'last_history' (pointer, hdata: 'history') +
'ptr_history' (pointer, hdata: 'history') +
'num_history' (integer) +
'text_search' (integer) +
'text_search_exact' (integer) +
@ -251,17 +251,17 @@
'highlight_tags_count' (integer) +
'highlight_tags_array' (pointer) +
'hotlist_max_level_nicks' (pointer) +
'keys' (pointer) +
'last_key' (pointer) +
'keys' (pointer, hdata: 'key') +
'last_key' (pointer, hdata: 'key') +
'keys_count' (integer) +
'local_variables' (pointer) +
'prev_buffer' (pointer) +
'next_buffer' (pointer) |
'prev_buffer' (pointer, hdata: 'buffer') +
'next_buffer' (pointer, hdata: 'buffer') |
'gui_buffers' +
'last_gui_buffer'
| weechat | completion | structure avec une complétion |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'context' (integer) +
'base_command' (string) +
'base_command_arg_index' (integer) +
@ -278,34 +278,34 @@
'position_replace' (integer) +
'diff_size' (integer) +
'diff_length' (integer) +
'partial_completion_list' (pointer) +
'last_partial_completion' (pointer) |
'partial_completion_list' (pointer, hdata: 'completion_partial') +
'last_partial_completion' (pointer, hdata: 'completion_partial') |
-
| weechat | completion_partial | structure avec une complétion partielle |
'word' (string) +
'count' (integer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'completion_partial') +
'next_item' (pointer, hdata: 'completion_partial') |
-
| weechat | config_file | fichier de configuration |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'filename' (string) +
'file' (pointer) +
'callback_reload' (pointer) +
'callback_reload_data' (pointer) +
'sections' (pointer) +
'last_section' (pointer) +
'prev_config' (pointer) +
'next_config' (pointer) |
'sections' (pointer, hdata: 'config_section') +
'last_section' (pointer, hdata: 'config_section') +
'prev_config' (pointer, hdata: 'config_file') +
'next_config' (pointer, hdata: 'config_file') |
'config_files' +
'last_config_file'
| weechat | config_option | option de configuration |
'config_file' (pointer) +
'section' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'section' (pointer, hdata: 'config_section') +
'name' (string) +
'type' (integer) +
'description' (string) +
@ -322,12 +322,12 @@
'callback_delete' (pointer) +
'callback_delete_data' (pointer) +
'loaded' (integer) +
'prev_option' (pointer) +
'next_option' (pointer) |
'prev_option' (pointer, hdata: 'config_option') +
'next_option' (pointer, hdata: 'config_option') |
-
| weechat | config_section | section de configuration |
'config_file' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'name' (string) +
'user_can_add_options' (integer) +
'user_can_delete_options' (integer) +
@ -341,10 +341,10 @@
'callback_create_option_data' (pointer) +
'callback_delete_option' (pointer) +
'callback_delete_option_data' (pointer) +
'options' (pointer) +
'last_option' (pointer) +
'prev_section' (pointer) +
'next_section' (pointer) |
'options' (pointer, hdata: 'config_option') +
'last_option' (pointer, hdata: 'config_option') +
'prev_section' (pointer, hdata: 'config_section') +
'next_section' (pointer, hdata: 'config_section') |
-
| weechat | filter | filtre |
@ -359,206 +359,42 @@
'regex' (string) +
'regex_prefix' (pointer) +
'regex_message' (pointer) +
'prev_filter' (pointer) +
'next_filter' (pointer) |
'prev_filter' (pointer, hdata: 'filter') +
'next_filter' (pointer, hdata: 'filter') |
'gui_filters' +
'last_gui_filter'
| weechat | history | historique des commandes dans le tampon |
'text' (string) +
'next_history' (pointer) +
'prev_history' (pointer) |
'next_history' (pointer, hdata: 'history') +
'prev_history' (pointer, hdata: 'history') |
-
| weechat | hook | hook (variables communes à tous les types de hooks) |
'plugin' (pointer) +
'type' (integer) +
'deleted' (integer) +
'running' (integer) +
'priority' (integer) +
'callback_data' (pointer) +
'hook_data' (pointer) +
'prev_hook' (pointer) +
'next_hook' (pointer) |
-
| weechat | hook_command | hook de type "command" |
'callback' (pointer) +
'command' (string) +
'description' (string) +
'args' (string) +
'args_description' (string) +
'completion' (string) +
'cplt_num_templates' (integer) +
'cplt_templates' (pointer) +
'cplt_templates_static' (pointer) +
'cplt_template_num_args' (pointer) +
'cplt_template_args' (pointer) +
'cplt_template_num_args_concat' (integer) +
'cplt_template_args_concat' (pointer) |
'last_weechat_hook_command' +
'weechat_hooks_command'
| weechat | hook_command_run | hook de type "command_run" |
'callback' (pointer) +
'command' (string) |
'last_weechat_hook_command_run' +
'weechat_hooks_command_run'
| weechat | hook_completion | hook de type "completion" |
'callback' (pointer) +
'completion_item' (string) +
'description' (string) |
'last_weechat_hook_completion' +
'weechat_hooks_completion'
| weechat | hook_config | hook de type "config" |
'callback' (pointer) +
'option' (string) |
'last_weechat_hook_config' +
'weechat_hooks_config'
| weechat | hook_connect | hook de type "connect" |
'callback' (pointer) +
'proxy' (string) +
'address' (string) +
'port' (integer) +
'sock' (integer) +
'ipv6' (integer) +
'gnutls_sess' (pointer) +
'gnutls_cb' (pointer) +
'gnutls_dhkey_size' (integer) +
'gnutls_priorities' (string) +
'local_hostname' (string) +
'child_read' (integer) +
'child_write' (integer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'handshake_hook_fd' (pointer) +
'handshake_hook_timer' (pointer) +
'handshake_fd_flags' (integer) +
'handshake_ip_address' (string) |
'last_weechat_hook_connect' +
'weechat_hooks_connect'
| weechat | hook_fd | hook de type "fd" |
'callback' (pointer) +
'fd' (integer) +
'flags' (integer) +
'error' (integer) |
'last_weechat_hook_fd' +
'weechat_hooks_fd'
| weechat | hook_hdata | hook de type "hdata" |
'callback' (pointer) +
'hdata_name' (string) +
'description' (string) |
'last_weechat_hook_hdata' +
'weechat_hooks_hdata'
| weechat | hook_hsignal | hook de type "hsignal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_hsignal' +
'weechat_hooks_hsignal'
| weechat | hook_info | hook de type "info" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) |
'last_weechat_hook_info' +
'weechat_hooks_info'
| weechat | hook_info_hashtable | hook de type "info_hashtable" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) +
'output_description' (string) |
'last_weechat_hook_info_hashtable' +
'weechat_hooks_info_hashtable'
| weechat | hook_infolist | hook de type "infolist" |
'callback' (pointer) +
'infolist_name' (string) +
'description' (string) +
'pointer_description' (string) +
'args_description' (string) |
'last_weechat_hook_infolist' +
'weechat_hooks_infolist'
| weechat | hook_modifier | hook de type "modifier" |
'callback' (pointer) +
'modifier' (string) |
'last_weechat_hook_modifier' +
'weechat_hooks_modifier'
| weechat | hook_print | hook de type "print" |
'callback' (pointer) +
'buffer' (pointer) +
'tags_count' (integer) +
'tags_array' (pointer) +
'message' (string) +
'strip_colors' (integer) |
'last_weechat_hook_print' +
'weechat_hooks_print'
| weechat | hook_process | hook de type "process" |
'callback' (pointer) +
'command' (string) +
'timeout' (long) +
'child_read' (pointer) +
'child_write' (pointer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'hook_timer' (pointer) +
'buffer' (pointer) +
'buffer_size' (pointer) |
'last_weechat_hook_process' +
'weechat_hooks_process'
| weechat | hook_signal | hook de type "signal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_signal' +
'weechat_hooks_signal'
| weechat | hook_timer | hook de type "timer" |
'callback' (pointer) +
'interval' (long) +
'align_second' (integer) +
'remaining_calls' (integer) +
'last_exec' (other) +
'next_exec' (other) |
'last_weechat_hook_timer' +
'weechat_hooks_timer'
| weechat | input_undo | structure avec le "unco" pour la ligne de commande |
| weechat | input_undo | structure avec le "undo" pour la ligne de commande |
'data' (string) +
'pos' (integer) +
'prev_undo' (pointer) +
'next_undo' (pointer) |
'prev_undo' (pointer, hdata: 'input_undo') +
'next_undo' (pointer, hdata: 'input_undo') |
-
| weechat | key | une touche (un raccourci clavier) |
'key' (string) +
'command' (string) +
'prev_key' (pointer) +
'next_key' (pointer) |
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_keys' +
'last_gui_default_key' +
'last_gui_key'
| weechat | line | structure avec une ligne |
'data' (pointer) +
'prev_line' (pointer) +
'next_line' (pointer) |
'data' (pointer, hdata: 'line_data') +
'prev_line' (pointer, hdata: 'line') +
'next_line' (pointer, hdata: 'line') |
-
| weechat | line_data | structure avec les données d'une ligne |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'y' (integer) +
'date' (time) +
'date_printed' (time) +
@ -574,9 +410,9 @@
-
| weechat | lines | structure avec des lignes |
'first_line' (pointer) +
'last_line' (pointer) +
'last_read_line' (pointer) +
'first_line' (pointer, hdata: 'line') +
'last_line' (pointer, hdata: 'line') +
'last_read_line' (pointer, hdata: 'line') +
'lines_count' (integer) +
'first_line_not_read' (integer) +
'lines_hidden' (integer) +
@ -585,14 +421,14 @@
-
| weechat | nick | pseudo dans la liste de pseudos |
'group' (pointer) +
'group' (pointer, hdata: 'nick_group') +
'name' (string) +
'color' (string) +
'prefix' (string) +
'prefix_color' (string) +
'visible' (integer) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'nick') +
'next_nick' (pointer, hdata: 'nick') |
-
| weechat | nick_group | groupe dans la liste de pseudos |
@ -600,15 +436,30 @@
'color' (string) +
'visible' (integer) +
'level' (integer) +
'parent' (pointer) +
'childs' (pointer) +
'last_child' (pointer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'prev_group' (pointer) +
'next_group' (pointer) |
'parent' (pointer, hdata: 'nick_group') +
'childs' (pointer, hdata: 'nick_group') +
'last_child' (pointer, hdata: 'nick_group') +
'nicks' (pointer, hdata: 'nick') +
'last_nick' (pointer, hdata: 'nick') +
'prev_group' (pointer, hdata: 'nick_group') +
'next_group' (pointer, hdata: 'nick_group') |
-
| weechat | plugin | extension |
'filename' (string) +
'handle' (pointer) +
'name' (string) +
'description' (string) +
'author' (string) +
'version' (string) +
'license' (string) +
'charset' (string) +
'debug' (integer) +
'prev_plugin' (pointer, hdata: 'plugin') +
'next_plugin' (pointer, hdata: 'plugin') |
'last_weechat_plugin' +
'weechat_plugins'
| weechat | window | fenêtre |
'win_x' (integer) +
'win_y' (integer) +
@ -626,37 +477,37 @@
'last_bar_window' (pointer) +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'layout_plugin_name' (string) +
'layout_buffer_name' (string) +
'scroll' (pointer) +
'ptr_tree' (pointer) +
'prev_window' (pointer) +
'next_window' (pointer) |
'scroll' (pointer, hdata: 'window_scroll') +
'ptr_tree' (pointer, hdata: 'window_tree') +
'prev_window' (pointer, hdata: 'window') +
'next_window' (pointer, hdata: 'window') |
'gui_current_window' +
'gui_windows' +
'last_gui_window'
| weechat | window_scroll | info de défilement dans la fenêtre |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'first_line_displayed' (integer) +
'start_line' (pointer) +
'start_line' (pointer, hdata: 'line') +
'start_line_pos' (integer) +
'scrolling' (integer) +
'start_col' (integer) +
'lines_after' (integer) +
'reset_allowed' (integer) +
'prev_scroll' (pointer) +
'next_scroll' (pointer) |
'prev_scroll' (pointer, hdata: 'window_scroll') +
'next_scroll' (pointer, hdata: 'window_scroll') |
-
| weechat | window_tree | arbre des fenêtres |
'parent_node' (pointer) +
'parent_node' (pointer, hdata: 'window_tree') +
'split_pct' (integer) +
'split_horizontal' (integer) +
'child1' (pointer) +
'child2' (pointer) +
'window' (pointer) |
'child1' (pointer, hdata: 'window_tree') +
'child2' (pointer, hdata: 'window_tree') +
'window' (pointer, hdata: 'window') |
'gui_windows_tree'
|========================================

View File

@ -145,7 +145,8 @@ extension: nom de l'extension ('weechat' pour une commande interne WeeChat)
/debug list
set <extension> <niveau>
dump [<extension>]
buffer|color|hdata|infolists|memory|tags|term|windows
buffer|color|infolists|memory|tags|term|windows
hdata [free]
list: lister les extensions avec leur niveau de debug
set: définir le niveau de debug pour l'extension
@ -154,7 +155,7 @@ extension: nom de l'extension ("core" pour le coeur de WeeChat)
dump: afficher les variables mémoire WeeChat dans le fichier log (les mêmes messages sont affichés lorsque WeeChat plante)
buffer: afficher le contenu du tampon en valeurs hexadécimales dans le fichier log
color: afficher des infos sur les paires de couleur courantes
hdata: afficher des infos sur les hdata
hdata: afficher des infos sur les hdata (avec free: supprimer tous les hdata en mémoire)
infolists: afficher des infos sur les infolists
memory: afficher des infos sur l'utilisation de la mémoire
tags: afficher les étiquettes pour les lignes

View File

@ -11877,7 +11877,8 @@ Prototype :
[source,C]
----------------------------------------
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type);
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type,
const char *hdata_name);
----------------------------------------
Paramètres :
@ -11892,6 +11893,8 @@ Paramètres :
** WEECHAT_HDATA_POINTER
** WEECHAT_HDATA_TIME
** WEECHAT_HDATA_OTHER
* 'hdata_name' : nom d'un hdata (si c'est un pointeur vers une structure qui a un
hdata)
Exemple en C :
@ -11909,22 +11912,22 @@ struct t_myplugin_list
/* ... */
struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next");
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, NULL);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, NULL);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER, NULL);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, "myplugin_list");
----------------------------------------
La macro "WEECHAT_HDATA_VAR" peut être utilisée pour raccourcir le code :
[source,C]
----------------------------------------
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, "myplugin_list");
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, "myplugin_list");
----------------------------------------
[NOTE]
@ -12153,8 +12156,7 @@ Exemple en C :
[source,C]
----------------------------------------
weechat_printf (NULL, "type = %s",
weechat_hdata_get_var_type_string (hdata, "name"));
weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "name"));
----------------------------------------
Script (Python):
@ -12165,7 +12167,48 @@ Script (Python):
type = weechat.hdata_get_var_type_string(hdata, name)
# exemple
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name"))
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name"))
----------------------------------------
weechat_hdata_get_var_hdata
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_Nouveau dans la version 0.3.6._
Retourne le hdata pour la variable dans le hdata.
Prototype :
[source,C]
----------------------------------------
const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name);
----------------------------------------
Paramètres :
* 'hdata' : pointeur vers le hdata
* 'name' : nom de la variable
Valeur de retour :
* hdata pour la variable, NULL si pas de hdata ou en cas d'erreur
Exemple en C :
[source,C]
----------------------------------------
weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name"));
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
hdata_name = weechat.hdata_get_var_hdata(hdata, name)
# exemple
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
----------------------------------------
weechat_hdata_get_var

View File

@ -19,22 +19,22 @@
'pv_remote_nick_color' (string) +
'hook_autorejoin' (pointer) +
'nicks_count' (integer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'nicks' (pointer, hdata: 'irc_nick') +
'last_nick' (pointer, hdata: 'irc_nick') +
'nicks_speaking' (pointer) +
'nicks_speaking_time' (pointer) +
'last_nick_speaking_time' (pointer) +
'buffer' (pointer) +
'nicks_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'last_nick_speaking_time' (pointer, hdata: 'irc_channel_speaking') +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'prev_channel' (pointer) +
'next_channel' (pointer) |
'prev_channel' (pointer, hdata: 'irc_channel') +
'next_channel' (pointer, hdata: 'irc_channel') |
-
| irc | irc_channel_speaking | irc channel_speaking |
'nick' (string) +
'time_last_message' (time) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_channel_speaking') +
'next_nick' (pointer, hdata: 'irc_channel_speaking') |
-
| irc | irc_ignore | irc ignore |
@ -43,8 +43,8 @@
'regex_mask' (pointer) +
'server' (string) +
'channel' (string) +
'prev_ignore' (pointer) +
'next_ignore' (pointer) |
'prev_ignore' (pointer, hdata: 'irc_ignore') +
'next_ignore' (pointer, hdata: 'irc_ignore') |
'irc_ignore_list' +
'last_irc_ignore'
@ -55,23 +55,23 @@
'prefix' (string) +
'away' (integer) +
'color' (string) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'irc_nick') +
'next_nick' (pointer, hdata: 'irc_nick') |
-
| irc | irc_notify | irc notify |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'nick' (string) +
'check_away' (integer) +
'is_on_server' (integer) +
'away_message' (string) +
'ison_received' (integer) +
'prev_notify' (pointer) +
'next_notify' (pointer) |
'prev_notify' (pointer, hdata: 'irc_notify') +
'next_notify' (pointer, hdata: 'irc_notify') |
-
| irc | irc_redirect | irc redirect |
'server' (pointer) +
'server' (pointer, hdata: 'irc_server') +
'pattern' (string) +
'signal' (string) +
'count' (integer) +
@ -88,8 +88,8 @@
'cmd_filter' (pointer) +
'output' (string) +
'output_size' (integer) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect') +
'next_redirect' (pointer, hdata: 'irc_redirect') |
-
| irc | irc_redirect_pattern | pattern for irc redirect |
@ -99,8 +99,8 @@
'cmd_start' (string) +
'cmd_stop' (string) +
'cmd_extra' (string) +
'prev_redirect' (pointer) +
'next_redirect' (pointer) |
'prev_redirect' (pointer, hdata: 'irc_redirect_pattern') +
'next_redirect' (pointer, hdata: 'irc_redirect_pattern') |
'irc_redirect_patterns' +
'last_irc_redirect_pattern'
@ -118,10 +118,10 @@
'current_ip' (string) +
'current_port' (integer) +
'sock' (integer) +
'hook_connect' (pointer) +
'hook_fd' (pointer) +
'hook_timer_connection' (pointer) +
'hook_timer_sasl' (pointer) +
'hook_connect' (pointer, hdata: 'hook') +
'hook_fd' (pointer, hdata: 'hook') +
'hook_timer_connection' (pointer, hdata: 'hook') +
'hook_timer_sasl' (pointer, hdata: 'hook') +
'is_connected' (integer) +
'ssl_connected' (integer) +
'gnutls_sess' (other) +
@ -153,17 +153,17 @@
'last_away_check' (time) +
'outqueue' (pointer) +
'last_outqueue' (pointer) +
'redirects' (pointer) +
'last_redirect' (pointer) +
'notify_list' (pointer) +
'last_notify' (pointer) +
'redirects' (pointer, hdata: 'irc_redirect') +
'last_redirect' (pointer, hdata: 'irc_redirect') +
'notify_list' (pointer, hdata: 'irc_notify') +
'last_notify' (pointer, hdata: 'irc_notify') +
'manual_joins' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'buffer_as_string' (string) +
'channels' (pointer) +
'last_channel' (pointer) +
'prev_server' (pointer) +
'next_server' (pointer) |
'channels' (pointer, hdata: 'irc_channel') +
'last_channel' (pointer, hdata: 'irc_channel') +
'prev_server' (pointer, hdata: 'irc_server') +
'next_server' (pointer, hdata: 'irc_server') |
'irc_servers' +
'last_irc_server'
@ -177,23 +177,23 @@
'items_array' (pointer) +
'bar_window' (pointer) +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer) +
'next_bar' (pointer) |
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
'gui_bars' +
'last_gui_bar'
| weechat | bar_item | bar item |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'build_callback' (pointer) +
'build_callback_data' (pointer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'bar_item') +
'next_item' (pointer, hdata: 'bar_item') |
'gui_bar_items' +
'last_gui_bar_item'
| weechat | buffer | buffer |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
'merge_for_upgrade' (pointer) +
'number' (integer) +
@ -209,14 +209,14 @@
'close_callback' (pointer) +
'close_callback_data' (pointer) +
'title' (string) +
'own_lines' (pointer) +
'mixed_lines' (pointer) +
'lines' (pointer) +
'own_lines' (pointer, hdata: 'lines') +
'mixed_lines' (pointer, hdata: 'lines') +
'lines' (pointer, hdata: 'lines') +
'time_for_each_line' (integer) +
'chat_refresh_needed' (integer) +
'nicklist' (integer) +
'nicklist_case_sensitive' (integer) +
'nicklist_root' (pointer) +
'nicklist_root' (pointer, hdata: 'nick_group') +
'nicklist_max_length' (integer) +
'nicklist_display_groups' (integer) +
'nicklist_visible_count' (integer) +
@ -230,15 +230,15 @@
'input_buffer_length' (integer) +
'input_buffer_pos' (integer) +
'input_buffer_1st_display' (integer) +
'input_undo_snap' (pointer) +
'input_undo' (pointer) +
'last_input_undo' (pointer) +
'ptr_input_undo' (pointer) +
'input_undo_snap' (pointer, hdata: 'input_undo') +
'input_undo' (pointer, hdata: 'input_undo') +
'last_input_undo' (pointer, hdata: 'input_undo') +
'ptr_input_undo' (pointer, hdata: 'input_undo') +
'input_undo_count' (integer) +
'completion' (pointer) +
'history' (pointer) +
'last_history' (pointer) +
'ptr_history' (pointer) +
'completion' (pointer, hdata: 'completion') +
'history' (pointer, hdata: 'history') +
'last_history' (pointer, hdata: 'history') +
'ptr_history' (pointer, hdata: 'history') +
'num_history' (integer) +
'text_search' (integer) +
'text_search_exact' (integer) +
@ -251,17 +251,17 @@
'highlight_tags_count' (integer) +
'highlight_tags_array' (pointer) +
'hotlist_max_level_nicks' (pointer) +
'keys' (pointer) +
'last_key' (pointer) +
'keys' (pointer, hdata: 'key') +
'last_key' (pointer, hdata: 'key') +
'keys_count' (integer) +
'local_variables' (pointer) +
'prev_buffer' (pointer) +
'next_buffer' (pointer) |
'prev_buffer' (pointer, hdata: 'buffer') +
'next_buffer' (pointer, hdata: 'buffer') |
'gui_buffers' +
'last_gui_buffer'
| weechat | completion | structure with completion |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'context' (integer) +
'base_command' (string) +
'base_command_arg_index' (integer) +
@ -278,34 +278,34 @@
'position_replace' (integer) +
'diff_size' (integer) +
'diff_length' (integer) +
'partial_completion_list' (pointer) +
'last_partial_completion' (pointer) |
'partial_completion_list' (pointer, hdata: 'completion_partial') +
'last_partial_completion' (pointer, hdata: 'completion_partial') |
-
| weechat | completion_partial | structure with partial completion |
'word' (string) +
'count' (integer) +
'prev_item' (pointer) +
'next_item' (pointer) |
'prev_item' (pointer, hdata: 'completion_partial') +
'next_item' (pointer, hdata: 'completion_partial') |
-
| weechat | config_file | config file |
'plugin' (pointer) +
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'filename' (string) +
'file' (pointer) +
'callback_reload' (pointer) +
'callback_reload_data' (pointer) +
'sections' (pointer) +
'last_section' (pointer) +
'prev_config' (pointer) +
'next_config' (pointer) |
'sections' (pointer, hdata: 'config_section') +
'last_section' (pointer, hdata: 'config_section') +
'prev_config' (pointer, hdata: 'config_file') +
'next_config' (pointer, hdata: 'config_file') |
'config_files' +
'last_config_file'
| weechat | config_option | config option |
'config_file' (pointer) +
'section' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'section' (pointer, hdata: 'config_section') +
'name' (string) +
'type' (integer) +
'description' (string) +
@ -322,12 +322,12 @@
'callback_delete' (pointer) +
'callback_delete_data' (pointer) +
'loaded' (integer) +
'prev_option' (pointer) +
'next_option' (pointer) |
'prev_option' (pointer, hdata: 'config_option') +
'next_option' (pointer, hdata: 'config_option') |
-
| weechat | config_section | config section |
'config_file' (pointer) +
'config_file' (pointer, hdata: 'config_file') +
'name' (string) +
'user_can_add_options' (integer) +
'user_can_delete_options' (integer) +
@ -341,10 +341,10 @@
'callback_create_option_data' (pointer) +
'callback_delete_option' (pointer) +
'callback_delete_option_data' (pointer) +
'options' (pointer) +
'last_option' (pointer) +
'prev_section' (pointer) +
'next_section' (pointer) |
'options' (pointer, hdata: 'config_option') +
'last_option' (pointer, hdata: 'config_option') +
'prev_section' (pointer, hdata: 'config_section') +
'next_section' (pointer, hdata: 'config_section') |
-
| weechat | filter | filter |
@ -359,206 +359,42 @@
'regex' (string) +
'regex_prefix' (pointer) +
'regex_message' (pointer) +
'prev_filter' (pointer) +
'next_filter' (pointer) |
'prev_filter' (pointer, hdata: 'filter') +
'next_filter' (pointer, hdata: 'filter') |
'gui_filters' +
'last_gui_filter'
| weechat | history | history of commands in buffer |
'text' (string) +
'next_history' (pointer) +
'prev_history' (pointer) |
'next_history' (pointer, hdata: 'history') +
'prev_history' (pointer, hdata: 'history') |
-
| weechat | hook | hook (variables common to all hook types) |
'plugin' (pointer) +
'type' (integer) +
'deleted' (integer) +
'running' (integer) +
'priority' (integer) +
'callback_data' (pointer) +
'hook_data' (pointer) +
'prev_hook' (pointer) +
'next_hook' (pointer) |
-
| weechat | hook_command | hook of type "command" |
'callback' (pointer) +
'command' (string) +
'description' (string) +
'args' (string) +
'args_description' (string) +
'completion' (string) +
'cplt_num_templates' (integer) +
'cplt_templates' (pointer) +
'cplt_templates_static' (pointer) +
'cplt_template_num_args' (pointer) +
'cplt_template_args' (pointer) +
'cplt_template_num_args_concat' (integer) +
'cplt_template_args_concat' (pointer) |
'last_weechat_hook_command' +
'weechat_hooks_command'
| weechat | hook_command_run | hook of type "command_run" |
'callback' (pointer) +
'command' (string) |
'last_weechat_hook_command_run' +
'weechat_hooks_command_run'
| weechat | hook_completion | hook of type "completion" |
'callback' (pointer) +
'completion_item' (string) +
'description' (string) |
'last_weechat_hook_completion' +
'weechat_hooks_completion'
| weechat | hook_config | hook of type "config" |
'callback' (pointer) +
'option' (string) |
'last_weechat_hook_config' +
'weechat_hooks_config'
| weechat | hook_connect | hook of type "connect" |
'callback' (pointer) +
'proxy' (string) +
'address' (string) +
'port' (integer) +
'sock' (integer) +
'ipv6' (integer) +
'gnutls_sess' (pointer) +
'gnutls_cb' (pointer) +
'gnutls_dhkey_size' (integer) +
'gnutls_priorities' (string) +
'local_hostname' (string) +
'child_read' (integer) +
'child_write' (integer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'handshake_hook_fd' (pointer) +
'handshake_hook_timer' (pointer) +
'handshake_fd_flags' (integer) +
'handshake_ip_address' (string) |
'last_weechat_hook_connect' +
'weechat_hooks_connect'
| weechat | hook_fd | hook of type "fd" |
'callback' (pointer) +
'fd' (integer) +
'flags' (integer) +
'error' (integer) |
'last_weechat_hook_fd' +
'weechat_hooks_fd'
| weechat | hook_hdata | hook of type "hdata" |
'callback' (pointer) +
'hdata_name' (string) +
'description' (string) |
'last_weechat_hook_hdata' +
'weechat_hooks_hdata'
| weechat | hook_hsignal | hook of type "hsignal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_hsignal' +
'weechat_hooks_hsignal'
| weechat | hook_info | hook of type "info" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) |
'last_weechat_hook_info' +
'weechat_hooks_info'
| weechat | hook_info_hashtable | hook of type "info_hashtable" |
'callback' (pointer) +
'info_name' (string) +
'description' (string) +
'args_description' (string) +
'output_description' (string) |
'last_weechat_hook_info_hashtable' +
'weechat_hooks_info_hashtable'
| weechat | hook_infolist | hook of type "infolist" |
'callback' (pointer) +
'infolist_name' (string) +
'description' (string) +
'pointer_description' (string) +
'args_description' (string) |
'last_weechat_hook_infolist' +
'weechat_hooks_infolist'
| weechat | hook_modifier | hook of type "modifier" |
'callback' (pointer) +
'modifier' (string) |
'last_weechat_hook_modifier' +
'weechat_hooks_modifier'
| weechat | hook_print | hook of type "print" |
'callback' (pointer) +
'buffer' (pointer) +
'tags_count' (integer) +
'tags_array' (pointer) +
'message' (string) +
'strip_colors' (integer) |
'last_weechat_hook_print' +
'weechat_hooks_print'
| weechat | hook_process | hook of type "process" |
'callback' (pointer) +
'command' (string) +
'timeout' (long) +
'child_read' (pointer) +
'child_write' (pointer) +
'child_pid' (other) +
'hook_fd' (pointer) +
'hook_timer' (pointer) +
'buffer' (pointer) +
'buffer_size' (pointer) |
'last_weechat_hook_process' +
'weechat_hooks_process'
| weechat | hook_signal | hook of type "signal" |
'callback' (pointer) +
'signal' (string) |
'last_weechat_hook_signal' +
'weechat_hooks_signal'
| weechat | hook_timer | hook of type "timer" |
'callback' (pointer) +
'interval' (long) +
'align_second' (integer) +
'remaining_calls' (integer) +
'last_exec' (other) +
'next_exec' (other) |
'last_weechat_hook_timer' +
'weechat_hooks_timer'
| weechat | input_undo | structure with undo for input line |
'data' (string) +
'pos' (integer) +
'prev_undo' (pointer) +
'next_undo' (pointer) |
'prev_undo' (pointer, hdata: 'input_undo') +
'next_undo' (pointer, hdata: 'input_undo') |
-
| weechat | key | a key (keyboard shortcut) |
'key' (string) +
'command' (string) +
'prev_key' (pointer) +
'next_key' (pointer) |
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_keys' +
'last_gui_default_key' +
'last_gui_key'
| weechat | line | structure with one line |
'data' (pointer) +
'prev_line' (pointer) +
'next_line' (pointer) |
'data' (pointer, hdata: 'line_data') +
'prev_line' (pointer, hdata: 'line') +
'next_line' (pointer, hdata: 'line') |
-
| weechat | line_data | structure with one line data |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'y' (integer) +
'date' (time) +
'date_printed' (time) +
@ -574,9 +410,9 @@
-
| weechat | lines | structure with lines |
'first_line' (pointer) +
'last_line' (pointer) +
'last_read_line' (pointer) +
'first_line' (pointer, hdata: 'line') +
'last_line' (pointer, hdata: 'line') +
'last_read_line' (pointer, hdata: 'line') +
'lines_count' (integer) +
'first_line_not_read' (integer) +
'lines_hidden' (integer) +
@ -585,14 +421,14 @@
-
| weechat | nick | nick in nicklist |
'group' (pointer) +
'group' (pointer, hdata: 'nick_group') +
'name' (string) +
'color' (string) +
'prefix' (string) +
'prefix_color' (string) +
'visible' (integer) +
'prev_nick' (pointer) +
'next_nick' (pointer) |
'prev_nick' (pointer, hdata: 'nick') +
'next_nick' (pointer, hdata: 'nick') |
-
| weechat | nick_group | group in nicklist |
@ -600,15 +436,30 @@
'color' (string) +
'visible' (integer) +
'level' (integer) +
'parent' (pointer) +
'childs' (pointer) +
'last_child' (pointer) +
'nicks' (pointer) +
'last_nick' (pointer) +
'prev_group' (pointer) +
'next_group' (pointer) |
'parent' (pointer, hdata: 'nick_group') +
'childs' (pointer, hdata: 'nick_group') +
'last_child' (pointer, hdata: 'nick_group') +
'nicks' (pointer, hdata: 'nick') +
'last_nick' (pointer, hdata: 'nick') +
'prev_group' (pointer, hdata: 'nick_group') +
'next_group' (pointer, hdata: 'nick_group') |
-
| weechat | plugin | plugin |
'filename' (string) +
'handle' (pointer) +
'name' (string) +
'description' (string) +
'author' (string) +
'version' (string) +
'license' (string) +
'charset' (string) +
'debug' (integer) +
'prev_plugin' (pointer, hdata: 'plugin') +
'next_plugin' (pointer, hdata: 'plugin') |
'last_weechat_plugin' +
'weechat_plugins'
| weechat | window | window |
'win_x' (integer) +
'win_y' (integer) +
@ -626,37 +477,37 @@
'last_bar_window' (pointer) +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'layout_plugin_name' (string) +
'layout_buffer_name' (string) +
'scroll' (pointer) +
'ptr_tree' (pointer) +
'prev_window' (pointer) +
'next_window' (pointer) |
'scroll' (pointer, hdata: 'window_scroll') +
'ptr_tree' (pointer, hdata: 'window_tree') +
'prev_window' (pointer, hdata: 'window') +
'next_window' (pointer, hdata: 'window') |
'gui_current_window' +
'gui_windows' +
'last_gui_window'
| weechat | window_scroll | scroll info in window |
'buffer' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
'first_line_displayed' (integer) +
'start_line' (pointer) +
'start_line' (pointer, hdata: 'line') +
'start_line_pos' (integer) +
'scrolling' (integer) +
'start_col' (integer) +
'lines_after' (integer) +
'reset_allowed' (integer) +
'prev_scroll' (pointer) +
'next_scroll' (pointer) |
'prev_scroll' (pointer, hdata: 'window_scroll') +
'next_scroll' (pointer, hdata: 'window_scroll') |
-
| weechat | window_tree | tree of windows |
'parent_node' (pointer) +
'parent_node' (pointer, hdata: 'window_tree') +
'split_pct' (integer) +
'split_horizontal' (integer) +
'child1' (pointer) +
'child2' (pointer) +
'window' (pointer) |
'child1' (pointer, hdata: 'window_tree') +
'child2' (pointer, hdata: 'window_tree') +
'window' (pointer, hdata: 'window') |
'gui_windows_tree'
|========================================

View File

@ -145,7 +145,8 @@ comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trov
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|hdata|infolists|memory|tags|term|windows
buffer|color|infolists|memory|tags|term|windows
hdata [free]
list: list plugins with debug levels
set: set debug level for plugin
@ -154,7 +155,7 @@ comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trov
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
hdata: display infos about hdata
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
tags: display tags for lines

View File

@ -11795,7 +11795,8 @@ Prototipo:
[source,C]
----------------------------------------
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type);
void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type,
const char *hdata_name);
----------------------------------------
Argomenti:
@ -11810,6 +11811,7 @@ Argomenti:
** WEECHAT_HDATA_POINTER
** WEECHAT_HDATA_TIME
** WEECHAT_HDATA_OTHER
* 'hdata_name': name of a hdata (if it's a pointer to a structure with hdata)
Esempio in C:
@ -11827,22 +11829,22 @@ struct t_myplugin_list
/* ... */
struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next");
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, NULL);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, NULL);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER, NULL);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, "myplugin_list");
----------------------------------------
The macro "WEECHAT_HDATA_VAR" can be used to shorten code:
[source,C]
----------------------------------------
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER);
WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, "myplugin_list");
WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, "myplugin_list");
----------------------------------------
[NOTE]
@ -11888,11 +11890,11 @@ struct t_myplugin_list *last_buffer = NULL;
/* ... */
struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next");
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER);
weechat_hdata_new_var (hdata, "name", offsetof (struct t_myplugin_list, name), WEECHAT_HDATA_STRING, NULL);
weechat_hdata_new_var (hdata, "buffer", offsetof (struct t_myplugin_list, buffer), WEECHAT_HDATA_POINTER, NULL);
weechat_hdata_new_var (hdata, "count", offsetof (struct t_myplugin_list, count), WEECHAT_HDATA_INTEGER, NULL);
weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, "myplugin_list");
weechat_hdata_new_list (hdata, "buffers", &buffers);
weechat_hdata_new_list (hdata, "last_buffer", &last_buffer);
----------------------------------------
@ -12087,7 +12089,49 @@ Script (Python):
type = weechat.hdata_get_var_type_string(hdata, name)
# esempio
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name"))
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name"))
----------------------------------------
// TRANSLATION MISSING
weechat_hdata_get_var_hdata
^^^^^^^^^^^^^^^^^^^^^^^^^^^
_Novità nella versione 0.3.6._
Return hdata for variable in hdata.
Prototipo:
[source,C]
----------------------------------------
const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name);
----------------------------------------
Argomenti:
* 'hdata': hdata pointer
* 'name': variable name
Valore restituito:
* hdata for variable, NULL if no hdata or if an error occured
Esempio in C:
[source,C]
----------------------------------------
weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name"));
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototipo
hdata_name = weechat.hdata_get_var_hdata(hdata, name)
# esempio
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
----------------------------------------
// TRANSLATION MISSING

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1071,8 +1071,8 @@ msgstr "spřáva ladění pro jádro/pluginy"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1087,7 +1087,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6643,58 +6644,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "historie příkazů"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "historie příkazů"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "funkce pro příkazovou řádku"
@ -6719,6 +6668,10 @@ msgstr "barva textu pro skupiny v seznamu přezdívek"
msgid "nick in nicklist"
msgstr "přezdívky v seznamu notifikací"
#, fuzzy
msgid "plugin"
msgstr "Plugin"
#, fuzzy
msgid "window"
msgstr "spravuje okna"
@ -7806,6 +7759,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historie příkazů"
#, fuzzy
#~ msgid "completion"
#~ msgstr "kompilováno"

117
po/de.po
View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-06-15 18:51+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1088,13 +1088,15 @@ msgstr ""
msgid "control debug for core/plugins"
msgstr "Debug-Kontrolle für Hauptprogramm und/oder Erweiterung"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
#, fuzzy
msgid ""
" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
@ -1104,7 +1106,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6920,57 +6923,6 @@ msgstr "Filter"
msgid "history of commands in buffer"
msgstr "Verlaufspeicher von Befehlen in einem Buffer"
msgid "hook (variables common to all hook types)"
msgstr "Hook (Variablen die für alle Hook-Typen geläufig sind)"
msgid "hook of type \"command\""
msgstr "Hook des Typs \"command\""
msgid "hook of type \"command_run\""
msgstr "Hook vom Typ \"command_run\""
msgid "hook of type \"timer\""
msgstr "Hook vom Typ \"timer\""
msgid "hook of type \"fd\""
msgstr "Hook vom Typ \"fd\""
msgid "hook of type \"process\""
msgstr "Hook vom Typ \"process\""
msgid "hook of type \"connect\""
msgstr "Hook vom Typ \"connect\""
msgid "hook of type \"print\""
msgstr "Hook vom Typ \"print\""
msgid "hook of type \"signal\""
msgstr "Hook vom Typ \"signal\""
msgid "hook of type \"hsignal\""
msgstr "Hook vom Typ \"\""
msgid "hook of type \"config\""
msgstr "Hook vom Typ \"config\""
msgid "hook of type \"completion\""
msgstr "Hook vom Typ \"completion\""
msgid "hook of type \"modifier\""
msgstr "Hook vom Typ \"modifier\""
msgid "hook of type \"info\""
msgstr "Hook vom Typ \"info\""
msgid "hook of type \"info_hashtable\""
msgstr "Hook vom Typ \"info_hashtable\""
msgid "hook of type \"infolist\""
msgstr "Hook vom Typ \"infolist\""
msgid "hook of type \"hdata\""
msgstr "Hook vom Typ \"hdata\""
msgid "structure with undo for input line"
msgstr "Struktur der Rücknahmen für die Befehlszeile"
@ -6992,6 +6944,10 @@ msgstr "Gruppen in Nickliste"
msgid "nick in nicklist"
msgstr "Nick in Nickliste"
#, fuzzy
msgid "plugin"
msgstr "Erweiterung"
msgid "window"
msgstr "Fenster"
@ -8110,6 +8066,57 @@ msgstr "Variablen"
msgid "Lists"
msgstr "Listen"
#~ msgid "hook (variables common to all hook types)"
#~ msgstr "Hook (Variablen die für alle Hook-Typen geläufig sind)"
#~ msgid "hook of type \"command\""
#~ msgstr "Hook des Typs \"command\""
#~ msgid "hook of type \"command_run\""
#~ msgstr "Hook vom Typ \"command_run\""
#~ msgid "hook of type \"timer\""
#~ msgstr "Hook vom Typ \"timer\""
#~ msgid "hook of type \"fd\""
#~ msgstr "Hook vom Typ \"fd\""
#~ msgid "hook of type \"process\""
#~ msgstr "Hook vom Typ \"process\""
#~ msgid "hook of type \"connect\""
#~ msgstr "Hook vom Typ \"connect\""
#~ msgid "hook of type \"print\""
#~ msgstr "Hook vom Typ \"print\""
#~ msgid "hook of type \"signal\""
#~ msgstr "Hook vom Typ \"signal\""
#~ msgid "hook of type \"hsignal\""
#~ msgstr "Hook vom Typ \"\""
#~ msgid "hook of type \"config\""
#~ msgstr "Hook vom Typ \"config\""
#~ msgid "hook of type \"completion\""
#~ msgstr "Hook vom Typ \"completion\""
#~ msgid "hook of type \"modifier\""
#~ msgstr "Hook vom Typ \"modifier\""
#~ msgid "hook of type \"info\""
#~ msgstr "Hook vom Typ \"info\""
#~ msgid "hook of type \"info_hashtable\""
#~ msgstr "Hook vom Typ \"info_hashtable\""
#~ msgid "hook of type \"infolist\""
#~ msgstr "Hook vom Typ \"infolist\""
#~ msgid "hook of type \"hdata\""
#~ msgstr "Hook vom Typ \"hdata\""
#~ msgid "completion"
#~ msgstr "Vervollständigung"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1077,8 +1077,8 @@ msgstr "controla los mensajes de depuración para el núcleo/plugins"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <nivel> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1093,7 +1093,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6750,58 +6751,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "historial de comandos"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "historial de comandos"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "funciones para la línea de comandos"
@ -6826,6 +6775,10 @@ msgstr "color para grupos en la lista de apodos"
msgid "nick in nicklist"
msgstr "apodos en la lista de notificación"
#, fuzzy
msgid "plugin"
msgstr "Plugin"
#, fuzzy
msgid "window"
msgstr "gestión de ventanas"
@ -7936,6 +7889,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historial de comandos"
#, fuzzy
#~ msgid "completion"
#~ msgstr "compilado en"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"PO-Revision-Date: 2011-06-22 15:28+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-06-26 18:05+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -1076,11 +1076,11 @@ msgid "control debug for core/plugins"
msgstr "contrôle du debug pour le coeur/les extensions"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <extension> <niveau> || dump [<extension>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <extension> <niveau> || dump [<extension>] || buffer|color|"
"infolists|memory|tags|term|windows || hdata [free]"
msgid ""
" list: list plugins with debug levels\n"
@ -1091,7 +1091,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -1107,7 +1108,8 @@ msgstr ""
" buffer: afficher le contenu du tampon en valeurs hexadécimales dans le "
"fichier log\n"
" color: afficher des infos sur les paires de couleur courantes\n"
" hdata: afficher des infos sur les hdata\n"
" hdata: afficher des infos sur les hdata (avec free: supprimer tous les "
"hdata en mémoire)\n"
"infolists: afficher des infos sur les infolists\n"
" memory: afficher des infos sur l'utilisation de la mémoire\n"
" tags: afficher les étiquettes pour les lignes\n"
@ -6780,59 +6782,8 @@ msgstr "filtre"
msgid "history of commands in buffer"
msgstr "historique des commandes dans le tampon"
msgid "hook (variables common to all hook types)"
msgstr "hook (variables communes à tous les types de hooks)"
msgid "hook of type \"command\""
msgstr "hook de type \"command\""
msgid "hook of type \"command_run\""
msgstr "hook de type \"command_run\""
msgid "hook of type \"timer\""
msgstr "hook de type \"timer\""
msgid "hook of type \"fd\""
msgstr "hook de type \"fd\""
msgid "hook of type \"process\""
msgstr "hook de type \"process\""
msgid "hook of type \"connect\""
msgstr "hook de type \"connect\""
msgid "hook of type \"print\""
msgstr "hook de type \"print\""
msgid "hook of type \"signal\""
msgstr "hook de type \"signal\""
msgid "hook of type \"hsignal\""
msgstr "hook de type \"hsignal\""
msgid "hook of type \"config\""
msgstr "hook de type \"config\""
msgid "hook of type \"completion\""
msgstr "hook de type \"completion\""
msgid "hook of type \"modifier\""
msgstr "hook de type \"modifier\""
msgid "hook of type \"info\""
msgstr "hook de type \"info\""
msgid "hook of type \"info_hashtable\""
msgstr "hook de type \"info_hashtable\""
msgid "hook of type \"infolist\""
msgstr "hook de type \"infolist\""
msgid "hook of type \"hdata\""
msgstr "hook de type \"hdata\""
msgid "structure with undo for input line"
msgstr "structure avec le \"unco\" pour la ligne de commande"
msgstr "structure avec le \"undo\" pour la ligne de commande"
msgid "a key (keyboard shortcut)"
msgstr "une touche (un raccourci clavier)"
@ -6852,6 +6803,9 @@ msgstr "groupe dans la liste de pseudos"
msgid "nick in nicklist"
msgstr "pseudo dans la liste de pseudos"
msgid "plugin"
msgstr "extension"
msgid "window"
msgstr "fenêtre"
@ -7963,21 +7917,3 @@ msgstr "Variables"
msgid "Lists"
msgstr "Listes"
#~ msgid "completion"
#~ msgstr "complétion"
#~ msgid "undo for input line"
#~ msgstr "undo pour la ligne de commande"
#~ msgid "key"
#~ msgstr "touche"
#~ msgid "lines"
#~ msgstr "lignes"
#~ msgid "line"
#~ msgstr "ligne"
#~ msgid "line data"
#~ msgstr "données de la ligne"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1028,8 +1028,8 @@ msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1042,7 +1042,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6226,58 +6227,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "%s belső parancsok:\n"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "%s belső parancsok:\n"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "szöveg beillesztése a parancssorba"
@ -6302,6 +6251,10 @@ msgstr "név színe"
msgid "nick in nicklist"
msgstr "%s nem található ilyen mellőzés\n"
#, fuzzy
msgid "plugin"
msgstr " (nem található bővítőmodul)\n"
#, fuzzy
msgid "window"
msgstr "ablakok kezelése"
@ -7384,6 +7337,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "%s belső parancsok:\n"
#, fuzzy
#~ msgid "completion"
#~ msgstr "lefordítva:"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1069,8 +1069,8 @@ msgstr "attiva debug per core/plugin"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <livello> || dump [<plugin>] || buffer|color|memory|"
"term|windows"
@ -1085,7 +1085,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6743,58 +6744,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "cronologia dei comandi"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "cronologia dei comandi"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "funzioni per la riga di comando"
@ -6819,6 +6768,10 @@ msgstr "colore del testo per i gruppi nella lista nick"
msgid "nick in nicklist"
msgstr "nick nella lista notifiche"
#, fuzzy
msgid "plugin"
msgstr "Plugin"
#, fuzzy
msgid "window"
msgstr "gestione finestre"
@ -7915,6 +7868,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "cronologia dei comandi"
#, fuzzy
#~ msgid "completion"
#~ msgstr "compilato il"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1079,8 +1079,8 @@ msgstr "kontrola debugu dla rdzenia/wtyczek"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <poziom> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1095,7 +1095,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6676,58 +6677,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "historia komend"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "historia komend"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "funkcje linii komend"
@ -6752,6 +6701,10 @@ msgstr "kolor grup na liście nicków"
msgid "nick in nicklist"
msgstr "nicki na liście powiadomień"
#, fuzzy
msgid "plugin"
msgstr "Wtyczka"
#, fuzzy
msgid "window"
msgstr "zarządza oknami"
@ -7840,6 +7793,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historia komend"
#, fuzzy
#~ msgid "completion"
#~ msgstr "skompilowano"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1091,8 +1091,8 @@ msgstr "cotrolar depuração para core/plugins"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr "[list | set plugin level | dump [plugin] | buffer | windows | term]"
# find a better translation to dump?
@ -1107,7 +1107,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6024,57 +6025,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr ""
msgid "hook (variables common to all hook types)"
msgstr ""
msgid "hook of type \"command\""
msgstr ""
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "funções para linha de comando"
@ -6098,6 +6048,10 @@ msgstr ""
msgid "nick in nicklist"
msgstr "apelidos na lista de apelidos no buffer atual"
#, fuzzy
msgid "plugin"
msgstr " (nenhum plugin)"
#, fuzzy
msgid "window"
msgstr "gerencia janelas"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1035,8 +1035,8 @@ msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1049,7 +1049,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -6241,58 +6242,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr "Внутренние команды %s:\n"
msgid "hook (variables common to all hook types)"
msgstr ""
#, fuzzy
msgid "hook of type \"command\""
msgstr "Внутренние команды %s:\n"
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
#, fuzzy
msgid "structure with undo for input line"
msgstr "вставить строку в поле ввода"
@ -6317,6 +6266,10 @@ msgstr "цвет ника"
msgid "nick in nicklist"
msgstr "%s игнорирования не найдены\n"
#, fuzzy
msgid "plugin"
msgstr " (нет pluginа)\n"
#, fuzzy
msgid "window"
msgstr "управление окнами"
@ -7393,6 +7346,10 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "Внутренние команды %s:\n"
#, fuzzy
#~ msgid "completion"
#~ msgstr "собран:"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-06-22 15:36+0200\n"
"POT-Creation-Date: 2011-06-26 18:05+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -891,8 +891,8 @@ msgid "control debug for core/plugins"
msgstr ""
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
msgid ""
@ -904,7 +904,8 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -5407,57 +5408,6 @@ msgstr ""
msgid "history of commands in buffer"
msgstr ""
msgid "hook (variables common to all hook types)"
msgstr ""
msgid "hook of type \"command\""
msgstr ""
msgid "hook of type \"command_run\""
msgstr ""
msgid "hook of type \"timer\""
msgstr ""
msgid "hook of type \"fd\""
msgstr ""
msgid "hook of type \"process\""
msgstr ""
msgid "hook of type \"connect\""
msgstr ""
msgid "hook of type \"print\""
msgstr ""
msgid "hook of type \"signal\""
msgstr ""
msgid "hook of type \"hsignal\""
msgstr ""
msgid "hook of type \"config\""
msgstr ""
msgid "hook of type \"completion\""
msgstr ""
msgid "hook of type \"modifier\""
msgstr ""
msgid "hook of type \"info\""
msgstr ""
msgid "hook of type \"info_hashtable\""
msgstr ""
msgid "hook of type \"infolist\""
msgstr ""
msgid "hook of type \"hdata\""
msgstr ""
msgid "structure with undo for input line"
msgstr ""
@ -5479,6 +5429,9 @@ msgstr ""
msgid "nick in nicklist"
msgstr ""
msgid "plugin"
msgstr ""
msgid "window"
msgstr ""

View File

@ -40,6 +40,7 @@
#include "wee-config-file.h"
#include "wee-debug.h"
#include "wee-hashtable.h"
#include "wee-hdata.h"
#include "wee-hook.h"
#include "wee-input.h"
#include "wee-list.h"
@ -1154,7 +1155,10 @@ COMMAND_CALLBACK(debug)
}
else if (string_strcasecmp (argv[1], "hdata") == 0)
{
debug_hdata ();
if ((argc > 2) && (string_strcasecmp (argv[2], "free") == 0))
hdata_free_all ();
else
debug_hdata ();
}
else if (string_strcasecmp (argv[1], "infolists") == 0)
{
@ -4846,8 +4850,8 @@ command_init ()
N_("list"
" || set <plugin> <level>"
" || dump [<plugin>]"
" || buffer|color|hdata|infolists|memory|tags|term"
"|windows"),
" || buffer|color|infolists|memory|tags|term|windows"
" || hdata [free]"),
N_(" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
" plugin: name of plugin (\"core\" for WeeChat core)\n"
@ -4857,7 +4861,8 @@ command_init ()
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove "
"all hdata in memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@ -4868,7 +4873,7 @@ command_init ()
" || dump %(plugins_names)|core"
" || buffer"
" || color"
" || hdata"
" || hdata free"
" || infolists"
" || memory"
" || tags"

View File

@ -53,10 +53,6 @@ char *config_option_type_string[CONFIG_NUM_OPTION_TYPES] =
char *config_boolean_true[] = { "on", "yes", "y", "true", "t", "1", NULL };
char *config_boolean_false[] = { "off", "no", "n", "false", "f", "0", NULL };
struct t_hdata *config_file_hdata_config_file = NULL;
struct t_hdata *config_file_hdata_config_section = NULL;
struct t_hdata *config_file_hdata_config_option = NULL;
void config_file_option_free_data (struct t_config_option *option);
@ -2561,27 +2557,23 @@ config_file_hdata_config_file_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (config_file_hdata_config_file)
return config_file_hdata_config_file;
hdata = hdata_new (hdata_name, "prev_config", "next_config");
hdata = hdata_new (NULL, hdata_name, "prev_config", "next_config");
if (hdata)
{
config_file_hdata_config_file = hdata;
HDATA_VAR(struct t_config_file, plugin, POINTER);
HDATA_VAR(struct t_config_file, name, STRING);
HDATA_VAR(struct t_config_file, filename, STRING);
HDATA_VAR(struct t_config_file, file, POINTER);
HDATA_VAR(struct t_config_file, callback_reload, POINTER);
HDATA_VAR(struct t_config_file, callback_reload_data, POINTER);
HDATA_VAR(struct t_config_file, sections, POINTER);
HDATA_VAR(struct t_config_file, last_section, POINTER);
HDATA_VAR(struct t_config_file, prev_config, POINTER);
HDATA_VAR(struct t_config_file, next_config, POINTER);
HDATA_VAR(struct t_config_file, plugin, POINTER, "plugin");
HDATA_VAR(struct t_config_file, name, STRING, NULL);
HDATA_VAR(struct t_config_file, filename, STRING, NULL);
HDATA_VAR(struct t_config_file, file, POINTER, NULL);
HDATA_VAR(struct t_config_file, callback_reload, POINTER, NULL);
HDATA_VAR(struct t_config_file, callback_reload_data, POINTER, NULL);
HDATA_VAR(struct t_config_file, sections, POINTER, "config_section");
HDATA_VAR(struct t_config_file, last_section, POINTER, "config_section");
HDATA_VAR(struct t_config_file, prev_config, POINTER, hdata_name);
HDATA_VAR(struct t_config_file, next_config, POINTER, hdata_name);
HDATA_LIST(config_files);
HDATA_LIST(last_config_file);
}
return config_file_hdata_config_file;
return hdata;
}
/*
@ -2596,33 +2588,29 @@ config_file_hdata_config_section_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (config_file_hdata_config_section)
return config_file_hdata_config_section;
hdata = hdata_new (hdata_name, "prev_section", "next_section");
hdata = hdata_new (NULL, hdata_name, "prev_section", "next_section");
if (hdata)
{
config_file_hdata_config_section = hdata;
HDATA_VAR(struct t_config_section, config_file, POINTER);
HDATA_VAR(struct t_config_section, name, STRING);
HDATA_VAR(struct t_config_section, user_can_add_options, INTEGER);
HDATA_VAR(struct t_config_section, user_can_delete_options, INTEGER);
HDATA_VAR(struct t_config_section, callback_read, POINTER);
HDATA_VAR(struct t_config_section, callback_read_data, POINTER);
HDATA_VAR(struct t_config_section, callback_write, POINTER);
HDATA_VAR(struct t_config_section, callback_write_data, POINTER);
HDATA_VAR(struct t_config_section, callback_write_default, POINTER);
HDATA_VAR(struct t_config_section, callback_write_default_data, POINTER);
HDATA_VAR(struct t_config_section, callback_create_option, POINTER);
HDATA_VAR(struct t_config_section, callback_create_option_data, POINTER);
HDATA_VAR(struct t_config_section, callback_delete_option, POINTER);
HDATA_VAR(struct t_config_section, callback_delete_option_data, POINTER);
HDATA_VAR(struct t_config_section, options, POINTER);
HDATA_VAR(struct t_config_section, last_option, POINTER);
HDATA_VAR(struct t_config_section, prev_section, POINTER);
HDATA_VAR(struct t_config_section, next_section, POINTER);
HDATA_VAR(struct t_config_section, config_file, POINTER, "config_file");
HDATA_VAR(struct t_config_section, name, STRING, NULL);
HDATA_VAR(struct t_config_section, user_can_add_options, INTEGER, NULL);
HDATA_VAR(struct t_config_section, user_can_delete_options, INTEGER, NULL);
HDATA_VAR(struct t_config_section, callback_read, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_read_data, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_write, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_write_data, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_write_default, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_write_default_data, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_create_option, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_create_option_data, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_delete_option, POINTER, NULL);
HDATA_VAR(struct t_config_section, callback_delete_option_data, POINTER, NULL);
HDATA_VAR(struct t_config_section, options, POINTER, "config_option");
HDATA_VAR(struct t_config_section, last_option, POINTER, "config_option");
HDATA_VAR(struct t_config_section, prev_section, POINTER, hdata_name);
HDATA_VAR(struct t_config_section, next_section, POINTER, hdata_name);
}
return config_file_hdata_config_section;
return hdata;
}
/*
@ -2637,35 +2625,31 @@ config_file_hdata_config_option_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (config_file_hdata_config_option)
return config_file_hdata_config_option;
hdata = hdata_new (hdata_name, "prev_option", "next_option");
hdata = hdata_new (NULL, hdata_name, "prev_option", "next_option");
if (hdata)
{
config_file_hdata_config_option = hdata;
HDATA_VAR(struct t_config_option, config_file, POINTER);
HDATA_VAR(struct t_config_option, section, POINTER);
HDATA_VAR(struct t_config_option, name, STRING);
HDATA_VAR(struct t_config_option, type, INTEGER);
HDATA_VAR(struct t_config_option, description, STRING);
HDATA_VAR(struct t_config_option, string_values, POINTER);
HDATA_VAR(struct t_config_option, min, INTEGER);
HDATA_VAR(struct t_config_option, max, INTEGER);
HDATA_VAR(struct t_config_option, default_value, POINTER);
HDATA_VAR(struct t_config_option, value, POINTER);
HDATA_VAR(struct t_config_option, null_value_allowed, INTEGER);
HDATA_VAR(struct t_config_option, callback_check_value, POINTER);
HDATA_VAR(struct t_config_option, callback_check_value_data, POINTER);
HDATA_VAR(struct t_config_option, callback_change, POINTER);
HDATA_VAR(struct t_config_option, callback_change_data, POINTER);
HDATA_VAR(struct t_config_option, callback_delete, POINTER);
HDATA_VAR(struct t_config_option, callback_delete_data, POINTER);
HDATA_VAR(struct t_config_option, loaded, INTEGER);
HDATA_VAR(struct t_config_option, prev_option, POINTER);
HDATA_VAR(struct t_config_option, next_option, POINTER);
HDATA_VAR(struct t_config_option, config_file, POINTER, "config_file");
HDATA_VAR(struct t_config_option, section, POINTER, "config_section");
HDATA_VAR(struct t_config_option, name, STRING, NULL);
HDATA_VAR(struct t_config_option, type, INTEGER, NULL);
HDATA_VAR(struct t_config_option, description, STRING, NULL);
HDATA_VAR(struct t_config_option, string_values, POINTER, NULL);
HDATA_VAR(struct t_config_option, min, INTEGER, NULL);
HDATA_VAR(struct t_config_option, max, INTEGER, NULL);
HDATA_VAR(struct t_config_option, default_value, POINTER, NULL);
HDATA_VAR(struct t_config_option, value, POINTER, NULL);
HDATA_VAR(struct t_config_option, null_value_allowed, INTEGER, NULL);
HDATA_VAR(struct t_config_option, callback_check_value, POINTER, NULL);
HDATA_VAR(struct t_config_option, callback_check_value_data, POINTER, NULL);
HDATA_VAR(struct t_config_option, callback_change, POINTER, NULL);
HDATA_VAR(struct t_config_option, callback_change_data, POINTER, NULL);
HDATA_VAR(struct t_config_option, callback_delete, POINTER, NULL);
HDATA_VAR(struct t_config_option, callback_delete_data, POINTER, NULL);
HDATA_VAR(struct t_config_option, loaded, INTEGER, NULL);
HDATA_VAR(struct t_config_option, prev_option, POINTER, hdata_name);
HDATA_VAR(struct t_config_option, next_option, POINTER, hdata_name);
}
return config_file_hdata_config_option;
return hdata;
}
/*

View File

@ -335,11 +335,62 @@ debug_hdata_hash_list_map_cb (void *data,
(void) hashtable;
gui_chat_printf (NULL,
" list: %s -> 0x%lx",
" list: %s -> 0x%lx",
(char *)key,
*((void **)value));
}
/*
* debug_hdata_map_cb: function called for each hdata in memory
*/
void
debug_hdata_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hdata *ptr_hdata;
struct t_weelist *list;
struct t_weelist_item *ptr_item;
void *ptr_value;
/* make C compiler happy */
(void) data;
(void) hashtable;
ptr_hdata = (struct t_hdata *)value;
gui_chat_printf (NULL,
" hdata 0x%lx: \"%s\", %d vars, %d lists:",
ptr_hdata, (const char *)key,
hashtable_get_integer (ptr_hdata->hash_var,
"items_count"),
hashtable_get_integer (ptr_hdata->hash_list,
"items_count"));
/* display lists */
hashtable_map (ptr_hdata->hash_list,
&debug_hdata_hash_list_map_cb, NULL);
/* display vars */
list = weelist_new ();
hashtable_map (ptr_hdata->hash_var,
&debug_hdata_hash_var_map_cb, list);
for (ptr_item = list->items; ptr_item;
ptr_item = ptr_item->next_item)
{
ptr_value = hashtable_get (ptr_hdata->hash_var, ptr_item->user_data);
if (ptr_value)
{
gui_chat_printf (NULL,
" %04d -> %s (%s)",
(*((int *)ptr_value)) & 0xFFFF,
(char *)ptr_item->user_data,
hdata_type_string[(*((int *)ptr_value)) >> 16]);
}
}
weelist_free (list);
}
/*
* debug_hdata: display list of hdata in memory
*/
@ -347,58 +398,15 @@ debug_hdata_hash_list_map_cb (void *data,
void
debug_hdata ()
{
struct t_hdata *ptr_hdata;
int i, count;
struct t_weelist *list;
struct t_weelist_item *ptr_item;
void *value;
int count;
count = 0;
for (ptr_hdata = weechat_hdata; ptr_hdata;
ptr_hdata = ptr_hdata->next_hdata)
{
count++;
}
count = hashtable_get_integer (weechat_hdata, "items_count");
gui_chat_printf (NULL, "");
gui_chat_printf (NULL, "%d hdata in memory", count);
if (count > 0)
{
i = 0;
for (ptr_hdata = weechat_hdata; ptr_hdata;
ptr_hdata = ptr_hdata->next_hdata)
{
gui_chat_printf (NULL,
"%4d: hdata 0x%lx: \"%s\", %d vars, %d lists:",
i + 1, ptr_hdata,
ptr_hdata->name,
hashtable_get_integer (ptr_hdata->hash_var,
"items_count"),
hashtable_get_integer (ptr_hdata->hash_list,
"items_count"));
list = weelist_new ();
hashtable_map (ptr_hdata->hash_var,
&debug_hdata_hash_var_map_cb, list);
for (ptr_item = list->items; ptr_item;
ptr_item = ptr_item->next_item)
{
value = hashtable_get (ptr_hdata->hash_var, ptr_item->user_data);
if (value)
{
gui_chat_printf (NULL,
" %04d -> %s (%s)",
(*((int *)value)) & 0xFFFF,
(char *)ptr_item->user_data,
hdata_type_string[(*((int *)value)) >> 16]);
}
}
weelist_free (list);
hashtable_map (ptr_hdata->hash_list,
&debug_hdata_hash_list_map_cb, NULL);
i++;
}
}
hashtable_map (weechat_hdata, &debug_hdata_map_cb, NULL);
}
/*

View File

@ -36,8 +36,7 @@
#include "../plugins/plugin.h"
struct t_hdata *weechat_hdata = NULL;
struct t_hdata *last_weechat_hdata = NULL;
struct t_hashtable *weechat_hdata = NULL;
char *hdata_type_string[6] =
{ "other", "integer", "long", "string", "pointer", "time" };
@ -48,7 +47,8 @@ char *hdata_type_string[6] =
*/
struct t_hdata *
hdata_new (const char *hdata_name, const char *var_prev, const char *var_next)
hdata_new (struct t_weechat_plugin *plugin, const char *hdata_name,
const char *var_prev, const char *var_next)
{
struct t_hdata *new_hdata;
@ -58,7 +58,7 @@ hdata_new (const char *hdata_name, const char *var_prev, const char *var_next)
new_hdata = malloc (sizeof (*new_hdata));
if (new_hdata)
{
new_hdata->name = strdup (hdata_name);
new_hdata->plugin = plugin;
new_hdata->hash_var = hashtable_new (8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_INTEGER,
@ -66,19 +66,17 @@ hdata_new (const char *hdata_name, const char *var_prev, const char *var_next)
NULL);
new_hdata->var_prev = (var_prev) ? strdup (var_prev) : NULL;
new_hdata->var_next = (var_next) ? strdup (var_next) : NULL;
new_hdata->hash_var_hdata = hashtable_new (8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL,
NULL);
new_hdata->hash_list = hashtable_new (8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_POINTER,
NULL,
NULL);
new_hdata->prev_hdata = last_weechat_hdata;
new_hdata->next_hdata = NULL;
if (weechat_hdata)
last_weechat_hdata->next_hdata = new_hdata;
else
weechat_hdata = new_hdata;
last_weechat_hdata = new_hdata;
hashtable_set (weechat_hdata, hdata_name, new_hdata);
}
return new_hdata;
@ -89,7 +87,8 @@ hdata_new (const char *hdata_name, const char *var_prev, const char *var_next)
*/
void
hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type)
hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type,
const char *hdata_name)
{
int value;
@ -97,6 +96,8 @@ hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type)
{
value = (type << 16) | (offset & 0xFFFF);
hashtable_set (hdata->hash_var, name, &value);
if (hdata_name && hdata_name[0])
hashtable_set (hdata->hash_var_hdata, name, hdata_name);
}
}
@ -168,6 +169,20 @@ hdata_get_var_type_string (struct t_hdata *hdata, const char *name)
return NULL;
}
/*
* hdata_get_var_hdata: get hdata name for a variable (NULL if variable has
* no hdata)
*/
const char *
hdata_get_var_hdata (struct t_hdata *hdata, const char *name)
{
if (hdata && name)
return (const char *)hashtable_get (hdata->hash_var_hdata, name);
return NULL;
}
/*
* hdata_get_var: get pointer to content of variable using hdata var name
*/
@ -360,6 +375,12 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
return hdata->var_prev;
else if (string_strcasecmp (property, "var_next") == 0)
return hdata->var_next;
else if (string_strcasecmp (property, "var_hdata_keys") == 0)
return hashtable_get_string (hdata->hash_var_hdata, "keys");
else if (string_strcasecmp (property, "var_hdata_values") == 0)
return hashtable_get_string (hdata->hash_var_hdata, "values");
else if (string_strcasecmp (property, "var_hdata_keys_values") == 0)
return hashtable_get_string (hdata->hash_var_hdata, "keys_values");
else if (string_strcasecmp (property, "list_keys") == 0)
return hashtable_get_string (hdata->hash_list, "keys");
else if (string_strcasecmp (property, "list_values") == 0)
@ -371,6 +392,117 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
return NULL;
}
/*
* hdata_free: free a hdata
*/
void
hdata_free (struct t_hdata *hdata)
{
if (hdata->hash_var)
hashtable_free (hdata->hash_var);
if (hdata->var_prev)
free (hdata->var_prev);
if (hdata->var_next)
free (hdata->var_next);
if (hdata->hash_var_hdata)
hashtable_free (hdata->hash_var_hdata);
if (hdata->hash_list)
hashtable_free (hdata->hash_list);
free (hdata);
}
/*
* hdata_free_all_plugin_map_cb: function called for each hdata in memory
*/
void
hdata_free_all_plugin_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hdata *ptr_hdata;
ptr_hdata = (struct t_hdata *)value;
if (ptr_hdata->plugin == (struct t_weechat_plugin *)data)
{
hdata_free (ptr_hdata);
hashtable_remove (hashtable, key);
}
}
/*
* hdata_free_all_plugin: free all hdata created by a plugin
*/
void
hdata_free_all_plugin (struct t_weechat_plugin *plugin)
{
hashtable_map (weechat_hdata, &hdata_free_all_plugin_map_cb, plugin);
}
/*
* hdata_free_all_map_cb: function called for each hdata in memory
*/
void
hdata_free_all_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hdata *ptr_hdata;
/* make C compiler happy */
(void) data;
ptr_hdata = (struct t_hdata *)value;
hdata_free (ptr_hdata);
hashtable_remove (hashtable, key);
}
/*
* hdata_free_all: free all hdata
*/
void
hdata_free_all ()
{
hashtable_map (weechat_hdata, &hdata_free_all_map_cb, NULL);
}
/*
* hdata_print_log_map_cb: function called for each hdata in memory
*/
void
hdata_print_log_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hdata *ptr_hdata;
/* make C compiler happy */
(void) data;
(void) hashtable;
ptr_hdata = (struct t_hdata *)value;
log_printf ("");
log_printf ("[hdata (addr:0x%lx, name:'%s')]", ptr_hdata, (const char *)key);
log_printf (" plugin . . . . . . . . : 0x%lx", ptr_hdata->plugin);
log_printf (" hash_var . . . . . . . : 0x%lx (hashtable: '%s')",
ptr_hdata->hash_var,
hashtable_get_string (ptr_hdata->hash_var, "keys_values"));
log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev);
log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next);
log_printf (" hash_var_hdata . . . . : 0x%lx (hashtable: '%s')",
ptr_hdata->hash_var_hdata,
hashtable_get_string (ptr_hdata->hash_var_hdata, "keys_values"));
log_printf (" hash_list. . . . . . . : 0x%lx (hashtable: '%s')",
ptr_hdata->hash_list,
hashtable_get_string (ptr_hdata->hash_list, "keys_values"));
}
/*
* hdata_print_log: print hdata in log (usually for crash dump)
*/
@ -378,23 +510,30 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
void
hdata_print_log ()
{
struct t_hdata *ptr_hdata;
for (ptr_hdata = weechat_hdata; ptr_hdata;
ptr_hdata = ptr_hdata->next_hdata)
{
log_printf ("");
log_printf ("[hdata (addr:0x%lx)]", ptr_hdata);
log_printf (" name . . . . . . . . . : '%s'", ptr_hdata->name);
log_printf (" hash_var . . . . . . . : 0x%lx (hashtable: '%s')",
ptr_hdata->hash_var,
hashtable_get_string (ptr_hdata->hash_var, "keys_values"));
log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev);
log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next);
log_printf (" hash_list. . . . . . . : 0x%lx (hashtable: '%s')",
ptr_hdata->hash_list,
hashtable_get_string (ptr_hdata->hash_list, "keys_values"));
log_printf (" prev_hdata . . . . . . : 0x%lx", ptr_hdata->prev_hdata);
log_printf (" next_hdata . . . . . . : 0x%lx", ptr_hdata->next_hdata);
}
hashtable_map (weechat_hdata, &hdata_print_log_map_cb, NULL);
}
/*
* hdata_init: create hashtable with hdata
*/
void
hdata_init ()
{
weechat_hdata = hashtable_new (16,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_POINTER,
NULL,
NULL);
}
/*
* hdata_end: free all hdata and hashtable with hdata
*/
void
hdata_end ()
{
hdata_free_all ();
hashtable_free (weechat_hdata);
}

View File

@ -20,40 +20,42 @@
#ifndef __WEECHAT_HDATA_H
#define __WEECHAT_HDATA_H 1
#define HDATA_VAR(__struct, __name, __type) \
#define HDATA_VAR(__struct, __name, __type, __hdata_name) \
hdata_new_var (hdata, #__name, offsetof (__struct, __name), \
WEECHAT_HDATA_##__type);
WEECHAT_HDATA_##__type, __hdata_name)
#define HDATA_LIST(__name) hdata_new_list (hdata, #__name, &(__name));
struct t_hdata
{
char *name; /* name of hdata */
struct t_weechat_plugin *plugin; /* plugin which created this hdata */
/* (NULL if created by WeeChat) */
struct t_hashtable *hash_var; /* hashtable with offset of vars */
char *var_prev; /* name of var with pointer to */
/* previous element in list */
char *var_next; /* name of var with pointer to */
/* next element in list */
struct t_hashtable *hash_var_hdata; /* hashtable with hdata names */
struct t_hashtable *hash_list; /* hashtable with pointers on lists */
/* (used to search objects) */
struct t_hdata *prev_hdata; /* link to previous hdata */
struct t_hdata *next_hdata; /* link to next hdata */
};
extern struct t_hdata *weechat_hdata;
extern struct t_hdata *last_weechat_hdata;
extern struct t_hashtable *weechat_hdata;
extern char *hdata_type_string[];
extern struct t_hdata *hdata_new (const char *hdata_name, const char *var_prev,
extern struct t_hdata *hdata_new (struct t_weechat_plugin *plugin,
const char *hdata_name, const char *var_prev,
const char *var_next);
extern void hdata_new_var (struct t_hdata *hdata, const char *name, int offset,
int type);
int type, const char *hdata_name);
extern void hdata_new_list (struct t_hdata *hdata, const char *name,
void *pointer);
extern int hdata_get_var_offset (struct t_hdata *hdata, const char *name);
extern int hdata_get_var_type (struct t_hdata *hdata, const char *name);
extern const char *hdata_get_var_type_string (struct t_hdata *hdata,
const char *name);
extern const char *hdata_get_var_hdata (struct t_hdata *hdata,
const char *name);
extern void *hdata_get_var (struct t_hdata *hdata, void *pointer,
const char *name);
extern void *hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer,
@ -72,6 +74,10 @@ extern time_t hdata_time (struct t_hdata *hdata, void *pointer,
const char *name);
extern const char *hdata_get_string (struct t_hdata *hdata,
const char *property);
extern void hdata_free_all_plugin (struct t_weechat_plugin *plugin);
extern void hdata_free_all ();
extern void hdata_print_log ();
extern void hdata_init ();
extern void hdata_end ();
#endif /* __WEECHAT_HDATA_H */

View File

@ -65,24 +65,6 @@ int hook_exec_recursion = 0; /* 1 when a hook is executed */
time_t hook_last_system_time = 0; /* used to detect system clock skew */
int real_delete_pending = 0; /* 1 if some hooks must be deleted */
struct t_hdata *hook_hdata_hook = NULL;
struct t_hdata *hook_hdata_hook_command = NULL;
struct t_hdata *hook_hdata_hook_command_run = NULL;
struct t_hdata *hook_hdata_hook_timer = NULL;
struct t_hdata *hook_hdata_hook_fd = NULL;
struct t_hdata *hook_hdata_hook_process = NULL;
struct t_hdata *hook_hdata_hook_connect = NULL;
struct t_hdata *hook_hdata_hook_print = NULL;
struct t_hdata *hook_hdata_hook_signal = NULL;
struct t_hdata *hook_hdata_hook_hsignal = NULL;
struct t_hdata *hook_hdata_hook_config = NULL;
struct t_hdata *hook_hdata_hook_completion = NULL;
struct t_hdata *hook_hdata_hook_modifier = NULL;
struct t_hdata *hook_hdata_hook_info = NULL;
struct t_hdata *hook_hdata_hook_info_hashtable = NULL;
struct t_hdata *hook_hdata_hook_infolist = NULL;
struct t_hdata *hook_hdata_hook_hdata = NULL;
void hook_process_run (struct t_hook *hook_process);
@ -2724,6 +2706,13 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
if (!hdata_name || !hdata_name[0])
return NULL;
if (weechat_hdata)
{
value = hashtable_get (weechat_hdata, hdata_name);
if (value)
return value;
}
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_HDATA];
@ -2733,8 +2722,7 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
if (!ptr_hook->deleted
&& !ptr_hook->running
&& (string_strcasecmp (HOOK_HDATA(ptr_hook, hdata_name),
hdata_name) == 0))
&& (strcmp (HOOK_HDATA(ptr_hook, hdata_name), hdata_name) == 0))
{
ptr_hook->running = 1;
value = (HOOK_HDATA(ptr_hook, callback))
@ -3014,530 +3002,6 @@ unhook_all ()
}
}
/*
* hook_hdata_hook_cb: return hdata for hook (variables common to all hook
* types)
*/
struct t_hdata *
hook_hdata_hook_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook)
return hook_hdata_hook;
hdata = hdata_new (hdata_name, "prev_hook", "next_hook");
if (hdata)
{
hook_hdata_hook = hdata;
HDATA_VAR(struct t_hook, plugin, POINTER);
HDATA_VAR(struct t_hook, type, INTEGER);
HDATA_VAR(struct t_hook, deleted, INTEGER);
HDATA_VAR(struct t_hook, running, INTEGER);
HDATA_VAR(struct t_hook, priority, INTEGER);
HDATA_VAR(struct t_hook, callback_data, POINTER);
HDATA_VAR(struct t_hook, hook_data, POINTER);
HDATA_VAR(struct t_hook, prev_hook, POINTER);
HDATA_VAR(struct t_hook, next_hook, POINTER);
}
return hook_hdata_hook;
}
/*
* hook_hdata_hook_command_cb: return hdata for hook of type "command"
*/
struct t_hdata *
hook_hdata_hook_command_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_command)
return hook_hdata_hook_command;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_command = hdata;
HDATA_VAR(struct t_hook_command, callback, POINTER);
HDATA_VAR(struct t_hook_command, command, STRING);
HDATA_VAR(struct t_hook_command, description, STRING);
HDATA_VAR(struct t_hook_command, args, STRING);
HDATA_VAR(struct t_hook_command, args_description, STRING);
HDATA_VAR(struct t_hook_command, completion, STRING);
HDATA_VAR(struct t_hook_command, cplt_num_templates, INTEGER);
HDATA_VAR(struct t_hook_command, cplt_templates, POINTER);
HDATA_VAR(struct t_hook_command, cplt_templates_static, POINTER);
HDATA_VAR(struct t_hook_command, cplt_template_num_args, POINTER);
HDATA_VAR(struct t_hook_command, cplt_template_args, POINTER);
HDATA_VAR(struct t_hook_command, cplt_template_num_args_concat, INTEGER);
HDATA_VAR(struct t_hook_command, cplt_template_args_concat, POINTER);
hdata_new_list(hdata, "weechat_hooks_command", &weechat_hooks[HOOK_TYPE_COMMAND]);
hdata_new_list(hdata, "last_weechat_hook_command", &last_weechat_hook[HOOK_TYPE_COMMAND]);
}
return hook_hdata_hook_command;
}
/*
* hook_hdata_hook_command_run_cb: return hdata for hook of type "command_run"
*/
struct t_hdata *
hook_hdata_hook_command_run_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_command_run)
return hook_hdata_hook_command_run;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_command_run = hdata;
HDATA_VAR(struct t_hook_command_run, callback, POINTER);
HDATA_VAR(struct t_hook_command_run, command, STRING);
hdata_new_list(hdata, "weechat_hooks_command_run", &weechat_hooks[HOOK_TYPE_COMMAND_RUN]);
hdata_new_list(hdata, "last_weechat_hook_command_run", &last_weechat_hook[HOOK_TYPE_COMMAND_RUN]);
}
return hook_hdata_hook_command_run;
}
/*
* hook_hdata_hook_timer_cb: return hdata for hook of type "timer"
*/
struct t_hdata *
hook_hdata_hook_timer_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_timer)
return hook_hdata_hook_timer;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_timer = hdata;
HDATA_VAR(struct t_hook_timer, callback, POINTER);
HDATA_VAR(struct t_hook_timer, interval, LONG);
HDATA_VAR(struct t_hook_timer, align_second, INTEGER);
HDATA_VAR(struct t_hook_timer, remaining_calls, INTEGER);
HDATA_VAR(struct t_hook_timer, last_exec, OTHER);
HDATA_VAR(struct t_hook_timer, next_exec, OTHER);
hdata_new_list(hdata, "weechat_hooks_timer", &weechat_hooks[HOOK_TYPE_TIMER]);
hdata_new_list(hdata, "last_weechat_hook_timer", &last_weechat_hook[HOOK_TYPE_TIMER]);
}
return hook_hdata_hook_timer;
}
/*
* hook_hdata_hook_fd_cb: return hdata for hook of type "fd"
*/
struct t_hdata *
hook_hdata_hook_fd_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_fd)
return hook_hdata_hook_fd;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_fd = hdata;
HDATA_VAR(struct t_hook_fd, callback, POINTER);
HDATA_VAR(struct t_hook_fd, fd, INTEGER);
HDATA_VAR(struct t_hook_fd, flags, INTEGER);
HDATA_VAR(struct t_hook_fd, error, INTEGER);
hdata_new_list(hdata, "weechat_hooks_fd", &weechat_hooks[HOOK_TYPE_FD]);
hdata_new_list(hdata, "last_weechat_hook_fd", &last_weechat_hook[HOOK_TYPE_FD]);
}
return hook_hdata_hook_fd;
}
/*
* hook_hdata_hook_process_cb: return hdata for hook of type "process"
*/
struct t_hdata *
hook_hdata_hook_process_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_process)
return hook_hdata_hook_process;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_process = hdata;
HDATA_VAR(struct t_hook_process, callback, POINTER);
HDATA_VAR(struct t_hook_process, command, STRING);
HDATA_VAR(struct t_hook_process, timeout, LONG);
HDATA_VAR(struct t_hook_process, child_read, POINTER);
HDATA_VAR(struct t_hook_process, child_write, POINTER);
HDATA_VAR(struct t_hook_process, child_pid, OTHER);
HDATA_VAR(struct t_hook_process, hook_fd, POINTER);
HDATA_VAR(struct t_hook_process, hook_timer, POINTER);
HDATA_VAR(struct t_hook_process, buffer, POINTER);
HDATA_VAR(struct t_hook_process, buffer_size, POINTER);
hdata_new_list(hdata, "weechat_hooks_process", &weechat_hooks[HOOK_TYPE_PROCESS]);
hdata_new_list(hdata, "last_weechat_hook_process", &last_weechat_hook[HOOK_TYPE_PROCESS]);
}
return hook_hdata_hook_process;
}
/*
* hook_hdata_hook_connect_cb: return hdata for hook of type "connect"
*/
struct t_hdata *
hook_hdata_hook_connect_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_connect)
return hook_hdata_hook_connect;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_connect = hdata;
HDATA_VAR(struct t_hook_connect, callback, POINTER);
HDATA_VAR(struct t_hook_connect, proxy, STRING);
HDATA_VAR(struct t_hook_connect, address, STRING);
HDATA_VAR(struct t_hook_connect, port, INTEGER);
HDATA_VAR(struct t_hook_connect, sock, INTEGER);
HDATA_VAR(struct t_hook_connect, ipv6, INTEGER);
#ifdef HAVE_GNUTLS
HDATA_VAR(struct t_hook_connect, gnutls_sess, POINTER);
HDATA_VAR(struct t_hook_connect, gnutls_cb, POINTER);
HDATA_VAR(struct t_hook_connect, gnutls_dhkey_size, INTEGER);
HDATA_VAR(struct t_hook_connect, gnutls_priorities, STRING);
#endif
HDATA_VAR(struct t_hook_connect, local_hostname, STRING);
HDATA_VAR(struct t_hook_connect, child_read, INTEGER);
HDATA_VAR(struct t_hook_connect, child_write, INTEGER);
HDATA_VAR(struct t_hook_connect, child_pid, OTHER);
HDATA_VAR(struct t_hook_connect, hook_fd, POINTER);
HDATA_VAR(struct t_hook_connect, handshake_hook_fd, POINTER);
HDATA_VAR(struct t_hook_connect, handshake_hook_timer, POINTER);
HDATA_VAR(struct t_hook_connect, handshake_fd_flags, INTEGER);
HDATA_VAR(struct t_hook_connect, handshake_ip_address, STRING);
hdata_new_list(hdata, "weechat_hooks_connect", &weechat_hooks[HOOK_TYPE_CONNECT]);
hdata_new_list(hdata, "last_weechat_hook_connect", &last_weechat_hook[HOOK_TYPE_CONNECT]);
}
return hook_hdata_hook_connect;
}
/*
* hook_hdata_hook_print_cb: return hdata for hook of type "print"
*/
struct t_hdata *
hook_hdata_hook_print_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_print)
return hook_hdata_hook_print;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_print = hdata;
HDATA_VAR(struct t_hook_print, callback, POINTER);
HDATA_VAR(struct t_hook_print, buffer, POINTER);
HDATA_VAR(struct t_hook_print, tags_count, INTEGER);
HDATA_VAR(struct t_hook_print, tags_array, POINTER);
HDATA_VAR(struct t_hook_print, message, STRING);
HDATA_VAR(struct t_hook_print, strip_colors, INTEGER);
hdata_new_list(hdata, "weechat_hooks_print", &weechat_hooks[HOOK_TYPE_PRINT]);
hdata_new_list(hdata, "last_weechat_hook_print", &last_weechat_hook[HOOK_TYPE_PRINT]);
}
return hook_hdata_hook_print;
}
/*
* hook_hdata_hook_signal_cb: return hdata for hook of type "signal"
*/
struct t_hdata *
hook_hdata_hook_signal_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_signal)
return hook_hdata_hook_signal;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_signal = hdata;
HDATA_VAR(struct t_hook_signal, callback, POINTER);
HDATA_VAR(struct t_hook_signal, signal, STRING);
hdata_new_list(hdata, "weechat_hooks_signal", &weechat_hooks[HOOK_TYPE_SIGNAL]);
hdata_new_list(hdata, "last_weechat_hook_signal", &last_weechat_hook[HOOK_TYPE_SIGNAL]);
}
return hook_hdata_hook_signal;
}
/*
* hook_hdata_hook_hsignal_cb: return hdata for hook of type "hsignal"
*/
struct t_hdata *
hook_hdata_hook_hsignal_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_hsignal)
return hook_hdata_hook_hsignal;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_hsignal = hdata;
HDATA_VAR(struct t_hook_hsignal, callback, POINTER);
HDATA_VAR(struct t_hook_hsignal, signal, STRING);
hdata_new_list(hdata, "weechat_hooks_hsignal", &weechat_hooks[HOOK_TYPE_HSIGNAL]);
hdata_new_list(hdata, "last_weechat_hook_hsignal", &last_weechat_hook[HOOK_TYPE_HSIGNAL]);
}
return hook_hdata_hook_hsignal;
}
/*
* hook_hdata_hook_config_cb: return hdata for hook of type "config"
*/
struct t_hdata *
hook_hdata_hook_config_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_config)
return hook_hdata_hook_config;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_config = hdata;
HDATA_VAR(struct t_hook_config, callback, POINTER);
HDATA_VAR(struct t_hook_config, option, STRING);
hdata_new_list(hdata, "weechat_hooks_config", &weechat_hooks[HOOK_TYPE_CONFIG]);
hdata_new_list(hdata, "last_weechat_hook_config", &last_weechat_hook[HOOK_TYPE_CONFIG]);
}
return hook_hdata_hook_config;
}
/*
* hook_hdata_hook_completion_cb: return hdata for hook of type "completion"
*/
struct t_hdata *
hook_hdata_hook_completion_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_completion)
return hook_hdata_hook_completion;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_completion = hdata;
HDATA_VAR(struct t_hook_completion, callback, POINTER);
HDATA_VAR(struct t_hook_completion, completion_item, STRING);
HDATA_VAR(struct t_hook_completion, description, STRING);
hdata_new_list(hdata, "weechat_hooks_completion", &weechat_hooks[HOOK_TYPE_COMPLETION]);
hdata_new_list(hdata, "last_weechat_hook_completion", &last_weechat_hook[HOOK_TYPE_COMPLETION]);
}
return hook_hdata_hook_completion;
}
/*
* hook_hdata_hook_modifier_cb: return hdata for hook of type "modifier"
*/
struct t_hdata *
hook_hdata_hook_modifier_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_modifier)
return hook_hdata_hook_modifier;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_modifier = hdata;
HDATA_VAR(struct t_hook_modifier, callback, POINTER);
HDATA_VAR(struct t_hook_modifier, modifier, STRING);
hdata_new_list(hdata, "weechat_hooks_modifier", &weechat_hooks[HOOK_TYPE_MODIFIER]);
hdata_new_list(hdata, "last_weechat_hook_modifier", &last_weechat_hook[HOOK_TYPE_MODIFIER]);
}
return hook_hdata_hook_modifier;
}
/*
* hook_hdata_hook_info_cb: return hdata for hook of type "info"
*/
struct t_hdata *
hook_hdata_hook_info_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_info)
return hook_hdata_hook_info;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_info = hdata;
HDATA_VAR(struct t_hook_info, callback, POINTER);
HDATA_VAR(struct t_hook_info, info_name, STRING);
HDATA_VAR(struct t_hook_info, description, STRING);
HDATA_VAR(struct t_hook_info, args_description, STRING);
hdata_new_list(hdata, "weechat_hooks_info", &weechat_hooks[HOOK_TYPE_INFO]);
hdata_new_list(hdata, "last_weechat_hook_info", &last_weechat_hook[HOOK_TYPE_INFO]);
}
return hook_hdata_hook_info;
}
/*
* hook_hdata_hook_info_hashtable_cb: return hdata for hook of type
* "info_hashtable"
*/
struct t_hdata *
hook_hdata_hook_info_hashtable_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_info_hashtable)
return hook_hdata_hook_info_hashtable;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_info_hashtable = hdata;
HDATA_VAR(struct t_hook_info_hashtable, callback, POINTER);
HDATA_VAR(struct t_hook_info_hashtable, info_name, STRING);
HDATA_VAR(struct t_hook_info_hashtable, description, STRING);
HDATA_VAR(struct t_hook_info_hashtable, args_description, STRING);
HDATA_VAR(struct t_hook_info_hashtable, output_description, STRING);
hdata_new_list(hdata, "weechat_hooks_info_hashtable", &weechat_hooks[HOOK_TYPE_INFO_HASHTABLE]);
hdata_new_list(hdata, "last_weechat_hook_info_hashtable", &last_weechat_hook[HOOK_TYPE_INFO_HASHTABLE]);
}
return hook_hdata_hook_info_hashtable;
}
/*
* hook_hdata_hook_infolist_cb: return hdata for hook of type "infolist"
*/
struct t_hdata *
hook_hdata_hook_infolist_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_infolist)
return hook_hdata_hook_infolist;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_infolist = hdata;
HDATA_VAR(struct t_hook_infolist, callback, POINTER);
HDATA_VAR(struct t_hook_infolist, infolist_name, STRING);
HDATA_VAR(struct t_hook_infolist, description, STRING);
HDATA_VAR(struct t_hook_infolist, pointer_description, STRING);
HDATA_VAR(struct t_hook_infolist, args_description, STRING);
hdata_new_list(hdata, "weechat_hooks_infolist", &weechat_hooks[HOOK_TYPE_INFOLIST]);
hdata_new_list(hdata, "last_weechat_hook_infolist", &last_weechat_hook[HOOK_TYPE_INFOLIST]);
}
return hook_hdata_hook_infolist;
}
/*
* hook_hdata_hook_hdata_cb: return hdata for hook of type "hdata"
*/
struct t_hdata *
hook_hdata_hook_hdata_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
if (hook_hdata_hook_hdata)
return hook_hdata_hook_hdata;
hdata = hdata_new (hdata_name, NULL, NULL);
if (hdata)
{
hook_hdata_hook_hdata = hdata;
HDATA_VAR(struct t_hook_hdata, callback, POINTER);
HDATA_VAR(struct t_hook_hdata, hdata_name, STRING);
HDATA_VAR(struct t_hook_hdata, description, STRING);
hdata_new_list(hdata, "weechat_hooks_hdata", &weechat_hooks[HOOK_TYPE_HDATA]);
hdata_new_list(hdata, "last_weechat_hook_hdata", &last_weechat_hook[HOOK_TYPE_HDATA]);
}
return hook_hdata_hook_hdata;
}
/*
* hook_add_to_infolist_type: add hooks of a type in an infolist
* return 1 if ok, 0 if error

View File

@ -43,13 +43,14 @@ struct t_infolist *last_weechat_infolist = NULL;
*/
struct t_infolist *
infolist_new ()
infolist_new (struct t_weechat_plugin *plugin)
{
struct t_infolist *new_infolist;
new_infolist = malloc (sizeof (*new_infolist));
if (new_infolist)
{
new_infolist->plugin = plugin;
new_infolist->items = NULL;
new_infolist->last_item = NULL;
new_infolist->ptr_item = NULL;
@ -644,6 +645,25 @@ infolist_free (struct t_infolist *infolist)
weechat_infolists = new_weechat_infolists;
}
/*
* infolist_free_all_plugin: free all infolists created by a plugin
*/
void
infolist_free_all_plugin (struct t_weechat_plugin *plugin)
{
struct t_infolist *ptr_infolist, *next_infolist;
ptr_infolist = weechat_infolists;
while (ptr_infolist)
{
next_infolist = ptr_infolist->next_infolist;
if (ptr_infolist->plugin == plugin)
infolist_free (ptr_infolist);
ptr_infolist = next_infolist;
}
}
/*
* infolist_print_log: print infolists infos in log (usually for crash dump)
*/
@ -660,6 +680,7 @@ infolist_print_log ()
{
log_printf ("");
log_printf ("[infolist (addr:0x%lx)]", ptr_infolist);
log_printf (" plugin . . . . . . . . : 0x%lx", ptr_infolist->plugin);
log_printf (" items. . . . . . . . . : 0x%lx", ptr_infolist->items);
log_printf (" last_item. . . . . . . : 0x%lx", ptr_infolist->last_item);
log_printf (" ptr_item . . . . . . . : 0x%lx", ptr_infolist->ptr_item);

View File

@ -52,6 +52,8 @@ struct t_infolist_item
struct t_infolist
{
struct t_weechat_plugin *plugin; /* plugin which created this infolist*/
/* (NULL if created by WeeChat) */
struct t_infolist_item *items; /* link to items */
struct t_infolist_item *last_item; /* last variable */
struct t_infolist_item *ptr_item; /* pointer to current item */
@ -100,6 +102,7 @@ extern void *infolist_buffer (struct t_infolist *infolist,
extern time_t infolist_time (struct t_infolist *infolist,
const char *var);
extern void infolist_free (struct t_infolist *infolist);
extern void infolist_free_all_plugin (struct t_weechat_plugin *plugin);
extern void infolist_print_log ();
#endif /* __WEECHAT_INFOLIST_H */

View File

@ -58,6 +58,7 @@
#include "wee-completion.h"
#include "wee-config.h"
#include "wee-debug.h"
#include "wee-hdata.h"
#include "wee-hook.h"
#include "wee-log.h"
#include "wee-network.h"
@ -411,6 +412,7 @@ main (int argc, char *argv[])
util_catch_signal (SIGPIPE, SIG_IGN); /* ignore SIGPIPE signal */
util_catch_signal (SIGSEGV,
&debug_sigsegv); /* crash dump for SIGSEGV signal */
hdata_init (); /* initialize hdata */
hook_init (); /* initialize hooks */
debug_init (); /* hook signals for debug */
gui_main_pre_init (&argc, &argv); /* pre-initiliaze interface */
@ -451,6 +453,7 @@ main (int argc, char *argv[])
config_file_free_all (); /* free all configuration files */
gui_keyboard_end (); /* end keyboard */
unhook_all (); /* remove all hooks */
hdata_end (); /* end hdata */
weechat_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */
return EXIT_SUCCESS; /* make C compiler happy */

View File

@ -1711,23 +1711,19 @@ gui_bar_item_hdata_bar_item_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_bar_item_hdata_bar_item)
return gui_bar_item_hdata_bar_item;
hdata = hdata_new (hdata_name, "prev_item", "next_item");
hdata = hdata_new (NULL, hdata_name, "prev_item", "next_item");
if (hdata)
{
gui_bar_item_hdata_bar_item = hdata;
HDATA_VAR(struct t_gui_bar_item, plugin, POINTER);
HDATA_VAR(struct t_gui_bar_item, name, STRING);
HDATA_VAR(struct t_gui_bar_item, build_callback, POINTER);
HDATA_VAR(struct t_gui_bar_item, build_callback_data, POINTER);
HDATA_VAR(struct t_gui_bar_item, prev_item, POINTER);
HDATA_VAR(struct t_gui_bar_item, next_item, POINTER);
HDATA_VAR(struct t_gui_bar_item, plugin, POINTER, "plugin");
HDATA_VAR(struct t_gui_bar_item, name, STRING, NULL);
HDATA_VAR(struct t_gui_bar_item, build_callback, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_item, build_callback_data, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_item, prev_item, POINTER, hdata_name);
HDATA_VAR(struct t_gui_bar_item, next_item, POINTER, hdata_name);
HDATA_LIST(gui_bar_items);
HDATA_LIST(last_gui_bar_item);
}
return gui_bar_item_hdata_bar_item;
return hdata;
}
/*

View File

@ -68,8 +68,6 @@ struct t_gui_bar *last_gui_bar = NULL; /* last bar */
struct t_gui_bar *gui_temp_bars = NULL; /* bars used when reading config */
struct t_gui_bar *last_gui_temp_bar = NULL;
struct t_hdata *gui_bar_hdata_bar = NULL;
void gui_bar_free_bar_windows (struct t_gui_bar *bar);
@ -2158,28 +2156,24 @@ gui_bar_hdata_bar_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_bar_hdata_bar)
return gui_bar_hdata_bar;
hdata = hdata_new (hdata_name, "prev_bar", "next_bar");
hdata = hdata_new (NULL, hdata_name, "prev_bar", "next_bar");
if (hdata)
{
gui_bar_hdata_bar = hdata;
HDATA_VAR(struct t_gui_bar, name, STRING);
HDATA_VAR(struct t_gui_bar, options, POINTER);
HDATA_VAR(struct t_gui_bar, conditions_count, INTEGER);
HDATA_VAR(struct t_gui_bar, conditions_array, POINTER);
HDATA_VAR(struct t_gui_bar, items_count, INTEGER);
HDATA_VAR(struct t_gui_bar, items_subcount, POINTER);
HDATA_VAR(struct t_gui_bar, items_array, POINTER);
HDATA_VAR(struct t_gui_bar, bar_window, POINTER);
HDATA_VAR(struct t_gui_bar, bar_refresh_needed, INTEGER);
HDATA_VAR(struct t_gui_bar, prev_bar, POINTER);
HDATA_VAR(struct t_gui_bar, next_bar, POINTER);
HDATA_VAR(struct t_gui_bar, name, STRING, NULL);
HDATA_VAR(struct t_gui_bar, options, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, conditions_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar, conditions_array, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar, items_subcount, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_array, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, bar_window, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, bar_refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar, prev_bar, POINTER, hdata_name);
HDATA_VAR(struct t_gui_bar, next_bar, POINTER, hdata_name);
HDATA_LIST(gui_bars);
HDATA_LIST(last_gui_bar);
}
return gui_bar_hdata_bar;
return hdata;
}
/*

View File

@ -71,10 +71,6 @@ int gui_buffers_visited_index = -1; /* index of pointer in list */
int gui_buffers_visited_count = 0; /* number of visited buffers*/
int gui_buffers_visited_frozen = 0; /* 1 to forbid list updates */
struct t_hdata *gui_buffer_hdata_buffer = NULL;
struct t_hdata *gui_buffer_hdata_input_undo = NULL;
struct t_hdata *gui_buffer_hdata_buffer_visited = NULL;
char *gui_buffer_notify_string[GUI_BUFFER_NUM_NOTIFY] =
{ "none", "highlight", "message", "all" };
@ -2954,81 +2950,77 @@ gui_buffer_hdata_buffer_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_buffer_hdata_buffer)
return gui_buffer_hdata_buffer;
hdata = hdata_new (hdata_name, "prev_buffer", "next_buffer");
hdata = hdata_new (NULL, hdata_name, "prev_buffer", "next_buffer");
if (hdata)
{
gui_buffer_hdata_buffer = hdata;
HDATA_VAR(struct t_gui_buffer, plugin, POINTER);
HDATA_VAR(struct t_gui_buffer, plugin_name_for_upgrade, STRING);
HDATA_VAR(struct t_gui_buffer, merge_for_upgrade, POINTER);
HDATA_VAR(struct t_gui_buffer, number, INTEGER);
HDATA_VAR(struct t_gui_buffer, layout_number, INTEGER);
HDATA_VAR(struct t_gui_buffer, layout_applied, INTEGER);
HDATA_VAR(struct t_gui_buffer, name, STRING);
HDATA_VAR(struct t_gui_buffer, short_name, STRING);
HDATA_VAR(struct t_gui_buffer, type, INTEGER);
HDATA_VAR(struct t_gui_buffer, notify, INTEGER);
HDATA_VAR(struct t_gui_buffer, num_displayed, INTEGER);
HDATA_VAR(struct t_gui_buffer, active, INTEGER);
HDATA_VAR(struct t_gui_buffer, print_hooks_enabled, INTEGER);
HDATA_VAR(struct t_gui_buffer, close_callback, POINTER);
HDATA_VAR(struct t_gui_buffer, close_callback_data, POINTER);
HDATA_VAR(struct t_gui_buffer, title, STRING);
HDATA_VAR(struct t_gui_buffer, own_lines, POINTER);
HDATA_VAR(struct t_gui_buffer, mixed_lines, POINTER);
HDATA_VAR(struct t_gui_buffer, lines, POINTER);
HDATA_VAR(struct t_gui_buffer, time_for_each_line, INTEGER);
HDATA_VAR(struct t_gui_buffer, chat_refresh_needed, INTEGER);
HDATA_VAR(struct t_gui_buffer, nicklist, INTEGER);
HDATA_VAR(struct t_gui_buffer, nicklist_case_sensitive, INTEGER);
HDATA_VAR(struct t_gui_buffer, nicklist_root, POINTER);
HDATA_VAR(struct t_gui_buffer, nicklist_max_length, INTEGER);
HDATA_VAR(struct t_gui_buffer, nicklist_display_groups, INTEGER);
HDATA_VAR(struct t_gui_buffer, nicklist_visible_count, INTEGER);
HDATA_VAR(struct t_gui_buffer, input, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_callback, POINTER);
HDATA_VAR(struct t_gui_buffer, input_callback_data, POINTER);
HDATA_VAR(struct t_gui_buffer, input_get_unknown_commands, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_buffer, STRING);
HDATA_VAR(struct t_gui_buffer, input_buffer_alloc, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_buffer_size, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_buffer_length, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_buffer_pos, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_buffer_1st_display, INTEGER);
HDATA_VAR(struct t_gui_buffer, input_undo_snap, POINTER);
HDATA_VAR(struct t_gui_buffer, input_undo, POINTER);
HDATA_VAR(struct t_gui_buffer, last_input_undo, POINTER);
HDATA_VAR(struct t_gui_buffer, ptr_input_undo, POINTER);
HDATA_VAR(struct t_gui_buffer, input_undo_count, INTEGER);
HDATA_VAR(struct t_gui_buffer, completion, POINTER);
HDATA_VAR(struct t_gui_buffer, history, POINTER);
HDATA_VAR(struct t_gui_buffer, last_history, POINTER);
HDATA_VAR(struct t_gui_buffer, ptr_history, POINTER);
HDATA_VAR(struct t_gui_buffer, num_history, INTEGER);
HDATA_VAR(struct t_gui_buffer, text_search, INTEGER);
HDATA_VAR(struct t_gui_buffer, text_search_exact, INTEGER);
HDATA_VAR(struct t_gui_buffer, text_search_found, INTEGER);
HDATA_VAR(struct t_gui_buffer, text_search_input, STRING);
HDATA_VAR(struct t_gui_buffer, highlight_words, STRING);
HDATA_VAR(struct t_gui_buffer, highlight_regex, STRING);
HDATA_VAR(struct t_gui_buffer, highlight_regex_compiled, POINTER);
HDATA_VAR(struct t_gui_buffer, highlight_tags, STRING);
HDATA_VAR(struct t_gui_buffer, highlight_tags_count, INTEGER);
HDATA_VAR(struct t_gui_buffer, highlight_tags_array, POINTER);
HDATA_VAR(struct t_gui_buffer, hotlist_max_level_nicks, POINTER);
HDATA_VAR(struct t_gui_buffer, keys, POINTER);
HDATA_VAR(struct t_gui_buffer, last_key, POINTER);
HDATA_VAR(struct t_gui_buffer, keys_count, INTEGER);
HDATA_VAR(struct t_gui_buffer, local_variables, POINTER);
HDATA_VAR(struct t_gui_buffer, prev_buffer, POINTER);
HDATA_VAR(struct t_gui_buffer, next_buffer, POINTER);
HDATA_VAR(struct t_gui_buffer, plugin, POINTER, "plugin");
HDATA_VAR(struct t_gui_buffer, plugin_name_for_upgrade, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, merge_for_upgrade, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, number, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, layout_number, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, layout_applied, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, name, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, short_name, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, type, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, notify, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, num_displayed, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, active, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, print_hooks_enabled, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, close_callback, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, close_callback_data, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, title, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, own_lines, POINTER, "lines");
HDATA_VAR(struct t_gui_buffer, mixed_lines, POINTER, "lines");
HDATA_VAR(struct t_gui_buffer, lines, POINTER, "lines");
HDATA_VAR(struct t_gui_buffer, time_for_each_line, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, chat_refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, nicklist, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, nicklist_case_sensitive, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, nicklist_root, POINTER, "nick_group");
HDATA_VAR(struct t_gui_buffer, nicklist_max_length, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, nicklist_display_groups, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, nicklist_visible_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_callback, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, input_callback_data, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, input_get_unknown_commands, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer_alloc, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer_size, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer_length, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer_pos, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_buffer_1st_display, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, input_undo_snap, POINTER, "input_undo");
HDATA_VAR(struct t_gui_buffer, input_undo, POINTER, "input_undo");
HDATA_VAR(struct t_gui_buffer, last_input_undo, POINTER, "input_undo");
HDATA_VAR(struct t_gui_buffer, ptr_input_undo, POINTER, "input_undo");
HDATA_VAR(struct t_gui_buffer, input_undo_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, completion, POINTER, "completion");
HDATA_VAR(struct t_gui_buffer, history, POINTER, "history");
HDATA_VAR(struct t_gui_buffer, last_history, POINTER, "history");
HDATA_VAR(struct t_gui_buffer, ptr_history, POINTER, "history");
HDATA_VAR(struct t_gui_buffer, num_history, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, text_search, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, text_search_exact, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, text_search_found, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, text_search_input, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_words, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_regex, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_regex_compiled, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_tags, STRING, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_tags_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, highlight_tags_array, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, hotlist_max_level_nicks, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, keys, POINTER, "key");
HDATA_VAR(struct t_gui_buffer, last_key, POINTER, "key");
HDATA_VAR(struct t_gui_buffer, keys_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_buffer, local_variables, POINTER, NULL);
HDATA_VAR(struct t_gui_buffer, prev_buffer, POINTER, hdata_name);
HDATA_VAR(struct t_gui_buffer, next_buffer, POINTER, hdata_name);
HDATA_LIST(gui_buffers);
HDATA_LIST(last_gui_buffer);
}
return gui_buffer_hdata_buffer;
return hdata;
}
/*
@ -3043,19 +3035,15 @@ gui_buffer_hdata_input_undo_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_buffer_hdata_input_undo)
return gui_buffer_hdata_input_undo;
hdata = hdata_new (hdata_name, "prev_undo", "next_undo");
hdata = hdata_new (NULL, hdata_name, "prev_undo", "next_undo");
if (hdata)
{
gui_buffer_hdata_input_undo = hdata;
HDATA_VAR(struct t_gui_input_undo, data, STRING);
HDATA_VAR(struct t_gui_input_undo, pos, INTEGER);
HDATA_VAR(struct t_gui_input_undo, prev_undo, POINTER);
HDATA_VAR(struct t_gui_input_undo, next_undo, POINTER);
HDATA_VAR(struct t_gui_input_undo, data, STRING, NULL);
HDATA_VAR(struct t_gui_input_undo, pos, INTEGER, NULL);
HDATA_VAR(struct t_gui_input_undo, prev_undo, POINTER, hdata_name);
HDATA_VAR(struct t_gui_input_undo, next_undo, POINTER, hdata_name);
}
return gui_buffer_hdata_input_undo;
return hdata;
}
/*
@ -3070,20 +3058,16 @@ gui_buffer_hdata_buffer_visited_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_buffer_hdata_buffer_visited)
return gui_buffer_hdata_buffer_visited;
hdata = hdata_new (hdata_name, "prev_buffer", "next_buffer");
hdata = hdata_new (NULL, hdata_name, "prev_buffer", "next_buffer");
if (hdata)
{
gui_buffer_hdata_buffer_visited = hdata;
HDATA_VAR(struct t_gui_buffer_visited, buffer, POINTER);
HDATA_VAR(struct t_gui_buffer_visited, prev_buffer, POINTER);
HDATA_VAR(struct t_gui_buffer_visited, next_buffer, POINTER);
HDATA_VAR(struct t_gui_buffer_visited, buffer, POINTER, "buffer");
HDATA_VAR(struct t_gui_buffer_visited, prev_buffer, POINTER, hdata_name);
HDATA_VAR(struct t_gui_buffer_visited, next_buffer, POINTER, hdata_name);
HDATA_LIST(gui_buffers_visited);
HDATA_LIST(last_gui_buffer_visited);
}
return gui_buffer_hdata_buffer_visited;
return hdata;
}
/*

View File

@ -48,10 +48,6 @@
#include "gui-completion.h"
struct t_hdata *gui_completion_hdata_completion = NULL;
struct t_hdata *gui_completion_hdata_completion_partial = NULL;
/*
* gui_completion_buffer_init: init completion for a buffer
*/
@ -1199,34 +1195,30 @@ gui_completion_hdata_completion_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_completion_hdata_completion)
return gui_completion_hdata_completion;
hdata = hdata_new (hdata_name, NULL, NULL);
hdata = hdata_new (NULL, hdata_name, NULL, NULL);
if (hdata)
{
gui_completion_hdata_completion = hdata;
HDATA_VAR(struct t_gui_completion, buffer, POINTER);
HDATA_VAR(struct t_gui_completion, context, INTEGER);
HDATA_VAR(struct t_gui_completion, base_command, STRING);
HDATA_VAR(struct t_gui_completion, base_command_arg_index, INTEGER);
HDATA_VAR(struct t_gui_completion, base_word, STRING);
HDATA_VAR(struct t_gui_completion, base_word_pos, INTEGER);
HDATA_VAR(struct t_gui_completion, position, INTEGER);
HDATA_VAR(struct t_gui_completion, args, STRING);
HDATA_VAR(struct t_gui_completion, direction, INTEGER);
HDATA_VAR(struct t_gui_completion, add_space, INTEGER);
HDATA_VAR(struct t_gui_completion, force_partial_completion, INTEGER);
HDATA_VAR(struct t_gui_completion, completion_list, POINTER);
HDATA_VAR(struct t_gui_completion, word_found, STRING);
HDATA_VAR(struct t_gui_completion, word_found_is_nick, INTEGER);
HDATA_VAR(struct t_gui_completion, position_replace, INTEGER);
HDATA_VAR(struct t_gui_completion, diff_size, INTEGER);
HDATA_VAR(struct t_gui_completion, diff_length, INTEGER);
HDATA_VAR(struct t_gui_completion, partial_completion_list, POINTER);
HDATA_VAR(struct t_gui_completion, last_partial_completion, POINTER);
HDATA_VAR(struct t_gui_completion, buffer, POINTER, "buffer");
HDATA_VAR(struct t_gui_completion, context, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, base_command, STRING, NULL);
HDATA_VAR(struct t_gui_completion, base_command_arg_index, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, base_word, STRING, NULL);
HDATA_VAR(struct t_gui_completion, base_word_pos, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, position, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, args, STRING, NULL);
HDATA_VAR(struct t_gui_completion, direction, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, add_space, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, force_partial_completion, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, completion_list, POINTER, NULL);
HDATA_VAR(struct t_gui_completion, word_found, STRING, NULL);
HDATA_VAR(struct t_gui_completion, word_found_is_nick, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, position_replace, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, diff_size, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, diff_length, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion, partial_completion_list, POINTER, "completion_partial");
HDATA_VAR(struct t_gui_completion, last_partial_completion, POINTER, "completion_partial");
}
return gui_completion_hdata_completion;
return hdata;
}
/*
@ -1242,19 +1234,15 @@ gui_completion_hdata_completion_partial_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_completion_hdata_completion_partial)
return gui_completion_hdata_completion_partial;
hdata = hdata_new (hdata_name, "prev_item", "next_item");
hdata = hdata_new (NULL, hdata_name, "prev_item", "next_item");
if (hdata)
{
gui_completion_hdata_completion_partial = hdata;
HDATA_VAR(struct t_gui_completion_partial, word, STRING);
HDATA_VAR(struct t_gui_completion_partial, count, INTEGER);
HDATA_VAR(struct t_gui_completion_partial, prev_item, POINTER);
HDATA_VAR(struct t_gui_completion_partial, next_item, POINTER);
HDATA_VAR(struct t_gui_completion_partial, word, STRING, NULL);
HDATA_VAR(struct t_gui_completion_partial, count, INTEGER, NULL);
HDATA_VAR(struct t_gui_completion_partial, prev_item, POINTER, hdata_name);
HDATA_VAR(struct t_gui_completion_partial, next_item, POINTER, hdata_name);
}
return gui_completion_hdata_completion_partial;
return hdata;
}
/*

View File

@ -47,8 +47,6 @@ struct t_gui_filter *gui_filters = NULL; /* first filter */
struct t_gui_filter *last_gui_filter = NULL; /* last filter */
int gui_filters_enabled = 1; /* filters enabled? */
struct t_hdata *gui_filter_hdata_filter = NULL;
/*
* gui_filter_line_has_tag_no_filter: return 1 if line has tag "no_filter",
@ -489,30 +487,26 @@ gui_filter_hdata_filter_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_filter_hdata_filter)
return gui_filter_hdata_filter;
hdata = hdata_new (hdata_name, "prev_filter", "next_filter");
hdata = hdata_new (NULL, hdata_name, "prev_filter", "next_filter");
if (hdata)
{
gui_filter_hdata_filter = hdata;
HDATA_VAR(struct t_gui_filter, enabled, INTEGER);
HDATA_VAR(struct t_gui_filter, name, STRING);
HDATA_VAR(struct t_gui_filter, buffer_name, STRING);
HDATA_VAR(struct t_gui_filter, num_buffers, INTEGER);
HDATA_VAR(struct t_gui_filter, buffers, POINTER);
HDATA_VAR(struct t_gui_filter, tags, STRING);
HDATA_VAR(struct t_gui_filter, tags_count, INTEGER);
HDATA_VAR(struct t_gui_filter, tags_array, POINTER);
HDATA_VAR(struct t_gui_filter, regex, STRING);
HDATA_VAR(struct t_gui_filter, regex_prefix, POINTER);
HDATA_VAR(struct t_gui_filter, regex_message, POINTER);
HDATA_VAR(struct t_gui_filter, prev_filter, POINTER);
HDATA_VAR(struct t_gui_filter, next_filter, POINTER);
HDATA_VAR(struct t_gui_filter, enabled, INTEGER, NULL);
HDATA_VAR(struct t_gui_filter, name, STRING, NULL);
HDATA_VAR(struct t_gui_filter, buffer_name, STRING, NULL);
HDATA_VAR(struct t_gui_filter, num_buffers, INTEGER, NULL);
HDATA_VAR(struct t_gui_filter, buffers, POINTER, NULL);
HDATA_VAR(struct t_gui_filter, tags, STRING, NULL);
HDATA_VAR(struct t_gui_filter, tags_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_filter, tags_array, POINTER, NULL);
HDATA_VAR(struct t_gui_filter, regex, STRING, NULL);
HDATA_VAR(struct t_gui_filter, regex_prefix, POINTER, NULL);
HDATA_VAR(struct t_gui_filter, regex_message, POINTER, NULL);
HDATA_VAR(struct t_gui_filter, prev_filter, POINTER, hdata_name);
HDATA_VAR(struct t_gui_filter, next_filter, POINTER, hdata_name);
HDATA_LIST(gui_filters);
HDATA_LIST(last_gui_filter);
}
return gui_filter_hdata_filter;
return hdata;
}
/*

View File

@ -46,8 +46,6 @@ struct t_gui_history *last_history_global = NULL;
struct t_gui_history *history_global_ptr = NULL;
int num_history_global = 0;
struct t_hdata *gui_history_hdata_history = NULL;
/*
* gui_history_buffer_add: add a text/command to buffer's history
@ -229,18 +227,14 @@ gui_history_hdata_history_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_history_hdata_history)
return gui_history_hdata_history;
hdata = hdata_new (hdata_name, "prev_history", "next_history");
hdata = hdata_new (NULL, hdata_name, "prev_history", "next_history");
if (hdata)
{
gui_history_hdata_history = hdata;
HDATA_VAR(struct t_gui_history, text, STRING);
HDATA_VAR(struct t_gui_history, prev_history, POINTER);
HDATA_VAR(struct t_gui_history, next_history, POINTER);
HDATA_VAR(struct t_gui_history, text, STRING, NULL);
HDATA_VAR(struct t_gui_history, prev_history, POINTER, hdata_name);
HDATA_VAR(struct t_gui_history, next_history, POINTER, hdata_name);
}
return gui_history_hdata_history;
return hdata;
}
/*

View File

@ -74,8 +74,6 @@ int gui_keyboard_paste_lines = 0; /* number of lines for pending paste */
time_t gui_keyboard_last_activity_time = 0; /* last activity time (key) */
struct t_hdata *gui_keyboard_hdata_key = NULL;
/*
* gui_keyboard_init: init keyboard
@ -761,23 +759,19 @@ gui_keyboard_hdata_key_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_keyboard_hdata_key)
return gui_keyboard_hdata_key;
hdata = hdata_new (hdata_name, "prev_key", "next_key");
hdata = hdata_new (NULL, hdata_name, "prev_key", "next_key");
if (hdata)
{
gui_keyboard_hdata_key = hdata;
HDATA_VAR(struct t_gui_key, key, STRING);
HDATA_VAR(struct t_gui_key, command, STRING);
HDATA_VAR(struct t_gui_key, prev_key, POINTER);
HDATA_VAR(struct t_gui_key, next_key, POINTER);
HDATA_VAR(struct t_gui_key, key, STRING, NULL);
HDATA_VAR(struct t_gui_key, command, STRING, NULL);
HDATA_VAR(struct t_gui_key, prev_key, POINTER, hdata_name);
HDATA_VAR(struct t_gui_key, next_key, POINTER, hdata_name);
HDATA_LIST(gui_keys);
HDATA_LIST(last_gui_key);
HDATA_LIST(gui_default_keys);
HDATA_LIST(last_gui_default_key);
}
return gui_keyboard_hdata_key;
return hdata;
}
/*

View File

@ -47,11 +47,6 @@
#include "gui-window.h"
struct t_hdata *gui_line_hdata_lines = NULL;
struct t_hdata *gui_line_hdata_line = NULL;
struct t_hdata *gui_line_hdata_line_data = NULL;
/*
* gui_lines_alloc: alloc structure "t_gui_lines" and initialize it
*/
@ -1157,23 +1152,19 @@ gui_line_hdata_lines_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_line_hdata_lines)
return gui_line_hdata_lines;
hdata = hdata_new (hdata_name, NULL, NULL);
hdata = hdata_new (NULL, hdata_name, NULL, NULL);
if (hdata)
{
gui_line_hdata_lines = hdata;
HDATA_VAR(struct t_gui_lines, first_line, POINTER);
HDATA_VAR(struct t_gui_lines, last_line, POINTER);
HDATA_VAR(struct t_gui_lines, last_read_line, POINTER);
HDATA_VAR(struct t_gui_lines, lines_count, INTEGER);
HDATA_VAR(struct t_gui_lines, first_line_not_read, INTEGER);
HDATA_VAR(struct t_gui_lines, lines_hidden, INTEGER);
HDATA_VAR(struct t_gui_lines, buffer_max_length, INTEGER);
HDATA_VAR(struct t_gui_lines, prefix_max_length, INTEGER);
HDATA_VAR(struct t_gui_lines, first_line, POINTER, "line");
HDATA_VAR(struct t_gui_lines, last_line, POINTER, "line");
HDATA_VAR(struct t_gui_lines, last_read_line, POINTER, "line");
HDATA_VAR(struct t_gui_lines, lines_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_lines, first_line_not_read, INTEGER, NULL);
HDATA_VAR(struct t_gui_lines, lines_hidden, INTEGER, NULL);
HDATA_VAR(struct t_gui_lines, buffer_max_length, INTEGER, NULL);
HDATA_VAR(struct t_gui_lines, prefix_max_length, INTEGER, NULL);
}
return gui_line_hdata_lines;
return hdata;
}
/*
@ -1188,18 +1179,14 @@ gui_line_hdata_line_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_line_hdata_line)
return gui_line_hdata_line;
hdata = hdata_new (hdata_name, "prev_line", "next_line");
hdata = hdata_new (NULL, hdata_name, "prev_line", "next_line");
if (hdata)
{
gui_line_hdata_line = hdata;
HDATA_VAR(struct t_gui_line, data, POINTER);
HDATA_VAR(struct t_gui_line, prev_line, POINTER);
HDATA_VAR(struct t_gui_line, next_line, POINTER);
HDATA_VAR(struct t_gui_line, data, POINTER, "line_data");
HDATA_VAR(struct t_gui_line, prev_line, POINTER, hdata_name);
HDATA_VAR(struct t_gui_line, next_line, POINTER, hdata_name);
}
return gui_line_hdata_line;
return hdata;
}
/*
@ -1214,28 +1201,24 @@ gui_line_hdata_line_data_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_line_hdata_line_data)
return gui_line_hdata_line_data;
hdata = hdata_new (hdata_name, NULL, NULL);
hdata = hdata_new (NULL, hdata_name, NULL, NULL);
if (hdata)
{
gui_line_hdata_line_data = hdata;
HDATA_VAR(struct t_gui_line_data, buffer, POINTER);
HDATA_VAR(struct t_gui_line_data, y, INTEGER);
HDATA_VAR(struct t_gui_line_data, date, TIME);
HDATA_VAR(struct t_gui_line_data, date_printed, TIME);
HDATA_VAR(struct t_gui_line_data, str_time, STRING);
HDATA_VAR(struct t_gui_line_data, tags_count, INTEGER);
HDATA_VAR(struct t_gui_line_data, tags_array, POINTER);
HDATA_VAR(struct t_gui_line_data, displayed, INTEGER);
HDATA_VAR(struct t_gui_line_data, highlight, INTEGER);
HDATA_VAR(struct t_gui_line_data, refresh_needed, INTEGER);
HDATA_VAR(struct t_gui_line_data, prefix, STRING);
HDATA_VAR(struct t_gui_line_data, prefix_length, INTEGER);
HDATA_VAR(struct t_gui_line_data, message, STRING);
HDATA_VAR(struct t_gui_line_data, buffer, POINTER, "buffer");
HDATA_VAR(struct t_gui_line_data, y, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, date, TIME, NULL);
HDATA_VAR(struct t_gui_line_data, date_printed, TIME, NULL);
HDATA_VAR(struct t_gui_line_data, str_time, STRING, NULL);
HDATA_VAR(struct t_gui_line_data, tags_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, tags_array, POINTER, NULL);
HDATA_VAR(struct t_gui_line_data, displayed, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, highlight, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, prefix, STRING, NULL);
HDATA_VAR(struct t_gui_line_data, prefix_length, INTEGER, NULL);
HDATA_VAR(struct t_gui_line_data, message, STRING, NULL);
}
return gui_line_hdata_line_data;
return hdata;
}
/*

View File

@ -48,10 +48,6 @@
#include "gui-color.h"
struct t_hdata *gui_nicklist_hdata_nick_group = NULL;
struct t_hdata *gui_nicklist_hdata_nick = NULL;
/*
* gui_nicklist_send_signal: send a signal when something has changed in
* nicklist
@ -957,26 +953,22 @@ gui_nicklist_hdata_nick_group_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_nicklist_hdata_nick_group)
return gui_nicklist_hdata_nick_group;
hdata = hdata_new (hdata_name, "prev_group", "next_group");
hdata = hdata_new (NULL, hdata_name, "prev_group", "next_group");
if (hdata)
{
gui_nicklist_hdata_nick_group = hdata;
HDATA_VAR(struct t_gui_nick_group, name, STRING);
HDATA_VAR(struct t_gui_nick_group, color, STRING);
HDATA_VAR(struct t_gui_nick_group, visible, INTEGER);
HDATA_VAR(struct t_gui_nick_group, level, INTEGER);
HDATA_VAR(struct t_gui_nick_group, parent, POINTER);
HDATA_VAR(struct t_gui_nick_group, childs, POINTER);
HDATA_VAR(struct t_gui_nick_group, last_child, POINTER);
HDATA_VAR(struct t_gui_nick_group, nicks, POINTER);
HDATA_VAR(struct t_gui_nick_group, last_nick, POINTER);
HDATA_VAR(struct t_gui_nick_group, prev_group, POINTER);
HDATA_VAR(struct t_gui_nick_group, next_group, POINTER);
HDATA_VAR(struct t_gui_nick_group, name, STRING, NULL);
HDATA_VAR(struct t_gui_nick_group, color, STRING, NULL);
HDATA_VAR(struct t_gui_nick_group, visible, INTEGER, NULL);
HDATA_VAR(struct t_gui_nick_group, level, INTEGER, NULL);
HDATA_VAR(struct t_gui_nick_group, parent, POINTER, hdata_name);
HDATA_VAR(struct t_gui_nick_group, childs, POINTER, hdata_name);
HDATA_VAR(struct t_gui_nick_group, last_child, POINTER, hdata_name);
HDATA_VAR(struct t_gui_nick_group, nicks, POINTER, "nick");
HDATA_VAR(struct t_gui_nick_group, last_nick, POINTER, "nick");
HDATA_VAR(struct t_gui_nick_group, prev_group, POINTER, hdata_name);
HDATA_VAR(struct t_gui_nick_group, next_group, POINTER, hdata_name);
}
return gui_nicklist_hdata_nick_group;
return hdata;
}
/*
@ -991,23 +983,19 @@ gui_nicklist_hdata_nick_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_nicklist_hdata_nick)
return gui_nicklist_hdata_nick;
hdata = hdata_new (hdata_name, "prev_nick", "next_nick");
hdata = hdata_new (NULL, hdata_name, "prev_nick", "next_nick");
if (hdata)
{
gui_nicklist_hdata_nick = hdata;
HDATA_VAR(struct t_gui_nick, group, POINTER);
HDATA_VAR(struct t_gui_nick, name, STRING);
HDATA_VAR(struct t_gui_nick, color, STRING);
HDATA_VAR(struct t_gui_nick, prefix, STRING);
HDATA_VAR(struct t_gui_nick, prefix_color, STRING);
HDATA_VAR(struct t_gui_nick, visible, INTEGER);
HDATA_VAR(struct t_gui_nick, prev_nick, POINTER);
HDATA_VAR(struct t_gui_nick, next_nick, POINTER);
HDATA_VAR(struct t_gui_nick, group, POINTER, "nick_group");
HDATA_VAR(struct t_gui_nick, name, STRING, NULL);
HDATA_VAR(struct t_gui_nick, color, STRING, NULL);
HDATA_VAR(struct t_gui_nick, prefix, STRING, NULL);
HDATA_VAR(struct t_gui_nick, prefix_color, STRING, NULL);
HDATA_VAR(struct t_gui_nick, visible, INTEGER, NULL);
HDATA_VAR(struct t_gui_nick, prev_nick, POINTER, hdata_name);
HDATA_VAR(struct t_gui_nick, next_nick, POINTER, hdata_name);
}
return gui_nicklist_hdata_nick;
return hdata;
}
/*

View File

@ -71,10 +71,6 @@ struct t_gui_layout_window *gui_window_layout_before_zoom = NULL;
int gui_window_layout_id_current_window = -1;
/* current window id before zoom */
struct t_hdata *gui_window_hdata_window = NULL;
struct t_hdata *gui_window_hdata_window_scroll = NULL;
struct t_hdata *gui_window_hdata_window_tree = NULL;
/*
* gui_window_ask_refresh: set "gui_window_refresh_needed" flag
@ -1281,41 +1277,37 @@ gui_window_hdata_window_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_window_hdata_window)
return gui_window_hdata_window;
hdata = hdata_new (hdata_name, "prev_window", "next_window");
hdata = hdata_new (NULL, hdata_name, "prev_window", "next_window");
if (hdata)
{
gui_window_hdata_window = hdata;
HDATA_VAR(struct t_gui_window, win_x, INTEGER);
HDATA_VAR(struct t_gui_window, win_y, INTEGER);
HDATA_VAR(struct t_gui_window, win_width, INTEGER);
HDATA_VAR(struct t_gui_window, win_height, INTEGER);
HDATA_VAR(struct t_gui_window, win_width_pct, INTEGER);
HDATA_VAR(struct t_gui_window, win_height_pct, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_x, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_y, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_width, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_height, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_cursor_x, INTEGER);
HDATA_VAR(struct t_gui_window, win_chat_cursor_y, INTEGER);
HDATA_VAR(struct t_gui_window, bar_windows, POINTER);
HDATA_VAR(struct t_gui_window, last_bar_window, POINTER);
HDATA_VAR(struct t_gui_window, refresh_needed, INTEGER);
HDATA_VAR(struct t_gui_window, gui_objects, POINTER);
HDATA_VAR(struct t_gui_window, buffer, POINTER);
HDATA_VAR(struct t_gui_window, layout_plugin_name, STRING);
HDATA_VAR(struct t_gui_window, layout_buffer_name, STRING);
HDATA_VAR(struct t_gui_window, scroll, POINTER);
HDATA_VAR(struct t_gui_window, ptr_tree, POINTER);
HDATA_VAR(struct t_gui_window, prev_window, POINTER);
HDATA_VAR(struct t_gui_window, next_window, POINTER);
HDATA_VAR(struct t_gui_window, win_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_width, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_height, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_width_pct, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_height_pct, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_width, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_height, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_cursor_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_cursor_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, bar_windows, POINTER, NULL);
HDATA_VAR(struct t_gui_window, last_bar_window, POINTER, NULL);
HDATA_VAR(struct t_gui_window, refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, gui_objects, POINTER, NULL);
HDATA_VAR(struct t_gui_window, buffer, POINTER, "buffer");
HDATA_VAR(struct t_gui_window, layout_plugin_name, STRING, NULL);
HDATA_VAR(struct t_gui_window, layout_buffer_name, STRING, NULL);
HDATA_VAR(struct t_gui_window, scroll, POINTER, "window_scroll");
HDATA_VAR(struct t_gui_window, ptr_tree, POINTER, "window_tree");
HDATA_VAR(struct t_gui_window, prev_window, POINTER, hdata_name);
HDATA_VAR(struct t_gui_window, next_window, POINTER, hdata_name);
HDATA_LIST(gui_windows);
HDATA_LIST(last_gui_window);
HDATA_LIST(gui_current_window);
}
return gui_window_hdata_window;
return hdata;
}
/*
@ -1330,25 +1322,21 @@ gui_window_hdata_window_scroll_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_window_hdata_window_scroll)
return gui_window_hdata_window_scroll;
hdata = hdata_new (hdata_name, "prev_scroll", "next_scroll");
hdata = hdata_new (NULL, hdata_name, "prev_scroll", "next_scroll");
if (hdata)
{
gui_window_hdata_window_scroll = hdata;
HDATA_VAR(struct t_gui_window_scroll, buffer, POINTER);
HDATA_VAR(struct t_gui_window_scroll, first_line_displayed, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, start_line, POINTER);
HDATA_VAR(struct t_gui_window_scroll, start_line_pos, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, scrolling, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, start_col, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, lines_after, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, reset_allowed, INTEGER);
HDATA_VAR(struct t_gui_window_scroll, prev_scroll, POINTER);
HDATA_VAR(struct t_gui_window_scroll, next_scroll, POINTER);
HDATA_VAR(struct t_gui_window_scroll, buffer, POINTER, "buffer");
HDATA_VAR(struct t_gui_window_scroll, first_line_displayed, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, start_line, POINTER, "line");
HDATA_VAR(struct t_gui_window_scroll, start_line_pos, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, scrolling, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, start_col, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, lines_after, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, reset_allowed, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_scroll, prev_scroll, POINTER, hdata_name);
HDATA_VAR(struct t_gui_window_scroll, next_scroll, POINTER, hdata_name);
}
return gui_window_hdata_window_scroll;
return hdata;
}
/*
@ -1363,22 +1351,18 @@ gui_window_hdata_window_tree_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (gui_window_hdata_window_tree)
return gui_window_hdata_window_tree;
hdata = hdata_new (hdata_name, NULL, NULL);
hdata = hdata_new (NULL, hdata_name, NULL, NULL);
if (hdata)
{
gui_window_hdata_window_tree = hdata;
HDATA_VAR(struct t_gui_window_tree, parent_node, POINTER);
HDATA_VAR(struct t_gui_window_tree, split_pct, INTEGER);
HDATA_VAR(struct t_gui_window_tree, split_horizontal, INTEGER);
HDATA_VAR(struct t_gui_window_tree, child1, POINTER);
HDATA_VAR(struct t_gui_window_tree, child2, POINTER);
HDATA_VAR(struct t_gui_window_tree, window, POINTER);
HDATA_VAR(struct t_gui_window_tree, parent_node, POINTER, hdata_name);
HDATA_VAR(struct t_gui_window_tree, split_pct, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_tree, split_horizontal, INTEGER, NULL);
HDATA_VAR(struct t_gui_window_tree, child1, POINTER, hdata_name);
HDATA_VAR(struct t_gui_window_tree, child2, POINTER, hdata_name);
HDATA_VAR(struct t_gui_window_tree, window, POINTER, "window");
HDATA_LIST(gui_windows_tree);
}
return gui_window_hdata_window_tree;
return hdata;
}
/*

View File

@ -40,10 +40,6 @@
#include "irc-input.h"
struct t_hdata *irc_channel_hdata_channel = NULL;
struct t_hdata *irc_channel_hdata_channel_speaking = NULL;
/*
* irc_channel_valid: check if a channel pointer exists for a server
* return 1 if channel exists
@ -849,40 +845,36 @@ irc_channel_hdata_channel_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_channel_hdata_channel)
return irc_channel_hdata_channel;
hdata = weechat_hdata_new (hdata_name, "prev_channel", "next_channel");
if (hdata)
{
irc_channel_hdata_channel = hdata;
WEECHAT_HDATA_VAR(struct t_irc_channel, type, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, name, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, topic, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, modes, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, limit, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, key, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, checking_away, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, away_message, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, has_quit_server, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, cycle, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, part, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, display_creation_date, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, nick_completion_reset, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, pv_remote_nick_color, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, hook_autorejoin, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_count, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking_time, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick_speaking_time, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, buffer, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, buffer_as_string, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel, prev_channel, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, next_channel, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel, type, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, topic, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, modes, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, limit, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, key, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, checking_away, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, away_message, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, has_quit_server, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, cycle, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, part, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, display_creation_date, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, nick_completion_reset, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, pv_remote_nick_color, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, hook_autorejoin, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks, POINTER, "irc_nick");
WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick, POINTER, "irc_nick");
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking_time, POINTER, "irc_channel_speaking");
WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick_speaking_time, POINTER, "irc_channel_speaking");
WEECHAT_HDATA_VAR(struct t_irc_channel, buffer, POINTER, "buffer");
WEECHAT_HDATA_VAR(struct t_irc_channel, buffer_as_string, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel, prev_channel, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_channel, next_channel, POINTER, hdata_name);
}
return irc_channel_hdata_channel;
return hdata;
}
/*
@ -897,19 +889,15 @@ irc_channel_hdata_channel_speaking_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_channel_hdata_channel_speaking)
return irc_channel_hdata_channel_speaking;
hdata = weechat_hdata_new (hdata_name, "prev_nick", "next_nick");
if (hdata)
{
irc_channel_hdata_channel_speaking = hdata;
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, nick, STRING);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, time_last_message, TIME);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, prev_nick, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, next_nick, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, nick, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, time_last_message, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, prev_nick, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, next_nick, POINTER, hdata_name);
}
return irc_channel_hdata_channel_speaking;
return hdata;
}
/*

View File

@ -35,8 +35,6 @@
struct t_irc_ignore *irc_ignore_list = NULL; /* list of ignore */
struct t_irc_ignore *last_irc_ignore = NULL; /* last ignore in list */
struct t_hdata *irc_ignore_hdata_ignore = NULL;
/*
* irc_ignore_valid: check if an ignore pointer exists
@ -316,24 +314,20 @@ irc_ignore_hdata_ignore_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_ignore_hdata_ignore)
return irc_ignore_hdata_ignore;
hdata = weechat_hdata_new (hdata_name, "prev_ignore", "next_ignore");
if (hdata)
{
irc_ignore_hdata_ignore = hdata;
WEECHAT_HDATA_VAR(struct t_irc_ignore, number, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_ignore, mask, STRING);
WEECHAT_HDATA_VAR(struct t_irc_ignore, regex_mask, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_ignore, server, STRING);
WEECHAT_HDATA_VAR(struct t_irc_ignore, channel, STRING);
WEECHAT_HDATA_VAR(struct t_irc_ignore, prev_ignore, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_ignore, next_ignore, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_ignore, number, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_ignore, mask, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_ignore, regex_mask, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_ignore, server, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_ignore, channel, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_ignore, prev_ignore, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_ignore, next_ignore, POINTER, hdata_name);
WEECHAT_HDATA_LIST(irc_ignore_list);
WEECHAT_HDATA_LIST(last_irc_ignore);
}
return irc_ignore_hdata_ignore;
return hdata;
}
/*

View File

@ -37,9 +37,6 @@
#include "irc-channel.h"
struct t_hdata *irc_nick_hdata_nick = NULL;
/*
* irc_nick_valid: check if a nick pointer exists for a channel
* return 1 if nick exists
@ -943,23 +940,19 @@ irc_nick_hdata_nick_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_nick_hdata_nick)
return irc_nick_hdata_nick;
hdata = weechat_hdata_new (hdata_name, "prev_nick", "next_nick");
if (hdata)
{
irc_nick_hdata_nick = hdata;
WEECHAT_HDATA_VAR(struct t_irc_nick, name, STRING);
WEECHAT_HDATA_VAR(struct t_irc_nick, host, STRING);
WEECHAT_HDATA_VAR(struct t_irc_nick, prefixes, STRING);
WEECHAT_HDATA_VAR(struct t_irc_nick, prefix, STRING);
WEECHAT_HDATA_VAR(struct t_irc_nick, away, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_nick, color, STRING);
WEECHAT_HDATA_VAR(struct t_irc_nick, prev_nick, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_nick, next_nick, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_nick, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, host, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, prefixes, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, prefix, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, away, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, color, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_nick, prev_nick, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_nick, next_nick, POINTER, hdata_name);
}
return irc_nick_hdata_nick;
return hdata;
}
/*

View File

@ -43,8 +43,6 @@ struct t_hook *irc_notify_timer_whois = NULL; /* timer for "whois" */
/* hsignal for redirected commands */
struct t_hook *irc_notify_hsignal = NULL;
struct t_hdata *irc_notify_hdata_notify = NULL;
/*
* irc_notify_valid: check if a notify pointer exists for a server
@ -823,23 +821,19 @@ irc_notify_hdata_notify_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_notify_hdata_notify)
return irc_notify_hdata_notify;
hdata = weechat_hdata_new (hdata_name, "prev_notify", "next_notify");
if (hdata)
{
irc_notify_hdata_notify = hdata;
WEECHAT_HDATA_VAR(struct t_irc_notify, server, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_notify, nick, STRING);
WEECHAT_HDATA_VAR(struct t_irc_notify, check_away, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_notify, is_on_server, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_notify, away_message, STRING);
WEECHAT_HDATA_VAR(struct t_irc_notify, ison_received, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_notify, prev_notify, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_notify, next_notify, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_notify, server, POINTER, "irc_server");
WEECHAT_HDATA_VAR(struct t_irc_notify, nick, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_notify, check_away, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_notify, is_on_server, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_notify, away_message, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_notify, ison_received, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_notify, prev_notify, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_notify, next_notify, POINTER, hdata_name);
}
return irc_notify_hdata_notify;
return hdata;
}
/*

View File

@ -37,9 +37,6 @@
struct t_irc_redirect_pattern *irc_redirect_patterns = NULL;
struct t_irc_redirect_pattern *last_irc_redirect_pattern = NULL;
struct t_hdata *irc_redirect_hdata_redirect_pattern = NULL;
struct t_hdata *irc_redirect_hdata_redirect = NULL;
/* default redirect patterns */
struct t_irc_redirect_pattern irc_redirect_patterns_default[] =
{
@ -967,25 +964,21 @@ irc_redirect_hdata_redirect_pattern_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_redirect_hdata_redirect_pattern)
return irc_redirect_hdata_redirect_pattern;
hdata = weechat_hdata_new (hdata_name, "prev_redirect", "next_redirect");
if (hdata)
{
irc_redirect_hdata_redirect_pattern = hdata;
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, name, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, temp_pattern, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, timeout, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_start, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_stop, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_extra, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, prev_redirect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, next_redirect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, temp_pattern, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, timeout, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_start, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_stop, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_extra, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, prev_redirect, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, next_redirect, POINTER, hdata_name);
WEECHAT_HDATA_LIST(irc_redirect_patterns);
WEECHAT_HDATA_LIST(last_irc_redirect_pattern);
}
return irc_redirect_hdata_redirect_pattern;
return hdata;
}
/*
@ -1000,34 +993,30 @@ irc_redirect_hdata_redirect_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_redirect_hdata_redirect)
return irc_redirect_hdata_redirect;
hdata = weechat_hdata_new (hdata_name, "prev_redirect", "next_redirect");
if (hdata)
{
irc_redirect_hdata_redirect = hdata;
WEECHAT_HDATA_VAR(struct t_irc_redirect, server, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, pattern, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect, signal, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect, count, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, current_count, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, string, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect, timeout, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, command, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect, start_time, TIME);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_extra, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start_received, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop_received, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_filter, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, output, STRING);
WEECHAT_HDATA_VAR(struct t_irc_redirect, output_size, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, prev_redirect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, next_redirect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_redirect, server, POINTER, "irc_server");
WEECHAT_HDATA_VAR(struct t_irc_redirect, pattern, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, signal, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, current_count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, string, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, timeout, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, command, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, start_time, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_extra, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start_received, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop_received, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_filter, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, output, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, output_size, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_redirect, prev_redirect, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_redirect, next_redirect, POINTER, hdata_name);
}
return irc_redirect_hdata_redirect;
return hdata;
}
/*

View File

@ -65,8 +65,6 @@ struct t_irc_server *last_irc_server = NULL;
struct t_irc_message *irc_recv_msgq = NULL;
struct t_irc_message *irc_msgq_last_msg = NULL;
struct t_hdata *irc_server_hdata_server = NULL;
char *irc_server_option_string[IRC_SERVER_NUM_OPTIONS] =
{ "addresses", "proxy", "ipv6",
"ssl", "ssl_cert", "ssl_priorities", "ssl_dhkey_size", "ssl_verify",
@ -3949,78 +3947,74 @@ irc_server_hdata_server_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
if (irc_server_hdata_server)
return irc_server_hdata_server;
hdata = weechat_hdata_new (hdata_name, "prev_server", "next_server");
if (hdata)
{
irc_server_hdata_server = hdata;
WEECHAT_HDATA_VAR(struct t_irc_server, name, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, options, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, temp_server, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, reloading_from_config, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, reloaded_from_config, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, addresses_count, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, addresses_array, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, ports_array, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, index_current_address, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, current_address, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, current_ip, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, current_port, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, sock, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, hook_connect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, hook_fd, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_connection, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_sasl, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, is_connected, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, ssl_connected, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, name, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, options, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, temp_server, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, reloading_from_config, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, reloaded_from_config, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, addresses_count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, addresses_array, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, ports_array, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, index_current_address, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, current_address, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, current_ip, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, current_port, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, sock, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, hook_connect, POINTER, "hook");
WEECHAT_HDATA_VAR(struct t_irc_server, hook_fd, POINTER, "hook");
WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_connection, POINTER, "hook");
WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_sasl, POINTER, "hook");
WEECHAT_HDATA_VAR(struct t_irc_server, is_connected, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, ssl_connected, INTEGER, NULL);
#ifdef HAVE_GNUTLS
WEECHAT_HDATA_VAR(struct t_irc_server, gnutls_sess, OTHER);
WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert, OTHER);
WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert_key, OTHER);
WEECHAT_HDATA_VAR(struct t_irc_server, gnutls_sess, OTHER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert, OTHER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert_key, OTHER, NULL);
#endif
WEECHAT_HDATA_VAR(struct t_irc_server, unterminated_message, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, nicks_count, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, nicks_array, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, nick_first_tried, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, nick_modes, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, isupport, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_modes, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_chars, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_delay, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_start, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, command_time, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_join, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, disable_autojoin, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, is_away, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, away_message, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, away_time, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, lag, INTEGER);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_check_time, OTHER);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_next_check, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_last_refresh, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, cmd_list_regexp, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, last_user_message, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, last_away_check, TIME);
WEECHAT_HDATA_VAR(struct t_irc_server, outqueue, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, last_outqueue, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, redirects, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, last_redirect, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, notify_list, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, last_notify, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, manual_joins, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, buffer, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, buffer_as_string, STRING);
WEECHAT_HDATA_VAR(struct t_irc_server, channels, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, last_channel, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, prev_server, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, next_server, POINTER);
WEECHAT_HDATA_VAR(struct t_irc_server, unterminated_message, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nicks_count, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nicks_array, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nick_first_tried, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nick_modes, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, isupport, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_modes, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, prefix_chars, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_delay, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_start, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, command_time, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_join, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, disable_autojoin, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, is_away, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, away_message, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, away_time, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, lag, INTEGER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_check_time, OTHER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_next_check, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, lag_last_refresh, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, cmd_list_regexp, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, last_user_message, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, last_away_check, TIME, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, outqueue, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, last_outqueue, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, redirects, POINTER, "irc_redirect");
WEECHAT_HDATA_VAR(struct t_irc_server, last_redirect, POINTER, "irc_redirect");
WEECHAT_HDATA_VAR(struct t_irc_server, notify_list, POINTER, "irc_notify");
WEECHAT_HDATA_VAR(struct t_irc_server, last_notify, POINTER, "irc_notify");
WEECHAT_HDATA_VAR(struct t_irc_server, manual_joins, POINTER, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, buffer, POINTER, "buffer");
WEECHAT_HDATA_VAR(struct t_irc_server, buffer_as_string, STRING, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, channels, POINTER, "irc_channel");
WEECHAT_HDATA_VAR(struct t_irc_server, last_channel, POINTER, "irc_channel");
WEECHAT_HDATA_VAR(struct t_irc_server, prev_server, POINTER, hdata_name);
WEECHAT_HDATA_VAR(struct t_irc_server, next_server, POINTER, hdata_name);
WEECHAT_HDATA_LIST(irc_servers);
WEECHAT_HDATA_LIST(last_irc_server);
}
return irc_server_hdata_server;
return hdata;
}
/*

View File

@ -1071,40 +1071,6 @@ plugin_api_init ()
&gui_filter_hdata_filter_cb, NULL);
hook_hdata (NULL, "history", N_("history of commands in buffer"),
&gui_history_hdata_history_cb, NULL);
hook_hdata (NULL, "hook", N_("hook (variables common to all hook types)"),
&hook_hdata_hook_cb, NULL);
hook_hdata (NULL, "hook_command", N_("hook of type \"command\""),
&hook_hdata_hook_command_cb, NULL);
hook_hdata (NULL, "hook_command_run", N_("hook of type \"command_run\""),
&hook_hdata_hook_command_run_cb, NULL);
hook_hdata (NULL, "hook_timer", N_("hook of type \"timer\""),
&hook_hdata_hook_timer_cb, NULL);
hook_hdata (NULL, "hook_fd", N_("hook of type \"fd\""),
&hook_hdata_hook_fd_cb, NULL);
hook_hdata (NULL, "hook_process", N_("hook of type \"process\""),
&hook_hdata_hook_process_cb, NULL);
hook_hdata (NULL, "hook_connect", N_("hook of type \"connect\""),
&hook_hdata_hook_connect_cb, NULL);
hook_hdata (NULL, "hook_print", N_("hook of type \"print\""),
&hook_hdata_hook_print_cb, NULL);
hook_hdata (NULL, "hook_signal", N_("hook of type \"signal\""),
&hook_hdata_hook_signal_cb, NULL);
hook_hdata (NULL, "hook_hsignal", N_("hook of type \"hsignal\""),
&hook_hdata_hook_hsignal_cb, NULL);
hook_hdata (NULL, "hook_config", N_("hook of type \"config\""),
&hook_hdata_hook_config_cb, NULL);
hook_hdata (NULL, "hook_completion", N_("hook of type \"completion\""),
&hook_hdata_hook_completion_cb, NULL);
hook_hdata (NULL, "hook_modifier", N_("hook of type \"modifier\""),
&hook_hdata_hook_modifier_cb, NULL);
hook_hdata (NULL, "hook_info", N_("hook of type \"info\""),
&hook_hdata_hook_info_cb, NULL);
hook_hdata (NULL, "hook_info_hashtable", N_("hook of type \"info_hashtable\""),
&hook_hdata_hook_info_hashtable_cb, NULL);
hook_hdata (NULL, "hook_infolist", N_("hook of type \"infolist\""),
&hook_hdata_hook_infolist_cb, NULL);
hook_hdata (NULL, "hook_hdata", N_("hook of type \"hdata\""),
&hook_hdata_hook_hdata_cb, NULL);
hook_hdata (NULL, "input_undo", N_("structure with undo for input line"),
&gui_buffer_hdata_input_undo_cb, NULL);
hook_hdata (NULL, "key", N_("a key (keyboard shortcut)"),
@ -1119,6 +1085,8 @@ plugin_api_init ()
&gui_nicklist_hdata_nick_group_cb, NULL);
hook_hdata (NULL, "nick", N_("nick in nicklist"),
&gui_nicklist_hdata_nick_cb, NULL);
hook_hdata (NULL, "plugin", N_("plugin"),
&plugin_hdata_plugin_cb, NULL);
hook_hdata (NULL, "window", N_("window"),
&gui_window_hdata_window_cb, NULL);
hook_hdata (NULL, "window_scroll", N_("scroll info in window"),

View File

@ -690,6 +690,7 @@ plugin_load (const char *filename)
new_plugin->hdata_get_var_offset = &hdata_get_var_offset;
new_plugin->hdata_get_var_type = &hdata_get_var_type;
new_plugin->hdata_get_var_type_string = &hdata_get_var_type_string;
new_plugin->hdata_get_var_hdata = &hdata_get_var_hdata;
new_plugin->hdata_get_var = &hdata_get_var;
new_plugin->hdata_get_var_at_offset = &hdata_get_var_at_offset;
new_plugin->hdata_get_list = &hdata_get_list;
@ -927,6 +928,12 @@ plugin_remove (struct t_weechat_plugin *plugin)
/* remove all hooks */
unhook_all_plugin (plugin);
/* remove all infolists */
infolist_free_all_plugin (plugin);
/* remove all hdata */
hdata_free_all_plugin (plugin);
/* remove all bar items */
gui_bar_item_free_all_plugin (plugin);
@ -1155,6 +1162,38 @@ plugin_end ()
plugin_config_end ();
}
/*
* plugin_hdata_plugin_cb: return hdata for plugin
*/
struct t_hdata *
plugin_hdata_plugin_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
hdata = hdata_new (NULL, hdata_name, "prev_plugin", "next_plugin");
if (hdata)
{
HDATA_VAR(struct t_weechat_plugin, filename, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, handle, POINTER, NULL);
HDATA_VAR(struct t_weechat_plugin, name, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, description, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, author, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, version, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, license, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, charset, STRING, NULL);
HDATA_VAR(struct t_weechat_plugin, debug, INTEGER, NULL);
HDATA_VAR(struct t_weechat_plugin, prev_plugin, POINTER, hdata_name);
HDATA_VAR(struct t_weechat_plugin, next_plugin, POINTER, hdata_name);
HDATA_LIST(weechat_plugins);
HDATA_LIST(last_weechat_plugin);
}
return hdata;
}
/*
* plugin_add_to_infolist: add a plugin in an infolist
* return 1 if ok, 0 if error

View File

@ -42,6 +42,8 @@ extern void plugin_unload_all ();
extern void plugin_reload_name (const char *name);
extern void plugin_init (int auto_load, int argc, char *argv[]);
extern void plugin_end ();
extern struct t_hdata *plugin_hdata_plugin_cb (void *data,
const char *hdata_name);
extern int plugin_add_to_infolist (struct t_infolist *infolist,
struct t_weechat_plugin *plugin);
extern void plugin_print_log ();

View File

@ -7224,6 +7224,41 @@ weechat_lua_api_hdata_get (lua_State *L)
LUA_RETURN_STRING_FREE(result);
}
/*
* weechat_lua_api_hdata_get_var_offset: get offset of variable in hdata
*/
static int
weechat_lua_api_hdata_get_var_offset (lua_State *L)
{
const char *hdata, *name;
int n, value;
/* make C compiler happy */
(void) L;
if (!lua_current_script || !lua_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
LUA_RETURN_INT(0);
}
n = lua_gettop (lua_current_interpreter);
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
LUA_RETURN_INT(0);
}
hdata = lua_tostring (lua_current_interpreter, -2);
name = lua_tostring (lua_current_interpreter, -1);
value = weechat_hdata_get_var_offset (script_str2ptr (hdata), name);
LUA_RETURN_INT(value);
}
/*
* weechat_lua_api_hdata_get_var_type_string: get type of variable as string in
* hdata
@ -7260,6 +7295,41 @@ weechat_lua_api_hdata_get_var_type_string (lua_State *L)
LUA_RETURN_STRING(result);
}
/*
* weechat_lua_api_hdata_get_var_hdata: get hdata for variable in hdata
*/
static int
weechat_lua_api_hdata_get_var_hdata (lua_State *L)
{
const char *hdata, *name, *result;
int n;
/* make C compiler happy */
(void) L;
if (!lua_current_script || !lua_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
LUA_RETURN_EMPTY;
}
n = lua_gettop (lua_current_interpreter);
if (n < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
LUA_RETURN_EMPTY;
}
hdata = lua_tostring (lua_current_interpreter, -2);
name = lua_tostring (lua_current_interpreter, -1);
result = weechat_hdata_get_var_hdata (script_str2ptr (hdata), name);
LUA_RETURN_STRING(result);
}
/*
* weechat_lua_api_hdata_get_list: get list pointer in hdata
*/
@ -8318,7 +8388,9 @@ const struct luaL_reg weechat_lua_api_funcs[] = {
{ "infolist_time", &weechat_lua_api_infolist_time },
{ "infolist_free", &weechat_lua_api_infolist_free },
{ "hdata_get", &weechat_lua_api_hdata_get },
{ "hdata_get_var_offset", &weechat_lua_api_hdata_get_var_offset },
{ "hdata_get_var_type_string", &weechat_lua_api_hdata_get_var_type_string },
{ "hdata_get_var_hdata", &weechat_lua_api_hdata_get_var_hdata },
{ "hdata_get_list", &weechat_lua_api_hdata_get_list },
{ "hdata_move", &weechat_lua_api_hdata_move },
{ "hdata_integer", &weechat_lua_api_hdata_integer },

View File

@ -6535,6 +6535,39 @@ XS (XS_weechat_api_hdata_get)
PERL_RETURN_STRING_FREE(result);
}
/*
* weechat::hdata_get_var_offset: get offset of variable in hdata
*/
XS (XS_weechat_api_hdata_get_var_offset)
{
char *hdata, *name;
int value;
dXSARGS;
/* make C compiler happy */
(void) cv;
if (!perl_current_script || !perl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
PERL_RETURN_INT(0);
}
if (items < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
PERL_RETURN_INT(0);
}
hdata = SvPV (ST (0), PL_na);
name = SvPV (ST (1), PL_na);
value = weechat_hdata_get_var_offset (script_str2ptr (hdata), name);
PERL_RETURN_INT(value);
}
/*
* weechat::hdata_get_var_type_string: get type of variable as string in hdata
*/
@ -6568,6 +6601,39 @@ XS (XS_weechat_api_hdata_get_var_type_string)
PERL_RETURN_STRING(result);
}
/*
* weechat::hdata_get_var_hdata: get hdata for variable in hdata
*/
XS (XS_weechat_api_hdata_get_var_hdata)
{
const char *result;
char *hdata, *name;
dXSARGS;
/* make C compiler happy */
(void) cv;
if (!perl_current_script || !perl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
PERL_RETURN_EMPTY;
}
if (items < 2)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
PERL_RETURN_EMPTY;
}
hdata = SvPV (ST (0), PL_na);
name = SvPV (ST (1), PL_na);
result = weechat_hdata_get_var_hdata (script_str2ptr (hdata), name);
PERL_RETURN_STRING(result);
}
/*
* weechat::hdata_get_list: get list pointer in hdata
*/
@ -7213,7 +7279,9 @@ weechat_perl_api_init (pTHX)
newXS ("weechat::infolist_time", XS_weechat_api_infolist_time, "weechat");
newXS ("weechat::infolist_free", XS_weechat_api_infolist_free, "weechat");
newXS ("weechat::hdata_get", XS_weechat_api_hdata_get, "weechat");
newXS ("weechat::hdata_get_var_offset", XS_weechat_api_hdata_get_var_offset, "weechat");
newXS ("weechat::hdata_get_var_type_string", XS_weechat_api_hdata_get_var_type_string, "weechat");
newXS ("weechat::hdata_get_var_hdata", XS_weechat_api_hdata_get_var_hdata, "weechat");
newXS ("weechat::hdata_get_list", XS_weechat_api_hdata_get_list, "weechat");
newXS ("weechat::hdata_move", XS_weechat_api_hdata_move, "weechat");
newXS ("weechat::hdata_integer", XS_weechat_api_hdata_integer, "weechat");

View File

@ -6875,6 +6875,39 @@ weechat_python_api_hdata_get (PyObject *self, PyObject *args)
PYTHON_RETURN_STRING_FREE(result);
}
/*
* weechat_python_api_hdata_get_var_offset: get offset of variable in hdata
*/
static PyObject *
weechat_python_api_hdata_get_var_offset (PyObject *self, PyObject *args)
{
char *hdata, *name;
int value;
/* make C compiler happy */
(void) self;
if (!python_current_script || !python_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
PYTHON_RETURN_INT(0);
}
hdata = NULL;
name = NULL;
if (!PyArg_ParseTuple (args, "ss", &hdata, &name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
PYTHON_RETURN_INT(0);
}
value = weechat_hdata_get_var_offset (script_str2ptr (hdata), name);
PYTHON_RETURN_INT(value);
}
/*
* weechat_python_api_hdata_get_var_type_string: get type of variable as string
* in hdata
@ -6909,6 +6942,39 @@ weechat_python_api_hdata_get_var_type_string (PyObject *self, PyObject *args)
PYTHON_RETURN_STRING(result);
}
/*
* weechat_python_api_hdata_get_var_hdata: get hdata for variable in hdata
*/
static PyObject *
weechat_python_api_hdata_get_var_hdata (PyObject *self, PyObject *args)
{
char *hdata, *name;
const char *result;
/* make C compiler happy */
(void) self;
if (!python_current_script || !python_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
PYTHON_RETURN_EMPTY;
}
hdata = NULL;
name = NULL;
if (!PyArg_ParseTuple (args, "ss", &hdata, &name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
PYTHON_RETURN_EMPTY;
}
result = weechat_hdata_get_var_hdata (script_str2ptr (hdata), name);
PYTHON_RETURN_STRING(result);
}
/*
* weechat_python_api_hdata_get_list: get list pointer in hdata
*/
@ -7555,7 +7621,9 @@ PyMethodDef weechat_python_funcs[] =
{ "infolist_time", &weechat_python_api_infolist_time, METH_VARARGS, "" },
{ "infolist_free", &weechat_python_api_infolist_free, METH_VARARGS, "" },
{ "hdata_get", &weechat_python_api_hdata_get, METH_VARARGS, "" },
{ "hdata_get_var_offset", &weechat_python_api_hdata_get_var_offset, METH_VARARGS, "" },
{ "hdata_get_var_type_string", &weechat_python_api_hdata_get_var_type_string, METH_VARARGS, "" },
{ "hdata_get_var_hdata", &weechat_python_api_hdata_get_var_hdata, METH_VARARGS, "" },
{ "hdata_get_list", &weechat_python_api_hdata_get_list, METH_VARARGS, "" },
{ "hdata_move", &weechat_python_api_hdata_move, METH_VARARGS, "" },
{ "hdata_integer", &weechat_python_api_hdata_integer, METH_VARARGS, "" },

View File

@ -7490,6 +7490,42 @@ weechat_ruby_api_hdata_get (VALUE class, VALUE name)
RUBY_RETURN_STRING_FREE(result);
}
/*
* weechat_ruby_api_hdata_get_var_offset: get offset of variable in hdata
*/
static VALUE
weechat_ruby_api_hdata_get_var_offset (VALUE class, VALUE hdata, VALUE name)
{
char *c_hdata, *c_name;
int value;
/* make C compiler happy */
(void) class;
if (!ruby_current_script || !ruby_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
RUBY_RETURN_INT(0);
}
if (NIL_P (hdata) || NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
RUBY_RETURN_INT(0);
}
Check_Type (hdata, T_STRING);
Check_Type (name, T_STRING);
c_hdata = StringValuePtr (hdata);
c_name = StringValuePtr (name);
value = weechat_hdata_get_var_offset (script_str2ptr (c_hdata), c_name);
RUBY_RETURN_INT(value);
}
/*
* weechat_ruby_api_hdata_get_var_type_string: get type of variable as string
* in hdata
@ -7528,6 +7564,42 @@ weechat_ruby_api_hdata_get_var_type_string (VALUE class, VALUE hdata,
RUBY_RETURN_STRING(result);
}
/*
* weechat_ruby_api_hdata_get_var_hdata: get hdata for variable in hdata
*/
static VALUE
weechat_ruby_api_hdata_get_var_hdata (VALUE class, VALUE hdata, VALUE name)
{
char *c_hdata, *c_name;
const char *result;
/* make C compiler happy */
(void) class;
if (!ruby_current_script || !ruby_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
RUBY_RETURN_EMPTY;
}
if (NIL_P (hdata) || NIL_P (name))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
RUBY_RETURN_EMPTY;
}
Check_Type (hdata, T_STRING);
Check_Type (name, T_STRING);
c_hdata = StringValuePtr (hdata);
c_name = StringValuePtr (name);
result = weechat_hdata_get_var_hdata (script_str2ptr (c_hdata), c_name);
RUBY_RETURN_STRING(result);
}
/*
* weechat_ruby_api_hdata_get_list: get list pointer in hdata
*/
@ -8273,7 +8345,9 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
rb_define_module_function (ruby_mWeechat, "infolist_time", &weechat_ruby_api_infolist_time, 2);
rb_define_module_function (ruby_mWeechat, "infolist_free", &weechat_ruby_api_infolist_free, 1);
rb_define_module_function (ruby_mWeechat, "hdata_get", &weechat_ruby_api_hdata_get, 1);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_offset", &weechat_ruby_api_hdata_get_var_offset, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_type_string", &weechat_ruby_api_hdata_get_var_type_string, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_hdata", &weechat_ruby_api_hdata_get_var_hdata, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_list", &weechat_ruby_api_hdata_get_list, 2);
rb_define_module_function (ruby_mWeechat, "hdata_move", &weechat_ruby_api_hdata_move, 3);
rb_define_module_function (ruby_mWeechat, "hdata_integer", &weechat_ruby_api_hdata_integer, 3);

View File

@ -7283,6 +7283,41 @@ weechat_tcl_api_hdata_get (ClientData clientData, Tcl_Interp *interp,
TCL_RETURN_STRING_FREE(result);
}
/*
* weechat_tcl_api_hdata_get_var_offset: get offset of variable in hdata
*/
static int
weechat_tcl_api_hdata_get_var_offset (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *objp;
char *hdata, *name;
int result, i;
/* make C compiler happy */
(void) clientData;
if (!tcl_current_script || !tcl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
TCL_RETURN_INT(0);
}
if (objc < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "hdata_get_var_offset");
TCL_RETURN_INT(0);
}
hdata = Tcl_GetStringFromObj (objv[1], &i);
name = Tcl_GetStringFromObj (objv[2], &i);
result = weechat_hdata_get_var_offset (script_str2ptr (hdata), name);
TCL_RETURN_INT(result);
}
/*
* weechat_tcl_api_hdata_get_var_type_string: get type of variable as string in
* hdata
@ -7321,6 +7356,42 @@ weechat_tcl_api_hdata_get_var_type_string (ClientData clientData,
TCL_RETURN_STRING(result);
}
/*
* weechat_tcl_api_hdata_get_var_hdata: get hdata for variable in hdata
*/
static int
weechat_tcl_api_hdata_get_var_hdata (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *objp;
char *hdata, *name;
const char *result;
int i;
/* make C compiler happy */
(void) clientData;
if (!tcl_current_script || !tcl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
TCL_RETURN_EMPTY;
}
if (objc < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "hdata_get_var_hdata");
TCL_RETURN_EMPTY;
}
hdata = Tcl_GetStringFromObj (objv[1], &i);
name = Tcl_GetStringFromObj (objv[2], &i);
result = weechat_hdata_get_var_hdata (script_str2ptr (hdata), name);
TCL_RETURN_STRING(result);
}
/*
* weechat_tcl_api_hdata_get_list: get list pointer in hdata
*/
@ -8266,8 +8337,12 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
weechat_tcl_api_infolist_free, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_get",
weechat_tcl_api_hdata_get, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_get_var_offset",
weechat_tcl_api_hdata_get_var_offset, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_get_var_type_string",
weechat_tcl_api_hdata_get_var_type_string, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_get_var_hdata",
weechat_tcl_api_hdata_get_var_hdata, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_get_list",
weechat_tcl_api_hdata_get_list, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hdata_move",

View File

@ -762,10 +762,11 @@ struct t_weechat_plugin
void (*infolist_free) (struct t_infolist *infolist);
/* hdata */
struct t_hdata *(*hdata_new) (const char *hdata_name, const char *var_prev,
struct t_hdata *(*hdata_new) (struct t_weechat_plugin *plugin,
const char *hdata_name, const char *var_prev,
const char *var_next);
void (*hdata_new_var) (struct t_hdata *hdata, const char *name, int offset,
int type);
int type, const char *hdata_name);
void (*hdata_new_list) (struct t_hdata *hdata, const char *name,
void *pointer);
struct t_hdata *(*hdata_get) (struct t_weechat_plugin *plugin,
@ -774,6 +775,8 @@ struct t_weechat_plugin
int (*hdata_get_var_type) (struct t_hdata *hdata, const char *name);
const char *(*hdata_get_var_type_string) (struct t_hdata *hdata,
const char *name);
const char *(*hdata_get_var_hdata) (struct t_hdata *hdata,
const char *name);
void *(*hdata_get_var) (struct t_hdata *hdata, void *pointer,
const char *name);
void *(*hdata_get_var_at_offset) (struct t_hdata *hdata, void *pointer,
@ -1477,12 +1480,15 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
/* hdata */
#define weechat_hdata_new(__hdata_name, __var_prev, __var_next) \
weechat_plugin->hdata_new(__hdata_name, __var_prev, __var_next)
#define weechat_hdata_new_var(__hdata, __name, __offset, __type) \
weechat_plugin->hdata_new_var(__hdata, __name, __offset, __type)
#define WEECHAT_HDATA_VAR(__struct, __name, __type) \
weechat_plugin->hdata_new(weechat_plugin, __hdata_name, __var_prev, \
__var_next)
#define weechat_hdata_new_var(__hdata, __name, __offset, __type, \
__hdata_name) \
weechat_plugin->hdata_new_var(__hdata, __name, __offset, __type, \
__hdata_name)
#define WEECHAT_HDATA_VAR(__struct, __name, __type, __hdata_name) \
weechat_hdata_new_var (hdata, #__name, offsetof (__struct, __name), \
WEECHAT_HDATA_##__type);
WEECHAT_HDATA_##__type, __hdata_name)
#define weechat_hdata_new_list(__hdata, __name, __pointer) \
weechat_plugin->hdata_new_list(__hdata, __name, __pointer)
#define WEECHAT_HDATA_LIST(__name) \
@ -1495,6 +1501,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->hdata_get_var_type(__hdata, __name)
#define weechat_hdata_get_var_type_string(__hdata, __name) \
weechat_plugin->hdata_get_var_type_string(__hdata, __name)
#define weechat_hdata_get_var_hdata(__hdata, __name) \
weechat_plugin->hdata_get_var_hdata(__hdata, __name)
#define weechat_hdata_get_var(__hdata, __pointer, __name) \
weechat_plugin->hdata_get_var(__hdata, __pointer, __name)
#define weechat_hdata_get_var_at_offset(__hdata, __pointer, __offset) \