mirror of
https://github.com/eclipse/tinydtls.git
synced 2025-05-09 03:51:02 +08:00
Amend source formatting with rule for function definitions with multiple
lines. See discussion in PR #184. Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
This commit is contained in:
parent
a5fa982aa5
commit
b82a72b816
@ -116,16 +116,25 @@ dtls_get_peer(const dtls_context_t *ctx, const session_t *session) {
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
* If in this case the line with the function name and parameter-list exceeds
|
||||||
|
the line length of 80 characters caused by that parameter-list, then split
|
||||||
|
this list on multiple lines aligning with the first parameter.
|
||||||
|
|
||||||
|
```
|
||||||
|
int
|
||||||
|
dtls_read(const dtls_context_t *ctx, const session_t *session,
|
||||||
|
uint8_t* buffer, size_t buffer_length) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
* Declarations in header files do not follow the previous rule. For
|
* Declarations in header files do not follow the previous rule. For
|
||||||
example, the declaration for `dtls_get_peer()` in `dtls.h` reads as
|
example, the declaration for `dtls_get_peer()` in `dtls.h` reads as
|
||||||
follows:
|
follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
dtls_peer_t *dtls_get_peer(const dtls_context_t *context,
|
dtls_peer_t *dtls_get_peer(const dtls_context_t *context,
|
||||||
const session_t *session);
|
const session_t *session);
|
||||||
```
|
```
|
||||||
|
|
||||||
* A useful source code documentation is mandatory. Mostly to be done
|
* A useful source code documentation is mandatory. Mostly to be done
|
||||||
within the source code files.
|
within the source code files.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user