Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Sep 28, 2023
1 parent dfd4233 commit 5fe4314
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions docs/book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/book/en/iothread.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions docs/book/en/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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



Expand All @@ -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
Expand Down Expand Up @@ -380,7 +380,7 @@ The content of `exp` is as follows:
Return value:
- `0` - on success
- `-1` - failed
- `-1` - on failure
Expand Down Expand Up @@ -428,7 +428,7 @@ mln_string_t *res = mln_json_encode(&j);
Return value:
- `0` - on success
- `-1` - failed
- `-1` - on failure
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/book/en/lex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/book/en/regex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/book/en/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions docs/book/en/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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


Expand All @@ -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
Expand All @@ -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


Expand All @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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


Expand All @@ -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
Expand All @@ -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


Expand All @@ -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
Expand Down

0 comments on commit 5fe4314

Please sign in to comment.