From e91a7c9599a456ac5813af0422ff4da9d5983135 Mon Sep 17 00:00:00 2001 From: Marko Mikulicic <mkm@cesanta.com> Date: Thu, 21 Jul 2016 17:58:31 +0300 Subject: [PATCH] Reamalgam after .h edits PUBLISHED_FROM=da1faa9b46cd0ff22dcba6d324b5847c4a0d42d8 --- docs/c-api/mbuf.h/intro.md | 2 +- docs/c-api/mbuf.h/mbuf_append.md | 2 +- docs/c-api/mbuf.h/mbuf_free.md | 2 +- docs/c-api/mbuf.h/mbuf_init.md | 2 +- docs/c-api/mbuf.h/mbuf_insert.md | 4 ++-- docs/c-api/mbuf.h/mbuf_remove.md | 2 +- docs/c-api/mbuf.h/mbuf_resize.md | 2 +- docs/c-api/mbuf.h/mbuf_trim.md | 2 +- mongoose.h | 18 +++++++++--------- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/c-api/mbuf.h/intro.md b/docs/c-api/mbuf.h/intro.md index 4c366d00c..2fa91c3df 100644 --- a/docs/c-api/mbuf.h/intro.md +++ b/docs/c-api/mbuf.h/intro.md @@ -14,7 +14,7 @@ items: --- Mbufs are mutable/growing memory buffers, like C++ strings. -Mbuf can append data to the end of a buffer, or insert data into arbitrary +Mbuf can append data to the end of a buffer or insert data into arbitrary position in the middle of a buffer. The buffer grows automatically when needed. diff --git a/docs/c-api/mbuf.h/mbuf_append.md b/docs/c-api/mbuf.h/mbuf_append.md index ea803926e..af0de26eb 100644 --- a/docs/c-api/mbuf.h/mbuf_append.md +++ b/docs/c-api/mbuf.h/mbuf_append.md @@ -8,5 +8,5 @@ signature: | Appends data to the Mbuf. -Return the number of bytes appended, or 0 if out of memory. +Returns the number of bytes appended or 0 if out of memory. diff --git a/docs/c-api/mbuf.h/mbuf_free.md b/docs/c-api/mbuf.h/mbuf_free.md index 273d24b9f..6b5e455bf 100644 --- a/docs/c-api/mbuf.h/mbuf_free.md +++ b/docs/c-api/mbuf.h/mbuf_free.md @@ -6,5 +6,5 @@ signature: | void mbuf_free(struct mbuf *); --- -Free the space allocated for the mbuffer and resets the mbuf structure. +Frees the space allocated for the mbuffer and resets the mbuf structure. diff --git a/docs/c-api/mbuf.h/mbuf_init.md b/docs/c-api/mbuf.h/mbuf_init.md index 960f92b81..bc61ca0e2 100644 --- a/docs/c-api/mbuf.h/mbuf_init.md +++ b/docs/c-api/mbuf.h/mbuf_init.md @@ -6,6 +6,6 @@ signature: | void mbuf_init(struct mbuf *, size_t initial_capacity); --- -Initialize an Mbuf. +Initialises an Mbuf. `initial_capacity` specifies the initial capacity of the mbuf. diff --git a/docs/c-api/mbuf.h/mbuf_insert.md b/docs/c-api/mbuf.h/mbuf_insert.md index b9e84a711..a38137a93 100644 --- a/docs/c-api/mbuf.h/mbuf_insert.md +++ b/docs/c-api/mbuf.h/mbuf_insert.md @@ -6,9 +6,9 @@ signature: | size_t mbuf_insert(struct mbuf *, size_t, const void *, size_t); --- -Insert data at a specified offset in the Mbuf. +Inserts data at a specified offset in the Mbuf. Existing data will be shifted forwards and the buffer will be grown if necessary. -Return the number of bytes inserted. +Returns the number of bytes inserted. diff --git a/docs/c-api/mbuf.h/mbuf_remove.md b/docs/c-api/mbuf.h/mbuf_remove.md index b4ce18c9d..cf3e502d4 100644 --- a/docs/c-api/mbuf.h/mbuf_remove.md +++ b/docs/c-api/mbuf.h/mbuf_remove.md @@ -6,5 +6,5 @@ signature: | void mbuf_remove(struct mbuf *, size_t data_size); --- -Remove `data_size` bytes from the beginning of the buffer. +Removes `data_size` bytes from the beginning of the buffer. diff --git a/docs/c-api/mbuf.h/mbuf_resize.md b/docs/c-api/mbuf.h/mbuf_resize.md index 92f8b302e..0814383fa 100644 --- a/docs/c-api/mbuf.h/mbuf_resize.md +++ b/docs/c-api/mbuf.h/mbuf_resize.md @@ -6,7 +6,7 @@ signature: | void mbuf_resize(struct mbuf *, size_t new_size); --- -Resize an Mbuf. +Resizes an Mbuf. If `new_size` is smaller than buffer's `len`, the resize is not performed. diff --git a/docs/c-api/mbuf.h/mbuf_trim.md b/docs/c-api/mbuf.h/mbuf_trim.md index d1878b03f..743b25f90 100644 --- a/docs/c-api/mbuf.h/mbuf_trim.md +++ b/docs/c-api/mbuf.h/mbuf_trim.md @@ -6,5 +6,5 @@ signature: | void mbuf_trim(struct mbuf *); --- -Shrink an Mbuf by resizing its `size` to `len`. +Shrinks an Mbuf by resizing its `size` to `len`. diff --git a/mongoose.h b/mongoose.h index 73e5e3b58..ea912c435 100644 --- a/mongoose.h +++ b/mongoose.h @@ -898,7 +898,7 @@ int mg_vcasecmp(const struct mg_str *str2, const char *str1); * === Memory Buffers * * Mbufs are mutable/growing memory buffers, like C++ strings. - * Mbuf can append data to the end of a buffer, or insert data into arbitrary + * Mbuf can append data to the end of a buffer or insert data into arbitrary * position in the middle of a buffer. The buffer grows automatically when * needed. */ @@ -924,42 +924,42 @@ struct mbuf { }; /* - * Initialize an Mbuf. + * Initialises an Mbuf. * `initial_capacity` specifies the initial capacity of the mbuf. */ void mbuf_init(struct mbuf *, size_t initial_capacity); -/* Free the space allocated for the mbuffer and resets the mbuf structure. */ +/* Frees the space allocated for the mbuffer and resets the mbuf structure. */ void mbuf_free(struct mbuf *); /* * Appends data to the Mbuf. * - * Return the number of bytes appended, or 0 if out of memory. + * Returns the number of bytes appended or 0 if out of memory. */ size_t mbuf_append(struct mbuf *, const void *data, size_t data_size); /* - * Insert data at a specified offset in the Mbuf. + * Inserts data at a specified offset in the Mbuf. * * Existing data will be shifted forwards and the buffer will * be grown if necessary. - * Return the number of bytes inserted. + * Returns the number of bytes inserted. */ size_t mbuf_insert(struct mbuf *, size_t, const void *, size_t); -/* Remove `data_size` bytes from the beginning of the buffer. */ +/* Removes `data_size` bytes from the beginning of the buffer. */ void mbuf_remove(struct mbuf *, size_t data_size); /* - * Resize an Mbuf. + * Resizes an Mbuf. * * If `new_size` is smaller than buffer's `len`, the * resize is not performed. */ void mbuf_resize(struct mbuf *, size_t new_size); -/* Shrink an Mbuf by resizing its `size` to `len`. */ +/* Shrinks an Mbuf by resizing its `size` to `len`. */ void mbuf_trim(struct mbuf *); #if defined(__cplusplus) -- GitLab