Index: dlg.c =================================================================== --- dlg.c (revision 30902) +++ dlg.c (revision 30903) @@ -96,7 +96,7 @@ txt->hid_set_text(atxt, ctx->dlg_hid_ctx, PCB_HID_TEXT_REPLACE, textval(nd, "query")); } else { - pcb_message(PCB_MSG_ERROR, "Rule %s disappeared from the config tree.\n", ctx->rule); + rnd_message(PCB_MSG_ERROR, "Rule %s disappeared from the config tree.\n", ctx->rule); pcb_hid_dad_close(ctx->dlg_hid_ctx, &retovr, -1); } } @@ -140,7 +140,7 @@ nnew = lht_tree_path_(parent->doc, parent, nname0, 1, 1, &err); \ if (parent->type == LHT_LIST) free(nname0); \ if ((nnew != NULL) && (nnew->type != ntype)) { \ - pcb_message(PCB_MSG_ERROR, "Internal error: invalid existing node type for %s: %d, rule is NOT saved\n", nname, nnew->type); \ + rnd_message(PCB_MSG_ERROR, "Internal error: invalid existing node type for %s: %d, rule is NOT saved\n", nname, nnew->type); \ return; \ } \ else if (nnew == NULL) { \ @@ -149,7 +149,7 @@ case LHT_HASH: err = lht_dom_hash_put(parent, nnew); break; \ case LHT_LIST: err = lht_dom_list_append(parent, nnew); break; \ default: \ - pcb_message(PCB_MSG_ERROR, "Internal error: invalid parent node type for %s: %d, rule is NOT saved\n", parent->name, parent->type); \ + rnd_message(PCB_MSG_ERROR, "Internal error: invalid parent node type for %s: %d, rule is NOT saved\n", parent->name, parent->type); \ return; \ } \ } \ @@ -161,7 +161,7 @@ lht_node_t *ntxt; \ MKDIR_ND(ntxt, parent, LHT_TEXT, nname); \ if (ntxt == NULL) { \ - pcb_message(PCB_MSG_ERROR, "Internal error: new text node for %s is NULL, rule is NOT saved\n", nname); \ + rnd_message(PCB_MSG_ERROR, "Internal error: new text node for %s is NULL, rule is NOT saved\n", nname); \ return; \ } \ free(ntxt->data.text.value); \ @@ -178,7 +178,7 @@ pcb_hid_text_t *txt = atxt->wdata; if ((ri < 0) || (ri >= sizeof(save_rolee)/sizeof(save_rolee[0]))) { - pcb_message(PCB_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); return; } @@ -187,7 +187,7 @@ if (nd == NULL) { nd = pcb_conf_lht_get_first(role, 1); if (nd == NULL) { - pcb_message(PCB_MSG_ERROR, "Internal error: failed to create role root, rule is NOT saved\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: failed to create role root, rule is NOT saved\n"); return; } MKDIR_ND(nd, nd, LHT_HASH, "plugins"); @@ -202,10 +202,10 @@ lht_node_t *nnew = lht_dom_duptree(i->prop.src); lht_dom_list_append(nd, nnew); } - pcb_message(PCB_MSG_WARNING, "NOTE: Copying ALL drc rule to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(PCB_MSG_WARNING, "NOTE: Copying ALL drc rule to config role %s\n", ctx->rule, save_roles[ri]); } MKDIR_ND(nd, nd, LHT_HASH, ctx->rule); - pcb_message(PCB_MSG_INFO, "NOTE: Copying drc rule '%s' to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(PCB_MSG_INFO, "NOTE: Copying drc rule '%s' to config role %s\n", ctx->rule, save_roles[ri]); } MKDIR_ND_SET_TEXT(nd, "type", ctx->dlg[ctx->wtype].val.str); @@ -230,7 +230,7 @@ for(ctx = gdl_first(&rule_edit_dialogs); ctx != NULL; ctx = gdl_next(&rule_edit_dialogs, ctx)) { if (strcmp(rule, ctx->rule) == 0) { - pcb_message(PCB_MSG_ERROR, "An edit dialog for rule %s is already open.\n", rule); + rnd_message(PCB_MSG_ERROR, "An edit dialog for rule %s is already open.\n", rule); return 0; } } @@ -238,7 +238,7 @@ path = pcb_concat(DRC_CONF_PATH_RULES, rule, ":0", NULL); nd = pcb_conf_lht_get_at_mainplug(role, path, 1, 0); if (nd == NULL) { - pcb_message(PCB_MSG_ERROR, "Rule %s not found on this role.\n", rule); + rnd_message(PCB_MSG_ERROR, "Rule %s not found on this role.\n", rule); return -1; } @@ -431,13 +431,13 @@ int *dis; if (row == NULL) { - pcb_message(PCB_MSG_ERROR, "Select a rule first!\n"); + rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); return; } dis = drc_get_disable(row->cell[0]); if (dis == NULL) { - pcb_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); + rnd_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); return; } @@ -448,12 +448,12 @@ #define rlist_fetch() \ do { \ if (row == NULL) { \ - pcb_message(PCB_MSG_ERROR, "Select a rule first!\n"); \ + rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); \ return; \ } \ role = pcb_conf_role_parse(row->cell[1]); \ if (role == CFR_invalid) { \ - pcb_message(PCB_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); \ + rnd_message(PCB_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); \ return; \ } \ } while(0) @@ -463,7 +463,7 @@ char *path = pcb_concat(DRC_CONF_PATH_RULES, row->cell[0], ":0", NULL); \ nd = pcb_conf_lht_get_at_mainplug(role, path, 1, 0); \ if (nd == NULL) { \ - pcb_message(PCB_MSG_ERROR, "internal error: rule not found at %s\n", path); \ + rnd_message(PCB_MSG_ERROR, "internal error: rule not found at %s\n", path); \ return; \ } \ free(path); \ @@ -495,7 +495,7 @@ script = textval(nd, "query"); if (script == NULL) { - pcb_message(PCB_MSG_ERROR, "Can not run rule %s: no query specified\n", row->cell[0]); + rnd_message(PCB_MSG_ERROR, "Can not run rule %s: no query specified\n", row->cell[0]); return; } Index: drc_query.c =================================================================== --- drc_query.c (revision 30902) +++ drc_query.c (revision 30903) @@ -77,7 +77,7 @@ long hit_cnt; } drc_qry_ctx_t; -pcb_coord_t load_obj_const(pcb_obj_qry_const_t *cnst) +rnd_coord_t load_obj_const(pcb_obj_qry_const_t *cnst) { switch(cnst->val.type) { case PCBQ_VT_COORD: return cnst->val.data.crd; @@ -114,7 +114,7 @@ violation = pcb_view_new(&qctx->pcb->hidlib, qctx->type, qctx->title, qctx->desc); if (res->type == PCBQ_VT_LST) { int i; - pcb_coord_t *expv = NULL, expv_, *mesv = NULL, mesv_; + rnd_coord_t *expv = NULL, expv_, *mesv = NULL, mesv_; for(i = 0; i < res->data.lst.used-1; i+=2) { pcb_any_obj_t *cmd = res->data.lst.array[i], *obj = res->data.lst.array[i+1]; pcb_qry_drc_ctrl_t ctrl = pcb_qry_drc_ctrl_decode(cmd); @@ -149,7 +149,7 @@ double ts, te; if (query == NULL) { - pcb_message(PCB_MSG_ERROR, "drc_query: igoring rule with no query string:%s\n", name); + rnd_message(PCB_MSG_ERROR, "drc_query: igoring rule with no query string:%s\n", name); return 0; } if (type == NULL) type = "DRC violation"; @@ -184,7 +184,7 @@ if (n == NULL) return NULL; if (n->type != LHT_TEXT) { - pcb_message(PCB_MSG_ERROR, "drc_query: igoring non-text node %s of rule %s \n", name, i->name); + rnd_message(PCB_MSG_ERROR, "drc_query: igoring non-text node %s of rule %s \n", name, i->name); return NULL; } return n->data.text.value; @@ -219,7 +219,7 @@ lht_node_t *rule = i->prop.src; int *dis; if (rule->type != LHT_HASH) { - pcb_message(PCB_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); + rnd_message(PCB_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); continue; } @@ -272,7 +272,7 @@ nat = pcb_conf_reg_field_(b, 1, CFN_BOOLEAN, path, pcb_strdup(sdesc), 0); if (nat == NULL) { free(b); - pcb_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); goto fail; } @@ -288,11 +288,11 @@ else if (nat_defs == cfg) { lht_node_t *nd = i->prop.src; char *path = pcb_concat(DRC_CONF_PATH_CONST, nd->name, NULL); - pcb_coord_t *c; + rnd_coord_t *c; if (pcb_conf_get_field(path) == NULL) { union { - pcb_coord_t c; + rnd_coord_t c; double d; void *ptr; char *str; @@ -311,13 +311,13 @@ if (stype == NULL) { - pcb_message(PCB_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); + rnd_message(PCB_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); goto fail; } type = pcb_conf_native_type_parse(stype); if (type >= CFN_LIST) { - pcb_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); + rnd_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); goto fail; } @@ -325,7 +325,7 @@ nat = pcb_conf_reg_field_(c, 1, type, path, pcb_strdup(sdesc), 0); if (nat == NULL) { free(c); - pcb_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); goto fail; }