diff options
Diffstat (limited to '')
-rw-r--r-- | vcal.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -29,6 +29,8 @@ INIT_F(content_line); INIT_F(content_line, int keylen, int vallen); FREE_F(content_line); +int content_line_copy (content_line* dest, content_line* src); + /* * Resolves a collision in some form of structure (probably a hash-map * or a trie). If dest is NULL just return new. Otherwise mutates dest @@ -50,17 +52,19 @@ typedef struct s_vcomponent vcomponent; struct s_vcomponent { char* filename; + char* type; vcomponent* parent; TRIE(content_line) clines; VECT(vcomponent) components; }; +#define FCHILD(v) GET(VECT(vcomponent))(&(v)->components, 0) + INIT_F(vcomponent); -INIT_F(vcomponent, char* filename); +INIT_F(vcomponent, char* type); +INIT_F(vcomponent, char* type, char* filename); FREE_F(vcomponent); -int content_line_copy (content_line* dest, content_line* src); - content_line* get_property (vcomponent* ev, char* key); int add_content_line (vcomponent* ev, content_line* c); @@ -71,4 +75,6 @@ int add_content_line (vcomponent* ev, content_line* c); */ int PUSH(vcomponent)(vcomponent*, vcomponent*); +int DEEP_COPY(vcomponent)(vcomponent*, vcomponent*); + #endif /* VCAL_H */ |