Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
67e65a79
Commit
67e65a79
authored
Mar 17, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
page: added page_new_concat()
parent
47bbb73e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
page.c
src/page.c
+11
-0
page.h
src/page.h
+9
-0
No files found.
src/page.c
View file @
67e65a79
...
...
@@ -51,6 +51,17 @@ page_new_copy(const void *data, size_t size)
return
page
;
}
struct
page
*
page_new_concat
(
const
struct
page
*
a
,
const
struct
page
*
b
)
{
struct
page
*
page
=
page_new
(
a
->
size
+
b
->
size
);
memcpy
(
page
->
data
,
a
->
data
,
a
->
size
);
memcpy
(
page
->
data
+
a
->
size
,
b
->
data
,
b
->
size
);
return
page
;
}
void
page_ref
(
struct
page
*
page
)
{
...
...
src/page.h
View file @
67e65a79
...
...
@@ -65,6 +65,15 @@ struct page *
page_new_copy
(
const
void
*
data
,
size_t
size
);
/**
* Concatenates two pages to a new page.
*
* @param a the first page
* @param b the second page, which is appended
*/
struct
page
*
page_new_concat
(
const
struct
page
*
a
,
const
struct
page
*
b
);
/**
* Increases the reference counter.
*
* @param page the #page object
...
...
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