page_attribute attribute_dup(page_attribute a) { page_attribute p; if ((p = attribute_new()) == NULL) return NULL; if (!cstring_set(p->language, c_str(a->language)) || !cstring_set(p->charset, c_str(a->charset)) || !cstring_set(p->encoding, c_str(a->encoding)) || !cstring_set(p->media_type, c_str(a->media_type))) { attribute_free(p); return NULL; } return p; }
status_t html_menu_set_link(html_menu m, const char *s) { assert(m != NULL); assert(s != NULL); return cstring_set(m->link, s); }
status_t html_menu_set_hover_image(html_menu m, const char *s) { assert(m != NULL); assert(s != NULL); return cstring_set(m->hover_image, s); }
status_t html_menu_set_text(html_menu m, const char *s) { assert(m != NULL); assert(s != NULL); return cstring_set(m->text, s); }
status_t attribute_set_charset(page_attribute a, const char* value) { return cstring_set(a->charset, value); }
status_t attribute_set_language(page_attribute a, const char* value) { return cstring_set(a->language, value); }
status_t attribute_set_media_type(page_attribute a, const char* value) { return cstring_set(a->media_type, value); }
status_t attribute_set_encoding(page_attribute a, const char* value) { return cstring_set(a->encoding, value); }