diff options
| author | 2009-01-29 19:20:40 +0100 | |
|---|---|---|
| committer | 2009-01-29 19:20:40 +0100 | |
| commit | 8c2751f8c7e696fca895aebfafc7e668f3afe85c (patch) | |
| tree | f01974f6f20b4d2fe53972d67eb4b7d7c588e035 /src | |
| parent | 23b1e3200833dd79d754e7057ad1a4154f15172e (diff) | |
| download | libplist-8c2751f8c7e696fca895aebfafc7e668f3afe85c.tar.gz libplist-8c2751f8c7e696fca895aebfafc7e668f3afe85c.tar.bz2 | |
Add some static declarations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bplist.c | 4 | ||||
| -rw-r--r-- | src/plist.c | 6 | ||||
| -rw-r--r-- | src/plist.h | 3 | ||||
| -rw-r--r-- | src/xplist.c | 8 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/bplist.c b/src/bplist.c index 0140f88..78bbe4a 100644 --- a/src/bplist.c +++ b/src/bplist.c | |||
| @@ -20,11 +20,13 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | #include "plist.h" | ||
| 24 | #include <stdlib.h> | 23 | #include <stdlib.h> |
| 25 | #include <stdio.h> | 24 | #include <stdio.h> |
| 26 | #include <string.h> | 25 | #include <string.h> |
| 27 | 26 | ||
| 27 | #include <plist/plist.h> | ||
| 28 | #include "plist.h" | ||
| 29 | |||
| 28 | /* Magic marker and size. */ | 30 | /* Magic marker and size. */ |
| 29 | #define BPLIST_MAGIC ((uint8_t*)"bplist") | 31 | #define BPLIST_MAGIC ((uint8_t*)"bplist") |
| 30 | #define BPLIST_MAGIC_SIZE 6 | 32 | #define BPLIST_MAGIC_SIZE 6 |
diff --git a/src/plist.c b/src/plist.c index 5fc2338..f315e7e 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -71,7 +71,7 @@ plist_t plist_new_array() | |||
| 71 | return plist_new_node(data); | 71 | return plist_new_node(data); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | plist_t plist_add_sub_element(plist_t node, plist_type type, const void *value, uint64_t length) | 74 | static plist_t plist_add_sub_element(plist_t node, plist_type type, const void *value, uint64_t length) |
| 75 | { | 75 | { |
| 76 | //only structured types can have children | 76 | //only structured types can have children |
| 77 | plist_type node_type = plist_get_node_type(node); | 77 | 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 | |||
| 172 | return res; | 172 | return res; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | plist_t plist_find_node(plist_t plist, plist_type type, const void *value, uint64_t length) | 175 | static plist_t plist_find_node(plist_t plist, plist_type type, const void *value, uint64_t length) |
| 176 | { | 176 | { |
| 177 | if (!plist) | 177 | if (!plist) |
| 178 | return NULL; | 178 | return NULL; |
| @@ -204,7 +204,7 @@ plist_t plist_find_node_by_string(plist_t plist, const char *value) | |||
| 204 | return plist_find_node(plist, PLIST_STRING, value, strlen(value)); | 204 | return plist_find_node(plist, PLIST_STRING, value, strlen(value)); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length) | 207 | static void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length) |
| 208 | { | 208 | { |
| 209 | if (!node) | 209 | if (!node) |
| 210 | return; | 210 | return; |
diff --git a/src/plist.h b/src/plist.h index 7596992..33f6c20 100644 --- a/src/plist.h +++ b/src/plist.h | |||
| @@ -56,8 +56,5 @@ plist_data_t plist_get_data(const plist_t node); | |||
| 56 | plist_data_t plist_new_plist_data(); | 56 | plist_data_t plist_new_plist_data(); |
| 57 | void plist_free_plist_data(plist_data_t node); | 57 | void plist_free_plist_data(plist_data_t node); |
| 58 | 58 | ||
| 59 | plist_t plist_add_sub_element( plist_t node, plist_type type, const void* value, uint64_t length); | ||
| 60 | plist_t plist_find_node(plist_t plist, plist_type type, const void *value, uint64_t length); | ||
| 61 | void plist_get_type_and_value(plist_t node, plist_type * type, void *value, uint64_t * length); | ||
| 62 | 59 | ||
| 63 | #endif | 60 | #endif |
diff --git a/src/xplist.c b/src/xplist.c index e61797c..f9670f1 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -22,8 +22,6 @@ | |||
| 22 | 22 | ||
| 23 | #include <string.h> | 23 | #include <string.h> |
| 24 | #include <assert.h> | 24 | #include <assert.h> |
| 25 | #include "utils.h" | ||
| 26 | #include "plist.h" | ||
| 27 | #include <stdlib.h> | 25 | #include <stdlib.h> |
| 28 | #include <stdio.h> | 26 | #include <stdio.h> |
| 29 | 27 | ||
| @@ -31,6 +29,10 @@ | |||
| 31 | #include <libxml/parser.h> | 29 | #include <libxml/parser.h> |
| 32 | #include <libxml/tree.h> | 30 | #include <libxml/tree.h> |
| 33 | 31 | ||
| 32 | #include <plist/plist.h> | ||
| 33 | #include "utils.h" | ||
| 34 | #include "plist.h" | ||
| 35 | |||
| 34 | #define XPLIST_TEXT BAD_CAST("text") | 36 | #define XPLIST_TEXT BAD_CAST("text") |
| 35 | #define XPLIST_KEY BAD_CAST("key") | 37 | #define XPLIST_KEY BAD_CAST("key") |
| 36 | #define XPLIST_FALSE BAD_CAST("false") | 38 | #define XPLIST_FALSE BAD_CAST("false") |
| @@ -43,7 +45,7 @@ | |||
| 43 | #define XPLIST_ARRAY BAD_CAST("array") | 45 | #define XPLIST_ARRAY BAD_CAST("array") |
| 44 | #define XPLIST_DICT BAD_CAST("dict") | 46 | #define XPLIST_DICT BAD_CAST("dict") |
| 45 | 47 | ||
| 46 | const char *plist_base = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ | 48 | static const char *plist_base = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ |
| 47 | <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n\ | 49 | <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n\ |
| 48 | <plist version=\"1.0\">\n\ | 50 | <plist version=\"1.0\">\n\ |
| 49 | </plist>\0"; | 51 | </plist>\0"; |
