Commit b5dd54a4 authored by Alexander Alashkin's avatar Alexander Alashkin Committed by Cesanta Bot

Fix doc typos

PUBLISHED_FROM=1bdacf793b35ebe70d0a3a9d64260dd2bd135c73
parent f7c0a2ee
......@@ -7,5 +7,5 @@ signature: |
---
Frees the memory allocated for options.
If the cm paramater doesn't contain any option it does nothing.
If the cm parameter doesn't contain any option it does nothing.
......@@ -21,5 +21,5 @@ This function doesn't update the `name` and `rdata` pointers in the `rr`
struct because they might be invalidated as soon as the IO buffer grows
again.
Returns the number of bytes appened or -1 in case of error.
Returns the number of bytes appended or -1 in case of error.
......@@ -12,7 +12,7 @@ Sends a redirect response.
`status_code` should be either 301 or 302 and `location` point to the
new location.
If `extra_headers` is not empty, then `extra_headers` are also sent
after the reponse line. `extra_headers` must NOT end end with new line.
after the response line. `extra_headers` must NOT end end with new line.
Example:
......
......@@ -9,7 +9,7 @@ signature: |
Sends the response status line.
If `extra_headers` is not NULL, then `extra_headers` are also sent
after the reponse line. `extra_headers` must NOT end end with new line.
after the response line. `extra_headers` must NOT end end with new line.
Example:
mg_send_response_line(nc, 200, "Access-Control-Allow-Origin: *");
......
......@@ -15,7 +15,7 @@ the same as for the `mg_connect()` call, where `HOST` part is optional.
`address` can be just a port number, e.g. `:8000`. To bind to a specific
interface, an IP address can be specified, e.g. `1.2.3.4:8000`. By default,
a TCP connection is created. To create UDP connection, prepend `udp://`
prefix, e.g. `udp://:8000`. To summarize, `address` paramer has following
prefix, e.g. `udp://:8000`. To summarize, `address` parameter has following
format: `[PROTO://][IP_ADDRESS]:PORT`, where `PROTO` could be `tcp` or
`udp`.
......
......@@ -18,7 +18,7 @@ Subnet masks may vary from 0 to 32, inclusive. The default setting
is to allow all access. On each request the full list is traversed,
and the last match wins. Example:
`-0.0.0.0/0,+192.168/16` - deny all acccesses, only allow 192.168/16 subnet
`-0.0.0.0/0,+192.168/16` - deny all accesses, only allow 192.168/16 subnet
To learn more about subnet masks, see this
link:https://en.wikipedia.org/wiki/Subnetwork[Wikipedia page on Subnetwork].
......
......@@ -35,7 +35,7 @@ The exec directive is used to execute a command on a server,
and show command's output. Example: `<!--#exec "ls -l" -->`
The call directive is a way to invoke a C handler from the HTML page.
On each occurence of `<!--#call PARAMS -->` directive,
On each occurrence of `<!--#call PARAMS -->` directive,
Mongoose calls a registered event handler with `MG_EV_SSI_CALL` event.
Event parameter will point to the `PARAMS` string.
An event handler can output any text, for example by calling
......
......@@ -2342,7 +2342,7 @@ MG_INTERNAL struct mg_connection *mg_create_connection(
* Address format: [PROTO://][HOST]:PORT
*
* HOST could be IPv4/IPv6 address or a host name.
* `host` is a destination buffer to hold parsed HOST part. Shoud be at least
* `host` is a destination buffer to hold parsed HOST part. Should be at least
* MG_MAX_HOST_LEN bytes long.
* `proto` is a returned socket type, either SOCK_STREAM or SOCK_DGRAM
*
......@@ -13395,7 +13395,7 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
(SL_FD_ISSET(nc->sock, &write_set) ? _MG_F_FD_CAN_WRITE : 0) |
(SL_FD_ISSET(nc->sock, &err_set) ? _MG_F_FD_ERROR : 0);
}
/* SimpleLink does not report UDP sockets as writeable. */
/* SimpleLink does not report UDP sockets as writable. */
if (nc->flags & MG_F_UDP && nc->send_mbuf.len > 0) {
fd_flags |= _MG_F_FD_CAN_WRITE;
}
......@@ -13418,7 +13418,7 @@ time_t mg_sl_if_poll(struct mg_iface *iface, int timeout_ms) {
void mg_sl_if_get_conn_addr(struct mg_connection *nc, int remote,
union socket_address *sa) {
/* SimpleLink does not provide a way to get socket's peer address after
* accept or connect. Address hould have been preserved in the connection,
* accept or connect. Address should have been preserved in the connection,
* so we do our best here by using it. */
if (remote) memcpy(sa, &nc->sa, sizeof(*sa));
}
......
......@@ -3235,7 +3235,7 @@ typedef void (*mg_event_handler_t)(struct mg_connection *nc, int ev,
#define MG_EV_POLL 0 /* Sent to each connection on each mg_mgr_poll() call */
#define MG_EV_ACCEPT 1 /* New connection accepted. union socket_address * */
#define MG_EV_CONNECT 2 /* connect() succeeded or failed. int * */
#define MG_EV_RECV 3 /* Data has benn received. int *num_bytes */
#define MG_EV_RECV 3 /* Data has been received. int *num_bytes */
#define MG_EV_SEND 4 /* Data has been written to a socket. int *num_bytes */
#define MG_EV_CLOSE 5 /* Connection is closed. NULL */
#define MG_EV_TIMER 6 /* now >= conn->ev_timer_time. double * */
......@@ -3495,7 +3495,7 @@ struct mg_connection *mg_bind(struct mg_mgr *, const char *,
* `address` can be just a port number, e.g. `:8000`. To bind to a specific
* interface, an IP address can be specified, e.g. `1.2.3.4:8000`. By default,
* a TCP connection is created. To create UDP connection, prepend `udp://`
* prefix, e.g. `udp://:8000`. To summarize, `address` paramer has following
* prefix, e.g. `udp://:8000`. To summarize, `address` parameter has following
* format: `[PROTO://][IP_ADDRESS]:PORT`, where `PROTO` could be `tcp` or
* `udp`.
*
......@@ -3701,7 +3701,7 @@ int mg_resolve(const char *domain_name, char *ip_addr_buf, size_t buf_len);
* is to allow all access. On each request the full list is traversed,
* and the last match wins. Example:
*
* `-0.0.0.0/0,+192.168/16` - deny all acccesses, only allow 192.168/16 subnet
* `-0.0.0.0/0,+192.168/16` - deny all accesses, only allow 192.168/16 subnet
*
* To learn more about subnet masks, see this
* link:https://en.wikipedia.org/wiki/Subnetwork[Wikipedia page on Subnetwork].
......@@ -4794,7 +4794,7 @@ void mg_printf_http_chunk(struct mg_connection *nc, const char *fmt, ...);
/*
* Sends the response status line.
* If `extra_headers` is not NULL, then `extra_headers` are also sent
* after the reponse line. `extra_headers` must NOT end end with new line.
* after the response line. `extra_headers` must NOT end end with new line.
* Example:
*
* mg_send_response_line(nc, 200, "Access-Control-Allow-Origin: *");
......@@ -4818,7 +4818,7 @@ void mg_http_send_error(struct mg_connection *nc, int code, const char *reason);
* `status_code` should be either 301 or 302 and `location` point to the
* new location.
* If `extra_headers` is not empty, then `extra_headers` are also sent
* after the reponse line. `extra_headers` must NOT end end with new line.
* after the response line. `extra_headers` must NOT end end with new line.
*
* Example:
*
......@@ -5392,7 +5392,7 @@ int mg_dns_copy_questions(struct mbuf *io, struct mg_dns_message *msg);
* struct because they might be invalidated as soon as the IO buffer grows
* again.
*
* Returns the number of bytes appened or -1 in case of error.
* Returns the number of bytes appended or -1 in case of error.
*/
int mg_dns_encode_record(struct mbuf *io, struct mg_dns_resource_record *rr,
const char *name, size_t nlen, const void *rdata,
......@@ -5730,7 +5730,7 @@ struct mg_coap_option *mg_coap_add_option(struct mg_coap_message *cm,
/*
* Frees the memory allocated for options.
* If the cm paramater doesn't contain any option it does nothing.
* If the cm parameter doesn't contain any option it does nothing.
*/
void mg_coap_free_options(struct mg_coap_message *cm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment