From 5fe43144f87c6e6a4faeaac6cfe2df348bfc3d58 Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Thu, 28 Sep 2023 16:18:20 +0000 Subject: [PATCH] update docs --- docs/book/SUMMARY.md | 4 ++-- docs/book/en/iothread.md | 4 ++-- docs/book/en/json.md | 20 ++++++++++---------- docs/book/en/lex.md | 2 +- docs/book/en/regex.md | 2 +- docs/book/en/trace.md | 8 ++++---- docs/book/en/websocket.md | 24 ++++++++++++------------ 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/book/SUMMARY.md b/docs/book/SUMMARY.md index fe29105f..5a74505c 100644 --- a/docs/book/SUMMARY.md +++ b/docs/book/SUMMARY.md @@ -30,7 +30,7 @@ - [Spin Lock](en/spinlock.md) - [Prime Generator](en/prime.md) - [Data Structures](en/datastruct.md) - - [Doubly Linked List](en/double_link_list.md) + - [Doubly Linked List](en/double_linked_list.md) - [Fibonacci Heap](en/fheap.md) - [Hash Table](en/hash.md) - [Queue](en/queue.md) @@ -81,7 +81,7 @@ - [自旋锁](cn/spinlock.md) - [素数生成器](cn/prime.md) - [数据结构](cn/datastruct.md) - - [双向链表](cn/double_link_list.md) + - [双向链表](cn/double_linked_list.md) - [斐波那契堆](cn/fheap.md) - [哈希表](cn/hash.md) - [队列](cn/queue.md) diff --git a/docs/book/en/iothread.md b/docs/book/en/iothread.md index 473a415d..19c0efd7 100644 --- a/docs/book/en/iothread.md +++ b/docs/book/en/iothread.md @@ -70,8 +70,8 @@ Description: Send a message with message type `type` and message data `data` to Return value: -- `0` - success -- `-1` - failed +- `0` - on success +- `-1` - on failure - `1` - send buffer full diff --git a/docs/book/en/json.md b/docs/book/en/json.md index 898e7107..2059e6f5 100644 --- a/docs/book/en/json.md +++ b/docs/book/en/json.md @@ -102,8 +102,8 @@ Description: Initialize JSON type node `j` to object type. Return value: -- `0` - Success -- `-1` - failed +- `0` - on success +- `-1` - on failure @@ -117,8 +117,8 @@ Description: Initialize JSON type node `j` to array type. Return value: -- `0` - Success -- `-1` - failed +- `0` - on success +- `-1` - on failure @@ -132,8 +132,8 @@ Description: Parse the JSON string `jstr` into a data structure, and the result Return value: -- `0` - Success -- `-1` - failed +- `0` - on success +- `-1` - on failure @@ -380,7 +380,7 @@ The content of `exp` is as follows: Return value: - `0` - on success -- `-1` - failed +- `-1` - on failure @@ -428,7 +428,7 @@ mln_string_t *res = mln_json_encode(&j); Return value: - `0` - on success -- `-1` - failed +- `-1` - on failure @@ -444,8 +444,8 @@ Description: Traverse each `key`-`value` pair in object `j`, and use `it` to pro Return value -- `0` - Success -- `-1` - failed +- `0` - on success +- `-1` - on failure #### mln_json_array_iterate diff --git a/docs/book/en/lex.md b/docs/book/en/lex.md index 0cca5e7e..e6668ab2 100644 --- a/docs/book/en/lex.md +++ b/docs/book/en/lex.md @@ -413,7 +413,7 @@ mln_lex_init_with_hooks(PREFIX_NAME,lex_ptr,attr_ptr) Description: This macro encapsulates the `mln_lex_init` function, which avoids the process of manually writing code to complete custom preprocessing, callback functions, etc. -Return value: There is no return value, but it should be checked whether `lex_ptr` is `NULL` after called. `NULL` on failed, otherwise on success. +Return value: There is no return value, but it should be checked whether `lex_ptr` is `NULL` after called. `NULL` on failure, otherwise on success. diff --git a/docs/book/en/regex.md b/docs/book/en/regex.md index 1ab5c5e1..8e264a4f 100644 --- a/docs/book/en/regex.md +++ b/docs/book/en/regex.md @@ -46,7 +46,7 @@ return value: - `0` is an exact match - `>0` the number of results matched -- `<0` failed to execute, possibly due to insufficient memory +- `<0` execute failed, possibly due to insufficient memory diff --git a/docs/book/en/trace.md b/docs/book/en/trace.md index 11c170e1..50517751 100644 --- a/docs/book/en/trace.md +++ b/docs/book/en/trace.md @@ -47,8 +47,8 @@ mln_trace(fmt, ...); Description: Send some data to the specified processing script. The parameters here are exactly the same as `fmt` and its variable parameters of the `mln_lang_ctx_pipe_send` function ([see this chapter for details](https://water-melon.github.io/Melon/en/melang.html)), Because the inside of this macro is to call the function to complete the message delivery. return value: -- `0` - success -- `-1` - failed +- `0` - on success +- `-1` - on failure @@ -82,8 +82,8 @@ If the tracing script is successfully initialized in the main process, a global return value: -- `0` - success -- `-1` - failed +- `0` - on success +- `-1` - on failure diff --git a/docs/book/en/websocket.md b/docs/book/en/websocket.md index 129a1a16..cb944d9b 100644 --- a/docs/book/en/websocket.md +++ b/docs/book/en/websocket.md @@ -122,7 +122,7 @@ Description: Set the HTTP header for the first interaction of the websocket. If return value: -- `M_WS_RET_FAILED` failed +- `M_WS_RET_FAILED` on failure - `M_WS_RET_OK` on success @@ -149,7 +149,7 @@ Description: Compare the header fields in the websocket with the header fields i return value: -- `M_WS_RET_ERROR` failed +- `M_WS_RET_ERROR` on failure - `M_WS_RET_OK` on success @@ -164,7 +164,7 @@ Description: Generate a websocket handshake response message, the content of the return value: -- `M_WS_RET_FAILED` failed +- `M_WS_RET_FAILED` on failure - `M_WS_RET_OK` on success @@ -179,7 +179,7 @@ Description: Generate a websocket handshake request message, the content of the return value: -- `M_WS_RET_FAILED` failed +- `M_WS_RET_FAILED` on failure - `M_WS_RET_OK` on success @@ -201,7 +201,7 @@ Description: Generates a text data frame. `out_cnode` is the generated frame dat return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -223,7 +223,7 @@ Description: Generates a binary data frame. `out_cnode` is the generated frame d return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -261,7 +261,7 @@ flags has several values, and these values can be assigned together using the OR return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -283,7 +283,7 @@ Description: Generate a ping message, `out_cnode` is the generated message, flag return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -305,7 +305,7 @@ Description: Generate a pong message, `out_cnode` is the generated message, flag return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -321,7 +321,7 @@ Description: Generate a message based on the current contents of the `ws` struct return value: - `M_WS_RET_ERROR` data is wrong -- `M_WS_RET_FAILED` failed, e.g. out of memory, etc. +- `M_WS_RET_FAILED` on failure, e.g. out of memory, etc. - `M_WS_RET_OK` on success @@ -338,8 +338,8 @@ return value: - `M_WS_RET_ERROR` message error - `M_WS_RET_OK` parsed successfully -- `M_WS_RET_FAILED` failed to parse, such as out of memory, etc. -- `M_WS_RET_NOTYET` successful but the data is incomplete and needs to continue processing +- `M_WS_RET_FAILED` parse failed, such as out of memory, etc. +- `M_WS_RET_NOTYET` on success but the data is incomplete and needs to continue processing