Index: read.c =================================================================== --- read.c (revision 32114) +++ read.c (revision 32115) @@ -238,7 +238,7 @@ htsi_set(&st->layer_k2i, rnd_strdup(lname), id); if (ltype != NULL) { pcb_layer_t *ly = pcb_get_layer(st->pcb->Data, id); - rnd_attribute_put(&ly->Attributes, "kicad::type", ltype); + pcb_attribute_put(&ly->Attributes, "kicad::type", ltype); } return 0; } @@ -609,17 +609,17 @@ return kicad_error(subtree, "error parsing KiCad titleblock: empty"); name = rnd_concat(prefix, subtree->str, NULL); - rnd_attrib_put(st->pcb, name, subtree->children->str); + pcb_attrib_put(st->pcb, name, subtree->children->str); free(name); for(n = subtree->next; n != NULL; n = n->next) { if (n->str != NULL && strcmp("comment", n->str) != 0) { name = rnd_concat(prefix, n->str, NULL); - rnd_attrib_put(st->pcb, name, n->children->str); + pcb_attrib_put(st->pcb, name, n->children->str); free(name); } else { /* if comment field has extra children args */ name = rnd_concat(prefix, n->str, "_", n->children->str, NULL); - rnd_attrib_put(st->pcb, name, n->children->next->str); + pcb_attrib_put(st->pcb, name, n->children->next->str); free(name); } } @@ -1110,7 +1110,7 @@ } line = pcb_line_new(ly, x1, y1, x2, y2, thickness, clearance, flg); if (st->primitive_term != NULL) - rnd_attribute_put(&line->Attributes, "term", st->primitive_term); + pcb_attribute_put(&line->Attributes, "term", st->primitive_term); return 0; } @@ -1223,7 +1223,7 @@ } arc = pcb_arc_new(ly, cx, cy, width, height, start_angle, delta, thickness, clearance, flg, rnd_true); if (st->primitive_term != NULL) - rnd_attribute_put(&arc->Attributes, "term", st->primitive_term); + pcb_attribute_put(&arc->Attributes, "term", st->primitive_term); } return 0; @@ -1789,7 +1789,7 @@ } if (pin_name != NULL) - rnd_attribute_put(&ps->Attributes, "term", pin_name); + pcb_attribute_put(&ps->Attributes, "term", pin_name); if (netname != NULL) { pcb_net_term_t *term; @@ -1825,16 +1825,16 @@ if (strcmp("reference", key) == 0) { SEEN_NO_DUP(*tally, 7); pcb_obj_id_fix(text); - rnd_attribute_put(&subc->Attributes, "refdes", text); + pcb_attribute_put(&subc->Attributes, "refdes", text); *foundRefdes = 1; } else if (strcmp("value", key) == 0) { SEEN_NO_DUP(*tally, 8); - rnd_attribute_put(&subc->Attributes, "value", text); + pcb_attribute_put(&subc->Attributes, "value", text); } else if (strcmp("descr", key) == 0) { SEEN_NO_DUP(*tally, 12); - rnd_attribute_put(&subc->Attributes, "footprint", text); + pcb_attribute_put(&subc->Attributes, "footprint", text); } else if (strcmp("hide", key) == 0) { hidden = 1; @@ -2269,7 +2269,7 @@ pcb_poly_init_clip(subc->data, ly, poly); if (st->primitive_term != NULL) - rnd_attribute_put(&poly->Attributes, "term", st->primitive_term); + pcb_attribute_put(&poly->Attributes, "term", st->primitive_term); return 0; } @@ -2296,7 +2296,7 @@ /* loading a module as a footprint - always create the subc in advance */ subc = pcb_subc_new(); pcb_subc_create_aux(subc, 0, 0, 0.0, 0); - rnd_attribute_put(&subc->Attributes, "refdes", "K1"); + pcb_attribute_put(&subc->Attributes, "refdes", "K1"); if (st->pcb != NULL) { pcb_subc_reg(st->pcb->Data, subc); pcb_subc_bind_globals(st->pcb, subc); @@ -2355,7 +2355,7 @@ return kicad_error(n, "unexpected empty/NULL module attr node"); key = rnd_concat("kicad_attr_", n->children->str, NULL); - rnd_attribute_put(&subc->Attributes, key, "1"); + pcb_attribute_put(&subc->Attributes, key, "1"); free(key); } else if (strcmp("at", n->str) == 0) { @@ -2375,7 +2375,7 @@ has no 'floater' - rotation is encoded both in text and subc and it has to be subtracted from text later on */ pcb_subc_create_aux(subc, mod_x, mod_y, 0.0, on_bottom); - rnd_attribute_put(&subc->Attributes, "refdes", "K1"); + pcb_attribute_put(&subc->Attributes, "refdes", "K1"); } if (st->pcb != NULL) { pcb_subc_reg(st->pcb->Data, subc); @@ -2401,13 +2401,13 @@ SEEN_NO_DUP(tally, 11); if ((n->children == NULL) || (n->children->str == NULL)) return kicad_error(n, "unexpected empty/NULL module descr node"); - rnd_attribute_put(&subc->Attributes, "kicad_descr", n->children->str); + pcb_attribute_put(&subc->Attributes, "kicad_descr", n->children->str); } else if (strcmp("tags", n->str) == 0) { SEEN_NO_DUP(tally, 12); if ((n->children == NULL) || (n->children->str == NULL)) return kicad_error(n, "unexpected empty/NULL module tags node"); - rnd_attribute_put(&subc->Attributes, "kicad_tags", n->children->str); + pcb_attribute_put(&subc->Attributes, "kicad_tags", n->children->str); } else if (strcmp("solder_paste_margin", n->str) == 0) { PARSE_COORD(mod_paste, n, n->children, "module pad solder_paste_margin"); @@ -2450,8 +2450,8 @@ if (subc == NULL) return kicad_error(subtree, "unable to create incomplete subc."); - if ((mod_name != NULL) && (*mod_name != '\0') && (rnd_attribute_get(&subc->Attributes, "footprint") == NULL)) - rnd_attribute_put(&subc->Attributes, "footprint", mod_name); + if ((mod_name != NULL) && (*mod_name != '\0') && (pcb_attribute_get(&subc->Attributes, "footprint") == NULL)) + pcb_attribute_put(&subc->Attributes, "footprint", mod_name); pcb_subc_bbox(subc); if (st->pcb != NULL) { Index: write.c =================================================================== --- write.c (revision 32114) +++ write.c (revision 32115) @@ -754,21 +754,21 @@ if (group1 != NULL) { TODO(": we should probably do unm_name() on the refdes, not on footprint-name?") TODO(": the unique name makes no sense if we override it with unknown - if the unique name is NULL, it is more likely a save-incompatibility error") - currentElementName = unm_name(group1, rnd_attribute_get(&subc->Attributes, "footprint"), subc); + currentElementName = unm_name(group1, pcb_attribute_get(&subc->Attributes, "footprint"), subc); if (currentElementName == NULL) currentElementName = "unknown"; } else { - currentElementName = rnd_attribute_get(&subc->Attributes, "footprint"); + currentElementName = pcb_attribute_get(&subc->Attributes, "footprint"); if (currentElementName == NULL) currentElementName = "unknown"; } - currentElementRef = rnd_attribute_get(&subc->Attributes, "refdes"); + currentElementRef = pcb_attribute_get(&subc->Attributes, "refdes"); if (currentElementRef == NULL) { currentElementRef = "unknown"; } - currentElementVal = rnd_attribute_get(&subc->Attributes, "value"); + currentElementVal = pcb_attribute_get(&subc->Attributes, "value"); if (currentElementVal == NULL) { currentElementVal = "unknown"; }