#include struct stringtree { struct child { enum child_kind { ck_cstr, ck_string, ck_stringtree, } kind; union { const wchar_t* cstr; struct string* string; struct stringtree* stringtree; }; struct child *prev, *next; } *head, *tail; unsigned refcount; };