Index: attribs.c =================================================================== --- attribs.c (revision 30904) +++ attribs.c (revision 30905) @@ -76,7 +76,7 @@ if (n->type == LHT_TEXT) { conf_native_t *nv = pcb_conf_get_field(path); if ((nv != NULL) && (!nv->random_flags.io_pcb_no_attrib)) - pcb_attribute_put(&pcb->Attributes, apath, n->data.text.value); + rnd_attribute_put(&pcb->Attributes, apath, n->data.text.value); } else if (n->type == LHT_LIST) { lht_node_t *i; @@ -91,7 +91,7 @@ gds_append_str(&conc, LISTSEP); gds_append_str(&conc, i->data.text.value); } - pcb_attribute_put(&pcb->Attributes, apath, conc.array); + rnd_attribute_put(&pcb->Attributes, apath, conc.array); gds_uninit(&conc); } } Index: file.c =================================================================== --- file.c (revision 30904) +++ file.c (revision 30905) @@ -210,7 +210,7 @@ } -static void WriteAttributeList(FILE * FP, pcb_attribute_list_t *list, const char *prefix, const char **inhibit) +static void WriteAttributeList(FILE * FP, rnd_attribute_list_t *list, const char *prefix, const char **inhibit) { int i; const char **ih; @@ -352,7 +352,7 @@ rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; rnd_bool plated; - 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)) { pcb_io_incompat_save(Data, (pcb_any_obj_t *)ps, "via", "Failed to convert to old-style via", "Old via format is very much restricted; try to use a simpler, uniform shape padstack"); @@ -396,7 +396,7 @@ fprintf(FP, "\tNet("); pcb_print_quoted_string(FP, net->name); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_UNKNOWN(pcb_attribute_get(&net->Attributes, "style"))); + pcb_print_quoted_string(FP, (char *) PCB_UNKNOWN(rnd_attribute_get(&net->Attributes, "style"))); fprintf(FP, ")\n\t(\n"); for(t = pcb_termlist_first(&net->conns); t != NULL; t = pcb_termlist_next(t)) { fprintf(FP, "\t\tConnect(\""); @@ -447,16 +447,16 @@ } else { const char *tmp; - tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_x"); + tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_x"); if (tmp != NULL) rx = pcb_get_value(tmp, NULL, NULL, NULL) - ox; - tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_y"); + tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_y"); if (tmp != NULL) ry = pcb_get_value(tmp, NULL, NULL, NULL) - oy; - tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_direction"); + tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_direction"); if (tmp != NULL) rdir = atoi(tmp); - tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_scale"); + tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_scale"); if (tmp != NULL) rscale = atoi(tmp); } @@ -468,11 +468,11 @@ if (on_bot) fobj.Flags.f |= PCB_FLAG_ONSOLDER; fprintf(FP, "\nElement[%s ", F2S(&fobj, PCB_OBJ_ELEMENT)); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pcb_attribute_get(&sc->Attributes, "footprint"))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "footprint"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pcb_attribute_get(&sc->Attributes, "refdes"))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "refdes"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pcb_attribute_get(&sc->Attributes, "value"))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "value"))); pcb_fprintf(FP, " %[0] %[0] %[0] %[0] %d %d %s]\n(\n", ox, oy, rx, ry, rdir, rscale, trefdes != NULL ? F2S(trefdes, PCB_OBJ_ELEMENT_NAME) : "\"\""); WriteAttributeList(FP, &sc->Attributes, "\t", attr_inhibit); @@ -483,9 +483,9 @@ unsigned char ic = ps->intconn; if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { pcb_fprintf(FP, "\tPin[%[0] %[0] %[0] %[0] %[0] %[0] ", x - ox, y - oy, pad_dia, clearance*2, mask, drill_dia); - pcb_print_quoted_string(FP, (char *)PCB_EMPTY(pcb_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pcb_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); fprintf(FP, " %s]\n", pcb_strflg_f2s(pcb_pstk_compat_pinvia_flag(ps, cshape, PCB_PSTKCOMP_OLD_OCTAGON), PCB_OBJ_PIN, &ic, 1)); } else if (pcb_pstk_export_compat_pad(ps, &x1, &y1, &x2, &y2, &thickness, &clearance, &mask, &square, &nopaste)) { @@ -492,9 +492,9 @@ unsigned long fl = (square ? PCB_FLAG_SQUARE : 0) | (nopaste ? PCB_FLAG_NOPASTE : 0) | (on_bot ? PCB_FLAG_ONSOLDER : 0); pcb_fprintf(FP, "\tPad[%[0] %[0] %[0] %[0] %[0] %[0] %[0] ", x1 - ox, y1 - oy, x2 - ox, y2 - oy, thickness, clearance, mask); - pcb_print_quoted_string(FP, (char *)PCB_EMPTY(pcb_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(pcb_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); fprintf(FP, " %s]\n", pcb_strflg_f2s(pcb_flag_make(fl), PCB_OBJ_PAD, &ic, 1)); } else @@ -732,7 +732,7 @@ int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { - pcb_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); + rnd_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); LayersFixup(); @@ -1039,11 +1039,11 @@ PCB_FLAG_SET(Flags.f, sc); if (Description != NULL) - pcb_attribute_put(&sc->Attributes, "footprint", Description); + rnd_attribute_put(&sc->Attributes, "footprint", Description); if (NameOnPCB != NULL) - pcb_attribute_put(&sc->Attributes, "refdes", NameOnPCB); + rnd_attribute_put(&sc->Attributes, "refdes", NameOnPCB); if (Value != NULL) - pcb_attribute_put(&sc->Attributes, "value", Value); + rnd_attribute_put(&sc->Attributes, "value", Value); TODO("subc: TextFlags") if (!(Flags.f & PCB_FLAG_HIDENAME)) @@ -1052,13 +1052,13 @@ if (Flags.f & PCB_FLAG_HIDENAME) { char tmp[128]; pcb_sprintf(tmp, "%$mm", TextX); - pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_x", tmp); + rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_x", tmp); pcb_sprintf(tmp, "%$mm", TextY); - pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_y", tmp); + rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_y", tmp); sprintf(tmp, "%d", Direction); - pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_direction", tmp); + rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_direction", tmp); sprintf(tmp, "%d", TextScale); - pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_scale", tmp); + rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_scale", tmp); } return sc; @@ -1101,9 +1101,9 @@ pcb_pstk_t *p; p = pcb_old_via_new(subc->data, -1, X, Y, Thickness, Clearance, Mask, DrillingHole, Name, Flags); 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 (yysubc_bottom) pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); @@ -1116,9 +1116,9 @@ p = pcb_pstk_new_compat_pad(subc->data, -1, X1, Y1, X2, Y2, Thickness, Clearance, Mask, Flags.f & PCB_FLAG_SQUARE, Flags.f & PCB_FLAG_NOPASTE, (!!(Flags.f & PCB_FLAG_ONSOLDER)) != yysubc_bottom); 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 (yysubc_bottom) { pcb_data_t *old_hack = pcb_pstk_data_hack; Index: parse_l.c =================================================================== --- parse_l.c (revision 30904) +++ parse_l.c (revision 30905) @@ -2814,7 +2814,7 @@ } if (retval == 0) { /* restore loader so the next save will use the same units */ - const char *loader = pcb_attribute_get(&PCB->Attributes, "PCB::loader"); + const char *loader = rnd_attribute_get(&PCB->Attributes, "PCB::loader"); if (loader != NULL) { pcb_find_io_t f; int len; Index: parse_l.l =================================================================== --- parse_l.l (revision 30904) +++ parse_l.l (revision 30905) @@ -431,7 +431,7 @@ } if (retval == 0) { /* restore loader so the next save will use the same units */ - const char *loader = pcb_attribute_get(&PCB->Attributes, "PCB::loader"); + const char *loader = rnd_attribute_get(&PCB->Attributes, "PCB::loader"); if (loader != NULL) { pcb_find_io_t f; int len; Index: parse_y.c =================================================================== --- parse_y.c (revision 30904) +++ parse_y.c (revision 30905) @@ -161,7 +161,7 @@ static char *layer_group_string; -static pcb_attribute_list_t *attr_list; +static rnd_attribute_list_t *attr_list; int yyerror(const char *s); int yylex(); @@ -2704,7 +2704,7 @@ pcb_pstk_t *pin = io_pcb_element_pin_new(yysubc, NU ((yyvsp[-9].measure)) + yysubc_ox, NU ((yyvsp[-8].measure)) + yysubc_oy, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].flagtype)); - pcb_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); + rnd_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } @@ -2775,7 +2775,7 @@ NU ((yyvsp[-8].measure)) + yysubc_ox, NU ((yyvsp[-7].measure)) + yysubc_oy, NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].flagtype)); - pcb_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); + rnd_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } @@ -2892,7 +2892,7 @@ { currnet = pcb_net_get(yyPCB, &yyPCB->netlist[PCB_NETLIST_INPUT], (yyvsp[-3].string), PCB_NETA_ALLOC); if (((yyvsp[-2].string) != NULL) && (*(yyvsp[-2].string) != '\0')) - pcb_attribute_put(&currnet->Attributes, "style", (yyvsp[-2].string)); + rnd_attribute_put(&currnet->Attributes, "style", (yyvsp[-2].string)); free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } @@ -2930,11 +2930,11 @@ #line 1322 "parse_y.y" /* yacc.c:1652 */ { char *old_val, *key = (yyvsp[-2].string), *val = (yyvsp[-1].string) ? (yyvsp[-1].string) : (char *)""; - old_val = pcb_attribute_get(attr_list, key); + old_val = rnd_attribute_get(attr_list, key); if (old_val != NULL) rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else - pcb_attribute_put(attr_list, key, val); + rnd_attribute_put(attr_list, key, val); free(key); free(val); } Index: parse_y.y =================================================================== --- parse_y.y (revision 30904) +++ parse_y.y (revision 30905) @@ -84,7 +84,7 @@ static char *layer_group_string; -static pcb_attribute_list_t *attr_list; +static rnd_attribute_list_t *attr_list; int yyerror(const char *s); int yylex(); @@ -1034,7 +1034,7 @@ pcb_pstk_t *pin = io_pcb_element_pin_new(yysubc, NU ($3) + yysubc_ox, NU ($4) + yysubc_oy, NU ($5), NU ($6), NU ($7), NU ($8), $9, $10, $11); - pcb_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); + rnd_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); free ($9); free ($10); } @@ -1107,7 +1107,7 @@ NU ($5) + yysubc_ox, NU ($6) + yysubc_oy, NU ($7), NU ($8), NU ($9), $10, $11, $12); - pcb_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); + rnd_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); free ($10); free ($11); } @@ -1246,7 +1246,7 @@ { currnet = pcb_net_get(yyPCB, &yyPCB->netlist[PCB_NETLIST_INPUT], $3, PCB_NETA_ALLOC); if (($4 != NULL) && (*$4 != '\0')) - pcb_attribute_put(&currnet->Attributes, "style", $4); + rnd_attribute_put(&currnet->Attributes, "style", $4); free ($3); free ($4); } @@ -1321,11 +1321,11 @@ : T_ATTRIBUTE '(' STRING STRING ')' { char *old_val, *key = $3, *val = $4 ? $4 : (char *)""; - old_val = pcb_attribute_get(attr_list, key); + old_val = rnd_attribute_get(attr_list, key); if (old_val != NULL) rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else - pcb_attribute_put(attr_list, key, val); + rnd_attribute_put(attr_list, key, val); free(key); free(val); }