1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

Compare commits

..

27 Commits

Author SHA1 Message Date
Sebastien Helleu be4c009dcd Version 0.3.0-rc2 2009-07-03 15:45:25 +02:00
Sebastien Helleu d7f3e59c3e Fix bug when moving group of merged buffers to number 1 2009-07-03 15:30:49 +02:00
Sebastien Helleu 49aa853b00 When IRC nick change is received, do not rename private buffer if it already exists with new nick 2009-06-29 12:31:50 +02:00
Sebastien Helleu 8b45c9b8f0 Fix typos in docs 2009-06-28 20:47:13 +02:00
Sebastien Helleu 2f7a5a4147 Rename function string_explode to string_split 2009-06-28 19:49:32 +02:00
Sebastien Helleu 4a89b4ae59 Add french translation of Scripting Guide 2009-06-28 12:00:16 +02:00
Sebastien Helleu 26919fe58b Add french translation of Plugin API Reference 2009-06-28 00:47:37 +02:00
Sebastien Helleu 23f111329e Strip hostnames in IRC message 353 when uhnames protocol is enabled 2009-06-27 15:07:31 +02:00
Sebastien Helleu e06609c7cd Change default order of items in input bar: move input_paste before input_text 2009-06-27 08:55:40 +02:00
Sebastien Helleu 9fad3f128e Add options irc.look.open_channel/pv_near_server 2009-06-25 10:45:30 +02:00
Sebastien Helleu 42cd890bfb Consider private message as highlight when comparing message level to buffer notify value 2009-06-24 15:35:24 +02:00
Sebastien Helleu 4d60c48f5f Switch to irc raw buffer if it is aleady opened, with /server raw or alt-j + alt-r 2009-06-24 15:04:43 +02:00
Sebastien Helleu 89b7a826c5 Fix display of description when it is NULL (with /help option) 2009-06-23 18:40:49 +02:00
Sebastien Helleu 1b47fdcc4e Add modifier "bar_condition_xxx", used to display/hide bars on some windows with custom condition 2009-06-23 17:15:45 +02:00
Sebastien Helleu cdc5ac77c1 Fix typos in Plugin API reference 2009-06-23 17:03:34 +02:00
Sebastien Helleu 8d87086917 Add new option irc.color.item_channel_modes 2009-06-23 10:08:27 +02:00
Sebastien Helleu 16e741f063 Fix bug with pointer to last read line in merged buffers (can lead to crash) 2009-06-22 11:46:29 +02:00
Sebastien Helleu 9b7ac77a0d Disable layout saving by default 2009-06-21 22:30:50 +02:00
Sebastien Helleu fdcbc8e585 Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/weechat 2009-06-21 14:10:57 +02:00
Sebastien Helleu 76b883f05f Fix bug after /upgrade on buffers with free content (bug #26020) 2009-06-21 14:10:41 +02:00
Sebastien Helleu 679e477abb Fix some memory leaks in command hook (completion templates), buffer closing, partial completion 2009-06-21 12:45:50 +02:00
Sebastien Helleu b698a9ce4a Move partial completion structure to completion structure (it is now specific to buffer) (bug #25556) 2009-06-21 12:19:57 +02:00
Sebastien Helleu d4b572c753 Fix scroll Y in bars (bug #26008) 2009-06-21 11:02:57 +02:00
Sebastien Helleu 271d6a131f Fix problems with /set of some bar options 2009-06-21 00:24:04 +02:00
Sebastien Helleu 911e29cf65 Add missing refresh of bar when changing size with command /set 2009-06-20 23:13:21 +02:00
Sebastien Helleu 95c03734cc Fix minor display bug with read marker (line or dotted line)
Bug is happening when read marker is line or dotted line and that last char
of line is an horizontal line. When new line is added in buffer after read
marker, then last char of read marker line is repeated on next line.
2009-06-20 13:12:03 +02:00
Sebastien Helleu f5b2b2291f Fix command to create irc server in quickstart guide 2009-06-18 22:06:05 +02:00
75 changed files with 8704 additions and 829 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ ENDIF(PREFIX)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "3")
SET(VERSION_PATCH "0-rc1")
SET(VERSION_PATCH "0-rc2")
SET(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
SET(PKG_STRING "${PROJECT_NAME} ${VERSION}")
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME})
+2 -2
View File
@@ -18,10 +18,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
AC_INIT(WeeChat, 0.3.0-rc1, flashcode@flashtux.org)
AC_INIT(WeeChat, 0.3.0-rc2, flashcode@flashtux.org)
AC_CONFIG_SRCDIR([src/core/weechat.c])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([weechat], [0.3.0-rc1])
AM_INIT_AUTOMAKE([weechat], [0.3.0-rc2])
# Checks for programs
AC_PROG_CC
+3 -3
View File
@@ -17,7 +17,7 @@
# user's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt
@@ -29,7 +29,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html DESTINATION share
# plugin API reference
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
@@ -41,7 +41,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html DESTINATION
# scripting guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt
COMMENT "Building weechat_scripting.en.html"
+3 -3
View File
@@ -35,15 +35,15 @@ all-local: weechat_user.en.html \
# user's guide
weechat_user.en.html: weechat_user.en.txt $(wildcard autogen/user/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.en.html weechat_user.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.en.html weechat_user.en.txt
# plugin API reference
weechat_plugin_api.en.html: weechat_plugin_api.en.txt $(wildcard autogen/plugin_api/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.en.html weechat_plugin_api.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.en.html weechat_plugin_api.en.txt
# scripting guide
weechat_scripting.en.html: weechat_scripting.en.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.en.html weechat_scripting.en.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.en.html weechat_scripting.en.txt
# FAQ
weechat_faq.en.html: weechat_faq.en.txt
+12 -2
View File
@@ -8,6 +8,11 @@
** type: color
** values: a color name (default value: yellow)
* *irc.color.item_channel_modes*
** description: color for channel modes, near channel name
** type: color
** values: a color name (default value: default)
* *irc.color.message_join*
** description: color for text in join messages
** type: color
@@ -83,8 +88,13 @@
** type: integer
** values: auto, never, always (default value: auto)
* *irc.look.open_near_server*
** description: open new channels/privates near server
* *irc.look.open_channel_near_server*
** description: open new channels near server
** type: boolean
** values: on, off (default value: off)
* *irc.look.open_pv_near_server*
** description: open new privates near server
** type: boolean
** values: on, off (default value: off)
+1 -1
View File
@@ -516,7 +516,7 @@
* *weechat.look.save_layout_on_exit*
** description: save layout on exit (buffers, windows, or both)
** type: integer
** values: none, buffers, windows, all (default value: all)
** values: none, buffers, windows, all (default value: none)
* *weechat.look.scroll_amount*
** description: how many lines to scroll by with scroll_up and scroll_down
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -4,7 +4,7 @@ FlashCode <flashcode@flashtux.org>
[[start]]
Start weechat
Start WeeChat
-------------
A recommended terminal emulator for X (but not mandatory) is rxvt-unicode
@@ -29,7 +29,7 @@ WeeChat immediately uses the new value (you *never* need to restart WeeChat
after changes to configuration).
You can use `/set` option with partial name and wildcard "*" at the beginning
or end to display all options containg letters.
or end to display all options containing letters.
For example:
`/set`::
@@ -71,7 +71,7 @@ Create an IRC server
You can add an IRC server with `/server` command, for example:
/server add oftc irc.oftc.org 6667
/server add oftc irc.oftc.org/6667
As usual, help is available if you're lost: `/help server`
@@ -80,7 +80,7 @@ As usual, help is available if you're lost: `/help server`
Set custom IRC server options
-----------------------------
WeeChat uses default values for all servers ("fallbacks"), if you
WeeChat uses default values for all servers ("fall backs"), if you
don't specify a specific value for a server option.
These default options are "irc.server_default.*".
@@ -106,7 +106,7 @@ with nickserv:
/set irc.server.oftc.command "/msg nickserv identify xxxxxx"
Note: many commmands can be separated by ';' (semi-colon)
Note: many commands can be separated by ';' (semi-colon)
To auto-join some channels when connecting to server:
+6 -6
View File
@@ -41,7 +41,7 @@ Some things are specific to languages:
keyword)
** functions are called with `weechat.xxx(arg1, arg2, ...)`
* ruby:
** you have to define 'weechat_init' and call register inside
** you have to define 'weechat_init' and call 'register' inside
** functions are called with `Weechat.xxx(arg1, arg2, ...)`
* tcl:
** functions are called with `weechat::xxx arg1 arg2 ...`
@@ -53,7 +53,7 @@ Register
All WeeChat scripts must "register" themselves to WeeChat, and this must be
first WeeChat function called in script.
Prorotype:
Prototype:
[source,python]
----------------------------------------
@@ -75,7 +75,7 @@ Arguments:
Script example
~~~~~~~~~~~~~~
Exemple of script, for each language:
Example of script, for each language:
* perl:
@@ -396,7 +396,7 @@ For example, to print data on core buffer (WeeChat main buffer), you can do:
[source,python]
----------------------------------------
weechat.prnt("", "hey!")
weechat.prnt("", "hi!")
----------------------------------------
[WARNING]
@@ -417,10 +417,10 @@ For example:
[source,python]
----------------------------------------
weechat.hook_timer(1000, 0, 1, "my_timer_cb", "my data!")
weechat.hook_timer(1000, 0, 1, "my_timer_cb", "my data")
def my_timer_cb(data, remaining_calls):
# this will display: "my data!"
# this will display: "my data"
weechat.prnt("", data)
return weechat.WEECHAT_RC_OK
----------------------------------------
+7 -7
View File
@@ -44,7 +44,7 @@ Pre-requisites
In order to install WeeChat, you need:
* a running GNU/Linux system (with compiler tools for source
package), or compatible OS (see above)
package), or compatible OS
* 'root' privileges (to install WeeChat in a system directory)
* ncurses library
@@ -150,7 +150,7 @@ Running WeeChat
Command line arguments:
-a, --no-connect::
Disable auto-connect to servers at startup
Disable auto-connect to servers when WeeChat is starting
-d, --dir 'path'::
Set path as home for WeeChat (used for configuration files, logs, user
@@ -733,7 +733,7 @@ include::autogen/user/weechat_commands.txt[]
Plugins
-------
To learn more about plugin or script development (thru API), please read
To learn more about plugin or script development (through API), please read
'WeeChat Plugin API Reference' or 'WeeChat Scripting Guide'.
[[plugins_in_weechat]]
@@ -826,8 +826,8 @@ There is default charset for decode/encode, and specific charsets for buffers
This plugin is optional, but recommended: if it's not loaded, WeeChat
can only read/write UTF-8 data.
Charset plugin should be autoloaded by WeeChat at startup. To be sure plugin
is loaded, try:
Charset plugin should be autoloaded by WeeChat. To be sure plugin is loaded,
try:
----------------------------------------
/charset
@@ -917,8 +917,8 @@ Fifo plugin
You can remote control WeeChat, by sending commands or text to a FIFO pipe (if
option "plugins.var.fifo.fifo" is enabled, it is by default).
The FIFO pipe is located in '~/.weechat/' and is called 'weechat_fifo_xxxxx'
(where 'xxxxx' is the process ID (PID) of running WeeChat).
The FIFO pipe is located in '~/.weechat/' and is called 'weechat_fifo_xxxx'
(where 'xxxx' is the process ID (PID) of running WeeChat).
Syntax for the FIFO pipe commands/text is one of following:
+23 -23
View File
@@ -17,7 +17,7 @@
# user's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt
@@ -27,32 +27,32 @@ ADD_CUSTOM_TARGET(doc-user-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_us
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html DESTINATION share/doc/${PROJECT_NAME})
# plugin API reference
#ADD_CUSTOM_COMMAND(
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html
# COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
# DEPENDS
# ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
# ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
# COMMENT "Building weechat_plugin_api.fr.html"
#)
#ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html)
#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION share/doc/${PROJECT_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt
${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt
COMMENT "Building weechat_plugin_api.fr.html"
)
ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION share/doc/${PROJECT_NAME})
# scripting guide
#ADD_CUSTOM_COMMAND(
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html
# COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
# DEPENDS
# ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
# COMMENT "Building weechat_scripting.fr.html"
#)
#ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html)
#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION share/doc/${PROJECT_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt
COMMENT "Building weechat_scripting.fr.html"
)
ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION share/doc/${PROJECT_NAME})
# FAQ
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt
COMMENT "Building weechat_faq.fr.html"
@@ -63,7 +63,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html DESTINATION share/
# quickstart
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt
COMMENT "Building weechat_quickstart.fr.html"
@@ -74,7 +74,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html DESTINATION
# tester's guide
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="${VERSION}" -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt
COMMENT "Building weechat_tester.fr.html"
+10 -6
View File
@@ -18,6 +18,8 @@ docdir = $(datadir)/doc/$(PACKAGE)
EXTRA_DIST = CMakeLists.txt \
weechat_user.fr.txt \
weechat_plugin_api.fr.txt \
weechat_scripting.fr.txt \
weechat_faq.fr.txt \
weechat_quickstart.fr.txt \
weechat_tester.fr.txt \
@@ -25,33 +27,35 @@ EXTRA_DIST = CMakeLists.txt \
$(wildcard autogen/plugin_api/*.txt)
all-local: weechat_user.fr.html \
weechat_plugin_api.fr.html \
weechat_scripting.fr.html \
weechat_faq.fr.html \
weechat_quickstart.fr.html \
weechat_tester.fr.html
# user's guide
weechat_user.fr.html: weechat_user.fr.txt $(wildcard autogen/user/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.fr.html weechat_user.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_user.fr.html weechat_user.fr.txt
# plugin API reference
weechat_plugin_api.fr.html: weechat_plugin_api.fr.txt $(wildcard autogen/plugin_api/*.txt)
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.fr.html weechat_plugin_api.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_plugin_api.fr.html weechat_plugin_api.fr.txt
# scripting guide
weechat_scripting.fr.html: weechat_scripting.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.fr.html weechat_scripting.fr.txt
$(ASCIIDOC) -a toc -a toclevels=3 -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_scripting.fr.html weechat_scripting.fr.txt
# FAQ
weechat_faq.fr.html: weechat_faq.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_faq.fr.html weechat_faq.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_faq.fr.html weechat_faq.fr.txt
# quickstart
weechat_quickstart.fr.html: weechat_quickstart.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_quickstart.fr.html weechat_quickstart.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_quickstart.fr.html weechat_quickstart.fr.txt
# tester's guide
weechat_tester.fr.html: weechat_tester.fr.txt
$(ASCIIDOC) -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_tester.fr.html weechat_tester.fr.txt
$(ASCIIDOC) -a toc -a toc_title='Table des matières' -a date=`date "+%F"` -a revision="$(VERSION)" -n -o weechat_tester.fr.html weechat_tester.fr.txt
# install docs
+12 -2
View File
@@ -8,6 +8,11 @@
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: yellow)
* *irc.color.item_channel_modes*
** description: couleur pour les modes du canal, à côté du nom du canal
** type: couleur
** valeurs: un nom de couleur (valeur par défaut: default)
* *irc.color.message_join*
** description: couleur pour le texte dans les messages join
** type: couleur
@@ -83,8 +88,13 @@
** type: entier
** valeurs: auto, never, always (valeur par défaut: auto)
* *irc.look.open_near_server*
** description: ouvrir les nouveaux canaux/privés près du serveur
* *irc.look.open_channel_near_server*
** description: ouvrir les nouveaux canaux près du serveur
** type: booléen
** valeurs: on, off (valeur par défaut: off)
* *irc.look.open_pv_near_server*
** description: ouvrir les nouveaux privés près du serveur
** type: booléen
** valeurs: on, off (valeur par défaut: off)
+1 -1
View File
@@ -516,7 +516,7 @@
* *weechat.look.save_layout_on_exit*
** description: sauve la disposition en quittant (tampons, fenêtres, ou les deux)
** type: entier
** valeurs: none, buffers, windows, all (valeur par défaut: all)
** valeurs: none, buffers, windows, all (valeur par défaut: none)
* *weechat.look.scroll_amount*
** description: nombre de lignes pour le défilement avec scroll_up et scroll_down
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -4,7 +4,7 @@ FlashCode <flashcode@flashtux.org>
[[start]]
Démarrer weechat
Démarrer WeeChat
----------------
Un émulateur de terminal recommandé pour X (mais pas obligatoire) est
@@ -75,7 +75,7 @@ Créer un serveur IRC
Vous pouvez ajouter un serveur IRC par la commande `/server`, par exemple :
/server add oftc irc.oftc.org 6667
/server add oftc irc.oftc.org/6667
Comme d'habitude, de l'aide est disponible si vous êtes perdus :
`/help server`
+435
View File
@@ -0,0 +1,435 @@
WeeChat Guide pour Scripts
==========================
FlashCode <flashcode@flashtux.org>
Ce manuel documente le client de messagerie instantanée WeeChat, il fait
partie de WeeChat.
La dernière version de ce document peut être téléchargée sur cette page :
http://weechat.flashtux.org/doc.php
[[introduction]]
Introduction
------------
WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre,
rapide et léger, conçu pour différents systèmes d'exploitation.
Ce manuel documente la façon d'écrire des scripts pour WeeChat, en utilisant
l'un des cinq langages de script supportés : perl, python, ruby, lua ou tcl.
[NOTE]
La majorité des exemples de cette documentation sont écrits en Python, mais
l'API est la même pour les autres langages.
[[scripts_in_weechat]]
Scripts dans WeeChat
--------------------
[[languages_specifities]]
Spécificités des langages
~~~~~~~~~~~~~~~~~~~~~~~~~
Quelques choses sont spécifiques aux langages :
* perl :
** les fonctions sont appelées par `weechat::xxx(arg1, arg2, ...);`
* python :
** vous devez utiliser `import weechat`
** les fonctions `print*` se nomment `prnt*` en python (car 'print' est un mot
clé réservé)
** les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)`
* ruby :
** vous devez définir 'weechat_init' et appeler 'register' dedans
** les fonctions sont appelées par `Weechat.xxx(arg1, arg2, ...)`
* tcl :
** les fonctions sont appelées par `weechat::xxx arg1 arg2 ...`
[[register]]
Register
~~~~~~~~
Tous les scripts WeeChat doivent s'enregistrer ("register") auprès de WeeChat,
et cela doit être la première fonction WeeChat appelée dans le script.
Prototype :
[source,python]
----------------------------------------
weechat.register(name, author, version, license, description, shutdown_function, charset)
----------------------------------------
Paramètres :
* 'name' : chaîne, nom interne du script
* 'author' : chaîne, nom de l'auteur
* 'version' : chaîne, version du script
* 'license' : chaîne, licence du script
* 'description' : chaîne, description courte du script
* 'shutdown_function' : chaîne, nom de la fonction appelée lorsque le script
est déchargé
* 'charset' : chaîne, jeu de caractères du script (optionnel, si votre script
est UTF-8, vous pouvez utiliser une valeur vide ici, car UTF-8 est le jeu de
caractères par défaut)
[[script_example]]
Exemple de script
~~~~~~~~~~~~~~~~~
Exemple de script, pour chaque langage :
* perl :
[source,perl]
----------------------------------------
weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Script de test", "", "");
weechat::print("", "Bonjour, du script perl !");
----------------------------------------
* python :
[source,python]
----------------------------------------
import weechat
weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
weechat.prnt("", "Bonjour, du script python !")
----------------------------------------
* ruby :
[source,ruby]
----------------------------------------
def weechat_init
Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
Weechat.print("", "Bonjour, du script ruby !")
return Weechat::WEECHAT_RC_OK
end
----------------------------------------
* lua :
[source,lua]
----------------------------------------
weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Script de test", "", "")
weechat.print("", "Bonjour, du script lua !")
----------------------------------------
* tcl :
// [source,tcl]
----------------------------------------
weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Script de test" "" ""
weechat::print "" "Bonjour, du script tcl !"
----------------------------------------
[[load_script]]
Chargement du script
~~~~~~~~~~~~~~~~~~~~
Vous devez utiliser la commande, dépendant du langage :
----------------------------------------
/perl load perl/script.pl
/python load python/script.py
/ruby load ruby/script.rb
/lua load lua/script.lua
/tcl load tcl/script.tcl
----------------------------------------
Vous pouvez faire un lien dans le répertoire 'langage/autoload' pour charger
automatiquement le script quand WeeChat démarre.
Par exemple en perl :
----------------------------------------
$ cd ~/.weechat/perl/autoload
$ ln -s ../script.pl
----------------------------------------
[[script_api]]
API script
----------
L'API script est quasiment identique à l'API C.
Vous pouvez consulter la 'Référence API Extension WeeChat' pour le détail de
chaque fonction de l'API : prototype, paramètres, valeurs de retour, exemples.
Il est important de bien faire la différence entre une 'extension' et un
'script' : une 'extension' est un fichier binaire compilé et chargé avec la
commande `/plugin`, tandis qu'un 'script' est un fichier texte chargé par une
extension comme 'perl' par la commande `perl`.
Quand votre script 'test.py' appelle une fonction de l'API WeeChat, le chemin
est le suivant :
........................................
(API script) (API C)
\/ \/
test.py -------> extension python (python.so) -------> WeeChat core
........................................
Quand WeeChat appelle un "callback" dans votre script 'test.py', le chemin
est inversé :
........................................
(API C) (API script)
\/ \/
WeeChat core -------> extension plugin (python.so) -------> test.py
........................................
Fonctions
~~~~~~~~~
Liste des fonctions de l'API script :
* général :
** 'register'
* extensions :
** 'plugin_get_name'
* chaînes :
** 'charset_set'
** 'iconv_to_internal'
** 'iconv_from_internal'
** 'gettext'
** 'ngettext'
** 'string_remove_color'
* répertoires :
** 'mkdir_home'
** 'mkdir'
** 'mkdir_parents'
* listes triées :
** 'list_new'
** 'list_add'
** 'list_search'
** 'list_casesearch'
** 'list_get'
** 'list_set'
** 'list_next'
** 'list_prev'
** 'list_string'
** 'list_size'
** 'list_remove'
** 'list_remove_all'
** 'list_free'
* fichiers de configuration :
** 'config_new'
** 'config_new_section'
** 'config_search_section'
** 'config_new_option'
** 'config_search_option'
** 'config_string_to_boolean'
** 'config_option_reset'
** 'config_option_set'
** 'config_option_set_null'
** 'config_option_unset'
** 'config_option_rename'
** 'config_option_is_null'
** 'config_option_default_is_null'
** 'config_boolean'
** 'config_boolean_default'
** 'config_integer'
** 'config_integer_default'
** 'config_string'
** 'config_string_default'
** 'config_color'
** 'config_color_default'
** 'config_write_option'
** 'config_write_line'
** 'config_write'
** 'config_read'
** 'config_reload'
** 'config_option_free'
** 'config_section_free_options'
** 'config_section_free'
** 'config_free'
** 'config_get'
** 'config_get_plugin'
** 'config_is_set_plugin'
** 'config_set_plugin'
** 'config_unset_plugin'
* affichage :
** 'prefix'
** 'color'
** 'print' (pour python : 'prnt')
** 'print_date_tags' (pour python : 'prnt_date_tags')
** 'print_y' (pour python : 'prnt_y')
** 'log_print'
* hooks :
** 'hook_command'
** 'hook_command_run'
** 'hook_timer'
** 'hook_fd'
** 'hook_process'
** 'hook_connect'
** 'hook_print'
** 'hook_signal'
** 'hook_signal_send'
** 'hook_config'
** 'hook_completion'
** 'hook_completion_list_add'
** 'hook_modifier'
** 'hook_modifier_exec'
** 'hook_info'
** 'hook_infolist'
** 'unhook'
** 'unhook_all'
* tampons :
** 'buffer_new'
** 'buffer_search'
** 'current_buffer'
** 'buffer_clear'
** 'buffer_close'
** 'buffer_get_integer'
** 'buffer_get_string'
** 'buffer_get_pointer'
** 'buffer_set'
* fenêtres :
** 'current_window'
** 'window_get_integer'
** 'window_get_string'
** 'window_get_pointer'
** 'window_set_title'
* liste des pseudos :
** 'nicklist_add_group'
** 'nicklist_search_group'
** 'nicklist_add_nick'
** 'nicklist_search_nick'
** 'nicklist_remove_group'
** 'nicklist_remove_nick'
** 'nicklist_remove_all'
* barres :
** 'bar_item_search'
** 'bar_item_new'
** 'bar_item_update'
** 'bar_item_remove'
** 'bar_search'
** 'bar_new'
** 'bar_set'
** 'bar_update'
** 'bar_remove'
* commandes :
** 'command'
* infos :
** 'info_get'
* infolists :
** 'infolist_new'
** 'infolist_new_var_integer'
** 'infolist_new_var_string'
** 'infolist_new_var_pointer'
** 'infolist_new_var_time'
** 'infolist_get'
** 'infolist_next'
** 'infolist_prev'
** 'infolist_fields'
** 'infolist_integer'
** 'infolist_string'
** 'infolist_pointer'
** 'infolist_time'
** 'infolist_free'
* mise à jour :
** 'upgrade_new'
** 'upgrade_write_object'
** 'upgrade_read'
** 'upgrade_close'
Constantes
~~~~~~~~~~
Liste des constantes de l'API script :
* 'WEECHAT_RC_OK'
* 'WEECHAT_RC_OK_EAT'
* 'WEECHAT_RC_ERROR'
* 'WEECHAT_CONFIG_READ_OK'
* 'WEECHAT_CONFIG_READ_MEMORY_ERROR'
* 'WEECHAT_CONFIG_READ_FILE_NOT_FOUND'
* 'WEECHAT_CONFIG_WRITE_OK'
* 'WEECHAT_CONFIG_WRITE_ERROR'
* 'WEECHAT_CONFIG_WRITE_MEMORY_ERROR'
* 'WEECHAT_CONFIG_OPTION_SET_OK_CHANGED'
* 'WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE'
* 'WEECHAT_CONFIG_OPTION_SET_ERROR'
* 'WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_RESET'
* 'WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED'
* 'WEECHAT_CONFIG_OPTION_UNSET_ERROR'
* 'WEECHAT_LIST_POS_SORT'
* 'WEECHAT_LIST_POS_BEGINNING'
* 'WEECHAT_LIST_POS_END'
* 'WEECHAT_HOTLIST_LOW'
* 'WEECHAT_HOTLIST_MESSAGE'
* 'WEECHAT_HOTLIST_PRIVATE'
* 'WEECHAT_HOTLIST_HIGHLIGHT'
* 'WEECHAT_HOOK_PROCESS_RUNNING'
* 'WEECHAT_HOOK_PROCESS_ERROR'
* 'WEECHAT_HOOK_CONNECT_OK'
* 'WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND'
* 'WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND'
* 'WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED'
* 'WEECHAT_HOOK_CONNECT_PROXY_ERROR'
* 'WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR'
* 'WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR'
* 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR'
* 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR'
* 'WEECHAT_HOOK_SIGNAL_STRING'
* 'WEECHAT_HOOK_SIGNAL_INT'
* 'WEECHAT_HOOK_SIGNAL_POINTER'
Différences avec l'API C
~~~~~~~~~~~~~~~~~~~~~~~~
Pointeurs
^^^^^^^^^
Comme vous le savez probablement, il n'y a pas vraiment de "pointeurs" dans les
scripts. Donc quand les fonctions de l'API retournent un pointeur, il est
converti en chaîne pour le script.
Par exemple, si une fonction retourne le pointeur 0x1234ab56, le script recevra
la chaîne "0x1234ab56".
Et quand une fonction de l'API attend un pointeur dans ses paramètres, le
script doit envoyer cette valeur sous forme de chaîne. L'extension C la
convertira en pointeur réel avant d'appeler la fonction de l'API C.
Une chaîne vide ou "0x0" sont autorisées, cela signifie le pointeur NULL en C.
Par exemple, pour afficher un message sur le tampon core (tampon principal
WeeChat), vous pouvez faire :
[source,python]
----------------------------------------
weechat.prnt("", "bonjour !")
----------------------------------------
[WARNING]
Dans beaucoup de fonctions, pour des raisons de vitesse, WeeChat ne vérifie pas
si votre pointeur est correct ou pas. Il est de votre responsabilité de
vérifier que vous donnez un pointeur valide, sinon vous pourriez voir un joli
rapport de crash ;)
Callbacks
^^^^^^^^^
Tous les "callbacks" WeeChat doivent retourner WEECHAT_RC_OK ou
WEECHAT_RC_ERROR (l'exception est le callback du "modifier", qui retourne une
chaîne de caractères).
Les "callbacks" C utilisent un paramètre "data", qui est un pointeur. Dans
l'API script, ce "data" est une chaîne de caractères avec n'importe quelle
valeur (ce n'est pas un pointeur).
Par exemple :
[source,python]
----------------------------------------
weechat.hook_timer(1000, 0, 1, "mon_timer_cb", "mes données")
def mon_timer_cb(data, remaining_calls):
# cela affichera : "mes données"
weechat.prnt("", data)
return weechat.WEECHAT_RC_OK
----------------------------------------
+3 -3
View File
@@ -74,7 +74,7 @@ $ git clone git://git.sv.gnu.org/weechat.git
$ cd weechat
--------------------------------------------
NOTE: Plus tard, vous pourrez utiliser la command "`git pull`" dans ce répertoire
NOTE: Plus tard, vous pourrez utiliser la commande "`git pull`" dans ce répertoire
pour obtenir juste les deltas avec la version d'aujourd'hui.
Sinon vous pouvez installer le paquet 'devel' :
@@ -95,7 +95,7 @@ $ make
$ make install
--------------------------------------------------------------
Si vous n'avez pas cmake, il est toujours possible d'utiliser les autools :
Si vous n'avez pas cmake, il est toujours possible d'utiliser les autotools :
-----------------------------------------------------------------
$ ./autogen.sh # (seulement si vous avez cloné la base git)
@@ -104,7 +104,7 @@ $ make
$ make install
-----------------------------------------------------------------
[[install_binary_pcakcge]]
[[install_binary_package]]
Obtenir un paquet binaire
~~~~~~~~~~~~~~~~~~~~~~~~~
+31 -31
View File
@@ -45,7 +45,7 @@ Pré-requis
Pour installer WeeChat, vous devez avoir :
* un système GNU/Linux (avec le compilateur et les outils associés pour le
paquet des sources), ou un système compatible (voir ci-dessus)
paquet des sources), ou un système compatible
* droits "root" (pour installer WeeChat dans un répertoire système)
* la bibliothèque ncurses
@@ -55,15 +55,15 @@ Installation
------------
[[binary_packages]]
Binary packages
~~~~~~~~~~~~~~~
Paquets binaires
~~~~~~~~~~~~~~~~
Les paquets binaires sont disponibles pour beaucoup de distributions, dont :
* Debian (ou toute distribution compatible Debian) : `apt-get install weechat`
* Mandriva/RedHat (ou toute distribution compatible avec les RPM) :
`rpm -i /path/to/weechat-x.y.z-1.i386.rpm`
* Gentoo: `emerge weechat`
* Gentoo : `emerge weechat`
Des paquets additionnels peuvent être utiles également, comme weechat-plugins.
@@ -123,7 +123,7 @@ $ make install
Sources Git
~~~~~~~~~~~
Attention: les sources GIT sont réservés aux utilisateurs avancés : il se peut
Attention : les sources GIT sont réservés aux utilisateurs avancés : il se peut
que WeeChat ne compile pas et qu'il soit très instable. Vous êtes prévenus !
Pour récupérer les sources GIT, tapez cette commande :
@@ -176,7 +176,7 @@ Paramètres de ligne de commande :
Afficher la version de WeeChat
plugin:option::
Option pour l'extension (voir la doc de chaque extension)
Option pour l'extension (voir la documentation de chaque extension)
Pour lancer WeeChat, tapez cette commande :
@@ -251,7 +251,7 @@ La barre 'status' contient les objets (items) suivants par défaut :
nombre de tampons ouverts
| buffer_plugin | `[irc/freenode]` |
extension du tampon courant (l'extension irc peut affiche le nom du serveur
extension du tampon courant (l'extension irc peut afficher le nom du serveur
IRC auquel est rattaché ce tampon)
| buffer_number | `3` |
@@ -264,7 +264,7 @@ La barre 'status' contient les objets (items) suivants par défaut :
nombre de pseudos dans la liste des pseudos
| buffer_filter | `*` |
indicateur de filtrage: `*` signifie que des lignes sont filtrées (cachées),
indicateur de filtrage : `*` signifie que des lignes sont filtrées (cachées),
une valeur vide signifie que toutes les lignes sont affichées
| lag | `[Lag: 2.5]` |
@@ -409,13 +409,13 @@ Touches pour la ligne de commande
`/input clipboard_paste`
| Tab |
Compléter la commande ou le pseudo (Tab de nouveau: trouver la complétion
Compléter la commande ou le pseudo (Tab de nouveau : trouver la complétion
suivante) +
`/input complete_next`
| Shift + Tab |
Sans complétion, effectue une complétion partielle. Avec une complétion en
cours, complète avec la complétion précécente +
cours, complète avec la complétion précédente +
`/input complete_previous`
| Tout caractère |
@@ -424,16 +424,16 @@ Touches pour la ligne de commande
| Enter +
Ctrl + J +
Ctrl + M |
Exécuter la commande ou envoyer le message (en mode recherche: arrêter la
Exécuter la commande ou envoyer le message (en mode recherche : arrêter la
recherche) +
`/input return`
| Flèche haut |
Rappeler la commande précédente (en mode recherche: chercher plus haut) +
Rappeler la commande précédente (en mode recherche : chercher plus haut) +
`/input history_previous`
| Flèche bas |
Rappeler la commande suivante (en mode recherche: chercher plus bas) +
Rappeler la commande suivante (en mode recherche : chercher plus bas) +
`/input history_next`
| Ctrl + flèche haut |
@@ -595,7 +595,7 @@ Touches pour les tampons / fenêtres
`/window right`
| Alt + Z |
Zoom sur la fenêtre courante (Alt + Z de nouveau: restaurer l'état initial
Zoom sur la fenêtre courante (Alt + Z de nouveau : restaurer l'état initial
des fenêtres, avant le zoom) +
`/window zoom`
@@ -685,7 +685,7 @@ suit et éventuellement une valeur) :
Le même code (sans le numéro pour ^Cc) peut être utilisé pour stopper
l'attribut défini.
Les codes couleur pour ^Cc sont:
Les codes couleur pour ^Cc sont :
[width="20%",cols="^1m,2"]
|========================================
@@ -765,11 +765,11 @@ chargée par WeeChat.
Sous GNU/Linux, ce fichier a une extension ".so", et ".dll" sous Windows.
Les extensions trouvées sont automatiquement chargées par WeeChat lorsqu'il
démarre, et il est posisble de charger et décharger des extensions pendant que
démarre, et il est possible de charger et décharger des extensions pendant que
WeeChat tourne.
Il est important de bien faire la différence entre une 'extension' et un
'script': une 'extension' est un fichier binaire compilé et chargé avec la
'script' : une 'extension' est un fichier binaire compilé et chargé avec la
commande `/plugin`, tandis qu'un 'script' est un fichier texte chargé par une
extension comme 'perl' par la commande `perl`.
@@ -793,7 +793,7 @@ Les extensions par défaut sont :
| Extension | Description
| alias | Définir des alias pour les commandes
| aspell | Vérification orthographique de la ligne de commande
| charset | Eécodage/encodage avec jeu de caractère sur les tampons
| charset | Encodage/encodage avec jeu de caractère sur les tampons
| demo | Extension de démonstration (non compilée par défaut)
| fifo | Tube FIFO pour envoyer des commandes à distance vers WeeChat
| irc | Discussion avec le protocole IRC
@@ -822,7 +822,7 @@ include::autogen/user/alias_commands.txt[]
Extension Aspell
~~~~~~~~~~~~~~~~
L'extension Aspell permet de vérifier l'orghographe de la ligne de commande.
L'extension Aspell permet de vérifier l'orthographe de la ligne de commande.
Il est possible d'utiliser plusieurs langages par tampon.
Options (aspell.conf)
@@ -928,14 +928,14 @@ Pour modifier le jeu de caractères d'un canal IRC (ou d'une conversation
privée), utilisez la même commande que pour le serveur, mais sur le tampon du
canal (ou du privé).
Pour voir tous les jeux de carcatères utilisés, utilisez la commande uivante :
Pour voir tous les jeux de caractères utilisés, utilisez la commande suivante :
----------------------------------------
/set charset.*
----------------------------------------
Troubleshooting
^^^^^^^^^^^^^^^
En cas de problème
^^^^^^^^^^^^^^^^^^
Pour tout problème avec les jeux de caractères, merci de consulter la
'FAQ WeeChat'.
@@ -949,15 +949,15 @@ texte dans un tube FIFO (si l'option 'plugins.var.fifo.fifo' est activée,
elle l'est par défaut).
Le tube FIFO est dans le répertoire '~/.weechat/' et s'appelle
'weechat_fifo_xxxxx' (où 'xxxxx' est l'ID du processus (PID) du WeeChat qui
'weechat_fifo_xxxx' (où 'xxxx' est l'ID du processus (PID) du WeeChat qui
tourne).
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO est une
des suivantes :
........................................
plugin.buffer *text or command here
*text or command here
plugin.buffer *texte ou commande ici
*texte ou commande ici
........................................
Quelques exemples :
@@ -1074,10 +1074,10 @@ signifie "enregistrer tous les messages".
Les extensions utilisent différent niveaux pour les messages affichés.
L'extension IRC utilise les niveaux suivants :
* niveau 1: message d'un utilisateur (sur un canal ou en privé)
* niveau 2: changement de pseudo (vous ou quelqu'un d'autre)
* niveau 3: tout message du serveur (sauf join/part/quit)
* niveau 4: message join/part/quit du serveur
* niveau 1 : message d'un utilisateur (sur un canal ou en privé)
* niveau 2 : changement de pseudo (vous ou quelqu'un d'autre)
* niveau 3 : tout message du serveur (sauf join/part/quit)
* niveau 4 : message join/part/quit du serveur
Donc si vous affectez le niveau 3 pour un canal IRC, WeeChat enregistrera
tous les messages sauf les join/part/quit.
@@ -1111,7 +1111,7 @@ Quelques exemples :
Masques de noms de fichiers
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Il est posible de définir un masque de nom de fichier pour chaque tampon, et
Il est possible de définir un masque de nom de fichier pour chaque tampon, et
d'utiliser les variables locales du tampon pour construire le nom de fichier.
Pour voir les variables du tampon courant :
@@ -1146,7 +1146,7 @@ Vous obtiendrez les fichiers suivants :
Extensions Scripts
~~~~~~~~~~~~~~~~~~
WeeChat fournit 5 extensions pour scripts: Perl, Python, Ruby, Lua and Tcl.
WeeChat fournit 5 extensions pour scripts : Perl, Python, Ruby, Lua and Tcl.
Ces extensions peuvent charger, exécuter et décharger des scripts pour ces
langages.
+11 -10
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3766,7 +3766,12 @@ msgstr "získat lokální čas ze serveru"
msgid "merge server buffers"
msgstr "řídit buffery"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
#, fuzzy
msgid "open new privates near server"
msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
msgid "text to display before nick in chat window"
@@ -3848,6 +3853,10 @@ msgstr "barva přezdívek"
msgid "color for away item"
msgstr "barva přezdívek, které jsou pryč"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "barva kanálu v akcích"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -5697,10 +5706,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "pužít stejný buffer pro všechny servery"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "otevřít nový kanál/soukromý rozhovor poblíž serveru"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "chytré doplňování přezdívek (doplňovat posledně mluvící jako první)"
@@ -6217,10 +6222,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n"
#~ msgid "text color for server name in input line"
#~ msgstr "barva pro jeméno serveru"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "barva kanálu v akcích"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "barva děličů v infobaru"
+11 -11
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3743,7 +3743,12 @@ msgstr "Ortszeit des Servers abfragen"
msgid "merge server buffers"
msgstr "Puffer verwalten"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
#, fuzzy
msgid "open new privates near server"
msgstr "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
msgid "text to display before nick in chat window"
@@ -3826,6 +3831,10 @@ msgstr "Farbe von Nicknames"
msgid "color for away item"
msgstr "Farbe von abwesenden Nicknames"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "Farbe der Channelnamen in ACTIONs"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -5636,11 +5645,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "benutze den gleichen Puffer für alle Server"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr ""
#~ "öffne neue Channels oder private Nachrichten neben dem Server-Puffer"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr ""
#~ "Intelligente vervollständigung der Nicknamen (vervollständigt zuerst mit "
@@ -6108,10 +6112,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#~ msgid "text color for server name in input line"
#~ msgstr "Farbe des Servernamens"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "Farbe der Channelnamen in ACTIONs"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "Farbe der Infobar-Trennzeichen"
+11 -10
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3732,7 +3732,12 @@ msgstr "pedir la hora local del servidor"
msgid "merge server buffers"
msgstr "gestionar los búfers"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "abrir nuevos canales/privados cerca del servidor"
#, fuzzy
msgid "open new privates near server"
msgstr "abrir nuevos canales/privados cerca del servidor"
msgid "text to display before nick in chat window"
@@ -3812,6 +3817,10 @@ msgstr "color para los nombres de usuario"
msgid "color for away item"
msgstr "color para los usuarios ausentes"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "color para los nombres de canal en las acciones"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -5629,10 +5638,6 @@ msgstr "%s falta un argumento para la opción --dir\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "usar el mismo búfer para todos los servidores"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "abrir nuevos canales/privados cerca del servidor"
#, fuzzy
#~ msgid ""
#~ "default part message (leaving MUC) ('%v' will be replaced by WeeChat "
@@ -6087,10 +6092,6 @@ msgstr "%s falta un argumento para la opción --dir\n"
#~ msgid "text color for server name in input line"
#~ msgstr "color para el nombre del servidor"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "color para los nombres de canal en las acciones"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "color para los delimitadores de la barra de información"
+10 -4
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"PO-Revision-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-06-25 10:20+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -3904,8 +3904,11 @@ msgstr "utiliser la couleur du pseudo dans les messages du serveur"
msgid "merge server buffers"
msgstr "mélange des tampons de serveur"
msgid "open new channels/privates near server"
msgstr "ouvrir les nouveaux canaux/privés près du serveur"
msgid "open new channels near server"
msgstr "ouvrir les nouveaux canaux près du serveur"
msgid "open new privates near server"
msgstr "ouvrir les nouveaux privés près du serveur"
msgid "text to display before nick in chat window"
msgstr "texte à afficher avant le pseudo dans la fenêtre de discussion"
@@ -3994,6 +3997,9 @@ msgstr "couleur du pseudo dans la barre de saisie"
msgid "color for away item"
msgstr "couleur pour l'objet away"
msgid "color for channel modes, near channel name"
msgstr "couleur pour les modes du canal, à côté du nom du canal"
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
+11 -10
View File
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3781,7 +3781,12 @@ msgstr "helyi idő lekérdezése a szerverről"
msgid "merge server buffers"
msgstr "pufferek kezelése"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
#, fuzzy
msgid "open new privates near server"
msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
msgid "text to display before nick in chat window"
@@ -3861,6 +3866,10 @@ msgstr "nevek színe"
msgid "color for away item"
msgstr "távollevő felhasználók nevének színe"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "szobanevek színe az eseményekben"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -5687,10 +5696,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "ugyanazon puffer használata minden szerverhez"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "az új szobák/privát beszélgetések a szerverhez közel nyíljanak"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "okos névkiegészítés (először az utolsó partnerre egészít ki)"
@@ -6153,10 +6158,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "text color for server name in input line"
#~ msgstr "szerver nevének színe"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "szobanevek színe az eseményekben"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "információs pult határolóinak színe"
+8 -2
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: <soltys@szluug.org>\n"
"Language-Team: Polish\n"
@@ -3243,7 +3243,10 @@ msgstr ""
msgid "merge server buffers"
msgstr ""
msgid "open new channels/privates near server"
msgid "open new channels near server"
msgstr ""
msgid "open new privates near server"
msgstr ""
msgid "text to display before nick in chat window"
@@ -3316,6 +3319,9 @@ msgstr ""
msgid "color for away item"
msgstr ""
msgid "color for channel modes, near channel name"
msgstr ""
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
+11 -10
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+0200\n"
"PO-Revision-Date: 2009-05-11 13:02+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3773,7 +3773,12 @@ msgstr "запросить местное время сервера"
msgid "merge server buffers"
msgstr "управление буферами"
msgid "open new channels/privates near server"
#, fuzzy
msgid "open new channels near server"
msgstr "открывать новые каналы/приваты рядом с сервером"
#, fuzzy
msgid "open new privates near server"
msgstr "открывать новые каналы/приваты рядом с сервером"
msgid "text to display before nick in chat window"
@@ -3853,6 +3858,10 @@ msgstr "цвет ников"
msgid "color for away item"
msgstr "цвет отошедших ников"
#, fuzzy
msgid "color for channel modes, near channel name"
msgstr "цвет имён при действиях"
#, fuzzy
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
@@ -5661,10 +5670,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "use same buffer for all servers"
#~ msgstr "один буфер для всех серверов"
#, fuzzy
#~ msgid "open new MUCs/privates near server"
#~ msgstr "открывать новые каналы/приваты рядом с сервером"
#~ msgid "smart completion for nicks (completes with last speakers first)"
#~ msgstr "умное дополнение ников (начинает перебор с последних собеседников)"
@@ -6123,10 +6128,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "text color for server name in input line"
#~ msgstr "цвет названия сервера"
#, fuzzy
#~ msgid "text color for channel name in input line"
#~ msgstr "цвет имён при действиях"
#, fuzzy
#~ msgid "text color for delimiters in input line"
#~ msgstr "цвет разделителей информационной панели"
+8 -2
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: 2009-06-17 11:10+0200\n"
"POT-Creation-Date: 2009-06-25 10:20+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"
@@ -3210,7 +3210,10 @@ msgstr ""
msgid "merge server buffers"
msgstr ""
msgid "open new channels/privates near server"
msgid "open new channels near server"
msgstr ""
msgid "open new privates near server"
msgstr ""
msgid "text to display before nick in chat window"
@@ -3283,6 +3286,9 @@ msgstr ""
msgid "color for away item"
msgstr ""
msgid "color for channel modes, near channel name"
msgstr ""
msgid ""
"default part message (leaving channel) (\"%v\" will be replaced by WeeChat "
"version in string)"
+1 -1
View File
@@ -1490,7 +1490,7 @@ command_help (void *data, struct t_gui_buffer *buffer,
GUI_COLOR(GUI_COLOR_CHAT));
gui_chat_printf (NULL, " %s: %s",
_("description"),
_(ptr_option->description));
(ptr_option->description) ? _(ptr_option->description) : "");
switch (ptr_option->type)
{
case CONFIG_OPTION_TYPE_BOOLEAN:
+6 -6
View File
@@ -453,9 +453,9 @@ config_file_new_option (struct t_config_file *config_file,
case CONFIG_OPTION_TYPE_INTEGER:
if (string_values && string_values[0])
{
new_option->string_values = string_explode (string_values,
"|", 0, 0,
&argc);
new_option->string_values = string_split (string_values,
"|", 0, 0,
&argc);
if (!new_option->string_values)
goto error;
}
@@ -2291,7 +2291,7 @@ config_file_option_free_data (struct t_config_option *option)
if (option->description)
free (option->description);
if (option->string_values)
string_free_exploded (option->string_values);
string_free_split (option->string_values);
if (option->default_value)
free (option->default_value);
if (option->value)
@@ -2557,8 +2557,8 @@ config_file_add_to_infolist (struct t_infolist *infolist,
free (option_full_name);
return 0;
}
string_values = string_build_with_exploded ((const char **)ptr_option->string_values,
"|");
string_values = string_build_with_split_string ((const char **)ptr_option->string_values,
"|");
if (!infolist_new_var_string (ptr_item,
"string_values",
string_values))
+9 -9
View File
@@ -760,7 +760,7 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
{
if (string_strcasecmp (option_name, "buffer") == 0)
{
argv = string_explode (value, ";", 0, 0, &argc);
argv = string_split (value, ";", 0, 0, &argc);
if (argv)
{
if (argc >= 3)
@@ -774,12 +774,12 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
argv[0], argv[1], number1);
}
}
string_free_exploded (argv);
string_free_split (argv);
}
}
else if (string_strcasecmp (option_name, "window") == 0)
{
argv = string_explode (value, ";", 0, 0, &argc);
argv = string_split (value, ";", 0, 0, &argc);
if (argv)
{
if (argc >= 6)
@@ -808,7 +808,7 @@ config_weechat_layout_read_cb (void *data, struct t_config_file *config_file,
argv[5] : NULL);
}
}
string_free_exploded (argv);
string_free_split (argv);
}
}
}
@@ -1035,17 +1035,17 @@ config_weechat_filter_read_cb (void *data,
if (option_name && value && value[0])
{
argv = string_explode (value, ";", 0, 0, &argc);
argv_eol = string_explode (value, ";", 1, 0, NULL);
argv = string_split (value, ";", 0, 0, &argc);
argv_eol = string_split (value, ";", 1, 0, NULL);
if (argv && argv_eol && (argc >= 4))
{
gui_filter_new ((string_strcasecmp (argv[0], "on") == 0) ? 1 : 0,
option_name, argv[1], argv[2], argv_eol[3]);
}
if (argv)
string_free_exploded (argv);
string_free_split (argv);
if (argv_eol)
string_free_exploded (argv_eol);
string_free_split (argv_eol);
}
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
@@ -1397,7 +1397,7 @@ config_weechat_init_options ()
weechat_config_file, ptr_section,
"save_layout_on_exit", "integer",
N_("save layout on exit (buffers, windows, or both)"),
"none|buffers|windows|all", 0, 0, "all", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
"none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_scroll_amount = config_file_new_option (
weechat_config_file, ptr_section,
"scroll_amount", "integer",
+29 -14
View File
@@ -426,9 +426,9 @@ hook_command_build_completion (struct t_hook_command *hook_command)
hook_command->cplt_templates_static[i] = strdup (hook_command->cplt_templates[i]);
/* build arguments for each template */
hook_command->cplt_template_args[i] = string_explode (hook_command->cplt_templates[i],
" ", 0, 0,
&(hook_command->cplt_template_num_args[i]));
hook_command->cplt_template_args[i] = string_split (hook_command->cplt_templates[i],
" ", 0, 0,
&(hook_command->cplt_template_num_args[i]));
if (hook_command->cplt_template_num_args[i] > hook_command->cplt_template_num_args_concat)
hook_command->cplt_template_num_args_concat = hook_command->cplt_template_num_args[i];
}
@@ -464,8 +464,8 @@ hook_command_build_completion (struct t_hook_command *hook_command)
{
if (i < hook_command->cplt_template_num_args[j])
{
items = string_explode (hook_command->cplt_template_args[j][i],
"|", 0, 0, &num_items);
items = string_split (hook_command->cplt_template_args[j][i],
"|", 0, 0, &num_items);
for (k = 0; k < num_items; k++)
{
if (!weelist_search (list, items[k]))
@@ -478,11 +478,12 @@ hook_command_build_completion (struct t_hook_command *hook_command)
NULL);
}
}
string_free_exploded (items);
string_free_split (items);
}
}
}
}
weelist_free (list);
}
}
@@ -583,13 +584,13 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
rc = -1;
argv = string_explode (string, " ", 0, 0, &argc);
argv = string_split (string, " ", 0, 0, &argc);
if (argc == 0)
{
string_free_exploded (argv);
string_free_split (argv);
return -1;
}
argv_eol = string_explode (string, " ", 1, 0, NULL);
argv_eol = string_split (string, " ", 1, 0, NULL);
hook_exec_start ();
@@ -659,8 +660,8 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
}
}
string_free_exploded (argv);
string_free_exploded (argv_eol);
string_free_split (argv);
string_free_split (argv_eol);
hook_exec_end ();
@@ -1515,8 +1516,8 @@ hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer,
new_hook_print->buffer = buffer;
if (tags)
{
new_hook_print->tags_array = string_explode (tags, ",", 0, 0,
&new_hook_print->tags_count);
new_hook_print->tags_array = string_split (tags, ",", 0, 0,
&new_hook_print->tags_count);
}
else
{
@@ -2172,12 +2173,26 @@ unhook (struct t_hook *hook)
free (HOOK_COMMAND(hook, cplt_templates)[i]);
if (HOOK_COMMAND(hook, cplt_templates_static)[i])
free (HOOK_COMMAND(hook, cplt_templates_static)[i]);
string_free_exploded (HOOK_COMMAND(hook, cplt_template_args)[i]);
string_free_split (HOOK_COMMAND(hook, cplt_template_args)[i]);
}
free (HOOK_COMMAND(hook, cplt_templates));
}
if (HOOK_COMMAND(hook, cplt_templates_static))
free (HOOK_COMMAND(hook, cplt_templates_static));
if (HOOK_COMMAND(hook, cplt_template_num_args))
free (HOOK_COMMAND(hook, cplt_template_num_args));
if (HOOK_COMMAND(hook, cplt_template_args))
free (HOOK_COMMAND(hook, cplt_template_args));
if (HOOK_COMMAND(hook, cplt_template_args_concat))
{
for (i = 0;
i < HOOK_COMMAND(hook, cplt_template_num_args_concat);
i++)
{
free (HOOK_COMMAND(hook, cplt_template_args_concat[i]));
}
free (HOOK_COMMAND(hook, cplt_template_args_concat));
}
break;
case HOOK_TYPE_COMMAND_RUN:
if (HOOK_COMMAND_RUN(hook, command))
+31 -29
View File
@@ -727,23 +727,23 @@ string_mask_to_regex (const char *mask)
}
/*
* string_explode: explode a string according to separators
* examples:
* string_explode ("abc de fghi", " ", 0, 0, NULL)
* ==> array[0] = "abc"
* array[1] = "de"
* array[2] = "fghi"
* array[3] = NULL
* string_explode ("abc de fghi", " ", 1, 0, NULL)
* ==> array[0] = "abc de fghi"
* array[1] = "de fghi"
* array[2] = "fghi"
* array[3] = NULL
* string_split: split a string according to separators
* examples:
* string_split ("abc de fghi", " ", 0, 0, NULL)
* ==> array[0] = "abc"
* array[1] = "de"
* array[2] = "fghi"
* array[3] = NULL
* string_split ("abc de fghi", " ", 1, 0, NULL)
* ==> array[0] = "abc de fghi"
* array[1] = "de fghi"
* array[2] = "fghi"
* array[3] = NULL
*/
char **
string_explode (const char *string, const char *separators, int keep_eol,
int num_items_max, int *num_items)
string_split (const char *string, const char *separators, int keep_eol,
int num_items_max, int *num_items)
{
int i, j, n_items;
char *string2, **array;
@@ -867,42 +867,44 @@ string_explode (const char *string, const char *separators, int keep_eol,
}
/*
* string_free_exploded: free an exploded string
* string_free_split: free a split string
*/
void
string_free_exploded (char **exploded_string)
string_free_split (char **split_string)
{
int i;
if (exploded_string)
if (split_string)
{
for (i = 0; exploded_string[i]; i++)
free (exploded_string[i]);
free (exploded_string);
for (i = 0; split_string[i]; i++)
free (split_string[i]);
free (split_string);
}
}
/*
* string_build_with_exploded: build a string with exploded string
* note: returned value has to be free() after use
* string_build_with_split_string: build a string with a split string
* note: returned value has to be free() after
* use
*/
char *
string_build_with_exploded (const char **exploded_string, const char *separator)
string_build_with_split_string (const char **split_string,
const char *separator)
{
int i, length, length_separator;
char *result;
if (!exploded_string)
if (!split_string)
return NULL;
length = 0;
length_separator = (separator) ? strlen (separator) : 0;
for (i = 0; exploded_string[i]; i++)
for (i = 0; split_string[i]; i++)
{
length += strlen (exploded_string[i]) + length_separator;
length += strlen (split_string[i]) + length_separator;
}
result = malloc (length + 1);
@@ -910,10 +912,10 @@ string_build_with_exploded (const char **exploded_string, const char *separator)
{
result[0] = '\0';
for (i = 0; exploded_string[i]; i++)
for (i = 0; split_string[i]; i++)
{
strcat (result, exploded_string[i]);
if (separator && exploded_string[i + 1])
strcat (result, split_string[i]);
if (separator && split_string[i + 1])
strcat (result, separator);
}
}
+5 -5
View File
@@ -42,11 +42,11 @@ extern char *string_convert_hex_chars (const char *string);
extern int string_has_highlight (const char *string,
const char *highlight_words);
extern char *string_mask_to_regex (const char *mask);
extern char **string_explode (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_exploded (char **exploded_string);
extern char *string_build_with_exploded (const char **exploded_string,
const char *separator);
extern char **string_split (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_split (char **split_string);
extern char *string_build_with_split_string (const char **split_string,
const char *separator);
extern char **string_split_command (const char *command, char separator);
extern void string_free_split_command (char **split_command);
extern char *string_iconv (int from_utf8, const char *from_code,
+2 -2
View File
@@ -263,7 +263,7 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id,
fields = infolist_fields (infolist);
if (fields)
{
argv = string_explode (fields, ",", 0, 0, &argc);
argv = string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (i = 0; i < argc; i++)
@@ -372,7 +372,7 @@ upgrade_file_write_object (struct t_upgrade_file *upgrade_file, int object_id,
}
}
if (argv)
string_free_exploded (argv);
string_free_split (argv);
}
/* write object end */
+24 -11
View File
@@ -458,19 +458,32 @@ upgrade_weechat_read_cb (void *data,
/* add line to current buffer */
if (upgrade_current_buffer)
{
new_line = gui_line_add (
upgrade_current_buffer,
infolist_time (infolist, "date"),
infolist_time (infolist, "date_printed"),
infolist_string (infolist, "tags"),
infolist_string (infolist, "prefix"),
infolist_string (infolist, "message"));
if (new_line)
switch (upgrade_current_buffer->type)
{
new_line->data->highlight = infolist_integer (infolist, "highlight");
case GUI_BUFFER_TYPE_FORMATTED:
new_line = gui_line_add (
upgrade_current_buffer,
infolist_time (infolist, "date"),
infolist_time (infolist, "date_printed"),
infolist_string (infolist, "tags"),
infolist_string (infolist, "prefix"),
infolist_string (infolist, "message"));
if (new_line)
{
new_line->data->highlight = infolist_integer (infolist, "highlight");
if (infolist_integer (infolist, "last_read_line"))
upgrade_current_buffer->lines->last_read_line = new_line;
}
break;
case GUI_BUFFER_TYPE_FREE:
gui_line_add_y (
upgrade_current_buffer,
infolist_integer (infolist, "y"),
infolist_string (infolist, "message"));
break;
case GUI_BUFFER_NUM_TYPES:
break;
}
if (infolist_integer (infolist, "last_read_line"))
upgrade_current_buffer->lines->last_read_line = new_line;
}
break;
case UPGRADE_WEECHAT_TYPE_NICKLIST:
+4 -4
View File
@@ -562,17 +562,17 @@ utf8_pos (const char *string, int real_pos)
*/
char *
utf8_strndup (const char *string, int max_chars)
utf8_strndup (const char *string, int length)
{
const char *end;
if (!string || (max_chars < 0))
if (!string || (length < 0))
return NULL;
if (max_chars == 0)
if (length == 0)
return strdup ("");
end = utf8_add_offset (string, max_chars);
end = utf8_add_offset (string, length);
if (!end || (end == string))
return strdup (string);
+1 -1
View File
@@ -50,6 +50,6 @@ extern int utf8_char_size_screen (const char *string);
extern char *utf8_add_offset (const char *string, int offset);
extern int utf8_real_pos (const char *string, int pos);
extern int utf8_pos (const char *string, int real_pos);
extern char *utf8_strndup (const char *string, int max_chars);
extern char *utf8_strndup (const char *string, int length);
#endif /* wee-utf8.h */
+3 -3
View File
@@ -430,7 +430,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
content = gui_bar_window_content_get_with_filling (bar_window, window);
if (content)
{
items = string_explode (content, "\n", 0, 0, &items_count);
items = string_split (content, "\n", 0, 0, &items_count);
if (items_count == 0)
{
if (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_SIZE]) == 0)
@@ -495,7 +495,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
y = 0;
some_data_not_displayed = 0;
if ((bar_window->scroll_y > 0)
&& (bar_window->scroll_y >= items_count))
&& (bar_window->scroll_y > items_count - bar_window->height))
{
bar_window->scroll_y = items_count - bar_window->height;
if (bar_window->scroll_y < 0)
@@ -594,7 +594,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
}
}
if (items)
string_free_exploded (items);
string_free_split (items);
free (content);
}
else
+5 -4
View File
@@ -128,7 +128,7 @@ gui_chat_display_new_line (struct t_gui_window *window, int num_lines, int count
void
gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
{
int i;
int i, n;
if (!simulate)
{
@@ -140,15 +140,16 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x,
ACS_HLINE,
window->win_chat_width);
window->win_chat_width - 1);
break;
case CONFIG_LOOK_READ_MARKER_DOTTED_LINE:
wmove (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x);
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
for (i = 0; i < window->win_chat_width; i++)
n = (window->win_chat_width % 2);
for (i = 0; i < window->win_chat_width - 1; i++)
{
if (i % 2 != 0)
if (i % 2 == n)
mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, i,
ACS_HLINE, 1);
+11 -5
View File
@@ -1044,11 +1044,17 @@ gui_bar_item_default_completion (void *data, struct t_gui_bar_item *item,
/* make C compiler happy */
(void) data;
(void) item;
(void) window;
if (!window)
window = gui_current_window;
if (!window->buffer->completion
|| !window->buffer->completion->partial_completion_list)
return NULL;
length = 1;
for (ptr_item = gui_completion_partial_list; ptr_item;
ptr_item = ptr_item->next_item)
for (ptr_item = window->buffer->completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
length += strlen (ptr_item->word) + 32;
}
@@ -1057,8 +1063,8 @@ gui_bar_item_default_completion (void *data, struct t_gui_bar_item *item,
if (buf)
{
buf[0] = '\0';
for (ptr_item = gui_completion_partial_list; ptr_item;
ptr_item = ptr_item->next_item)
for (ptr_item = window->buffer->completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
strcat (buf, GUI_COLOR_CUSTOM_BAR_FG);
strcat (buf, ptr_item->word);
+3 -3
View File
@@ -546,8 +546,8 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
i, sub);
if (ptr_content && ptr_content[0])
{
split_items[i][sub] = string_explode (ptr_content,
"\n", 0, 0, NULL);
split_items[i][sub] = string_split (ptr_content,
"\n", 0, 0, NULL);
for (j = 0; split_items[i][sub][j]; j++)
{
total_items++;
@@ -665,7 +665,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
for (sub = 0; sub < bar_window->items_subcount[i]; sub++)
{
if (split_items[i][sub])
string_free_exploded (split_items[i][sub]);
string_free_split (split_items[i][sub]);
}
free (split_items[i]);
}
+65 -146
View File
@@ -29,6 +29,7 @@
#include "../core/weechat.h"
#include "../core/wee-config.h"
#include "../core/wee-hook.h"
#include "../core/wee-infolist.h"
#include "../core/wee-log.h"
#include "../core/wee-string.h"
@@ -406,8 +407,10 @@ int
gui_bar_check_conditions_for_window (struct t_gui_bar *bar,
struct t_gui_window *window)
{
int i;
int i, rc;
char str_modifier[256], str_window[128], *str_displayed;
/* check bar conditions */
for (i = 0; i < bar->conditions_count; i++)
{
if (string_strcasecmp (bar->conditions_array[i], "active") == 0)
@@ -427,7 +430,26 @@ gui_bar_check_conditions_for_window (struct t_gui_bar *bar,
}
}
return 1;
/* call a modifier that will tell us if bar is displayed or not,
for example it can be used to display nicklist on some buffers
only, using a script that implements this modifier and return "1"
to display bar, "0" to hide it */
snprintf (str_modifier, sizeof (str_modifier),
"bar_condition_%s", bar->name);
snprintf (str_window, sizeof (str_window),
"0x%lx", (long unsigned int)(window));
str_displayed = hook_modifier_exec (NULL,
str_modifier,
str_window,
"");
if (str_displayed && strcmp (str_displayed, "0") == 0)
rc = 0;
else
rc = 1;
if (str_displayed)
free (str_displayed);
return rc;
}
/*
@@ -659,7 +681,7 @@ gui_bar_free_items_array (struct t_gui_bar *bar)
for (i = 0; i < bar->items_count; i++)
{
if (bar->items_array[i])
string_free_exploded (bar->items_array[i]);
string_free_split (bar->items_array[i]);
}
if (bar->items_array)
{
@@ -688,7 +710,7 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
if (items && items[0])
{
tmp_array = string_explode (items, ",", 0, 0, &count);
tmp_array = string_split (items, ",", 0, 0, &count);
if (count > 0)
{
bar->items_count = count;
@@ -696,11 +718,11 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
bar->items_array = malloc (count * sizeof (*bar->items_array));
for (i = 0; i < count; i++)
{
bar->items_array[i] = string_explode (tmp_array[i], "+", 0, 0,
&(bar->items_subcount[i]));
bar->items_array[i] = string_split (tmp_array[i], "+", 0, 0,
&(bar->items_subcount[i]));
}
}
string_free_exploded (tmp_array);
string_free_split (tmp_array);
}
}
@@ -834,14 +856,14 @@ gui_bar_config_change_conditions (void *data, struct t_config_option *option)
if (ptr_bar)
{
if (ptr_bar->conditions_array)
string_free_exploded (ptr_bar->conditions_array);
string_free_split (ptr_bar->conditions_array);
if (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS])
&& CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS])[0])
{
ptr_bar->conditions_array = string_explode (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS]),
",", 0, 0,
&ptr_bar->conditions_count);
ptr_bar->conditions_array = string_split (CONFIG_STRING(ptr_bar->options[GUI_BAR_OPTION_CONDITIONS]),
",", 0, 0,
&ptr_bar->conditions_count);
}
else
{
@@ -970,9 +992,10 @@ gui_bar_config_change_size (void *data, struct t_config_option *option)
(void) data;
ptr_bar = gui_bar_search_with_option_name (option->name);
if (ptr_bar)
if (ptr_bar && !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
gui_bar_apply_current_size (ptr_bar);
gui_bar_refresh (ptr_bar);
}
}
@@ -983,11 +1006,26 @@ gui_bar_config_change_size (void *data, struct t_config_option *option)
void
gui_bar_config_change_size_max (void *data, struct t_config_option *option)
{
struct t_gui_bar *ptr_bar;
char value[32];
/* make C compiler happy */
(void) data;
(void) option;
gui_window_ask_refresh (1);
ptr_bar = gui_bar_search_with_option_name (option->name);
if (ptr_bar && !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX]) > 0)
&& (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE]) >
CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX])))
{
snprintf (value, sizeof (value), "%d",
CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_SIZE_MAX]));
config_file_option_set (ptr_bar->options[GUI_BAR_OPTION_SIZE], value, 1);
}
gui_window_ask_refresh (1);
}
}
/*
@@ -1103,123 +1141,6 @@ gui_bar_set_name (struct t_gui_bar *bar, const char *name)
}
}
/*
* gui_bar_set_priority: set priority for a bar
*/
void
gui_bar_set_priority (struct t_gui_bar *bar, const char *priority)
{
long number;
char *error;
error = NULL;
number = strtol (priority, &error, 10);
if (error && !error[0])
{
if (number < 0)
number = 0;
/* bar number is already ok? */
if (number == CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_PRIORITY]))
return;
config_file_option_set (bar->options[GUI_BAR_OPTION_PRIORITY], priority, 1);
}
}
/*
* gui_bar_set_position: set position for a bar
*/
void
gui_bar_set_position (struct t_gui_bar *bar, const char *position)
{
int position_value;
if (!position || !position[0])
return;
position_value = gui_bar_search_position (position);
if ((position_value >= 0)
&& (CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_POSITION]) != position_value))
{
config_file_option_set (bar->options[GUI_BAR_OPTION_POSITION], position, 1);
}
}
/*
* gui_bar_set_size: set size for a bar
*/
void
gui_bar_set_size (struct t_gui_bar *bar, const char *size)
{
long number;
char *error, value[32];
int new_size;
error = NULL;
number = strtol (((size[0] == '+') || (size[0] == '-')) ?
size + 1 : size,
&error,
10);
if (error && !error[0])
{
new_size = number;
if (size[0] == '+')
new_size = CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) + new_size;
else if (value[0] == '-')
new_size = CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) - new_size;
if ((size[0] == '-') && (new_size < 1))
return;
if (new_size < 0)
return;
/* check if new size is ok if it's more than before */
if ((new_size != 0) &&
((CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) == 0)
|| (new_size > CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]))))
{
if (!gui_bar_check_size_add (bar,
new_size - CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE])))
return;
}
snprintf (value, sizeof (value), "%d", new_size);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE], value, 1);
gui_bar_apply_current_size (bar);
}
}
/*
* gui_bar_set_size_max: set max size for a bar
*/
void
gui_bar_set_size_max (struct t_gui_bar *bar, const char *size)
{
long number;
char *error, value[32];
error = NULL;
number = strtol (size, &error, 10);
if (error && !error[0])
{
if (number < 0)
return;
snprintf (value, sizeof (value), "%ld", number);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE_MAX], value, 1);
if ((number > 0) &&
((CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]) == 0)
|| (number < CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_SIZE]))))
gui_bar_set_size (bar, value);
}
}
/*
* gui_bar_set: set a property for a bar
* return: 1 if ok, 0 if error
@@ -1243,7 +1164,7 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "priority") == 0)
{
gui_bar_set_priority (bar, value);
config_file_option_set (bar->options[GUI_BAR_OPTION_PRIORITY], value, 1);
return 1;
}
else if (string_strcasecmp (property, "conditions") == 0)
@@ -1253,7 +1174,7 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "position") == 0)
{
gui_bar_set_position (bar, value);
config_file_option_set (bar->options[GUI_BAR_OPTION_POSITION], value, 1);
return 1;
}
else if (string_strcasecmp (property, "filling_top_bottom") == 0)
@@ -1268,14 +1189,12 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value)
}
else if (string_strcasecmp (property, "size") == 0)
{
gui_bar_set_size (bar, value);
gui_bar_refresh (bar);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE], value, 1);
return 1;
}
else if (string_strcasecmp (property, "size_max") == 0)
{
gui_bar_set_size_max (bar, value);
gui_bar_refresh (bar);
config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE_MAX], value, 1);
return 1;
}
else if (string_strcasecmp (property, "color_fg") == 0)
@@ -1604,9 +1523,9 @@ gui_bar_new_with_options (const char *name,
new_bar->options[GUI_BAR_OPTION_CONDITIONS] = conditions;
if (CONFIG_STRING(conditions) && CONFIG_STRING(conditions)[0])
{
new_bar->conditions_array = string_explode (CONFIG_STRING(conditions),
",", 0, 0,
&new_bar->conditions_count);
new_bar->conditions_array = string_split (CONFIG_STRING(conditions),
",", 0, 0,
&new_bar->conditions_count);
}
else
{
@@ -1875,23 +1794,23 @@ gui_bar_create_default_input ()
{
/* create input bar */
length = 1 /* "[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE])
+ 3 /* "],[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PROMPT])
+ 3 /* "]+(" */
+ 4 /* "away" */
+ 3 /* "),[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_SEARCH])
+ 3 /* "],[" */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE])
+ 2 /* "]," */
+ strlen (gui_bar_item_names[GUI_BAR_ITEM_INPUT_TEXT])
+ 1 /* \0 */;
buf = malloc (length);
if (buf)
{
snprintf (buf, length, "[%s],[%s]+(away),[%s],%s",
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE],
snprintf (buf, length, "[%s]+(away),[%s],[%s],%s",
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PROMPT],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_SEARCH],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_PASTE],
gui_bar_item_names[GUI_BAR_ITEM_INPUT_TEXT]);
if (gui_bar_new (GUI_BAR_DEFAULT_NAME_INPUT,
"0", /* hidden */
@@ -2246,7 +2165,7 @@ gui_bar_free (struct t_gui_bar *bar)
config_file_option_free (bar->options[i]);
}
if (bar->conditions_array)
string_free_exploded (bar->conditions_array);
string_free_split (bar->conditions_array);
gui_bar_free_items_array (bar);
free (bar);
+2 -2
View File
@@ -85,10 +85,10 @@ struct t_gui_bar
/* internal vars */
int conditions_count; /* number of conditions */
char **conditions_array; /* exploded bar conditions */
char **conditions_array; /* bar conditions (after split) */
int items_count; /* number of bar items */
int *items_subcount; /* number of sub items */
char ***items_array; /* exploded bar items */
char ***items_array; /* bar items (after split) */
struct t_gui_bar_window *bar_window; /* pointer to bar window */
/* (for type root only) */
int bar_refresh_needed; /* refresh for bar is needed? */
+25 -12
View File
@@ -872,16 +872,16 @@ gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer,
if (buffer->highlight_tags)
free (buffer->highlight_tags);
if (buffer->highlight_tags_array)
string_free_exploded (buffer->highlight_tags_array);
string_free_split (buffer->highlight_tags_array);
if (new_highlight_tags)
{
buffer->highlight_tags = strdup (new_highlight_tags);
if (buffer->highlight_tags)
{
buffer->highlight_tags_array = string_explode (new_highlight_tags,
",", 0, 0,
&buffer->highlight_tags_count);
buffer->highlight_tags_array = string_split (new_highlight_tags,
",", 0, 0,
&buffer->highlight_tags_count);
}
}
else
@@ -981,6 +981,13 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
if (error && !error[0])
buffer->print_hooks_enabled = (number) ? 1 : 0;
}
else if (string_strcasecmp (property, "number") == 0)
{
error = NULL;
number = strtol (value, &error, 10);
if (error && !error[0] && (number >= 1))
gui_buffer_move_to_number (buffer, number);
}
else if (string_strcasecmp (property, "name") == 0)
{
gui_buffer_set_name (buffer, value);
@@ -1515,6 +1522,10 @@ gui_buffer_close (struct t_gui_buffer *buffer)
/* free all lines */
gui_line_free_all (buffer);
if (buffer->own_lines)
free (buffer->own_lines);
if (buffer->mixed_lines)
free (buffer->mixed_lines);
/* free some data */
if (buffer->title)
@@ -1537,7 +1548,7 @@ gui_buffer_close (struct t_gui_buffer *buffer)
if (buffer->highlight_tags)
free (buffer->highlight_tags);
if (buffer->highlight_tags_array)
string_free_exploded (buffer->highlight_tags_array);
string_free_split (buffer->highlight_tags_array);
gui_keyboard_free_all (&buffer->keys, &buffer->last_key);
gui_buffer_local_var_remove_all (buffer);
@@ -1712,10 +1723,10 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
if (ptr_buffer == ptr_last_buffer)
break;
}
gui_buffers->prev_buffer = buffer;
buffer->prev_buffer = NULL;
buffer->next_buffer = gui_buffers;
gui_buffers = buffer;
gui_buffers->prev_buffer = ptr_last_buffer;
ptr_first_buffer->prev_buffer = NULL;
ptr_last_buffer->next_buffer = gui_buffers;
gui_buffers = ptr_first_buffer;
}
else
{
@@ -1723,7 +1734,7 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
for (ptr_buffer_pos = gui_buffers; ptr_buffer_pos;
ptr_buffer_pos = ptr_buffer_pos->next_buffer)
{
if (ptr_buffer_pos->number == number)
if (ptr_buffer_pos->number >= number)
break;
}
if (ptr_buffer_pos)
@@ -2277,7 +2288,8 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer)
message_without_colors : "(null)");
if (message_without_colors)
free (message_without_colors);
tags = string_build_with_exploded ((const char **)ptr_line->data->tags_array, ",");
tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array,
",");
log_printf (" tags: %s", (tags) ? tags : "(none)");
if (tags)
free (tags);
@@ -2439,7 +2451,8 @@ gui_buffer_print_log ()
while (ptr_line)
{
num--;
tags = string_build_with_exploded ((const char **)ptr_line->data->tags_array, ",");
tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array,
",");
log_printf (" line N-%05d: y:%d, str_time:'%s', tags:'%s', "
"displayed:%d, highlight:%d, refresh_needed:%d, prefix:'%s'",
num, ptr_line->data->y, ptr_line->data->str_time,
+1 -1
View File
@@ -605,7 +605,7 @@ gui_chat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...)
{
if (gui_init_ok)
{
for (ptr_line = buffer->lines->first_line; ptr_line;
for (ptr_line = buffer->own_lines->first_line; ptr_line;
ptr_line = ptr_line->next_line)
{
if (ptr_line->data->y >= y)
+92 -78
View File
@@ -49,10 +49,6 @@
#include "gui-nicklist.h"
struct t_gui_completion_partial *gui_completion_partial_list = NULL;
struct t_gui_completion_partial *last_gui_completion_partial = NULL;
/*
* gui_completion_buffer_init: init completion for a buffer
*/
@@ -80,6 +76,75 @@ gui_completion_buffer_init (struct t_gui_completion *completion,
completion->position_replace = 0;
completion->diff_size = 0;
completion->diff_length = 0;
completion->partial_completion_list = NULL;
completion->last_partial_completion = NULL;
}
/*
* gui_completion_partial_list_add: add an item to partial completions list
*/
struct t_gui_completion_partial *
gui_completion_partial_list_add (struct t_gui_completion *completion,
const char *word, int count)
{
struct t_gui_completion_partial *new_item;
new_item = malloc (sizeof (*new_item));
if (new_item)
{
new_item->word = strdup (word);
new_item->count = count;
new_item->prev_item = completion->last_partial_completion;
if (completion->partial_completion_list)
(completion->last_partial_completion)->next_item = new_item;
else
completion->partial_completion_list = new_item;
completion->last_partial_completion = new_item;
new_item->next_item = NULL;
}
return new_item;
}
/*
* gui_completion_partial_free: remove an item from partial completions list
*/
void
gui_completion_partial_list_free (struct t_gui_completion *completion,
struct t_gui_completion_partial *item)
{
/* remove partial completion item from list */
if (item->prev_item)
(item->prev_item)->next_item = item->next_item;
if (item->next_item)
(item->next_item)->prev_item = item->prev_item;
if (completion->partial_completion_list == item)
completion->partial_completion_list = item->next_item;
if (completion->last_partial_completion == item)
completion->last_partial_completion = item->prev_item;
/* free data */
if (item->word)
free (item->word);
free (item);
}
/*
* gui_completion_partial_free: remove partial completions list
*/
void
gui_completion_partial_list_free_all (struct t_gui_completion *completion)
{
while (completion->partial_completion_list)
{
gui_completion_partial_list_free (completion,
completion->partial_completion_list);
}
}
/*
@@ -110,6 +175,8 @@ gui_completion_free_data (struct t_gui_completion *completion)
if (completion->word_found)
free (completion->word_found);
completion->word_found = NULL;
gui_completion_partial_list_free_all (completion);
}
/*
@@ -123,68 +190,6 @@ gui_completion_free (struct t_gui_completion *completion)
free (completion);
}
/*
* gui_completion_partial_list_add: add an item to partial completions list
*/
struct t_gui_completion_partial *
gui_completion_partial_list_add (const char *word, int count)
{
struct t_gui_completion_partial *new_item;
new_item = malloc (sizeof (*new_item));
if (new_item)
{
new_item->word = strdup (word);
new_item->count = count;
new_item->prev_item = last_gui_completion_partial;
if (gui_completion_partial_list)
last_gui_completion_partial->next_item = new_item;
else
gui_completion_partial_list = new_item;
last_gui_completion_partial = new_item;
new_item->next_item = NULL;
}
return new_item;
}
/*
* gui_completion_partial_free: remove an item from partial completions list
*/
void
gui_completion_partial_list_free (struct t_gui_completion_partial *item)
{
/* remove partial completion item from list */
if (item->prev_item)
(item->prev_item)->next_item = item->next_item;
if (item->next_item)
(item->next_item)->prev_item = item->prev_item;
if (gui_completion_partial_list == item)
gui_completion_partial_list = item->next_item;
if (last_gui_completion_partial == item)
last_gui_completion_partial = item->prev_item;
/* free data */
if (item->word)
free (item->word);
free (item);
}
/*
* gui_completion_partial_free: remove partial completions list
*/
void
gui_completion_partial_list_free_all ()
{
while (gui_completion_partial_list)
{
gui_completion_partial_list_free (gui_completion_partial_list);
}
}
/*
* gui_completion_stop: stop completion (for example after 1 arg of command
* with 1 arg)
@@ -198,7 +203,7 @@ gui_completion_stop (struct t_gui_completion *completion,
completion->position = -1;
if (remove_partial_completion_list)
{
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
hook_signal_send ("partial_completion",
WEECHAT_HOOK_SIGNAL_STRING, NULL);
}
@@ -1699,10 +1704,10 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
{
int char_size, items_count;
char utf_char[16], *word;
struct t_weelist *weelist_temp, *weelist_words;
struct t_weelist *weelist_temp;
struct t_weelist_item *ptr_item, *next_item;
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
if (!completion->completion_list || !completion->completion_list->items)
return;
@@ -1711,13 +1716,6 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
if (!weelist_temp)
return;
weelist_words = weelist_new ();
if (!weelist_words)
{
weelist_free (weelist_temp);
return;
}
for (ptr_item = completion->completion_list->items; ptr_item;
ptr_item = ptr_item->next_item)
{
@@ -1754,7 +1752,8 @@ gui_completion_partial_build_list (struct t_gui_completion *completion,
}
if (word)
{
gui_completion_partial_list_add (word,
gui_completion_partial_list_add (completion,
word,
CONFIG_BOOLEAN(config_completion_partial_completion_count) ?
items_count : -1);
free (word);
@@ -1900,7 +1899,7 @@ gui_completion_complete (struct t_gui_completion *completion)
return;
}
gui_completion_partial_list_free_all ();
gui_completion_partial_list_free_all (completion);
return;
}
@@ -2057,6 +2056,8 @@ gui_completion_search (struct t_gui_completion *completion, int direction,
void
gui_completion_print_log (struct t_gui_completion *completion)
{
struct t_gui_completion_partial *ptr_item;
log_printf ("[completion (addr:0x%lx)]", completion);
log_printf (" buffer. . . . . . . . . : 0x%lx", completion->buffer);
log_printf (" context . . . . . . . . : %d", completion->context);
@@ -2081,6 +2082,19 @@ gui_completion_print_log (struct t_gui_completion *completion)
weelist_print_log (completion->completion_list,
"completion list element");
}
if (completion->partial_completion_list)
{
log_printf ("");
for (ptr_item = completion->partial_completion_list;
ptr_item; ptr_item = ptr_item->next_item)
{
log_printf ("[partial completion item (addr:0x%lx)]", ptr_item);
log_printf (" word. . . . . . . . . . : '%s'", ptr_item->word);
log_printf (" count . . . . . . . . . : %d", ptr_item->count);
log_printf (" prev_item . . . . . . . : 0x%lx", ptr_item->prev_item);
log_printf (" next_item . . . . . . . : 0x%lx", ptr_item->next_item);
}
}
}
/*
+11 -9
View File
@@ -25,6 +25,14 @@
#define GUI_COMPLETION_COMMAND_ARG 2
#define GUI_COMPLETION_AUTO 3
struct t_gui_completion_partial
{
char *word; /* (partial) word matching completion */
int count; /* number of matching items with this word */
struct t_gui_completion_partial *prev_item;
struct t_gui_completion_partial *next_item;
};
struct t_gui_completion
{
/* completion context */
@@ -49,18 +57,12 @@ struct t_gui_completion
int position_replace; /* position where word has to be replaced */
int diff_size; /* size difference (< 0 = char(s) deleted) */
int diff_length; /* length difference (<= diff_size) */
};
struct t_gui_completion_partial
{
char *word; /* (partial) word matching completion */
int count; /* number of matching items with this word */
struct t_gui_completion_partial *prev_item;
struct t_gui_completion_partial *next_item;
/* partial completion */
struct t_gui_completion_partial *partial_completion_list;
struct t_gui_completion_partial *last_partial_completion;
};
extern struct t_gui_completion_partial *gui_completion_partial_list;
/* completion functions */
extern void gui_completion_buffer_init (struct t_gui_completion *completion,
+3 -3
View File
@@ -373,8 +373,8 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
if (tags)
{
new_filter->tags = (tags) ? strdup (tags) : NULL;
new_filter->tags_array = string_explode (tags, ",", 0, 0,
&new_filter->tags_count);
new_filter->tags_array = string_split (tags, ",", 0, 0,
&new_filter->tags_count);
}
else
{
@@ -443,7 +443,7 @@ gui_filter_free (struct t_gui_filter *filter)
if (filter->tags)
free (filter->tags);
if (filter->tags_array)
string_free_exploded (filter->tags_array);
string_free_split (filter->tags_array);
if (filter->regex)
free (filter->regex);
if (filter->regex_prefix)
+1 -1
View File
@@ -135,8 +135,8 @@ gui_hotlist_check_buffer_notify (struct t_gui_buffer *buffer, int priority)
case GUI_HOTLIST_LOW:
return (buffer->notify >= 3);
case GUI_HOTLIST_MESSAGE:
case GUI_HOTLIST_PRIVATE:
return (buffer->notify >= 2);
case GUI_HOTLIST_PRIVATE:
case GUI_HOTLIST_HIGHLIGHT:
return (buffer->notify >= 1);
}
+25 -17
View File
@@ -459,7 +459,8 @@ gui_line_add_to_list (struct t_gui_lines *lines,
*/
void
gui_line_remove_from_list (struct t_gui_lines *lines,
gui_line_remove_from_list (struct t_gui_buffer *buffer,
struct t_gui_lines *lines,
struct t_gui_line *line,
int free_data)
{
@@ -468,13 +469,21 @@ gui_line_remove_from_list (struct t_gui_lines *lines,
update_prefix_max_length =
(line->data->prefix_length == lines->prefix_max_length);
/* move read marker if it was on line we are removing */
if (lines->last_read_line == line)
{
lines->last_read_line = lines->last_read_line->prev_line;
lines->first_line_not_read = (lines->last_read_line) ? 0 : 1;
gui_buffer_ask_chat_refresh (buffer, 1);
}
/* free data */
if (free_data)
{
if (line->data->str_time)
free (line->data->str_time);
if (line->data->tags_array)
string_free_exploded (line->data->tags_array);
string_free_split (line->data->tags_array);
if (line->data->prefix)
free (line->data->prefix);
if (line->data->message)
@@ -537,7 +546,8 @@ gui_line_mixed_free_buffer (struct t_gui_buffer *buffer)
if (ptr_line->data->buffer == buffer)
{
gui_line_remove_from_list (buffer->mixed_lines,
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
ptr_line,
0);
}
@@ -558,7 +568,8 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer)
{
while (buffer->mixed_lines->first_line)
{
gui_line_remove_from_list (buffer->mixed_lines,
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
buffer->mixed_lines->first_line,
0);
}
@@ -566,7 +577,7 @@ gui_line_mixed_free_all (struct t_gui_buffer *buffer)
}
/*
* gui_line_free: delete a formatted line from a buffer
* gui_line_free: delete a line from a buffer
*/
void
@@ -583,7 +594,10 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
{
if (ptr_line->data == line->data)
{
gui_line_remove_from_list (buffer->mixed_lines, ptr_line, 0);
gui_line_remove_from_list (buffer,
buffer->mixed_lines,
ptr_line,
0);
break;
}
}
@@ -600,16 +614,8 @@ gui_line_free (struct t_gui_buffer *buffer, struct t_gui_line *line)
}
}
/* move read marker if it was on line we are removing */
if (buffer->own_lines->last_read_line == line)
{
buffer->own_lines->last_read_line = buffer->own_lines->last_read_line->prev_line;
buffer->own_lines->first_line_not_read = (buffer->own_lines->last_read_line) ? 0 : 1;
gui_buffer_ask_chat_refresh (buffer, 1);
}
/* remove line from lines list */
gui_line_remove_from_list (buffer->own_lines, line, 1);
gui_line_remove_from_list (buffer, buffer->own_lines, line, 1);
}
/*
@@ -686,8 +692,8 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
NULL : gui_chat_get_time_string (date);
if (tags)
{
new_line->data->tags_array = string_explode (tags, ",", 0, 0,
&new_line->data->tags_count);
new_line->data->tags_array = string_split (tags, ",", 0, 0,
&new_line->data->tags_count);
}
else
{
@@ -996,6 +1002,8 @@ gui_line_add_to_infolist (struct t_infolist *infolist,
if (!ptr_item)
return 0;
if (!infolist_new_var_integer (ptr_item, "y", line->data->y))
return 0;
if (!infolist_new_var_time (ptr_item, "date", line->data->date))
return 0;
if (!infolist_new_var_time (ptr_item, "date_printed", line->data->date_printed))
+2 -2
View File
@@ -127,7 +127,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
const char *start, *pos;
int argc, length_res, args_count;
argv = weechat_string_explode (user_args, " ", 0, 0, &argc);
argv = weechat_string_split (user_args, " ", 0, 0, &argc);
res = NULL;
length_res = 0;
@@ -206,7 +206,7 @@ alias_replace_args (const char *alias_args, const char *user_args)
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
return res;
}
+5 -5
View File
@@ -67,7 +67,7 @@ weechat_aspell_config_change_commands (void *data,
if (weechat_aspell_commands_to_check)
{
weechat_string_free_exploded (weechat_aspell_commands_to_check);
weechat_string_free_split (weechat_aspell_commands_to_check);
weechat_aspell_commands_to_check = NULL;
weechat_aspell_count_commands_to_check = 0;
}
@@ -81,9 +81,9 @@ weechat_aspell_config_change_commands (void *data,
value = weechat_config_string (option);
if (value && value[0])
{
weechat_aspell_commands_to_check = weechat_string_explode (value,
",", 0, 0,
&weechat_aspell_count_commands_to_check);
weechat_aspell_commands_to_check = weechat_string_split (value,
",", 0, 0,
&weechat_aspell_count_commands_to_check);
if (weechat_aspell_count_commands_to_check > 0)
{
weechat_aspell_length_commands_to_check = malloc (weechat_aspell_count_commands_to_check *
@@ -381,7 +381,7 @@ weechat_aspell_config_free ()
weechat_config_free (weechat_aspell_config_file);
if (weechat_aspell_commands_to_check)
weechat_string_free_exploded (weechat_aspell_commands_to_check);
weechat_string_free_split (weechat_aspell_commands_to_check);
if (weechat_aspell_length_commands_to_check)
free (weechat_aspell_length_commands_to_check);
}
+2 -2
View File
@@ -80,7 +80,7 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
if (dict_list)
{
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -93,7 +93,7 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
ASPELL_PLUGIN_NAME, argv[i]);
}
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
+4 -4
View File
@@ -281,7 +281,7 @@ weechat_aspell_spellers_already_ok (const char *dict_list)
rc = 0;
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
ptr_speller = weechat_aspell_spellers;
@@ -294,7 +294,7 @@ weechat_aspell_spellers_already_ok (const char *dict_list)
}
ptr_speller = ptr_speller->next_speller;
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
return rc;
@@ -319,14 +319,14 @@ weechat_aspell_create_spellers (struct t_gui_buffer *buffer)
weechat_aspell_speller_free_all ();
if (dict_list)
{
argv = weechat_string_explode (dict_list, ",", 0, 0, &argc);
argv = weechat_string_split (dict_list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
{
weechat_aspell_speller_new (argv[i]);
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
+2 -2
View File
@@ -193,7 +193,7 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name)
fields = weechat_infolist_fields (infolist);
if (fields)
{
argv = weechat_string_explode (fields, ",", 0, 0, &argc);
argv = weechat_string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (j = 0; j < argc; j++)
@@ -237,7 +237,7 @@ demo_infolist_print (struct t_infolist *infolist, const char *item_name)
}
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
i++;
}
+1 -1
View File
@@ -233,7 +233,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item,
snprintf (modes, sizeof (modes),
"%s(%s%s%s)",
IRC_COLOR_BAR_DELIM,
IRC_COLOR_STATUS_NAME,
IRC_COLOR_ITEM_CHANNEL_MODES,
channel->modes,
IRC_COLOR_BAR_DELIM);
}
+73
View File
@@ -60,6 +60,72 @@ irc_channel_valid (struct t_irc_server *server, struct t_irc_channel *channel)
return 0;
}
/*
* irc_channel_move_near_server: move new channel/pv buffer near server
*/
void
irc_channel_move_near_server (struct t_irc_server *server, int channel_type,
struct t_gui_buffer *buffer)
{
int number, number_channel, number_last_channel, number_last_private;
int number_found;
char str_number[32];
struct t_irc_channel *ptr_channel;
number = weechat_buffer_get_integer (buffer, "number");
number_last_channel = 0;
number_last_private = 0;
number_found = 0;
if (server->channels)
{
/* search last channel/pv number for server */
for (ptr_channel = server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
if (ptr_channel->buffer)
{
number_channel = weechat_buffer_get_integer (ptr_channel->buffer,
"number");
switch (ptr_channel->type)
{
case IRC_CHANNEL_TYPE_CHANNEL:
if (number_channel > number_last_channel)
number_last_channel = number_channel;
break;
case IRC_CHANNEL_TYPE_PRIVATE:
if (number_channel > number_last_private)
number_last_private = number_channel;
break;
}
}
}
/* use last channel/pv number + 1 */
switch (channel_type)
{
case IRC_CHANNEL_TYPE_CHANNEL:
if (number_last_channel > 0)
number_found = number_last_channel + 1;
break;
case IRC_CHANNEL_TYPE_PRIVATE:
if (number_last_private > 0)
number_found = number_last_private + 1;
else if (number_last_channel > 0)
number_found = number_last_channel + 1;
break;
}
/* switch to number found */
if ((number_found >= 1) && (number_found != number))
{
snprintf (str_number, sizeof (str_number), "%d", number_found);
weechat_buffer_set (buffer, "number", str_number);
}
}
}
/*
* irc_channel_new: allocate a new channel for a server and add it to channels
* list
@@ -100,6 +166,13 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
free (new_channel);
return NULL;
}
if (((channel_type == IRC_CHANNEL_TYPE_CHANNEL)
&& weechat_config_boolean (irc_config_look_open_channel_near_server))
|| ((channel_type == IRC_CHANNEL_TYPE_PRIVATE)
&& weechat_config_boolean (irc_config_look_open_pv_near_server)))
{
irc_channel_move_near_server (server, channel_type, new_buffer);
}
buffer_created = 1;
}
+6 -6
View File
@@ -768,8 +768,8 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
{
channel_name = argv[1];
pos_args = argv_eol[2];
channels = weechat_string_explode (channel_name, ",", 0, 0,
&num_channels);
channels = weechat_string_split (channel_name, ",", 0, 0,
&num_channels);
if (channels)
{
for (i = 0; i < num_channels; i++)
@@ -780,7 +780,7 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
(ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL))
ptr_channel->cycle = 1;
}
weechat_string_free_exploded (channels);
weechat_string_free_split (channels);
}
}
else
@@ -2003,8 +2003,8 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
IRC_COMMAND_CHECK_SERVER("msg", 1);
targets = weechat_string_explode (argv[arg_target], ",", 0, 0,
&num_targets);
targets = weechat_string_split (argv[arg_target], ",", 0, 0,
&num_targets);
if (targets)
{
for (i = 0; i < num_targets; i++)
@@ -2118,7 +2118,7 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
}
}
}
weechat_string_free_exploded (targets);
weechat_string_free_split (targets);
}
return WEECHAT_RC_OK;
+37 -8
View File
@@ -44,7 +44,8 @@ struct t_config_section *irc_config_section_server = NULL;
struct t_config_option *irc_config_look_color_nicks_in_server_messages;
struct t_config_option *irc_config_look_server_buffer;
struct t_config_option *irc_config_look_open_near_server;
struct t_config_option *irc_config_look_open_channel_near_server;
struct t_config_option *irc_config_look_open_pv_near_server;
struct t_config_option *irc_config_look_nick_prefix;
struct t_config_option *irc_config_look_nick_suffix;
struct t_config_option *irc_config_look_nick_completion_smart;
@@ -69,6 +70,7 @@ struct t_config_option *irc_config_color_message_quit;
struct t_config_option *irc_config_color_notice;
struct t_config_option *irc_config_color_input_nick;
struct t_config_option *irc_config_color_item_away;
struct t_config_option *irc_config_color_item_channel_modes;
/* IRC config, network section */
@@ -336,6 +338,22 @@ irc_config_change_color_item_away (void *data,
weechat_bar_item_update ("away");
}
/*
* irc_config_change_color_item_channel_modes: called when the color of channel
* modes is changed
*/
void
irc_config_change_color_item_channel_modes (void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) option;
weechat_bar_item_update ("buffer_name");
}
/*
* irc_config_change_network_away_check: called when away check is changed
*/
@@ -556,16 +574,16 @@ irc_config_ignore_read (void *data,
{
if (value && value[0])
{
argv = weechat_string_explode (value, ";", 0, 0, &argc);
argv_eol = weechat_string_explode (value, ";", 1, 0, NULL);
argv = weechat_string_split (value, ";", 0, 0, &argc);
argv_eol = weechat_string_split (value, ";", 1, 0, NULL);
if (argv && argv_eol && (argc >= 3))
{
irc_ignore_new (argv_eol[2], argv[0], argv[1]);
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
if (argv_eol)
weechat_string_free_exploded (argv_eol);
weechat_string_free_split (argv_eol);
}
}
@@ -1099,10 +1117,15 @@ irc_config_init ()
"merge_with_core|merge_without_core|independent", 0, 0, "merge_with_core",
NULL, 0, NULL, NULL,
&irc_config_change_look_server_buffer, NULL, NULL, NULL);
irc_config_look_open_near_server = weechat_config_new_option (
irc_config_look_open_channel_near_server = weechat_config_new_option (
irc_config_file, ptr_section,
"open_near_server", "boolean",
N_("open new channels/privates near server"),
"open_channel_near_server", "boolean",
N_("open new channels near server"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_open_pv_near_server = weechat_config_new_option (
irc_config_file, ptr_section,
"open_pv_near_server", "boolean",
N_("open new privates near server"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_nick_prefix = weechat_config_new_option (
irc_config_file, ptr_section,
@@ -1241,6 +1264,12 @@ irc_config_init ()
N_("color for away item"),
NULL, -1, 0, "yellow", NULL, 0, NULL, NULL,
&irc_config_change_color_item_away, NULL, NULL, NULL);
irc_config_color_item_channel_modes = weechat_config_new_option (
irc_config_file, ptr_section,
"item_channel_modes", "color",
N_("color for channel modes, near channel name"),
NULL, -1, 0, "default", NULL, 0, NULL, NULL,
&irc_config_change_color_item_channel_modes, NULL, NULL, NULL);
/* network */
ptr_section = weechat_config_new_section (irc_config_file, "network",
+3 -1
View File
@@ -62,7 +62,8 @@ extern struct t_config_section *irc_config_section_server;
extern struct t_config_option *irc_config_look_color_nicks_in_server_messages;
extern struct t_config_option *irc_config_look_server_buffer;
extern struct t_config_option *irc_config_look_open_near_server;
extern struct t_config_option *irc_config_look_open_channel_near_server;
extern struct t_config_option *irc_config_look_open_pv_near_server;
extern struct t_config_option *irc_config_look_nick_prefix;
extern struct t_config_option *irc_config_look_nick_suffix;
extern struct t_config_option *irc_config_look_nick_completion_smart;
@@ -85,6 +86,7 @@ extern struct t_config_option *irc_config_color_message_quit;
extern struct t_config_option *irc_config_color_notice;
extern struct t_config_option *irc_config_color_input_nick;
extern struct t_config_option *irc_config_color_item_away;
extern struct t_config_option *irc_config_color_item_channel_modes;
extern struct t_config_option *irc_config_network_default_msg_part;
extern struct t_config_option *irc_config_network_default_msg_quit;
+2 -2
View File
@@ -78,7 +78,7 @@ irc_mode_channel_set (struct t_irc_server *server,
pos_args++;
while (pos_args[0] == ' ')
pos_args++;
argv = weechat_string_explode (pos_args, " ", 0, 0, &argc);
argv = weechat_string_split (pos_args, " ", 0, 0, &argc);
}
else
{
@@ -212,7 +212,7 @@ irc_mode_channel_set (struct t_irc_server *server,
if (str_modes)
free (str_modes);
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
weechat_bar_item_update ("buffer_name");
+25 -15
View File
@@ -653,7 +653,8 @@ irc_protocol_cmd_nick (struct t_irc_server *server, const char *command,
{
case IRC_CHANNEL_TYPE_PRIVATE:
/* rename private window if this is with "old nick" */
if (weechat_strcasecmp (ptr_channel->name, nick) == 0)
if ((weechat_strcasecmp (ptr_channel->name, nick) == 0)
&& !irc_channel_search (server, new_nick))
{
free (ptr_channel->name);
ptr_channel->name = strdup (new_nick);
@@ -3753,7 +3754,7 @@ int
irc_protocol_cmd_353 (struct t_irc_server *server, const char *command,
int argc, char **argv, char **argv_eol)
{
char *pos_channel, *pos_nick;
char *pos_channel, *pos_nick, *pos_host, *nick;
const char *color;
int args, i, prefix_found;
int is_chanowner, is_chanadmin, is_chanadmin2, is_op, is_halfop;
@@ -3841,19 +3842,28 @@ irc_protocol_cmd_353 (struct t_irc_server *server, const char *command,
}
if (ptr_channel && ptr_channel->nicks)
{
if (!irc_nick_new (server, ptr_channel, pos_nick,
is_chanowner, is_chanadmin, is_chanadmin2,
is_op, is_halfop, has_voice, is_chanuser, 0))
pos_host = strchr (pos_nick, '!');
if (pos_host)
nick = weechat_strndup (pos_nick, pos_host - pos_nick);
else
nick = strdup (pos_nick);
if (nick)
{
weechat_printf (server->buffer,
_("%s%s: cannot create nick \"%s\" "
"for channel \"%s\""),
weechat_prefix ("error"),
IRC_PLUGIN_NAME, pos_nick, ptr_channel->name);
if (!irc_nick_new (server, ptr_channel, nick,
is_chanowner, is_chanadmin, is_chanadmin2,
is_op, is_halfop, has_voice, is_chanuser, 0))
{
weechat_printf (server->buffer,
_("%s%s: cannot create nick \"%s\" "
"for channel \"%s\""),
weechat_prefix ("error"),
IRC_PLUGIN_NAME, nick, ptr_channel->name);
}
free (nick);
}
}
}
if (!ptr_channel)
{
weechat_printf_tags (server->buffer,
@@ -4523,8 +4533,8 @@ irc_protocol_recv_command (struct t_irc_server *server, const char *entire_line,
}
else
dup_entire_line = NULL;
argv = weechat_string_explode (dup_entire_line, " ", 0, 0, &argc);
argv_eol = weechat_string_explode (dup_entire_line, " ", 1, 0, NULL);
argv = weechat_string_split (dup_entire_line, " ", 0, 0, &argc);
argv_eol = weechat_string_split (dup_entire_line, " ", 1, 0, NULL);
return_code = (int) (cmd_recv_func) (server, cmd_name,
argc, argv, argv_eol);
@@ -4547,8 +4557,8 @@ irc_protocol_recv_command (struct t_irc_server *server, const char *entire_line,
if (dup_entire_line)
free (dup_entire_line);
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
if (argv_eol)
weechat_string_free_exploded (argv_eol);
weechat_string_free_split (argv_eol);
}
}
+5
View File
@@ -102,6 +102,11 @@ irc_raw_open (int switch_to_buffer)
}
}
}
else
{
if (switch_to_buffer)
weechat_buffer_set (irc_raw_buffer, "display", "1");
}
}
/*
+13 -13
View File
@@ -159,7 +159,7 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
server->addresses_count = 0;
if (server->addresses_array)
{
weechat_string_free_exploded (server->addresses_array);
weechat_string_free_split (server->addresses_array);
server->addresses_array = NULL;
}
if (server->ports_array)
@@ -171,9 +171,9 @@ irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
/* set new addresses/ports */
if (addresses && addresses[0])
{
server->addresses_array = weechat_string_explode (addresses,
",", 0, 0,
&server->addresses_count);
server->addresses_array = weechat_string_split (addresses,
",", 0, 0,
&server->addresses_count);
server->ports_array = malloc (server->addresses_count * sizeof (server->ports_array[0]));
for (i = 0; i < server->addresses_count; i++)
{
@@ -206,14 +206,14 @@ irc_server_set_nicks (struct t_irc_server *server, const char *nicks)
server->nicks_count = 0;
if (server->nicks_array)
{
weechat_string_free_exploded (server->nicks_array);
weechat_string_free_split (server->nicks_array);
server->nicks_array = NULL;
}
/* set new nicks */
server->nicks_array = weechat_string_explode ((nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS,
",", 0, 0,
&server->nicks_count);
server->nicks_array = weechat_string_split ((nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS,
",", 0, 0,
&server->nicks_count);
}
/*
@@ -611,13 +611,13 @@ irc_server_free_data (struct t_irc_server *server)
if (server->name)
free (server->name);
if (server->addresses_array)
weechat_string_free_exploded (server->addresses_array);
weechat_string_free_split (server->addresses_array);
if (server->ports_array)
free (server->ports_array);
if (server->current_ip)
free (server->current_ip);
if (server->nicks_array)
weechat_string_free_exploded (server->nicks_array);
weechat_string_free_split (server->nicks_array);
if (server->unterminated_message)
free (server->unterminated_message);
if (server->nick)
@@ -1230,14 +1230,14 @@ irc_server_sendf (struct t_irc_server *server, int queue_msg,
vsnprintf (buffer, sizeof (buffer) - 1, format, args);
va_end (args);
items = weechat_string_explode (buffer, "\n", 0, 0, &items_count);
items = weechat_string_split (buffer, "\n", 0, 0, &items_count);
for (i = 0; i < items_count; i++)
{
if (!irc_server_send_one_msg (server, queue_msg, items[i]))
break;
}
if (items)
weechat_string_free_exploded (items);
weechat_string_free_split (items);
}
/*
@@ -1334,7 +1334,7 @@ irc_server_msgq_add_unterminated (struct t_irc_server *server, const char *strin
}
/*
* irc_server_msgq_add_buffer: explode received buffer, creating queued messages
* irc_server_msgq_add_buffer: split received buffer, creating queued messages
*/
void
+2 -2
View File
@@ -102,7 +102,7 @@ struct t_irc_server
int reloading_from_config; /* 1 if reloading from config file */
int reloaded_from_config; /* 1 if reloaded from config file */
int addresses_count; /* number of addresses */
char **addresses_array; /* exploded addresses */
char **addresses_array; /* addresses (after split) */
int *ports_array; /* ports for addresses */
int index_current_address; /* current address index in array */
char *current_ip; /* current IP address */
@@ -116,7 +116,7 @@ struct t_irc_server
#endif
char *unterminated_message; /* beginning of a message in input buf */
int nicks_count; /* number of nicknames */
char **nicks_array; /* exploded nicknames */
char **nicks_array; /* nicknames (after split) */
char *nick; /* current nickname */
char *nick_modes; /* nick modes */
char *prefix; /* nick prefix allowed (from msg 005) */
+1
View File
@@ -65,6 +65,7 @@
#define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice))
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick))
#define IRC_COLOR_ITEM_AWAY weechat_color(weechat_config_string(irc_config_color_item_away))
#define IRC_COLOR_ITEM_CHANNEL_MODES weechat_color(weechat_config_string(irc_config_color_item_channel_modes))
#define IRC_COLOR_NICK_IN_SERVER_MESSAGE(nick) \
((nick && weechat_config_boolean(irc_config_look_color_nicks_in_server_messages)) ? \
nick->color : IRC_COLOR_CHAT_NICK)
+3 -3
View File
@@ -372,9 +372,9 @@ plugin_load (const char *filename)
new_plugin->string_strip = &string_strip;
new_plugin->string_has_highlight = &string_has_highlight;
new_plugin->string_mask_to_regex = &string_mask_to_regex;
new_plugin->string_explode = &string_explode;
new_plugin->string_free_exploded = &string_free_exploded;
new_plugin->string_build_with_exploded = &string_build_with_exploded;
new_plugin->string_split = &string_split;
new_plugin->string_free_split = &string_free_split;
new_plugin->string_build_with_split_string = &string_build_with_split_string;
new_plugin->string_split_command = &string_split_command;
new_plugin->string_free_split_command = &string_free_split_command;
new_plugin->string_format_size = &string_format_size;
+2 -2
View File
@@ -152,7 +152,7 @@ relay_client_send_infolist (struct t_relay_client *client,
fields = weechat_infolist_fields (infolist);
if (fields)
{
argv = weechat_string_explode (fields, ",", 0, 0, &argc);
argv = weechat_string_split (fields, ",", 0, 0, &argc);
if (argv && (argc > 0))
{
for (i = 0; i < argc; i++)
@@ -193,7 +193,7 @@ relay_client_send_infolist (struct t_relay_client *client,
}
}
if (argv)
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
}
}
+1 -1
View File
@@ -3651,7 +3651,7 @@ weechat_lua_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
lua_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
lua_argv[1] = script_ptr2str (buffer);
lua_argv[2] = timebuffer;
lua_argv[3] = weechat_string_build_with_exploded (tags, ",");
lua_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!lua_argv[3])
lua_argv[3] = strdup ("");
lua_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+1 -1
View File
@@ -3080,7 +3080,7 @@ weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
perl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
perl_argv[1] = script_ptr2str (buffer);
perl_argv[2] = timebuffer;
perl_argv[3] = weechat_string_build_with_exploded (tags, ",");
perl_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!perl_argv[3])
perl_argv[3] = strdup ("");
perl_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
@@ -3253,7 +3253,7 @@ weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
python_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
python_argv[1] = script_ptr2str (buffer);
python_argv[2] = timebuffer;
python_argv[3] = weechat_string_build_with_exploded (tags, ",");
python_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!python_argv[3])
python_argv[3] = strdup ("");
python_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+1 -1
View File
@@ -3760,7 +3760,7 @@ weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
ruby_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
ruby_argv[1] = script_ptr2str (buffer);
ruby_argv[2] = timebuffer;
ruby_argv[3] = weechat_string_build_with_exploded (tags, ",");
ruby_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!ruby_argv[3])
ruby_argv[3] = strdup ("");
ruby_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+4 -4
View File
@@ -922,7 +922,7 @@ script_action_install (struct t_weechat_plugin *weechat_plugin,
if (*list)
{
argv = weechat_string_explode (*list, ",", 0, 0, &argc);
argv = weechat_string_split (*list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -995,7 +995,7 @@ script_action_install (struct t_weechat_plugin *weechat_plugin,
free (name);
}
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
free (*list);
*list = NULL;
@@ -1021,7 +1021,7 @@ script_action_remove (struct t_weechat_plugin *weechat_plugin,
if (*list)
{
argv = weechat_string_explode (*list, ",", 0, 0, &argc);
argv = weechat_string_split (*list, ",", 0, 0, &argc);
if (argv)
{
for (i = 0; i < argc; i++)
@@ -1034,7 +1034,7 @@ script_action_remove (struct t_weechat_plugin *weechat_plugin,
/* remove script file(s) */
script_remove_file (weechat_plugin, argv[i], 1);
}
weechat_string_free_exploded (argv);
weechat_string_free_split (argv);
}
free (*list);
*list = NULL;
+1 -1
View File
@@ -3498,7 +3498,7 @@ weechat_tcl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
tcl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
tcl_argv[1] = script_ptr2str (buffer);
tcl_argv[2] = timebuffer;
tcl_argv[3] = weechat_string_build_with_exploded (tags, ",");
tcl_argv[3] = weechat_string_build_with_split_string (tags, ",");
if (!tcl_argv[3])
tcl_argv[3] = strdup ("");
tcl_argv[4] = (displayed) ? strdup ("1") : strdup ("0");
+18 -16
View File
@@ -160,11 +160,11 @@ struct t_weechat_plugin
int (*string_has_highlight) (const char *string,
const char *highlight_words);
char *(*string_mask_to_regex) (const char *mask);
char **(*string_explode) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_exploded) (char **exploded_string);
char *(*string_build_with_exploded) (const char **exploded_string,
const char *separator);
char **(*string_split) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_split) (char **split_string);
char *(*string_build_with_split_string) (const char **split_string,
const char *separator);
char **(*string_split_command) (const char *command, char separator);
void (*string_free_split_command) (char **split_command);
char *(*string_format_size) (unsigned long size);
@@ -187,7 +187,7 @@ struct t_weechat_plugin
char *(*utf8_add_offset) (const char *string, int offset);
int (*utf8_real_pos) (const char *string, int pos);
int (*utf8_pos) (const char *string, int real_pos);
char *(*utf8_strndup) (const char *string, int max_chars);
char *(*utf8_strndup) (const char *string, int length);
/* directories */
int (*mkdir_home) (const char *directory, int mode);
@@ -691,16 +691,16 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->string_has_highlight(__string, __highlight_words)
#define weechat_string_mask_to_regex(__mask) \
weechat_plugin->string_mask_to_regex(__mask)
#define weechat_string_explode(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_explode(__string, __separator, __eol, \
__max, __num_items)
#define weechat_string_free_exploded(__exploded_string) \
weechat_plugin->string_free_exploded(__exploded_string)
#define weechat_string_build_with_exploded(__exploded_string, \
__separator) \
weechat_plugin->string_build_with_exploded(__exploded_string, \
__separator)
#define weechat_string_split(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_split(__string, __separator, __eol, \
__max, __num_items)
#define weechat_string_free_split(__split_string) \
weechat_plugin->string_free_split(__split_string)
#define weechat_string_build_with_split_string(__split_string, \
__separator) \
weechat_plugin->string_build_with_split_string(__split_string, \
__separator)
#define weechat_string_split_command(__command, __separator) \
weechat_plugin->string_split_command(__command, __separator)
#define weechat_string_free_split_command(__split_command) \
@@ -743,6 +743,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->utf8_real_pos(__string, __pos)
#define weechat_utf8_pos(__string, __real_pos) \
weechat_plugin->utf8_pos(__string, __real_pos)
#define weechat_utf8_strndup(__string, __length) \
weechat_plugin->utf8_strndup(__string, __length)
/* directories */
#define weechat_mkdir_home(__directory, __mode) \