2014-02-02 09:49:59 +01:00
|
|
|
= WeeChat developer's guide
|
2014-01-23 18:38:53 +01:00
|
|
|
:author: Sébastien Helleu
|
|
|
|
:email: flashcode@flashtux.org
|
|
|
|
:lang: en
|
2015-01-12 21:53:34 +01:00
|
|
|
:toc2:
|
|
|
|
:toclevels: 3
|
|
|
|
:max-width: 100%
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
This manual documents WeeChat chat client, it is part of WeeChat.
|
|
|
|
|
|
|
|
Latest version of this document can be found on this page:
|
2014-12-13 09:16:09 +01:00
|
|
|
https://weechat.org/doc
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
[[introduction]]
|
2013-11-04 21:41:34 +01:00
|
|
|
== Introduction
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and
|
|
|
|
light, designed for many operating systems.
|
|
|
|
|
|
|
|
This manual documents WeeChat internals:
|
|
|
|
|
2015-05-17 07:46:54 +02:00
|
|
|
* repositories
|
2011-11-06 00:16:13 +01:00
|
|
|
* coding rules
|
|
|
|
* core internals
|
|
|
|
* plugin internals
|
2014-02-02 11:10:33 +01:00
|
|
|
* how to contribute to WeeChat.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2015-05-17 07:46:54 +02:00
|
|
|
[[repositories]]
|
|
|
|
== Repositories
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2015-05-17 07:46:54 +02:00
|
|
|
WeeChat repositories are on GitHub organization "weechat":
|
|
|
|
https://github.com/weechat
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2015-05-17 07:46:54 +02:00
|
|
|
List of repositories:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2015-05-17 07:46:54 +02:00
|
|
|
weechat::
|
|
|
|
core repository with source code and documentation
|
|
|
|
|
|
|
|
scripts::
|
|
|
|
the 'official' scripts submitted on weechat.org
|
|
|
|
|
|
|
|
weechat.org::
|
|
|
|
source of WeeChat web site: https://weechat.org/
|
|
|
|
|
|
|
|
weercd::
|
|
|
|
IRC testing server
|
|
|
|
|
|
|
|
qweechat::
|
|
|
|
Qt remote GUI for WeeChat.
|
|
|
|
|
|
|
|
This manual documents only 'weechat' repository.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[overview]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Overview
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
The main WeeChat directories are:
|
|
|
|
|
2013-11-11 09:06:56 +01:00
|
|
|
[width="100%",cols="1v,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2015-03-07 15:16:37 +01:00
|
|
|
| Directory | Description
|
|
|
|
| src/ | Root of sources
|
|
|
|
| core/ | Core functions: entry point, internal structures
|
|
|
|
| gui/ | Functions for buffers, windows, ... (used by all interfaces)
|
|
|
|
| curses/ | Curses interface
|
|
|
|
| plugins/ | Plugin and scripting API
|
|
|
|
| alias/ | Alias plugin
|
|
|
|
| aspell/ | Aspell plugin
|
|
|
|
| charset/ | Charset plugin
|
|
|
|
| exec/ | Exec plugin
|
|
|
|
| fifo/ | Fifo plugin (FIFO pipe used to remotely send commands to WeeChat)
|
2015-05-17 07:48:21 +02:00
|
|
|
| guile/ | Guile (scheme) scripting API
|
2015-03-07 15:16:37 +01:00
|
|
|
| irc/ | IRC (Internet Relay Chat) plugin
|
2015-05-17 07:48:21 +02:00
|
|
|
| javascript/ | Javascript scripting API
|
2015-03-07 15:16:37 +01:00
|
|
|
| logger/ | Logger plugin (write messages displayed to files)
|
2015-05-17 07:48:21 +02:00
|
|
|
| lua/ | Lua scripting API
|
2015-03-07 15:16:37 +01:00
|
|
|
| perl/ | Perl scripting API
|
2015-05-17 07:48:21 +02:00
|
|
|
| python/ | Python scripting API
|
|
|
|
| relay/ | Relay plugin (irc proxy + relay for remote interfaces)
|
2015-03-07 15:16:37 +01:00
|
|
|
| ruby/ | Ruby scripting API
|
2015-05-17 07:48:21 +02:00
|
|
|
| script/ | Scripts manager
|
2015-03-07 15:16:37 +01:00
|
|
|
| tcl/ | Tcl scripting API
|
|
|
|
| trigger/ | Trigger plugin
|
|
|
|
| xfer/ | Xfer plugin (IRC DCC file/chat)
|
|
|
|
| tests/ | Tests
|
|
|
|
| unit/ | Unit tests
|
|
|
|
| core/ | Unit tests for core functions
|
|
|
|
| doc/ | Documentation
|
|
|
|
| po/ | Translations files (gettext)
|
|
|
|
| debian/ | Debian packaging
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[sources]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Sources
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[sources_core]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Core
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
WeeChat "core" is located in following directories:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2012-06-30 17:37:23 +02:00
|
|
|
* 'src/core/': core functions (for data manipulation)
|
|
|
|
* 'src/gui/': functions about interface (buffers, windows, ...)
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-11 09:06:56 +01:00
|
|
|
[width="100%",cols="1v,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
| Path/file | Description
|
|
|
|
| core/ | Core functions: entry point, internal structures
|
2014-10-05 08:48:23 +02:00
|
|
|
| wee-arraylist.c | Array lists
|
2014-02-02 09:49:59 +01:00
|
|
|
| wee-backtrace.c | Display a backtrace after a crash
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-command.c | WeeChat core commands
|
2014-02-02 09:49:59 +01:00
|
|
|
| wee-completion.c | Default completions
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-config-file.c | Configuration file management
|
2013-07-27 12:57:08 +02:00
|
|
|
| wee-config.c | Configuration options for WeeChat core (file weechat.conf)
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-debug.c | Some debug functions
|
2014-02-02 09:49:59 +01:00
|
|
|
| wee-eval.c | Evaluation of expressions with references to internal vars
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-hashtable.c | Hashtables
|
|
|
|
| wee-hdata.c | Hdata (direct access to data using hashtables)
|
|
|
|
| wee-hook.c | Hooks
|
2014-02-02 09:49:59 +01:00
|
|
|
| wee-infolist.c | Infolists (lists with objects data)
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-input.c | Input of commands/text
|
|
|
|
| wee-list.c | Sorted lists
|
|
|
|
| wee-log.c | Write to WeeChat log file (weechat.log)
|
2014-02-02 09:49:59 +01:00
|
|
|
| wee-network.c | Network functions (connection to servers/proxies)
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-proxy.c | Proxy management
|
2013-07-27 12:57:08 +02:00
|
|
|
| wee-secure.c | Secured data options (file sec.conf)
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-string.c | Functions on strings
|
|
|
|
| wee-upgrade-file.c | Internal upgrade system
|
|
|
|
| wee-upgrade.c | Upgrade for WeeChat core (buffers, lines, history, ...)
|
2012-02-22 16:32:29 +01:00
|
|
|
| wee-url.c | URL transfer (using libcurl)
|
2011-11-06 00:16:13 +01:00
|
|
|
| wee-utf8.c | UTF-8 functions
|
|
|
|
| wee-util.c | Some other functions
|
2012-12-16 23:07:33 +01:00
|
|
|
| wee-version.c | Functions for WeeChat version
|
2015-05-17 07:48:21 +02:00
|
|
|
| weechat.c | Main functions: command line options, startup
|
2011-11-06 00:16:13 +01:00
|
|
|
| gui/ | Functions for buffers, windows, ... (used by all interfaces)
|
|
|
|
| gui-bar-item.c | Bar items
|
|
|
|
| gui-bar-window.c | Bar windows
|
|
|
|
| gui-bar.c | Bars
|
|
|
|
| gui-buffer.c | Buffers
|
|
|
|
| gui-chat.c | Chat functions (display message, ...)
|
|
|
|
| gui-color.c | Color functions
|
2014-02-02 09:49:59 +01:00
|
|
|
| gui-completion.c | Completion on command line
|
2011-11-06 00:16:13 +01:00
|
|
|
| gui-cursor.c | Cursor mode (free movement of cursor)
|
|
|
|
| gui-filter.c | Filters
|
|
|
|
| gui-focus.c | Functions about focus (for cursor mode and mouse)
|
2014-02-02 09:49:59 +01:00
|
|
|
| gui-history.c | Commands/text saved in buffers
|
2011-11-06 00:16:13 +01:00
|
|
|
| gui-hotlist.c | Hotlist management (list of buffers with activity)
|
|
|
|
| gui-input.c | Input functions (input bar)
|
|
|
|
| gui-key.c | Keyboard functions
|
|
|
|
| gui-layout.c | Layout
|
|
|
|
| gui-line.c | Lines in buffers
|
|
|
|
| gui-mouse.c | Mouse
|
|
|
|
| gui-nicklist.c | Nicklist in buffers
|
|
|
|
| gui-window.c | Windows
|
|
|
|
| curses/ | Curses interface
|
|
|
|
| gui-curses-bar-window.c | Display in bar windows
|
|
|
|
| gui-curses-chat.c | Display in chat area (messages)
|
|
|
|
| gui-curses-color.c | Color functions
|
|
|
|
| gui-curses-key.c | Keyboard functions (default keys, read of input)
|
|
|
|
| gui-curses-main.c | WeeChat main loop (waiting for keyboard/network events)
|
|
|
|
| gui-curses-mouse.c | Mouse
|
|
|
|
| gui-curses-term.c | Functions about terminal
|
|
|
|
| gui-curses-window.c | Windows
|
2014-07-20 16:50:53 +02:00
|
|
|
| main.c | Entry point
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[sources_plugins]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Plugins
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-11 09:06:56 +01:00
|
|
|
[width="100%",cols="1v,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-12-06 23:06:23 +01:00
|
|
|
| Path/file | Description
|
|
|
|
| plugins/ | Root of plugins
|
|
|
|
| plugin.c | Plugins management (load/unload dynamic C libraries)
|
|
|
|
| plugin-api.c | Extra functions for plugin API (wrapper around WeeChat core functions)
|
|
|
|
| plugin-config.c | Plugin configuration options (file plugins.conf)
|
2012-08-02 22:28:43 +02:00
|
|
|
| plugin-script.c | Common functions used by script plugins
|
|
|
|
| plugin-script-api.c | Script API functions: wrappers around some plugin API functions
|
|
|
|
| plugin-script-callback.c | Callback management for scripts
|
2011-12-06 23:06:23 +01:00
|
|
|
| weechat-plugin.h | Header designed to be distributed with WeeChat plugins, in order to compile them
|
|
|
|
| alias/ | Alias plugin
|
|
|
|
| alias.c | Main alias functions
|
2015-07-20 07:54:59 +02:00
|
|
|
| alias-command.c | Alias commands
|
|
|
|
| alias-completion.c | Alias completions
|
2013-07-27 12:57:08 +02:00
|
|
|
| alias-config.c | Alias config options (file alias.conf)
|
2013-01-31 19:40:41 +01:00
|
|
|
| alias-info.c | Alias info/infolists/hdata
|
2011-12-06 23:06:23 +01:00
|
|
|
| aspell/ | Aspell plugin
|
|
|
|
| weechat-aspell.c | Main aspell functions
|
2012-10-06 17:16:49 +02:00
|
|
|
| weechat-aspell-bar-item.c | Aspell bar items
|
2013-01-31 19:40:41 +01:00
|
|
|
| weechat-aspell-command.c | Aspell commands
|
|
|
|
| weechat-aspell-completion.c | Aspell completions
|
2013-07-27 12:57:08 +02:00
|
|
|
| weechat-aspell-config.c | Aspell config options (file aspell.conf)
|
2013-01-31 19:40:41 +01:00
|
|
|
| weechat-aspell-info.c | Aspell info/infolists/hdata
|
2011-12-06 23:06:23 +01:00
|
|
|
| weechat-aspell-speller.c | Spellers management
|
|
|
|
| charset/ | Charset plugin
|
|
|
|
| charset.c | Charset functions
|
2014-03-15 15:15:29 +01:00
|
|
|
| exec/ | Exec plugin
|
|
|
|
| exec.c | Main exec functions
|
|
|
|
| exec-buffer.c | Exec buffer
|
|
|
|
| exec-command.c | Exec commands
|
|
|
|
| exec-completion.c | Exec completions
|
|
|
|
| exec-config.c | Exec config options (file exec.conf)
|
2011-12-06 23:06:23 +01:00
|
|
|
| fifo/ | Fifo plugin
|
|
|
|
| fifo.c | Main fifo functions
|
2015-12-02 19:46:34 +01:00
|
|
|
| fifo-command.c | Fifo commands
|
2013-01-31 19:40:41 +01:00
|
|
|
| fifo-info.c | Fifo info/infolists/hdata
|
2012-08-02 22:28:43 +02:00
|
|
|
| guile/ | Guile (scheme) plugin
|
|
|
|
| weechat-guile.c | Main guile functions (load/unload scripts, execute guile code)
|
|
|
|
| weechat-guile-api.c | Guile scripting API functions
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc/ | IRC (Internet Relay Chat) plugin
|
|
|
|
| irc.c | Main IRC functions
|
|
|
|
| irc-bar-item.c | IRC bar items
|
|
|
|
| irc-buffer.c | IRC buffers
|
|
|
|
| irc-channel.c | IRC channels
|
2014-02-02 09:49:59 +01:00
|
|
|
| irc-color.c | IRC colors
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc-command.c | IRC commands
|
|
|
|
| irc-completion.c | IRC completions
|
2013-07-27 12:57:08 +02:00
|
|
|
| irc-config.c | IRC config options (file irc.conf)
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc-ctcp.c | IRC CTCP
|
|
|
|
| irc-debug.c | IRC debug functions
|
|
|
|
| irc-ignore.c | IRC Ignore
|
2013-01-31 19:40:41 +01:00
|
|
|
| irc-info.c | IRC info/infolists/hdata
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc-input.c | Input of commands/text
|
|
|
|
| irc-message.c | Functions to manipulate IRC messages
|
|
|
|
| irc-mode.c | Functions about channel/nick modes
|
|
|
|
| irc-msgbuffer.c | Target buffer for IRC messages
|
|
|
|
| irc-nick.c | IRC nicks
|
|
|
|
| irc-notify.c | IRC notify lists
|
2013-02-10 15:55:44 +01:00
|
|
|
| irc-protocol.c | IRC protocol (RFCs 1459/2810/2811/2812/2813)
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc-raw.c | IRC raw buffer
|
|
|
|
| irc-redirect.c | Redirection of IRC command output
|
|
|
|
| irc-sasl.c | SASL authentication with IRC server
|
2014-02-02 09:49:59 +01:00
|
|
|
| irc-server.c | I/O communication with IRC server
|
|
|
|
| irc-upgrade.c | Save/restore of IRC data when upgrading WeeChat
|
2015-03-07 15:16:37 +01:00
|
|
|
| javascript/ | Javascript plugin
|
|
|
|
| weechat-js.cpp | Main javascript functions (load/unload scripts, execute javascript code)
|
|
|
|
| weechat-js-api.cpp | Javascript scripting API functions
|
|
|
|
| weechat-js-v8.cpp | Javascript v8 functions
|
2011-12-06 23:06:23 +01:00
|
|
|
| logger/ | Logger plugin
|
|
|
|
| logger.c | Main logger functions
|
|
|
|
| logger-buffer.c | Logger buffer list management
|
2013-07-27 12:57:08 +02:00
|
|
|
| logger-config.c | Logger config options (file logger.conf)
|
2013-01-31 19:40:41 +01:00
|
|
|
| logger-info.c | Logger info/infolists/hdata
|
2014-02-02 09:49:59 +01:00
|
|
|
| logger-tail.c | Functions to get last lines of a file
|
2012-08-02 22:28:43 +02:00
|
|
|
| lua/ | Lua plugin
|
|
|
|
| weechat-lua.c | Main lua functions (load/unload scripts, execute lua code)
|
|
|
|
| weechat-lua-api.c | Lua scripting API functions
|
|
|
|
| perl/ | Perl plugin
|
|
|
|
| weechat-perl.c | Main perl functions (load/unload scripts, execute perl code)
|
|
|
|
| weechat-perl-api.c | Perl scripting API functions
|
|
|
|
| python/ | Python plugin
|
|
|
|
| weechat-python.c | Main python functions (load/unload scripts, execute python code)
|
|
|
|
| weechat-python-api.c | Python scripting API functions
|
2011-12-06 23:06:23 +01:00
|
|
|
| relay/ | Relay plugin (IRC proxy and relay for remote interfaces)
|
|
|
|
| relay.c | Main relay functions
|
|
|
|
| relay-buffer.c | Relay buffer
|
|
|
|
| relay-client.c | Clients of relay
|
|
|
|
| relay-command.c | Relay commands
|
|
|
|
| relay-completion.c | Relay completions
|
2013-07-27 12:57:08 +02:00
|
|
|
| relay-config.c | Relay config options (file relay.conf)
|
2013-01-31 19:40:41 +01:00
|
|
|
| relay-info.c | Relay info/infolists/hdata
|
2012-07-27 17:54:08 +02:00
|
|
|
| relay-network.c | Network functions for relay
|
2011-12-06 23:06:23 +01:00
|
|
|
| relay-raw.c | Relay raw buffer
|
|
|
|
| relay-server.c | Relay server
|
2014-02-02 09:49:59 +01:00
|
|
|
| relay-upgrade.c | Save/restore of relay data when upgrading WeeChat
|
|
|
|
| relay-websocket.c | WebSocket server functions (RFC 6455)
|
2011-12-06 23:06:23 +01:00
|
|
|
| irc/ | IRC proxy
|
|
|
|
| relay-irc.c | Main IRC proxy functions
|
2014-02-02 09:49:59 +01:00
|
|
|
| weechat/ | Relay for remote interfaces
|
|
|
|
| relay-weechat.c | Relay for remote interfaces (main functions)
|
2011-12-06 23:06:23 +01:00
|
|
|
| relay-weechat-msg.c | Send binary messages to clients
|
2013-03-09 09:04:49 +01:00
|
|
|
| relay-weechat-nicklist.c | Nicklist functions
|
2011-12-06 23:06:23 +01:00
|
|
|
| relay-weechat-protocol.c | Read commands from clients
|
2012-08-02 22:28:43 +02:00
|
|
|
| ruby/ | Ruby plugin
|
|
|
|
| weechat-ruby.c | Main ruby functions (load/unload scripts, execute ruby code)
|
|
|
|
| weechat-ruby-api.c | Ruby scripting API functions
|
2012-10-06 17:32:12 +02:00
|
|
|
| script/ | Scripts manager
|
|
|
|
| script.c | Main functions for scripts manager
|
2014-02-02 09:49:59 +01:00
|
|
|
| script-action.c | Actions on scripts (load/unload, install/remove, ...)
|
2012-10-06 17:32:12 +02:00
|
|
|
| script-buffer.c | Buffer for scripts manager
|
|
|
|
| script-command.c | Commands for scripts manager
|
|
|
|
| script-completion.c | Completions for scripts manager
|
2013-07-27 12:57:08 +02:00
|
|
|
| script-config.c | Config options for scripts manager (file script.conf)
|
2013-01-31 19:40:41 +01:00
|
|
|
| script-info.c | Script manager info/infolists/hdata
|
2012-10-06 17:32:12 +02:00
|
|
|
| script-repo.c | Download and read repository file
|
2012-08-02 22:28:43 +02:00
|
|
|
| tcl/ | Tcl plugin
|
|
|
|
| weechat-tcl.c | Main tcl functions (load/unload scripts, execute tcl code)
|
|
|
|
| weechat-tcl-api.c | Tcl scripting API functions
|
2014-02-15 10:48:45 +01:00
|
|
|
| trigger/ | Trigger plugin
|
|
|
|
| trigger.c | Main trigger functions
|
|
|
|
| trigger-buffer.c | Trigger buffer
|
|
|
|
| trigger-callback.c | Trigger callbacks
|
|
|
|
| trigger-command.c | Trigger commands
|
|
|
|
| trigger-completion.c | Trigger completions
|
|
|
|
| trigger-config.c | Trigger config options (file trigger.conf)
|
2011-12-06 23:06:23 +01:00
|
|
|
| xfer/ | Xfer plugin (IRC DCC file/chat)
|
|
|
|
| xfer.c | Main xfer functions
|
|
|
|
| xfer-buffer.c | Xfer buffer
|
2014-02-02 09:49:59 +01:00
|
|
|
| xfer-chat.c | DCC chat
|
2011-12-06 23:06:23 +01:00
|
|
|
| xfer-command.c | Xfer commands
|
|
|
|
| xfer-completion.c | Xfer completions
|
2013-07-27 12:57:08 +02:00
|
|
|
| xfer-config.c | Xfer config options (file xfer.conf)
|
2014-02-02 09:49:59 +01:00
|
|
|
| xfer-dcc.c | DCC file transfer
|
2011-12-06 23:06:23 +01:00
|
|
|
| xfer-file.c | File functions for xfer
|
2013-01-31 19:40:41 +01:00
|
|
|
| xfer-info.c | Xfer info/infolists/hdata
|
2011-12-06 23:06:23 +01:00
|
|
|
| xfer-network.c | Network functions for xfer
|
2014-02-02 09:49:59 +01:00
|
|
|
| xfer-upgrade.c | Save/restore of xfer data when upgrading WeeChat
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-07-20 12:13:25 +02:00
|
|
|
[[sources_tests]]
|
|
|
|
==== Tests
|
|
|
|
|
|
|
|
[width="100%",cols="1v,5",options="header"]
|
|
|
|
|===
|
2015-05-15 22:17:59 +02:00
|
|
|
| Path/file | Description
|
|
|
|
| tests/ | Root of tests
|
|
|
|
| tests.cpp | Program used to run tests
|
|
|
|
| unit/ | Root of unit tests
|
|
|
|
| core/ | Root of unit tests for core
|
|
|
|
| test-arraylist.cpp | Tests: arraylists
|
|
|
|
| test-eval.cpp | Tests: evaluation of expressions
|
|
|
|
| test-hashtble.cpp | Tests: hashtables
|
|
|
|
| test-hdata.cpp | Tests: hdata
|
|
|
|
| test-infolist.cpp | Tests: infolists
|
|
|
|
| test-list.cpp | Tests: lists
|
|
|
|
| test-string.cpp | Tests: strings
|
|
|
|
| test-url.cpp | Tests: URLs
|
|
|
|
| test-utf8.cpp | Tests: UTF-8
|
|
|
|
| test-util.cpp | Tests: utility functions
|
2014-07-20 12:13:25 +02:00
|
|
|
|===
|
|
|
|
|
2012-07-01 16:59:56 +02:00
|
|
|
[[documentation_translations]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Documentation / translations
|
2012-07-01 16:59:56 +02:00
|
|
|
|
|
|
|
Documentation files:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-11 09:06:56 +01:00
|
|
|
[width="100%",cols="1v,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2014-05-25 12:25:58 +02:00
|
|
|
| Path/file | Description
|
|
|
|
| doc/ | Documentation
|
|
|
|
| asciidoc.conf | Asciidoc configuration file (some macros)
|
|
|
|
| asciidoc.css | Asciidoc style
|
|
|
|
| docgen.py | Python script to build files in 'autogen/' directory (see below)
|
|
|
|
| XX/ | Documentation for language XX (languages: en, fr, de, it, ...)
|
2015-05-17 07:48:21 +02:00
|
|
|
| cmdline_options.XX.asciidoc | Command-line options (file included in man page and user's guide)
|
2014-05-25 12:25:58 +02:00
|
|
|
| weechat.1.XX.asciidoc | Man page (`man weechat`)
|
2015-05-17 07:48:21 +02:00
|
|
|
| weechat_dev.XX.asciidoc | Developer's guide (this document)
|
2014-05-25 12:25:58 +02:00
|
|
|
| weechat_faq.XX.asciidoc | FAQ
|
|
|
|
| weechat_plugin_api.XX.asciidoc | Plugin API reference
|
2015-05-17 07:48:21 +02:00
|
|
|
| weechat_quickstart.XX.asciidoc | Quickstart guide
|
|
|
|
| weechat_relay_protocol.XX.asciidoc | Relay protocol (for remote interfaces)
|
2014-05-25 12:25:58 +02:00
|
|
|
| weechat_scripting.XX.asciidoc | Scripting guide
|
|
|
|
| weechat_tester.XX.asciidoc | Tester's guide
|
2015-05-17 07:48:21 +02:00
|
|
|
| weechat_user.XX.asciidoc | User's guide
|
2014-05-25 12:25:58 +02:00
|
|
|
| autogen/ | Files auto-built with script docgen.py
|
|
|
|
| user/ | Files auto-built for user's guide (do *NEVER* update manually!)
|
|
|
|
| plugin_api/ | Files auto-built for plugin API (do *NEVER* update manually!)
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
Translations for WeeChat and plugins are done with gettext, files are in 'po/'
|
|
|
|
directory:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-11 09:06:56 +01:00
|
|
|
[width="100%",cols="1v,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
| Path/file | Description
|
|
|
|
| po/ | Translation files (gettext)
|
2013-01-07 10:31:32 +01:00
|
|
|
| XX.po | Translations for language XX (fr, de, it, ...), base language is English
|
2011-11-06 00:16:13 +01:00
|
|
|
| weechat.pot | Template for translations (auto-built)
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[coding_rules]]
|
2013-11-04 21:41:34 +01:00
|
|
|
== Coding rules
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[coding_general_rules]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== General rules
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
* In source code, your comments, variable names, .. must be written in English
|
2014-02-02 09:49:59 +01:00
|
|
|
*only* (no other language is allowed).
|
|
|
|
* Use a copyright header in each new source file with:
|
|
|
|
** short description of file (one line),
|
|
|
|
** date,
|
|
|
|
** name,
|
|
|
|
** e-mail,
|
|
|
|
** license.
|
|
|
|
|
|
|
|
Example in C:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
/*
|
2013-12-22 18:37:29 +01:00
|
|
|
* weechat.c - core functions for WeeChat
|
|
|
|
*
|
2015-01-01 09:23:23 +01:00
|
|
|
* Copyright (C) 2015 Your Name <your@email.com>
|
2011-11-06 00:16:13 +01:00
|
|
|
*
|
|
|
|
* This file is part of WeeChat, the extensible chat client.
|
|
|
|
*
|
|
|
|
* WeeChat is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* WeeChat is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[coding_c_style]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== C style
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Some basic rules you *must* follow when you write C code:
|
|
|
|
|
|
|
|
* Use 4 spaces for indentation. Don't use tabs, they are evil.
|
|
|
|
* Try to not exceed 80 chars by line, except if this is needed to increase
|
|
|
|
readability.
|
2012-12-13 18:51:44 +01:00
|
|
|
* Use comments `/* comment */` (not C99-style comments like `// comment`).
|
2014-02-02 09:49:59 +01:00
|
|
|
* Add a comment before any function, to explain what it does (always use a
|
|
|
|
multi-line comment, even if description is very short).
|
2012-12-13 18:51:44 +01:00
|
|
|
|
|
|
|
Example:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
/*
|
2012-12-13 18:51:44 +01:00
|
|
|
* Checks if a string with boolean value is valid.
|
|
|
|
*
|
|
|
|
* Returns:
|
|
|
|
* 1: boolean value is valid
|
|
|
|
* 0: boolean value is NOT valid
|
2011-11-06 00:16:13 +01:00
|
|
|
*/
|
|
|
|
|
2012-12-13 18:51:44 +01:00
|
|
|
int
|
2011-11-06 00:16:13 +01:00
|
|
|
foo ()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* one line comment */
|
|
|
|
i = 1;
|
|
|
|
|
|
|
|
/*
|
2012-12-13 18:51:44 +01:00
|
|
|
* multi-line comment: this is a very long description about next block
|
|
|
|
* of code
|
2011-11-06 00:16:13 +01:00
|
|
|
*/
|
|
|
|
i = 2;
|
|
|
|
printf ("%d\n", i);
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
* Use explicit variable names, for example "nicks_count" instead of "n" or "nc".
|
2013-01-07 10:31:32 +01:00
|
|
|
Exception: in `for` loops, where variables like "i" or "n" are OK.
|
2011-11-06 00:16:13 +01:00
|
|
|
* Initialize local variables after declaration, in body of function, example:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
void
|
|
|
|
foo ()
|
|
|
|
{
|
|
|
|
int nick_count, buffer_count;
|
|
|
|
|
|
|
|
nick_count = 0;
|
|
|
|
buffer_count = 1;
|
|
|
|
/* ... */
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-01-07 10:31:32 +01:00
|
|
|
* Use parentheses to explicitly show how expression is evaluated, even if
|
2014-02-02 09:49:59 +01:00
|
|
|
they are not required, for example: write `x + (y * z)` instead of `x + y * z`.
|
2011-11-06 00:16:13 +01:00
|
|
|
* Place curly brackets `{ }` alone on lines, and indent them with number of
|
|
|
|
spaces used for line above opening curly bracket (the `if` in example):
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
if (nicks_count == 1)
|
|
|
|
{
|
|
|
|
/* something */
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
* Use empty lines to separate many different blocks inside functions, and if
|
|
|
|
possible add a comment for each one, like this:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
/*
|
2012-12-13 18:51:44 +01:00
|
|
|
* Sends a message from out queue.
|
2011-11-06 00:16:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
|
|
|
irc_server_outqueue_send (struct t_irc_server *server)
|
|
|
|
{
|
|
|
|
/* ... */
|
|
|
|
|
|
|
|
/* send signal with command that will be sent to server */
|
|
|
|
irc_server_send_signal (server, "irc_out",
|
|
|
|
server->outqueue[priority]->command,
|
|
|
|
server->outqueue[priority]->message_after_mod,
|
|
|
|
NULL);
|
|
|
|
tags_to_send = irc_server_get_tags_to_send (server->outqueue[priority]->tags);
|
|
|
|
irc_server_send_signal (server, "irc_outtags",
|
|
|
|
server->outqueue[priority]->command,
|
|
|
|
server->outqueue[priority]->message_after_mod,
|
|
|
|
(tags_to_send) ? tags_to_send : "");
|
|
|
|
if (tags_to_send)
|
|
|
|
free (tags_to_send);
|
|
|
|
|
|
|
|
/* send command */
|
|
|
|
irc_server_send (server, server->outqueue[priority]->message_after_mod,
|
|
|
|
strlen (server->outqueue[priority]->message_after_mod));
|
|
|
|
server->last_user_message = time_now;
|
|
|
|
|
|
|
|
/* start redirection if redirect is set */
|
|
|
|
if (server->outqueue[priority]->redirect)
|
|
|
|
{
|
|
|
|
irc_redirect_init_command (server->outqueue[priority]->redirect,
|
|
|
|
server->outqueue[priority]->message_after_mod);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
* Indent the `if` conditions, and use parentheses around conditions with an
|
2014-01-29 22:37:33 +01:00
|
|
|
operator (not needed for single boolean), like this:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
if (something)
|
|
|
|
{
|
|
|
|
/* something */
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* something else */
|
|
|
|
}
|
|
|
|
|
|
|
|
if (my_boolean1 && my_boolean2 && (i == 10)
|
|
|
|
&& ((buffer1 != buffer2) || (window1 != window2)))
|
|
|
|
{
|
|
|
|
/* something */
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* something else */
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
* Indent the `switch` statements like this:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
switch (string[0])
|
|
|
|
{
|
2014-02-02 11:10:33 +01:00
|
|
|
case 'A': /* first case */
|
2011-11-06 00:16:13 +01:00
|
|
|
foo ("abc", "def");
|
|
|
|
break;
|
2014-02-02 11:10:33 +01:00
|
|
|
case 'B': /* second case */
|
2011-11-06 00:16:13 +01:00
|
|
|
bar (1, 2, 3);
|
|
|
|
break;
|
2014-02-02 11:10:33 +01:00
|
|
|
default: /* other cases */
|
2011-11-06 00:16:13 +01:00
|
|
|
baz ();
|
|
|
|
break;
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
* Use `typedef` for function prototypes but not for structures:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
typedef int (t_hook_callback_fd)(void *data, int fd);
|
|
|
|
|
|
|
|
struct t_hook_fd
|
|
|
|
{
|
|
|
|
t_hook_callback_fd *callback; /* fd callback */
|
|
|
|
int fd; /* socket or file descriptor */
|
|
|
|
int flags; /* fd flags (read,write,..) */
|
|
|
|
int error; /* contains errno if error occurred */
|
|
|
|
/* with fd */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
|
|
|
|
struct t_hook_fd *new_hook_fd;
|
|
|
|
|
|
|
|
new_hook_fd = malloc (sizeof (*new_hook_fd));
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 11:10:33 +01:00
|
|
|
* This Lisp code can be used in your '~/.emacs.el' to indent properly if you are
|
2011-11-06 00:16:13 +01:00
|
|
|
using Emacs as text editor:
|
|
|
|
|
|
|
|
[source,lisp]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2015-05-17 07:48:21 +02:00
|
|
|
(add-hook 'c-mode-common-hook
|
|
|
|
'(lambda ()
|
|
|
|
(c-toggle-hungry-state t)
|
|
|
|
(c-set-style "k&r")
|
|
|
|
(setq c-basic-offset 4)
|
|
|
|
(c-tab-always-indent t)
|
|
|
|
(c-set-offset 'case-label '+)))
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[coding_python_style]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Python style
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
See http://www.python.org/dev/peps/pep-0008/
|
|
|
|
|
|
|
|
[[core_internals]]
|
2013-11-04 21:41:34 +01:00
|
|
|
== Core internals
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[naming_convention]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Naming convention
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[naming_convention_files]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Files
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
File names are composed by letters and hyphens, with format: 'xxx-yyyyy.[ch]',
|
2014-02-02 09:49:59 +01:00
|
|
|
where 'xxx' is directory/component (can be abbreviation) and 'yyyyy' a name for
|
|
|
|
the file.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
The main file of a directory may have same name as directory, for example
|
|
|
|
'irc.c' in irc plugin.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
[width="100%",cols="1l,5",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-08-02 22:28:43 +02:00
|
|
|
| Directory | Files
|
|
|
|
| src/core/ | weechat.c, wee-backtrace.c, wee-command.c, ...
|
|
|
|
| src/gui/ | gui-bar.c, gui-bar-item.c, gui-bar-window.c, ...
|
|
|
|
| src/gui/curses/ | gui-curses-bar.c, gui-curses-bar-window.c, gui-curses-chat.c, ...
|
|
|
|
| src/plugins/ | plugin.c, plugin-api.c, plugin-config.c, plugin-script.c, ...
|
|
|
|
| src/plugins/irc/ | irc.c, irc-bar-item.c, irc-buffer.c, ...
|
|
|
|
| src/plugins/python/ | weechat-python.c, weechat-python-api.c, ...
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
The headers of C files have same name as file, for example 'wee-command.h' for
|
|
|
|
file 'wee-command.c'.
|
|
|
|
|
|
|
|
[[naming_convention_structures]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Structures
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Structures have name 't_X_Y' or 't_X_Y_Z':
|
|
|
|
|
|
|
|
* 'X': directory/component (can be abbreviation)
|
|
|
|
* 'Y': end of file name
|
|
|
|
* 'Z': name for structure (optional)
|
|
|
|
|
|
|
|
Example: an IRC nick (from 'src/plugins/irc/irc-nick.h'):
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
struct t_irc_nick
|
|
|
|
{
|
|
|
|
char *name; /* nickname */
|
|
|
|
char *host; /* full hostname */
|
|
|
|
char *prefixes; /* string with prefixes enabled for nick */
|
|
|
|
char prefix[2]; /* current prefix (higher prefix set in */
|
|
|
|
/* prefixes) */
|
|
|
|
int away; /* 1 if nick is away */
|
|
|
|
char *color; /* color for nickname in chat window */
|
|
|
|
struct t_irc_nick *prev_nick; /* link to previous nick on channel */
|
|
|
|
struct t_irc_nick *next_nick; /* link to next nick on channel */
|
|
|
|
};
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[naming_convention_variables]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Variables
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Global variables (outside functions) have name 'X_Y_Z':
|
|
|
|
|
|
|
|
* 'X': directory/component (can be abbreviation)
|
|
|
|
* 'Y': end of file name
|
|
|
|
* 'Z': name for variable
|
|
|
|
|
|
|
|
Exception are variables for "last" node of a list, name is 'last_X' (where
|
|
|
|
'X' is name of variable, using singular form).
|
|
|
|
|
|
|
|
Example: windows (from 'src/gui/gui-window.c'):
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
struct t_gui_window *gui_windows = NULL; /* first window */
|
|
|
|
struct t_gui_window *last_gui_window = NULL; /* last window */
|
|
|
|
struct t_gui_window *gui_current_window = NULL; /* current window */
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
There is no naming convention for local variables (in functions). The only
|
2014-02-02 09:49:59 +01:00
|
|
|
recommendation is that name is explicit (not too short). +
|
2011-11-06 00:16:13 +01:00
|
|
|
Nevertheless, pointers to structures are often named 'ptr_xxxx', for example a
|
|
|
|
pointer on a 'struct t_gui_buffer *' will be: '*ptr_buffer'.
|
|
|
|
|
|
|
|
[[naming_convention_functions]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Functions
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Naming convention for functions is the same as
|
2014-02-02 09:49:59 +01:00
|
|
|
<<naming_convention_variables,variables>>.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Example: creation of a new window (from 'src/gui/gui-window.c'):
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
/*
|
2012-12-13 18:51:44 +01:00
|
|
|
* Creates a new window.
|
|
|
|
*
|
|
|
|
* Returns pointer to new window, NULL if error.
|
2011-11-06 00:16:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct t_gui_window *
|
|
|
|
gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
|
|
|
|
int x, int y, int width, int height,
|
|
|
|
int width_pct, int height_pct)
|
|
|
|
{
|
|
|
|
/* ... */
|
|
|
|
|
|
|
|
return new_window;
|
|
|
|
}
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[single_thread]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Single thread
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
WeeChat is single threaded. That means every part of code should execute very
|
|
|
|
fast, and that calls to functions like `sleep` are *strictly forbidden* (it is
|
|
|
|
true for WeeChat core, but also C plugins and scripts).
|
|
|
|
|
|
|
|
If for some reasons you have to sleep a while, use `hook_timer` with a callback.
|
|
|
|
|
|
|
|
[[doubly_linked_lists]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Doubly linked lists
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Most of WeeChat linked lists are doubly linked lists: each node has pointer to
|
|
|
|
previous and next node.
|
|
|
|
|
|
|
|
Example: list of buffers (from 'src/gui/gui-buffer.h'):
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
struct t_gui_buffer
|
|
|
|
{
|
|
|
|
/* data */
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
|
|
|
|
struct t_gui_buffer *prev_buffer; /* link to previous buffer */
|
|
|
|
struct t_gui_buffer *next_buffer; /* link to next buffer */
|
|
|
|
};
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Then the two list pointers, to the head and tail of list:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
struct t_gui_buffer *gui_buffers = NULL; /* first buffer */
|
|
|
|
struct t_gui_buffer *last_gui_buffer = NULL; /* last buffer */
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2012-02-10 18:02:06 +01:00
|
|
|
[[color_codes_in_strings]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Color codes in strings
|
2012-02-10 18:02:06 +01:00
|
|
|
|
|
|
|
WeeChat uses own color codes in strings to display attributes (bold,
|
|
|
|
underline, ...) and colors on screen.
|
|
|
|
|
|
|
|
All attributes/colors are prefixed with a char in string, which can be:
|
|
|
|
|
|
|
|
* '0x19': color code (followed by color code(s))
|
|
|
|
* '0x1A': set attribute (followed by attribute on one char)
|
|
|
|
* '0x1B': remove attribute (followed by attribute on one char)
|
|
|
|
* '0x1C': reset (nothing after)
|
|
|
|
|
|
|
|
Allowed attributes are (one or more chars):
|
|
|
|
|
|
|
|
* `*`: bold
|
|
|
|
* `!`: reverse
|
|
|
|
* `/`: italic
|
|
|
|
* `_`: underline
|
|
|
|
* `|`: keep attributes
|
|
|
|
|
|
|
|
Possible colors are:
|
|
|
|
|
|
|
|
* standard color: optional attributes + number on 2 digits
|
|
|
|
* extended color: `@` + optional attributes + number on 5 digits
|
|
|
|
|
|
|
|
In following table, these conventions are used:
|
|
|
|
|
|
|
|
* `STD`: standard color (2 digits)
|
|
|
|
* `(A)STD`: standard color with optional attributes (attributes + 2 digits)
|
|
|
|
* `EXT`: extended color (`@` + 5 digits)
|
|
|
|
* `(A)EXT`: extended color with optional attributes (`@` + attributes + 5 digits)
|
|
|
|
* `ATTR`: one attribute char (`*`, `!`, `/`, `_` or `|`)
|
|
|
|
|
|
|
|
All combinations are summarized in this table:
|
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
[width="100%",cols="4,2,2,8",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2013-12-02 19:10:08 +01:00
|
|
|
| Code | Example | Areas | Description
|
|
|
|
| hex[19] + STD | hex[19]`01` | chat + bars | Set attributes and color using option, see table below
|
|
|
|
| hex[19] + EXT | hex[19]`@00001` | chat | Set color with a ncurses pair (used only on `/color` buffer)
|
|
|
|
| hex[19] + "F" + (A)STD | hex[19]`F*05` | chat + bars | Set foreground (WeeChat color)
|
|
|
|
| hex[19] + "F" + (A)EXT | hex[19]`F@00214` | chat + bars | Set foreground (extended color)
|
|
|
|
| hex[19] + "B" + STD | hex[19]`B05` | chat + bars | Set background (WeeChat color)
|
|
|
|
| hex[19] + "B" + EXT | hex[19]`B@00124` | chat + bars | Set background (extended color)
|
|
|
|
| hex[19] + "*" + (A)STD | hex[19]`*05` | chat + bars | Set foreground (WeeChat color)
|
|
|
|
| hex[19] + "*" + (A)EXT | hex[19]`*@00214` | chat + bars | Set foreground (extended color)
|
|
|
|
| hex[19] + "*" + (A)STD + "," + STD | hex[19]`*08,05` | chat + bars | Set foreground/background (WeeChat colors)
|
|
|
|
| hex[19] + "*" + (A)STD + "," + EXT | hex[19]`*01,@00214` | chat + bars | Set foreground (WeeChat color) and background (extended color)
|
|
|
|
| hex[19] + "*" + (A)EXT + "," + STD | hex[19]`*@00214,05` | chat + bars | Set foreground (extended color) and background (WeeChat color)
|
|
|
|
| hex[19] + "*" + (A)EXT + "," + EXT | hex[19]`*@00214,@00017` | chat + bars | Set foreground/background (extended colors)
|
|
|
|
| hex[19] + "b" + "F" | hex[19]`bF` | bars | Set bar foreground color
|
|
|
|
| hex[19] + "b" + "D" | hex[19]`bD` | bars | Set bar delimiter color
|
|
|
|
| hex[19] + "b" + "B" | hex[19]`bB` | bars | Set bar background color
|
|
|
|
| hex[19] + "b" + "_" | hex[19]`b_` | input bar | Start input char (used only in item "input_text")
|
|
|
|
| hex[19] + "b" + "-" | hex[19]`b-` | input bar | Start input hidden char (used only in item "input_text")
|
2014-01-17 09:41:01 +01:00
|
|
|
| hex[19] + "b" + "#" | hex[19]`b#` | input bar | Move cursor char (used only in item "input_text")
|
2013-12-02 19:10:08 +01:00
|
|
|
| hex[19] + "b" + "i" | hex[19]`bi` | bars | Start item
|
|
|
|
| hex[19] + "b" + "l" (lower L) | hex[19]`bl` | bars | Start line item
|
2014-02-02 09:49:59 +01:00
|
|
|
| hex[19] + "E" | hex[19]`E` | chat + bars | Emphasize text _(WeeChat ≥ 0.4.2)_
|
2013-12-02 19:10:08 +01:00
|
|
|
| hex[19] + hex[1C] | hex[19]hex[1C] | chat + bars | Reset color (keep attributes)
|
|
|
|
| hex[1A] + ATTR | hex[1A]`*` | chat + bars | Set attribute
|
|
|
|
| hex[1B] + ATTR | hex[1B]`*` | chat + bars | Remove attribute
|
|
|
|
| hex[1C] | hex[1C] | chat + bars | Reset attributes and color
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
Color codes using options (see 't_gui_color_enum', in file
|
|
|
|
'src/gui/gui-color.h'):
|
2012-02-10 18:02:06 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
[width="70%",cols="^1m,10",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
| Code | Option
|
|
|
|
| 00 | weechat.color.separator
|
|
|
|
| 01 | weechat.color.chat
|
|
|
|
| 02 | weechat.color.chat_time
|
|
|
|
| 03 | weechat.color.chat_time_delimiters
|
|
|
|
| 04 | weechat.color.chat_prefix_error
|
|
|
|
| 05 | weechat.color.chat_prefix_network
|
|
|
|
| 06 | weechat.color.chat_prefix_action
|
|
|
|
| 07 | weechat.color.chat_prefix_join
|
|
|
|
| 08 | weechat.color.chat_prefix_quit
|
|
|
|
| 09 | weechat.color.chat_prefix_more
|
|
|
|
| 10 | weechat.color.chat_prefix_suffix
|
|
|
|
| 11 | weechat.color.chat_buffer
|
|
|
|
| 12 | weechat.color.chat_server
|
|
|
|
| 13 | weechat.color.chat_channel
|
|
|
|
| 14 | weechat.color.chat_nick
|
|
|
|
| 15 | weechat.color.chat_nick_self
|
|
|
|
| 16 | weechat.color.chat_nick_other
|
|
|
|
| 17 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 18 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 19 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 20 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 21 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 22 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 23 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 24 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 25 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 26 | _(not used any more since WeeChat 0.3.4)_
|
|
|
|
| 27 | weechat.color.chat_host
|
|
|
|
| 28 | weechat.color.chat_delimiters
|
|
|
|
| 29 | weechat.color.chat_highlight
|
|
|
|
| 30 | weechat.color.chat_read_marker
|
|
|
|
| 31 | weechat.color.chat_text_found
|
|
|
|
| 32 | weechat.color.chat_value
|
|
|
|
| 33 | weechat.color.chat_prefix_buffer
|
2014-02-02 09:49:59 +01:00
|
|
|
| 34 | weechat.color.chat_tags _(WeeChat ≥ 0.3.6)_
|
|
|
|
| 35 | weechat.color.chat_inactive_window _(WeeChat ≥ 0.3.6)_
|
|
|
|
| 36 | weechat.color.chat_inactive_buffer _(WeeChat ≥ 0.3.6)_
|
|
|
|
| 37 | weechat.color.chat_prefix_buffer_inactive_buffer _(WeeChat ≥ 0.3.6)_
|
|
|
|
| 38 | weechat.color.chat_nick_offline _(WeeChat ≥ 0.3.9)_
|
|
|
|
| 39 | weechat.color.chat_nick_offline_highlight _(WeeChat ≥ 0.3.9)_
|
|
|
|
| 40 | weechat.color.chat_nick_prefix _(WeeChat ≥ 0.4.1)_
|
|
|
|
| 41 | weechat.color.chat_nick_suffix _(WeeChat ≥ 0.4.1)_
|
2015-10-07 20:42:06 +02:00
|
|
|
| 42 | weechat.color.emphasized _(WeeChat ≥ 0.4.2)_
|
2014-02-02 09:49:59 +01:00
|
|
|
| 43 | weechat.color.chat_day_change _(WeeChat ≥ 0.4.2)_
|
2015-12-24 07:53:37 +01:00
|
|
|
| 44 | weechat.color.chat_value_null _(WeeChat ≥ 1.4)_
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
|
|
|
|
WeeChat colors are:
|
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
[width="70%",cols="^1m,6",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
| Code | Color
|
2013-08-17 16:38:28 +02:00
|
|
|
| 00 | Default (terminal foreground/background)
|
|
|
|
| 01 | Black
|
|
|
|
| 02 | Dark gray
|
|
|
|
| 03 | Dark red
|
|
|
|
| 04 | Light red
|
|
|
|
| 05 | Dark green
|
|
|
|
| 06 | Light green
|
|
|
|
| 07 | Brown
|
|
|
|
| 08 | Yellow
|
|
|
|
| 09 | Dark blue
|
|
|
|
| 10 | Light blue
|
|
|
|
| 11 | Dark magenta
|
|
|
|
| 12 | Light magenta
|
|
|
|
| 13 | Dark cyan
|
|
|
|
| 14 | Light cyan
|
|
|
|
| 15 | Gray
|
|
|
|
| 16 | White
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
|
|
|
|
Examples of color codes:
|
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
[width="70%",cols="1,2",options="header"]
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2013-12-02 19:10:08 +01:00
|
|
|
| Code | Description
|
|
|
|
| hex[19]`01` | Color of option "01" (chat text)
|
|
|
|
| hex[19]`*08,03` | Yellow on red
|
|
|
|
| hex[19]`*@00214` | Orange (extended color 214)
|
|
|
|
| hex[19]`*@*_00214,@00017` | Bold underlined orange (214) on dark blue (17)
|
|
|
|
| hex[1A]`_` | Set underline
|
|
|
|
| hex[1B]`_` | Remove underline
|
|
|
|
| hex[1C] | Reset attributes and color
|
2013-11-04 21:41:34 +01:00
|
|
|
|===
|
2012-02-10 18:02:06 +01:00
|
|
|
|
2011-11-06 00:16:13 +01:00
|
|
|
[[plugin_internals]]
|
2013-11-04 21:41:34 +01:00
|
|
|
== Plugin internals
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
The file 'src/plugins/weechat-plugin.h' defines and exports all functions
|
2014-02-02 09:49:59 +01:00
|
|
|
available in the API.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
A structure called 't_weechat_plugin' is used to store info about plugin
|
|
|
|
(filename, name, author, description, ...) and all API functions, as pointers
|
|
|
|
to WeeChat functions.
|
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
Then some macros are defined to call these functions.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
For example, function 'hook_timer' is defined in structure 't_weechat_plugin'
|
|
|
|
like this:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
struct t_hook *(*hook_timer) (struct t_weechat_plugin *plugin,
|
|
|
|
long interval,
|
|
|
|
int align_second,
|
|
|
|
int max_calls,
|
|
|
|
int (*callback)(void *data,
|
|
|
|
int remaining_calls),
|
|
|
|
void *callback_data);
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
And the macro used to call this function is:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
#define weechat_hook_timer(__interval, __align_second, __max_calls, \
|
|
|
|
__callback, __data) \
|
|
|
|
weechat_plugin->hook_timer(weechat_plugin, __interval, \
|
|
|
|
__align_second, __max_calls, \
|
|
|
|
__callback, __data)
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
So in a plugin, the call to function will be for example:
|
|
|
|
|
|
|
|
[source,C]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
server->hook_timer_sasl = weechat_hook_timer (timeout * 1000,
|
|
|
|
0, 1,
|
|
|
|
&irc_server_timer_sasl_cb,
|
|
|
|
server);
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[contribute]]
|
2013-11-04 21:41:34 +01:00
|
|
|
== Contribute to WeeChat
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[git_repository]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Git repository
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-03-03 12:31:02 +01:00
|
|
|
Git repository is at this URL: https://github.com/weechat/weechat
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2015-05-17 07:48:21 +02:00
|
|
|
Any patch for bug or new feature must be done on master branch, preferred way
|
|
|
|
is a GitHub pull request. A patch can also be sent by e-mail
|
|
|
|
(made with `git diff` or `git format-patch`).
|
2012-06-30 17:37:23 +02:00
|
|
|
|
2014-03-23 08:27:18 +01:00
|
|
|
Format of commit message is the following (to close a GitHub issue):
|
|
|
|
|
|
|
|
----
|
|
|
|
component: fix a problem (closes #123)
|
|
|
|
----
|
|
|
|
|
|
|
|
For a Savannah bug:
|
2012-06-30 17:37:23 +02:00
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2012-06-30 17:37:23 +02:00
|
|
|
component: fix a problem (bug #12345)
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2012-06-30 17:37:23 +02:00
|
|
|
|
|
|
|
Where 'component' is one of following:
|
|
|
|
|
2014-03-23 08:27:18 +01:00
|
|
|
* WeeChat core: 'core' (files in root directory, 'po/' and 'src/',
|
|
|
|
except 'src/plugins/')
|
2012-06-30 17:37:23 +02:00
|
|
|
* documentation files: 'doc' (files in directory 'doc/')
|
2014-03-23 08:27:18 +01:00
|
|
|
* name of a plugin: 'irc', 'python', 'relay', ... (files in directory
|
|
|
|
'src/plugins/')
|
2012-06-30 17:37:23 +02:00
|
|
|
|
|
|
|
Some rules to follow:
|
|
|
|
|
2013-01-07 10:31:32 +01:00
|
|
|
* use only English
|
2012-06-30 17:37:23 +02:00
|
|
|
* use infinitive form of verb
|
2014-03-23 08:27:18 +01:00
|
|
|
* if commit is related to something in tracker, write it in parenthesis after
|
|
|
|
the message, with this format:
|
|
|
|
** GitHub: closes #123
|
|
|
|
** Savannah: bug #12345, task #12345, patch #12345
|
2012-06-30 17:37:23 +02:00
|
|
|
|
|
|
|
Examples of commit messages:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2014-03-23 08:27:18 +01:00
|
|
|
irc: add command /unquiet (closes #36)
|
2012-06-30 17:37:23 +02:00
|
|
|
core: add callback "nickcmp" for nick comparison in buffers
|
|
|
|
irc: fix freeze when reading on socket with SSL enabled (bug #35097)
|
|
|
|
ruby: add detection of ruby version 1.9.3 in cmake
|
|
|
|
python: fix crash when unloading a script without pointer to interpreter
|
2013-01-07 10:31:32 +01:00
|
|
|
core: update Japanese translations (patch #7783)
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[translations]]
|
2013-11-04 21:41:34 +01:00
|
|
|
=== Translations
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[gettext]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Gettext
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Gettext files are in directory 'po/'.
|
2014-02-02 09:49:59 +01:00
|
|
|
|
2011-11-06 00:16:13 +01:00
|
|
|
If you want to initialize a new language, use command `msginit`. For example to
|
2014-02-02 11:10:33 +01:00
|
|
|
create a file which is ready to translate to Dutch:
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
$ cd po
|
|
|
|
$ msginit -i weechat.pot -l nl_NL -o nl.po
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
Base language for WeeChat is English, so you must of course perfectly understand
|
|
|
|
English in order to translate to your language.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-01-02 22:49:35 +01:00
|
|
|
When done, you *have* to check your file with script 'msgcheck.py'
|
|
|
|
(https://github.com/flashcode/msgcheck):
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2013-01-02 22:49:35 +01:00
|
|
|
$ msgcheck.py xx.po
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[build_autogen_files]]
|
2013-11-04 21:41:34 +01:00
|
|
|
===== Build auto-generated files
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Files in directory 'doc/XX/autogen/' are auto-generated by script 'doc/docgen.py'.
|
|
|
|
|
|
|
|
Copy this python script to your python directory (for example '~/.weechat/python').
|
|
|
|
Then you can load this script in your WeeChat, and setup path to your '/doc' directory:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
/python load docgen.py
|
|
|
|
/set plugins.var.python.docgen.path "~/src/weechat/doc"
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
Then create this alias to build files:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2015-08-06 18:20:29 +03:00
|
|
|
/alias add doc /perl unload; /python unload; /ruby unload; /lua unload; /tcl unload; /guile unload; /javascript unload; /python load docgen.py; /wait 1ms /docgen
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
And use command `/doc` to build all files, for all languages.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[IMPORTANT]
|
|
|
|
When using command `/doc`, be sure all C plugins (irc, charset, ...) are loaded,
|
2014-02-02 09:49:59 +01:00
|
|
|
because files are built using data currently in memory.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
[[asciidoc]]
|
2013-11-04 21:41:34 +01:00
|
|
|
==== Asciidoc
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
Asciidoc files are in directory 'doc/XX/' where 'XX' is language (en, fr, de,
|
|
|
|
it, ...).
|
2011-11-06 00:16:13 +01:00
|
|
|
|
2014-02-02 09:49:59 +01:00
|
|
|
First make a copy of an English asciidoc file (in directory 'doc/en/'), then
|
|
|
|
work on it.
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
The translations missing in files are indicated by this string:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
// TRANSLATION MISSING
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
You must translate whole file except links and special keywords for notes,
|
|
|
|
warnings, ... These words must be kept unchanged:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
[[link_name]]
|
|
|
|
<<link_name>>
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
[TIP]
|
|
|
|
[IMPORTANT]
|
|
|
|
[WARNING]
|
|
|
|
[CAUTION]
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
|
|
|
|
When there is a name after `<<link_name>>`, then you must translate it:
|
|
|
|
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|
2011-11-06 00:16:13 +01:00
|
|
|
<<link_name,this text must be translated>>
|
2013-11-04 21:41:34 +01:00
|
|
|
----
|