Index: excitation.c =================================================================== --- excitation.c (revision 32114) +++ excitation.c (revision 32115) @@ -60,9 +60,9 @@ static void ser_save(const char *data, const char *attrkey) { - const char *orig = rnd_attribute_get(&PCB->Attributes, attrkey); + const char *orig = pcb_attribute_get(&PCB->Attributes, attrkey); if ((orig == NULL) || (strcmp(orig, data) != 0)) { - rnd_attribute_put(&PCB->Attributes, attrkey, data); + pcb_attribute_put(&PCB->Attributes, attrkey, data); pcb_board_set_changed_flag(rnd_true); } } @@ -69,7 +69,7 @@ static const char *ser_load(const char *attrkey) { - return rnd_attribute_get(&PCB->Attributes, attrkey); + return pcb_attribute_get(&PCB->Attributes, attrkey); } #if 0 @@ -189,10 +189,10 @@ { double f0 = 0, fc = 0; - if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) + if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) rnd_message(RND_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); - if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) + if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) rnd_message(RND_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::fc\n"); if (fmt_matlab) @@ -230,7 +230,7 @@ { double f0; - if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) + if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) rnd_message(RND_MSG_ERROR, "Sinus excitation: unable to parse frequency sinusoidal::f0\n"); if (fmt_matlab) @@ -272,7 +272,7 @@ { double f0; - if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) + if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) rnd_message(RND_MSG_ERROR, "Custom excitation: unable to parse frequency custom::f0\n"); if (fmt_matlab) @@ -279,13 +279,13 @@ return rnd_strdup_printf( "FDTD = SetCustomExcite(FDTD, %f, %s)", f0, - rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") + pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") ); return rnd_strdup_printf("Type='%d' f0='%f' Function='%s'", excitations[idx].type_id, f0, - rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") + pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::func") ); } @@ -318,7 +318,7 @@ static char *exc_user_get(int idx, int fmt_matlab) { if (fmt_matlab) - return rnd_strdup(rnd_attribute_get(&PCB->Attributes, AEPREFIX "user-defined::script")); + return rnd_strdup(pcb_attribute_get(&PCB->Attributes, AEPREFIX "user-defined::script")); return NULL; } @@ -364,7 +364,7 @@ static int load_selector(void) { - const char *type = rnd_attribute_get(&PCB->Attributes, AEPREFIX "type"); + const char *type = pcb_attribute_get(&PCB->Attributes, AEPREFIX "type"); const exc_t *e; int n; @@ -396,9 +396,9 @@ rnd_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, exc_ctx.wtab, &hv); rnd_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, exc_ctx.wselector, &hv); if (setattr) { - const char *orig = rnd_attribute_get(&PCB->Attributes, "openems::excitation::type"); + const char *orig = pcb_attribute_get(&PCB->Attributes, "openems::excitation::type"); if ((orig == NULL) || (strcmp(orig, excitations[exc_ctx.selected].name) != 0)) { - rnd_attribute_put(&PCB->Attributes, "openems::excitation::type", excitations[exc_ctx.selected].name); + pcb_attribute_put(&PCB->Attributes, "openems::excitation::type", excitations[exc_ctx.selected].name); pcb_board_set_changed_flag(rnd_true); } } @@ -491,7 +491,7 @@ rnd_message(RND_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); goto error; } - rnd_attribute_put(&PCB->Attributes, AEPREFIX "type", a1); + pcb_attribute_put(&PCB->Attributes, AEPREFIX "type", a1); load_selector(); select_update(1); } @@ -511,7 +511,7 @@ RND_ACT_CONVARG(start+1, FGW_STR, OpenemsExcitation, val = argv[start+1].val.str); attrkey = rnd_strdup_printf(AEPREFIX "%s::%s", a1, key); - rnd_attribute_put(&PCB->Attributes, attrkey, val); + pcb_attribute_put(&PCB->Attributes, attrkey, val); free(attrkey); exc_load_all(); @@ -532,7 +532,7 @@ attrkey = rnd_strdup_printf(AEPREFIX "%s::%s", a1, key); res->type = FGW_STR; - res->val.cstr = rnd_attribute_get(&PCB->Attributes, attrkey); + res->val.cstr = pcb_attribute_get(&PCB->Attributes, attrkey); free(attrkey); } Index: export_openems.c =================================================================== --- export_openems.c (revision 32114) +++ export_openems.c (revision 32115) @@ -202,7 +202,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 (rnd_attribute_get(&line->Attributes, "openems-origin") != NULL) { + if (pcb_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; } @@ -251,7 +251,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 = rnd_attribute_get(&grp->Attributes, attr); + const char *val = pcb_attribute_get(&grp->Attributes, attr); if (val != NULL) { /* specified by a layer group attribute: overrides anything else */ @@ -394,7 +394,7 @@ double resistance = ctx->options[HA_def_port_res].dbl; int act = 1; - att = rnd_attribute_get(&o->Attributes, "openems::resistance"); + att = pcb_attribute_get(&o->Attributes, "openems::resistance"); if (att != NULL) { double tmp = strtod(att, &end); if (*end == '\0') @@ -403,7 +403,7 @@ rnd_message(RND_MSG_WARNING, "Ignoring invalid openems::resistance value for port %s: '%s' (must be a number without suffix)\n", port_name, att); } - att = rnd_attribute_get(&o->Attributes, "openems::active"); + att = pcb_attribute_get(&o->Attributes, "openems::active"); if (att != NULL) { if (rnd_strcasecmp(att, "true") == 0) act = 1; @@ -487,7 +487,7 @@ if (o->type == PCB_OBJ_SUBC) openems_wr_testpoints(ctx, ((pcb_subc_t *)o)->data); - port_name = rnd_attribute_get(&o->Attributes, "openems::vport"); + port_name = pcb_attribute_get(&o->Attributes, "openems::vport"); if (port_name == NULL) continue; @@ -519,7 +519,7 @@ TODO(": check if there is copper object on hid2 at x;y") - if (rnd_attribute_get(&o->Attributes, "openems::vport-reverse") == NULL) + if (pcb_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 32114) +++ mesh.c (revision 32115) @@ -358,7 +358,7 @@ gdl_iterator_t it; padstacklist_foreach(&data->padstack, &it, ps) { - if (rnd_attribute_get(&ps->Attributes, "openems::vport") != 0) { + if (pcb_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;