Skip to content

Commit

Permalink
api: add function hook_url
Browse files Browse the repository at this point in the history
  • Loading branch information
flashcode committed Sep 16, 2023
1 parent a5f4c37 commit 63922ca
Show file tree
Hide file tree
Showing 18 changed files with 740 additions and 60 deletions.
3 changes: 1 addition & 2 deletions ChangeLog.adoc
Expand Up @@ -27,8 +27,7 @@ New features::
* core: add options weechat.buffer.* to save buffer properties set by user, add option `setauto` in command `/buffer` (issue #352)
* core: add parameters and key bindings to move to edges of current area with commands `/cursor go` and `/cursor move` (issue #1282)
* core: add variables "_chat_focused_line_bol" and "_chat_focused_line_eol" in focus data (issue #1955)
* core: add algorithms `sha512-224`, `sha512-256`, `sha3-*`, blake2b-*` and `blake2s-*` in option sec.crypt.hash_algo (issue #2008)
* api: add algorithms `sha512-224`, `sha512-256`, blake2b-*` and `blake2s-*` in hash functions (issue #2008)
* api: add function hook_url, add option `url` in command `/debug` (issue #1723)
* api: add support of path to variable and hashtable comparison in function hdata_compare (issue #1066)
* api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
* api: add info "buffer" (issue #1962)
Expand Down
1 change: 1 addition & 0 deletions doc/en/weechat_dev.en.adoc
Expand Up @@ -167,6 +167,7 @@ WeeChat "core" is located in following directories:
|       wee-hook-process.c | Hook "process".
|       wee-hook-signal.c | Hook "signal".
|       wee-hook-timer.c | Hook "timer".
|       wee-hook-url.c | Hook "url".
| gui/ | Functions for buffers, windows, ... (used by all interfaces).
|    gui-bar-item.c | Bar items.
|    gui-bar-window.c | Bar windows.
Expand Down
1 change: 1 addition & 0 deletions doc/fr/weechat_dev.fr.adoc
Expand Up @@ -169,6 +169,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|       wee-hook-process.c | Hook "process".
|       wee-hook-signal.c | Hook "signal".
|       wee-hook-timer.c | Hook "timer".
|       wee-hook-url.c | Hook "url".
| gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|    gui-bar-item.c | Objets de barre.
|    gui-bar-window.c | Fenêtres de barre.
Expand Down
1 change: 1 addition & 0 deletions doc/ja/weechat_dev.ja.adoc
Expand Up @@ -180,6 +180,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|       wee-hook-process.c | "process" フック
|       wee-hook-signal.c | "signal" フック
|       wee-hook-timer.c | "timer" フック
|       wee-hook-url.c | "url" フック
| gui/ | バッファ、ウィンドウなどの関数 (全てのインターフェースで利用)
|    gui-bar-item.c | バー要素
|    gui-bar-window.c | バーウィンドウ
Expand Down
1 change: 1 addition & 0 deletions doc/sr/weechat_dev.sr.adoc
Expand Up @@ -169,6 +169,7 @@ WeeChat „језгро” се налази у следећим директо
|       wee-hook-process.c | Кука "process".
|       wee-hook-signal.c | Кука "signal".
|       wee-hook-timer.c | Кука "timer".
|       wee-hook-url.c | Кука "url".
| gui/ | Функције за бафере, прозоре, ... (користе их сви интерфејси).
|    gui-bar-item.c | Ставке трака.
|    gui-bar-window.c | Прозори трака.
Expand Down
2 changes: 2 additions & 0 deletions po/srcfiles.cmake
Expand Up @@ -35,6 +35,8 @@ SET(WEECHAT_SOURCES
./src/core/hook/wee-hook-signal.h
./src/core/hook/wee-hook-timer.c
./src/core/hook/wee-hook-timer.h
./src/core/hook/wee-hook-url.c
./src/core/hook/wee-hook-url.h
./src/core/wee-arraylist.c
./src/core/wee-arraylist.h
./src/core/wee-backtrace.c
Expand Down
1 change: 1 addition & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -72,6 +72,7 @@ set(LIB_CORE_SRC
hook/wee-hook-process.c hook/wee-hook-process.h
hook/wee-hook-signal.c hook/wee-hook-signal.h
hook/wee-hook-timer.c hook/wee-hook-timer.h
hook/wee-hook-url.c hook/wee-hook-url.h
)

# Check for flock support
Expand Down
4 changes: 3 additions & 1 deletion src/core/hook/wee-hook-process.c
Expand Up @@ -278,7 +278,9 @@ hook_process_child (struct t_hook *hook_process)
{
ptr_url++;
}
rc = weeurl_download (ptr_url, HOOK_PROCESS(hook_process, options));
rc = weeurl_download (ptr_url,
HOOK_PROCESS(hook_process, options),
NULL); /* output */
}
else if (strncmp (HOOK_PROCESS(hook_process, command), "func:", 5) == 0)
{
Expand Down

0 comments on commit 63922ca

Please sign in to comment.