Index: trunk/src/attrib.c =================================================================== --- trunk/src/attrib.c (revision 32114) +++ trunk/src/attrib.c (revision 32115) @@ -41,7 +41,7 @@ list->post_change(list, name, value); \ } while(0) -char *rnd_attribute_get(const rnd_attribute_list_t *list, const char *name) +char *pcb_attribute_get(const pcb_attribute_list_t *list, const char *name) { int i; for (i = 0; i < list->Number; i++) @@ -50,7 +50,7 @@ return NULL; } -char **rnd_attribute_get_ptr(const rnd_attribute_list_t *list, const char *name) +char **pcb_attribute_get_ptr(const pcb_attribute_list_t *list, const char *name) { int i; for (i = 0; i < list->Number; i++) @@ -59,7 +59,7 @@ return NULL; } -char **rnd_attribute_get_namespace_ptr(const rnd_attribute_list_t *list, const char *plugin, const char *key) +char **pcb_attribute_get_namespace_ptr(const pcb_attribute_list_t *list, const char *plugin, const char *key) { int i, glb = -1, plugin_len = strlen(plugin); @@ -76,15 +76,15 @@ return NULL; /* nothing */ } -char *rnd_attribute_get_namespace(const rnd_attribute_list_t *list, const char *plugin, const char *key) +char *pcb_attribute_get_namespace(const pcb_attribute_list_t *list, const char *plugin, const char *key) { - char **res = rnd_attribute_get_namespace_ptr(list, plugin, key); + char **res = pcb_attribute_get_namespace_ptr(list, plugin, key); if (res == NULL) return NULL; return *res; } -int rnd_attribute_put(rnd_attribute_list_t * list, const char *name, const char *value) +int pcb_attribute_put(pcb_attribute_list_t * list, const char *name, const char *value) { int i; @@ -106,7 +106,7 @@ list. See if there's room. */ if (list->Number >= list->Max) { list->Max += 10; - list->List = (rnd_attribute_t *) realloc(list->List, list->Max * sizeof(rnd_attribute_t)); + list->List = (pcb_attribute_t *) realloc(list->List, list->Max * sizeof(pcb_attribute_t)); } /* Now add the new attribute. */ @@ -119,7 +119,7 @@ return 0; } -int rnd_attribute_remove_idx(rnd_attribute_list_t * list, int idx) +int pcb_attribute_remove_idx(pcb_attribute_list_t * list, int idx) { int j; char *old_name = list->List[idx].name, *old_value = list->List[idx].value; @@ -134,18 +134,18 @@ return 0; } -int rnd_attribute_remove(rnd_attribute_list_t * list, const char *name) +int pcb_attribute_remove(pcb_attribute_list_t * list, const char *name) { int i, found = 0; for (i = 0; i < list->Number; i++) if (strcmp(name, list->List[i].name) == 0) { found++; - rnd_attribute_remove_idx(list, i); + pcb_attribute_remove_idx(list, i); } return found; } -void rnd_attribute_free(rnd_attribute_list_t *list) +void pcb_attribute_free(pcb_attribute_list_t *list) { int i; @@ -162,16 +162,16 @@ list->Max = 0; } -void rnd_attribute_copy_all(rnd_attribute_list_t *dest, const rnd_attribute_list_t *src) +void pcb_attribute_copy_all(pcb_attribute_list_t *dest, const pcb_attribute_list_t *src) { int i; for (i = 0; i < src->Number; i++) - rnd_attribute_put(dest, src->List[i].name, src->List[i].value); + pcb_attribute_put(dest, src->List[i].name, src->List[i].value); } -void rnd_attribute_copyback_begin(rnd_attribute_list_t *dst) +void pcb_attribute_copyback_begin(pcb_attribute_list_t *dst) { int i; @@ -179,7 +179,7 @@ dst->List[i].cpb_written = 0; } -void rnd_attribute_copyback(rnd_attribute_list_t *dst, const char *name, const char *value) +void pcb_attribute_copyback(pcb_attribute_list_t *dst, const char *name, const char *value) { int i; for (i = 0; i < dst->Number; i++) { @@ -194,19 +194,19 @@ return; } } - rnd_attribute_put(dst, name, value); + pcb_attribute_put(dst, name, value); } -void rnd_attribute_copyback_end(rnd_attribute_list_t *dst) +void pcb_attribute_copyback_end(pcb_attribute_list_t *dst) { int i; for (i = 0; i < dst->Number; i++) if (!dst->List[i].cpb_written) - rnd_attribute_remove_idx(dst, i); + pcb_attribute_remove_idx(dst, i); } -void rnd_attrib_compat_set_intconn(rnd_attribute_list_t *dst, int intconn) +void pcb_attrib_compat_set_intconn(pcb_attribute_list_t *dst, int intconn) { char buff[32]; @@ -214,6 +214,6 @@ return; sprintf(buff, "%d", intconn & 0xFF); - rnd_attribute_put(dst, "intconn", buff); + pcb_attribute_put(dst, "intconn", buff); } Index: trunk/src/attrib.h =================================================================== --- trunk/src/attrib.h (revision 32114) +++ trunk/src/attrib.h (revision 32115) @@ -28,61 +28,61 @@ /* attribute lists */ -#ifndef RND_ATTRIB_H -#define RND_ATTRIB_H +#ifndef PCB_ATTRIB_H +#define PCB_ATTRIB_H -typedef struct rnd_attribute_list_s rnd_attribute_list_t; +typedef struct pcb_attribute_list_s pcb_attribute_list_t; -typedef struct rnd_attribute_s { +typedef struct pcb_attribute_s { char *name; char *value; unsigned cpb_written:1; /* copyback: written */ -} rnd_attribute_t; +} pcb_attribute_t; -struct rnd_attribute_list_s { +struct pcb_attribute_list_s { int Number, Max; - rnd_attribute_t *List; - void (*post_change)(rnd_attribute_list_t *list, const char *name, const char *value); /* called any time an attribute changes (including removes); value is NULL if removed; old value is free'd only after the call so cached old values are valid */ + pcb_attribute_t *List; + void (*post_change)(pcb_attribute_list_t *list, const char *name, const char *value); /* called any time an attribute changes (including removes); value is NULL if removed; old value is free'd only after the call so cached old values are valid */ }; /* Returns NULL if the name isn't found, else the value for that named attribute. The ptr version returns the address of the value str in the slot */ -char *rnd_attribute_get(const rnd_attribute_list_t *list, const char *name); -char **rnd_attribute_get_ptr(const rnd_attribute_list_t *list, const char *name); +char *pcb_attribute_get(const pcb_attribute_list_t *list, const char *name); +char **pcb_attribute_get_ptr(const pcb_attribute_list_t *list, const char *name); -/* Same as rnd_attribute_get, but also look for plugin::key which overrides +/* Same as pcb_attribute_get, but also look for plugin::key which overrides plain key hits */ -char *rnd_attribute_get_namespace(const rnd_attribute_list_t *list, const char *plugin, const char *key); -char **rnd_attribute_get_namespace_ptr(const rnd_attribute_list_t *list, const char *plugin, const char *key); +char *pcb_attribute_get_namespace(const pcb_attribute_list_t *list, const char *plugin, const char *key); +char **pcb_attribute_get_namespace_ptr(const pcb_attribute_list_t *list, const char *plugin, const char *key); /* Adds an attribute to the list. If the attribute already exists, the value is replaced. Returns non-zero if an existing attribute was replaced. */ -int rnd_attribute_put(rnd_attribute_list_t * list, const char *name, const char *value); +int pcb_attribute_put(pcb_attribute_list_t * list, const char *name, const char *value); /* Simplistic version: Takes a pointer to an object, looks up attributes in it. */ -#define rnd_attrib_get(OBJ,name) rnd_attribute_get(&(OBJ->Attributes), name) +#define pcb_attrib_get(OBJ,name) pcb_attribute_get(&(OBJ->Attributes), name) /* Simplistic version: Takes a pointer to an object, sets attributes in it. */ -#define rnd_attrib_put(OBJ,name,value) rnd_attribute_put(&(OBJ->Attributes), name, value) +#define pcb_attrib_put(OBJ,name,value) pcb_attribute_put(&(OBJ->Attributes), name, value) /* Remove an attribute by name; returns number of items removed */ -int rnd_attribute_remove(rnd_attribute_list_t * list, const char *name); +int pcb_attribute_remove(pcb_attribute_list_t * list, const char *name); /* Simplistic version of Remove. */ -#define rnd_attrib_remove(OBJ, name) rnd_attribute_remove(&(OBJ->Attributes), name) +#define pcb_attrib_remove(OBJ, name) pcb_attribute_remove(&(OBJ->Attributes), name) /* remove item by index - WARNING: no checks are made, idx has to be valid! */ -int rnd_attribute_remove_idx(rnd_attribute_list_t * list, int idx); +int pcb_attribute_remove_idx(pcb_attribute_list_t * list, int idx); /* Frees memory used by an attribute list */ -void rnd_attribute_free(rnd_attribute_list_t *list); +void pcb_attribute_free(pcb_attribute_list_t *list); /* Copy each attribute from src to dest */ -void rnd_attribute_copy_all(rnd_attribute_list_t *dest, const rnd_attribute_list_t *src); +void pcb_attribute_copy_all(pcb_attribute_list_t *dest, const pcb_attribute_list_t *src); /* Copy back a mirrored attribute list, minimizing the changes */ -void rnd_attribute_copyback_begin(rnd_attribute_list_t *dst); -void rnd_attribute_copyback(rnd_attribute_list_t *dst, const char *name, const char *value); -void rnd_attribute_copyback_end(rnd_attribute_list_t *dst); +void pcb_attribute_copyback_begin(pcb_attribute_list_t *dst); +void pcb_attribute_copyback(pcb_attribute_list_t *dst, const char *name, const char *value); +void pcb_attribute_copyback_end(pcb_attribute_list_t *dst); /* Set the intconn attribute - hack for compatibility parsing */ -void rnd_attrib_compat_set_intconn(rnd_attribute_list_t *dst, int intconn); +void pcb_attrib_compat_set_intconn(pcb_attribute_list_t *dst, int intconn); #endif Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 32114) +++ trunk/src/board.c (revision 32115) @@ -65,7 +65,7 @@ for (i = 0; i < PCB_NUM_NETLISTS; i++) pcb_netlist_uninit(&(pcb->netlist[i])); vtroutestyle_uninit(&pcb->RouteStyle); - rnd_attribute_free(&pcb->Attributes); + pcb_attribute_free(&pcb->Attributes); pcb_layergroup_free_stack(&pcb->LayerGroups); @@ -414,9 +414,9 @@ { const char *s = NULL; if (namespace != NULL) - s = rnd_attribute_get_namespace(&grp->Attributes, namespace, "thickness"); + s = pcb_attribute_get_namespace(&grp->Attributes, namespace, "thickness"); if (s == NULL) - s = rnd_attribute_get(&grp->Attributes, "thickness"); + s = pcb_attribute_get(&grp->Attributes, "thickness"); return s; } Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 32114) +++ trunk/src/board.h (revision 32115) @@ -84,12 +84,12 @@ pcb_netlist_t netlist[PCB_NUM_NETLISTS]; /* htsp_t netlist_subc[PCB_NUM_NETLISTS]; hierarchic netlists */ pcb_ratspatch_line_t *NetlistPatches, *NetlistPatchLast; - rnd_attribute_list_t Attributes; + pcb_attribute_list_t Attributes; pcb_data_t *Data; /* entire database */ rnd_bool is_footprint; /* If set, the user has loaded a footprint, not a pcb. */ - const rnd_attribute_list_t *pen_attr; + const pcb_attribute_list_t *pen_attr; /* netlist states */ int netlist_frozen; /* counter */ Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 32114) +++ trunk/src/buffer.c (revision 32115) @@ -274,9 +274,9 @@ } s = pcb_subclist_first(&PCB_PASTEBUFFER->Data->subc); - rnd_attribute_put(&s->Attributes, "refdes", refdes); - rnd_attribute_put(&s->Attributes, "footprint", name); - rnd_attribute_put(&s->Attributes, "value", value); + pcb_attribute_put(&s->Attributes, "refdes", refdes); + pcb_attribute_put(&s->Attributes, "footprint", name); + pcb_attribute_put(&s->Attributes, "value", value); RND_ACT_IRES(0); return 0; Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 32114) +++ trunk/src/change.c (revision 32115) @@ -938,7 +938,7 @@ char *curr_value = NULL, **slot; const char *new_val; - slot = rnd_attribute_get_ptr(&ca->obj->Attributes, ca->key); + slot = pcb_attribute_get_ptr(&ca->obj->Attributes, ca->key); /* temp save current state */ if (slot == NULL) @@ -949,8 +949,8 @@ /* install ca in the slot */ if (!ca->delete) { if (curr_delete) { - rnd_attribute_put(&ca->obj->Attributes, ca->key, NULL); - slot = rnd_attribute_get_ptr(&ca->obj->Attributes, ca->key); + pcb_attribute_put(&ca->obj->Attributes, ca->key, NULL); + slot = pcb_attribute_get_ptr(&ca->obj->Attributes, ca->key); } *slot = ca->value; new_val = ca->value; @@ -960,7 +960,7 @@ else { *slot = NULL; new_val = NULL; - rnd_attribute_remove(&ca->obj->Attributes, ca->key); + pcb_attribute_remove(&ca->obj->Attributes, ca->key); } @@ -1004,7 +1004,7 @@ if (key == NULL) return -1; - curr = rnd_attribute_get(&obj->Attributes, key); + curr = pcb_attribute_get(&obj->Attributes, key); if ((curr == NULL) && (new_value == NULL)) return 0; /* nothing to do: both delete */ if ((curr != NULL) && (new_value != NULL) && (strcmp(curr, new_value) == 0)) Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 32114) +++ trunk/src/change_act.c (revision 32115) @@ -448,7 +448,7 @@ for(o = pcb_data_first(&it, subc->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { if ((o->term != NULL) && (RND_NSTRCMP(pinnum, o->term) == 0)) { TODO(": make this undoable") - rnd_attribute_put(&o->Attributes, "name", pinname); + pcb_attribute_put(&o->Attributes, "name", pinname); pcb_board_set_changed_flag(rnd_true); changed++; } Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 32114) +++ trunk/src/extobj_helper.h (revision 32115) @@ -48,7 +48,7 @@ { double v; rnd_bool succ; - const char *s = rnd_attribute_get(&obj->Attributes, name); + const char *s = pcb_attribute_get(&obj->Attributes, name); if (s != NULL) { v = rnd_get_value(s, NULL, NULL, &succ); if (succ) { @@ -63,7 +63,7 @@ { long l; char *end; - const char *s = rnd_attribute_get(&obj->Attributes, name); + const char *s = pcb_attribute_get(&obj->Attributes, name); if (s != NULL) { l = strtol(s, &end, 10); if (*end == '\0') { @@ -101,7 +101,7 @@ if (copy_from != NULL) pcb_subc_copy_meta(subc, copy_from); - rnd_attribute_put(&subc->Attributes, "extobj", eoname); + pcb_attribute_put(&subc->Attributes, "extobj", eoname); for(; layers->name != NULL; layers++) pcb_subc_layer_create(subc, layers->name, layers->lyt, layers->comb, 0, layers->purpose); @@ -178,7 +178,7 @@ rnd_coord_t currval = 0; \ const rnd_unit_t *unit_out = NULL; \ int wid; \ - char *sval = rnd_attribute_get(&subc->Attributes, attr_name); \ + char *sval = pcb_attribute_get(&subc->Attributes, attr_name); \ if (sval != NULL) \ rnd_get_value_unit(sval, NULL, 0, &d, &unit_out); \ currval = d; \ @@ -209,7 +209,7 @@ #define pcb_exto_dlg_str(dlg, subc, vis_name, attr_name, help) \ do { \ int wid; \ - const char *currval = rnd_attribute_get(&subc->Attributes, attr_name); \ + const char *currval = pcb_attribute_get(&subc->Attributes, attr_name); \ if (currval == NULL) currval = ""; \ currval = rnd_strdup(currval); \ RND_DAD_LABEL(dlg, vis_name); \ @@ -235,7 +235,7 @@ do { \ rnd_coord_t currval = 0; \ int wid; \ - char *sval = rnd_attribute_get(&subc->Attributes, attr_name); \ + char *sval = pcb_attribute_get(&subc->Attributes, attr_name); \ if (sval != NULL) \ currval = strtol(sval, NULL, 10); \ RND_DAD_LABEL(dlg, vis_name); \ Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 32114) +++ trunk/src/gui_act.c (revision 32115) @@ -742,9 +742,9 @@ val = NULL; } if (val == NULL) - ret |= rnd_attribute_remove(&ly->Attributes, key); + ret |= pcb_attribute_remove(&ly->Attributes, key); else - ret |= rnd_attribute_put(&ly->Attributes, key, val); + ret |= pcb_attribute_put(&ly->Attributes, key, val); free(key); pcb_board_set_changed_flag(rnd_true); } @@ -852,9 +852,9 @@ val = NULL; } if (val == NULL) - ret |= rnd_attribute_remove(&g->Attributes, key); + ret |= pcb_attribute_remove(&g->Attributes, key); else - ret |= rnd_attribute_put(&g->Attributes, key, val); + ret |= pcb_attribute_put(&g->Attributes, key, val); free(key); } else { @@ -1030,7 +1030,7 @@ } else val = ""; - rnd_attribute_put(&g->Attributes, curr, val); + pcb_attribute_put(&g->Attributes, curr, val); } free(attrs); } Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 32114) +++ trunk/src/layer.c (revision 32115) @@ -127,7 +127,7 @@ } -static void layer_post_change(rnd_attribute_list_t *list, const char *name, const char *value) +static void layer_post_change(pcb_attribute_list_t *list, const char *name, const char *value) { if (strncmp(name, "pcb-rnd::key::", 14) == 0) rnd_event(&PCB->hidlib, PCB_EVENT_LAYER_KEY_CHANGE, NULL); @@ -138,7 +138,7 @@ void pcb_layer_free_fields(pcb_layer_t *layer, rnd_bool undoable) { if (!layer->is_bound) - rnd_attribute_free(&layer->Attributes); + pcb_attribute_free(&layer->Attributes); list_map0(&layer->Line, pcb_line_t, undoable ? UFC(obj_free_undoable) : UFC(pcb_line_free)); list_map0(&layer->Arc, pcb_arc_t, undoable ? UFC(obj_free_undoable) : UFC(pcb_arc_free)); Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 32114) +++ trunk/src/layer_grp.c (revision 32115) @@ -324,7 +324,7 @@ return g; } -static void layergrp_post_change(rnd_attribute_list_t *list, const char *name, const char *value) +static void layergrp_post_change(pcb_attribute_list_t *list, const char *name, const char *value) { pcb_layergrp_t *g = (pcb_layergrp_t *)(((char *)list) - offsetof(pcb_layergrp_t, Attributes)); @@ -1429,7 +1429,7 @@ else grp = pcb_get_grp_new_intern_(pcb, 1, (m->flags & PCB_DFLGMAP_FORCE_END)); if (m->flags & PCB_DFLGMAP_INIT_INVIS) - rnd_attribute_put(&grp->Attributes, "init-invis", "1"); + pcb_attribute_put(&grp->Attributes, "init-invis", "1"); pcb_layergrp_set_dflgly(pcb, grp, m, NULL, NULL); } inhibit_notify--; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 32114) +++ trunk/src/librnd/pcb_compat.h (revision 32115) @@ -63,26 +63,6 @@ #define pcb_bool rnd_bool #define pcb_message rnd_message #define PCB_ACTION_NAME_MAX RND_ACTION_NAME_MAX -#define pcb_attribute_list_s rnd_attribute_list_s -#define pcb_attribute_list_t rnd_attribute_list_t -#define pcb_attribute_t rnd_attribute_t -#define pcb_attribute_s rnd_attribute_s -#define pcb_attribute_get rnd_attribute_get -#define pcb_attribute_get_ptr rnd_attribute_get_ptr -#define pcb_attribute_get_namespace rnd_attribute_get_namespace -#define pcb_attribute_get_namespace_ptr rnd_attribute_get_namespace_ptr -#define pcb_attribute_put rnd_attribute_put -#define pcb_attrib_get rnd_attrib_get -#define pcb_attrib_put rnd_attrib_put -#define pcb_attribute_remove rnd_attribute_remove -#define pcb_attrib_remove rnd_attrib_remove -#define pcb_attribute_remove_idx rnd_attribute_remove_idx -#define pcb_attribute_free rnd_attribute_free -#define pcb_attribute_copy_all rnd_attribute_copy_all -#define pcb_attribute_copyback_begin rnd_attribute_copyback_begin -#define pcb_attribute_copyback rnd_attribute_copyback -#define pcb_attribute_copyback_end rnd_attribute_copyback_end -#define pcb_attrib_compat_set_intconn rnd_attrib_compat_set_intconn #define base64_write_right rnd_base64_write_right #define base64_parse_grow rnd_base64_parse_grow #define pcb_box_list_s rnd_box_list_s Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 32114) +++ trunk/src/netlist.c (revision 32115) @@ -56,7 +56,7 @@ void pcb_net_term_free_fields(pcb_net_term_t *term) { - rnd_attribute_free(&term->Attributes); + pcb_attribute_free(&term->Attributes); free(term->refdes); free(term->term); } @@ -421,7 +421,7 @@ void pcb_net_free_fields(pcb_net_t *net) { - rnd_attribute_free(&net->Attributes); + pcb_attribute_free(&net->Attributes); free(net->name); for(;;) { pcb_net_term_t *term = pcb_termlist_first(&net->conns); @@ -928,11 +928,11 @@ dst_net = pcb_net_alloc(pcb, dst, src_net->name, PCB_NETA_ALLOC); dst_net->export_tmp = src_net->export_tmp; dst_net->inhibit_rats = src_net->inhibit_rats; - rnd_attribute_copy_all(&dst_net->Attributes, &src_net->Attributes); + pcb_attribute_copy_all(&dst_net->Attributes, &src_net->Attributes); for(src_term = pcb_termlist_first(&src_net->conns); src_term != NULL; src_term = pcb_termlist_next(src_term)) { dst_term = pcb_net_term_alloc(dst_net, src_term->refdes, src_term->term); - rnd_attribute_copy_all(&dst_term->Attributes, &src_term->Attributes); + pcb_attribute_copy_all(&dst_term->Attributes, &src_term->Attributes); } } } Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 32114) +++ trunk/src/netlist_act.c (revision 32115) @@ -253,7 +253,7 @@ static void pcb_netlist_style(pcb_net_t *new_net, const char *style) { - rnd_attribute_put(&new_net->Attributes, "style", style); + pcb_attribute_put(&new_net->Attributes, "style", style); } static void pcb_netlist_ripup(pcb_net_t *new_net, pcb_net_term_t *term) Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 32114) +++ trunk/src/obj_arc.c (revision 32115) @@ -257,7 +257,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } @@ -293,7 +293,7 @@ { if ((arc->parent.layer != NULL) && (arc->parent.layer->arc_tree != NULL)) rnd_r_delete_entry(arc->parent.layer->arc_tree, (rnd_box_t *)arc); - rnd_attribute_free(&arc->Attributes); + pcb_attribute_free(&arc->Attributes); pcb_arc_unreg(arc); pcb_obj_common_free((pcb_any_obj_t *)arc); free(arc); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 32114) +++ trunk/src/obj_common.c (revision 32115) @@ -130,15 +130,15 @@ return ID++; } -static void pcb_attribute_copy_all_smart(rnd_attribute_list_t *dest, const rnd_attribute_list_t *src, pcb_any_obj_t *dstobj, pcb_any_obj_t *copy_from_any) +static void pcb_attribute_copy_all_smart(pcb_attribute_list_t *dest, const pcb_attribute_list_t *src, pcb_any_obj_t *dstobj, pcb_any_obj_t *copy_from_any) { int i; for (i = 0; i < src->Number; i++) - rnd_attribute_put(dest, src->List[i].name, src->List[i].value); + pcb_attribute_put(dest, src->List[i].name, src->List[i].value); } -void pcb_obj_add_attribs(pcb_any_obj_t *o, const rnd_attribute_list_t *src, pcb_any_obj_t *copy_from) +void pcb_obj_add_attribs(pcb_any_obj_t *o, const pcb_attribute_list_t *src, pcb_any_obj_t *copy_from) { if (src == NULL) return; @@ -145,7 +145,7 @@ if (copy_from) pcb_attribute_copy_all_smart(&o->Attributes, src, o, copy_from); else - rnd_attribute_copy_all(&o->Attributes, src); + pcb_attribute_copy_all(&o->Attributes, src); } void pcb_obj_center(const pcb_any_obj_t *obj, rnd_coord_t *x, rnd_coord_t *y) @@ -164,7 +164,7 @@ } } -void pcb_obj_attrib_post_change(rnd_attribute_list_t *list, const char *name, const char *value) +void pcb_obj_attrib_post_change(pcb_attribute_list_t *list, const char *name, const char *value) { pcb_any_obj_t *obj = (pcb_any_obj_t *)(((char *)list) - offsetof(pcb_any_obj_t, Attributes)); if (strcmp(name, "term") == 0) { Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 32114) +++ trunk/src/obj_common.h (revision 32115) @@ -205,7 +205,7 @@ is not NULL, it is the source object - be smart about extobj and other attribute side effects (some of those will not be copied or will be changed); src_obj should be the objec src attributes are coming from */ -void pcb_obj_add_attribs(pcb_any_obj_t *obj, const rnd_attribute_list_t *src, pcb_any_obj_t *src_obj); +void pcb_obj_add_attribs(pcb_any_obj_t *obj, const pcb_attribute_list_t *src, pcb_any_obj_t *src_obj); /* --------------------------------------------------------------------------- * Do not change the following definitions even if they're not very @@ -223,7 +223,7 @@ pcb_parenttype_t parent_type; \ pcb_parent_t parent; \ rnd_box_t bbox_naked; \ - rnd_attribute_list_t Attributes \ + pcb_attribute_list_t Attributes \ #define PCB_ANY_PRIMITIVE_FIELDS \ PCB_ANY_OBJ_FIELDS; \ @@ -264,7 +264,7 @@ unsigned char *pcb_obj_common_get_thermal(pcb_any_obj_t *obj, unsigned long lid, rnd_bool_t alloc); /* Update cached attributes (->term) */ -void pcb_obj_attrib_post_change(rnd_attribute_list_t *list, const char *name, const char *value); +void pcb_obj_attrib_post_change(pcb_attribute_list_t *list, const char *name, const char *value); /* Returns the first invalid character of an ID (terminal, refdes) or NULL */ const char *pcb_obj_id_invalid(const char *id); @@ -326,7 +326,7 @@ do { \ if (obj->noexport) { \ if (info->exporting) { \ - if (!obj->noexport_named || (rnd_attribute_get(&obj->Attributes, info->noexport_name) != NULL)) { \ + if (!obj->noexport_named || (pcb_attribute_get(&obj->Attributes, info->noexport_name) != NULL)) { \ inhibit; \ } \ } \ Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 32114) +++ trunk/src/obj_gfx.c (revision 32115) @@ -160,7 +160,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } @@ -207,7 +207,7 @@ { if ((gfx->parent.layer != NULL) && (gfx->parent.layer->gfx_tree != NULL)) rnd_r_delete_entry(gfx->parent.layer->gfx_tree, (rnd_box_t *)gfx); - rnd_attribute_free(&gfx->Attributes); + pcb_attribute_free(&gfx->Attributes); pcb_gfx_unreg(gfx); pcb_obj_common_free((pcb_any_obj_t *)gfx); free(gfx); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 32114) +++ trunk/src/obj_line.c (revision 32115) @@ -111,7 +111,7 @@ { if ((line->parent.layer != NULL) && (line->parent.layer->line_tree != NULL)) rnd_r_delete_entry(line->parent.layer->line_tree, (rnd_box_t *)line); - rnd_attribute_free(&line->Attributes); + pcb_attribute_free(&line->Attributes); pcb_line_unreg(line); pcb_obj_common_free((pcb_any_obj_t *)line); free(line); @@ -329,7 +329,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 32114) +++ trunk/src/obj_poly.c (revision 32115) @@ -111,7 +111,7 @@ { if ((poly->parent.layer != NULL) && (poly->parent.layer->polygon_tree != NULL)) rnd_r_delete_entry(poly->parent.layer->polygon_tree, (rnd_box_t *)poly); - rnd_attribute_free(&poly->Attributes); + pcb_attribute_free(&poly->Attributes); pcb_poly_unreg(poly); pcb_obj_common_free((pcb_any_obj_t *)poly); free(poly); @@ -506,7 +506,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 32114) +++ trunk/src/obj_pstk.c (revision 32115) @@ -107,7 +107,7 @@ { if ((ps->parent.data != NULL) && (ps->parent.data->padstack_tree != NULL)) rnd_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); - rnd_attribute_free(&ps->Attributes); + pcb_attribute_free(&ps->Attributes); pcb_pstk_unreg(ps); free(ps->thermals.shape); pcb_obj_common_free((pcb_any_obj_t *)ps); @@ -269,7 +269,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); dst->thermals.used = src->thermals.used; if (dst->thermals.used > 0) { dst->thermals.shape = malloc(dst->thermals.used * sizeof(dst->thermals.shape[0])); Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 32114) +++ trunk/src/obj_pstk_proto.c (revision 32115) @@ -452,7 +452,7 @@ continue; } if (src->term != NULL) - rnd_attribute_put(&no->Attributes, "term", src->term); + pcb_attribute_put(&no->Attributes, "term", src->term); } if (remove_src) { Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 32114) +++ trunk/src/obj_subc.c (revision 32115) @@ -90,7 +90,7 @@ /* update cached values: e.g. looking up refdes in attributes each time the netlist code needs it would be too expensive. Instead, we maintain a read-only ->refdes field and update it any time attributes change. */ -static void pcb_subc_attrib_post_change(rnd_attribute_list_t *list, const char *name, const char *value) +static void pcb_subc_attrib_post_change(pcb_attribute_list_t *list, const char *name, const char *value) { pcb_subc_t *sc = (pcb_subc_t *)(((char *)list) - offsetof(pcb_subc_t, Attributes)); if (strcmp(name, "refdes") == 0) { @@ -136,7 +136,7 @@ pcb_extobj_del_pre(sc); if ((sc->parent.data != NULL) && (sc->parent.data->subc_tree != NULL)) rnd_r_delete_entry(sc->parent.data->subc_tree, (rnd_box_t *)sc); - rnd_attribute_free(&sc->Attributes); + pcb_attribute_free(&sc->Attributes); if (sc->parent_type != PCB_PARENT_INVALID) pcb_subc_unreg(sc); pcb_data_free(sc->data); @@ -185,7 +185,7 @@ static pcb_line_t *add_aux_line(pcb_layer_t *aux, const char *key, const char *val, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_line_t *l = pcb_line_new(aux, x1, y1, x2, y2, RND_MM_TO_COORD(0.1), 0, pcb_no_flags()); - rnd_attribute_put(&l->Attributes, key, val); + pcb_attribute_put(&l->Attributes, key, val); return l; } @@ -194,7 +194,7 @@ pcb_line_t *line; gdl_iterator_t it; linelist_foreach(&aux->Line, &it, line) { - const char *val = rnd_attribute_get(&line->Attributes, "subc-role"); + const char *val = pcb_attribute_get(&line->Attributes, "subc-role"); if ((val != NULL) && (strcmp(val, key) == 0)) return line; } @@ -399,7 +399,7 @@ for(n = 0; n < 4; n++) pcb_poly_point_new(poly, x[n], y[n]); PCB_FLAG_SET(PCB_FLAG_CLEARPOLYPOLY, poly); - rnd_attribute_copy_all(&poly->Attributes, &line->Attributes); + pcb_attribute_copy_all(&poly->Attributes, &line->Attributes); pcb_poly_init_clip(dst->parent.data, dst, poly); pcb_add_poly_on_layer(dst, poly); @@ -453,7 +453,7 @@ static rnd_coord_t read_mask(pcb_any_obj_t *obj) { - const char *smask = rnd_attribute_get(&obj->Attributes, "elem_smash_pad_mask"); + const char *smask = pcb_attribute_get(&obj->Attributes, "elem_smash_pad_mask"); rnd_coord_t mask = 0; if (smask != NULL) { @@ -557,7 +557,7 @@ char *np, *sq, *termpad; const char *term; - termpad = rnd_attribute_get(&line->Attributes, "elem_smash_pad"); + termpad = pcb_attribute_get(&line->Attributes, "elem_smash_pad"); if (termpad != NULL) { if (ltype & PCB_LYT_TOP) top_pads++; @@ -565,9 +565,9 @@ bottom_pads++; mask = read_mask((pcb_any_obj_t *)line); } - term = rnd_attribute_get(&line->Attributes, "term"); - np = rnd_attribute_get(&line->Attributes, "elem_smash_nopaste"); - sq = rnd_attribute_get(&line->Attributes, "elem_smash_shape_square"); + term = pcb_attribute_get(&line->Attributes, "term"); + np = pcb_attribute_get(&line->Attributes, "elem_smash_nopaste"); + sq = pcb_attribute_get(&line->Attributes, "elem_smash_shape_square"); if ((sq != NULL) && (*sq == '1')) { /* convert to polygon */ poly = sqline2term(dst, line); if (termpad != NULL) { @@ -579,7 +579,7 @@ line->Thickness = mask; poly = sqline2term(dst, line); if (term != NULL) - rnd_attribute_put(&poly->Attributes, "term", term); + pcb_attribute_put(&poly->Attributes, "term", term); vtp0_append(&mask_pads, poly); } } @@ -600,7 +600,7 @@ nl = pcb_line_dup(dst, line); nl->Thickness = mask; if (term != NULL) - rnd_attribute_put(&nl->Attributes, "term", term); + pcb_attribute_put(&nl->Attributes, "term", term); vtp0_append(&mask_pads, nl); } } @@ -676,7 +676,7 @@ /* Add refdes */ if ((conf_core.editor.subc_conv_refdes != NULL) && (*conf_core.editor.subc_conv_refdes != '\0')) { if (strcmp(conf_core.editor.subc_conv_refdes, "") != 0) - rnd_attribute_put(&sc->Attributes, "refdes", conf_core.editor.subc_conv_refdes); + pcb_attribute_put(&sc->Attributes, "refdes", conf_core.editor.subc_conv_refdes); if (!has_refdes_text) { if (dst_top_silk == NULL) dst_top_silk = pcb_layer_new_bound(sc->data, PCB_LYT_TOP | PCB_LYT_SILK, "top-silk", NULL); @@ -863,7 +863,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } @@ -1807,10 +1807,10 @@ { void *old; if (sc->refdes != NULL) - old = rnd_strdup(sc->refdes); /* strdup because the rnd_attribute_put() is going to free the original */ + old = rnd_strdup(sc->refdes); /* strdup because the pcb_attribute_put() is going to free the original */ else old = NULL; - rnd_attribute_put(&sc->Attributes, "refdes", ctx->chgname.new_name); + pcb_attribute_put(&sc->Attributes, "refdes", ctx->chgname.new_name); return old; } @@ -2310,14 +2310,14 @@ const char *val; if (local_name != NULL) { - val = rnd_attribute_get(&subc->Attributes, local_name); + val = pcb_attribute_get(&subc->Attributes, local_name); if (val != NULL) return val; } - val = rnd_attribute_get(&subc->Attributes, "visible_footprint"); + val = pcb_attribute_get(&subc->Attributes, "visible_footprint"); if (val != NULL) return val; - val = rnd_attribute_get(&subc->Attributes, "footprint"); + val = pcb_attribute_get(&subc->Attributes, "footprint"); return val; } @@ -2361,10 +2361,10 @@ { /* copy attributes */ int n; - rnd_attribute_list_t *adst = &placed->Attributes, *asrc = &dst->Attributes; + pcb_attribute_list_t *adst = &placed->Attributes, *asrc = &dst->Attributes; for (n = 0; n < asrc->Number; n++) if (strcmp(asrc->List[n].name, "footprint") != 0) - rnd_attribute_put(adst, asrc->List[n].name, asrc->List[n].value); + pcb_attribute_put(adst, asrc->List[n].name, asrc->List[n].value); } flags = dst->Flags.f & fmask; Index: trunk/src/obj_term.c =================================================================== --- trunk/src/obj_term.c (revision 32114) +++ trunk/src/obj_term.c (revision 32115) @@ -175,7 +175,7 @@ /* remove from previous terminal */ if (r->obj->term != NULL) { old_term = rnd_strdup(r->obj->term); - rnd_attribute_remove(&r->obj->Attributes, "term"); + pcb_attribute_remove(&r->obj->Attributes, "term"); pcb_obj_invalidate_label(r->obj->type, r->obj->parent.any, r->obj, r->obj); r->obj->term = NULL; } @@ -201,9 +201,9 @@ /* Update the attributes */ if (r->obj->term != NULL) - rnd_attribute_put(&r->obj->Attributes, "term", r->obj->term); + pcb_attribute_put(&r->obj->Attributes, "term", r->obj->term); else - rnd_attribute_remove(&r->obj->Attributes, "term"); + pcb_attribute_remove(&r->obj->Attributes, "term"); if (r->obj->type == PCB_OBJ_POLY) pcb_poly_init_clip(r->obj->parent.layer->parent.data, r->obj->parent.layer, (pcb_poly_t *)r->obj); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 32114) +++ trunk/src/obj_text.c (revision 32115) @@ -106,7 +106,7 @@ { if ((text->parent.layer != NULL) && (text->parent.layer->text_tree != NULL)) rnd_r_delete_entry(text->parent.layer->text_tree, (rnd_box_t *)text); - rnd_attribute_free(&text->Attributes); + pcb_attribute_free(&text->Attributes); pcb_text_unreg(text); free(text->TextString); pcb_obj_common_free((pcb_any_obj_t *)text); @@ -183,7 +183,7 @@ if (mirror & PCB_TXT_MIRROR_Y) Flags.f |= PCB_FLAG_ONSOLDER; if (mirror & PCB_TXT_MIRROR_X) - rnd_attribute_put(&text->Attributes, "mirror_x", "1"); + pcb_attribute_put(&text->Attributes, "mirror_x", "1"); /* copy values, width and height are set by drawing routine * because at this point we don't know which symbols are available @@ -284,7 +284,7 @@ { if (dst == NULL) return NULL; - rnd_attribute_copy_all(&dst->Attributes, &src->Attributes); + pcb_attribute_copy_all(&dst->Attributes, &src->Attributes); return dst; } @@ -330,7 +330,7 @@ *input += len+1; if ((key[0] == 'a') && (key[1] == '.')) { - const rnd_attribute_list_t *attr = &text->Attributes; + const pcb_attribute_list_t *attr = &text->Attributes; path = key+2; if ((path[0] == 'p') && (memcmp(path, "parent.", 7) == 0)) { pcb_data_t *par = text->parent.layer->parent.data; @@ -346,7 +346,7 @@ path+=7; } if (attr != NULL) { - attrs = rnd_attribute_get(attr, path); + attrs = pcb_attribute_get(attr, path); if (attrs != NULL) gds_append_str(s, attrs); } Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 32114) +++ trunk/src/object_act.c (revision 32115) @@ -305,7 +305,7 @@ static int parse_layout_attribute_units(pcb_board_t *pcb, const char *name, int def) { - const char *as = rnd_attrib_get(pcb, name); + const char *as = pcb_attrib_get(pcb, name); if (!as) return def; return rnd_get_value(as, NULL, NULL, NULL); @@ -313,7 +313,7 @@ static int subc_differs(pcb_subc_t *sc, const char *expect_name) { - const char *got_name = rnd_attribute_get(&sc->Attributes, "footprint"); + const char *got_name = pcb_attribute_get(&sc->Attributes, "footprint"); if ((expect_name != NULL) && (*expect_name == '\0')) expect_name = NULL; if ((got_name != NULL) && (*got_name == '\0')) @@ -649,8 +649,8 @@ /* Now reload footprint */ sc = pcb_subc_by_refdes(pcb->Data, refdes); if (sc != NULL) { -/* rnd_attribute_put(&sc->Attributes, "refdes", refdes);*/ - rnd_attribute_put(&sc->Attributes, "value", value); +/* pcb_attribute_put(&sc->Attributes, "refdes", refdes);*/ + pcb_attribute_put(&sc->Attributes, "value", value); PCB_FLAG_SET(PCB_FLAG_FOUND, sc); } @@ -687,9 +687,9 @@ } if (value != NULL) - rnd_attribute_put(&sc->Attributes, name, value); + pcb_attribute_put(&sc->Attributes, name, value); else - rnd_attribute_remove(&sc->Attributes, name); + pcb_attribute_remove(&sc->Attributes, name); RND_ACT_IRES(0); return 0; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 32114) +++ trunk/src/plug_io.c (revision 32115) @@ -595,7 +595,7 @@ /* just in case a bad file saved file is loaded */ /* geda/pcb compatibility: use attribute PCB::grid::unit as unit, if present */ - unit_suffix = rnd_attrib_get(PCB, "PCB::grid::unit"); + unit_suffix = pcb_attrib_get(PCB, "PCB::grid::unit"); if (unit_suffix && *unit_suffix) { lht_node_t *nat = rnd_conf_lht_get_at(RND_CFR_DESIGN, "editor/grid_unit", 0); if (nat == NULL) { Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 32114) +++ trunk/src/rats_patch.c (revision 32115) @@ -296,9 +296,9 @@ if (net == NULL) return 1; if ((patch->arg2.attrib_val == NULL) || (*patch->arg2.attrib_val == '\0')) - rnd_attribute_remove(&net->Attributes, patch->arg1.attrib_name); + pcb_attribute_remove(&net->Attributes, patch->arg1.attrib_name); else - rnd_attribute_put(&net->Attributes, patch->arg1.attrib_name, patch->arg2.attrib_val); + pcb_attribute_put(&net->Attributes, patch->arg1.attrib_name, patch->arg2.attrib_val); return 0; } Index: trunk/src/vtroutestyle.h =================================================================== --- trunk/src/vtroutestyle.h (revision 32114) +++ trunk/src/vtroutestyle.h (revision 32115) @@ -17,7 +17,7 @@ int via_proto_set; /* 1 if via_proto is set/valid, 0 for old file formats */ rnd_coord_t Diameter, Hole; /* OBSOLETE: via diameter and drill hole; kept for compatibility with old file formats (lihata board v1..v4) */ char name[32]; /* fixed length name to save malloc/free */ - rnd_attribute_list_t attr; + pcb_attribute_list_t attr; } pcb_route_style_t; /* all public symbols are wrapped in GVT() - see vt_t(7) */ Index: trunk/src_plugins/asm/asm.c =================================================================== --- trunk/src_plugins/asm/asm.c (revision 32114) +++ trunk/src_plugins/asm/asm.c (revision 32115) @@ -146,7 +146,7 @@ gds_append(&s, ','); switch(t->type) { case TT_ATTR: - tmp = rnd_attribute_get(&subc->Attributes, t->key); + tmp = pcb_attribute_get(&subc->Attributes, t->key); if (tmp != NULL) gds_append_str(&s, tmp); break; @@ -563,9 +563,9 @@ if (type == PCB_OBJ_SUBC) { int m; row[1] = (char *)sc->refdes; - row[2] = rnd_attribute_get(&sc->Attributes, "footprint"); - row[3] = rnd_attribute_get(&sc->Attributes, "value"); - row[4] = rnd_attribute_get(&sc->Attributes, "asm::comment"); + row[2] = pcb_attribute_get(&sc->Attributes, "footprint"); + row[3] = pcb_attribute_get(&sc->Attributes, "value"); + row[4] = pcb_attribute_get(&sc->Attributes, "asm::comment"); row[5] = ""; for(m = 1; m < 6; m++) if (row[m] == NULL) Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 32114) +++ trunk/src_plugins/autoroute/autoroute.c (revision 32115) @@ -1068,7 +1068,7 @@ size_t sni; routebox_t *last_in_net = NULL; pcb_net_t *net = e->value; - const char *style = rnd_attribute_get(&net->Attributes, "style"); + const char *style = pcb_attribute_get(&net->Attributes, "style"); int j; if (style == NULL) Index: trunk/src_plugins/diag/integrity.c =================================================================== --- trunk/src_plugins/diag/integrity.c (revision 32114) +++ trunk/src_plugins/diag/integrity.c (revision 32115) @@ -73,8 +73,8 @@ static void chk_term(const char *whose, pcb_any_obj_t *obj) { - const char *aterm = rnd_attribute_get(&obj->Attributes, "term"); - const char *s_intconn = rnd_attribute_get(&obj->Attributes, "intconn"); + const char *aterm = pcb_attribute_get(&obj->Attributes, "term"); + const char *s_intconn = pcb_attribute_get(&obj->Attributes, "intconn"); if (pcb_obj_id_invalid(aterm)) rnd_message(RND_MSG_ERROR, CHK "%s %ld has term attribute '%s' with invalid characters\n", whose, obj->ID, aterm); @@ -108,7 +108,7 @@ static void chk_subc_cache(pcb_subc_t *subc) { - const char *arefdes = rnd_attribute_get(&subc->Attributes, "refdes"); + const char *arefdes = pcb_attribute_get(&subc->Attributes, "refdes"); if (pcb_obj_id_invalid(arefdes)) rnd_message(RND_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' with invalid characters\n", subc->ID, arefdes); Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 32114) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 32115) @@ -89,7 +89,7 @@ if ((obj->term != NULL) && (pcb_obj_parent_subc(obj) == ctx->tempsc) && (obj->term != NULL)) { val.str = obj->term; rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_num, &val); - val.str = rnd_attribute_get(&obj->Attributes, "name"); + val.str = pcb_attribute_get(&obj->Attributes, "name"); if (val.str != NULL) rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_name, &val); if (ctx->pcb != NULL) { Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 32114) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 32115) @@ -503,7 +503,7 @@ rnd_render->set_color(gc, color); dhrect(0, y, GROUP_WIDTH_MM, y+th, 1, 0.5, stepf, stepb, OMIT_LEFT | OMIT_RIGHT); dtext_bg(gc, 5, y, 200, 0, g->name, &COLOR_BG, &COLOR_ANNOT); - thick = rnd_attribute_get(&g->Attributes, "thickness"); + thick = pcb_attribute_get(&g->Attributes, "thickness"); if (thick != NULL) dtext_bg(gc, 45, y, 200, 0, thick, &COLOR_BG, &COLOR_ANNOT); reg_group_coords(gid, RND_MM_TO_COORD(y), RND_MM_TO_COORD(y+th)); Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 32114) +++ trunk/src_plugins/export_bom/bom.c (revision 32115) @@ -193,7 +193,7 @@ /* insert this component into the bill of materials list */ bom = bom_insert((char *) RND_UNKNOWN(subc->refdes), (char *) RND_UNKNOWN(pcb_subc_name(subc, "bom::footprint")), - (char *) RND_UNKNOWN(rnd_attribute_get(&subc->Attributes, "value")), + (char *) RND_UNKNOWN(pcb_attribute_get(&subc->Attributes, "value")), bom); } PCB_END_LOOP; Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 32114) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 32115) @@ -312,7 +312,7 @@ PCB_END_LOOP; PCB_SUBC_LOOP(PCB->Data) { - const char *fp = rnd_attribute_get(&subc->Attributes, "footprint"); + const char *fp = pcb_attribute_get(&subc->Attributes, "footprint"); if ((fp != NULL) && have_lib && (htsi_get(&lib_names, fp))) { rnd_coord_t x, y; double rot = 0.0; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 32114) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 32115) @@ -71,7 +71,7 @@ static int getattr(pcb_any_obj_t *o, const char *key) { - char *val = rnd_attribute_get(&o->Attributes, key); + char *val = pcb_attribute_get(&o->Attributes, key); if (val == NULL) return 0; if (rnd_strcasecmp(val, "yes") == 0) return 1; return 0; Index: trunk/src_plugins/export_oldconn/oldconn.c =================================================================== --- trunk/src_plugins/export_oldconn/oldconn.c (revision 32114) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 32115) @@ -64,11 +64,11 @@ static void print_subc_name(FILE *f, pcb_subc_t *subc) { fputc('(', f); - pcb_print_quoted_string(f, (char *)RND_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint"))); + pcb_print_quoted_string(f, (char *)RND_EMPTY(pcb_attribute_get(&subc->Attributes, "footprint"))); fputc(' ', f); pcb_print_quoted_string(f, (char *)RND_EMPTY(subc->refdes)); fputc(' ', f); - pcb_print_quoted_string(f, (char *)RND_EMPTY(rnd_attribute_get(&subc->Attributes, "value"))); + pcb_print_quoted_string(f, (char *)RND_EMPTY(pcb_attribute_get(&subc->Attributes, "value"))); fputs(")\n", f); } Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 32114) +++ trunk/src_plugins/export_openems/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: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 32114) +++ trunk/src_plugins/export_openems/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: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 32114) +++ trunk/src_plugins/export_openems/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; Index: trunk/src_plugins/export_openscad/scad_models.c =================================================================== --- trunk/src_plugins/export_openscad/scad_models.c (revision 32114) +++ trunk/src_plugins/export_openscad/scad_models.c (revision 32115) @@ -109,7 +109,7 @@ htsp_init(&models, strhash, strkeyeq); PCB_SUBC_LOOP(PCB->Data); { - mod = rnd_attribute_get(&subc->Attributes, "openscad"); + mod = pcb_attribute_get(&subc->Attributes, "openscad"); if (mod != NULL) { rnd_coord_t ox, oy; double rot = 0; @@ -122,8 +122,8 @@ pcb_subc_get_rotation(subc, &rot); pcb_subc_get_side(subc, &on_bottom); - transf = rnd_attribute_get(&subc->Attributes, "openscad-transformation"); - param = rnd_attribute_get(&subc->Attributes, "openscad-param"); + transf = pcb_attribute_get(&subc->Attributes, "openscad-transformation"); + param = pcb_attribute_get(&subc->Attributes, "openscad-param"); scad_insert_model(&models, mod, TRX_(ox), TRY_(oy), rot, on_bottom, transf, param); } } PCB_END_LOOP; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 32114) +++ trunk/src_plugins/export_xy/xy.c (revision 32115) @@ -194,9 +194,9 @@ for(obj = pcb_data_first(&it, PCB->Data, PCB_OBJ_CLASS_REAL); obj != NULL; obj = pcb_data_next(&it)) { int score; - if (rnd_attribute_get(&obj->Attributes, ctx->origin_tmp) != NULL) + if (pcb_attribute_get(&obj->Attributes, ctx->origin_tmp) != NULL) score = 2; /* first look for the format-specific attribute */ - else if (rnd_attribute_get(&obj->Attributes, "pnp-origin") != NULL) + else if (pcb_attribute_get(&obj->Attributes, "pnp-origin") != NULL) score = 1; /* then for the generic pnp-specific attribute */ else continue; @@ -430,7 +430,7 @@ else /* only '?' is given, no ':' */ nope = "n/a"; - val = rnd_attribute_get(&ctx->subc->Attributes, aname); + val = pcb_attribute_get(&ctx->subc->Attributes, aname); if (is_val_true(val)) gds_append_str(s, unk_buf); else @@ -442,7 +442,7 @@ *input = end; (*input)++; - val = rnd_attribute_get(&ctx->subc->Attributes, aname); + val = pcb_attribute_get(&ctx->subc->Attributes, aname); if (val == NULL) val = unk; gds_append_str(s, val); @@ -693,9 +693,9 @@ ctx.pad_w = ctx.pad_h = 0; ctx.theta = ctx.xray_theta = 0.0; - ctx.name = pcb_bom_clean_str((char *) RND_UNKNOWN(rnd_attribute_get(&subc->Attributes, "refdes"))); + ctx.name = pcb_bom_clean_str((char *) RND_UNKNOWN(pcb_attribute_get(&subc->Attributes, "refdes"))); ctx.descr = pcb_bom_clean_str((char *) RND_UNKNOWN(pcb_subc_name(subc, "export_xy::footprint"))); - ctx.value = pcb_bom_clean_str((char *) RND_UNKNOWN(rnd_attribute_get(&subc->Attributes, "value"))); + ctx.value = pcb_bom_clean_str((char *) RND_UNKNOWN(pcb_attribute_get(&subc->Attributes, "value"))); /* prefer the pnp-origin but if that doesn't exist, pick the subc origin */ if (!pcb_subc_find_aux_point(subc, "pnp-origin", &ctx.x, &ctx.y)) Index: trunk/src_plugins/exto_std/bus.c =================================================================== --- trunk/src_plugins/exto_std/bus.c (revision 32114) +++ trunk/src_plugins/exto_std/bus.c (revision 32115) @@ -321,13 +321,13 @@ subc = pcb_exto_create(dst, "bus", layers, l->Point1.X, l->Point1.Y, 0, copy_from); if (copy_from == NULL) { char tmp[32]; - rnd_attribute_put(&subc->Attributes, "extobj::width", "2"); + pcb_attribute_put(&subc->Attributes, "extobj::width", "2"); rnd_sprintf(tmp, "%$$mH", conf_core.design.line_thickness + conf_core.design.clearance/2); - rnd_attribute_put(&subc->Attributes, "extobj::pitch", tmp); + pcb_attribute_put(&subc->Attributes, "extobj::pitch", tmp); rnd_sprintf(tmp, "%$$mH", conf_core.design.line_thickness); - rnd_attribute_put(&subc->Attributes, "extobj::thickness", tmp); + pcb_attribute_put(&subc->Attributes, "extobj::thickness", tmp); rnd_sprintf(tmp, "%$$mH", conf_core.design.clearance); - rnd_attribute_put(&subc->Attributes, "extobj::clearance", tmp); + pcb_attribute_put(&subc->Attributes, "extobj::clearance", tmp); } if (layers[1].lyt & PCB_LYT_INTERN) { @@ -343,7 +343,7 @@ l = pcb_line_dup(ly, objs->array[n]); PCB_FLAG_SET(PCB_FLAG_FLOATER, l); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, l); - rnd_attribute_put(&l->Attributes, "extobj::role", "edit"); + pcb_attribute_put(&l->Attributes, "extobj::role", "edit"); rnd_trace(" subc=%p l=%p\n", subc, ly); } Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 32114) +++ trunk/src_plugins/exto_std/cord.c (revision 32115) @@ -41,7 +41,7 @@ static const char *group_of(pcb_any_obj_t *floater) { - const char *grp = rnd_attribute_get(&floater->Attributes, "cord::group"); + const char *grp = pcb_attribute_get(&floater->Attributes, "cord::group"); if ((grp == NULL) || (*grp == '\0')) return NULL; return grp; } @@ -48,7 +48,7 @@ static void set_grp(pcb_any_obj_t *obj, const char *grp) { - rnd_attribute_put(&obj->Attributes, "cord::group", grp); + pcb_attribute_put(&obj->Attributes, "cord::group", grp); } static void cord_clear_ly(pcb_subc_t *subc, pcb_layer_t *ly, const char *group) @@ -85,7 +85,7 @@ *ctrl1 = *ctrl2 = NULL; for(p = padstacklist_first(&subc->data->padstack); p != NULL; p = padstacklist_next(p)) { - const char *lg = group_of((pcb_any_obj_t *)p), *idxs = rnd_attribute_get(&p->Attributes, "extobj::idx"); + const char *lg = group_of((pcb_any_obj_t *)p), *idxs = pcb_attribute_get(&p->Attributes, "extobj::idx"); if ((lg == NULL) || (strcmp(lg, group) != 0) || (idxs == NULL)) continue; if (idxs[0] == '0') *end1 = p; else if (idxs[0] == '1') *end2 = p; @@ -92,7 +92,7 @@ } for(a = arclist_first(&ely->Arc); a != NULL; a = arclist_next(a)) { - const char *lg = group_of((pcb_any_obj_t *)a), *idxs = rnd_attribute_get(&a->Attributes, "extobj::idx"); + const char *lg = group_of((pcb_any_obj_t *)a), *idxs = pcb_attribute_get(&a->Attributes, "extobj::idx"); if ((lg == NULL) || (strcmp(lg, group) != 0) || (idxs == NULL)) continue; if (idxs[0] == '0') *ctrl1 = a; else if (idxs[0] == '1') *ctrl2 = a; @@ -120,7 +120,7 @@ if (a1 != NULL) { l = pcb_line_new(elyr, e1->x, e1->y, a1->X, a1->Y, 1, 0, pcb_flag_make(0)); - rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); + pcb_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); } @@ -127,7 +127,7 @@ if (a2 != NULL) { l = pcb_line_new(elyr, e2->x, e2->y, a2->X, a2->Y, 1, 0, pcb_flag_make(0)); - rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); + pcb_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); } @@ -152,7 +152,7 @@ l = pcb_line_new(lyr, lx, ly, x, y, RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); - rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); + pcb_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); lx = x; ly = y; @@ -162,7 +162,7 @@ else { l = pcb_line_new(lyr, e1->x, e1->y, e2->x, e2->y, RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); - rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); + pcb_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); } @@ -207,7 +207,7 @@ cord_gen(subc, grp); - if ((floater->type == PCB_OBJ_LINE) && (rnd_attribute_get(&subc->Attributes, "extobj::fixed_origin") == NULL)) { + if ((floater->type == PCB_OBJ_LINE) && (pcb_attribute_get(&subc->Attributes, "extobj::fixed_origin") == NULL)) { pcb_pstk_t *ps = (pcb_pstk_t *)floater; pcb_subc_move_origin_to(subc, ps->x + RND_MM_TO_COORD(0.3), ps->y + RND_MM_TO_COORD(0.3), 0); } @@ -282,11 +282,11 @@ ps = pcb_pstk_new(subc->data, -1, pid, x, y, 0, pcb_flag_make(0)); set_grp((pcb_any_obj_t *)ps, grp); - rnd_attribute_put(&ps->Attributes, "extobj::role", "endpt"); - rnd_attribute_put(&ps->Attributes, "extobj::idx", ptidx); - rnd_attribute_put(&ps->Attributes, "intconn", grp); + pcb_attribute_put(&ps->Attributes, "extobj::role", "endpt"); + pcb_attribute_put(&ps->Attributes, "extobj::idx", ptidx); + pcb_attribute_put(&ps->Attributes, "intconn", grp); if (term != NULL) - rnd_attribute_put(&ps->Attributes, "term", term); + pcb_attribute_put(&ps->Attributes, "term", term); #ifdef BEZIER @@ -294,8 +294,8 @@ pcb_arc_t *a; a = pcb_arc_new(ely, cpx, cpy, 0, 0, 0, 360, cpr, cpr*2, pcb_flag_make(0), 0); set_grp((pcb_any_obj_t *)a, grp); - rnd_attribute_put(&a->Attributes, "extobj::role", "control"); - rnd_attribute_put(&a->Attributes, "extobj::idx", ptidx); + pcb_attribute_put(&a->Attributes, "extobj::role", "control"); + pcb_attribute_put(&a->Attributes, "extobj::idx", ptidx); PCB_FLAG_SET(PCB_FLAG_FLOATER, a); } #endif @@ -417,7 +417,7 @@ pcb_subc_t *s = objs->array[n]; if (s->type != PCB_OBJ_SUBC) continue; - rnd_attribute_copy_all(&subc->Attributes, &s->Attributes); + pcb_attribute_copy_all(&subc->Attributes, &s->Attributes); for(lid = 0; lid < s->data->LayerN; lid++) { gdl_iterator_t it; @@ -467,7 +467,7 @@ if (has_subc) { - rnd_attribute_put(&subc->Attributes, "extobj::fixed_origin", "(yes)"); + pcb_attribute_put(&subc->Attributes, "extobj::fixed_origin", "(yes)"); pcb_subc_unreg(subc); pcb_subc_bbox(subc); Index: trunk/src_plugins/exto_std/dimension.c =================================================================== --- trunk/src_plugins/exto_std/dimension.c (revision 32114) +++ trunk/src_plugins/exto_std/dimension.c (revision 32115) @@ -102,7 +102,7 @@ dim = obj->extobj_data; pcb_extobj_unpack_coord(obj, &dim->displace, "extobj::displace"); - dim->fmt = rnd_attribute_get(&obj->Attributes, "extobj::format"); + dim->fmt = pcb_attribute_get(&obj->Attributes, "extobj::format"); if (dim->fmt == NULL) dim->fmt = "%.03$mm"; @@ -191,7 +191,7 @@ x1 + arrx * dim->dx, y1 + arrx * dim->dy, x2 - arrx * dim->dx, y2 - arrx * dim->dy, RND_MM_TO_COORD(0.25), 0, pcb_flag_make(PCB_FLAG_FLOATER)); - rnd_attribute_put(&flt->Attributes, "extobj::role", "dimline"); + pcb_attribute_put(&flt->Attributes, "extobj::role", "dimline"); } else { /* modify the floater if it exists */ if (ly->line_tree != NULL) @@ -298,7 +298,7 @@ dimension_clear(subc); dim->displace = d; rnd_snprintf(tmp, sizeof(tmp), "%.08$mH", (rnd_coord_t)d); - rnd_attribute_put(&subc->Attributes, "extobj::displace", tmp); + pcb_attribute_put(&subc->Attributes, "extobj::displace", tmp); dimension_gen(subc); } @@ -376,7 +376,7 @@ subc = pcb_exto_create(dst, "dimension", layers, l->Point1.X, l->Point1.Y, 0, copy_from); if (copy_from == NULL) - rnd_attribute_put(&subc->Attributes, "extobj::displace", "4mm"); + pcb_attribute_put(&subc->Attributes, "extobj::displace", "4mm"); /* create edit-objects */ ly = &subc->data->Layer[LID_EDIT]; @@ -383,7 +383,7 @@ l = pcb_line_dup(ly, objs->array[0]); PCB_FLAG_SET(PCB_FLAG_FLOATER, l); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, l); - rnd_attribute_put(&l->Attributes, "extobj::role", "edit"); + pcb_attribute_put(&l->Attributes, "extobj::role", "edit"); dimension_unpack(subc); dimension_gen(subc); Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 32114) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 32115) @@ -267,7 +267,7 @@ subc = pcb_exto_create(dst, "line-of-vias", layers, l->Point1.X, l->Point1.Y, 0, copy_from); if (copy_from == NULL) - rnd_attribute_put(&subc->Attributes, "extobj::pitch", "4mm"); + pcb_attribute_put(&subc->Attributes, "extobj::pitch", "4mm"); /* create edit-objects */ ly = &subc->data->Layer[LID_EDIT]; @@ -275,7 +275,7 @@ l = pcb_line_dup(ly, objs->array[n]); PCB_FLAG_SET(PCB_FLAG_FLOATER, l); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, l); - rnd_attribute_put(&l->Attributes, "extobj::role", "edit"); + pcb_attribute_put(&l->Attributes, "extobj::role", "edit"); } /* create the padstack prototype */ Index: trunk/src_plugins/fp_board/fp_board.c =================================================================== --- trunk/src_plugins/fp_board/fp_board.c (revision 32114) +++ trunk/src_plugins/fp_board/fp_board.c (revision 32115) @@ -55,7 +55,7 @@ id++; pcb_subclist_dedup_skip(dedup, subc); - ename = rnd_attribute_get(&subc->Attributes, "footprint"); + ename = pcb_attribute_get(&subc->Attributes, "footprint"); if (ename == NULL) ename = subc->refdes; if (ename == NULL) Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 32114) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 32115) @@ -48,11 +48,11 @@ static const char *ipcd356_cookie = "ipcd356 importer"; -static void set_src(rnd_attribute_list_t *a, const char *fn, long lineno) +static void set_src(pcb_attribute_list_t *a, const char *fn, long lineno) { char src[8192]; rnd_snprintf(src, sizeof(src), "ipcd356::%s:%ld", fn, lineno); - rnd_attribute_put(a, "source", src); + pcb_attribute_put(a, "source", src); } static int netname_valid(const char *netname) @@ -277,11 +277,11 @@ ps = pcb_pstk_new_from_shape(data, tf->cx, y, tf->hole, tf->is_plated, conf_core.design.bloat, sh); if (tf->is_middle) - rnd_attribute_put(&ps->Attributes, "ipcd356::mid", "yes"); + pcb_attribute_put(&ps->Attributes, "ipcd356::mid", "yes"); if (tf->is_tooling) - rnd_attribute_put(&ps->Attributes, "ipcd356::tooling", "yes"); + pcb_attribute_put(&ps->Attributes, "ipcd356::tooling", "yes"); if (term) - rnd_attribute_put(&ps->Attributes, "term", term); + pcb_attribute_put(&ps->Attributes, "term", term); } static int ipc356_parse(pcb_board_t *pcb, FILE *f, const char *fn, htsp_t *subcs, int want_net, int want_pads) @@ -323,9 +323,9 @@ if (sc == NULL) { const char *nr; sc = pcb_subc_alloc(); - rnd_attribute_put(&sc->Attributes, "refdes", refdes); + pcb_attribute_put(&sc->Attributes, "refdes", refdes); set_src(&sc->Attributes, fn, lineno); - nr = rnd_attribute_get(&sc->Attributes, "refdes"); + nr = pcb_attribute_get(&sc->Attributes, "refdes"); htsp_set(subcs, (char *)nr, sc); pcb_subc_reg(pcb->Data, sc); pcb_subc_bind_globals(pcb, sc); Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 32114) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 32115) @@ -134,7 +134,7 @@ else { if (kind == 1 && strchr(temp, '-') == NULL) { kind++; - rnd_attribute_put(&net->Attributes, "style", temp); + pcb_attribute_put(&net->Attributes, "style", temp); } else { pcb_net_term_get_by_pinname(net, temp, PCB_NETA_ALLOC); Index: trunk/src_plugins/import_sch2/import_sch.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch.c (revision 32114) +++ trunk/src_plugins/import_sch2/import_sch.c (revision 32115) @@ -50,8 +50,8 @@ static int convert_attribs(void) { - const char *mode = rnd_attrib_get(PCB, "import::mode"); - const char *src0 = rnd_attrib_get(PCB, "import::src0"); + const char *mode = pcb_attrib_get(PCB, "import::mode"); + const char *src0 = pcb_attrib_get(PCB, "import::src0"); char tmp[32]; int n, idx; @@ -62,7 +62,7 @@ const char *src; sprintf(tmp, "import::src%d", n); - src = rnd_attrib_get(PCB, tmp); + src = pcb_attrib_get(PCB, tmp); if (src != NULL) { rnd_conf_grow("plugins/import_sch/args", idx+1); rnd_conf_set(RND_CFR_DESIGN, "plugins/import_sch/args", idx, src, RND_POL_OVERWRITE); @@ -78,9 +78,9 @@ if (strcmp(mode, "cmd") == 0) { - const char *outfile = rnd_attrib_get(PCB, "import::outfile"); - const char *makefile = rnd_attrib_get(PCB, "import::makefile"); - const char *target = rnd_attrib_get(PCB, "import::target"); + const char *outfile = pcb_attrib_get(PCB, "import::outfile"); + const char *makefile = pcb_attrib_get(PCB, "import::makefile"); + const char *target = pcb_attrib_get(PCB, "import::target"); gds_t cmdline; if (outfile == NULL) outfile = "-"; Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 32114) +++ trunk/src_plugins/io_autotrax/read.c (revision 32115) @@ -1016,7 +1016,7 @@ new_module = pcb_subc_alloc(); pcb_subc_create_aux(new_module, module_X, module_Y, 0.0, 0); - rnd_attribute_put(&new_module->Attributes, "refdes", "A1"); + pcb_attribute_put(&new_module->Attributes, "refdes", "A1"); pcb_subc_reg(st->pcb->Data, new_module); pcb_subc_bind_globals(st->pcb, new_module); Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 32114) +++ trunk/src_plugins/io_autotrax/write.c (revision 32115) @@ -527,8 +527,8 @@ silk_layer = 7; fprintf(ctx->f, "COMP\r\n%s\r\n", or_empty(subc->refdes)); - fprintf(ctx->f, "%s\r\n", or_empty(rnd_attribute_get(&subc->Attributes, "footprint"))); - fprintf(ctx->f, "%s\r\n", or_empty(rnd_attribute_get(&subc->Attributes, "value"))); + fprintf(ctx->f, "%s\r\n", or_empty(pcb_attribute_get(&subc->Attributes, "footprint"))); + fprintf(ctx->f, "%s\r\n", or_empty(pcb_attribute_get(&subc->Attributes, "value"))); rnd_fprintf(ctx->f, "%.0ml %.0ml 100 0 10 %d\r\n", xPos, yPos, silk_layer); /* designator */ rnd_fprintf(ctx->f, "%.0ml %.0ml 100 0 10 %d\r\n", xPos, yPos2, silk_layer); /* pattern */ rnd_fprintf(ctx->f, "%.0ml %.0ml 100 0 10 %d\r\n", xPos, yPos3, silk_layer); /* comment field */ Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 32114) +++ trunk/src_plugins/io_bxl/read.c (revision 32115) @@ -196,7 +196,7 @@ tmp = rnd_strdup(keyval); tmp[sep-keyval] = '\0'; val = tmp+(sep-keyval)+1; - rnd_attribute_put(&obj->Attributes, tmp, val); + pcb_attribute_put(&obj->Attributes, tmp, val); free(tmp); } @@ -361,12 +361,12 @@ if (ps != NULL) { if (ctx->state.pin_name != NULL) - rnd_attribute_put(&ps->Attributes, "name", ctx->state.pin_name); + pcb_attribute_put(&ps->Attributes, "name", ctx->state.pin_name); if (ctx->state.pin_number >= 0) { char tmp[32]; sprintf(tmp, "%d", ctx->state.pin_number); - rnd_attribute_put(&ps->Attributes, "term", tmp); + pcb_attribute_put(&ps->Attributes, "term", tmp); } } else @@ -442,7 +442,7 @@ ctx->state.text_str = rnd_strdup("%a.parent.refdes%"); ctx->state.is_visible = 1; } - rnd_attribute_put(&ctx->subc->Attributes, ctx->state.attr_key, ctx->state.attr_val); + pcb_attribute_put(&ctx->subc->Attributes, ctx->state.attr_key, ctx->state.attr_val); } if (ctx->state.text_style->char_width == 0) Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 32114) +++ trunk/src_plugins/io_dsn/read.c (revision 32115) @@ -183,10 +183,10 @@ return res; } -static void parse_attribute(dsn_read_t *ctx, rnd_attribute_list_t *attr, gsxl_node_t *kv) +static void parse_attribute(dsn_read_t *ctx, pcb_attribute_list_t *attr, gsxl_node_t *kv) { for(;kv != NULL; kv = kv->next) - rnd_attribute_put(attr, STRE(kv), STRE(kv->children)); + pcb_attribute_put(attr, STRE(kv), STRE(kv->children)); } static int dsn_parse_rect(dsn_read_t *ctx, rnd_box_t *dst, gsxl_node_t *src, int no_y_flip) @@ -348,7 +348,7 @@ if ((rnd_strcasecmp(ty, "signal") == 0) || (rnd_strcasecmp(ty, "jumper") == 0)) return 0; /* nothig special to do */ if ((rnd_strcasecmp(ty, "power") == 0) || (rnd_strcasecmp(ty, "mixed") == 0)) { - rnd_attribute_put(&grp->Attributes, "plane", ty); + pcb_attribute_put(&grp->Attributes, "plane", ty); return 0; } @@ -496,7 +496,7 @@ /* place polygons on planes */ for(gid = 0, grp = ctx->pcb->LayerGroups.grp; gid < ctx->pcb->LayerGroups.len; gid++,grp++) { - if (rnd_attribute_get(&grp->Attributes, "plane") != NULL) { + if (pcb_attribute_get(&grp->Attributes, "plane") != NULL) { pcb_layer_t *ly; if (!ctx->has_pcb_boundary) { rnd_message(RND_MSG_ERROR, "Because of the missing pcb boundary power planes are not filled with polygons.\n"); @@ -903,7 +903,7 @@ ps->rot = rotang; pcb_pstk_bbox(ps); } - rnd_attribute_put(&ps->Attributes, "term", term); + pcb_attribute_put(&ps->Attributes, "term", term); } else rnd_message(RND_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)pn->line, (long)pn->col); @@ -1038,8 +1038,8 @@ } } - rnd_attribute_put(&subc->Attributes, "footprint", id); - id = rnd_attribute_get(&subc->Attributes, "footprint"); + pcb_attribute_put(&subc->Attributes, "footprint", id); + id = pcb_attribute_get(&subc->Attributes, "footprint"); htsp_set(&ctx->subcs, id, subc); if (old_unit != NULL) @@ -1565,7 +1565,7 @@ } nsc = pcb_subc_dup_at(ctx->pcb, ctx->pcb->Data, subc, crd[0], crd[1], 0, rnd_false); - rnd_attribute_put(&nsc->Attributes, "refdes", refdes); + pcb_attribute_put(&nsc->Attributes, "refdes", refdes); if (mirror_first) { if (need_mirror) Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 32114) +++ trunk/src_plugins/io_eagle/read.c (revision 32115) @@ -1012,7 +1012,7 @@ rnd_message(RND_MSG_ERROR, "Failed to load smd pad\n"); if (name != NULL) - rnd_attribute_put(&ps->Attributes, "term", name); + pcb_attribute_put(&ps->Attributes, "term", name); return 0; } @@ -1078,7 +1078,7 @@ ps = eagle_create_pstk(st, data, x, y, sh, diax, diay, clr, drill, roundness, rot, onbottom, plated); if (name != NULL) - rnd_attribute_put(&ps->Attributes, "term", name); + pcb_attribute_put(&ps->Attributes, "term", name); switch(loc) { case IN_SUBC: break; @@ -1240,7 +1240,7 @@ pcb_subc_t *subc; subc = pcb_subc_alloc(); - rnd_attribute_put(&subc->Attributes, "refdes", "K1"); + pcb_attribute_put(&subc->Attributes, "refdes", "K1"); pcb_subc_reg(st->pcb->Data, subc); pcb_subc_bind_globals(st->pcb, subc); eagle_read_pkg(st, n, subc); @@ -1250,9 +1250,9 @@ continue; } - rnd_attribute_put(&subc->Attributes, "refdes", eagle_get_attrs(st, n, "name", NULL)); - rnd_attribute_put(&subc->Attributes, "value", eagle_get_attrs(st, n, "value", NULL)); - rnd_attribute_put(&subc->Attributes, "footprint", eagle_get_attrs(st, n, "package", NULL)); + pcb_attribute_put(&subc->Attributes, "refdes", eagle_get_attrs(st, n, "name", NULL)); + pcb_attribute_put(&subc->Attributes, "value", eagle_get_attrs(st, n, "value", NULL)); + pcb_attribute_put(&subc->Attributes, "footprint", eagle_get_attrs(st, n, "package", NULL)); pcb_subc_bbox(subc); TODO("subc: revise this: are we loading an instance here? do we need to place it? do not even bump if not!") @@ -1425,7 +1425,7 @@ static void eagle_read_subc_attrs(read_state_t *st, trnode_t *nd, pcb_subc_t *subc, rnd_coord_t x, rnd_coord_t y, const char *attname, const char *subc_attr, const char *str, rnd_bool add_text) { - rnd_attribute_put(&subc->Attributes, subc_attr, str); + pcb_attribute_put(&subc->Attributes, subc_attr, str); if (!add_text) return; Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 32114) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 32115) @@ -208,7 +208,7 @@ int len = strlen(k); if (len < sizeof(tmp) - sizeof(prefix)) { memcpy(tmp + sizeof(prefix) - 1, k, len+1); - rnd_attribute_put(&pcb->Attributes, tmp, v); + pcb_attribute_put(&pcb->Attributes, tmp, v); } } } Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 32114) +++ trunk/src_plugins/io_hyp/parser.c (revision 32115) @@ -463,7 +463,7 @@ subc = pcb_subc_alloc(); pcb_subc_create_aux(subc, x, y, 0.0, on_bottom); - rnd_attribute_put(&subc->Attributes, "refdes", refdes); + pcb_attribute_put(&subc->Attributes, "refdes", refdes); pcb_subc_add_refdes_text(subc, x, y, text_direction, text_scale, on_bottom); pcb_subc_reg(hyp_dest, subc); pcb_subc_bind_globals(hyp_dest->parent.board, subc); @@ -1925,7 +1925,7 @@ pstk = hyp_new_pstk(padstk, data, x, y, (subc != NULL), (subc != NULL)); if (pin_name != NULL) - rnd_attribute_put(&pstk->Attributes, "term", pin_name); + pcb_attribute_put(&pstk->Attributes, "term", pin_name); if (subc != NULL) /* add pin to current net */ hyp_netlist_add(name, number); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 32114) +++ trunk/src_plugins/io_kicad/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: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 32114) +++ trunk/src_plugins/io_kicad/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"; } Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 32114) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 32115) @@ -68,7 +68,7 @@ TODO(": need a subc dedup") /* elementlist_dedup_skip(ededup, element);*/ - fprintf(FP, "%s\n", unm_name(&group1, or_empty(rnd_attribute_get(&subc->Attributes, "footprint")), subc)); + fprintf(FP, "%s\n", unm_name(&group1, or_empty(pcb_attribute_get(&subc->Attributes, "footprint")), subc)); } unm_uninit(&group1); @@ -414,9 +414,9 @@ TODO(": do not hardwire coords") TODO(": figure how to turn off displaying these") - fprintf(FP, "T0 0 -4000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(rnd_attribute_get(&subc->Attributes, "refdes"))); - fprintf(FP, "T1 0 -5000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(rnd_attribute_get(&subc->Attributes, "value"))); - fprintf(FP, "T2 0 -6000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(rnd_attribute_get(&subc->Attributes, "footprint"))); + fprintf(FP, "T0 0 -4000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "refdes"))); + fprintf(FP, "T1 0 -5000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "value"))); + fprintf(FP, "T2 0 -6000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "footprint"))); /* export padstacks */ padstacklist_foreach(&subc->data->padstack, &it, ps) { @@ -621,7 +621,7 @@ unm_init(&group1); subclist_foreach(&Data->subc, &sit, subc) { - const char *uname = unm_name(&group1, or_empty(rnd_attribute_get(&subc->Attributes, "footprint")), subc); + const char *uname = unm_name(&group1, or_empty(pcb_attribute_get(&subc->Attributes, "footprint")), subc); TODO(": what did we need this for?") /* elementlist_dedup_skip(ededup, element); skip duplicate elements */ io_kicad_legacy_write_subc(FP, PCB, subc, xOffset, yOffset, uname); @@ -705,7 +705,7 @@ unm_init(&group1); for(n = 0; n < subcs->used; n++) { pcb_subc_t *subc = subcs->array[n]; - const char *uname = unm_name(&group1, or_empty(rnd_attribute_get(&subc->Attributes, "footprint")), subc); + const char *uname = unm_name(&group1, or_empty(pcb_attribute_get(&subc->Attributes, "footprint")), subc); io_kicad_legacy_write_subc(f, PCB, subc, 0, 0, uname); } unm_uninit(&group1); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 32114) +++ trunk/src_plugins/io_lihata/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: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 32114) +++ trunk/src_plugins/io_lihata/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); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 32114) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 32115) @@ -1003,12 +1003,12 @@ text_str = textnode->argv[1]; if (strcmp(tt->argv[1], "REF_DES") == 0) { - rnd_attribute_put(&subc->Attributes, "refdes", textnode->argv[1]); + pcb_attribute_put(&subc->Attributes, "refdes", textnode->argv[1]); text_str = "%a.parent.refdes%"; flg |= PCB_FLAG_DYNTEXT; } else if (strcmp(tt->argv[1], "PARTNO") == 0) { - rnd_attribute_put(&subc->Attributes, "footprint", textnode->argv[1]); + pcb_attribute_put(&subc->Attributes, "footprint", textnode->argv[1]); text_str = "%a.parent.footprint%"; flg |= PCB_FLAG_DYNTEXT; omit_on_silk = 1; @@ -1032,7 +1032,7 @@ /* extract global */ for(n = nd->first_child; n != NULL; n = n->next) { if (strcmp(n->argv[0], "DESCRIPTION") == 0) { - rnd_attribute_put(&subc->Attributes, "description", n->argv[1]); + pcb_attribute_put(&subc->Attributes, "description", n->argv[1]); } else if (strcmp(n->argv[0], "XY") == 0) { if ((parse_x(ctx, n->argv[1], &ox) != 0) || (parse_y(ctx, n->argv[2], &oy) != 0)) { Index: trunk/src_plugins/io_mentor_cell/read_pstk.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 32114) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 32115) @@ -385,7 +385,7 @@ ps->proto = pid; ps->xmirror = ps->smirror = on_bottom; pcb_pstk_add(subc->data, ps); - rnd_attribute_put(&ps->Attributes, "term", nd->argv[1]); + pcb_attribute_put(&ps->Attributes, "term", nd->argv[1]); set_pstk_clearance(ctx, nc, ps, nd); } Index: trunk/src_plugins/io_pcb/attribs.c =================================================================== --- trunk/src_plugins/io_pcb/attribs.c (revision 32114) +++ trunk/src_plugins/io_pcb/attribs.c (revision 32115) @@ -76,7 +76,7 @@ if (n->type == LHT_TEXT) { rnd_conf_native_t *nv = rnd_conf_get_field(path); if ((nv != NULL) && (!nv->random_flags.io_pcb_no_attrib)) - rnd_attribute_put(&pcb->Attributes, apath, n->data.text.value); + pcb_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); } - rnd_attribute_put(&pcb->Attributes, apath, conc.array); + pcb_attribute_put(&pcb->Attributes, apath, conc.array); gds_uninit(&conc); } } Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 32114) +++ trunk/src_plugins/io_pcb/file.c (revision 32115) @@ -210,7 +210,7 @@ } -static void WriteAttributeList(FILE * FP, rnd_attribute_list_t *list, const char *prefix, const char **inhibit) +static void WriteAttributeList(FILE * FP, pcb_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 = 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)) { 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 *) RND_UNKNOWN(rnd_attribute_get(&net->Attributes, "style"))); + pcb_print_quoted_string(FP, (char *) RND_UNKNOWN(pcb_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(\""); @@ -453,16 +453,16 @@ } else { const char *tmp; - tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_x"); + tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_x"); if (tmp != NULL) rx = rnd_get_value(tmp, NULL, NULL, NULL) - ox; - tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_y"); + tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_y"); if (tmp != NULL) ry = rnd_get_value(tmp, NULL, NULL, NULL) - oy; - tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_direction"); + tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_direction"); if (tmp != NULL) rdir = atoi(tmp); - tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_scale"); + tmp = pcb_attribute_get(&sc->Attributes, "io_pcb::hidename_scale"); if (tmp != NULL) rscale = atoi(tmp); } @@ -474,11 +474,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 *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "footprint"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(pcb_attribute_get(&sc->Attributes, "footprint"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "refdes"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(pcb_attribute_get(&sc->Attributes, "refdes"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "value"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(pcb_attribute_get(&sc->Attributes, "value"))); rnd_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); @@ -489,9 +489,9 @@ unsigned char ic = ps->intconn; if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { rnd_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 *)RND_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(pcb_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(pcb_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)) { @@ -498,9 +498,9 @@ unsigned long fl = (square ? PCB_FLAG_SQUARE : 0) | (nopaste ? PCB_FLAG_NOPASTE : 0) | (on_bot ? PCB_FLAG_ONSOLDER : 0); rnd_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 *)RND_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(pcb_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(pcb_attribute_get(&ps->Attributes, "term"))); fprintf(FP, " %s]\n", pcb_strflg_f2s(pcb_flag_make(fl), PCB_OBJ_PAD, &ic, 1)); } else @@ -753,7 +753,7 @@ int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { - rnd_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); + pcb_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); LayersFixup(); @@ -1060,11 +1060,11 @@ PCB_FLAG_SET(Flags.f, sc); if (Description != NULL) - rnd_attribute_put(&sc->Attributes, "footprint", Description); + pcb_attribute_put(&sc->Attributes, "footprint", Description); if (NameOnPCB != NULL) - rnd_attribute_put(&sc->Attributes, "refdes", NameOnPCB); + pcb_attribute_put(&sc->Attributes, "refdes", NameOnPCB); if (Value != NULL) - rnd_attribute_put(&sc->Attributes, "value", Value); + pcb_attribute_put(&sc->Attributes, "value", Value); TODO("subc: TextFlags") if (!(Flags.f & PCB_FLAG_HIDENAME)) @@ -1073,13 +1073,13 @@ if (Flags.f & PCB_FLAG_HIDENAME) { char tmp[128]; rnd_sprintf(tmp, "%$mm", TextX); - rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_x", tmp); + pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_x", tmp); rnd_sprintf(tmp, "%$mm", TextY); - rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_y", tmp); + pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_y", tmp); sprintf(tmp, "%d", Direction); - rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_direction", tmp); + pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_direction", tmp); sprintf(tmp, "%d", TextScale); - rnd_attribute_put(&sc->Attributes, "io_pcb::hidename_scale", tmp); + pcb_attribute_put(&sc->Attributes, "io_pcb::hidename_scale", tmp); } return sc; @@ -1122,9 +1122,9 @@ pcb_pstk_t *p; p = pcb_old_via_new(subc->data, -1, X, Y, Thickness, Clearance, Mask, DrillingHole, Name, Flags); 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 (yysubc_bottom) pcb_pstk_mirror(p, PCB_PSTK_DONT_MIRROR_COORDS, 1, 0, 0); @@ -1137,9 +1137,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) - 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 (yysubc_bottom) { pcb_data_t *old_hack = pcb_pstk_data_hack; Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 32114) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 32115) @@ -2815,7 +2815,7 @@ } if (retval == 0) { /* restore loader so the next save will use the same units */ - const char *loader = rnd_attribute_get(&PCB->Attributes, "PCB::loader"); + const char *loader = pcb_attribute_get(&PCB->Attributes, "PCB::loader"); if (loader != NULL) { pcb_find_io_t f; int len; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 32114) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 32115) @@ -432,7 +432,7 @@ } if (retval == 0) { /* restore loader so the next save will use the same units */ - const char *loader = rnd_attribute_get(&PCB->Attributes, "PCB::loader"); + const char *loader = pcb_attribute_get(&PCB->Attributes, "PCB::loader"); if (loader != NULL) { pcb_find_io_t f; int len; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 32114) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 32115) @@ -161,7 +161,7 @@ static char *layer_group_string; -static rnd_attribute_list_t *attr_list; +static pcb_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)); - rnd_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); + pcb_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)); - rnd_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); + pcb_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')) - rnd_attribute_put(&currnet->Attributes, "style", (yyvsp[-2].string)); + pcb_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 = rnd_attribute_get(attr_list, key); + old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) rnd_message(RND_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else - rnd_attribute_put(attr_list, key, val); + pcb_attribute_put(attr_list, key, val); free(key); free(val); } Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 32114) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 32115) @@ -84,7 +84,7 @@ static char *layer_group_string; -static rnd_attribute_list_t *attr_list; +static pcb_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); - rnd_attrib_compat_set_intconn(&pin->Attributes, yy_intconn); + pcb_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); - rnd_attrib_compat_set_intconn(&pad->Attributes, yy_intconn); + pcb_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')) - rnd_attribute_put(&currnet->Attributes, "style", $4); + pcb_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 = rnd_attribute_get(attr_list, key); + old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) rnd_message(RND_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else - rnd_attribute_put(attr_list, key, val); + pcb_attribute_put(attr_list, key, val); free(key); free(val); } Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 32114) +++ trunk/src_plugins/io_tedax/footprint.c (revision 32115) @@ -281,11 +281,11 @@ int tedax_fp_fsave_subc(pcb_subc_t *subc, FILE *f) { - const char *fpname = rnd_attribute_get(&subc->Attributes, "tedax::footprint"); + const char *fpname = pcb_attribute_get(&subc->Attributes, "tedax::footprint"); if (fpname == NULL) - fpname = rnd_attribute_get(&subc->Attributes, "visible_footprint"); + fpname = pcb_attribute_get(&subc->Attributes, "visible_footprint"); if (fpname == NULL) - fpname = rnd_attribute_get(&subc->Attributes, "footprint"); + fpname = pcb_attribute_get(&subc->Attributes, "footprint"); if ((fpname == NULL) && (subc->refdes != NULL)) fpname = subc->refdes; if (fpname == NULL) @@ -398,7 +398,7 @@ rnd_message(RND_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ return -1; \ } \ - rnd_attribute_put(&obj->Attributes, "term", term->name); \ + pcb_attribute_put(&obj->Attributes, "term", term->name); \ vtp0_append(&term->objs, obj); \ } while(0) @@ -601,7 +601,7 @@ } htip_uninit(&terms); - rnd_attribute_put(&subc->Attributes, "refdes", "X1"); + pcb_attribute_put(&subc->Attributes, "refdes", "X1"); pcb_subc_add_refdes_text(subc, 0, 0, 0, 100, rnd_false); pcb_subc_create_aux(subc, 0, 0, 0.0, rnd_false); Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 32114) +++ trunk/src_plugins/io_tedax/stackup.c (revision 32115) @@ -120,7 +120,7 @@ static void save_user_props(pcb_board_t *pcb, FILE *f, pcb_layergrp_t *grp, const char *name) { int n; - rnd_attribute_t *a; + pcb_attribute_t *a; char *mat = NULL, *thermk = NULL, *thick = NULL, *fab_color = NULL, *dielect = NULL; for(n = 0, a = grp->Attributes.List; n < grp->Attributes.Number; n++,a++) { @@ -386,7 +386,7 @@ } } else - rnd_attribute_put(&grp->Attributes, argv[2], argv[3]); + pcb_attribute_put(&grp->Attributes, argv[2], argv[3]); } else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "stackup") == 0)) break; Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 32114) +++ trunk/src_plugins/io_tedax/tboard.c (revision 32115) @@ -108,7 +108,7 @@ htsi_entry_t *re; rnd_layergrp_id_t gid; int n; - rnd_attribute_t *a; + pcb_attribute_t *a; tedax_stackup_t ctx; pcb_placement_t plc; static const char *stackupid = "board_stackup"; @@ -169,7 +169,7 @@ PCB_END_LOOP; PCB_SUBC_LOOP(pcb->Data) { - rnd_attribute_t *a; + pcb_attribute_t *a; pcb_host_trans_t tr; char fpname[256], refdes[256]; pcb_subc_t *proto = htscp_get(&plc.subcs, subc); @@ -389,7 +389,7 @@ } else if (strcmp(argv[0], "attr") == 0) { reqarg("attr", 3); - rnd_attribute_put(&PCB->Attributes, argv[1], argv[2]); + pcb_attribute_put(&PCB->Attributes, argv[1], argv[2]); } else if (strcmp(argv[0], "stackup") == 0) { remember(stackup); Index: trunk/src_plugins/io_tedax/tnetlist.c =================================================================== --- trunk/src_plugins/io_tedax/tnetlist.c (revision 32114) +++ trunk/src_plugins/io_tedax/tnetlist.c (revision 32115) @@ -189,7 +189,7 @@ } PCB_SUBC_LOOP(pcb->Data) { - rnd_attribute_t *a; + pcb_attribute_t *a; if ((subc->refdes == NULL) || (*subc->refdes == '\0') || PCB_FLAG_TEST(PCB_FLAG_NONETLIST, subc)) continue; Index: trunk/src_plugins/lib_compat_help/elem_rot.c =================================================================== --- trunk/src_plugins/lib_compat_help/elem_rot.c (revision 32114) +++ trunk/src_plugins/lib_compat_help/elem_rot.c (revision 32115) @@ -155,7 +155,7 @@ centroidx = sumx / (double) pin_cnt; centroidy = sumy / (double) pin_cnt; - if (!autodetect && (RND_NSTRCMP(rnd_attribute_get(&subc->Attributes, "xy-centre"), "origin") == 0)) { + if (!autodetect && (RND_NSTRCMP(pcb_attribute_get(&subc->Attributes, "xy-centre"), "origin") == 0)) { *cx = ox; *cy = oy; } @@ -164,7 +164,7 @@ *cy = centroidy; } - fixed_rotation = rnd_attribute_get(&subc->Attributes, "xy-fixed-rotation"); + fixed_rotation = pcb_attribute_get(&subc->Attributes, "xy-fixed-rotation"); if (fixed_rotation != NULL) { /* The user specified a fixed rotation */ *theta = atof(fixed_rotation); @@ -236,9 +236,9 @@ pcb_subc_xy_rot(subc, &cx, &cy, &rot, &tmp, 1); /* unless xy-centre or pnp-centre is set to origin, place a pnp origin mark */ - cent = rnd_attribute_get(&subc->Attributes, "xy-centre"); + cent = pcb_attribute_get(&subc->Attributes, "xy-centre"); if (cent == NULL) - cent = rnd_attribute_get(&subc->Attributes, "pnp-centre"); + cent = pcb_attribute_get(&subc->Attributes, "pnp-centre"); if ((cent == NULL) || (strcmp(cent, "origin") != 0)) pcb_subc_create_aux_point(subc, cx, cy, "pnp-origin"); Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 32114) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 32115) @@ -778,7 +778,7 @@ } if (Name != NULL) - rnd_attribute_put(&p->Attributes, "name", Name); + pcb_attribute_put(&p->Attributes, "name", Name); return p; } Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 32114) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 32115) @@ -81,7 +81,7 @@ if (num_cand[l] == 1) { vtp0_append(&tmp, cand[l]); if (term == NULL) - term = rnd_attribute_get(&cand[l]->Attributes, "term"); + term = pcb_attribute_get(&cand[l]->Attributes, "term"); } } @@ -97,7 +97,7 @@ pcb_pstk_t *ps = pcb_pstk_new(data, -1, pid, cx, cy, 0, pcb_flag_make(PCB_FLAG_CLEARLINE | PCB_FLAG_FOUND)); vtp0_append(objs, ps); if (term != NULL) - rnd_attribute_put(&ps->Attributes, "term", term); + pcb_attribute_put(&ps->Attributes, "term", term); /* got our new proto - remove the objects we used */ for(ci = 0; ci < tmp.used; ci++) { int i; Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 32114) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 32115) @@ -230,7 +230,7 @@ switch(type) { case 0: tn = "none"; break; case PCB_OBJ_SUBC: - if (rnd_attribute_get(&((pcb_any_obj_t *)o2)->Attributes, "extobj") != 0) { + if (pcb_attribute_get(&((pcb_any_obj_t *)o2)->Attributes, "extobj") != 0) { tn = "extobj-subcircuit"; break; } @@ -291,7 +291,7 @@ "{l shift-t} is written as:\n" "l; Shiftt\n"; - val = rnd_attribute_get(&ly->Attributes, key); + val = pcb_attribute_get(&ly->Attributes, key); args[1].type = FGW_STR; args[1].val.cstr = msg; args[2].type = FGW_STR; args[2].val.cstr = val; args[3].type = FGW_STR; args[3].val.cstr = title; @@ -303,7 +303,7 @@ return 0; } - rnd_attribute_put(&ly->Attributes, key, r.val.str); + pcb_attribute_put(&ly->Attributes, key, r.val.str); fgw_arg_free(&rnd_fgw, &r); RND_ACT_IRES(0); Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 32114) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 32115) @@ -171,7 +171,7 @@ static void custom_layer_attr_key(pcb_layer_t *l, rnd_layer_id_t lid, const char *attrname, const char *menu_prefix, const char *action_prefix, rnd_menu_prop_t *keyprops, char *path, char *end, int len_avail) { - char *key = rnd_attribute_get(&l->Attributes, attrname); + char *key = pcb_attribute_get(&l->Attributes, attrname); if (key != NULL) { keyprops->accel = key; rnd_snprintf(end, len_avail, "%s %ld:%s", menu_prefix, lid+1, l->name); Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 32114) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 32115) @@ -60,7 +60,7 @@ pcb_route_style_t *rst; rnd_hid_attribute_t *attr; rnd_hid_tree_t *tree; - rnd_attribute_t *a; + pcb_attribute_t *a; if (!rstdlg_ctx.active) return; @@ -203,7 +203,7 @@ char *key = NULL, *val = NULL; if (rst_edit_attr(&key, &val) == 0) { - rnd_attribute_put(&rst->attr, key, val); + pcb_attribute_put(&rst->attr, key, val); rst_updated(rst); } } @@ -222,8 +222,8 @@ val = row->cell[1]; if (rst_edit_attr(&key, &val) == 0) { - rnd_attribute_remove(&rst->attr, row->cell[0]); - rnd_attribute_put(&rst->attr, key, val); + pcb_attribute_remove(&rst->attr, row->cell[0]); + pcb_attribute_put(&rst->attr, key, val); rst_updated(rst); } } @@ -237,7 +237,7 @@ if (row == NULL) return; - rnd_attribute_remove(&rst->attr, row->cell[0]); + pcb_attribute_remove(&rst->attr, row->cell[0]); rst_updated(rst); } Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 32114) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 32115) @@ -498,7 +498,7 @@ gds_append_str(&desc, "Subc. refdes:\t"); gds_append_str(&desc, subc->refdes == NULL ? "--" : subc->refdes); gds_append_str(&desc, "\nTerminal: \t"); gds_append_str(&desc, obj->term == NULL ? "--" : obj->term); if (obj->term != NULL) { /* print terminal name if not empty and not the same as term */ - const char *name = rnd_attribute_get(&obj->Attributes, "name"); + const char *name = pcb_attribute_get(&obj->Attributes, "name"); if ((name != NULL) && (strcmp(name, obj->term) != 0)) { gds_append_str(&desc, " ("); gds_append_str(&desc, name); Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 32114) +++ trunk/src_plugins/propedit/propsel.c (revision 32115) @@ -73,7 +73,7 @@ pcb_props_add(ctx, name, type2TYPE_ ## type, v); \ } while(0) -static void map_attr(void *ctx, const rnd_attribute_list_t *list) +static void map_attr(void *ctx, const pcb_attribute_list_t *list) { int i, bl = 0; char small[256]; @@ -362,10 +362,10 @@ return 0; } -static void toggle_attr(pcb_propset_ctx_t *st, rnd_attribute_list_t *list, int undoable, pcb_any_obj_t *obj) +static void toggle_attr(pcb_propset_ctx_t *st, pcb_attribute_list_t *list, int undoable, pcb_any_obj_t *obj) { const char *key = st->name+2, *newval = NULL; - const char *orig = rnd_attribute_get(list, key); + const char *orig = pcb_attribute_get(list, key); int side_effect = 0; if (orig == NULL) { @@ -393,7 +393,7 @@ if (undoable) pcb_uchg_attr(st->pcb, obj, key, newval); else - rnd_attribute_put(list, key, newval); + pcb_attribute_put(list, key, newval); if ((obj != NULL) && side_effect) { pcb_obj_update_bbox(st->pcb, obj); pcb_obj_post(obj); @@ -402,7 +402,7 @@ st->set_cnt++; } -static void set_attr_raw(pcb_propset_ctx_t *st, rnd_attribute_list_t *list) +static void set_attr_raw(pcb_propset_ctx_t *st, pcb_attribute_list_t *list) { const char *key = st->name+2; const char *orig; @@ -412,11 +412,11 @@ return; } - orig = rnd_attribute_get(list, key); + orig = pcb_attribute_get(list, key); if ((orig != NULL) && (strcmp(orig, st->s) == 0)) return; - rnd_attribute_put(list, key, st->s); + pcb_attribute_put(list, key, st->s); st->set_cnt++; } @@ -572,7 +572,7 @@ if (st->is_attr) { const char *key = st->name+2; - const char *orig = rnd_attribute_get(&net->Attributes, key); + const char *orig = pcb_attribute_get(&net->Attributes, key); if ((orig != NULL) && (strcmp(orig, st->s) == 0)) return; @@ -1059,9 +1059,9 @@ /*******************/ -static long del_attr(void *ctx, rnd_attribute_list_t *list, const char *key) +static long del_attr(void *ctx, pcb_attribute_list_t *list, const char *key) { - if (rnd_attribute_remove(list, key)) + if (pcb_attribute_remove(list, key)) return 1; return 0; } @@ -1079,7 +1079,7 @@ static long del_net(pcb_propedit_t *ctx, const char *netname, const char *key) { pcb_net_t *net = pcb_net_get(ctx->pcb, &ctx->pcb->netlist[PCB_NETLIST_EDITED], netname, 0); - if ((net == NULL) || (rnd_attribute_get(&net->Attributes, key) == NULL)) + if ((net == NULL) || (pcb_attribute_get(&net->Attributes, key) == NULL)) return 0; pcb_ratspatch_append_optimize(ctx->pcb, RATP_CHANGE_ATTRIB, netname, key, NULL); Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 32114) +++ trunk/src_plugins/query/query_access.c (revision 32115) @@ -287,7 +287,7 @@ fld2str_req(s2, fld, 1); \ if (!PCB_OBJ_IS_CLASS(obj->type, PCB_OBJ_CLASS_OBJ)) \ PCB_QRY_RET_INV(res); \ - PCB_QRY_RET_STR(res, rnd_attribute_get(&obj->Attributes, s2)); \ + PCB_QRY_RET_STR(res, pcb_attribute_get(&obj->Attributes, s2)); \ } \ \ if (fh1 == query_fields_ID) { \ @@ -381,7 +381,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&l->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&l->Attributes, s2)); } if (fld->next != NULL) @@ -445,7 +445,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&l->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&l->Attributes, s2)); } if (fh1 == query_fields_layer) { @@ -506,7 +506,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&a->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&a->Attributes, s2)); } if (fh1 == query_fields_angle) { @@ -572,7 +572,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&g->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&g->Attributes, s2)); } if (fh1 == query_fields_layer) { @@ -607,7 +607,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&t->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&t->Attributes, s2)); } if (fh1 == query_fields_layer) { @@ -649,7 +649,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&p->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&p->Attributes, s2)); } if (fh1 == query_fields_layer) { @@ -708,7 +708,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&p->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&p->Attributes, s2)); } if (fh1 == query_fields_shape) { @@ -764,7 +764,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&net->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&net->Attributes, s2)); } if (fld->next != NULL) @@ -791,7 +791,7 @@ if (fh1 == query_fields_a) { const char *s2; fld2str_req(s2, fld, 1); - PCB_QRY_RET_STR(res, rnd_attribute_get(&p->Attributes, s2)); + PCB_QRY_RET_STR(res, pcb_attribute_get(&p->Attributes, s2)); } if (fh1 == query_fields_layer) Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 32114) +++ trunk/src_plugins/report/report.c (revision 32115) @@ -324,7 +324,7 @@ subc->BoundingBox.X1, subc->BoundingBox.Y1, subc->BoundingBox.X2, subc->BoundingBox.Y2, RND_EMPTY(subc->refdes), - RND_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint")), + RND_EMPTY(pcb_attribute_get(&subc->Attributes, "footprint")), gen_locked(subc)); } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 32114) +++ trunk/src_plugins/vendordrill/vendor.c (revision 32115) @@ -549,7 +549,7 @@ } } if (noskip) { - const char *vl = rnd_attribute_get(&subc->Attributes, "value"); + const char *vl = pcb_attribute_get(&subc->Attributes, "value"); for (i = 0; i < n_value; i++) { if ((RND_NSTRCMP(RND_UNKNOWN(vl), ignore_value[i]) == 0) || rematch(ignore_value[i], RND_UNKNOWN(vl))) { @@ -560,7 +560,7 @@ } if (noskip) { - const char *fp = rnd_attribute_get(&subc->Attributes, "footprint"); + const char *fp = pcb_attribute_get(&subc->Attributes, "footprint"); for (i = 0; i < n_descr; i++) { if ((RND_NSTRCMP(RND_UNKNOWN(fp), ignore_descr[i]) == 0) || rematch(ignore_descr[i], RND_UNKNOWN(fp))) { Index: trunk/util/devhelpers/renamef.sh =================================================================== --- trunk/util/devhelpers/renamef.sh (revision 32114) +++ trunk/util/devhelpers/renamef.sh (revision 32115) @@ -5,4 +5,4 @@ ./rename.sh "s/\\([^a-zA-Z0-9_>.]\\)${1}[ \t]*[(]/\\1$2(/g" ./rename.sh "s/^${1}[ \t]*[(]/$2(/g" -echo "#define $1 $2" >> src/librnd/pcb_compat.h +#echo "#define $1 $2" >> src/librnd/pcb_compat.h