Index: excitation.c =================================================================== --- excitation.c (revision 30904) +++ excitation.c (revision 30905) @@ -57,9 +57,9 @@ static void ser_save(const char *data, const char *attrkey) { - const char *orig = pcb_attribute_get(&PCB->Attributes, attrkey); + const char *orig = rnd_attribute_get(&PCB->Attributes, attrkey); if ((orig == NULL) || (strcmp(orig, data) != 0)) { - pcb_attribute_put(&PCB->Attributes, attrkey, data); + rnd_attribute_put(&PCB->Attributes, attrkey, data); pcb_board_set_changed_flag(pcb_true); } } @@ -66,7 +66,7 @@ static const char *ser_load(const char *attrkey) { - return pcb_attribute_get(&PCB->Attributes, attrkey); + return rnd_attribute_get(&PCB->Attributes, attrkey); } #if 0 @@ -186,10 +186,10 @@ { double f0 = 0, fc = 0; - if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) + if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) rnd_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); - if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) + if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) rnd_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::fc\n"); return pcb_strdup_printf("FDTD = SetGaussExcite(FDTD, %f, %f);", fc, f0); @@ -224,7 +224,7 @@ { double f0; - if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) + if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) rnd_message(PCB_MSG_ERROR, "Sinus excitation: unable to parse frequency sinusoidal::f0\n"); return pcb_strdup_printf("FDTD = SetSinusExcite(FDTD, %f);", f0); @@ -264,13 +264,13 @@ { double f0; - if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) + if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) rnd_message(PCB_MSG_ERROR, "Custom excitation: unable to parse frequency custom::f0\n"); return pcb_strdup_printf( "FDTD = SetCustomExcite(FDTD, %f, %s)", f0, - pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") + rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") ); } @@ -302,7 +302,7 @@ static char *exc_user_get(int idx) { - return pcb_strdup(pcb_attribute_get(&PCB->Attributes, AEPREFIX "user-defined::script")); + return pcb_strdup(rnd_attribute_get(&PCB->Attributes, AEPREFIX "user-defined::script")); } static void exc_user_ser(int idx, int save) @@ -346,7 +346,7 @@ static int load_selector(void) { - const char *type = pcb_attribute_get(&PCB->Attributes, AEPREFIX "type"); + const char *type = rnd_attribute_get(&PCB->Attributes, AEPREFIX "type"); const exc_t *e; int n; @@ -378,9 +378,9 @@ pcb_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, exc_ctx.wtab, &hv); pcb_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, exc_ctx.wselector, &hv); if (setattr) { - const char *orig = pcb_attribute_get(&PCB->Attributes, "openems::excitation::type"); + const char *orig = rnd_attribute_get(&PCB->Attributes, "openems::excitation::type"); if ((orig == NULL) || (strcmp(orig, excitations[exc_ctx.selected].name) != 0)) { - pcb_attribute_put(&PCB->Attributes, "openems::excitation::type", excitations[exc_ctx.selected].name); + rnd_attribute_put(&PCB->Attributes, "openems::excitation::type", excitations[exc_ctx.selected].name); pcb_board_set_changed_flag(pcb_true); } } @@ -473,7 +473,7 @@ rnd_message(PCB_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); goto error; } - pcb_attribute_put(&PCB->Attributes, AEPREFIX "type", a1); + rnd_attribute_put(&PCB->Attributes, AEPREFIX "type", a1); load_selector(); select_update(1); } @@ -493,7 +493,7 @@ RND_PCB_ACT_CONVARG(start+1, FGW_STR, OpenemsExcitation, val = argv[start+1].val.str); attrkey = pcb_strdup_printf(AEPREFIX "%s::%s", a1, key); - pcb_attribute_put(&PCB->Attributes, attrkey, val); + rnd_attribute_put(&PCB->Attributes, attrkey, val); free(attrkey); exc_load_all(); @@ -514,7 +514,7 @@ attrkey = pcb_strdup_printf(AEPREFIX "%s::%s", a1, key); res->type = FGW_STR; - res->val.cstr = pcb_attribute_get(&PCB->Attributes, attrkey); + res->val.cstr = rnd_attribute_get(&PCB->Attributes, attrkey); free(attrkey); } Index: export_openems.c =================================================================== --- export_openems.c (revision 30904) +++ export_openems.c (revision 30905) @@ -186,7 +186,7 @@ static void find_origin_bump(void *ctx_, pcb_board_t *pcb, pcb_layer_t *layer, pcb_line_t *line) { wctx_t *ctx = ctx_; - if (pcb_attribute_get(&line->Attributes, "openems-origin") != NULL) { + if (rnd_attribute_get(&line->Attributes, "openems-origin") != NULL) { ctx->ox = (line->BoundingBox.X1 + line->BoundingBox.X2) / 2; ctx->oy = (line->BoundingBox.Y1 + line->BoundingBox.Y2) / 2; } @@ -235,7 +235,7 @@ TODO(": this needs layer group attributes in core (planned for lihata v5)") #if 0 TODO(": try openems::attr first - make a new core call for prefixed get, this will be a real common pattern") - const char *val = pcb_attribute_get(&grp->Attributes, attr); + const char *val = rnd_attribute_get(&grp->Attributes, attr); if (val != NULL) { /* specified by a layer group attribute: overrides anything else */ @@ -369,7 +369,7 @@ ctx->port_id++; - att = pcb_attribute_get(&o->Attributes, "openems::resistance"); + att = rnd_attribute_get(&o->Attributes, "openems::resistance"); if (att != NULL) { double tmp = strtod(att, &end); if (*end == '\0') @@ -378,7 +378,7 @@ rnd_message(PCB_MSG_WARNING, "Ignoring invalid openems::resistance value for port %s: '%s' (must be a number without suffix)\n", port_name, att); } - att = pcb_attribute_get(&o->Attributes, "openems::active"); + att = rnd_attribute_get(&o->Attributes, "openems::active"); if (att != NULL) { if (pcb_strcasecmp(att, "true") == 0) act = 1; @@ -461,7 +461,7 @@ if (o->type == PCB_OBJ_SUBC) openems_write_testpoints(ctx, ((pcb_subc_t *)o)->data); - port_name = pcb_attribute_get(&o->Attributes, "openems::vport"); + port_name = rnd_attribute_get(&o->Attributes, "openems::vport"); if (port_name == NULL) continue; @@ -493,7 +493,7 @@ TODO(": check if there is copper object on hid2 at x;y") - if (pcb_attribute_get(&o->Attributes, "openems::vport-reverse") == NULL) + if (rnd_attribute_get(&o->Attributes, "openems::vport-reverse") == NULL) openems_vport_write(ctx, (pcb_any_obj_t *)ps, ps->x, ps->y, gid1, gid2, port_name); else openems_vport_write(ctx, (pcb_any_obj_t *)ps, ps->x, ps->y, gid2, gid1, port_name); Index: mesh.c =================================================================== --- mesh.c (revision 30904) +++ mesh.c (revision 30905) @@ -343,7 +343,7 @@ gdl_iterator_t it; padstacklist_foreach(&data->padstack, &it, ps) { - if (pcb_attribute_get(&ps->Attributes, "openems::vport") != 0) { + if (rnd_attribute_get(&ps->Attributes, "openems::vport") != 0) { switch(dir) { case PCB_MESH_HORIZONTAL: mesh_add_edge(mesh, dir, ps->y); break; case PCB_MESH_VERTICAL: mesh_add_edge(mesh, dir, ps->x); break;