Remove debug plugin (merged to core), new debug variable for each plugin (no more signals for setting debug)

This commit is contained in:
Sebastien Helleu 2008-11-02 18:54:25 +01:00
parent 640ff6b51c
commit 6e69f7f3ce
38 changed files with 561 additions and 665 deletions

View File

@ -44,7 +44,6 @@ OPTION(DISABLE_LARGEFILE "Disable Large File Support")
OPTION(DISABLE_ALIAS "Disable Alias plugin")
OPTION(DISABLE_ASPELL "Disable Aspell plugin")
OPTION(DISABLE_CHARSET "Disable Charset plugin")
OPTION(DISABLE_DEBUG "Disable Debug plugin")
OPTION(ENABLE_DEMO "Enable Demo plugin")
OPTION(DISABLE_FIFO "Disable FIFO plugin")
OPTION(DISABLE_IRC "Disable IRC plugin")

View File

@ -96,7 +96,6 @@ AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS])
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
AH_VERBATIM([PLUGIN_DEBUG], [#undef PLUGIN_DEBUG])
AH_VERBATIM([PLUGIN_DEMO], [#undef PLUGIN_DEMO])
AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO])
AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC])
@ -122,7 +121,6 @@ AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Suppo
AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes)
AC_ARG_ENABLE(aspell, [ --disable-aspell turn off Aspell plugin (default=compiled)],enable_aspell=$enableval,enable_aspell=yes)
AC_ARG_ENABLE(charset, [ --disable-charset turn off Charset plugin (default=compiled if found)],enable_charset=$enableval,enable_charset=yes)
AC_ARG_ENABLE(debug, [ --enable-debug turn on Debug plugin (default=on)],enable_debug=$enableval,enable_debug=yes)
AC_ARG_ENABLE(demo, [ --enable-demo turn on Demo plugin (default=off)],enable_demo=$enableval,enable_demo=no)
AC_ARG_ENABLE(fifo, [ --disable-fifo turn off Fifo plugin (default=compiled)],enable_fifo=$enableval,enable_fifo=yes)
AC_ARG_ENABLE(irc, [ --disable-irc turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes)
@ -342,18 +340,6 @@ else
not_asked="$not_asked charset"
fi
# ---------------------------------- debug -------------------------------------
if test "x$enable_debug" = "xyes" ; then
DEBUG_CFLAGS=""
DEBUG_LFLAGS=""
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(DEBUG_LFLAGS)
AC_DEFINE(PLUGIN_DEBUG)
else
not_asked="$not_asked debug"
fi
# ---------------------------------- demo --------------------------------------
if test "x$enable_demo" = "xyes" ; then
@ -970,7 +956,6 @@ AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
AM_CONDITIONAL(PLUGIN_DEBUG, test "$enable_debug" = "yes")
AM_CONDITIONAL(PLUGIN_DEMO, test "$enable_demo" = "yes")
AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
@ -1001,7 +986,6 @@ AC_OUTPUT([Makefile
src/plugins/alias/Makefile
src/plugins/aspell/Makefile
src/plugins/charset/Makefile
src/plugins/debug/Makefile
src/plugins/demo/Makefile
src/plugins/fifo/Makefile
src/plugins/irc/Makefile
@ -1057,9 +1041,6 @@ fi
if test "x$enable_charset" = "xyes"; then
listplugins="$listplugins charset"
fi
if test "x$enable_debug" = "xyes"; then
listplugins="$listplugins debug"
fi
if test "x$enable_demo" = "xyes"; then
listplugins="$listplugins demo"
fi

View File

@ -90,7 +90,6 @@
./src/plugins/aspell/weechat-aspell-speller.c
./src/plugins/aspell/weechat-aspell-speller.h
./src/plugins/charset/charset.c
./src/plugins/debug/debug.c
./src/plugins/demo/demo.c
./src/plugins/fifo/fifo.c
./src/plugins/fifo/fifo.h

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2008-09-17 16:19+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -219,6 +219,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%sPlugin \"%s\" nenalezen"
#, fuzzy, c-format
msgid "Debug disabled for \"%s\""
msgstr "%s: ladění vypnuto"
#, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " %s[%s%s%s]%s buffer: %s%s%s / značky: %s / výraz: %s %s"
@ -761,6 +765,28 @@ msgstr ""
"příkaz: příkaz, který spustit ('/' je automaticky dodáno, pokud není "
"nalezeno na začátku příkazu)\n"
msgid "control debug for core/plugins"
msgstr ""
#, fuzzy
msgid "[list | plugin level | dump | buffer | windows]"
msgstr "[[save | apply | reset] [buffers | windows]]"
#, fuzzy
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: uloží výpis paměti do WeeChat log souboru (stejný výpis jako když "
"Weechat havaruje)\n"
" buffer: vypíše obsah bufferu s hexadecimálními hodnotami do log souboru\n"
"windows: zobrazit strom oken"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1067,6 +1093,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "\t\tZměnil se den na %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr "příkaz spuštěný při startu WeeChat, po načtení pluginů"
@ -2018,14 +2047,6 @@ msgstr "jméno_aliasu: jméno aliasu pro odebrání"
msgid "list of alias"
msgstr "Seznam pro aliasy:\n"
#, fuzzy, c-format
msgid "%s: debug enabled"
msgstr "FIFO roura je otevřena\n"
#, c-format
msgid "%s: debug disabled"
msgstr "%s: ladění vypnuto"
#, fuzzy, c-format
msgid "%s: \"%s\" removed"
msgstr "Alias \"%s\" odebrán\n"
@ -2158,26 +2179,6 @@ msgstr ""
"charset: nová znaková sada pro aktuální buffer\n"
" reset: resetovat znakové sady aktuálního bufferu"
msgid "print debug messages"
msgstr "vypsat debug zprávy"
#, fuzzy
msgid "dump | buffer | windows | text"
msgstr "dump | buffer | windows"
#, fuzzy
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: uloží výpis paměti do WeeChat log souboru (stejný výpis jako když "
"Weechat havaruje)\n"
" buffer: vypíše obsah bufferu s hexadecimálními hodnotami do log souboru\n"
"windows: zobrazit strom oken"
msgid "demo message without prefix"
msgstr "demo zpráva bez prefixu"
@ -4920,6 +4921,21 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s chybí argument pro volbu \"%s\"\n"
#, fuzzy
#~ msgid "debug: \"%s\" => %d"
#~ msgstr "Alias \"%s\" odebrán\n"
#, fuzzy
#~ msgid "%s: debug enabled"
#~ msgstr "FIFO roura je otevřena\n"
#~ msgid "print debug messages"
#~ msgstr "vypsat debug zprávy"
#, fuzzy
#~ msgid "dump | buffer | windows | text"
#~ msgstr "dump | buffer | windows"
#~ msgid "automatically log server messages"
#~ msgstr "automati logovat zprávy server"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -231,6 +231,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s Adresse \"%s\" nicht gefunden\n"
#, c-format
msgid "Debug disabled for \"%s\""
msgstr ""
#, fuzzy, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " (kein Message-Handler)\n"
@ -809,6 +813,26 @@ msgstr ""
"Befehl: auszuführender Befehl (falls nicht vorhanden wird automatisch ein "
"'/' vorangestellt)\n"
msgid "control debug for core/plugins"
msgstr ""
msgid "[list | plugin level | dump | buffer | windows]"
msgstr ""
#, fuzzy
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
"dump: Speicherabbild im WeeChat-Logfile ablegen (wie nach einem "
"Programmabsturz)\n"
"windows: zeigt Fensterdaten an"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1094,6 +1118,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "Ein neuer Tag bricht an, heute ist der %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
@ -2034,14 +2061,6 @@ msgstr "Aliasname: Name des zu löschenden Aliases"
msgid "list of alias"
msgstr "Liste der Aliases:\n"
#, fuzzy, c-format
msgid "%s: debug enabled"
msgstr "FIFO ist offen\n"
#, c-format
msgid "%s: debug disabled"
msgstr ""
#, fuzzy, c-format
msgid "%s: \"%s\" removed"
msgstr "Alias \"%s\" entfernt\n"
@ -2170,25 +2189,6 @@ msgid ""
" reset: reset charsets for current buffer"
msgstr ""
msgid "print debug messages"
msgstr "Debugging-Nachricht ausgeben"
#, fuzzy
msgid "dump | buffer | windows | text"
msgstr "dump | windows"
#, fuzzy
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
"dump: Speicherabbild im WeeChat-Logfile ablegen (wie nach einem "
"Programmabsturz)\n"
"windows: zeigt Fensterdaten an"
msgid "demo message without prefix"
msgstr ""
@ -4887,6 +4887,21 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#, fuzzy
#~ msgid "debug: \"%s\" => %d"
#~ msgstr "Alias \"%s\" entfernt\n"
#, fuzzy
#~ msgid "%s: debug enabled"
#~ msgstr "FIFO ist offen\n"
#~ msgid "print debug messages"
#~ msgstr "Debugging-Nachricht ausgeben"
#, fuzzy
#~ msgid "dump | buffer | windows | text"
#~ msgstr "dump | windows"
#~ msgid "automatically log server messages"
#~ msgstr "Automatisches Logging von Servermessages"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -227,6 +227,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s dirección \"%s\" no encontrada\n"
#, c-format
msgid "Debug disabled for \"%s\""
msgstr ""
#, fuzzy, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " (sin manejador de mensaje)\n"
@ -805,6 +809,26 @@ msgstr ""
"comando: comando a ejecutar (se añade un '/' automáticamente si no se "
"encuentra al principio del comando)\n"
msgid "control debug for core/plugins"
msgstr ""
msgid "[list | plugin level | dump | buffer | windows]"
msgstr ""
#, fuzzy
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" volcar: guardar el volcado de memoria en el archivo de registro de Weechat "
"(el mismo volcado se escribe cuando Weechat se cuelga)\n"
"ventanas: mostrar árbol de ventanas"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1070,6 +1094,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "Día cambiado a %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
@ -2008,14 +2035,6 @@ msgstr "alias: nombre del alias a suprimir"
msgid "list of alias"
msgstr "Lista de alias:\n"
#, fuzzy, c-format
msgid "%s: debug enabled"
msgstr "La tubería FIFO está abierta\n"
#, c-format
msgid "%s: debug disabled"
msgstr ""
#, fuzzy, c-format
msgid "%s: \"%s\" removed"
msgstr "Alias \"%s\" eliminado\n"
@ -2146,25 +2165,6 @@ msgid ""
" reset: reset charsets for current buffer"
msgstr ""
msgid "print debug messages"
msgstr "imprime mensajes de depuración"
#, fuzzy
msgid "dump | buffer | windows | text"
msgstr "volcar | ventanas"
#, fuzzy
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" volcar: guardar el volcado de memoria en el archivo de registro de Weechat "
"(el mismo volcado se escribe cuando Weechat se cuelga)\n"
"ventanas: mostrar árbol de ventanas"
msgid "demo message without prefix"
msgstr ""
@ -4892,6 +4892,21 @@ msgstr "%s no es posible crear el servidor\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s falta un argumento para la opción --dir\n"
#, fuzzy
#~ msgid "debug: \"%s\" => %d"
#~ msgstr "Alias \"%s\" eliminado\n"
#, fuzzy
#~ msgid "%s: debug enabled"
#~ msgstr "La tubería FIFO está abierta\n"
#~ msgid "print debug messages"
#~ msgstr "imprime mensajes de depuración"
#, fuzzy
#~ msgid "dump | buffer | windows | text"
#~ msgstr "volcar | ventanas"
#~ msgid "automatically log server messages"
#~ msgstr "registrar automáticamente los mensajes de servidor"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"PO-Revision-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2008-11-02 18:49+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@ -221,6 +221,10 @@ msgstr "Pas de variable locale définie pour le tampon \"%s\""
msgid "%sPlugin \"%s\" not found"
msgstr "%sExtension \"%s\" non trouvée"
#, c-format
msgid "Debug disabled for \"%s\""
msgstr "Debug désactivé pour \"%s\""
#, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " %s[%s%s%s]%s tampon: %s%s%s / tags: %s / regex: %s %s"
@ -818,6 +822,30 @@ msgstr ""
" commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est "
"pas trouvé au début de la commande)"
msgid "control debug for core/plugins"
msgstr "contrôle du debug pour le coeur/les extensions"
msgid "[list | plugin level | dump | buffer | windows]"
msgstr "[list | extension niveau | dump | buffer windows]"
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
"extension: nom de l'extension (\"core\" pour le coeur de WeeChat)\n"
" niveau: niveau de debug pour l'extension\n"
" dump: affiche les variables mémoire WeeChat dans le fichier log (les "
"mêmes messages sont affichés lorsque WeeChat plante)\n"
" buffer: affiche le contenu du tampon en valeurs hexadécimales dans le "
"fichier log\n"
" windows: affiche l'arbre des fenêtres<\n"
" texte: envoie le signal \"debug\" avec \"texte\" comme paramètre"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1142,6 +1170,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "\t\tJour changé: %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "niveau de debug pour l'extension (\"core\" pour le coeur de WeeChat)"
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
"commande exécutée quand WeeChat démarre, après le chargement des extensions"
@ -2027,14 +2058,6 @@ msgstr "nom_alias: nom de l'alias à supprimer"
msgid "list of alias"
msgstr "liste des alias"
#, c-format
msgid "%s: debug enabled"
msgstr "%s: debug activé"
#, c-format
msgid "%s: debug disabled"
msgstr "%s: debug désactivé"
#, c-format
msgid "%s: \"%s\" removed"
msgstr "%s: \"%s\" supprimé"
@ -2187,26 +2210,6 @@ msgstr ""
"charset: nouveau charset pour le tampon courant\n"
" reset: réinitialiser les charsets pour le tampon courant"
msgid "print debug messages"
msgstr "affiche des messages de debogage"
msgid "dump | buffer | windows | text"
msgstr "dump | buffer | windows | texte"
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: affiche les variables mémoire WeeChat dans le fichier log (les "
"mêmes messages sont affichés lorsque WeeChat plante)\n"
" buffer: affiche le contenu du tampon en valeurs hexadécimales dans le "
"fichier log\n"
"windows: affiche l'arbre des fenêtres<\n"
" texte: envoie le signal \"debug\" avec \"texte\" comme paramètre"
msgid "demo message without prefix"
msgstr "message de démonstration sans préfixe"
@ -4978,29 +4981,3 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket"
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s"
#~ msgid "automatically log server messages"
#~ msgstr "enregistrer automatiquement les messages du serveur"
#~ msgid "automatically log channel chats"
#~ msgstr "enregistrer automatiquement les conversations des canaux"
#~ msgid "automatically log private chats"
#~ msgstr "enregistrer automatiquement les conversations privées"
#~ msgid ""
#~ " list: show logging status for open buffers\n"
#~ " set: set logging level on current buffer\n"
#~ " level: level for messages to be logged (0 = logging disabled, 1 = a few "
#~ "messages (most important) .. 9 = all messages)\n"
#~ "disable: disable logging on current buffer (set level to 0)"
#~ msgstr ""
#~ " list: afficher le statut d'enregistrement pour les tampons ouverts\n"
#~ " set: définir le niveau d'enregistrement pour le tampon courant\n"
#~ " niveau: niveau des messages qui doivent être enregistrés (0 = pas "
#~ "d'enregistrement, 1 = quelques messages (les plus importants) .. 9 = tous "
#~ "les messages)\n"
#~ "disable: désactiver l'enregistrement du tampon courant"
#~ msgid "New level for buffer \"%s\" is %d"
#~ msgstr "Le nouveau niveau pour le tampon \"%s\" est %d"

View File

@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -232,6 +232,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s cím \"%s\" nem található\n"
#, c-format
msgid "Debug disabled for \"%s\""
msgstr ""
#, fuzzy, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " (nincs üzenetkezelő)\n"
@ -824,6 +828,27 @@ msgstr ""
"parancs: futtatandó parancs (egy '/' autómatikusan hozzáadódik, ha nincs "
"megadva a parancs elején)\n"
msgid "control debug for core/plugins"
msgstr ""
msgid "[list | plugin level | dump | buffer | windows]"
msgstr ""
#, fuzzy
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: memóriatartalom mentése a WeeChat logba (ugyanez a tartalom íródik "
"a WeeChat összeomlásakor)\n"
" buffer: hexadecimális puffertartalom logba írása\n"
"windows: ablakfa megjelenítése"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1106,6 +1131,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "A mai dátum: %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
@ -2040,14 +2068,6 @@ msgstr "alias_név: az eltávolítandó alias neve"
msgid "list of alias"
msgstr "Aliaszok listája:\n"
#, fuzzy, c-format
msgid "%s: debug enabled"
msgstr "FIFO cső nyitva\n"
#, c-format
msgid "%s: debug disabled"
msgstr ""
#, fuzzy, c-format
msgid "%s: \"%s\" removed"
msgstr "A \"%s\" aliasz eltávolítva\n"
@ -2176,26 +2196,6 @@ msgid ""
" reset: reset charsets for current buffer"
msgstr ""
msgid "print debug messages"
msgstr "hibakereső üzenetek megjelenítése"
#, fuzzy
msgid "dump | buffer | windows | text"
msgstr "dump | buffer | windows"
#, fuzzy
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: memóriatartalom mentése a WeeChat logba (ugyanez a tartalom íródik "
"a WeeChat összeomlásakor)\n"
" buffer: hexadecimális puffertartalom logba írása\n"
"windows: ablakfa megjelenítése"
msgid "demo message without prefix"
msgstr ""
@ -4910,6 +4910,21 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy
#~ msgid "debug: \"%s\" => %d"
#~ msgstr "A \"%s\" aliasz eltávolítva\n"
#, fuzzy
#~ msgid "%s: debug enabled"
#~ msgstr "FIFO cső nyitva\n"
#~ msgid "print debug messages"
#~ msgstr "hibakereső üzenetek megjelenítése"
#, fuzzy
#~ msgid "dump | buffer | windows | text"
#~ msgstr "dump | buffer | windows"
#~ msgid "automatically log server messages"
#~ msgstr "szerverüzenetek automatikus naplózása"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -228,6 +228,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s адрес \"%s\" не найден\n"
#, c-format
msgid "Debug disabled for \"%s\""
msgstr ""
#, fuzzy, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr " (нет обработчика сообщений)\n"
@ -818,6 +822,28 @@ msgstr ""
"команда: исполняемая команда ('/' автоматически добавляется в начало "
"команды)\n"
msgid "control debug for core/plugins"
msgstr ""
msgid "[list | plugin level | dump | buffer | windows]"
msgstr ""
#, fuzzy
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: сохранить дамп памяти в журнал WeeChat (аналогично дампу при крахе "
"WeeChat)\n"
" buffer: сохранить содержимое буфера с шестнадцатеричными значениями в log-"
"файл\n"
"windows: отобразить дерево окон"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -1101,6 +1127,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr "Дата сменилась на %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
@ -2044,14 +2073,6 @@ msgstr "сокращение: удаляемое сокращение"
msgid "list of alias"
msgstr "Список сокращений:\n"
#, fuzzy, c-format
msgid "%s: debug enabled"
msgstr "FIFO pipe открыт\n"
#, c-format
msgid "%s: debug disabled"
msgstr ""
#, fuzzy, c-format
msgid "%s: \"%s\" removed"
msgstr "Сокращение \"%s\" удалено\n"
@ -2180,27 +2201,6 @@ msgid ""
" reset: reset charsets for current buffer"
msgstr ""
msgid "print debug messages"
msgstr "выводить отладочные сообщения"
#, fuzzy
msgid "dump | buffer | windows | text"
msgstr "dump | buffer | windows"
#, fuzzy
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
" dump: сохранить дамп памяти в журнал WeeChat (аналогично дампу при крахе "
"WeeChat)\n"
" buffer: сохранить содержимое буфера с шестнадцатеричными значениями в log-"
"файл\n"
"windows: отобразить дерево окон"
msgid "demo message without prefix"
msgstr ""
@ -4892,6 +4892,21 @@ msgstr "%s DCC: не могу установить неблокирующий р
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy
#~ msgid "debug: \"%s\" => %d"
#~ msgstr "Сокращение \"%s\" удалено\n"
#, fuzzy
#~ msgid "%s: debug enabled"
#~ msgstr "FIFO pipe открыт\n"
#~ msgid "print debug messages"
#~ msgstr "выводить отладочные сообщения"
#, fuzzy
#~ msgid "dump | buffer | windows | text"
#~ msgstr "dump | buffer | windows"
#~ msgid "automatically log server messages"
#~ msgstr "автоматически журналировать сообщения сервера"

View File

@ -91,7 +91,6 @@ SET(WEECHAT_SOURCES
./src/plugins/aspell/weechat-aspell-speller.c
./src/plugins/aspell/weechat-aspell-speller.h
./src/plugins/charset/charset.c
./src/plugins/debug/debug.c
./src/plugins/demo/demo.c
./src/plugins/fifo/fifo.c
./src/plugins/fifo/fifo.h

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: 2008-11-01 17:55+0100\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\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"
@ -202,6 +202,10 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr ""
#, c-format
msgid "Debug disabled for \"%s\""
msgstr ""
#, c-format
msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr ""
@ -706,6 +710,22 @@ msgid ""
"beginning of command)"
msgstr ""
msgid "control debug for core/plugins"
msgstr ""
msgid "[list | plugin level | dump | buffer | windows]"
msgstr ""
msgid ""
" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
msgstr ""
@ -928,6 +948,9 @@ msgstr ""
msgid "\t\tDay changed to %s"
msgstr ""
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
msgid "command executed when WeeChat starts, after loading plugins"
msgstr ""
@ -1710,14 +1733,6 @@ msgstr ""
msgid "list of alias"
msgstr ""
#, c-format
msgid "%s: debug enabled"
msgstr ""
#, c-format
msgid "%s: debug disabled"
msgstr ""
#, c-format
msgid "%s: \"%s\" removed"
msgstr ""
@ -1844,20 +1859,6 @@ msgid ""
" reset: reset charsets for current buffer"
msgstr ""
msgid "print debug messages"
msgstr ""
msgid "dump | buffer | windows | text"
msgstr ""
msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as argument"
msgstr ""
msgid "demo message without prefix"
msgstr ""

View File

@ -770,6 +770,86 @@ command_command (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_OK;
}
/*
* command_debug: control debug for core/plugins
*/
int
command_debug (void *data, struct t_gui_buffer *buffer,
int argc, char **argv, char **argv_eol)
{
struct t_config_option *ptr_option;
struct t_weechat_plugin *ptr_plugin;
/* make C compiler happy */
(void) data;
(void) argv_eol;
if ((argc == 1)
|| ((argc == 2) && (string_strcasecmp (argv[1], "list") == 0)))
{
gui_chat_printf (NULL, "");
gui_chat_printf (NULL, "Debug:");
ptr_option = config_weechat_debug_get (PLUGIN_CORE);
gui_chat_printf (NULL, " %s: %d",
PLUGIN_CORE,
(ptr_option) ? CONFIG_INTEGER(ptr_option) : 0);
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
gui_chat_printf (NULL, " %s: %d",
ptr_plugin->name,
ptr_plugin->debug);
}
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "dump") == 0)
{
hook_signal_send ("debug_dump", WEECHAT_HOOK_SIGNAL_STRING, NULL);
}
else if (string_strcasecmp (argv[1], "buffer") == 0)
{
gui_buffer_dump_hexa (buffer);
}
else if (string_strcasecmp (argv[1], "windows") == 0)
{
debug_windows_tree ();
}
else if (argc >= 3)
{
if (strcmp (argv[2], "0") == 0)
{
/* disable debug for a plugin */
ptr_option = config_weechat_debug_get (argv[1]);
if (ptr_option)
{
config_file_option_free (ptr_option);
config_weechat_debug_set_all ();
gui_chat_printf (NULL, _("Debug disabled for \"%s\""),
argv[1]);
}
}
else
{
/* set debug level for a plugin */
if (config_weechat_debug_set (argv[1], argv[2]) != WEECHAT_CONFIG_OPTION_SET_ERROR)
{
ptr_option = config_weechat_debug_get (argv[1]);
if (ptr_option)
{
gui_chat_printf (NULL, "%s: \"%s\" => %d",
"debug", argv[1],
CONFIG_INTEGER(ptr_option));
}
}
}
}
return WEECHAT_RC_OK;
}
/*
* command_filter_display: display one filter
*/
@ -3133,6 +3213,20 @@ command_init ()
"added if not found at beginning of command)"),
"%p|weechat %P",
&command_command, NULL);
hook_command (NULL, "debug",
N_("control debug for core/plugins"),
N_("[list | plugin level | dump | buffer | windows]"),
N_(" plugin: name of plugin (\"core\" for WeeChat core)\n"
" level: debug level for plugin (0 = disable debug)\n"
" dump: save memory dump in WeeChat log file (same "
"dump is written when WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as "
"argument"),
"%p|list|dump|buffer|windows",
&command_debug, NULL);
hook_command (NULL, "filter",
N_("filter messages in buffers, to hide/show them according "
"to tags or regex"),

View File

@ -35,7 +35,6 @@
#include "weechat.h"
#include "wee-config.h"
#include "wee-config-file.h"
#include "wee-hook.h"
#include "wee-log.h"
#include "wee-util.h"
@ -55,6 +54,7 @@
struct t_config_file *weechat_config_file = NULL;
struct t_config_section *weechat_config_section_debug = NULL;
struct t_config_section *weechat_config_section_bar = NULL;
/* config, startup section */
@ -484,6 +484,151 @@ config_weechat_reload (void *data, struct t_config_file *config_file)
return rc;
}
/*
* config_weechat_debug_get: get debug level for a plugin (or "core")
*/
struct t_config_option *
config_weechat_debug_get (const char *plugin_name)
{
return config_file_search_option (weechat_config_file,
weechat_config_section_debug,
plugin_name);
}
/*
* config_weechat_debug_set_all: set debug for "core" and all plugins, using
* values from [debug] section
*/
void
config_weechat_debug_set_all ()
{
struct t_config_option *ptr_option;
struct t_weechat_plugin *ptr_plugin;
/* set debug for core */
ptr_option = config_weechat_debug_get (PLUGIN_CORE);
weechat_debug_core = (ptr_option) ? CONFIG_INTEGER(ptr_option) : 0;
/* set debug for plugins */
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
ptr_option = config_weechat_debug_get (ptr_plugin->name);
ptr_plugin->debug = (ptr_option) ? CONFIG_INTEGER(ptr_option) : 0;
}
}
/*
* config_weechat_debug_change: called when a debug option is changed
*/
void
config_weechat_debug_change (void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) option;
config_weechat_debug_set_all ();
}
/*
* config_weechat_debug_create_option: create option in "debug" section
*/
int
config_weechat_debug_create_option (void *data,
struct t_config_file *config_file,
struct t_config_section *section,
const char *option_name,
const char *value)
{
struct t_config_option *ptr_option;
int rc;
/* make C compiler happy */
(void) data;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (option_name)
{
ptr_option = config_file_search_option (config_file, section,
option_name);
if (ptr_option)
{
if (value && value[0])
rc = config_file_option_set (ptr_option, value, 1);
else
{
config_file_option_free (ptr_option);
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
else
{
if (value && value[0])
{
ptr_option = config_file_new_option (
config_file, section,
option_name, "integer",
_("debug level for plugin (\"core\" for WeeChat core)"),
NULL, 0, 32, "0", value, NULL, NULL,
&config_weechat_debug_change, NULL,
NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
/* set debug level for "core" and all plugins */
config_weechat_debug_set_all ();
return rc;
}
/*
* config_weechat_debug_delete_option: delete option in "debug" section
*/
int
config_weechat_debug_delete_option (void *data,
struct t_config_file *config_file,
struct t_config_section *section,
struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) config_file;
(void) section;
config_file_option_free (option);
config_weechat_debug_set_all ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
/*
* config_weechat_debug_set: set debug level for a plugin (or "core")
*/
int
config_weechat_debug_set (const char *plugin_name, const char *value)
{
return config_weechat_debug_create_option (NULL,
weechat_config_file,
weechat_config_section_debug,
plugin_name,
value);
}
/*
* config_weechat_bar_read: read bar option in config file
*/
@ -821,6 +966,21 @@ config_weechat_init ()
if (!weechat_config_file)
return 0;
/* debug */
ptr_section = config_file_new_section (weechat_config_file, "debug",
1, 1,
NULL, NULL, NULL, NULL,
NULL, NULL,
&config_weechat_debug_create_option, NULL,
&config_weechat_debug_delete_option, NULL);
if (!ptr_section)
{
config_file_free (weechat_config_file);
return 0;
}
weechat_config_section_debug = ptr_section;
/* startup */
ptr_section = config_file_new_section (weechat_config_file, "startup",
0, 0,

View File

@ -190,6 +190,10 @@ extern struct t_config_option *config_plugin_path;
extern struct t_config_option *config_plugin_save_config_on_unload;
extern struct t_config_option *config_weechat_debug_get (const char *plugin_name);
extern int config_weechat_debug_set (const char *plugin_name,
const char *value);
extern void config_weechat_debug_set_all ();
extern int config_weechat_init ();
extern int config_weechat_read ();
extern int config_weechat_reload ();

View File

@ -24,6 +24,7 @@ struct t_gui_window_tree;
extern void debug_dump (int crash);
extern void debug_sigsegv ();
extern void debug_windows_tree ();
extern void debug_init ();
#endif /* wee-debug.h */

View File

@ -69,6 +69,7 @@
#include "../plugins/plugin.h"
int weechat_debug_core = 0; /* debug level for core */
char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/
int weechat_upgrading; /* =1 if WeeChat is upgrading */
time_t weechat_start_time; /* start time (used by /uptime cmd) */

View File

@ -98,6 +98,7 @@
/* global variables and functions */
extern int weechat_debug_core;
extern char *weechat_argv0;
extern time_t weechat_start_time;
extern int weechat_quit;

View File

@ -50,10 +50,6 @@ IF(ENABLE_DEMO)
ADD_SUBDIRECTORY( demo )
ENDIF(ENABLE_DEMO)
IF(NOT DISABLE_DEBUG)
ADD_SUBDIRECTORY( debug )
ENDIF(NOT DISABLE_DEBUG)
IF(NOT DISABLE_FIFO)
ADD_SUBDIRECTORY( fifo )
ENDIF(NOT DISABLE_FIFO)

View File

@ -38,10 +38,6 @@ if PLUGIN_CHARSET
charset_dir = charset
endif
if PLUGIN_DEBUG
debug_dir = debug
endif
if PLUGIN_DEMO
demo_dir = demo
endif
@ -90,6 +86,6 @@ if PLUGIN_XFER
xfer_dir = xfer
endif
SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(debug_dir) \
$(demo_dir) $(fifo_dir) $(irc_dir) $(logger_dir) $(notify_dir) \
$(script_dir) $(trigger_dir) $(xfer_dir)
SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(demo_dir) $(fifo_dir) \
$(irc_dir) $(logger_dir) $(notify_dir) $(script_dir) \
$(trigger_dir) $(xfer_dir)

View File

@ -132,7 +132,7 @@ weechat_aspell_speller_new (const char *lang)
if (!lang)
return NULL;
if (aspell_debug)
if (weechat_aspell_plugin->debug)
{
weechat_printf (NULL,
"%s: creating new speller for lang \"%s\"",
@ -194,7 +194,7 @@ weechat_aspell_speller_free (struct t_aspell_speller *speller)
if (!speller)
return;
if (aspell_debug)
if (weechat_aspell_plugin->debug)
{
weechat_printf (NULL,
"%s: removing speller for lang \"%s\"",

View File

@ -40,8 +40,6 @@ WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_aspell_plugin = NULL;
int aspell_debug = 0;
char *aspell_last_modifier_string = NULL; /* last str. received by modifier */
char *aspell_last_modifier_result = NULL; /* last str. built by modifier */
@ -153,39 +151,6 @@ struct t_aspell_code countries_avail[] =
};
/*
* weechat_aspell_debug_cb: callback for "debug" signal
*/
int
weechat_aspell_debug_cb (void *data, const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, ASPELL_PLUGIN_NAME) == 0)
{
aspell_debug ^= 1;
if (aspell_debug)
{
weechat_printf (NULL, _("%s: debug enabled"),
ASPELL_PLUGIN_NAME);
}
else
{
weechat_printf (NULL, _("%s: debug disabled"),
ASPELL_PLUGIN_NAME);
}
}
}
return WEECHAT_RC_OK;
}
/*
* weechat_aspell_build_option_name: build option name with a buffer
*/
@ -981,9 +946,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
if (weechat_aspell_config_read () < 0)
return WEECHAT_RC_ERROR;
/* callback for debug */
weechat_hook_signal ("debug", &weechat_aspell_debug_cb, NULL);
/* command /aspell */
weechat_hook_command ("aspell",
N_("aspell plugin configuration"),

View File

@ -31,8 +31,6 @@ struct t_aspell_code
char *name;
};
extern int aspell_debug;
extern struct t_weechat_plugin *weechat_aspell_plugin;
extern struct t_aspell_code langs_avail[];

View File

@ -53,41 +53,6 @@ struct t_config_section *charset_config_section_encode = NULL;
char *charset_terminal = NULL;
char *charset_internal = NULL;
int charset_debug = 0;
/*
* charset_debug_cb: callback for "debug" signal
*/
int
charset_debug_cb (void *data, const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, CHARSET_PLUGIN_NAME) == 0)
{
charset_debug ^= 1;
if (charset_debug)
{
weechat_printf (NULL, _("%s: debug enabled"),
CHARSET_PLUGIN_NAME);
}
else
{
weechat_printf (NULL, _("%s: debug disabled"),
CHARSET_PLUGIN_NAME);
}
}
}
return WEECHAT_RC_OK;
}
/*
* charset_config_reaload: reload charset configuration file
@ -349,7 +314,7 @@ charset_decode_cb (void *data, const char *modifier, const char *modifier_data,
charset = charset_get (charset_config_section_decode, modifier_data,
charset_default_decode);
if (charset_debug)
if (weechat_charset_plugin->debug)
{
weechat_printf (NULL,
"charset: debug: using 'decode' charset: %s "
@ -378,7 +343,7 @@ charset_encode_cb (void *data, const char *modifier, const char *modifier_data,
charset = charset_get (charset_config_section_encode, modifier_data,
charset_default_encode);
if (charset_debug)
if (weechat_charset_plugin->debug)
{
weechat_printf (NULL,
"charset: debug: using 'encode' charset: %s "
@ -525,8 +490,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
charset_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug"));
/* get terminal & internal charsets */
charset_terminal = weechat_info_get ("charset_terminal", "");
charset_internal = weechat_info_get ("charset_internal", "");
@ -560,9 +523,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_modifier ("charset_decode", &charset_decode_cb, NULL);
weechat_hook_modifier ("charset_encode", &charset_encode_cb, NULL);
/* callback for debug */
weechat_hook_signal ("debug", &charset_debug_cb, NULL);
return WEECHAT_RC_OK;
}

View File

@ -1,22 +0,0 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(debug MODULE debug.c)
SET_TARGET_PROPERTIES(debug PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(debug)
INSTALL(TARGETS debug LIBRARY DESTINATION lib/${PROJECT_NAME}/plugins)

View File

@ -1,25 +0,0 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(DEBUG_CFLAGS)
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = debug.la
debug_la_SOURCES = debug.c
debug_la_LDFLAGS = -module
debug_la_LIBADD = $(DEBUG_LFLAGS)

View File

@ -1,126 +0,0 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* debug.c: Debug plugin for WeeChat */
#include <stdlib.h>
#include <string.h>
#include "../weechat-plugin.h"
#define DEBUG_PLUGIN_NAME "debug"
WEECHAT_PLUGIN_NAME(DEBUG_PLUGIN_NAME);
WEECHAT_PLUGIN_DESCRIPTION("Debug plugin for WeeChat");
WEECHAT_PLUGIN_AUTHOR("FlashCode <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_debug_plugin = NULL;
#define weechat_plugin weechat_debug_plugin
/*
* debug_command_cb: callback for /debug command
*/
int
debug_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
/* make C compiler happy */
(void) data;
(void) buffer;
if (argc >= 2)
{
if (weechat_strcasecmp (argv[1], "dump") == 0)
{
weechat_hook_signal_send ("debug_dump",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
//debug_dump (0);
}
else if (weechat_strcasecmp (argv[1], "buffer") == 0)
{
weechat_hook_signal_send ("debug_buffer",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
/*gui_buffer_dump_hexa (buffer);
gui_chat_printf (NULL,
"DEBUG: buffer content written in WeeChat "
"log file");
*/
}
else if (weechat_strcasecmp (argv[1], "windows") == 0)
{
weechat_hook_signal_send ("debug_windows",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
}
else
{
weechat_hook_signal_send ("debug",
WEECHAT_HOOK_SIGNAL_STRING, argv_eol[1]);
}
}
return WEECHAT_RC_OK;
}
/*
* weechat_plugin_init: initialize debug plugin
*/
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
/* make C compiler happy */
(void) argc;
(void) argv;
weechat_plugin = plugin;
weechat_hook_command ("debug",
N_("print debug messages"),
N_("dump | buffer | windows | text"),
N_(" dump: save memory dump in WeeChat log file (same "
"dump is written when WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
"windows: display windows tree\n"
" text: send \"debug\" signal with \"text\" as "
"argument"),
"dump|buffer|windows",
&debug_command_cb, NULL);
return WEECHAT_RC_OK;
}
/*
* weechat_plugin_end: end debug plugin
*/
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* make C compiler happy */
(void) plugin;
return WEECHAT_RC_OK;
}

View File

@ -43,35 +43,6 @@ WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_demo_plugin = NULL;
#define weechat_plugin weechat_demo_plugin
int demo_debug = 0;
/*
* demo_debug_signal_debug_cb: callback for "debug" signal
*/
int
demo_debug_signal_debug_cb (void *data, const char *signal,
const char *type_data, void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, DEMO_PLUGIN_NAME) == 0)
{
demo_debug ^= 1;
if (demo_debug)
weechat_printf (NULL, _("%s: debug enabled"), DEMO_PLUGIN_NAME);
else
weechat_printf (NULL, _("%s: debug disabled"), DEMO_PLUGIN_NAME);
}
}
return WEECHAT_RC_OK;
}
/*
* demo_printf_command_cb: demo command for printf
@ -139,7 +110,7 @@ demo_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
/* make C compiler happy */
(void) data;
if (demo_debug)
if (weechat_demo_plugin->debug)
{
weechat_printf (NULL,
"buffer_close_cb: buffer = %x (%s)",
@ -368,7 +339,7 @@ demo_signal_cb (void *data, const char *signal, const char *type_data,
/* make C compiler happy */
(void) data;
if (demo_debug)
if (weechat_demo_plugin->debug)
{
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
@ -416,8 +387,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
demo_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug"));
weechat_hook_command ("demo_printf",
N_("print some messages on current ubffer"),
N_("[text]"),
@ -459,7 +428,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
"%I",
&demo_infolist_command_cb, NULL);
weechat_hook_signal ("debug", &demo_debug_signal_debug_cb, NULL);
weechat_hook_signal ("*", &demo_signal_cb, NULL);
return WEECHAT_RC_OK;

View File

@ -28,7 +28,6 @@
#include "irc-server.h"
int irc_debug = 0;
struct t_gui_buffer *irc_debug_buffer = NULL;
@ -58,7 +57,7 @@ irc_debug_printf (struct t_irc_server *server, int send, int modified,
{
char *buf;
if (!irc_debug || !message)
if (!weechat_irc_plugin->debug || !message)
return;
if (!irc_debug_buffer)
@ -100,33 +99,6 @@ irc_debug_printf (struct t_irc_server *server, int send, int modified,
free (buf);
}
/*
* irc_debug_signal_debug_cb: callback for "debug" signal
*/
int
irc_debug_signal_debug_cb (void *data, const char *signal,
const char *type_data, void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, IRC_PLUGIN_NAME) == 0)
{
irc_debug ^= 1;
if (irc_debug)
weechat_printf (NULL, _("%s: debug enabled"), IRC_PLUGIN_NAME);
else
weechat_printf (NULL, _("%s: debug disabled"), IRC_PLUGIN_NAME);
}
}
return WEECHAT_RC_OK;
}
/*
* irc_debug_signal_debug_dump_cb: dump IRC data in WeeChat log file
*/
@ -161,7 +133,5 @@ irc_debug_signal_debug_dump_cb (void *data, const char *signal,
void
irc_debug_init ()
{
irc_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug"));
weechat_hook_signal ("debug", &irc_debug_signal_debug_cb, NULL);
weechat_hook_signal ("debug_dump", &irc_debug_signal_debug_dump_cb, NULL);
}

View File

@ -828,7 +828,7 @@ irc_server_new (const char *name, int autoconnect, int autoreconnect,
if (!name || !addresses)
return NULL;
if (irc_debug)
if (weechat_irc_plugin->debug)
{
weechat_log_printf ("Creating new server (name:%s, addresses:%s, "
"pwd:%s, nicks:%s, username:%s, realname:%s, "

View File

@ -68,6 +68,4 @@
extern struct t_weechat_plugin *weechat_irc_plugin;
extern struct t_hook *irc_hook_timer_check_away;
extern int irc_debug;
#endif /* irc.h */

View File

@ -73,7 +73,7 @@ logger_buffer_add (struct t_gui_buffer *buffer, int log_level)
if (!buffer)
return NULL;
if (logger_debug)
if (weechat_logger_plugin->debug)
{
weechat_printf (NULL,
"%s: start logging for buffer \"%s\"",
@ -157,7 +157,7 @@ logger_buffer_free (struct t_logger_buffer *logger_buffer)
{
struct t_logger_buffer *new_logger_buffers;
if (logger_debug)
if (weechat_logger_plugin->debug)
{
weechat_printf (NULL,
"%s: stop logging for buffer \"%s\"",

View File

@ -52,44 +52,9 @@ WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_logger_plugin = NULL;
int logger_debug = 0;
char *logger_buf_write = NULL; /* buffer for writing a line */
/*
* logger_debug_cb: callback for "debug" signal
*/
int
logger_debug_cb (void *data, const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, LOGGER_PLUGIN_NAME) == 0)
{
logger_debug ^= 1;
if (logger_debug)
{
weechat_printf (NULL, _("%s: debug enabled"),
LOGGER_PLUGIN_NAME);
}
else
{
weechat_printf (NULL, _("%s: debug disabled"),
LOGGER_PLUGIN_NAME);
}
}
}
return WEECHAT_RC_OK;
}
/*
* logger_create_directory: create logger directory
* return 1 if success (directory created or already
@ -293,7 +258,7 @@ logger_get_filename (struct t_gui_buffer *buffer)
if (!mask_decoded)
return NULL;
if (logger_debug)
if (weechat_logger_plugin->debug)
{
weechat_printf (NULL,
"%s: buffer = \"%s\", mask = \"%s\", "
@ -963,9 +928,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
if (logger_config_read () < 0)
return WEECHAT_RC_ERROR;
/* callback for debug */
weechat_hook_signal ("debug", &logger_debug_cb, NULL);
/* command /logger */
weechat_hook_command ("logger",
N_("logger plugin configuration"),

View File

@ -26,8 +26,6 @@
#define LOGGER_BUF_WRITE_SIZE (16*1024)
#define LOGGER_LEVEL_DEFAULT 9
extern int logger_debug;
extern struct t_weechat_plugin *weechat_logger_plugin;
extern void logger_start_buffer_all ();

View File

@ -49,8 +49,6 @@ struct t_config_section *notify_config_section_buffer = NULL;
char *notify_string[NOTIFY_NUM_LEVELS] =
{ "none", "highlight", "message", "all" };
int notify_debug = 0;
/*
* notify_search: search a notify level by name
@ -94,33 +92,6 @@ notify_build_option_name (struct t_gui_buffer *buffer)
return option_name;
}
/*
* notify_debug_cb: callback for "debug" signal
*/
int
notify_debug_cb (void *data, const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) data;
(void) signal;
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
if (weechat_strcasecmp ((char *)signal_data, NOTIFY_PLUGIN_NAME) == 0)
{
notify_debug ^= 1;
if (notify_debug)
weechat_printf (NULL, _("%s: debug enabled"), NOTIFY_PLUGIN_NAME);
else
weechat_printf (NULL, _("%s: debug disabled"), NOTIFY_PLUGIN_NAME);
}
}
return WEECHAT_RC_OK;
}
/*
* notify_get: read a notify level in config file
* we first try with all arguments, then remove one by one
@ -183,7 +154,7 @@ notify_set_buffer (struct t_gui_buffer *buffer)
if (option_name)
{
notify = notify_get (option_name);
if (notify_debug)
if (weechat_notify_plugin->debug)
{
weechat_printf (NULL,
_("notify: debug: set notify for buffer %s to "
@ -479,8 +450,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_plugin = plugin;
notify_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug"));
if (!notify_config_init ())
{
weechat_printf (NULL,
@ -511,9 +480,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
/* callback when a config option is changed */
weechat_hook_config ("notify.buffer.*", &notify_config_cb, NULL);
/* callback for debug */
weechat_hook_signal ("debug", &notify_debug_cb, NULL);
/* set notify for open buffers */
notify_set_buffer_all ();

View File

@ -138,6 +138,7 @@ plugin_load (const char *filename)
int rc, i, argc;
char **argv;
struct t_weechat_plugin *new_plugin;
struct t_config_option *ptr_option;
if (!filename)
return NULL;
@ -316,6 +317,8 @@ plugin_load (const char *filename)
new_plugin->weechat_version = strdup (weechat_version);
new_plugin->license = strdup (license);
new_plugin->charset = (charset) ? strdup (charset) : NULL;
ptr_option = config_weechat_debug_get (name);
new_plugin->debug = (ptr_option) ? CONFIG_INTEGER(ptr_option) : 0;
/* functions */
new_plugin->plugin_get_name = &plugin_get_name;
@ -923,6 +926,8 @@ plugin_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!infolist_new_var_string (ptr_item, "charset", plugin->charset))
return 0;
if (!infolist_new_var_integer (ptr_item, "debug", plugin->debug))
return 0;
return 1;
}
@ -947,6 +952,7 @@ plugin_print_log ()
log_printf (" description. . . . . . : '%s'", ptr_plugin->description);
log_printf (" version. . . . . . . . : '%s'", ptr_plugin->version);
log_printf (" charset. . . . . . . . : '%s'", ptr_plugin->charset);
log_printf (" debug. . . . . . . . . : %d", ptr_plugin->debug);
log_printf (" prev_plugin. . . . . . : 0x%x", ptr_plugin->prev_plugin);
log_printf (" next_plugin. . . . . . : 0x%x", ptr_plugin->next_plugin);
}

View File

@ -111,6 +111,7 @@ struct t_weechat_plugin
char *weechat_version; /* weechat version required */
char *license; /* license */
char *charset; /* charset used by plugin */
int debug; /* debug level for plugin (0=off) */
struct t_weechat_plugin *prev_plugin; /* link to previous plugin */
struct t_weechat_plugin *next_plugin; /* link to next plugin */

View File

@ -70,8 +70,6 @@ struct t_xfer *xfer_list = NULL; /* list of files/chats */
struct t_xfer *last_xfer = NULL; /* last file/chat in list */
int xfer_count = 0; /* number of xfer */
int xfer_debug = 0;
int xfer_signal_upgrade_received = 0; /* signal "upgrade" received ? */
@ -1366,8 +1364,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
(void) argv;
weechat_plugin = plugin;
xfer_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug"));
if (!xfer_config_init ())
return WEECHAT_RC_ERROR;

View File

@ -153,7 +153,6 @@ extern char *xfer_protocol_string[];
extern char *xfer_status_string[];
extern struct t_xfer *xfer_list, *last_xfer;
extern int xfer_count;
extern int xfer_debug;
extern int xfer_valid (struct t_xfer *xfer);
extern struct t_xfer *xfer_search_by_number (int number);