void object_load_props(DiaObject *obj, ObjectNode obj_node, DiaContext *ctx) { GPtrArray *props; g_return_if_fail(obj != NULL); g_return_if_fail(obj_node != NULL); g_return_if_fail(object_complies_with_stdprop(obj)); props = prop_list_from_descs(object_get_prop_descriptions(obj), pdtpp_do_load); if (!prop_list_load(props,obj_node, ctx)) { /* context already has the message */ } obj->ops->set_props(obj, props); prop_list_free(props); }
int web_props(void) { if (!session_id()) return BBS_ELGNREQ; prop_list_t *p = prop_list_load(); if (!p) return BBS_EINTNL; xml_header(NULL); printf("<bbsprop>"); print_session(); for (int i = 0; i < prop_list_num_rows(p); ++i) { show_prop(p, i); } printf("</bbsprop>"); prop_list_free(p); return 0; }