calacirya
diff src/attr.h @ 0:df9e0bc7685a
starting calacirya project
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Sun, 18 Sep 2011 11:46:55 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/attr.h Sun Sep 18 11:46:55 2011 +0300 1.3 @@ -0,0 +1,27 @@ 1.4 +#ifndef ATTR_H_ 1.5 +#define ATTR_H_ 1.6 + 1.7 +#include <anim.h> 1.8 + 1.9 +struct attribute { 1.10 + struct anm_node *node; 1.11 + char *name; 1.12 + 1.13 + struct attribute *left, *right; 1.14 +}; 1.15 + 1.16 + 1.17 +struct attrdb { 1.18 + struct attribute *root; 1.19 +}; 1.20 + 1.21 +struct attribute *create_attrib(const char *name); 1.22 +void free_attrib(struct attribute *attr); 1.23 + 1.24 +struct attrdb *create_attrdb(void); 1.25 +void free_attrib(struct attrdb *db); 1.26 + 1.27 +void add_attrib(struct attrdb *db, struct attribute *attr); 1.28 +struct attribute *find_attrib(struct attrdb *db, const char *name); 1.29 + 1.30 +#endif /* ATTR_H_ */