Index: trunk/src/plugins/io_easyeda/read_hi_std.c =================================================================== --- trunk/src/plugins/io_easyeda/read_hi_std.c (revision 10659) +++ trunk/src/plugins/io_easyeda/read_hi_std.c (revision 10660) @@ -917,7 +917,8 @@ static csch_cgrp_t *easystd_parse_grp_(read_ctx_t *ctx, gdom_node_t *sym_root, csch_cgrp_t *resgrp) { int rv = 0; - gdom_node_t *shapes; + gdom_node_t *shapes, *head, *cpara;; + htip_entry_t *e; /* load graphics */ HASH_GET_SUBTREE(shapes, sym_root, easy_shape, GDOM_ARRAY, rv = 1;); @@ -930,9 +931,23 @@ rv = easystd_parse_shapes(ctx, resgrp, shapes); } - /* load metadata */ - if (rv == 0) { - TODO("load attribs from the header"); + /* load metadata: header/c_para (attrs) */ + if (rv == 0) + HASH_GET_SUBTREE(head, sym_root, easy_head, GDOM_HASH, rv = 1;); + if (rv == 0) + HASH_GET_SUBTREE(cpara, head, easy_c_para, GDOM_HASH, rv = 1;); + for(e = htip_first(&cpara->value.hash); e != NULL; e = htip_next(&cpara->value.hash, e)) { + if (e->key >= 0) { + const char *key = easy_keyname(e->key); + gdom_node_t *val = e->value; + if ((val->type == GDOM_STRING) && (val->value.str != NULL) && (*val->value.str != '\0')) { + csch_source_arg_t *src; + char *ekey = rnd_concat("EasyEDA::", key, NULL); + + src = easyeda_attrib_src_c(ctx, val, NULL); + csch_attrib_set(&resgrp->attr, CSCH_ATP_USER_DEFAULT, ekey, rnd_strdup(val->value.str), src, NULL); + } + } } if (rv == 0) {