Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
8c2751f8
Commit
8c2751f8
authored
Jan 29, 2009
by
Jonathan Beck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some static declarations.
parent
23b1e320
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
bplist.c
src/bplist.c
+3
-1
plist.c
src/plist.c
+3
-3
plist.h
src/plist.h
+0
-3
xplist.c
src/xplist.c
+5
-3
No files found.
src/bplist.c
View file @
8c2751f8
...
...
@@ -20,11 +20,13 @@
*/
#include "plist.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <plist/plist.h>
#include "plist.h"
/* Magic marker and size. */
#define BPLIST_MAGIC ((uint8_t*)"bplist")
#define BPLIST_MAGIC_SIZE 6
...
...
src/plist.c
View file @
8c2751f8
...
...
@@ -71,7 +71,7 @@ plist_t plist_new_array()
return
plist_new_node
(
data
);
}
plist_t
plist_add_sub_element
(
plist_t
node
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
)
static
plist_t
plist_add_sub_element
(
plist_t
node
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
)
{
//only structured types can have children
plist_type
node_type
=
plist_get_node_type
(
node
);
...
...
@@ -172,7 +172,7 @@ static char compare_node_value(plist_type type, plist_data_t data, const void *v
return
res
;
}
plist_t
plist_find_node
(
plist_t
plist
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
)
static
plist_t
plist_find_node
(
plist_t
plist
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
)
{
if
(
!
plist
)
return
NULL
;
...
...
@@ -204,7 +204,7 @@ plist_t plist_find_node_by_string(plist_t plist, const char *value)
return
plist_find_node
(
plist
,
PLIST_STRING
,
value
,
strlen
(
value
));
}
void
plist_get_type_and_value
(
plist_t
node
,
plist_type
*
type
,
void
*
value
,
uint64_t
*
length
)
static
void
plist_get_type_and_value
(
plist_t
node
,
plist_type
*
type
,
void
*
value
,
uint64_t
*
length
)
{
if
(
!
node
)
return
;
...
...
src/plist.h
View file @
8c2751f8
...
...
@@ -56,8 +56,5 @@ plist_data_t plist_get_data(const plist_t node);
plist_data_t
plist_new_plist_data
();
void
plist_free_plist_data
(
plist_data_t
node
);
plist_t
plist_add_sub_element
(
plist_t
node
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
);
plist_t
plist_find_node
(
plist_t
plist
,
plist_type
type
,
const
void
*
value
,
uint64_t
length
);
void
plist_get_type_and_value
(
plist_t
node
,
plist_type
*
type
,
void
*
value
,
uint64_t
*
length
);
#endif
src/xplist.c
View file @
8c2751f8
...
...
@@ -22,8 +22,6 @@
#include <string.h>
#include <assert.h>
#include "utils.h"
#include "plist.h"
#include <stdlib.h>
#include <stdio.h>
...
...
@@ -31,6 +29,10 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <plist/plist.h>
#include "utils.h"
#include "plist.h"
#define XPLIST_TEXT BAD_CAST("text")
#define XPLIST_KEY BAD_CAST("key")
#define XPLIST_FALSE BAD_CAST("false")
...
...
@@ -43,7 +45,7 @@
#define XPLIST_ARRAY BAD_CAST("array")
#define XPLIST_DICT BAD_CAST("dict")
const
char
*
plist_base
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
\
static
const
char
*
plist_base
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
\
<!DOCTYPE plist PUBLIC
\"
-//Apple Computer//DTD PLIST 1.0//EN
\"
\"
http://www.apple.com/DTDs/PropertyList-1.0.dtd
\"
>
\n
\
<plist version=
\"
1.0
\"
>
\n
\
</plist>
\0
"
;
...
...
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