Index: read.c =================================================================== --- read.c (revision 32114) +++ read.c (revision 32115) @@ -139,7 +139,7 @@ static lht_node_t missing_ok; -static int parse_attributes(rnd_attribute_list_t *list, lht_node_t *nd) +static int parse_attributes(pcb_attribute_list_t *list, lht_node_t *nd) { lht_node_t *n; lht_dom_iterator_t it; @@ -155,7 +155,7 @@ for(n = lht_dom_first(&it, nd); n != NULL; n = lht_dom_next(&it)) { if (n->type == LHT_TEXT) - rnd_attribute_put(list, n->name, n->data.text.value); + pcb_attribute_put(list, n->name, n->data.text.value); } return 0; @@ -626,7 +626,7 @@ line = pcb_line_alloc_id(ly, id); parse_flags(&line->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_LINE, &intconn, 0); - rnd_attrib_compat_set_intconn(&line->Attributes, intconn); + pcb_attrib_compat_set_intconn(&line->Attributes, intconn); parse_attributes(&line->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 4) @@ -708,7 +708,7 @@ arc = pcb_arc_alloc_id(ly, id); parse_flags(&arc->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_ARC, &intconn, 0); - rnd_attrib_compat_set_intconn(&arc->Attributes, intconn); + pcb_attrib_compat_set_intconn(&arc->Attributes, intconn); parse_attributes(&arc->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 4) @@ -890,7 +890,7 @@ gfx = pcb_gfx_alloc_id(ly, id); parse_flags(&gfx->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_ARC, &intconn, 0); - rnd_attrib_compat_set_intconn(&gfx->Attributes, intconn); + pcb_attrib_compat_set_intconn(&gfx->Attributes, intconn); parse_attributes(&gfx->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 4) @@ -946,7 +946,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); - rnd_attrib_compat_set_intconn(&poly->Attributes, intconn); + pcb_attrib_compat_set_intconn(&poly->Attributes, intconn); parse_attributes(&poly->Attributes, lht_dom_hash_get(obj, "attributes")); if (rdver >= 3) @@ -1043,7 +1043,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); - rnd_attrib_compat_set_intconn(&text->Attributes, intconn); + pcb_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)); err |= parse_double(&text->scale_x, hash_get(obj, "scale_x", 1)); @@ -1291,7 +1291,7 @@ ps = pcb_pstk_alloc_id(dt, id); parse_flags(&ps->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_PSTK, &intconn, 0); - rnd_attrib_compat_set_intconn(&ps->Attributes, intconn); + pcb_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)); @@ -1397,15 +1397,15 @@ return 0; } - rnd_attrib_compat_set_intconn(&ps->Attributes, intconn); + pcb_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) - rnd_attribute_put(&ps->Attributes, "term", Number); + pcb_attribute_put(&ps->Attributes, "term", Number); if (Name != NULL) - rnd_attribute_put(&ps->Attributes, "name", Name); + pcb_attribute_put(&ps->Attributes, "name", Name); if (subc_on_bottom) pcb_pstk_mirror(ps, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); @@ -1445,14 +1445,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) - rnd_attribute_put(&p->Attributes, "term", Number); + pcb_attribute_put(&p->Attributes, "term", Number); if (Name != NULL) - rnd_attribute_put(&p->Attributes, "name", Name); + pcb_attribute_put(&p->Attributes, "name", Name); if (subc_on_bottom) pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); - rnd_attrib_compat_set_intconn(&p->Attributes, intconn); + pcb_attrib_compat_set_intconn(&p->Attributes, intconn); parse_attributes(&p->Attributes, lht_dom_hash_get(obj, "attributes")); return 0; @@ -1514,9 +1514,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) 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); + 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); 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)); @@ -1559,7 +1559,7 @@ parse_id(&sc->ID, obj, 5); parse_flags(&sc->Flags, lht_dom_hash_get(obj, "flags"), PCB_OBJ_ELEMENT, &intconn, 0); - rnd_attrib_compat_set_intconn(&sc->Attributes, intconn); + pcb_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")); @@ -2381,7 +2381,7 @@ return iolht_error(nattr, "failed to load attributes\n"); } if (style != NULL) - rnd_attribute_put(&net->Attributes, "style", style); + pcb_attribute_put(&net->Attributes, "style", style); } return 0; } Index: write.c =================================================================== --- write.c (revision 32114) +++ write.c (revision 32115) @@ -202,7 +202,7 @@ return meta; } -static lht_node_t *build_attributes(rnd_attribute_list_t *lst) +static lht_node_t *build_attributes(pcb_attribute_list_t *lst) { int n; lht_node_t *ln; @@ -290,13 +290,13 @@ int warned = 0; if (wrver < 5) { - if (rnd_attribute_get(&obj->Attributes, "intnoconn") != NULL) { + if (pcb_attribute_get(&obj->Attributes, "intnoconn") != NULL) { warned = 1; rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); } } if (wrver < 3) { - if (rnd_attribute_get(&obj->Attributes, "intconn") != NULL) { + if (pcb_attribute_get(&obj->Attributes, "intconn") != NULL) { warned = 1; rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); } @@ -609,7 +609,7 @@ pcb_pstk_compshape_t cshape; rnd_bool plated; pcb_flag_t flg; - char *name = rnd_attribute_get(&ps->Attributes, "name"); + char *name = pcb_attribute_get(&ps->Attributes, "name"); if (!pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { @@ -644,7 +644,7 @@ lht_node_t *obj; rnd_coord_t x1, y1, x2, y2, thickness, clearance, mask; rnd_bool square, nopaste; - char *name = rnd_attribute_get(&ps->Attributes, "name"); + char *name = pcb_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)) { @@ -795,11 +795,11 @@ if (role != NULL) lht_dom_hash_put(obj, build_text("role", role)); - if ((wrver < 7) && ((av = rnd_attribute_get(&text->Attributes, "tight_clearance")) != NULL)) + if ((wrver < 7) && ((av = pcb_attribute_get(&text->Attributes, "tight_clearance")) != NULL)) if (rnd_istrue(av)) pcb_io_incompat_save(NULL, (pcb_any_obj_t *)text, "text_tight_clearance", "lihata boards before version v7 did not support text tight_clearance\n", "Either save in lihata v7+ or remove the tight_clearance attribute"); - if ((wrver < 7) && ((av = rnd_attribute_get(&text->Attributes, "mirror_x")) != NULL)) + if ((wrver < 7) && ((av = pcb_attribute_get(&text->Attributes, "mirror_x")) != NULL)) if (rnd_istrue(av)) pcb_io_incompat_save(NULL, (pcb_any_obj_t *)text, "text_mirror_x", "lihata boards before version v7 did not support text mirror_x\n", "Either save in lihata v7+ or remove the mirror_x attribute"); @@ -859,11 +859,11 @@ if (!seen_refdes) { pcb_text_t tmp; memcpy(&tmp, text, sizeof(tmp)); - tmp.TextString = rnd_attribute_get(&subc->Attributes, "footprint"); + tmp.TextString = pcb_attribute_get(&subc->Attributes, "footprint"); lht_dom_list_append(lst, build_pcb_text("desc", &tmp)); - tmp.TextString = rnd_attribute_get(&subc->Attributes, "refdes"); + tmp.TextString = pcb_attribute_get(&subc->Attributes, "refdes"); lht_dom_list_append(lst, build_pcb_text("name", &tmp)); - tmp.TextString = rnd_attribute_get(&subc->Attributes, "value"); + tmp.TextString = pcb_attribute_get(&subc->Attributes, "value"); lht_dom_list_append(lst, build_pcb_text("value", &tmp)); seen_refdes = 1; } @@ -1524,7 +1524,7 @@ pcb_net_t *net = e->value; pcb_net_term_t *t; const char *netname = net->name; - const char *style = rnd_attribute_get(&net->Attributes, "style"); + const char *style = pcb_attribute_get(&net->Attributes, "style"); /* create the net hash */ nnet = lht_dom_node_alloc(LHT_HASH, netname);