summaryrefslogtreecommitdiff
path: root/doc/en/weechat_relay_protocol.en.txt
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-03-13 12:25:57 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-03-13 12:25:57 +0100
commit81cc688166b7c611907dcbf044e05f7412fcbd6c (patch)
tree40e264feeb1255d9ea913c3b64c7bdb729e60d41 /doc/en/weechat_relay_protocol.en.txt
parentd74041de2522c7583dc8562cd17d43c6f8004b30 (diff)
downloadweechat-81cc688166b7c611907dcbf044e05f7412fcbd6c.zip
doc: add range for integer/long integer objects, add examples with negative numbers (relay protocol)
Diffstat (limited to 'doc/en/weechat_relay_protocol.en.txt')
-rw-r--r--doc/en/weechat_relay_protocol.en.txt30
1 files changed, 22 insertions, 8 deletions
diff --git a/doc/en/weechat_relay_protocol.en.txt b/doc/en/weechat_relay_protocol.en.txt
index 2ec32ffb0..696bdae3b 100644
--- a/doc/en/weechat_relay_protocol.en.txt
+++ b/doc/en/weechat_relay_protocol.en.txt
@@ -1193,11 +1193,17 @@ Integer
A signed integer is 4 bytes, encoded as big-endian format (most significant byte
first).
-Example:
+Range: -2147483648 to 2147483647.
+
+Examples:
.......................................
┌────┬────┬────┬────┐
-│ 00 │ 00 │ 01 │ 04 │ ────► 260 (0x104)
+│ 00 │ 01 │ E2 │ 40 │ ────► 123456
+└────┴────┴────┴────┘
+
+┌────┬────┬────┬────┐
+│ FF │ FE │ 1D │ C0 │ ────► -123456
└────┴────┴────┴────┘
.......................................
@@ -1207,14 +1213,22 @@ Long integer
A signed long integer is encoded as a string, with length on one byte.
-Example:
+Range: -9223372036854775808 to 9223372036854775807.
+
+Examples:
.......................................
-┌────╥────┬────┬────┐
-│ 03 ║ 32 │ 36 │ 30 │ ────► 260
-└────╨────┴────┴────┘
- └──┘ └────────────┘
-length '2' '6' '0'
+┌────╥────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
+│ 0A ║ 31 │ 32 │ 33 │ 34 │ 35 │ 36 │ 37 │ 38 │ 39 │ 30 │ ────► 1234567890
+└────╨────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘
+ └──┘ └───────────────────────────────────────────────┘
+length '1' '2' '3' '4' '5' '6' '7' '8' '9' '0'
+
+┌────╥────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
+│ 0B ║ 2D │ 31 │ 32 │ 33 │ 34 │ 35 │ 36 │ 37 │ 38 │ 39 │ 30 │ ────► -1234567890
+└────╨────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘
+ └──┘ └────────────────────────────────────────────────────┘
+length '-' '1' '2' '3' '4' '5' '6' '7' '8' '9' '0'
.......................................
[[object_string]]