docs: spellfixes

Pointed by the new CI job
This commit is contained in:
Daniel Stenberg 2022-09-20 23:30:19 +02:00
parent 72c41f7c8b
commit fd1ce3d4b0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
188 changed files with 1203 additions and 1208 deletions

View file

@ -9,17 +9,18 @@ The `struct dynbuf` is used to hold data for each instance of a dynamic
buffer. The members of that struct **MUST NOT** be accessed or modified
without using the dedicated dynbuf API.
## init
## `Curl_dyn_init`
```c
void Curl_dyn_init(struct dynbuf *s, size_t toobig);
```
This inits a struct to use for dynbuf and it cannot fail. The `toobig` value
**must** be set to the maximum size we allow this buffer instance to grow to.
The functions below will return `CURLE_OUT_OF_MEMORY` when hitting this limit.
This initializes a struct to use for dynbuf and it cannot fail. The `toobig`
value **must** be set to the maximum size we allow this buffer instance to
grow to. The functions below will return `CURLE_OUT_OF_MEMORY` when hitting
this limit.
## free
## `Curl_dyn_free`
```c
void Curl_dyn_free(struct dynbuf *s);
@ -28,7 +29,7 @@ void Curl_dyn_free(struct dynbuf *s);
Free the associated memory and clean up. After a free, the `dynbuf` struct can
be re-used to start appending new data to.
## addn
## `Curl_dyn_addn`
```c
CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
@ -36,7 +37,7 @@ CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
Append arbitrary data of a given length to the end of the buffer.
## add
## `Curl_dyn_add`
```c
CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
@ -44,7 +45,7 @@ CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
Append a C string to the end of the buffer.
## addf
## `Curl_dyn_addf`
```c
CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
@ -52,7 +53,7 @@ CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
Append a `printf()`-style string to the end of the buffer.
## vaddf
## `Curl_dyn_vaddf`
```c
CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
@ -60,7 +61,7 @@ CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
Append a `vprintf()`-style string to the end of the buffer.
## reset
## `Curl_dyn_reset`
```c
void Curl_dyn_reset(struct dynbuf *s);
@ -68,7 +69,7 @@ void Curl_dyn_reset(struct dynbuf *s);
Reset the buffer length, but leave the allocation.
## tail
## `Curl_dyn_tail`
```c
CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length);
@ -79,7 +80,7 @@ buffer). The rest of the buffer is dropped. The specified `length` must not be
larger than the buffer length. To instead keep the leading part, see
`Curl_dyn_setlen()`.
## ptr
## `Curl_dyn_ptr`
```c
char *Curl_dyn_ptr(const struct dynbuf *s);
@ -89,7 +90,7 @@ Returns a `char *` to the buffer if it has a length, otherwise may return
NULL. Since the buffer may be reallocated, this pointer should not be trusted
or used anymore after the next buffer manipulation call.
## uptr
## `Curl_dyn_uptr`
```c
unsigned char *Curl_dyn_uptr(const struct dynbuf *s);
@ -99,7 +100,7 @@ Returns an `unsigned char *` to the buffer if it has a length, otherwise may
return NULL. Since the buffer may be reallocated, this pointer should not be
trusted or used anymore after the next buffer manipulation call.
## len
## `Curl_dyn_len`
```c
size_t Curl_dyn_len(const struct dynbuf *s);
@ -108,7 +109,7 @@ size_t Curl_dyn_len(const struct dynbuf *s);
Returns the length of the buffer in bytes. Does not include the terminating
zero byte.
## setlen
## `Curl_dyn_setlen`
```c
CURLcode Curl_dyn_setlen(struct dynbuf *s, size_t len);