diff options
Diffstat (limited to 'src/attr.h')
-rw-r--r-- | src/attr.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/attr.h b/src/attr.h new file mode 100644 index 00000000..83a12f5b --- /dev/null +++ b/src/attr.h @@ -0,0 +1,24 @@ +#ifndef ATTR_H +#define ATTR_H + +enum attr_type { +#define ATTR2(x,y) attr_##x=y, +#define ATTR(x) attr_##x, +#include "attr_def.h" +#undef ATTR2 +#undef ATTR +}; + +struct attr { + enum attr_type type; + union { + char *str; + int num; + struct item *item; + } u; +}; + +enum attr_type attr_from_name(char *name); +char * attr_to_name(enum attr_type attr); + +#endif |