Index: read.c =================================================================== --- read.c (revision 30904) +++ read.c (revision 30905) @@ -135,7 +135,7 @@ static lht_node_t missing_ok; -static int parse_attributes(pcb_attribute_list_t *list, lht_node_t *nd) +static int parse_attributes(rnd_attribute_list_t *list, lht_node_t *nd) { lht_node_t *n; lht_dom_iterator_t it; @@ -151,7 +151,7 @@ for(n = lht_dom_first(&it, nd); n != NULL; n = lht_dom_next(&it)) { if (n->type == LHT_TEXT) - pcb_attribute_put(list, n->name, n->data.text.value); + rnd_attribute_put(list, n->name, n->data.text.value); } return 0; @@ -606,7 +606,7 @@ line = pcb_line_alloc_id(ly, id); parse_flags(&line->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_LINE, &intconn, 0); - pcb_attrib_compat_set_intconn(&line->Attributes, intconn); + rnd_attrib_compat_set_intconn(&line->Attributes, intconn); parse_attributes(&line->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 4) @@ -682,7 +682,7 @@ arc = pcb_arc_alloc_id(ly, id); parse_flags(&arc->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_ARC, &intconn, 0); - pcb_attrib_compat_set_intconn(&arc->Attributes, intconn); + rnd_attrib_compat_set_intconn(&arc->Attributes, intconn); parse_attributes(&arc->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 4) @@ -722,7 +722,7 @@ return -1; poly = pcb_poly_alloc_id(ly, id); parse_flags(&poly->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_POLY, &intconn, 0); - pcb_attrib_compat_set_intconn(&poly->Attributes, intconn); + rnd_attrib_compat_set_intconn(&poly->Attributes, intconn); parse_attributes(&poly->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 3) @@ -816,7 +816,7 @@ return iolht_error(obj, "failed to allocate text object\n"); parse_flags(&text->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_TEXT, &intconn, 0); - pcb_attrib_compat_set_intconn(&text->Attributes, intconn); + rnd_attrib_compat_set_intconn(&text->Attributes, intconn); parse_attributes(&text->Attributes, lht_dom_hash_get(obj, "attributes")); err |= parse_int(&text->Scale, hash_get(obj, "scale", 0)); tmp = 0; @@ -1060,7 +1060,7 @@ ps = pcb_pstk_alloc_id(dt, id); parse_flags(&ps->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_PSTK, &intconn, 0); - pcb_attrib_compat_set_intconn(&ps->Attributes, intconn); + rnd_attrib_compat_set_intconn(&ps->Attributes, intconn); parse_attributes(&ps->Attributes, lht_dom_hash_get(obj, "attributes")); err |= parse_coord(&ps->x, hash_get(obj, "x", 0)); @@ -1166,15 +1166,15 @@ return 0; } - pcb_attrib_compat_set_intconn(&ps->Attributes, intconn); + rnd_attrib_compat_set_intconn(&ps->Attributes, intconn); parse_attributes(&ps->Attributes, lht_dom_hash_get(obj, "attributes")); parse_thermal_old((pcb_any_obj_t *)ps, fln); if (Number != NULL) - pcb_attribute_put(&ps->Attributes, "term", Number); + rnd_attribute_put(&ps->Attributes, "term", Number); if (Name != NULL) - pcb_attribute_put(&ps->Attributes, "name", Name); + rnd_attribute_put(&ps->Attributes, "name", Name); if (subc_on_bottom) pcb_pstk_mirror(ps, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); @@ -1214,14 +1214,14 @@ p = pcb_pstk_new_compat_pad(subc->data, id, X1+dx, Y1+dy, X2+dx, Y2+dy, Thickness, Clearance, Mask, flg.f & PCB_FLAG_SQUARE, flg.f & PCB_FLAG_NOPASTE, (!!(flg.f & PCB_FLAG_ONSOLDER))); if (Number != NULL) - pcb_attribute_put(&p->Attributes, "term", Number); + rnd_attribute_put(&p->Attributes, "term", Number); if (Name != NULL) - pcb_attribute_put(&p->Attributes, "name", Name); + rnd_attribute_put(&p->Attributes, "name", Name); if (subc_on_bottom) pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); - pcb_attrib_compat_set_intconn(&p->Attributes, intconn); + rnd_attrib_compat_set_intconn(&p->Attributes, intconn); parse_attributes(&p->Attributes, lht_dom_hash_get(obj, "attributes")); return 0; @@ -1283,9 +1283,9 @@ if ((role != NULL) && (role->type == LHT_TEXT) && (string != NULL) && (string->type == LHT_TEXT)) { const char *key = role->data.text.value; const char *val = string->data.text.value; - if (strcmp(key, "desc") == 0) pcb_attribute_put(&subc->Attributes, "footprint", val); - if (strcmp(key, "value") == 0) pcb_attribute_put(&subc->Attributes, "value", val); - if (strcmp(key, "name") == 0) pcb_attribute_put(&subc->Attributes, "refdes", val); + if (strcmp(key, "desc") == 0) rnd_attribute_put(&subc->Attributes, "footprint", val); + if (strcmp(key, "value") == 0) rnd_attribute_put(&subc->Attributes, "value", val); + if (strcmp(key, "name") == 0) rnd_attribute_put(&subc->Attributes, "refdes", val); err |= parse_coord(&tx, hash_get(n, "x", 0)); err |= parse_coord(&ty, hash_get(n, "y", 0)); err |= parse_coord(&tdir, hash_get(n, "direction", 1)); @@ -1328,7 +1328,7 @@ parse_id(&sc->ID, obj, 5); parse_flags(&sc->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_ELEMENT, &intconn, 0); - pcb_attrib_compat_set_intconn(&sc->Attributes, intconn); + rnd_attrib_compat_set_intconn(&sc->Attributes, intconn); parse_attributes(&sc->Attributes, lht_dom_hash_get(obj, "attributes")); parse_minuid(sc->uid, lht_dom_hash_get(obj, "uid")); @@ -2150,7 +2150,7 @@ return iolht_error(nattr, "failed to load attributes\n"); } if (style != NULL) - pcb_attribute_put(&net->Attributes, "style", style); + rnd_attribute_put(&net->Attributes, "style", style); } return 0; } Index: write.c =================================================================== --- write.c (revision 30904) +++ write.c (revision 30905) @@ -174,7 +174,7 @@ return meta; } -static lht_node_t *build_attributes(pcb_attribute_list_t *lst) +static lht_node_t *build_attributes(rnd_attribute_list_t *lst) { int n; lht_node_t *ln; @@ -262,13 +262,13 @@ int warned = 0; if (wrver < 5) { - if (pcb_attribute_get(&obj->Attributes, "intnoconn") != NULL) { + if (rnd_attribute_get(&obj->Attributes, "intnoconn") != NULL) { warned = 1; rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); } } if (wrver < 3) { - if (pcb_attribute_get(&obj->Attributes, "intconn") != NULL) { + if (rnd_attribute_get(&obj->Attributes, "intconn") != NULL) { warned = 1; rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); } @@ -421,7 +421,7 @@ pcb_pstk_compshape_t cshape; rnd_bool plated; pcb_flag_t flg; - char *name = pcb_attribute_get(&ps->Attributes, "name"); + char *name = rnd_attribute_get(&ps->Attributes, "name"); if (!pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { @@ -456,7 +456,7 @@ lht_node_t *obj; rnd_coord_t x1, y1, x2, y2, thickness, clearance, mask; rnd_bool square, nopaste; - char *name = pcb_attribute_get(&ps->Attributes, "name"); + char *name = rnd_attribute_get(&ps->Attributes, "name"); pcb_flag_t flg; if (!pcb_pstk_export_compat_pad(ps, &x1, &y1, &x2, &y2, &thickness, &clearance, &mask, &square, &nopaste)) { @@ -627,11 +627,11 @@ if (!seen_refdes) { pcb_text_t tmp; memcpy(&tmp, text, sizeof(tmp)); - tmp.TextString = pcb_attribute_get(&subc->Attributes, "footprint"); + tmp.TextString = rnd_attribute_get(&subc->Attributes, "footprint"); lht_dom_list_append(lst, build_pcb_text("desc", &tmp)); - tmp.TextString = pcb_attribute_get(&subc->Attributes, "refdes"); + tmp.TextString = rnd_attribute_get(&subc->Attributes, "refdes"); lht_dom_list_append(lst, build_pcb_text("name", &tmp)); - tmp.TextString = pcb_attribute_get(&subc->Attributes, "value"); + tmp.TextString = rnd_attribute_get(&subc->Attributes, "value"); lht_dom_list_append(lst, build_pcb_text("value", &tmp)); seen_refdes = 1; } @@ -1276,7 +1276,7 @@ pcb_net_t *net = e->value; pcb_net_term_t *t; const char *netname = net->name; - const char *style = pcb_attribute_get(&net->Attributes, "style"); + const char *style = rnd_attribute_get(&net->Attributes, "style"); /* create the net hash */ nnet = lht_dom_node_alloc(LHT_HASH, netname);