Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30983) +++ trunk/src/librnd/core/conf.c (revision 30984) @@ -135,11 +135,11 @@ const char *ifn; if (fn_is_text) { - d = pcb_hid_cfg_load_str(fn); + d = rnd_hid_cfg_load_str(fn); ifn = ""; } else { - d = pcb_hid_cfg_load_lht(NULL, fn); + d = rnd_hid_cfg_load_lht(NULL, fn); ifn = fn; } @@ -177,11 +177,11 @@ rnd_file_loaded_del_at(flcat, role_name); } if (fn_is_text) { - d = pcb_hid_cfg_load_str(fn); + d = rnd_hid_cfg_load_str(fn); ifn = ""; } else { - d = pcb_hid_cfg_load_lht(NULL, fn); + d = rnd_hid_cfg_load_lht(NULL, fn); ifn = fn; } @@ -238,7 +238,7 @@ return 0; } - pcb_hid_cfg_error(d->root, "Root node must be one of li:pcb-rnd-conf-v1, ha:coraleda-project-v1 or ha:geda-project-v1\n"); + rnd_hid_cfg_error(d->root, "Root node must be one of li:pcb-rnd-conf-v1, ha:coraleda-project-v1 or ha:geda-project-v1\n"); if (d != NULL) lht_dom_uninit(d); @@ -406,7 +406,7 @@ rnd_conf_policy_t pol; if (len >= sizeof(tmp)) { - pcb_hid_cfg_error(root, "Invalid policy-prio '%s', subtree is ignored\n", root->name); + rnd_hid_cfg_error(root, "Invalid policy-prio '%s', subtree is ignored\n", root->name); return; } @@ -419,7 +419,7 @@ sprio++; p = strtol(sprio, &end, 10); if ((*end != '\0') || (p < 0)) { - pcb_hid_cfg_error(root, "Invalid prio in '%s', subtree is ignored\n", root->name); + rnd_hid_cfg_error(root, "Invalid prio in '%s', subtree is ignored\n", root->name); return; } } @@ -427,7 +427,7 @@ /* convert policy */ pol = rnd_conf_policy_parse(tmp); if (pol == RND_POL_invalid) { - pcb_hid_cfg_error(root, "Invalid policy in '%s', subtree is ignored\n", root->name); + rnd_hid_cfg_error(root, "Invalid policy in '%s', subtree is ignored\n", root->name); return; } @@ -530,7 +530,7 @@ dst->boolean[idx] = 0; return 0; } - pcb_hid_cfg_error(err_node, "Invalid boolean value: %s\n", text); + rnd_hid_cfg_error(err_node, "Invalid boolean value: %s\n", text); return -1; case RND_CFN_INTEGER: if ((text[0] == '0') && (text[1] == 'x')) { @@ -544,7 +544,7 @@ dst->integer[idx] = l; return 0; } - pcb_hid_cfg_error(err_node, "Invalid integer value: %s\n", text); + rnd_hid_cfg_error(err_node, "Invalid integer value: %s\n", text); return -1; case RND_CFN_REAL: d = strtod(text, &end); @@ -552,7 +552,7 @@ dst->real[idx] = d; return 0; } - pcb_hid_cfg_error(err_node, "Invalid numeric value: %s\n", text); + rnd_hid_cfg_error(err_node, "Invalid numeric value: %s\n", text); return -1; case RND_CFN_COORD: { @@ -559,19 +559,19 @@ rnd_bool succ; dst->coord[idx] = pcb_get_value(text, NULL, NULL, &succ); if (!succ) - pcb_hid_cfg_error(err_node, "Invalid numeric value (coordinate): %s\n", text); + rnd_hid_cfg_error(err_node, "Invalid numeric value (coordinate): %s\n", text); } break; case RND_CFN_UNIT: u = get_unit_struct(text); if (u == NULL) - pcb_hid_cfg_error(err_node, "Invalid unit: %s\n", text); + rnd_hid_cfg_error(err_node, "Invalid unit: %s\n", text); else dst->unit[idx] = u; break; case RND_CFN_COLOR: if (rnd_color_load_str(&dst->color[idx], text) != 0) { - pcb_hid_cfg_error(err_node, "Invalid color value: '%s'\n", text); + rnd_hid_cfg_error(err_node, "Invalid color value: '%s'\n", text); return -1; } break; @@ -588,7 +588,7 @@ return 0; if (dest->random_flags.read_only) { - pcb_hid_cfg_error(src, "WARNING: not going to overwrite read-only value %s from a config file\n", dest->hash_path); + rnd_hid_cfg_error(src, "WARNING: not going to overwrite read-only value %s from a config file\n", dest->hash_path); return 0; } @@ -662,7 +662,7 @@ } /*printf(" didx: %d / %d '%s'\n", didx, dest->array_size, s->data.text.value);*/ if (didx >= dest->array_size) { - pcb_hid_cfg_error(s, "Array is already full [%d] of [%d] ignored value: '%s' policy=%d\n", dest->used, dest->array_size, s->data.text.value, pol); + rnd_hid_cfg_error(s, "Array is already full [%d] of [%d] ignored value: '%s' policy=%d\n", dest->used, dest->array_size, s->data.text.value, pol); res = -1; break; } @@ -675,7 +675,7 @@ } } else { - pcb_hid_cfg_error(s, "List item (in an array) must be text\n"); + rnd_hid_cfg_error(s, "List item (in an array) must be text\n"); res = -1; } } @@ -728,7 +728,7 @@ } } else { - pcb_hid_cfg_error(s, "List item (on a list, prepend) must be text\n"); + rnd_hid_cfg_error(s, "List item (on a list, prepend) must be text\n"); res = -1; } } @@ -767,7 +767,7 @@ } } else { - pcb_hid_cfg_error(s, "List item (on a list) must be text\n"); + rnd_hid_cfg_error(s, "List item (on a list) must be text\n"); res = -1; } } @@ -824,7 +824,7 @@ break; } } - pcb_hid_cfg_error(n, "conf error: lht->bin conversion: can't find path '%s'\n(it may be an obsolete setting, check your lht)\n", path); + rnd_hid_cfg_error(n, "conf error: lht->bin conversion: can't find path '%s'\n(it may be an obsolete setting, check your lht)\n", path); } /* returns 1 if the config node should be ignored */ @@ -836,7 +836,7 @@ if (strncmp(path, i->name, i->len) == 0) { if (!i->warned) { i->warned = 1; - pcb_hid_cfg_error(n, "conf error: lht->bin conversion: path '%s' from board or project file\nis ignored (probably due to security considerations)\n", path); + rnd_hid_cfg_error(n, "conf error: lht->bin conversion: path '%s' from board or project file\nis ignored (probably due to security considerations)\n", path); } return 1; } @@ -876,7 +876,7 @@ else if (target->array_size > 1) res |= pcb_conf_merge_patch_array(target, n, default_prio, default_policy); else - pcb_hid_cfg_error(n, "Attempt to initialize a scalar with a list - this node should be a text node\n"); + rnd_hid_cfg_error(n, "Attempt to initialize a scalar with a list - this node should be a text node\n"); break; case LHT_SYMLINK: TODO("TODO") @@ -929,7 +929,7 @@ lht_dom_iterator_t it; if (root->type != LHT_HASH) { - pcb_hid_cfg_error(root, "patch root should be a hash\n"); + rnd_hid_cfg_error(root, "patch root should be a hash\n"); return -1; } Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 30983) +++ trunk/src/librnd/core/hid_cfg.c (revision 30984) @@ -53,7 +53,7 @@ return 1; } -lht_doc_t *pcb_hid_cfg_load_lht(rnd_hidlib_t *hidlib, const char *filename) +lht_doc_t *rnd_hid_cfg_load_lht(rnd_hidlib_t *hidlib, const char *filename) { FILE *f; lht_doc_t *doc; @@ -88,7 +88,7 @@ return doc; } -lht_doc_t *pcb_hid_cfg_load_str(const char *text) +lht_doc_t *rnd_hid_cfg_load_str(const char *text) { lht_doc_t *doc; int error = 0; @@ -117,19 +117,19 @@ return doc; } -const char *pcb_hid_cfg_text_value(lht_doc_t *doc, const char *path) +const char *rnd_hid_cfg_text_value(lht_doc_t *doc, const char *path) { lht_node_t *n = lht_tree_path(doc, "/", path, 1, NULL); if (n == NULL) return NULL; if (n->type != LHT_TEXT) { - pcb_hid_cfg_error(n, "Error: node %s should be a text node\n", path); + rnd_hid_cfg_error(n, "Error: node %s should be a text node\n", path); return NULL; } return n->data.text.value; } -rnd_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback) +rnd_hid_cfg_t *rnd_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback) { lht_doc_t *doc; rnd_hid_cfg_t *hr; @@ -154,7 +154,7 @@ if (doc == NULL) { char *end = *p + strlen(*p); sprintf(end, pcbhl_menu_name_fmt, fn); - doc = pcb_hid_cfg_load_lht(hidlib, *p); + doc = rnd_hid_cfg_load_lht(hidlib, *p); if (doc != NULL) rnd_file_loaded_set_at("menu", "HID main", *p, "main menu system"); } @@ -163,10 +163,10 @@ free(paths); } else - doc = pcb_hid_cfg_load_lht(hidlib, fn); + doc = rnd_hid_cfg_load_lht(hidlib, fn); if (doc == NULL) { - doc = pcb_hid_cfg_load_str(embedded_fallback); + doc = rnd_hid_cfg_load_str(embedded_fallback); rnd_file_loaded_set_at("menu", "HID main", "", "main menu system"); } if (doc == NULL) @@ -180,7 +180,7 @@ /************* "parsing" **************/ -lht_node_t *pcb_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx) +lht_node_t *rnd_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx) { lht_err_t err; lht_node_t *curr; @@ -254,12 +254,12 @@ return curr; } -lht_node_t *pcb_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path) +lht_node_t *rnd_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path) { - return pcb_hid_cfg_get_menu_at(hr, NULL, menu_path, NULL, NULL); + return rnd_hid_cfg_get_menu_at(hr, NULL, menu_path, NULL, NULL); } -void pcb_hid_cfg_extend_hash_nodev(lht_node_t *node, va_list ap) +void rnd_hid_cfg_extend_hash_nodev(lht_node_t *node, va_list ap) { for(;;) { char *cname, *cval; @@ -306,15 +306,15 @@ } } -void pcb_hid_cfg_extend_hash_node(lht_node_t *node, ...) +void rnd_hid_cfg_extend_hash_node(lht_node_t *node, ...) { va_list ap; va_start(ap, node); - pcb_hid_cfg_extend_hash_nodev(node, ap); + rnd_hid_cfg_extend_hash_nodev(node, ap); va_end(ap); } -lht_node_t *pcb_hid_cfg_create_hash_node(lht_node_t *parent, lht_node_t *ins_after, const char *name, ...) +lht_node_t *rnd_hid_cfg_create_hash_node(lht_node_t *parent, lht_node_t *ins_after, const char *name, ...) { lht_node_t *n; va_list ap; @@ -337,13 +337,13 @@ } va_start(ap, name); - pcb_hid_cfg_extend_hash_nodev(n, ap); + rnd_hid_cfg_extend_hash_nodev(n, ap); va_end(ap); return n; } -int pcb_hid_cfg_dfs(lht_node_t *parent, int (*cb)(void *ctx, lht_node_t *n), void *ctx) +int rnd_hid_cfg_dfs(lht_node_t *parent, int (*cb)(void *ctx, lht_node_t *n), void *ctx) { lht_dom_iterator_t it; lht_node_t *n; @@ -354,7 +354,7 @@ if (ret != 0) return ret; if (n->type != LHT_TEXT) { - ret = pcb_hid_cfg_dfs(n, cb, ctx); + ret = rnd_hid_cfg_dfs(n, cb, ctx); if (ret != 0) return ret; } @@ -362,7 +362,7 @@ return 0; } -void pcb_hid_cfg_error(const lht_node_t *node, const char *fmt, ...) +void rnd_hid_cfg_error(const lht_node_t *node, const char *fmt, ...) { char *end; va_list ap; @@ -398,7 +398,7 @@ } } -void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx) +void rnd_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx) { vtp0_t anchors; @@ -445,7 +445,7 @@ vtp0_uninit(&anchors); } -int pcb_hid_cfg_del_anchor_menus(lht_node_t *node, const char *cookie) +int rnd_hid_cfg_del_anchor_menus(lht_node_t *node, const char *cookie) { lht_node_t *nxt; Index: trunk/src/librnd/core/hid_cfg.h =================================================================== --- trunk/src/librnd/core/hid_cfg.h (revision 30983) +++ trunk/src/librnd/core/hid_cfg.h (revision 30984) @@ -26,8 +26,8 @@ /* Helpers for loading and handling lihata HID config files */ -#ifndef PCB_HID_CFG_H -#define PCB_HID_CFG_H +#ifndef RND_HID_CFG_H +#define RND_HID_CFG_H #include #include @@ -41,46 +41,46 @@ /* Search and load the menu res for hidname; if not found, parse embedded_fallback instead (if it is NULL, use the application default instead; for explicit empty embedded: use ""). Returns NULL on error */ -rnd_hid_cfg_t *pcb_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback); +rnd_hid_cfg_t *rnd_hid_cfg_load(rnd_hidlib_t *hidlib, const char *fn, int exact_fn, const char *embedded_fallback); /* Generic, low level lihata loader */ -lht_doc_t *pcb_hid_cfg_load_lht(rnd_hidlib_t *hidlib, const char *filename); -lht_doc_t *pcb_hid_cfg_load_str(const char *text); +lht_doc_t *rnd_hid_cfg_load_lht(rnd_hidlib_t *hidlib, const char *filename); +lht_doc_t *rnd_hid_cfg_load_str(const char *text); /* Generic, low level lihata text value fetch */ -const char *pcb_hid_cfg_text_value(lht_doc_t *doc, const char *path); +const char *rnd_hid_cfg_text_value(lht_doc_t *doc, const char *path); -lht_node_t *pcb_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path); -lht_node_t *pcb_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx); +lht_node_t *rnd_hid_cfg_get_menu(rnd_hid_cfg_t *hr, const char *menu_path); +lht_node_t *rnd_hid_cfg_get_menu_at(rnd_hid_cfg_t *hr, lht_node_t *at, const char *menu_path, lht_node_t *(*cb)(void *ctx, lht_node_t *node, const char *path, int rel_level), void *ctx); /* Create a new hash node under parent (optional) and create a flat subtree of text nodes from name,value varargs (NULL terminated). This is a shorthand for creating a menu item in a subtree list. If ins_after is not NULL and is under the same parent, the new menu is inserted after ins_after. */ -lht_node_t *pcb_hid_cfg_create_hash_node(lht_node_t *parent, lht_node_t *ins_after, const char *name, ...); +lht_node_t *rnd_hid_cfg_create_hash_node(lht_node_t *parent, lht_node_t *ins_after, const char *name, ...); /* Create a flat subtree of text nodes from name,value varargs (NULL terminated). This is a shorthand for creating a menu item in a subtree list. */ -void pcb_hid_cfg_extend_hash_node(lht_node_t *node, ...); -void pcb_hid_cfg_extend_hash_nodev(lht_node_t *node, va_list ap); +void rnd_hid_cfg_extend_hash_node(lht_node_t *node, ...); +void rnd_hid_cfg_extend_hash_nodev(lht_node_t *node, va_list ap); /* Search a subtree in depth-first-search manner. Call cb on each node as descending. If cb returns non-zero, stop the search and return that value. Do all this recursively. */ -int pcb_hid_cfg_dfs(lht_node_t *parent, int (*cb)(void *ctx, lht_node_t *n), void *ctx); +int rnd_hid_cfg_dfs(lht_node_t *parent, int (*cb)(void *ctx, lht_node_t *n), void *ctx); /* Report an error about a node */ -void pcb_hid_cfg_error(const lht_node_t *node, const char *fmt, ...); +void rnd_hid_cfg_error(const lht_node_t *node, const char *fmt, ...); /* search all instances of an @anchor menu in the currently active GUI and call cb on the lihata node; path has 128 extra bytes available at the end */ -void pcb_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx); +void rnd_hid_cfg_map_anchor_menus(const char *name, void (*cb)(void *ctx, rnd_hid_cfg_t *cfg, lht_node_t *n, char *path), void *ctx); /* remove all adjacent anchor menus with matching cookie below anode, the anchor node */ -int pcb_hid_cfg_del_anchor_menus(lht_node_t *anode, const char *cookie); +int rnd_hid_cfg_del_anchor_menus(lht_node_t *anode, const char *cookie); #endif Index: trunk/src/librnd/core/hid_cfg_input.c =================================================================== --- trunk/src/librnd/core/hid_cfg_input.c (revision 30983) +++ trunk/src/librnd/core/hid_cfg_input.c (revision 30984) @@ -124,7 +124,7 @@ { lht_node_t *btn, *m; - mouse->mouse = pcb_hid_cfg_get_menu(hr, "/mouse"); + mouse->mouse = rnd_hid_cfg_get_menu(hr, "/mouse"); if (mouse->mouse == NULL) { rnd_message(RND_MSG_ERROR, "Warning: no /mouse section in the resource file - mouse is disabled\n"); @@ -132,7 +132,7 @@ } if (mouse->mouse->type != LHT_LIST) { - pcb_hid_cfg_error(mouse->mouse, "Warning: should be a list - mouse is disabled\n"); + rnd_hid_cfg_error(mouse->mouse, "Warning: should be a list - mouse is disabled\n"); return -1; } @@ -144,11 +144,11 @@ for(btn = mouse->mouse->data.list.first; btn != NULL; btn = btn->next) { pcb_hid_cfg_mod_t btn_mask = button_name2mask(btn->name); if (btn_mask == 0) { - pcb_hid_cfg_error(btn, "unknown mouse button"); + rnd_hid_cfg_error(btn, "unknown mouse button"); continue; } if (btn->type != LHT_LIST) { - pcb_hid_cfg_error(btn, "needs to be a list"); + rnd_hid_cfg_error(btn, "needs to be a list"); continue; } for(m = btn->data.list.first; m != NULL; m = m->next) { Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30983) +++ trunk/src/librnd/pcb_compat.h (revision 30984) @@ -681,3 +681,16 @@ #define PCB_HIDEOF_USAGE RND_HIDEOF_USAGE #define PCB_HIDEOF_DAD RND_HIDEOF_DAD #define pcb_hid_export_opt_func_t rnd_hid_export_opt_func_t +#define pcb_hid_cfg_load rnd_hid_cfg_load +#define pcb_hid_cfg_load_lht rnd_hid_cfg_load_lht +#define pcb_hid_cfg_load_str rnd_hid_cfg_load_str +#define pcb_hid_cfg_text_value rnd_hid_cfg_text_value +#define pcb_hid_cfg_get_menu rnd_hid_cfg_get_menu +#define pcb_hid_cfg_get_menu_at rnd_hid_cfg_get_menu_at +#define pcb_hid_cfg_create_hash_node rnd_hid_cfg_create_hash_node +#define pcb_hid_cfg_extend_hash_node rnd_hid_cfg_extend_hash_node +#define pcb_hid_cfg_extend_hash_nodev rnd_hid_cfg_extend_hash_nodev +#define pcb_hid_cfg_dfs rnd_hid_cfg_dfs +#define pcb_hid_cfg_error rnd_hid_cfg_error +#define pcb_hid_cfg_map_anchor_menus rnd_hid_cfg_map_anchor_menus +#define pcb_hid_cfg_del_anchor_menus rnd_hid_cfg_del_anchor_menus Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 30983) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30984) @@ -228,7 +228,7 @@ if ((anode != NULL) && (knode != NULL)) pcb_hid_cfg_keys_add_by_desc(&lesstif_keymap, knode, anode); else - pcb_hid_cfg_error(node, "No action specified for key accel\n"); + rnd_hid_cfg_error(node, "No action specified for key accel\n"); } int lesstif_key_event(XKeyEvent * e) @@ -566,7 +566,7 @@ screen = DefaultScreen(display); cmap = DefaultColormap(display, screen); - lesstif_cfg = pcb_hid_cfg_load(ltf_hidlib, "lesstif", 0, NULL); + lesstif_cfg = rnd_hid_cfg_load(ltf_hidlib, "lesstif", 0, NULL); lesstif_hid.hid_cfg = lesstif_cfg; if (lesstif_cfg == NULL) { rnd_message(RND_MSG_ERROR, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); @@ -573,7 +573,7 @@ abort(); } - mr = pcb_hid_cfg_get_menu(lesstif_cfg, "/main_menu"); + mr = rnd_hid_cfg_get_menu(lesstif_cfg, "/main_menu"); if (mr != NULL) { if (mr->type == LHT_LIST) { lht_node_t *n; @@ -581,11 +581,11 @@ add_node_to_menu(mb, NULL, n, (XtCallbackProc) callback, 0); } else - pcb_hid_cfg_error(mr, "/main_menu should be a list"); + rnd_hid_cfg_error(mr, "/main_menu should be a list"); } htsp_init(<f_popups, strhash, strkeyeq); - mr = pcb_hid_cfg_get_menu(lesstif_cfg, "/popups"); + mr = rnd_hid_cfg_get_menu(lesstif_cfg, "/popups"); if (mr != NULL) { if (mr->type == LHT_LIST) { lht_node_t *n; @@ -617,7 +617,7 @@ } } else - pcb_hid_cfg_error(mr, "/popups should be a list"); + rnd_hid_cfg_error(mr, "/popups should be a list"); } @@ -629,7 +629,7 @@ int ltf_open_popup(rnd_hid_t *hid, const char *menupath) { menu_data_t *md; - lht_node_t *menu_node = pcb_hid_cfg_get_menu(lesstif_cfg, menupath); + lht_node_t *menu_node = rnd_hid_cfg_get_menu(lesstif_cfg, menupath); rnd_trace("ltf_open_popup: %s: %p\n", menupath, menu_node); Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30983) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30984) @@ -120,7 +120,7 @@ accel = pcb_hid_cfg_keys_gen_accel(&ghid_keymap, n_keydesc, 1, NULL); } else - pcb_hid_cfg_error(sub_res, "No action specified for key accel\n"); + rnd_hid_cfg_error(sub_res, "No action specified for key accel\n"); } /* Resolve menu name */ @@ -270,11 +270,11 @@ /* anchor; ignore */ } else - pcb_hid_cfg_error(base, "Unexpected text node; the only text accepted here is sep, -, or @"); + rnd_hid_cfg_error(base, "Unexpected text node; the only text accepted here is sep, -, or @"); } break; default: - pcb_hid_cfg_error(base, "Unexpected node type; should be hash (submenu) or text (separator or @special)"); + rnd_hid_cfg_error(base, "Unexpected node type; should be hash (submenu) or text (separator or @special)"); } } @@ -328,7 +328,7 @@ { lht_node_t *n; if (base->type != LHT_LIST) { - pcb_hid_cfg_error(base, "Menu description shall be a list (li)\n"); + rnd_hid_cfg_error(base, "Menu description shall be a list (li)\n"); abort(); } for (n = base->data.list.first; n != NULL; n = n->next) { @@ -343,7 +343,7 @@ submenu = pcb_hid_cfg_menu_field_path(base, "submenu"); if (submenu == NULL) { - pcb_hid_cfg_error(base, "can not create popup without submenu list"); + rnd_hid_cfg_error(base, "can not create popup without submenu list"); return; } @@ -469,13 +469,13 @@ menu->hidlib = hidlib; - *cfg_out = pcb_hid_cfg_load(menu->hidlib, "gtk", 0, NULL); + *cfg_out = rnd_hid_cfg_load(menu->hidlib, "gtk", 0, NULL); if (*cfg_out == NULL) { rnd_message(RND_MSG_ERROR, "FATAL: can't load the gtk menu res either from file or from hardwired default."); abort(); } - mr = pcb_hid_cfg_get_menu(*cfg_out, "/main_menu"); + mr = rnd_hid_cfg_get_menu(*cfg_out, "/main_menu"); if (mr != NULL) { menu_bar = ghid_main_menu_new(G_CALLBACK(ghid_menu_cb)); ghid_main_menu_add_node(menu, GHID_MAIN_MENU(menu_bar), mr); @@ -482,7 +482,7 @@ mr->doc->root->user_data = menu; } - mr = pcb_hid_cfg_get_menu(*cfg_out, "/popups"); + mr = rnd_hid_cfg_get_menu(*cfg_out, "/popups"); if (mr != NULL) { if (mr->type == LHT_LIST) { lht_node_t *n; @@ -490,11 +490,11 @@ ghid_main_menu_add_popup_node(menu, GHID_MAIN_MENU(menu_bar), n); } else - pcb_hid_cfg_error(mr, "/popups should be a list"); + rnd_hid_cfg_error(mr, "/popups should be a list"); mr->doc->root->user_data = menu; } - mr = pcb_hid_cfg_get_menu(*cfg_out, "/mouse"); + mr = rnd_hid_cfg_get_menu(*cfg_out, "/mouse"); if (hid_cfg_mouse_init(*cfg_out, &ghid_mouse) != 0) rnd_message(RND_MSG_ERROR, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30983) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30984) @@ -493,7 +493,7 @@ { pcb_gtk_t *gctx = hid->hid_data; GtkWidget *menu = NULL; - lht_node_t *menu_node = pcb_hid_cfg_get_menu(gctx->topwin.ghid_cfg, menupath); + lht_node_t *menu_node = rnd_hid_cfg_get_menu(gctx->topwin.ghid_cfg, menupath); if (menu_node == NULL) return 1; Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30983) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30984) @@ -68,7 +68,7 @@ props.update_on = "editor/grids_idx"; props.cookie = ANCH; - pcb_hid_cfg_del_anchor_menus(node, ANCH); + rnd_hid_cfg_del_anchor_menus(node, ANCH); /* prepare for appending the strings at the end of the path, "under" the anchor */ *end = '/'; @@ -87,7 +87,7 @@ void rnd_grid_install_menu(void) { - pcb_hid_cfg_map_anchor_menus(ANCH, grid_install_menu, NULL); + rnd_hid_cfg_map_anchor_menus(ANCH, grid_install_menu, NULL); } static int grid_lock = 0; Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30983) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30984) @@ -156,7 +156,7 @@ if (n == NULL) return NULL; if (n->type != LHT_TEXT) { - pcb_hid_cfg_error(submenu, "Error: field %s should be a text node\n", fldname); + rnd_hid_cfg_error(submenu, "Error: field %s should be a text node\n", fldname); return NULL; } return n->data.text.value; @@ -169,7 +169,7 @@ if (n == NULL) return 0; if (n->type != LHT_LIST) { - pcb_hid_cfg_error(submenu, "Error: field %s should be a list (of submenus)\n", fldname); + rnd_hid_cfg_error(submenu, "Error: field %s should be a list (of submenus)\n", fldname); return 0; } return 1; @@ -243,7 +243,7 @@ int pcb_hid_cfg_remove_menu(rnd_hid_cfg_t *hr, const char *path, int (*gui_remove)(void *ctx, lht_node_t *nd), void *ctx) { if (hr != NULL) { - lht_node_t *nd = pcb_hid_cfg_get_menu_at(hr, NULL, path, NULL, NULL); + lht_node_t *nd = rnd_hid_cfg_get_menu_at(hr, NULL, path, NULL, NULL); if (nd == NULL) return pcb_hid_cfg_remove_menu_cookie(hr, path, gui_remove, ctx, 0, hr->doc->root); @@ -284,7 +284,7 @@ for(end = name; *end == '/'; end++) ; end = strchr(end, '/'); *end = '\0'; - psub = cmc->parent = pcb_hid_cfg_get_menu(cmc->hr, name); + psub = cmc->parent = rnd_hid_cfg_get_menu(cmc->hr, name); free(name); } else @@ -291,12 +291,12 @@ psub = pcb_hid_cfg_menu_field(cmc->parent, PCB_MF_SUBMENU, NULL); if (rel_level == cmc->target_level) { - node = pcb_hid_cfg_create_hash_node(psub, cmc->after, name, "dyn", "1", "cookie", cmc->props->cookie, "a", cmc->props->accel, "tip", cmc->props->tip, "action", cmc->props->action, "checked", cmc->props->checked, "update_on", cmc->props->update_on, "foreground", cmc->props->foreground, "background", cmc->props->background, NULL); + node = rnd_hid_cfg_create_hash_node(psub, cmc->after, name, "dyn", "1", "cookie", cmc->props->cookie, "a", cmc->props->accel, "tip", cmc->props->tip, "action", cmc->props->action, "checked", cmc->props->checked, "update_on", cmc->props->update_on, "foreground", cmc->props->foreground, "background", cmc->props->background, NULL); if (node != NULL) cmc->err = 0; } else - node = pcb_hid_cfg_create_hash_node(psub, cmc->after, name, "dyn", "1", "cookie", cmc->props->cookie, NULL); + node = rnd_hid_cfg_create_hash_node(psub, cmc->after, name, "dyn", "1", "cookie", cmc->props->cookie, NULL); if (node == NULL) return NULL; @@ -362,7 +362,7 @@ } /* descend and visit each level, create missing levels */ - pcb_hid_cfg_get_menu_at(hr, NULL, path, create_menu_cb, &cmc); + rnd_hid_cfg_get_menu_at(hr, NULL, path, create_menu_cb, &cmc); } return cmc.err; Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30983) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30984) @@ -102,7 +102,7 @@ static void toolbar_create_static(rnd_hid_cfg_t *cfg) { - const lht_node_t *t, *ts = pcb_hid_cfg_get_menu(cfg, "/toolbar_static"); + const lht_node_t *t, *ts = rnd_hid_cfg_get_menu(cfg, "/toolbar_static"); if ((ts != NULL) && (ts->type == LHT_LIST)) { for(t = ts->data.list.first; t != NULL; t = t->next) { Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30983) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30984) @@ -65,7 +65,7 @@ props.update_on = ""; props.cookie = ctx->anch; - pcb_hid_cfg_del_anchor_menus(node, ctx->anch); + rnd_hid_cfg_del_anchor_menus(node, ctx->anch); /* prepare for appending the strings at the end of the path, "under" the anchor */ *end = '/'; @@ -192,7 +192,7 @@ pcb_layer_t *l; rnd_menu_prop_t keyprops; - pcb_hid_cfg_del_anchor_menus(node, ctx->anch); + rnd_hid_cfg_del_anchor_menus(node, ctx->anch); /* prepare for appending the strings at the end of the path, "under" the anchor */ *end = '/'; @@ -217,7 +217,7 @@ ctx.view = 0; ctx.anch = "@layerkeys"; - pcb_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu_key, &ctx); + rnd_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu_key, &ctx); } static int layer_menu_install_timer_active = 0; @@ -229,11 +229,11 @@ ctx.view = 1; ctx.anch = "@layerview"; - pcb_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu1, &ctx); + rnd_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu1, &ctx); ctx.view = 0; ctx.anch = "@layerpick"; - pcb_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu1, &ctx); + rnd_hid_cfg_map_anchor_menus(ctx.anch, layer_install_menu1, &ctx); layer_install_menu_keys(); layer_menu_install_timer_active = 0; Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30983) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30984) @@ -64,7 +64,7 @@ props.update_on = ""; props.cookie = ANCH; - pcb_hid_cfg_del_anchor_menus(node, ANCH); + rnd_hid_cfg_del_anchor_menus(node, ANCH); /* prepare for appending the strings at the end of the path, "under" the anchor */ *end = '/'; @@ -97,7 +97,7 @@ { if (rst_lock) return; rst_lock++; - pcb_hid_cfg_map_anchor_menus(ANCH, rst_install_menu, NULL); + rnd_hid_cfg_map_anchor_menus(ANCH, rst_install_menu, NULL); if (rst.sub_inited) { int n, target; Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 30983) +++ trunk/src_plugins/order/order.c (revision 30984) @@ -195,7 +195,7 @@ static void order_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { - pcb_hid_cfg_map_anchor_menus(ANCH, order_install_menu, NULL); + rnd_hid_cfg_map_anchor_menus(ANCH, order_install_menu, NULL); } int pplg_check_ver_order(int ver_needed) { return 0; } Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30983) +++ trunk/src_plugins/script/live_script.c (revision 30984) @@ -523,7 +523,7 @@ static void lvs_menu_init(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { - pcb_hid_cfg_map_anchor_menus(ANCH, lvs_install_menu, NULL); + rnd_hid_cfg_map_anchor_menus(ANCH, lvs_install_menu, NULL); } void pcb_live_script_init(void) Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 30983) +++ trunk/src_plugins/vendordrill/vendor.c (revision 30984) @@ -166,7 +166,7 @@ vendor_free_all(); /* load the resource file */ - doc = pcb_hid_cfg_load_lht(&PCB->hidlib, fname); + doc = rnd_hid_cfg_load_lht(&PCB->hidlib, fname); if (doc == NULL) { rnd_message(RND_MSG_ERROR, "Could not load vendor resource file \"%s\"\n", fname); RND_ACT_IRES(1); @@ -174,10 +174,10 @@ } /* figure out the vendor name, if specified */ - vendor_name = (char *) PCB_UNKNOWN(pcb_hid_cfg_text_value(doc, "vendor")); + vendor_name = (char *) PCB_UNKNOWN(rnd_hid_cfg_text_value(doc, "vendor")); /* figure out the units, if specified */ - sval = pcb_hid_cfg_text_value(doc, "/units"); + sval = rnd_hid_cfg_text_value(doc, "/units"); if (sval == NULL) { sf = PCB_MIL_TO_COORD(1); } @@ -197,7 +197,7 @@ /* default to ROUND_UP */ rounding_method = ROUND_UP; - sval = pcb_hid_cfg_text_value(doc, "/round"); + sval = rnd_hid_cfg_text_value(doc, "/round"); if (sval != NULL) { if (PCB_NSTRCMP(sval, "up") == 0) { rounding_method = ROUND_UP; @@ -220,7 +220,7 @@ lht_node_t *n; for(n = drlres->data.list.first; n != NULL; n = n->next) { if (n->type != LHT_TEXT) - pcb_hid_cfg_error(n, "Broken drillmap: /drillmap should contain text children only\n"); + rnd_hid_cfg_error(n, "Broken drillmap: /drillmap should contain text children only\n"); else add_to_drills(n->data.text.value); } @@ -231,37 +231,37 @@ else rnd_message(RND_MSG_ERROR, "No drillmap resource found\n"); - sval = pcb_hid_cfg_text_value(doc, "/drc/copper_space"); + sval = rnd_hid_cfg_text_value(doc, "/drc/copper_space"); if (sval != NULL) { load_meta_coord("design/bloat", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.bloat); } - sval = pcb_hid_cfg_text_value(doc, "/drc/copper_overlap"); + sval = rnd_hid_cfg_text_value(doc, "/drc/copper_overlap"); if (sval != NULL) { load_meta_coord("design/shrink", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum copper overlap to %ml mils\n", conf_core.design.shrink); } - sval = pcb_hid_cfg_text_value(doc, "/drc/copper_width"); + sval = rnd_hid_cfg_text_value(doc, "/drc/copper_width"); if (sval != NULL) { load_meta_coord("design/min_wid", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.min_wid); } - sval = pcb_hid_cfg_text_value(doc, "/drc/silk_width"); + sval = rnd_hid_cfg_text_value(doc, "/drc/silk_width"); if (sval != NULL) { load_meta_coord("design/min_slk", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum silk width to %ml mils\n", conf_core.design.min_slk); } - sval = pcb_hid_cfg_text_value(doc, "/drc/min_drill"); + sval = rnd_hid_cfg_text_value(doc, "/drc/min_drill"); if (sval != NULL) { load_meta_coord("design/min_drill", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum drill diameter to %ml mils\n", conf_core.design.min_drill); } - sval = pcb_hid_cfg_text_value(doc, "/drc/min_ring"); + sval = rnd_hid_cfg_text_value(doc, "/drc/min_ring"); if (sval != NULL) { load_meta_coord("design/min_ring", floor(sf * atof(sval) + 0.5)); rnd_message(RND_MSG_INFO, "Set DRC minimum annular ring to %ml mils\n", conf_core.design.min_ring); @@ -497,7 +497,7 @@ return; if (res->type != LHT_LIST) - pcb_hid_cfg_error(res, "skips must be a list.\n"); + rnd_hid_cfg_error(res, "skips must be a list.\n"); for(n = res->data.list.first; n != NULL; n = n->next) { if (n->type == LHT_TEXT) { @@ -514,7 +514,7 @@ lst = &ignore_descr; } else { - pcb_hid_cfg_error(n, "invalid skip name; must be one of refdes, value, descr"); + rnd_hid_cfg_error(n, "invalid skip name; must be one of refdes, value, descr"); continue; } /* add the entry to the appropriate list */ @@ -527,7 +527,7 @@ (*lst)[*cnt - 1] = rnd_strdup(sval); } else - pcb_hid_cfg_error(n, "invalid skip type; must be text"); + rnd_hid_cfg_error(n, "invalid skip type; must be text"); } }