diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-17 20:49:37 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-17 20:49:37 +0100 |
commit | 8d64b658dfb2d8af23ada1a09085eaeea839a912 (patch) | |
tree | 93e7097baea628212a796c903a4be21817ba9ae2 | |
parent | e0890b376c05446fe54af36b8685847a1d5d1d37 (diff) | |
download | weechat-8d64b658dfb2d8af23ada1a09085eaeea839a912.zip |
core: add option "libs" for command /debug, add signal "debug_libs"
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.txt | 35 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.txt | 1 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 4 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.txt | 1 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 4 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.txt | 35 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 5 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_commands.txt | 35 | ||||
-rw-r--r-- | po/cs.po | 3 | ||||
-rw-r--r-- | po/de.po | 4 | ||||
-rw-r--r-- | po/es.po | 3 | ||||
-rw-r--r-- | po/fr.po | 6 | ||||
-rw-r--r-- | po/hu.po | 3 | ||||
-rw-r--r-- | po/it.po | 4 | ||||
-rw-r--r-- | po/ja.po | 4 | ||||
-rw-r--r-- | po/pl.po | 4 | ||||
-rw-r--r-- | po/pt_BR.po | 3 | ||||
-rw-r--r-- | po/ru.po | 3 | ||||
-rw-r--r-- | po/tr.po | 3 | ||||
-rw-r--r-- | po/weechat.pot | 3 | ||||
-rw-r--r-- | src/core/wee-command.c | 8 | ||||
-rw-r--r-- | src/core/wee-debug.c | 51 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-main.c | 11 | ||||
-rw-r--r-- | src/gui/gui-main.h | 1 |
25 files changed, 170 insertions, 65 deletions
@@ -11,6 +11,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: add option "libs" for command /debug * core: apply color attributes when clearing a window (patch #8236) * core: set option weechat.look.paste_bracketed to "on" by default * core: fix truncated text when pasting several long lines (bug #40210) diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 399af1db5..ee5569fc5 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -191,23 +191,24 @@ Beispiele: mouse|cursor [verbose] 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 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 - cursor: schaltet den debug-Modus für den Cursor-Modus ein/aus - dirs: Verzeichnisse werden angezeigt - hdata: zeigt Informationen zu hdata an (mittels free werden alle hdata Informationen aus dem Speicher entfernt) - hooks: zeigt die aktiven Hooks an -infolists: zeigt Information über die Infolists an - memory: gibt Informationen über den genutzten Speicher aus - mouse: schaltet den debug-Modus für den Maus-Modus ein/aus - tags: zeigt für jede einzelne Zeile die dazugehörigen Schlagwörter 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 + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree ---- [[command_weechat_eval]] diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index e2eb66896..1660ebd20 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -203,6 +203,7 @@ Examples: hdata: display infos about hdata (with free: remove all hdata in memory) hooks: display infos about hooks infolists: display infos about infolists + libs: display infos about external libraries used memory: display infos about memory usage mouse: toggle debug for mouse tags: display tags for lines diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 0e556108e..44cb99a53 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -7743,6 +7743,10 @@ Arguments: String: plugin name | Dump request +| weechat | debug_libs | + - | + Display external libraries used + | weechat | filter_added | Pointer: filter | Filter added diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 565848580..78fab9f0d 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -203,6 +203,7 @@ extension: nom de l'extension ("core" pour le cœur de WeeChat) hdata: afficher des infos sur les hdata (avec free: supprimer tous les hdata en mémoire) hooks: afficher des infos sur les hooks infolists: afficher des infos sur les infolists + libs: afficher des infos sur les bibliothèques externes utilisées memory: afficher des infos sur l'utilisation de la mémoire mouse: activer/désactiver le debug pour la souris tags: afficher les étiquettes pour les lignes diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 60585e68c..4e825b643 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -7861,6 +7861,10 @@ Paramètres : Chaîne : nom d'extension | Requête de "dump" +| weechat | debug_libs | + - | + Affichage des bibliothèques externes utilisées + | weechat | filter_added | Pointeur : filtre | Filtre ajouté diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index c4f89bbb2..bb58e71c2 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -191,23 +191,24 @@ Esempi: mouse|cursor [verbose] hdata [free] - list: elenca i plugin con i livelli di debug - set: imposta il livello di debug per il plugin - plugin: nome del plugin ("core" per il core di WeeChat) - livello: livello di debug per il plugin (0 = disattiva debug) - dump: salva un dump della memoria nel file di log di WeeChat (lo stesso dump viene salvato in caso di crash di WeeChat) - buffer: esegue un dump del contenuto del buffer con valori esadecimali nel file di log - color: mostra informazioni sulle coppie di colore correnti - cursor: abilita/disabilita debug per la modalità cursore - dirs: mostra le directory - hdata: mostra informazioni su hdata (con free: rimuove tutti gli hdata in memoria) - hooks: mostra informazioni sugli hook -infolists: mostra informazioni sulle liste info - memory: mostra informazioni sull'uso della memoria - mouse: abilita/disabilita debug per il mouse - tags: mostra tag per le righe - term: mostra informazioni sul terminale - windows: mostra l'albero delle finestre + 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 + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree ---- [[command_weechat_eval]] diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index ec20c111d..c083b5e45 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -7836,6 +7836,11 @@ Argomenti: Stringa: nome plugin | Richiesta di dump +// TRANSLATION MISSING +| weechat | debug_libs | + - | + Display external libraries used + | weechat | filter_added | Puntatore: filtro | Filtro aggiunto diff --git a/doc/ja/autogen/user/weechat_commands.txt b/doc/ja/autogen/user/weechat_commands.txt index 665b26754..a02833d1a 100644 --- a/doc/ja/autogen/user/weechat_commands.txt +++ b/doc/ja/autogen/user/weechat_commands.txt @@ -191,23 +191,24 @@ stop: カーソルモードを終了 mouse|cursor [verbose] hdata [free] - list: デバッグレベルの設定されたプラグインをリストアップ - set: プラグインのデバッグレベルを設定 - plugin: プラグインの名前 ("core" は WeeChat コアを意味する) - level: プラグインのデバッグレベル (0 はデバッグの無効化) - dump: WeeChat ログファイルにメモリダンプを保存 (WeeChat がクラッシュした場合と同じダンプが書き込まれます) - buffer: ログファイルに 16 進値でバッファの内容をダンプ - color: 現在の色ペアに関する情報を表示 - cursor: カーソルモードのデバッグを切り替え - dirs: ディレクトリを表示 - hdata: hdata に関する情報を表示 (free を付ければ: メモリから全ての hdata を削除) - hooks: フックに関する情報を表示 -infolists: infolist に関する情報を表示 - memory: メモリ使用量に関する情報を表示 - mouse: マウスのデバックを切り替え - tags: 行のタグを表示 - term: ターミナルに関する情報を表示 - windows: ウィンドウツリーの情報を表示 + 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 + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree ---- [[command_weechat_eval]] @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1257,6 +1257,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -1283,6 +1283,7 @@ msgstr "" "list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1298,6 +1299,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1286,6 +1286,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" -"PO-Revision-Date: 2013-11-09 17:02+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" +"PO-Revision-Date: 2013-11-17 20:18+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -1277,6 +1277,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -1298,6 +1299,7 @@ msgstr "" "hdata en mémoire)\n" " hooks: afficher des infos sur les hooks\n" "infolists: afficher des infos sur les infolists\n" +" libs: afficher des infos sur les bibliothèques externes utilisées\n" " memory: afficher des infos sur l'utilisation de la mémoire\n" " mouse: activer/désactiver le debug pour la souris\n" " tags: afficher les étiquettes pour les lignes\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1193,6 +1193,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1243,6 +1243,7 @@ msgstr "" "list || set <plugin> <livello> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1258,6 +1259,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -1232,6 +1232,7 @@ msgstr "" "list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1247,6 +1248,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-11 09:07+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1262,6 +1262,7 @@ msgstr "" "list || set <wtyczka> <poziom> || dump [<wtyczka>] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1277,6 +1278,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 225c6359b..6b9833556 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1301,6 +1301,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1214,6 +1214,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-11-09 10:13+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1061,6 +1061,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" diff --git a/po/weechat.pot b/po/weechat.pot index d71c8b42d..997e92360 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 17:01+0100\n" +"POT-Creation-Date: 2013-11-17 13:58+0100\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1067,6 +1067,7 @@ msgid "" "memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" +" libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 815a647f7..b2677346f 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1410,6 +1410,12 @@ COMMAND_CALLBACK(debug) { debug_infolists (); } + else if (string_strcasecmp (argv[1], "libs") == 0) + { + gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, "Libs:"); + hook_signal_send ("debug_libs", WEECHAT_HOOK_SIGNAL_STRING, NULL); + } else if (string_strcasecmp (argv[1], "memory") == 0) { debug_memory (); @@ -6359,6 +6365,7 @@ command_init () "all hdata in memory)\n" " hooks: display infos about hooks\n" "infolists: display infos about infolists\n" + " libs: display infos about external libraries used\n" " memory: display infos about memory usage\n" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" @@ -6374,6 +6381,7 @@ command_init () " || hdata free" " || hooks" " || infolists" + " || libs" " || memory" " || mouse verbose" " || tags" diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 3c37b4a85..205ccfeea 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -29,6 +29,13 @@ #endif #include <string.h> #include <time.h> +#include <gcrypt.h> +#include <curl/curl.h> +#include <zlib.h> + +#ifdef HAVE_GNUTLS +#include <gnutls/gnutls.h> +#endif #include "weechat.h" #include "wee-backtrace.h" @@ -497,6 +504,42 @@ debug_infolists () } /* + * Callback for signal "debug_libs": displays infos about external libraries + * used (called when command "/debug libs" is issued). + * + * Note: this function displays libraries for WeeChat core only: plugins can + * catch this signal to display their external libraries. + */ + +int +debug_libs_cb (void *data, const char *signal, const char *type_data, + void *signal_data) +{ + /* make C compiler happy */ + (void) data; + (void) signal; + (void) type_data; + (void) signal_data; + + gui_chat_printf (NULL, " core:"); + gui_main_debug_libs (); + gui_chat_printf (NULL, " gcrypt: v%s%s", + GCRYPT_VERSION, + (weechat_no_gcrypt) ? " (not initialized)" : ""); +#ifdef HAVE_GNUTLS + gui_chat_printf (NULL, " gnutls: v%s%s", + GNUTLS_VERSION, + (weechat_no_gnutls) ? " (not initialized)" : ""); +#else + gui_chat_printf (NULL, " gnutls: (not available)"); +#endif + gui_chat_printf (NULL, " curl: v%s", LIBCURL_VERSION); + gui_chat_printf (NULL, " zlib: v%s", ZLIB_VERSION); + + return WEECHAT_RC_OK; +} + +/* * Displays WeeChat directories. */ @@ -519,5 +562,11 @@ debug_directories () void debug_init () { - hook_signal (NULL, "debug_dump", &debug_dump_cb, NULL); + /* + * hook signals with high priority, to be sure they will be used before + * plugins (they should anyway because this function is called before load + * of plugins) + */ + hook_signal (NULL, "2000|debug_dump", &debug_dump_cb, NULL); + hook_signal (NULL, "2000|debug_libs", &debug_libs_cb, NULL); } diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index b7358914c..489cb4d1f 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -298,6 +298,17 @@ gui_main_signal_sigwinch () } /* + * Displays infos about ncurses lib. + */ + +void +gui_main_debug_libs () +{ + gui_chat_printf (NULL, " ncurses: v%s (patch %d)", + NCURSES_VERSION, NCURSES_VERSION_PATCH); +} + +/* * Refreshs for windows, buffers, bars. */ diff --git a/src/gui/gui-main.h b/src/gui/gui-main.h index cf3b5d4af..a5e07cefe 100644 --- a/src/gui/gui-main.h +++ b/src/gui/gui-main.h @@ -25,6 +25,7 @@ extern void gui_main_get_password (const char *prompt1, const char *prompt2, const char *prompt3, char *password, int size); +extern void gui_main_debug_libs (); extern void gui_main_loop (); extern void gui_main_pre_init (int *argc, char **argv[]); extern void gui_main_init (); |