summaryrefslogtreecommitdiffstats
path: root/src/plist.h
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-11-25 19:14:27 +0100
committerGravatar Jonathan Beck2008-11-25 19:14:27 +0100
commitaed2c025f6e47dc769675e564cc574adc496a88a (patch)
tree6cb14e4c511dabc40fdf6c24714a2be48567f847 /src/plist.h
parent0bca81e7c8ce5ba53390271e5c7eaa7a5f281c91 (diff)
downloadlibplist-aed2c025f6e47dc769675e564cc574adc496a88a.tar.gz
libplist-aed2c025f6e47dc769675e564cc574adc496a88a.tar.bz2
fix some warnings and indent
Diffstat (limited to 'src/plist.h')
-rw-r--r--src/plist.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plist.h b/src/plist.h
index 98c7d91..5f31281 100644
--- a/src/plist.h
+++ b/src/plist.h
@@ -31,6 +31,7 @@
#include <sys/stat.h>
#include <unistd.h>
+char *format_string(const char *buf, int cols, int depth);
xmlNode *add_key_dict_node(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth);
xmlNode *add_key_str_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth);
xmlNode *add_key_data_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth);
@@ -47,7 +48,7 @@ void free_dictionary(char **dictionary);
enum {
BPLIST_TRUE = 0x08,
BPLIST_FALSE = 0x09,
- BPLIST_FILL = 0x0F, /* will be used for length grabbing */
+ BPLIST_FILL = 0x0F, /* will be used for length grabbing */
BPLIST_INT = 0x10,
BPLIST_REAL = 0x20,
BPLIST_DATE = 0x33,
@@ -62,15 +63,17 @@ enum {
};
typedef struct _bplist_node {
- struct _bplist_node *next, **subnodes; // subnodes is for arrays, dicts and (potentially) sets.
+ struct _bplist_node *next, **subnodes; // subnodes is for arrays, dicts and (potentially) sets.
uint64_t length, intval64;
- uint32_t intval32; // length = subnodes
+ uint32_t intval32; // length = subnodes
uint16_t intval16;
uint8_t intval8;
- uint8_t type, *indexes; // indexes for array-types; essentially specify the order in which to access for key => value pairs
+ uint8_t type, *indexes; // indexes for array-types; essentially specify the order in which to access for key => value pairs
char *strval;
double realval;
wchar_t *unicodeval;
} bplist_node;
+bplist_node *parse_nodes(const char *bpbuffer, uint32_t bplength, uint32_t * position);
+
#endif