Index: mentor_sch.c =================================================================== --- mentor_sch.c (revision 28033) +++ mentor_sch.c (revision 28034) @@ -94,8 +94,8 @@ } } - nethlp_elem_done(&ectx); -/* pcb_actionva("ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL);*/ + nethlp_elem_done(&PCB->hidlib, &ectx); +/* pcb_actionva(&PCB->hidlib, "ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL);*/ return 0; } @@ -117,7 +117,7 @@ if ((part != NULL) && (pin != NULL)) { if (*pin == '&') pin++; - nethlp_net_add_term(&nctx, part, pin); + nethlp_net_add_term(&PCB->hidlib, &nctx, part, pin); } } } @@ -176,9 +176,9 @@ return -1; } - pcb_actionva("Netlist", "Freeze", NULL); - pcb_actionva("Netlist", "Clear", NULL); - pcb_actionva("ElementList", "start", NULL); + pcb_actionva(&PCB->hidlib, "Netlist", "Freeze", NULL); + pcb_actionva(&PCB->hidlib, "Netlist", "Clear", NULL); + pcb_actionva(&PCB->hidlib, "ElementList", "start", NULL); for(library = dom->root->children; library != NULL; library = library->next) { if (strcmp(library->str, "library") == 0) { @@ -198,9 +198,9 @@ } } - pcb_actionva("ElementList", "Done", NULL); - pcb_actionva("Netlist", "Sort", NULL); - pcb_actionva("Netlist", "Thaw", NULL); + pcb_actionva(&PCB->hidlib, "ElementList", "Done", NULL); + pcb_actionva(&PCB->hidlib, "Netlist", "Sort", NULL); + pcb_actionva(&PCB->hidlib, "Netlist", "Thaw", NULL); /* for(n = library->children; n != NULL; n = n->next) { printf("n=%s\n", n->str); Index: netlist_helper.c =================================================================== --- netlist_helper.c (revision 28033) +++ netlist_helper.c (revision 28034) @@ -214,7 +214,7 @@ htsp_set(&ectx->attr, pcb_strdup(r->new_key), pcb_strdup(dst)); } -void nethlp_elem_done(nethlp_elem_ctx_t *ectx) +void nethlp_elem_done(pcb_hidlib_t *hl, nethlp_elem_ctx_t *ectx) { htsp_entry_t *e; char *refdes, *footprint, *value; @@ -256,7 +256,7 @@ if (value == NULL) value = ""; /* create elemet */ - pcb_actionva("ElementList", "Need", refdes, footprint, value, NULL); + pcb_actionva(hl, "ElementList", "Need", refdes, footprint, value, NULL); /* printf("Elem '%s' -> %s:%s:%s\n", ectx->id, refdes, footprint, value);*/ } else @@ -288,7 +288,7 @@ return prealloc; } -void nethlp_net_add_term(nethlp_net_ctx_t *nctx, const char *part, const char *pin) +void nethlp_net_add_term(pcb_hidlib_t *hl, nethlp_net_ctx_t *nctx, const char *part, const char *pin) { char *refdes = htsp_get(&nctx->nhctx->id2refdes, part); char term[256]; @@ -296,7 +296,7 @@ pcb_message(PCB_MSG_ERROR, "nethelper: can't resolve refdes of part %s\n", part); } pcb_snprintf(term, sizeof(term), "%s-%s", refdes, pin); - pcb_actionva("Netlist", "Add", nctx->netname, term, NULL); + pcb_actionva(hl, "Netlist", "Add", nctx->netname, term, NULL); } void nethlp_net_destroy(nethlp_net_ctx_t *nctx) Index: netlist_helper.h =================================================================== --- netlist_helper.h (revision 28033) +++ netlist_helper.h (revision 28034) @@ -1,5 +1,6 @@ #include #include +#include "global_typedefs.h" typedef struct nethlp_rule_s nethlp_rule_t; @@ -42,9 +43,9 @@ nethlp_elem_ctx_t *nethlp_elem_new(nethlp_ctx_t *nhctx, nethlp_elem_ctx_t *prealloc, const char *id); void nethlp_elem_refdes(nethlp_elem_ctx_t *ectx, const char *refdes); void nethlp_elem_attr(nethlp_elem_ctx_t *ectx, const char *key, const char *val); -void nethlp_elem_done(nethlp_elem_ctx_t *ectx); +void nethlp_elem_done(pcb_hidlib_t *hl, nethlp_elem_ctx_t *ectx); nethlp_net_ctx_t *nethlp_net_new(nethlp_ctx_t *nhctx, nethlp_net_ctx_t *prealloc, const char *netname); -void nethlp_net_add_term(nethlp_net_ctx_t *nctx, const char *part, const char *pin); +void nethlp_net_add_term(pcb_hidlib_t *hl, nethlp_net_ctx_t *nctx, const char *part, const char *pin); void nethlp_net_destroy(nethlp_net_ctx_t *nctx);