Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
e91a7c95
Commit
e91a7c95
authored
Jul 21, 2016
by
Marko Mikulicic
Committed by
Cesanta Bot
Jul 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reamalgam after .h edits
PUBLISHED_FROM=da1faa9b46cd0ff22dcba6d324b5847c4a0d42d8
parent
3054952a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
intro.md
docs/c-api/mbuf.h/intro.md
+1
-1
mbuf_append.md
docs/c-api/mbuf.h/mbuf_append.md
+1
-1
mbuf_free.md
docs/c-api/mbuf.h/mbuf_free.md
+1
-1
mbuf_init.md
docs/c-api/mbuf.h/mbuf_init.md
+1
-1
mbuf_insert.md
docs/c-api/mbuf.h/mbuf_insert.md
+2
-2
mbuf_remove.md
docs/c-api/mbuf.h/mbuf_remove.md
+1
-1
mbuf_resize.md
docs/c-api/mbuf.h/mbuf_resize.md
+1
-1
mbuf_trim.md
docs/c-api/mbuf.h/mbuf_trim.md
+1
-1
mongoose.h
mongoose.h
+9
-9
No files found.
docs/c-api/mbuf.h/intro.md
View file @
e91a7c95
...
...
@@ -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.
docs/c-api/mbuf.h/mbuf_append.md
View file @
e91a7c95
...
...
@@ -8,5 +8,5 @@ signature: |
Appends data to the Mbuf.
Return
the number of bytes appended,
or 0 if out of memory.
Return
s the number of bytes appended
or 0 if out of memory.
docs/c-api/mbuf.h/mbuf_free.md
View file @
e91a7c95
...
...
@@ -6,5 +6,5 @@ signature: |
void mbuf_free(struct mbuf *);
---
Free the space allocated for the mbuffer and resets the mbuf structure.
Free
s
the space allocated for the mbuffer and resets the mbuf structure.
docs/c-api/mbuf.h/mbuf_init.md
View file @
e91a7c95
...
...
@@ -6,6 +6,6 @@ signature: |
void mbuf_init(struct mbuf *, size_t initial_capacity);
---
Initiali
ze
an Mbuf.
Initiali
ses
an Mbuf.
`initial_capacity`
specifies the initial capacity of the mbuf.
docs/c-api/mbuf.h/mbuf_insert.md
View file @
e91a7c95
...
...
@@ -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.
Insert
s
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.
Return
s
the number of bytes inserted.
docs/c-api/mbuf.h/mbuf_remove.md
View file @
e91a7c95
...
...
@@ -6,5 +6,5 @@ signature: |
void mbuf_remove(struct mbuf *, size_t data_size);
---
Remove
`data_size`
bytes from the beginning of the buffer.
Remove
s
`data_size`
bytes from the beginning of the buffer.
docs/c-api/mbuf.h/mbuf_resize.md
View file @
e91a7c95
...
...
@@ -6,7 +6,7 @@ signature: |
void mbuf_resize(struct mbuf *, size_t new_size);
---
Resize an Mbuf.
Resize
s
an Mbuf.
If
`new_size`
is smaller than buffer's
`len`
, the
resize is not performed.
...
...
docs/c-api/mbuf.h/mbuf_trim.md
View file @
e91a7c95
...
...
@@ -6,5 +6,5 @@ signature: |
void mbuf_trim(struct mbuf *);
---
Shrink an Mbuf by resizing its
`size`
to
`len`
.
Shrink
s
an Mbuf by resizing its
`size`
to
`len`
.
mongoose.h
View file @
e91a7c95
...
...
@@ -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 {
};
/*
* Initiali
ze
an Mbuf.
* Initiali
ses
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. */
/* Free
s
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.
* Return
s 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.
* Insert
s
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.
* Return
s
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. */
/* Remove
s
`data_size` bytes from the beginning of the buffer. */
void
mbuf_remove
(
struct
mbuf
*
,
size_t
data_size
);
/*
* Resize an Mbuf.
* Resize
s
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`. */
/* Shrink
s
an Mbuf by resizing its `size` to `len`. */
void
mbuf_trim
(
struct
mbuf
*
);
#if defined(__cplusplus)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment