Skip to content

Commit efa8f73

Browse files
committed
Fix typo of README.md
1 parent d335b68 commit efa8f73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tinync/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ Tinync is a simplified version of [nc](https://en.wikipedia.org/wiki/Netcat), wh
55
### Declaring a Coroutine Function
66
At the very beginning, a coroutine function should be declared first, coroutine function is part of program that will be executed simultaneously with other coroutines. All coroutines should be specified with the macro `cr_proto`, following shows the example:
77
```cpp
8-
static void cr_proto(coroutine_name, int x, float y)
8+
static void cr_proto(coroutine_name, parameter_declarations)
99
{
1010
/* coroutine body */
1111
}
1212
```
13-
Programmers are free to modify the argument list as they need.
1413
1514
### Controlling Macros
1615
With in the coroutine, there are several macros for controlling the behavior of coroutine, following are list of them:
@@ -20,14 +19,15 @@ With in the coroutine, there are several macros for controlling the behavior of
2019
* `cr_exit` not only yields a coroutine but also updates its state with given state.
2120
* `cr_sys` is a wrapper of `cr_wait` which performs waiting on system calls and other functions that return -1 and set `errno`.
2221
* `cr_local` is a marker for programmers to recognize a variable related to coroutine easily.
22+
2323
In `tinync.c`, we can see the combinations of these macros:
2424
```cpp
2525
static void cr_proto(stdin_loop, byte_queue_t *out)
2626
{
2727
/* b and r are variables used in coroutine whose
2828
* value will be preserved across pauses.
2929
*/
30-
cr_local uint9_t b;
30+
cr_local uint8_t b;
3131
cr_local int r;
3232
3333
cr_begin(); // Initiates the context of this coroutine.

0 commit comments

Comments
 (0)