From 527aa3c563a6c151c242d45bd133311a0b40c391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 30 May 2020 09:46:48 +0200 Subject: doc: use a single line for some object examples (relay protocol) --- doc/en/weechat_relay_protocol.en.adoc | 74 +++++++++++------------------------ 1 file changed, 23 insertions(+), 51 deletions(-) (limited to 'doc/en') diff --git a/doc/en/weechat_relay_protocol.en.adoc b/doc/en/weechat_relay_protocol.en.adoc index 7524eef79..6500a6765 100644 --- a/doc/en/weechat_relay_protocol.en.adoc +++ b/doc/en/weechat_relay_protocol.en.adoc @@ -2511,13 +2511,9 @@ A _hdata_ contains a path with hdata names, list of keys, number of set of objects, and then set of objects (path with pointers, then objects). .... -┌────────┬──────┬───────╥────────┬─────────────────────╥── -│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ... -└────────┴──────┴───────╨────────┴─────────────────────╨── - - ──╥────────┬─────────────────────╥─────┐ - ... ║ p-path │ value 1 ... value N ║ ... │ - ──╨────────┴─────────────────────╨─────┘ +┌────────┬──────┬───────╥────────┬─────────────────────╥─────╥────────┬─────────────────────╥─────┐ +│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ... ║ p-path │ value 1 ... value N ║ ... │ +└────────┴──────┴───────╨────────┴─────────────────────╨─────╨────────┴─────────────────────╨─────┘ .... * _h-path_ (string): path used to reach hdata (example: @@ -2538,17 +2534,11 @@ keys (_number_ and _full_name_): hdata buffer:gui_buffers(*) number,full_name # response -┌────────┬──────────────────────────┬───╥── -│ buffer │ number:int,full_name:str │ 2 ║ ... -└────────┴──────────────────────────┴───╨── - └──────┘ └────────────────────────┘ └─┘ - h-path keys count - - ──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐ - ... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │ - ──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘ - └──────────────────────────┘ └────────────────────────────────┘ - buffer 1 buffer 2 +┌────────┬──────────────────────────┬───╥─────────┬───┬──────────────╥─────────┬───┬─────────────────────┐ +│ buffer │ number:int,full_name:str │ 2 ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │ irc.server.freenode │ +└────────┴──────────────────────────┴───╨─────────┴───┴──────────────╨─────────┴───┴─────────────────────┘ + └──────┘ └────────────────────────┘ └─┘ └──────────────────────────┘ └─────────────────────────────────┘ + h-path keys count buffer 1 buffer 2 .... Example of hdata with lines of core buffer: @@ -2696,17 +2686,11 @@ Example of infolist with two buffers (weechat core and freenode server): infolist buffer # response -┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥── -│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ ... -└────────┴───╨────┴─────────┴─────┴─────────┴─────╨── - └──────┘ └─┘ └──────────────────────────────────┘ - name count item 1 - - ──╥────┬─────────┬─────┬─────────┬─────┐ - ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │ - ──╨────┴─────────┴─────┴─────────┴─────┘ - └──────────────────────────────────┘ - item 2 +┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥────┬─────────┬─────┬─────────┬─────┐ +│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │ +└────────┴───╨────┴─────────┴─────┴─────────┴─────╨────┴─────────┴─────┴─────────┴─────┘ + └──────┘ └─┘ └──────────────────────────────────┘ └──────────────────────────────────┘ + name count item 1 item 2 .... [[object_array]] @@ -2717,33 +2701,21 @@ An array is a type (3 bytes) + number of objects (integer on 4 bytes) + data. Example of array with two strings: .... -┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥── -│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ ... -└─────╨────┴────┴────┴────╨────┴────┴────┴────╨── - └───┘ └─────────────────┘ └─────────────────┘ - type number of strings length - - ──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐ - ... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ] - ──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘ - └────────────┘ └─────────────────┘ └───────┘ - 'a' 'b' 'c' length 'd' 'e' +┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────╥────┬────┬────┬────╥────┬────┐ +│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ] +└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────╨────┴────┴────┴────╨────┴────┘ + └───┘ └─────────────────┘ └─────────────────┘ └────────────┘ └─────────────────┘ └───────┘ + type number of strings length 'a' 'b' 'c' length 'd' 'e' .... Example of array with three integers: .... -┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥── -│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ ... -└─────╨────┴────┴────┴────╨────┴────┴────┴────╨── - └───┘ └─────────────────┘ └─────────────────┘ - type number of integers 123 (0x7B) - - ──╥────┬────┬────┬────╥────┬────┬────┬────┐ - ... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ] - ──╨────┴────┴────┴────╨────┴────┴────┴────┘ - └─────────────────┘ └─────────────────┘ - 456 (0x1C8) 789 (0x315) +┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────┐ +│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ] +└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────┘ + └───┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ + type number of integers 123 (0x7B) 456 (0x1C8) 789 (0x315) .... A _NULL_ array: -- cgit v1.2.3