Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 31004) +++ trunk/src/board.c (revision 31005) @@ -427,7 +427,7 @@ s = rnd_attribute_get(&grp->Attributes, "thickness"); curr = 0; if (s != NULL) - curr = pcb_get_value(s, NULL, NULL, NULL); + curr = rnd_get_value(s, NULL, NULL, NULL); if (curr <= 0) { if (grp->ltype & PCB_LYT_SUBSTRATE) { if (flags & PCB_BRDTHICK_PRINT_ERROR) { Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 31004) +++ trunk/src/buffer.c (revision 31005) @@ -1134,10 +1134,10 @@ y = pcb_crosshair.Y; } else if (argc == 4 || argc == 5) { - x = pcb_get_value(sbufnum, forces, &absolute, NULL); + x = rnd_get_value(sbufnum, forces, &absolute, NULL); if (!absolute) x += oldx; - y = pcb_get_value(fmt, forces, &absolute, NULL); + y = rnd_get_value(fmt, forces, &absolute, NULL); if (!absolute) y += oldy; } Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 31004) +++ trunk/src/change.c (revision 31005) @@ -830,18 +830,18 @@ goto subc_name; } } - name = rnd_hid_prompt_for(&PCB->hidlib, "Enter text:", PCB_EMPTY(((pcb_text_t *)obj)->TextString), "Change text"); + name = rnd_hid_prompt_for(&PCB->hidlib, "Enter text:", RND_EMPTY(((pcb_text_t *)obj)->TextString), "Change text"); break; case PCB_OBJ_SUBC: subc_name:; - name = rnd_hid_prompt_for(&PCB->hidlib, "Subcircuit refdes:", PCB_EMPTY(((pcb_subc_t *)obj)->refdes), "Change refdes"); + name = rnd_hid_prompt_for(&PCB->hidlib, "Subcircuit refdes:", RND_EMPTY(((pcb_subc_t *)obj)->refdes), "Change refdes"); break; default: term_name:; { - name = rnd_hid_prompt_for(&PCB->hidlib, "Enter terminal ID:", PCB_EMPTY(obj->term), "Change terminal ID"); + name = rnd_hid_prompt_for(&PCB->hidlib, "Enter terminal ID:", RND_EMPTY(obj->term), "Change terminal ID"); if (name != NULL) { pcb_term_undoable_rename(PCB, obj, name); pcb_draw(); Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 31004) +++ trunk/src/change_act.c (revision 31005) @@ -109,7 +109,7 @@ value *= 2; } else - value = 2 * pcb_get_value(delta, units, &absolute, NULL); + value = 2 * rnd_get_value(delta, units, &absolute, NULL); switch (pcb_funchash_get(function, NULL)) { case F_Object: { @@ -177,7 +177,7 @@ rnd_bool(*set_object) (int, void *, void *, void *); rnd_bool(*set_selected) (int); - if (PCB_NSTRCMP(flag_name, "join") == 0) { + if (RND_NSTRCMP(flag_name, "join") == 0) { /* Note: these are backwards, because the flag is "clear" but the command is "join". */ set_object = value ? pcb_clr_obj_join : pcb_set_obj_join; @@ -301,7 +301,7 @@ tostyle = 1; } else - value = pcb_get_value(delta, units, &absolute, NULL); + value = rnd_get_value(delta, units, &absolute, NULL); switch (funcid) { case F_Object: { @@ -395,7 +395,7 @@ absolute = 1; } else - value = pcb_get_value(delta, units, &absolute, NULL); + value = rnd_get_value(delta, units, &absolute, NULL); switch (pcb_funchash_get(function, NULL)) { case F_Object: @@ -441,12 +441,12 @@ PCB_SUBC_LOOP(PCB_ACT_BOARD->Data); { - if ((subc->refdes != NULL) && (PCB_NSTRCMP(refdes, subc->refdes) == 0)) { + if ((subc->refdes != NULL) && (RND_NSTRCMP(refdes, subc->refdes) == 0)) { pcb_any_obj_t *o; pcb_data_it_t it; for(o = pcb_data_first(&it, subc->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { - if ((o->term != NULL) && (PCB_NSTRCMP(pinnum, o->term) == 0)) { + if ((o->term != NULL) && (RND_NSTRCMP(pinnum, o->term) == 0)) { TODO(": make this undoable") rnd_attribute_put(&o->Attributes, "name", pinname); pcb_board_set_changed_flag(pcb_true); @@ -527,7 +527,7 @@ /* change the layout's name */ case F_Layout: - name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layout name:", PCB_EMPTY(RND_ACT_HIDLIB->name), "Layout name"); + name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layout name:", RND_EMPTY(RND_ACT_HIDLIB->name), "Layout name"); /* NB: ChangeLayoutName takes ownership of the passed memory */ if (name && pcb_board_change_name(name)) pcb_board_set_changed_flag(pcb_true); @@ -535,7 +535,7 @@ /* change the name of the active layer */ case F_Layer: - name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layer name:", PCB_EMPTY(PCB_CURRLAYER(PCB_ACT_BOARD)->name), "Layer name"); + name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layer name:", RND_EMPTY(PCB_CURRLAYER(PCB_ACT_BOARD)->name), "Layer name"); /* NB: pcb_layer_rename_ takes ownership of the passed memory */ if (name && (pcb_layer_rename_(PCB_CURRLAYER(PCB_ACT_BOARD), name, 1) == 0)) pcb_board_set_changed_flag(pcb_true); @@ -670,7 +670,7 @@ if (function && *function && style && *style) { rnd_bool absolute; - kind = pcb_get_value_ex(style, NULL, &absolute, NULL, NULL, NULL); + kind = rnd_get_value_ex(style, NULL, &absolute, NULL, NULL, NULL); if (absolute && (kind <= 5)) switch (pcb_funchash_get(function, NULL)) { case F_Object: @@ -770,7 +770,7 @@ RND_PCB_ACT_CONVARG(2, FGW_STR, SetValue, val = argv[2].val.str); rnd_PCB_ACT_MAY_CONVARG(3, FGW_STR, SetValue, units = argv[3].val.str); - value = pcb_get_value(val, units, &absolute, NULL); + value = rnd_get_value(val, units, &absolute, NULL); switch(fnc_id) { case F_LineSize: @@ -909,7 +909,7 @@ type = pcb_search_screen(x, y, PCB_CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3); } - value = pcb_get_value(delta, units, &absolute, NULL); + value = rnd_get_value(delta, units, &absolute, NULL); switch(funcid) { case F_Object: Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 31004) +++ trunk/src/crosshair.c (revision 31005) @@ -145,7 +145,7 @@ return; arc.X = pcb_crosshair.AttachedBox.Point1.X; arc.Y = pcb_crosshair.AttachedBox.Point1.Y; - if (PCB_XOR(pcb_crosshair.AttachedBox.otherway, coord_abs(wy) > coord_abs(wx))) { + if (RND_XOR(pcb_crosshair.AttachedBox.otherway, coord_abs(wy) > coord_abs(wx))) { arc.X = pcb_crosshair.AttachedBox.Point1.X + coord_abs(wy) * RND_SGNZ(wx); sa = (wx >= 0) ? 0 : 180; dir = (RND_SGNZ(wx) == RND_SGNZ(wy)) ? 90 : -90; Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 31004) +++ trunk/src/extobj_helper.h (revision 31005) @@ -50,7 +50,7 @@ rnd_bool succ; const char *s = rnd_attribute_get(&obj->Attributes, name); if (s != NULL) { - v = pcb_get_value(s, NULL, NULL, &succ); + v = rnd_get_value(s, NULL, NULL, &succ); if (succ) { *res = v; return 0; @@ -180,7 +180,7 @@ int wid; \ char *sval = rnd_attribute_get(&subc->Attributes, attr_name); \ if (sval != NULL) \ - pcb_get_value_unit(sval, NULL, 0, &d, &unit_out); \ + rnd_get_value_unit(sval, NULL, 0, &d, &unit_out); \ currval = d; \ RND_DAD_LABEL(dlg, vis_name); \ if (help != NULL) RND_DAD_HELP(dlg, help); \ Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 31004) +++ trunk/src/file_act.c (revision 31005) @@ -97,7 +97,7 @@ case F_Netlist: if (PCB->Netlistname) free(PCB->Netlistname); - PCB->Netlistname = pcb_strdup_strip_wspace(name); + PCB->Netlistname = rnd_strdup_strip_wspace(name); { int i; for (i = 0; i < PCB_NUM_NETLISTS; i++) { Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 31004) +++ trunk/src/find_geo.c (revision 31005) @@ -1189,7 +1189,7 @@ return pstk_shape_isc_circ_line(ctx, ps2, shape2, ps1, shape1); case PCB_PSSH_CIRC: { - double cdist2 = pcb_distance2(ps1->x + shape1->data.circ.x, ps1->y + shape1->data.circ.y, ps2->x + shape2->data.circ.x, ps2->y + shape2->data.circ.y); + double cdist2 = rnd_distance2(ps1->x + shape1->data.circ.x, ps1->y + shape1->data.circ.y, ps2->x + shape2->data.circ.x, ps2->y + shape2->data.circ.y); double dia = ((double)shape1->data.circ.dia + (double)shape2->data.circ.dia)/2.0; return cdist2 <= dia*dia; } Index: trunk/src/flag.c =================================================================== --- trunk/src/flag.c (revision 31004) +++ trunk/src/flag.c (revision 31005) @@ -54,7 +54,7 @@ return flag; } -int pcb_mem_any_set(unsigned char *ptr, int bytes) +int rnd_mem_any_set(unsigned char *ptr, int bytes) { while (bytes--) if (*ptr++) Index: trunk/src/flag.h =================================================================== --- trunk/src/flag.h (revision 31004) +++ trunk/src/flag.h (revision 31005) @@ -179,8 +179,8 @@ #define PCB_FLAG_SQUARE_ASSIGN(V,P) (P)->Flags.q = V /* Returns 1 if any of the bytes in arr is non-zero */ -int pcb_mem_any_set(unsigned char *arr, int arr_len); -#define PCB_FLAG_THERM_TEST_ANY(P) pcb_mem_any_set((P)->Flags.t, sizeof((P)->Flags.t)) +int rnd_mem_any_set(unsigned char *arr, int arr_len); +#define PCB_FLAG_THERM_TEST_ANY(P) rnd_mem_any_set((P)->Flags.t, sizeof((P)->Flags.t)) /*** Dynamic flags ***/ #define PCB_DFLAG_SET(flg, dynf) (flg)->df[(dynf) / sizeof(PCB_DYNFLAG_WORD)] |= (1 << (dynf) % sizeof(PCB_DYNFLAG_WORD)) Index: trunk/src/flag_str.c =================================================================== --- trunk/src/flag_str.c (revision 31004) +++ trunk/src/flag_str.c (revision 31005) @@ -92,7 +92,7 @@ #undef N #undef FN -const int pcb_object_flagbits_len = PCB_ENTRIES(pcb_object_flagbits); +const int pcb_object_flagbits_len = RND_ENTRIES(pcb_object_flagbits); /* List of old/obsolete flags to silently ignore on load */ static const char *old_flag_ignore[] = { "connected", NULL }; @@ -418,7 +418,7 @@ pcb_flag_t pcb_strflg_s2f(const char *flagstring, int (*error) (const char *msg), unsigned char *intconn, int compat) { - return pcb_strflg_common_s2f(flagstring, error, pcb_object_flagbits, PCB_ENTRIES(pcb_object_flagbits), intconn, compat); + return pcb_strflg_common_s2f(flagstring, error, pcb_object_flagbits, RND_ENTRIES(pcb_object_flagbits), intconn, compat); } char *pcb_strflg_common_f2s(pcb_flag_t flags, int object_type, pcb_flag_bits_t *flagbits, int n_flagbits, unsigned char *intconn, int compat) @@ -532,12 +532,12 @@ char *pcb_strflg_f2s(pcb_flag_t flags, int object_type, unsigned char *intconn, int compat) { - return pcb_strflg_common_f2s(flags, object_type, pcb_object_flagbits, PCB_ENTRIES(pcb_object_flagbits), intconn, compat); + return pcb_strflg_common_f2s(flags, object_type, pcb_object_flagbits, RND_ENTRIES(pcb_object_flagbits), intconn, compat); } const pcb_flag_bits_t *pcb_strflg_1bit(unsigned long bit, int object_type) { - int i, n_flagbits = PCB_ENTRIES(pcb_object_flagbits);; + int i, n_flagbits = RND_ENTRIES(pcb_object_flagbits);; for (i = 0; i < n_flagbits; i++) { unsigned long my_obj_typs = pcb_object_flagbits[i].object_types; if ((my_obj_typs & object_type) && (!pcb_object_flagbits[i].omit_list) && (pcb_object_flagbits[i].mask & bit)) @@ -548,7 +548,7 @@ const pcb_flag_bits_t *pcb_strflg_name(const char *name, int object_type) { - int i, n_flagbits = PCB_ENTRIES(pcb_object_flagbits);; + int i, n_flagbits = RND_ENTRIES(pcb_object_flagbits);; for (i = 0; i < n_flagbits; i++) { unsigned long my_obj_typs = pcb_object_flagbits[i].object_types; if ((my_obj_typs & object_type) && (!pcb_object_flagbits[i].omit_list) && (strcmp(pcb_object_flagbits[i].name, name) == 0)) @@ -559,7 +559,7 @@ void pcb_strflg_map(unsigned long fbits, int object_type, void *ctx, void (*cb)(void *ctx, unsigned long flg, const pcb_flag_bits_t *fb)) { - int n, i, n_flagbits = PCB_ENTRIES(pcb_object_flagbits); + int n, i, n_flagbits = RND_ENTRIES(pcb_object_flagbits); for(n = 0; n < 32; n++) { unsigned long bit = 1 << n; if (!(fbits & bit)) @@ -607,10 +607,10 @@ char *pcb_strflg_board_f2s(pcb_flag_t flags) { - return pcb_strflg_common_f2s(flags, PCB_OBJ_ANY, pcb_flagbits, PCB_ENTRIES(pcb_flagbits), NULL, 0); + return pcb_strflg_common_f2s(flags, PCB_OBJ_ANY, pcb_flagbits, RND_ENTRIES(pcb_flagbits), NULL, 0); } pcb_flag_t pcb_strflg_board_s2f(const char *flagstring, int (*error)(const char *msg)) { - return pcb_strflg_common_s2f(flagstring, error, pcb_flagbits, PCB_ENTRIES(pcb_flagbits), NULL, 0); + return pcb_strflg_common_s2f(flagstring, error, pcb_flagbits, RND_ENTRIES(pcb_flagbits), NULL, 0); } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 31004) +++ trunk/src/gui_act.c (revision 31005) @@ -363,8 +363,8 @@ RND_ACT_FAIL(Display); return FGW_ERR_ARG_CONV; } - RND_ACT_HIDLIB->grid_ox = pcb_get_value(argv[2].val.str, NULL, NULL, NULL); - RND_ACT_HIDLIB->grid_oy = pcb_get_value(argv[3].val.str, NULL, NULL, NULL); + RND_ACT_HIDLIB->grid_ox = rnd_get_value(argv[2].val.str, NULL, NULL, NULL); + RND_ACT_HIDLIB->grid_oy = rnd_get_value(argv[3].val.str, NULL, NULL, NULL); if (rnd_conf.editor.draw_grid) rnd_hid_redraw(PCB); } Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 31004) +++ trunk/src/hid_cam.c (revision 31005) @@ -282,7 +282,7 @@ goto err; } read_out_params(dst, &next); - dst->fn = pcb_str_strip(dst->inst); + dst->fn = rnd_str_strip(dst->inst); if (strchr(dst->fn, '%') != NULL) { dst->fn_template = dst->fn; @@ -307,7 +307,7 @@ goto err; } - curr = pcb_str_strip(curr); + curr = rnd_str_strip(curr); numg = pcb_layergrp_list_by_addr(pcb, curr, gids, spk, spv, spc, &vid, &xf, &xf_, "CAM rule: "); if (numg < 0) goto err; Index: trunk/src/layer_addr.c =================================================================== --- trunk/src/layer_addr.c (revision 31004) +++ trunk/src/layer_addr.c (revision 31005) @@ -65,7 +65,7 @@ *s = '\0'; if (*spc >= trmax) return pcb_parse_layergrp_err; - lasta = pcb_str_strip(lasta); + lasta = rnd_str_strip(lasta); spk[*spc] = lasta; eq = strchr(lasta, '='); if (eq != NULL) { @@ -148,7 +148,7 @@ *purpose = val; else if (strcmp(key, "bloat") == 0) { rnd_bool succ; - double v = pcb_get_value(val, NULL, NULL, &succ); + double v = rnd_get_value(val, NULL, NULL, &succ); if (succ) { if (xf_ != NULL) xf_->bloat = v; Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 31004) +++ trunk/src/librnd/core/actions.c (revision 31005) @@ -771,7 +771,7 @@ #define conv_str2coord(dst, src) \ do { \ rnd_bool succ; \ - dst = pcb_get_value_ex(src, NULL, NULL, NULL, fgw_str2coord_unit, &succ); \ + dst = rnd_get_value_ex(src, NULL, NULL, NULL, fgw_str2coord_unit, &succ); \ if (!succ) \ return -1; \ } while(0) @@ -820,7 +820,7 @@ #define conv_str2coords(dst, src) \ do { \ rnd_bool succ, abso; \ - dst.c[0] = pcb_get_value_ex(src, NULL, &abso, NULL, fgw_str2coord_unit, &succ); \ + dst.c[0] = rnd_get_value_ex(src, NULL, &abso, NULL, fgw_str2coord_unit, &succ); \ if (!succ) \ return -1; \ dst.len = 1; \ Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 31004) +++ trunk/src/librnd/core/compat_fs.c (revision 31005) @@ -160,7 +160,7 @@ sprintf(num, "%lu%lu", r1, r2); tmpdir = rnd_w32_cachedir; - res = pcb_concat(tmpdir, "/", num, NULL); + res = rnd_concat(tmpdir, "/", num, NULL); for(c = res; *c; c++) if (*c == '\\') *c = '/'; Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 31004) +++ trunk/src/librnd/core/conf.c (revision 31005) @@ -557,7 +557,7 @@ case RND_CFN_COORD: { rnd_bool succ; - dst->coord[idx] = pcb_get_value(text, NULL, NULL, &succ); + dst->coord[idx] = rnd_get_value(text, NULL, NULL, &succ); if (!succ) rnd_hid_cfg_error(err_node, "Invalid numeric value (coordinate): %s\n", text); } Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 31004) +++ trunk/src/librnd/core/conf_act.c (revision 31005) @@ -266,7 +266,7 @@ return 0; } - RND_ACT_IRES(RND_ACT_HIDLIB->grid == pcb_get_value_ex(dst, NULL, NULL, NULL, NULL, NULL)); + RND_ACT_IRES(RND_ACT_HIDLIB->grid == rnd_get_value_ex(dst, NULL, NULL, NULL, NULL, NULL)); return 0; } @@ -295,7 +295,7 @@ RND_ACT_IRES(0); - /* special case: can't convert with pcb_get_value() */ + /* special case: can't convert with rnd_get_value() */ if ((val[0] == '*') || (val[0] == '/')) { double d; char *end; @@ -313,7 +313,7 @@ return 0; } - value = pcb_get_value(val, units, &absolute, NULL); + value = rnd_get_value(val, units, &absolute, NULL); rnd_grid_inval(); if (absolute) Index: trunk/src/librnd/core/funchash.c =================================================================== --- trunk/src/librnd/core/funchash.c (revision 31004) +++ trunk/src/librnd/core/funchash.c (revision 31005) @@ -67,7 +67,7 @@ void pcb_funchash_init(void) { funchash = htpi_alloc(fh_hash, keyeq); - pcb_funchash_set_table(rnd_functions, PCB_ENTRIES(rnd_functions), NULL); + pcb_funchash_set_table(rnd_functions, RND_ENTRIES(rnd_functions), NULL); } void pcb_funchash_uninit(void) Index: trunk/src/librnd/core/grid.c =================================================================== --- trunk/src/librnd/core/grid.c (revision 31004) +++ trunk/src/librnd/core/grid.c (revision 31005) @@ -94,12 +94,12 @@ } /* convert */ - dst->size = pcb_get_value(size, NULL, NULL, &succ); + dst->size = rnd_get_value(size, NULL, NULL, &succ); if ((!succ) || (dst->size < 0)) goto error; if (ox != NULL) { - dst->ox = pcb_get_value(ox, NULL, NULL, &succ); + dst->ox = rnd_get_value(ox, NULL, NULL, &succ); if (!succ) goto error; } @@ -107,7 +107,7 @@ dst->ox = 0; if (oy != NULL) { - dst->oy = pcb_get_value(oy, NULL, NULL, &succ); + dst->oy = rnd_get_value(oy, NULL, NULL, &succ); if (!succ) goto error; } Index: trunk/src/librnd/core/gui_act.c =================================================================== --- trunk/src/librnd/core/gui_act.c (revision 31004) +++ trunk/src/librnd/core/gui_act.c (revision 31005) @@ -133,16 +133,16 @@ static fgw_error_t pcb_act_Cursor(fgw_arg_t *res, int argc, fgw_arg_t *argv) { rnd_hidlib_t *hidlib = RND_ACT_HIDLIB; - pcb_unit_list_t extra_units_x = { + rnd_unit_list_t extra_units_x = { {"grid", 0, 0}, - {"view", 0, PCB_UNIT_PERCENT}, - {"board", 0, PCB_UNIT_PERCENT}, + {"view", 0, RND_UNIT_PERCENT}, + {"board", 0, RND_UNIT_PERCENT}, {"", 0, 0} }; - pcb_unit_list_t extra_units_y = { + rnd_unit_list_t extra_units_y = { {"grid", 0, 0}, - {"view", 0, PCB_UNIT_PERCENT}, - {"board", 0, PCB_UNIT_PERCENT}, + {"view", 0, RND_UNIT_PERCENT}, + {"board", 0, RND_UNIT_PERCENT}, {"", 0, 0} }; int pan_warp = HID_SC_DO_NOTHING; @@ -186,8 +186,8 @@ dy = strtod(a2, &end) * rnd_conf.editor.grid; } else { - dx = pcb_get_value_ex(a1, a3, NULL, extra_units_x, "", NULL); - dy = pcb_get_value_ex(a2, a3, NULL, extra_units_y, "", NULL); + dx = rnd_get_value_ex(a1, a3, NULL, extra_units_x, "", NULL); + dy = rnd_get_value_ex(a2, a3, NULL, extra_units_y, "", NULL); } if (rnd_strcasecmp(a3, "view") == 0) { Index: trunk/src/librnd/core/hid_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 31004) +++ trunk/src/librnd/core/hid_attrib.c (revision 31005) @@ -107,7 +107,7 @@ break; case RND_HATT_STRING: if (a->value) - *(const char **) a->value = rnd_strdup(PCB_EMPTY(a->default_val.str)); + *(const char **) a->value = rnd_strdup(RND_EMPTY(a->default_val.str)); break; case RND_HATT_ENUM: if (a->value) @@ -152,9 +152,9 @@ break; case RND_HATT_COORD: if (a->value) - *(rnd_coord_t *) a->value = pcb_get_value((*argv)[1], NULL, NULL, NULL); + *(rnd_coord_t *) a->value = rnd_get_value((*argv)[1], NULL, NULL, NULL); else - a->default_val.crd = pcb_get_value((*argv)[1], NULL, NULL, NULL); + a->default_val.crd = rnd_get_value((*argv)[1], NULL, NULL, NULL); (*argc)--; (*argv)++; break; @@ -168,9 +168,9 @@ break; case RND_HATT_STRING: if (a->value) - *(char **) a->value = rnd_strdup(PCB_EMPTY((*argv)[1])); + *(char **) a->value = rnd_strdup(RND_EMPTY((*argv)[1])); else - a->default_val.str = rnd_strdup(PCB_EMPTY((*argv)[1])); + a->default_val.str = rnd_strdup(RND_EMPTY((*argv)[1])); (*argc)--; (*argv)++; break; Index: trunk/src/librnd/core/hid_dad_spin.c =================================================================== --- trunk/src/librnd/core/hid_dad_spin.c (revision 31004) +++ trunk/src/librnd/core/hid_dad_spin.c (revision 31005) @@ -273,7 +273,7 @@ if (spin->unit == NULL) { rnd_bool succ = 0; if (str->val.str != NULL) - succ = pcb_get_value_unit(str->val.str, NULL, 0, &v, &unit); + succ = rnd_get_value_unit(str->val.str, NULL, 0, &v, &unit); if (!succ) { v = end->val.crd; unit = rnd_conf.editor.grid_unit; @@ -392,7 +392,7 @@ end->val.dbl = d; break; case RND_DAD_SPIN_COORD: - succ = pcb_get_value_unit(str->val.str, &absolute, 0, &d, &unit); + succ = rnd_get_value_unit(str->val.str, &absolute, 0, &d, &unit); if (succ) { SPIN_CLAMP(d); end->val.crd = d; @@ -433,7 +433,7 @@ while(isspace(*inval)) inval++; if (*inval == '\0') inval = "0"; - succ = pcb_get_value_unit(inval, &absolute, 0, &d, &unit); + succ = rnd_get_value_unit(inval, &absolute, 0, &d, &unit); if (succ) break; strtod(inval, &ends); @@ -440,7 +440,7 @@ while(isspace(*ends)) ends++; if (*ends == '\0') { rnd_hid_attr_val_t hv; - char *tmp = pcb_concat(inval, " ", rnd_conf.editor.grid_unit->suffix, NULL); + char *tmp = rnd_concat(inval, " ", rnd_conf.editor.grid_unit->suffix, NULL); changed = 1; hv.str = tmp; @@ -447,7 +447,7 @@ spin->set_writeback_lock++; rnd_gui->attr_dlg_set_value(hid_ctx, spin->wstr, &hv); spin->set_writeback_lock--; - succ = pcb_get_value_unit(str->val.str, &absolute, 0, &d, &unit); + succ = rnd_get_value_unit(str->val.str, &absolute, 0, &d, &unit); if (succ) { end->val.crd = d; spin->last_good_crd = d; Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 31004) +++ trunk/src/librnd/core/hid_init.c (revision 31005) @@ -90,34 +90,34 @@ rnd_render = rnd_gui = rnd_hid_nogui_get_hid(); TODO("make this configurable - add to conf_board_ignores avoid plugin injection") - tmp = pcb_concat(rnd_conf.rc.path.exec_prefix, RND_DIR_SEPARATOR_S, "lib", RND_DIR_SEPARATOR_S, "pcb-rnd", RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = rnd_concat(rnd_conf.rc.path.exec_prefix, RND_DIR_SEPARATOR_S, "lib", RND_DIR_SEPARATOR_S, "pcb-rnd", RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); - tmp = pcb_concat(rnd_conf.rc.path.exec_prefix, RND_DIR_SEPARATOR_S, "lib", RND_DIR_SEPARATOR_S, "pcb-rnd", RND_DIR_SEPARATOR_S, "plugins", NULL); + tmp = rnd_concat(rnd_conf.rc.path.exec_prefix, RND_DIR_SEPARATOR_S, "lib", RND_DIR_SEPARATOR_S, "pcb-rnd", RND_DIR_SEPARATOR_S, "plugins", NULL); pcb_plugin_add_dir(tmp); free(tmp); /* hardwired libdir, just in case exec-prefix goes wrong (e.g. linstall) */ - tmp = pcb_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = rnd_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); - tmp = pcb_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); + tmp = rnd_concat(rnd_conf_lib_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); pcb_plugin_add_dir(tmp); free(tmp); /* rnd_conf.rc.path.home is set by the conf_core immediately on startup */ if (rnd_conf.rc.path.home != NULL) { - tmp = pcb_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = rnd_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); - tmp = pcb_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); + tmp = rnd_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, rnd_conf_dot_dir, RND_DIR_SEPARATOR_S, "plugins", NULL); pcb_plugin_add_dir(tmp); free(tmp); } - tmp = pcb_concat("plugins", RND_DIR_SEPARATOR_S, HOST, NULL); + tmp = rnd_concat("plugins", RND_DIR_SEPARATOR_S, HOST, NULL); pcb_plugin_add_dir(tmp); free(tmp); @@ -502,10 +502,10 @@ rnd_w32_bindir = rnd_strdup(exedir); truncdir(exedir); rnd_w32_root = rnd_strdup(exedir); - rnd_w32_libdir = pcb_concat(exedir, "/lib/pcb-rnd", NULL); - rnd_w32_sharedir = pcb_concat(exedir, "/share/pcb-rnd", NULL); + rnd_w32_libdir = rnd_concat(exedir, "/lib/pcb-rnd", NULL); + rnd_w32_sharedir = rnd_concat(exedir, "/share/pcb-rnd", NULL); - rnd_w32_cachedir = pcb_concat(rnd_w32_root, "/cache", NULL); + rnd_w32_cachedir = rnd_concat(rnd_w32_root, "/cache", NULL); pcb_mkdir_(rnd_w32_cachedir, 0755); /* printf("WIN32 root='%s' libdir='%s' sharedir='%s'\n", rnd_w32_root, rnd_w32_libdir, rnd_w32_sharedir);*/ Index: trunk/src/librnd/core/misc_util.c =================================================================== --- trunk/src/librnd/core/misc_util.c (revision 31004) +++ trunk/src/librnd/core/misc_util.c (revision 31005) @@ -50,10 +50,10 @@ return sqrt(delta_x * delta_x + delta_y * delta_y); } -/* pcb_distance2() should be used so that there is only one +/* rnd_distance2() should be used so that there is only one * place to deal with overflow/precision errors */ -double pcb_distance2(double x1, double y1, double x2, double y2) +double rnd_distance2(double x1, double y1, double x2, double y2) { double delta_x = (x2 - x1); double delta_y = (y2 - y1); @@ -60,12 +60,12 @@ return delta_x * delta_x + delta_y * delta_y; } -double pcb_get_value(const char *val, const char *units, rnd_bool * absolute, rnd_bool *success) +double rnd_get_value(const char *val, const char *units, rnd_bool * absolute, rnd_bool *success) { - return pcb_get_value_ex(val, units, absolute, NULL, "cmil", success); + return rnd_get_value_ex(val, units, absolute, NULL, "cmil", success); } -rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out) +rnd_bool rnd_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out) { int ul, ulo = 0; const char *start; @@ -102,7 +102,7 @@ rnd_bool succ; double crd; - crd = pcb_get_value(val, unit, NULL, &succ); + crd = rnd_get_value(val, unit, NULL, &succ); if (succ) { *val_out = crd; *unit_out = u; @@ -118,7 +118,7 @@ } -double pcb_get_value_ex(const char *val, const char *units, rnd_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, rnd_bool *success) +double rnd_get_value_ex(const char *val, const char *units, rnd_bool * absolute, rnd_unit_list_t extra_units, const char *default_unit, rnd_bool *success) { double value; int n = -1; @@ -165,7 +165,7 @@ for (i = 0; *extra_units[i].suffix; ++i) { if (strncmp(units, extra_units[i].suffix, strlen(extra_units[i].suffix)) == 0) { value *= extra_units[i].scale; - if (extra_units[i].flags & PCB_UNIT_PERCENT) + if (extra_units[i].flags & RND_UNIT_PERCENT) value /= 100.0; scaled = 1; unit_ok = 1; @@ -184,7 +184,7 @@ for (i = 0; *extra_units[i].suffix; ++i) if (strcmp(extra_units[i].suffix, default_unit) == 0) { value *= extra_units[i].scale; - if (extra_units[i].flags & PCB_UNIT_PERCENT) + if (extra_units[i].flags & RND_UNIT_PERCENT) value /= 100.0; scaled = 1; } @@ -202,7 +202,7 @@ return 0; } -char *pcb_concat(const char *first, ...) +char *rnd_concat(const char *first, ...) { gds_t buf; va_list a; @@ -221,7 +221,7 @@ * returns a pointer to the new 'duped' one or NULL if the old one * holds only white space characters */ -char *pcb_strdup_strip_wspace(const char *S) +char *rnd_strdup_strip_wspace(const char *S) { const char *p1, *p2; char *copy; @@ -248,7 +248,7 @@ return NULL; } -char *pcb_text_wrap(char *inp, int len, int sep, int nonsep) +char *rnd_text_wrap(char *inp, int len, int sep, int nonsep) { int cnt; char *s, *lastspc = NULL; @@ -266,7 +266,7 @@ return inp; } -char *pcb_str_strip(char *s) +char *rnd_str_strip(char *s) { char *end; while(isspace(*s)) s++; Index: trunk/src/librnd/core/misc_util.h =================================================================== --- trunk/src/librnd/core/misc_util.h (revision 31004) +++ trunk/src/librnd/core/misc_util.h (revision 31005) @@ -28,53 +28,53 @@ /* misc - independent of PCB data types */ -#ifndef PCB_MISC_UTIL_H -#define PCB_MISC_UTIL_H +#ifndef RND_MISC_UTIL_H +#define RND_MISC_UTIL_H #include #include double rnd_distance(double x1, double y1, double x2, double y2); -double pcb_distance2(double x1, double y1, double x2, double y2); /* distance square */ +double rnd_distance2(double x1, double y1, double x2, double y2); /* distance square */ -enum pcb_unit_flags_e { PCB_UNIT_PERCENT = 1 }; +enum rnd_unit_flags_e { RND_UNIT_PERCENT = 1 }; typedef struct { const char *suffix; double scale; - enum pcb_unit_flags_e flags; -} pcb_unit_list_t[]; + enum rnd_unit_flags_e flags; +} rnd_unit_list_t[]; /* Convert string to coords; if units is not NULL, it's the caller supplied unit string; absolute is set to false if non-NULL and val starts with + or -. success indicates whether the conversion was successful. */ -double pcb_get_value(const char *val, const char *units, rnd_bool *absolute, rnd_bool *success); -double pcb_get_value_ex(const char *val, const char *units, rnd_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, rnd_bool *success); +double rnd_get_value(const char *val, const char *units, rnd_bool *absolute, rnd_bool *success); +double rnd_get_value_ex(const char *val, const char *units, rnd_bool * absolute, rnd_unit_list_t extra_units, const char *default_unit, rnd_bool *success); /* Convert a string of value+unit to coords and unit struct. Absolute is the same as above; if unit_strict is non-zero, require full unit name. Returns whether the conversion is succesful. */ -rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out); +rnd_bool rnd_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const rnd_unit_t **unit_out); -char *pcb_concat(const char *first, ...); /* end with NULL */ -int pcb_mem_any_set(unsigned char *ptr, int bytes); +char *rnd_concat(const char *first, ...); /* end with NULL */ +int rnd_mem_any_set(unsigned char *ptr, int bytes); -char *pcb_strdup_strip_wspace(const char *S); +char *rnd_strdup_strip_wspace(const char *S); /* Wrap text so that each segment is at most len characters long. Insert sep character to break the string into segments. If nonsep >= 0, replace original sep chaarcters with nonsep. */ -char *pcb_text_wrap(char *inp, int len, int sep, int nonsep); +char *rnd_text_wrap(char *inp, int len, int sep, int nonsep); /* remove leading and trailing whitespace */ -char *pcb_str_strip(char *s); +char *rnd_str_strip(char *s); -#define PCB_ENTRIES(x) (sizeof((x))/sizeof((x)[0])) -#define PCB_UNKNOWN(a) ((a) && *(a) ? (a) : "(unknown)") -#define PCB_NSTRCMP(a, b) ((a) ? ((b) ? strcmp((a),(b)) : 1) : -1) -#define PCB_EMPTY(a) ((a) ? (a) : "") -#define PCB_EMPTY_STRING_P(a) ((a) ? (a)[0]==0 : 1) -#define PCB_XOR(a,b) (((a) && !(b)) || (!(a) && (b))) +#define RND_ENTRIES(x) (sizeof((x))/sizeof((x)[0])) +#define RND_UNKNOWN(a) ((a) && *(a) ? (a) : "(unknown)") +#define RND_NSTRCMP(a, b) ((a) ? ((b) ? strcmp((a),(b)) : 1) : -1) +#define RND_EMPTY(a) ((a) ? (a) : "") +#define RND_EMPTY_STRING_P(a) ((a) ? (a)[0]==0 : 1) +#define RND_XOR(a,b) (((a) && !(b)) || (!(a) && (b))) #define rnd_swap(type,a,b) \ do { \ Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 31004) +++ trunk/src/librnd/pcb_compat.h (revision 31005) @@ -989,3 +989,21 @@ #define PCB_MAKE_MAX RND_MAKE_MAX #define PCB_SWAP_SIGN_X RND_SWAP_SIGN_X #define PCB_SWAP_SIGN_Y RND_SWAP_SIGN_Y +#define pcb_distance2 rnd_distance2 +#define pcb_unit_flags_e rnd_unit_flags_e +#define pcb_unit_list_t rnd_unit_list_t +#define PCB_UNIT_PERCENT RND_UNIT_PERCENT +#define pcb_get_value rnd_get_value +#define pcb_get_value_ex rnd_get_value_ex +#define pcb_get_value_unit rnd_get_value_unit +#define pcb_concat rnd_concat +#define pcb_mem_any_set rnd_mem_any_set +#define pcb_strdup_strip_wspace rnd_strdup_strip_wspace +#define pcb_text_wrap rnd_text_wrap +#define pcb_str_strip rnd_str_strip +#define PCB_ENTRIES RND_ENTRIES +#define PCB_UNKNOWN RND_UNKNOWN +#define PCB_NSTRCMP RND_NSTRCMP +#define PCB_EMPTY RND_EMPTY +#define PCB_EMPTY_STRING_P RND_EMPTY_STRING_P +#define PCB_XOR RND_XOR Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 31004) +++ trunk/src/main.c (revision 31005) @@ -176,7 +176,7 @@ sprintf(exec_prefix, "%s%s%s", bindir, RND_DIR_SEPARATOR_S, BINDIR_TO_EXECPREFIX); /* export the most important paths and data for child processes (e.g. parametric footprints) */ - tmp = pcb_concat(PCBSHAREDIR, "/pcblib", NULL); + tmp = rnd_concat(PCBSHAREDIR, "/pcblib", NULL); se |= rnd_setenv("PCB_RND_VERSION", PCB_VERSION, 1); se |= rnd_setenv("PCB_RND_REVISION", PCB_REVISION, 1); se |= rnd_setenv("PCB_RND_PCBLIB", tmp, 1); @@ -190,13 +190,13 @@ rnd_menu_file_paths[0] = "./"; rnd_menu_file_paths[1] = "~/.pcb-rnd/"; - rnd_menu_file_paths[2] = pcb_concat(PCBCONFDIR, "/", NULL); + rnd_menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL); rnd_menu_file_paths[3] = NULL; rnd_conf_userdir_path = CONF_USER_DIR; - rnd_pcphl_conf_user_path = pcb_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); + rnd_pcphl_conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); rnd_conf_sysdir_path = PCBCONFDIR; - rnd_conf_sys_path = pcb_concat(PCBCONFDIR, "/pcb-conf.lht", NULL); + rnd_conf_sys_path = rnd_concat(PCBCONFDIR, "/pcb-conf.lht", NULL); free(bindir); return exec_prefix; @@ -451,7 +451,7 @@ srand(time(NULL)); /* Set seed for rand() */ - pcb_funchash_set_table(Functions, PCB_ENTRIES(Functions), NULL); + pcb_funchash_set_table(Functions, RND_ENTRIES(Functions), NULL); pcb_polygon_init(); /* Register a function to be called when the program terminates. This makes Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 31004) +++ trunk/src/netlist.c (revision 31005) @@ -519,9 +519,9 @@ return 1; } if (order > 0) - key = pcb_concat(net1->name, "-", net2->name, NULL); + key = rnd_concat(net1->name, "-", net2->name, NULL); else - key = pcb_concat(net2->name, "-", net1->name, NULL); + key = rnd_concat(net2->name, "-", net1->name, NULL); if (htsp_has(&sctx->found, key)) { free(key); @@ -1039,7 +1039,7 @@ pcb_net_term_get(target_net, sc1->refdes, o1->term, PCB_NETA_ALLOC_UNDOABLE); new_len = pcb_termlist_length(&target_net->conns); if (new_len != old_len) { - id = pcb_concat(sc1->refdes, "-", o1->term, NULL); + id = rnd_concat(sc1->refdes, "-", o1->term, NULL); pcb_ratspatch_append(pcb, RATP_ADD_CONN, id, target_net->name, NULL, 1); free(id); } @@ -1048,7 +1048,7 @@ pcb_net_term_get(target_net, sc2->refdes, o2->term, PCB_NETA_ALLOC_UNDOABLE); new_len = pcb_termlist_length(&target_net->conns); if (new_len != old_len) { - id = pcb_concat(sc2->refdes, "-", o2->term, NULL); + id = rnd_concat(sc2->refdes, "-", o2->term, NULL); pcb_ratspatch_append(pcb, RATP_ADD_CONN, id, target_net->name, NULL, 1); free(id); } Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 31004) +++ trunk/src/obj_line_drcenf.c (revision 31005) @@ -494,7 +494,7 @@ /* shift forces the line lookahead path to refract the alternate way */ shift = rnd_gui->shift_is_pressed(rnd_gui); - if (PCB_XOR(r1 > r2, shift)) { + if (RND_XOR(r1 > r2, shift)) { if (conf_core.editor.line_refraction != 0) { if (shift) { if (conf_core.editor.line_refraction !=2) Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 31004) +++ trunk/src/obj_subc.c (revision 31005) @@ -458,7 +458,7 @@ if (smask != NULL) { rnd_bool success; - mask = pcb_get_value_ex(smask, NULL, NULL, NULL, "mm", &success); + mask = rnd_get_value_ex(smask, NULL, NULL, NULL, "mm", &success); if (!success) mask = 0; } @@ -2142,7 +2142,7 @@ TODO("subc: hierarchy") PCB_SUBC_LOOP(base); { - if ((subc->refdes != NULL) && (PCB_NSTRCMP(subc->refdes, name) == 0)) + if ((subc->refdes != NULL) && (RND_NSTRCMP(subc->refdes, name) == 0)) return subc; } PCB_END_LOOP; Index: trunk/src/obj_term.c =================================================================== --- trunk/src/obj_term.c (revision 31004) +++ trunk/src/obj_term.c (revision 31005) @@ -262,7 +262,7 @@ #define CHECK_TERM_LY(ob) \ do { \ - if (PCB_NSTRCMP(term_name, ob->term) == 0) { \ + if (RND_NSTRCMP(term_name, ob->term) == 0) { \ if (parent_out != NULL) *parent_out = subc; \ if (gid_out != NULL) *gid_out = pcb_layer_get_group_(layer); \ return (pcb_any_obj_t *)ob; \ @@ -271,7 +271,7 @@ #define CHECK_TERM_GL(ob) \ do { \ - if (PCB_NSTRCMP(term_name, ob->term) == 0) { \ + if (RND_NSTRCMP(term_name, ob->term) == 0) { \ if (parent_out != NULL) *parent_out = subc; \ if (gid_out != NULL) { \ *gid_out = -1; \ Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 31004) +++ trunk/src/object_act.c (revision 31005) @@ -403,7 +403,7 @@ const char *as = rnd_attrib_get(pcb, name); if (!as) return def; - return pcb_get_value(as, NULL, NULL, NULL); + return rnd_get_value(as, NULL, NULL, NULL); } static int subc_differs(pcb_subc_t *sc, const char *expect_name) @@ -559,7 +559,7 @@ break; case PLC_LIST: { - pcb_view_t *v = pcb_view_new(&plc->pcb->hidlib, "removal", PCB_UNKNOWN(sc->refdes), "This part is not present on the new netlist"); + pcb_view_t *v = pcb_view_new(&plc->pcb->hidlib, "removal", RND_UNKNOWN(sc->refdes), "This part is not present on the new netlist"); pcb_view_append_obj(v, 0, (pcb_any_obj_t *)sc); pcb_view_set_bbox_by_objs(plc->pcb->Data, v); pcb_view_list_append(plc->remlst, v); @@ -617,7 +617,7 @@ if (PCB_FLAG_TEST(PCB_FLAG_FOUND, subc)) { PCB_FLAG_CLEAR(PCB_FLAG_FOUND, subc); } - else if (!PCB_EMPTY_STRING_P(subc->refdes) && (!PCB_FLAG_TEST(PCB_FLAG_NONETLIST, subc))) { + else if (!RND_EMPTY_STRING_P(subc->refdes) && (!PCB_FLAG_TEST(PCB_FLAG_NONETLIST, subc))) { /* Unnamed elements should remain untouched */ plc_remove(&plc, subc); } @@ -941,7 +941,7 @@ delta = function; flags = 0; } - value = 2 * pcb_get_value(delta, units, &absolute, NULL); + value = 2 * rnd_get_value(delta, units, &absolute, NULL); pcb_undo_save_serial(); minclr(pcb->Data, value, flags); Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 31004) +++ trunk/src/plug_io.c (revision 31005) @@ -652,7 +652,7 @@ static gds_t command; const char *save_cmd; - if (PCB_EMPTY_STRING_P(conf_core.rc.save_command)) + if (RND_EMPTY_STRING_P(conf_core.rc.save_command)) return pcb_write_pcb_file(Filename, thePcb, fmt, pcb_false, subc_only, subc_idx, askovr); save_cmd = conf_core.rc.save_command; Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 31004) +++ trunk/src/rats_patch.c (revision 31005) @@ -122,7 +122,7 @@ static void undo_ratspatch_append_print(void *udata, char *dst, size_t dst_len) { undo_ratspatch_append_t *a = udata; - pcb_snprintf(dst, dst_len, "ratspatch_append: op=%d '%s' '%s' '%s' (used by attr: %d)", a->op, PCB_EMPTY(a->id), PCB_EMPTY(a->a1), PCB_EMPTY(a->a2), a->used_by_attr); + pcb_snprintf(dst, dst_len, "ratspatch_append: op=%d '%s' '%s' '%s' (used by attr: %d)", a->op, RND_EMPTY(a->id), RND_EMPTY(a->a1), RND_EMPTY(a->a2), a->used_by_attr); } static void undo_ratspatch_append_free(void *udata) @@ -349,7 +349,7 @@ htsp_set(seen, n->arg1.net_name, net); cb(ctx, PCB_RPE_INFO_BEGIN, n->arg1.net_name, NULL, NULL); for(term = pcb_termlist_first(&net->conns); term != NULL; term = pcb_termlist_next(term)) { - char *tmp = pcb_concat(term->refdes, "-", term->term, NULL); + char *tmp = rnd_concat(term->refdes, "-", term->term, NULL); cb(ctx, PCB_RPE_INFO_TERMINAL, n->arg1.net_name, NULL, tmp); free(tmp); } Index: trunk/src/route_style.c =================================================================== --- trunk/src/route_style.c (revision 31004) +++ trunk/src/route_style.c (revision 31005) @@ -44,7 +44,7 @@ static rnd_coord_t pcb_get_num(char **s, const char *default_unit) { /* Read value */ - rnd_coord_t ret_val = pcb_get_value_ex(*s, NULL, NULL, NULL, default_unit, NULL); + rnd_coord_t ret_val = rnd_get_value_ex(*s, NULL, NULL, NULL, default_unit, NULL); /* Advance pointer */ while (isalnum(**s) || **s == '.') (*s)++; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 31004) +++ trunk/src/search.c (revision 31005) @@ -496,7 +496,7 @@ PCB_POLY_POINT_LOOP(polygon); { - d = pcb_distance2(point->X, point->Y, PosX, PosY); + d = rnd_distance2(point->X, point->Y, PosX, PosY); if (d < ctx->least) { ctx->least = d; *ctx->Polygon = polygon; Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 31004) +++ trunk/src/search.h (revision 31005) @@ -87,7 +87,7 @@ /* == the same but accept if any part of the object touches the box == */ #define PCB_POINT_IN_CIRCLE(x, y, cx, cy, r) \ - (pcb_distance2(x, y, cx, cy) <= (double)(r) * (double)(r)) + (rnd_distance2(x, y, cx, cy) <= (double)(r) * (double)(r)) #define PCB_CIRCLE_TOUCHES_BOX(cx, cy, r, b) \ ( PCB_POINT_IN_BOX((cx)-(r),(cy),(b)) || PCB_POINT_IN_BOX((cx)+(r),(cy),(b)) || PCB_POINT_IN_BOX((cx),(cy)-(r),(b)) || PCB_POINT_IN_BOX((cx),(cy)+(r),(b)) \ Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 31004) +++ trunk/src/thermal.c (revision 31005) @@ -432,7 +432,7 @@ n++; break; } - cong[n] = (pcb_distance2(x, y, px, py) < cl2); + cong[n] = (rnd_distance2(x, y, px, py) < cl2); px = x; py = y; } return n; Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 31004) +++ trunk/src/view.c (revision 31005) @@ -445,22 +445,22 @@ c = n->data.list.first; if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->bbox.X1 = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->bbox.X1 = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->bbox.Y1 = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->bbox.Y1 = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->bbox.X2 = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->bbox.X2 = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->bbox.Y2 = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->bbox.Y2 = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } @@ -476,12 +476,12 @@ c = n->data.list.first; if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->x = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->x = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->y = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->y = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) ok++; c = c->next; } @@ -506,13 +506,13 @@ if ((n != NULL) && (n->type == LHT_HASH)) { c = lht_dom_hash_get(n, "required_value"); if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->data.drc.required_value = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->data.drc.required_value = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (!succ) rnd_message(RND_MSG_ERROR, LOADERR "invalid drc required value: '%s'\n", c->data.text.value); } c = lht_dom_hash_get(n, "measured_value"); if ((c != NULL) && (c->type == LHT_TEXT)) { - dst->data.drc.measured_value = pcb_get_value(c->data.text.value, NULL, NULL, &succ); + dst->data.drc.measured_value = rnd_get_value(c->data.text.value, NULL, NULL, &succ); if (succ) dst->data.drc.have_measured = 1; else Index: trunk/src_plugins/act_draw/act_draw.c =================================================================== --- trunk/src_plugins/act_draw/act_draw.c (revision 31004) +++ trunk/src_plugins/act_draw/act_draw.c (revision 31005) @@ -272,7 +272,7 @@ if (*next == '\0') next = NULL; } - c[len % 2] = pcb_get_value_ex(s, NULL, NULL, NULL, "mm", &success); + c[len % 2] = rnd_get_value_ex(s, NULL, NULL, NULL, "mm", &success); if (!success) { rnd_message(RND_MSG_ERROR, "act_draw ptlist processing: '%s' is not a valid coordinate\n", s); free(tmp); Index: trunk/src_plugins/act_read/act_read.c =================================================================== --- trunk/src_plugins/act_read/act_read.c (revision 31004) +++ trunk/src_plugins/act_read/act_read.c (revision 31005) @@ -43,7 +43,7 @@ static const char pcb_acts_GetValue[] = "GetValue(input, units, relative, default_unit)"; -static const char pcb_acth_GetValue[] = "Convert a coordinate value. Returns an unitless double or FGW_ERR_ARG_CONV. The 3rd parameter controls whether to require relative coordinates (+- prefix). Wraps pcb_get_value_ex()."; +static const char pcb_acth_GetValue[] = "Convert a coordinate value. Returns an unitless double or FGW_ERR_ARG_CONV. The 3rd parameter controls whether to require relative coordinates (+- prefix). Wraps rnd_get_value_ex()."; static fgw_error_t pcb_act_GetValue(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *input, *units, *def_unit; @@ -59,7 +59,7 @@ if (*units == '\0') units = NULL; - v = pcb_get_value_ex(input, units, &a, NULL, def_unit, &success); + v = rnd_get_value_ex(input, units, &a, NULL, def_unit, &success); if (!success || (relative && a)) return FGW_ERR_ARG_CONV; Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 31004) +++ trunk/src_plugins/autoplace/autoplace.c (revision 31005) @@ -511,7 +511,7 @@ if (!boxp) continue; factor = 1; - if (subc->refdes && boxp->refdes && 0 == PCB_NSTRCMP(subc->refdes, boxp->refdes)) { + if (subc->refdes && boxp->refdes && 0 == RND_NSTRCMP(subc->refdes, boxp->refdes)) { delta4 += CostParameter.matching_neighbor_bonus; factor++; } Index: trunk/src_plugins/ddraft/cli.c =================================================================== --- trunk/src_plugins/ddraft/cli.c (revision 31004) +++ trunk/src_plugins/ddraft/cli.c (revision 31005) @@ -202,7 +202,7 @@ } memcpy(tmp, s, sep-s); tmp[sep-s] = '\0'; - dst[i-1].x = pcb_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); + dst[i-1].x = rnd_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); if (!succ) dst[i-1].invalid = 1; @@ -213,12 +213,12 @@ } memcpy(tmp, sep, next-sep); tmp[next-sep] = '\0'; - dst[i-1].y = pcb_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); + dst[i-1].y = rnd_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); if (!succ) dst[i-1].invalid = 1; break; case CLI_DIST: - dst[i-1].dist = pcb_get_value_ex(s, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); + dst[i-1].dist = rnd_get_value_ex(s, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); dst[i-1].invalid = !succ; dst[i-1].end = next - line; break; Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 31004) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 31005) @@ -129,12 +129,12 @@ g2c_array(line_angle, strtod(curr, &end)); g2c_scalar(line_angle_mod, dbl); - g2c_array(line_length, pcb_get_value(curr, NULL, NULL, &succ)); + g2c_array(line_length, rnd_get_value(curr, NULL, NULL, &succ)); g2c_scalar(line_length_mod, crd); g2c_array(move_angle, strtod(curr, &end)); g2c_scalar(move_angle_mod, dbl); - g2c_array(move_length, pcb_get_value(curr, NULL, NULL, &succ)); + g2c_array(move_length, rnd_get_value(curr, NULL, NULL, &succ)); g2c_scalar(move_length_mod, crd); } Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 31005) @@ -93,7 +93,7 @@ break; case RND_HATT_COORD: case RND_HATT_END: /* compound widget for the spinbox! */ - hv.crd = pcb_get_value_ex(val, NULL, NULL, NULL, "mil", NULL); + hv.crd = rnd_get_value_ex(val, NULL, NULL, NULL, "mil", NULL); break; default: assert(!"set_attr() can't set non-data field!\n"); @@ -108,7 +108,7 @@ do { \ if (help_def != NULL) { \ if (help != NULL) { \ - char *tmp = pcb_concat(help, "\nDefault: ", help_def, NULL); \ + char *tmp = rnd_concat(help, "\nDefault: ", help_def, NULL); \ free(help); \ free(help_def); \ help = tmp; \ Index: trunk/src_plugins/dialogs/dlg_loadsave.c =================================================================== --- trunk/src_plugins/dialogs/dlg_loadsave.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_loadsave.c (revision 31005) @@ -168,7 +168,7 @@ /* build a new file name with the right extension */ argv[0].type = RND_EVARG_STR; - argv[0].d.s = pcb_concat(bn, ext, NULL);; + argv[0].d.s = rnd_concat(bn, ext, NULL);; fmtsub->parent_poke(fmtsub, "set_file_name", &res, 1, argv); free(fn); @@ -491,7 +491,7 @@ if (fmt < 0) /* fallback: choose the frist format */ fmt = 0; - name_in = pcb_concat("unnamed", avail.plug[fmt]->fp_extension, NULL); + name_in = rnd_concat("unnamed", avail.plug[fmt]->fp_extension, NULL); } else { rnd_message(RND_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); @@ -538,7 +538,7 @@ /* construct the input file name and run a file selection dialog to get the final file name */ if (name_in == NULL) { if (PCB->hidlib.filename == NULL) - name_in = pcb_concat("unnamed", extensions_param[fmt], NULL); + name_in = rnd_concat("unnamed", extensions_param[fmt], NULL); else name_in = rnd_strdup(PCB->hidlib.filename); } @@ -571,7 +571,7 @@ sfmt = avail.plug[save.pick]->default_fmt; res->type = FGW_STR | FGW_DYN; if (final_name != NULL) - res->val.str = pcb_concat(final_name, "*", sfmt, NULL); + res->val.str = rnd_concat(final_name, "*", sfmt, NULL); else res->val.str = NULL; free(final_name); Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 31005) @@ -115,7 +115,7 @@ cell[1] = NULL; for(t = pcb_termlist_first(&net->conns); t != NULL; t = pcb_termlist_next(t)) { - cell[0] = pcb_concat(t->refdes, "-", t->term, NULL); + cell[0] = rnd_concat(t->refdes, "-", t->term, NULL); rnd_dad_tree_append(attr, NULL, cell); } @@ -224,7 +224,7 @@ else if (w == ctx->wmerge) rnd_actionva(&ctx->pcb->hidlib, "netlist", "merge", name, NULL); else if (w == ctx->wattr) { - char *tmp = pcb_concat("net:", name, NULL); + char *tmp = rnd_concat("net:", name, NULL); rnd_actionva(&ctx->pcb->hidlib, "propedit", tmp, NULL); free(tmp); } Index: trunk/src_plugins/dialogs/dlg_pref_board.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_board.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_pref_board.c (revision 31005) @@ -30,12 +30,12 @@ #include #include "conf_core.h" -#define PCB_EMPTY(a) ((a) ? (a) : "") +#define RND_EMPTY(a) ((a) ? (a) : "") /* Actual board meta to dialog box */ static void pref_board_brd2dlg(pref_ctx_t *ctx) { - RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wname, str, PCB_EMPTY(PCB->hidlib.name)); + RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wname, str, RND_EMPTY(PCB->hidlib.name)); RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wthermscale, dbl, PCB->ThermScale); RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wtype, str, (PCB->is_footprint ? "footprint" : "PCB board")); } @@ -48,8 +48,8 @@ double newtherm; pref_ctx_t *ctx = caller_data; - newname = PCB_EMPTY(ctx->dlg[ctx->board.wname].val.str); - oldname = PCB_EMPTY(PCB->hidlib.name); + newname = RND_EMPTY(ctx->dlg[ctx->board.wname].val.str); + oldname = RND_EMPTY(PCB->hidlib.name); if (strcmp(oldname, newname) != 0) { free(PCB->hidlib.name); PCB->hidlib.name = rnd_strdup(newname); @@ -85,7 +85,7 @@ RND_DAD_LABEL(ctx->dlg, "Board name"); RND_DAD_STRING(ctx->dlg); ctx->board.wname = RND_DAD_CURRENT(ctx->dlg); - ctx->dlg[ctx->board.wname].val.str = rnd_strdup(PCB_EMPTY(PCB->hidlib.name)); + ctx->dlg[ctx->board.wname].val.str = rnd_strdup(RND_EMPTY(PCB->hidlib.name)); RND_DAD_CHANGE_CB(ctx->dlg, pref_board_dlg2brd); RND_DAD_LABEL(ctx->dlg, "Thermal scale"); RND_DAD_REAL(ctx->dlg, ""); Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 31005) @@ -218,7 +218,7 @@ rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wname, &hv); tmp = rnd_strdup(nat->description); - pcb_text_wrap(tmp, DESC_WRAP_WIDTH, '\n', ' '); + rnd_text_wrap(tmp, DESC_WRAP_WIDTH, '\n', ' '); hv.str = tmp; rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wdesc, &hv); free(tmp); Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 31005) @@ -79,7 +79,7 @@ rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; case RND_CFN_COORD: - hv.crd = pcb_get_value(val, NULL, NULL, NULL); + hv.crd = rnd_get_value(val, NULL, NULL, NULL); rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; case RND_CFN_UNIT: Index: trunk/src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 31005) @@ -31,7 +31,7 @@ #include "conf_core.h" #include "stub_draw.h" -#define PCB_EMPTY(a) ((a) ? (a) : "") +#define RND_EMPTY(a) ((a) ? (a) : "") void layersel_expose_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 31005) @@ -302,9 +302,9 @@ } free(cell[0]); - cell[0] = rnd_strdup(PCB_EMPTY(ctx.dlg[ctx.wpath].val.str)); + cell[0] = rnd_strdup(RND_EMPTY(ctx.dlg[ctx.wpath].val.str)); free(cell[1]); - cell[1] = rnd_strdup(PCB_EMPTY(ctx.dlg[ctx.wexp].val.str)); + cell[1] = rnd_strdup(RND_EMPTY(ctx.dlg[ctx.wexp].val.str)); RND_DAD_FREE(ctx.dlg); return 0; Index: trunk/src_plugins/dialogs/dlg_search_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search_edit.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_search_edit.c (revision 31005) @@ -176,7 +176,7 @@ set_right(ctx, &ctx->dlg[ctx->wright[s->expr->rtype]]); break; case RIGHT_COORD: - hv.crd = pcb_get_value_ex(hv.str, NULL, NULL, NULL, "mm", NULL); + hv.crd = rnd_get_value_ex(hv.str, NULL, NULL, NULL, "mm", NULL); rnd_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wright[s->expr->rtype], &hv); if (empty) set_right(ctx, &ctx->dlg[ctx->wright[s->expr->rtype]]); Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 31004) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 31005) @@ -168,7 +168,7 @@ pcb_view_t *v = pcb_view_by_uid(ctx->lst, ctx->selected); if (v != NULL) { pcb_view_goto(v); - RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str, pcb_text_wrap(rnd_strdup(v->description), 32, '\n', ' ')); + RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str, rnd_text_wrap(rnd_strdup(v->description), 32, '\n', ' ')); switch(v->data_type) { case PCB_VIEW_PLAIN: RND_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str, rnd_strdup("")); Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 31004) +++ trunk/src_plugins/distalign/distalign.c (revision 31005) @@ -77,7 +77,7 @@ if (!s) { return K_none; } - for (i = 0; i < PCB_ENTRIES(keywords); ++i) { + for (i = 0; i < RND_ENTRIES(keywords); ++i) { if (keywords[i] && rnd_strcasecmp(s, keywords[i]) == 0) return i; } Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 31004) +++ trunk/src_plugins/djopt/djopt.c (revision 31005) @@ -2480,7 +2480,7 @@ check(0, 0); - if (PCB_NSTRCMP(arg, "splitlines") == 0) { + if (RND_NSTRCMP(arg, "splitlines") == 0) { if (canonicalize_lines()) pcb_undo_inc_serial(); rnd_hid_busy(PCB, 0); @@ -2527,21 +2527,21 @@ /*dump_all(); */ check(0, 0); - if (PCB_NSTRCMP(arg, "debumpify") == 0) + if (RND_NSTRCMP(arg, "debumpify") == 0) saved += debumpify(); - else if (PCB_NSTRCMP(arg, "unjaggy") == 0) + else if (RND_NSTRCMP(arg, "unjaggy") == 0) saved += unjaggy(); - else if (PCB_NSTRCMP(arg, "simple") == 0) + else if (RND_NSTRCMP(arg, "simple") == 0) saved += simple_optimizations(); - else if (PCB_NSTRCMP(arg, "vianudge") == 0) + else if (RND_NSTRCMP(arg, "vianudge") == 0) saved += vianudge(); - else if (PCB_NSTRCMP(arg, "viatrim") == 0) + else if (RND_NSTRCMP(arg, "viatrim") == 0) saved += viatrim(); - else if (PCB_NSTRCMP(arg, "orthopull") == 0) + else if (RND_NSTRCMP(arg, "orthopull") == 0) saved += orthopull(); - else if (PCB_NSTRCMP(arg, "auto") == 0) + else if (RND_NSTRCMP(arg, "auto") == 0) saved += automagic(); - else if (PCB_NSTRCMP(arg, "miter") == 0) + else if (RND_NSTRCMP(arg, "miter") == 0) saved += miter(); else { printf("unknown command: %s\n", arg); Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 31004) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 31005) @@ -327,7 +327,7 @@ yoff -= TEXT_LINE; text_at(info, gc, PCB_MIL_TO_COORD(2000), yoff, 0, "Author: %s", pcb_author()); yoff -= TEXT_LINE; - text_at(info, gc, PCB_MIL_TO_COORD(2000), yoff, 0, "Title: %s - Fabrication Drawing", PCB_UNKNOWN(PCB->hidlib.name)); + text_at(info, gc, PCB_MIL_TO_COORD(2000), yoff, 0, "Title: %s - Fabrication Drawing", RND_UNKNOWN(PCB->hidlib.name)); } int pplg_check_ver_draw_fab(int ver_needed) { return 0; } Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 31004) +++ trunk/src_plugins/drc_query/dlg.c (revision 31005) @@ -136,7 +136,7 @@ lht_node_t *nnew; \ lht_err_t err; \ char *nname0 = nname; \ - if (parent->type == LHT_LIST) nname0 = pcb_concat(nname, ":0", NULL); \ + if (parent->type == LHT_LIST) nname0 = rnd_concat(nname, ":0", NULL); \ nnew = lht_tree_path_(parent->doc, parent, nname0, 1, 1, &err); \ if (parent->type == LHT_LIST) free(nname0); \ if ((nnew != NULL) && (nnew->type != ntype)) { \ @@ -235,7 +235,7 @@ } } - path = pcb_concat(DRC_CONF_PATH_RULES, rule, ":0", NULL); + path = rnd_concat(DRC_CONF_PATH_RULES, rule, ":0", NULL); nd = rnd_conf_lht_get_at_mainplug(role, path, 1, 0); if (nd == NULL) { rnd_message(RND_MSG_ERROR, "Rule %s not found on this role.\n", rule); @@ -460,7 +460,7 @@ #define rlist_fetch_nd() \ do { \ - char *path = pcb_concat(DRC_CONF_PATH_RULES, row->cell[0], ":0", NULL); \ + char *path = rnd_concat(DRC_CONF_PATH_RULES, row->cell[0], ":0", NULL); \ nd = rnd_conf_lht_get_at_mainplug(role, path, 1, 0); \ if (nd == NULL) { \ rnd_message(RND_MSG_ERROR, "internal error: rule not found at %s\n", path); \ Index: trunk/src_plugins/drc_query/drc_query.c =================================================================== --- trunk/src_plugins/drc_query/drc_query.c (revision 31004) +++ trunk/src_plugins/drc_query/drc_query.c (revision 31005) @@ -192,7 +192,7 @@ static int *drc_get_disable(const char *name) { - char *path = pcb_concat(DRC_CONF_PATH_DISABLE, name, NULL); + char *path = rnd_concat(DRC_CONF_PATH_DISABLE, name, NULL); rnd_conf_native_t *nat = rnd_conf_get_field(path); free(path); if ((nat == NULL) || (nat->type != RND_CFN_BOOLEAN)) @@ -257,7 +257,7 @@ if (nat_rules == cfg) { lht_node_t *nd = i->prop.src; - char *path = pcb_concat(DRC_CONF_PATH_DISABLE, nd->name, NULL); + char *path = rnd_concat(DRC_CONF_PATH_DISABLE, nd->name, NULL); if (rnd_conf_get_field(path) == NULL) { const char *sdesc; @@ -287,7 +287,7 @@ } else if (nat_defs == cfg) { lht_node_t *nd = i->prop.src; - char *path = pcb_concat(DRC_CONF_PATH_CONST, nd->name, NULL); + char *path = rnd_concat(DRC_CONF_PATH_CONST, nd->name, NULL); rnd_coord_t *c; if (rnd_conf_get_field(path) == NULL) { Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 31004) +++ trunk/src_plugins/export_bom/bom.c (revision 31005) @@ -120,7 +120,7 @@ /* search and see if we already have used one of these components */ cur = bom; while(cur != NULL) { - if ((PCB_NSTRCMP(descr, cur->descr) == 0) && (PCB_NSTRCMP(value, cur->value) == 0)) { + if ((RND_NSTRCMP(descr, cur->descr) == 0) && (RND_NSTRCMP(value, cur->value) == 0)) { cur->num++; vts0_append(&cur->refdes, rnd_strdup(refdes)); break; @@ -191,9 +191,9 @@ PCB_SUBC_LOOP(PCB->Data); { /* insert this component into the bill of materials list */ - bom = bom_insert((char *) PCB_UNKNOWN(subc->refdes), - (char *) PCB_UNKNOWN(pcb_subc_name(subc, "bom::footprint")), - (char *) PCB_UNKNOWN(rnd_attribute_get(&subc->Attributes, "value")), + 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")), bom); } PCB_END_LOOP; @@ -210,7 +210,7 @@ fprintf(fp, "# PcbBOM Version 1.0\n"); fprintf(fp, "# Date: %s\n", utcTime); fprintf(fp, "# Author: %s\n", pcb_author()); - fprintf(fp, "# Title: %s - PCB BOM\n", PCB_UNKNOWN(PCB->hidlib.name)); + fprintf(fp, "# Title: %s - PCB BOM\n", RND_UNKNOWN(PCB->hidlib.name)); fprintf(fp, "# Quantity, Description, Value, RefDes\n"); fprintf(fp, "# --------------------------------------------\n"); Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 31004) +++ trunk/src_plugins/export_gerber/gerber.c (revision 31005) @@ -545,7 +545,7 @@ rnd_print_utc(utcTime, sizeof(utcTime), 0); /* Print a cute file header at the beginning of each file. */ - fprintf(f, "G04 Title: %s, %s *\r\n", PCB_UNKNOWN(PCB->hidlib.name), PCB_UNKNOWN(group_name)); + fprintf(f, "G04 Title: %s, %s *\r\n", RND_UNKNOWN(PCB->hidlib.name), RND_UNKNOWN(group_name)); fprintf(f, "G04 Creator: pcb-rnd " PCB_VERSION " *\r\n"); fprintf(f, "G04 CreationDate: %s *\r\n", utcTime); Index: trunk/src_plugins/export_oldconn/oldconn.c =================================================================== --- trunk/src_plugins/export_oldconn/oldconn.c (revision 31004) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 31005) @@ -64,11 +64,11 @@ static void print_subc_name(FILE *f, pcb_subc_t *subc) { fputc('(', f); - pcb_print_quoted_string(f, (char *)PCB_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint"))); + pcb_print_quoted_string(f, (char *)RND_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint"))); fputc(' ', f); - pcb_print_quoted_string(f, (char *)PCB_EMPTY(subc->refdes)); + pcb_print_quoted_string(f, (char *)RND_EMPTY(subc->refdes)); fputc(' ', f); - pcb_print_quoted_string(f, (char *)PCB_EMPTY(rnd_attribute_get(&subc->Attributes, "value"))); + pcb_print_quoted_string(f, (char *)RND_EMPTY(rnd_attribute_get(&subc->Attributes, "value"))); fputs(")\n", f); } @@ -120,7 +120,7 @@ } fputc('\t', f); - pcb_print_quoted_string(f, (char *)PCB_EMPTY(o->term)); + pcb_print_quoted_string(f, (char *)RND_EMPTY(o->term)); fputc('\n', f); if (do_select) { PCB_FLAG_SET(PCB_FLAG_SELECTED, o); @@ -154,7 +154,7 @@ return 0; fputs("\t\t", ctx->f); - pcb_print_quoted_string(ctx->f, PCB_EMPTY(o->term)); + pcb_print_quoted_string(ctx->f, RND_EMPTY(o->term)); fputs(" ", ctx->f); print_subc_name(ctx->f, sc); return 0; @@ -179,7 +179,7 @@ continue; fputs("\t", f); - pcb_print_quoted_string(f, PCB_EMPTY(o->term)); + pcb_print_quoted_string(f, RND_EMPTY(o->term)); fputs("\n\t{\n", f); cbctx.start = o; Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 31004) +++ trunk/src_plugins/export_openems/excitation.c (revision 31005) @@ -147,7 +147,7 @@ { const rnd_unit_t *u; double d; - if (!pcb_get_value_unit(s, NULL, 0, &d, &u)) + if (!rnd_get_value_unit(s, NULL, 0, &d, &u)) return pcb_false; if (u->family != PCB_UNIT_FREQ) return pcb_false; Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 31004) +++ trunk/src_plugins/export_openems/mesh.c (revision 31005) @@ -208,7 +208,7 @@ rnd_message(RND_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ return -1; \ } \ - v = pcb_get_value(n->data.text.value, NULL, NULL, &succ); \ + v = rnd_get_value(n->data.text.value, NULL, NULL, &succ); \ if (!succ) { \ rnd_message(RND_MSG_ERROR, "Invalid mesh coord: " #name "\n"); \ return -1; \ Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 31004) +++ trunk/src_plugins/export_png/png.c (revision 31005) @@ -449,7 +449,7 @@ static void parse_bloat(const char *str) { int n; - pcb_unit_list_t extra_units = { + rnd_unit_list_t extra_units = { {"pix", 0, 0}, {"px", 0, 0}, {"", 0, 0} @@ -458,7 +458,7 @@ extra_units[n].scale = scale; if (str == NULL) return; - bloat = pcb_get_value_ex(str, NULL, NULL, extra_units, "", NULL); + bloat = rnd_get_value_ex(str, NULL, NULL, extra_units, "", NULL); } static void rgb(color_struct *dest, int r, int g, int b) Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 31004) +++ trunk/src_plugins/export_xy/xy.c (revision 31005) @@ -355,7 +355,7 @@ } if (strncmp(*input, "title%", 6) == 0) { *input += 6; - gds_append_str(s, PCB_UNKNOWN(PCB->hidlib.name)); + gds_append_str(s, RND_UNKNOWN(PCB->hidlib.name)); return 0; } if (strncmp(*input, "suffix%", 7) == 0) { @@ -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 *) PCB_UNKNOWN(rnd_attribute_get(&subc->Attributes, "refdes"))); - ctx.descr = pcb_bom_clean_str((char *) PCB_UNKNOWN(pcb_subc_name(subc, "export_xy::footprint"))); - ctx.value = pcb_bom_clean_str((char *) PCB_UNKNOWN(rnd_attribute_get(&subc->Attributes, "value"))); + ctx.name = pcb_bom_clean_str((char *) RND_UNKNOWN(rnd_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"))); /* 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/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 31004) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 31005) @@ -90,7 +90,7 @@ l->children++; e = pcb_fp_append_entry(l->menu, name, type, tags); -/* Avoid using pcb_concat() - would be a new dependency for gsch2pcb-rnd */ +/* Avoid using rnd_concat() - would be a new dependency for gsch2pcb-rnd */ { int sl = strlen(subdir); int nl = strlen(name); @@ -180,12 +180,12 @@ l = strlen(subdirentry->d_name); if (!stat(subdirentry->d_name, &buffer) && subdirentry->d_name[0] != '.' - && PCB_NSTRCMP(subdirentry->d_name, "CVS") != 0 - && PCB_NSTRCMP(subdirentry->d_name, "Makefile") != 0 - && PCB_NSTRCMP(subdirentry->d_name, "Makefile.am") != 0 - && PCB_NSTRCMP(subdirentry->d_name, "Makefile.in") != 0 && (l < 4 || PCB_NSTRCMP(subdirentry->d_name + (l - 4), ".png") != 0) - && (l < 5 || PCB_NSTRCMP(subdirentry->d_name + (l - 5), ".html") != 0) - && (l < 4 || PCB_NSTRCMP(subdirentry->d_name + (l - 4), ".pcb") != 0)) { + && RND_NSTRCMP(subdirentry->d_name, "CVS") != 0 + && RND_NSTRCMP(subdirentry->d_name, "Makefile") != 0 + && RND_NSTRCMP(subdirentry->d_name, "Makefile.am") != 0 + && RND_NSTRCMP(subdirentry->d_name, "Makefile.in") != 0 && (l < 4 || RND_NSTRCMP(subdirentry->d_name + (l - 4), ".png") != 0) + && (l < 5 || RND_NSTRCMP(subdirentry->d_name + (l - 5), ".html") != 0) + && (l < 4 || RND_NSTRCMP(subdirentry->d_name + (l - 4), ".pcb") != 0)) { #ifdef DEBUG /* printf("... Found a footprint %s ... \n", subdirentry->d_name); */ Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 31004) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 31005) @@ -71,16 +71,16 @@ end = strrchr(dir, RND_DIR_SEPARATOR_C); if (end == NULL) { - path = pcb_concat(dir, "/", fn, NULL); + path = rnd_concat(dir, "/", fn, NULL); } else if (end[1] == '\0') { /* dir is a directory, ending in /, append fn */ - path = pcb_concat(dir, fn, NULL); + path = rnd_concat(dir, fn, NULL); } else { /* dir is a full path, with file name included, replace that */ end[1] = '\0'; - path = pcb_concat(dir, fn, NULL); + path = rnd_concat(dir, fn, NULL); } xms_path = XmStringCreatePCB(path); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 31004) +++ trunk/src_plugins/hid_lesstif/main.c (revision 31005) @@ -1602,7 +1602,7 @@ pcb_cvt_string_to_coord(Display * d, XrmValue * args, Cardinal * num_args, XrmValue * from, XrmValue * to, XtPointer * data) { static rnd_coord_t rv; - rv = pcb_get_value((char *) from->addr, NULL, NULL, NULL); + rv = rnd_get_value((char *) from->addr, NULL, NULL, NULL); if (to->addr) *(rnd_coord_t *) to->addr = rv; else Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 31004) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 31005) @@ -67,7 +67,7 @@ netnode_strings = (XmString *) malloc(n_netnode_strings * sizeof(XmString)); for(t = pcb_termlist_first(&net->conns), i = 0; t != NULL; t = pcb_termlist_next(t), i++) { - char *tmp = pcb_concat(t->refdes, "-", t->term, NULL); + char *tmp = rnd_concat(t->refdes, "-", t->term, NULL); netnode_strings[i] = XmStringCreatePCB(tmp); } Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 31004) +++ trunk/src_plugins/import_dsn/dsn.c (revision 31005) @@ -96,7 +96,7 @@ rnd_layer_id_t lid; pcb_layer_t *layer; - thick = pcb_get_value(sthick, unit, NULL, &succ); + thick = rnd_get_value(sthick, unit, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline because thickness is invalid: %s\n", sthick); return; @@ -113,12 +113,12 @@ for(pn = 0, c = n->children->next->next; c != NULL; pn++, c = c->next->next) { const char *sx = c->str; const char *sy = c->next->str; - x = pcb_get_value(sx, unit, NULL, &succ); + x = rnd_get_value(sx, unit, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sx); return; } - y = pcb_get_value(sy, unit, NULL, &succ); + y = rnd_get_value(sy, unit, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sy); return; @@ -184,12 +184,12 @@ dia = l1; drill = l2; - x = pcb_get_value(sx, unit, NULL, &succ); + x = rnd_get_value(sx, unit, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sx); return; } - y = pcb_get_value(sy, unit, NULL, &succ); + y = rnd_get_value(sy, unit, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sy); return; Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31004) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 31005) @@ -88,7 +88,7 @@ } } extract_field(tmp, line, start, end); - d = pcb_get_value(tmp, is_mil ? "mil" : "mm", NULL, &succ); + d = rnd_get_value(tmp, is_mil ? "mil" : "mm", NULL, &succ); if (!succ) return -1; if (is_mil) Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 31004) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 31005) @@ -70,7 +70,7 @@ rnd_message(RND_MSG_INFO, "Importing PCB netlist %s\n", filename); ratcmd = conf_core.rc.rat_command; - if (PCB_EMPTY_STRING_P(ratcmd)) { + if (RND_EMPTY_STRING_P(ratcmd)) { fp = pcb_fopen(&PCB->hidlib, filename, "r"); if (!fp) { rnd_message(RND_MSG_ERROR, "Cannot open %s for reading", filename); Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 31004) +++ trunk/src_plugins/io_autotrax/read.c (revision 31005) @@ -171,19 +171,19 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc > 5) { - X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + X = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - Y = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + Y = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - height_mil = pcb_get_value_ex(argv[2], NULL, NULL, NULL, NULL, &success); + height_mil = rnd_get_value_ex(argv[2], NULL, NULL, NULL, NULL, &success); valid &= success; scaling = (100 * height_mil) / 60; - direction = pcb_get_value_ex(argv[3], NULL, NULL, NULL, NULL, &success); + direction = rnd_get_value_ex(argv[3], NULL, NULL, NULL, NULL, &success); direction = direction % 4; /* ignore mirroring */ valid &= success; - linewidth = pcb_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); + linewidth = rnd_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); valid &= success; - autotrax_layer = pcb_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); + autotrax_layer = rnd_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); valid &= (success && (autotrax_layer > 0) && (autotrax_layer < 14)); /* we ignore the user routed flag */ qparse_free(argc, &argv); @@ -256,17 +256,17 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc > 5) { - X1 = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + X1 = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - Y1 = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + Y1 = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - X2 = pcb_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); + X2 = rnd_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); valid &= success; - Y2 = pcb_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); + Y2 = rnd_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); valid &= success; - Thickness = pcb_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); + Thickness = rnd_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); valid &= success; - autotrax_layer = pcb_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); + autotrax_layer = rnd_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); valid &= (success && (autotrax_layer > 0) && (autotrax_layer < 14)); /* we ignore the user routed flag */ qparse_free(argc, &argv); @@ -315,17 +315,17 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc > 5) { - centreX = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + centreX = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - centreY = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + centreY = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - radius = pcb_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); + radius = rnd_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); valid &= success; - segments = pcb_get_value_ex(argv[3], NULL, NULL, NULL, NULL, &success); + segments = rnd_get_value_ex(argv[3], NULL, NULL, NULL, NULL, &success); valid &= success; - Thickness = pcb_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); + Thickness = rnd_get_value_ex(argv[4], NULL, NULL, NULL, "mil", &success); valid &= success; - autotrax_layer = pcb_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); + autotrax_layer = rnd_get_value_ex(argv[5], NULL, NULL, NULL, NULL, &success); PCB_layer = st->protel_to_stackup[(int)autotrax_layer]; valid &= (success && (autotrax_layer > 0) && (autotrax_layer < 14)); /* we ignore the user routed flag */ @@ -457,13 +457,13 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc >= 4) { - X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + X = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - Y = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + Y = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - Thickness = pcb_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); + Thickness = rnd_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); valid &= success; - Drill = pcb_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); + Drill = rnd_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); valid &= success; qparse_free(argc, &argv); } @@ -519,17 +519,17 @@ rnd_message(RND_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } - X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + X = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - Y = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + Y = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - X_size = pcb_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); + X_size = rnd_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); valid &= success; - Y_size = pcb_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); + Y_size = rnd_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); valid &= success; Shape = strtol(argv[4], &end, 10); if (*end != '\0') valid = 0; - Drill = pcb_get_value_ex(argv[5], NULL, NULL, NULL, "mil", &success); + Drill = rnd_get_value_ex(argv[5], NULL, NULL, NULL, "mil", &success); valid &= success; Connects = strtol(argv[6], &end, 10); if (*end != '\0') valid = 0; @@ -690,16 +690,16 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc >= 5) { - X1 = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + X1 = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - Y1 = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + Y1 = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; - X2 = pcb_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); + X2 = rnd_get_value_ex(argv[2], NULL, NULL, NULL, "mil", &success); valid &= success; - Y2 = pcb_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); + Y2 = rnd_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); valid &= success; TODO("do not use get_value_ex for plain integers (revise the whole file for this)") - autotrax_layer = pcb_get_value_ex(argv[4], NULL, NULL, NULL, NULL, &success); + autotrax_layer = rnd_get_value_ex(argv[4], NULL, NULL, NULL, NULL, &success); valid &= (success && (autotrax_layer > 0) && (autotrax_layer < 14)); qparse_free(argc, &argv); } @@ -995,9 +995,9 @@ rtrim(s); argc = qparse2(s, &argv, 0); if (argc >= 2) { - module_X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); + module_X = rnd_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); valid &= success; - module_Y = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); + module_Y = rnd_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; TODO("load placement status and apply PCB_FLAG_LOCK if needed") qparse_free(argc, &argv); Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 31004) +++ trunk/src_plugins/io_eagle/read.c (revision 31005) @@ -269,7 +269,7 @@ if (p == NULL) return invalid_val; - c = pcb_get_value(p, st->default_unit, NULL, &succ); + c = rnd_get_value(p, st->default_unit, NULL, &succ); if (!succ) return invalid_val; return c; @@ -285,7 +285,7 @@ if (p == NULL) return invalid_val; - c = pcb_get_value(p, NULL, NULL, &succ); + c = rnd_get_value(p, NULL, NULL, &succ); if (!succ) return invalid_val; return c; Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 31004) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 31005) @@ -148,7 +148,7 @@ rnd_bool succ; double d; - d = pcb_get_value(val, NULL, NULL, &succ); + d = rnd_get_value(val, NULL, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); return; Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 31004) +++ trunk/src_plugins/io_kicad/read.c (revision 31005) @@ -608,17 +608,17 @@ if (subtree->str == NULL) return kicad_error(subtree, "error parsing KiCad titleblock: empty"); - name = pcb_concat(prefix, subtree->str, NULL); + name = rnd_concat(prefix, subtree->str, NULL); rnd_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 = pcb_concat(prefix, n->str, NULL); + name = rnd_concat(prefix, n->str, NULL); rnd_attrib_put(st->pcb, name, n->children->str); free(name); } else { /* if comment field has extra children args */ - name = pcb_concat(prefix, n->str, "_", n->children->str, NULL); + name = rnd_concat(prefix, n->str, "_", n->children->str, NULL); rnd_attrib_put(st->pcb, name, n->children->next->str); free(name); } @@ -2410,7 +2410,7 @@ if ((n->children == NULL) || (n->children->str == NULL)) return kicad_error(n, "unexpected empty/NULL module attr node"); - key = pcb_concat("kicad_attr_", n->children->str, NULL); + key = rnd_concat("kicad_attr_", n->children->str, NULL); rnd_attribute_put(&subc->Attributes, key, "1"); free(key); } Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 31004) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 31005) @@ -426,7 +426,7 @@ fputs("$PAD\n", FP); pcb_fprintf(FP, "Po %.0mk %.0mk\n", x - sox, y - soy); /* positions of pad */ fputs("Sh ", FP); /* pin shape descriptor */ - pcb_print_quoted_string(FP, (char *)PCB_EMPTY(ps->term)); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(ps->term)); if (cshape == PCB_PSTK_COMPAT_SQUARE) fputs(" R ", FP); else if (cshape == PCB_PSTK_COMPAT_ROUND) fputs(" C ", FP); @@ -518,7 +518,7 @@ pcb_fprintf(FP, "Po %.0mk %.0mk\n", ps->x + cx - sox, ps->y + cy - soy); /* positions of pad */ fputs("Sh ", FP); /* pin shape descriptor */ - pcb_print_quoted_string(FP, (char *)PCB_EMPTY(ps->term)); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(ps->term)); pcb_fprintf(FP, " %c %.0mk %.0mk ", shape_chr, w, h); pcb_fprintf(FP, "0 0 %d\n", (int)(psrot*10.0)); /* deltaX deltaY Orientation as float in decidegrees */ Index: trunk/src_plugins/io_lihata/common.c =================================================================== --- trunk/src_plugins/io_lihata/common.c (revision 31004) +++ trunk/src_plugins/io_lihata/common.c (revision 31005) @@ -64,7 +64,7 @@ if (ver < 6) /* old file versions did not have explicit no-shape */ omit = 1; - for(n = 1; n < PCB_ENTRIES(thermal_style) - omit; n++) + for(n = 1; n < RND_ENTRIES(thermal_style) - omit; n++) if (strcmp(name, thermal_style[n]) == 0) return thermal_style_bits[n]; @@ -79,7 +79,7 @@ const char *io_lihata_thermal_style_old(int idx) { - if ((idx > 0) && (idx < PCB_ENTRIES(thermal_style))) + if ((idx > 0) && (idx < RND_ENTRIES(thermal_style))) return thermal_style[idx]; return NULL; } Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 31004) +++ trunk/src_plugins/io_lihata/read.c (revision 31005) @@ -198,7 +198,7 @@ if (nd->type != LHT_TEXT) return iolht_error(nd, "Invalid coord type: '%d'\n", nd->type); - tmp = pcb_get_value_ex(nd->data.text.value, NULL, NULL, NULL, NULL, &success); + tmp = rnd_get_value_ex(nd->data.text.value, NULL, NULL, NULL, NULL, &success); if (!success) return iolht_error(nd, "Invalid coord value: '%s'\n", nd->data.text.value); @@ -221,7 +221,7 @@ if (nd->type != LHT_TEXT) return iolht_error(nd, "Invalid angle type: '%d'\n", nd->type); - tmp = pcb_get_value_ex(nd->data.text.value, NULL, NULL, NULL, NULL, &success); + tmp = rnd_get_value_ex(nd->data.text.value, NULL, NULL, NULL, NULL, &success); if (!success) return iolht_error(nd, "Invalid angle value: '%s'\n", nd->data.text.value); Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 31004) +++ trunk/src_plugins/io_lihata/write.c (revision 31005) @@ -1462,8 +1462,8 @@ /* fprintf(stderr, "SMART d='%s' m='%s'\n", ondisk_value, inmem_node->data.text.value);*/ - v1 = pcb_get_value_ex(ondisk_value, NULL, NULL, NULL, NULL, &success1); - v2 = pcb_get_value_ex(inmem_node->data.text.value, NULL, NULL, NULL, NULL, &success2); + v1 = rnd_get_value_ex(ondisk_value, NULL, NULL, NULL, NULL, &success1); + v2 = rnd_get_value_ex(inmem_node->data.text.value, NULL, NULL, NULL, NULL, &success2); /* pcb_fprintf(stderr, " %d %d | %mm %mm\n", success1, success2, v1, v2);*/ if (success1 && success2) { /* smart: if values are the same, keep the on-disk version */ @@ -1568,7 +1568,7 @@ } if (res != 0) { FILE *fe; - char *fe_name = pcb_concat(old_filename, ".mem.lht", NULL); + char *fe_name = rnd_concat(old_filename, ".mem.lht", NULL); fe = pcb_fopen(&PCB->hidlib, fe_name, "w"); if (fe != NULL) { clean_invalid(brd->root); /* remove invalid nodes placed for persistency */ Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 31004) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 31005) @@ -182,7 +182,7 @@ if (end != NULL) *end = '\0'; - *crd = pcb_get_value(s, ctx->unit->suffix, NULL, &suc); + *crd = rnd_get_value(s, ctx->unit->suffix, NULL, &suc); return !suc; } @@ -219,8 +219,8 @@ sy++; - xx = pcb_get_value(s, ctx->unit->suffix, NULL, &suc1); - yy = pcb_get_value(sy, ctx->unit->suffix, NULL, &suc2); + xx = rnd_get_value(s, ctx->unit->suffix, NULL, &suc1); + yy = rnd_get_value(sy, ctx->unit->suffix, NULL, &suc2); if (xform) yy = -yy; @@ -255,9 +255,9 @@ *sr = '\0'; sr++; - xx = pcb_get_value(s, ctx->unit->suffix, NULL, &suc1); - yy = pcb_get_value(sy, ctx->unit->suffix, NULL, &suc2); - rr = pcb_get_value(sr, ctx->unit->suffix, NULL, &suc3); + xx = rnd_get_value(s, ctx->unit->suffix, NULL, &suc1); + yy = rnd_get_value(sy, ctx->unit->suffix, NULL, &suc2); + rr = rnd_get_value(sr, ctx->unit->suffix, NULL, &suc3); if (xform) yy = -yy; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 31004) +++ trunk/src_plugins/io_pcb/file.c (revision 31005) @@ -290,7 +290,7 @@ fprintf(FP, "FileVersion[%i]\n", PCBFileVersionNeeded()); fputs("\nPCB[", FP); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(PCB->hidlib.name)); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(PCB->hidlib.name)); pcb_fprintf(FP, " %[0] %[0]]\n\n", PCB->hidlib.size_x, PCB->hidlib.size_y); pcb_fprintf(FP, "Grid[%[0] %[0] %[0] %d]\n", PCB->hidlib.grid, PCB->hidlib.grid_ox, PCB->hidlib.grid_oy, rnd_conf.editor.draw_grid); pcb_fprintf(FP, "Cursor[%[0] %[0] 1000]\n", pcb_crosshair.X, pcb_crosshair.Y); @@ -361,7 +361,7 @@ pcb_fprintf(FP, "Via[%[0] %[0] %[0] %[0] %[0] %[0] ", x, y, pad_dia, clearance*2, mask, drill_dia); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(name)); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(name)); fprintf(FP, " %s]\n", pcb_strflg_f2s(pcb_pstk_compat_pinvia_flag(ps, cshape, PCB_PSTKCOMP_OLD_OCTAGON), PCB_OBJ_VIA, NULL, 1)); } } @@ -396,7 +396,7 @@ fprintf(FP, "\tNet("); pcb_print_quoted_string(FP, net->name); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_UNKNOWN(rnd_attribute_get(&net->Attributes, "style"))); + pcb_print_quoted_string(FP, (char *) RND_UNKNOWN(rnd_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(\""); @@ -449,10 +449,10 @@ const char *tmp; tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_x"); if (tmp != NULL) - rx = pcb_get_value(tmp, NULL, NULL, NULL) - ox; + rx = rnd_get_value(tmp, NULL, NULL, NULL) - ox; tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_y"); if (tmp != NULL) - ry = pcb_get_value(tmp, NULL, NULL, NULL) - oy; + ry = rnd_get_value(tmp, NULL, NULL, NULL) - oy; tmp = rnd_attribute_get(&sc->Attributes, "io_pcb::hidename_direction"); if (tmp != NULL) rdir = atoi(tmp); @@ -468,11 +468,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 *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "footprint"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "footprint"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "refdes"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "refdes"))); fputc(' ', FP); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&sc->Attributes, "value"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&sc->Attributes, "value"))); pcb_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); @@ -483,9 +483,9 @@ unsigned char ic = ps->intconn; if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { pcb_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 *)PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_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)) { @@ -492,9 +492,9 @@ unsigned long fl = (square ? PCB_FLAG_SQUARE : 0) | (nopaste ? PCB_FLAG_NOPASTE : 0) | (on_bot ? PCB_FLAG_ONSOLDER : 0); pcb_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 *)PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); + pcb_print_quoted_string(FP, (char *)RND_EMPTY(rnd_attribute_get(&ps->Attributes, "name"))); fprintf(FP, " "); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(rnd_attribute_get(&ps->Attributes, "term"))); fprintf(FP, " %s]\n", pcb_strflg_f2s(pcb_flag_make(fl), PCB_OBJ_PAD, &ic, 1)); } else @@ -608,7 +608,7 @@ /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer) || (layer->name && *layer->name)) { fprintf(FP, "Layer(%i ", (int) Number + 1); - pcb_print_quoted_string(FP, layer_name_hack(layer, PCB_EMPTY(layer->name))); + pcb_print_quoted_string(FP, layer_name_hack(layer, RND_EMPTY(layer->name))); fputs(")\n(\n", FP); WriteAttributeList(FP, &layer->Attributes, "\t", NULL); @@ -628,7 +628,7 @@ TODO("textrot: incompatibility warning") } pcb_fprintf(FP, "\tText[%[0] %[0] %d %d ", text->X, text->Y, dir, text->Scale); - pcb_print_quoted_string(FP, (char *) PCB_EMPTY(text->TextString)); + pcb_print_quoted_string(FP, (char *) RND_EMPTY(text->TextString)); fprintf(FP, " %s]\n", F2S(text, PCB_OBJ_TEXT)); } textlist_foreach(&layer->Polygon, &it, polygon) { Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 31004) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 31005) @@ -2604,7 +2604,7 @@ #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { - if (PCB_EMPTY_STRING_P(Executable)) { + if (RND_EMPTY_STRING_P(Executable)) { l = 2; if (Path != NULL) l += strlen(Path); Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 31004) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 31005) @@ -221,7 +221,7 @@ #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { - if (PCB_EMPTY_STRING_P(Executable)) { + if (RND_EMPTY_STRING_P(Executable)) { l = 2; if (Path != NULL) l += strlen(Path); Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 31004) +++ trunk/src_plugins/io_tedax/footprint.c (revision 31005) @@ -375,7 +375,7 @@ #define load_val(dst, src, msg) \ do { \ rnd_bool succ; \ - dst = pcb_get_value_ex(src, NULL, NULL, NULL, "mm", &succ); \ + dst = rnd_get_value_ex(src, NULL, NULL, NULL, "mm", &succ); \ if (!succ) { \ rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 31004) +++ trunk/src_plugins/io_tedax/stackup.c (revision 31005) @@ -185,7 +185,7 @@ if (thick != NULL) { if (grp->ltype & (PCB_LYT_SUBSTRATE | PCB_LYT_COPPER)) { rnd_bool succ; - double th = pcb_get_value(thick, NULL, NULL, &succ); + double th = rnd_get_value(thick, NULL, NULL, &succ); if (succ) { char tmp[64]; pcb_sprintf(tmp, "%mu", (rnd_coord_t)th); Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 31004) +++ trunk/src_plugins/io_tedax/tboard.c (revision 31005) @@ -369,13 +369,13 @@ rnd_coord_t x1, y1, x2, y2; reqarg("drawing_area", 5); - x1 = pcb_get_value(argv[1], "mm", NULL, &succ); + x1 = rnd_get_value(argv[1], "mm", NULL, &succ); if (!succ) errexit("Invalid x1 coord in drawing_area\n"); - y1 = pcb_get_value(argv[2], "mm", NULL, &succ); + y1 = rnd_get_value(argv[2], "mm", NULL, &succ); if (!succ) errexit("Invalid y1 coord in drawing_area\n"); - x2 = pcb_get_value(argv[3], "mm", NULL, &succ); + x2 = rnd_get_value(argv[3], "mm", NULL, &succ); if (!succ) errexit("Invalid x2 coord in drawing_area\n"); - y2 = pcb_get_value(argv[4], "mm", NULL, &succ); + y2 = rnd_get_value(argv[4], "mm", NULL, &succ); if (!succ) errexit("Invalid y2 coord in drawing_area\n"); if ((x1 >= x2) || (y1 >= y2)) errexit("Invalid (unordered, negative box) drawing area\n"); if ((x1 < 0) || (y1 < 0)) rnd_message(RND_MSG_WARNING, "drawing_area starts at negative coords; some objects may not display;\nyou may want to run autocrop()\n"); @@ -403,9 +403,9 @@ reqarg("place", 8); - ox = pcb_get_value(argv[3], "mm", NULL, &succ); + ox = rnd_get_value(argv[3], "mm", NULL, &succ); if (!succ) errexit("Invalid ox coord in place\n"); - oy = pcb_get_value(argv[4], "mm", NULL, &succ); + oy = rnd_get_value(argv[4], "mm", NULL, &succ); if (!succ) errexit("Invalid ox coord in place\n"); rot = strtod(argv[5], &end); if (*end != '\0') errexit("Invalid rotation value in place\n"); @@ -442,13 +442,13 @@ reqarg("place_text", 10); - x1 = pcb_get_value(argv[3], "mm", NULL, &succ); + x1 = rnd_get_value(argv[3], "mm", NULL, &succ); if (!succ) errexit("Invalid x1 coord in place_text\n"); - y1 = pcb_get_value(argv[4], "mm", NULL, &succ); + y1 = rnd_get_value(argv[4], "mm", NULL, &succ); if (!succ) errexit("Invalid y1 coord in place_text\n"); - x2 = pcb_get_value(argv[5], "mm", NULL, &succ); + x2 = rnd_get_value(argv[5], "mm", NULL, &succ); if (!succ) errexit("Invalid x2 coord in place_text\n"); - y2 = pcb_get_value(argv[6], "mm", NULL, &succ); + y2 = rnd_get_value(argv[6], "mm", NULL, &succ); if (!succ) errexit("Invalid y2 coord in place_text\n"); rot = strtod(argv[8], &end); if (*end != '\0') errexit("Invalid rotation value in place_text\n"); Index: trunk/src_plugins/io_tedax/tdrc.c =================================================================== --- trunk/src_plugins/io_tedax/tdrc.c (revision 31004) +++ trunk/src_plugins/io_tedax/tdrc.c (revision 31005) @@ -108,7 +108,7 @@ rnd_bool succ; if ((strcmp(argv[2], r->ttype) != 0) || (strcmp(argv[3], r->tkind) != 0)) continue; - d = pcb_get_value(argv[4], "mm", NULL, &succ); + d = rnd_get_value(argv[4], "mm", NULL, &succ); if (succ) { if (d > val[n]) val[n] = d; Index: trunk/src_plugins/io_tedax/tlayer.c =================================================================== --- trunk/src_plugins/io_tedax/tlayer.c (revision 31004) +++ trunk/src_plugins/io_tedax/tlayer.c (revision 31005) @@ -171,8 +171,8 @@ if ((argc == 3) && (strcmp(argv[0], "v") == 0)) { rnd_bool s1, s2; - vtc0_append(coords, pcb_get_value(argv[1], "mm", NULL, &s1)); - vtc0_append(coords, pcb_get_value(argv[2], "mm", NULL, &s2)); + vtc0_append(coords, rnd_get_value(argv[1], "mm", NULL, &s1)); + vtc0_append(coords, rnd_get_value(argv[2], "mm", NULL, &s2)); if (!s1 || !s2) { rnd_message(RND_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); res = -1; @@ -221,17 +221,17 @@ rnd_coord_t x1, y1, x2, y2, th, cl; rnd_bool s1, s2, s3, s4; - x1 = pcb_get_value(argv[1], "mm", NULL, &s1); - y1 = pcb_get_value(argv[2], "mm", NULL, &s2); - x2 = pcb_get_value(argv[3], "mm", NULL, &s3); - y2 = pcb_get_value(argv[4], "mm", NULL, &s4); + x1 = rnd_get_value(argv[1], "mm", NULL, &s1); + y1 = rnd_get_value(argv[2], "mm", NULL, &s2); + x2 = rnd_get_value(argv[3], "mm", NULL, &s3); + y2 = rnd_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { rnd_message(RND_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); res = -1; goto error; } - th = pcb_get_value(argv[5], "mm", NULL, &s1); - cl = pcb_get_value(argv[6], "mm", NULL, &s2); + th = rnd_get_value(argv[5], "mm", NULL, &s1); + cl = rnd_get_value(argv[6], "mm", NULL, &s2); if (!s1 || !s2) { rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); res = -1; @@ -244,9 +244,9 @@ double sa, da; rnd_bool s1, s2, s3; - cx = pcb_get_value(argv[1], "mm", NULL, &s1); - cy = pcb_get_value(argv[2], "mm", NULL, &s2); - r = pcb_get_value(argv[3], "mm", NULL, &s3); + cx = rnd_get_value(argv[1], "mm", NULL, &s1); + cy = rnd_get_value(argv[2], "mm", NULL, &s2); + r = rnd_get_value(argv[3], "mm", NULL, &s3); if (!s1 || !s2 || !s3) { rnd_message(RND_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); res = -1; @@ -264,8 +264,8 @@ res = -1; goto error; } - th = pcb_get_value(argv[6], "mm", NULL, &s1); - cl = pcb_get_value(argv[7], "mm", NULL, &s2); + th = rnd_get_value(argv[6], "mm", NULL, &s1); + cl = rnd_get_value(argv[7], "mm", NULL, &s2); if (!s1 || !s2) { rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); res = -1; @@ -279,10 +279,10 @@ double rot, zx, zy, z; pcb_text_t *text; - bx1 = pcb_get_value(argv[1], "mm", NULL, &s1); - by1 = pcb_get_value(argv[2], "mm", NULL, &s2); - bx2 = pcb_get_value(argv[3], "mm", NULL, &s3); - by2 = pcb_get_value(argv[4], "mm", NULL, &s4); + bx1 = rnd_get_value(argv[1], "mm", NULL, &s1); + by1 = rnd_get_value(argv[2], "mm", NULL, &s2); + bx2 = rnd_get_value(argv[3], "mm", NULL, &s3); + by2 = rnd_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { rnd_message(RND_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); res = -1; @@ -320,8 +320,8 @@ rnd_coord_t ox, oy; pcb_poly_t *poly; - ox = pcb_get_value(argv[2], "mm", NULL, &s1); - oy = pcb_get_value(argv[3], "mm", NULL, &s2); + ox = rnd_get_value(argv[2], "mm", NULL, &s1); + oy = rnd_get_value(argv[3], "mm", NULL, &s2); if (!s1 || !s2) { rnd_message(RND_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); res = -1; Index: trunk/src_plugins/lib_compat_help/elem_rot.c =================================================================== --- trunk/src_plugins/lib_compat_help/elem_rot.c (revision 31004) +++ trunk/src_plugins/lib_compat_help/elem_rot.c (revision 31005) @@ -143,7 +143,7 @@ pin_cnt++; for (rpindex = 0; reference_pin_names[rpindex]; rpindex++) { - if (PCB_NSTRCMP(o->term, reference_pin_names[rpindex]) == 0) { + if (RND_NSTRCMP(o->term, reference_pin_names[rpindex]) == 0) { pinx[rpindex] = (double)px; piny[rpindex] = (double)py; pinfound[rpindex] = 1; @@ -155,7 +155,7 @@ centroidx = sumx / (double) pin_cnt; centroidy = sumy / (double) pin_cnt; - if (!autodetect && (PCB_NSTRCMP(rnd_attribute_get(&subc->Attributes, "xy-centre"), "origin") == 0)) { + if (!autodetect && (RND_NSTRCMP(rnd_attribute_get(&subc->Attributes, "xy-centre"), "origin") == 0)) { *cx = ox; *cy = oy; } @@ -186,7 +186,7 @@ pin1y = piny[rpindex] - *cy; if (verbose_rot) - rnd_trace("\npcb_subc_xy_rot: %s pin_cnt=%d pin1x=%d pin1y=%d\n", PCB_UNKNOWN(subc->refdes), pin_cnt, pin1x, pin1y); + rnd_trace("\npcb_subc_xy_rot: %s pin_cnt=%d pin1x=%d pin1y=%d\n", RND_UNKNOWN(subc->refdes), pin_cnt, pin1x, pin1y); /* if only 1 pin, we are doomed */ if (pin_cnt == 1) { @@ -215,13 +215,13 @@ rnd_message (RND_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle because I could\n" " not find a suitable reference pin of element %s\n" - " Setting to %g degrees\n", PCB_UNKNOWN(subc->refdes), *theta); + " Setting to %g degrees\n", RND_UNKNOWN(subc->refdes), *theta); } else if (!found_any_not_at_centroid) { rnd_message (RND_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle of element\n" " %s because the reference pin(s) are at the centroid of the part.\n" - " Setting to %g degrees\n", PCB_UNKNOWN(subc->refdes), *theta); + " Setting to %g degrees\n", RND_UNKNOWN(subc->refdes), *theta); } } } Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 31004) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 31005) @@ -204,7 +204,7 @@ char *acc = NULL, *s; if (n_keydesc != NULL) acc = rnd_hid_cfg_keys_gen_accel(&ghid_keymap, n_keydesc, -1, "\nhotkey: "); - s = pcb_concat((tip == NULL ? "" : tip), "\nhotkey: ", (acc == NULL ? "" : acc), NULL); + s = rnd_concat((tip == NULL ? "" : tip), "\nhotkey: ", (acc == NULL ? "" : acc), NULL); gtk_widget_set_tooltip_text(item, s); free(s); } Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31004) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31005) @@ -154,7 +154,7 @@ memset(&flt_local, 0, sizeof(flt_local)); flt_local[0].name = default_ext; flt_local[0].pat = malloc(sizeof(char *) * 2); - flt_local[0].pat[0] = pcb_concat("*", default_ext, NULL); + flt_local[0].pat[0] = rnd_concat("*", default_ext, NULL); flt_local[0].pat[1] = NULL; flt_local[1] = rnd_hid_fsd_filter_any[0]; flt = flt_local; Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 31004) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 31005) @@ -53,7 +53,7 @@ { char *cache, *cmd, *s; /* set up gdk pixmap modules - without this XPMs won't be loaded */ - cache = pcb_concat(rnd_w32_cachedir, "\\gdk-pixmap-loaders.cache", NULL); + cache = rnd_concat(rnd_w32_cachedir, "\\gdk-pixmap-loaders.cache", NULL); rnd_setenv("GDK_PIXBUF_MODULE_FILE", cache, 1); for(s = cache; *s != '\0'; s++) @@ -60,7 +60,7 @@ if (*s == '\\') *s = '/'; if (!rnd_file_readable(cache)) { - cmd = pcb_concat(rnd_w32_bindir, "\\gdk-pixbuf-query-loaders --update-cache", NULL); + cmd = rnd_concat(rnd_w32_bindir, "\\gdk-pixbuf-query-loaders --update-cache", NULL); fprintf(stderr, "pcb-rnd: updating gdk loader cache: '%s'...\n", cache); system(cmd); free(cmd); Index: trunk/src_plugins/lib_hid_common/dlg_comm_m.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 31004) +++ trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 31005) @@ -68,7 +68,7 @@ RND_DAD_END(dlg); if (title == NULL) { - title = pcb_concat(rnd_app_package, " user input", NULL); + title = rnd_concat(rnd_app_package, " user input", NULL); ft = 1; } RND_DAD_NEW("prompt_for", dlg, title, NULL, pcb_true, NULL); Index: trunk/src_plugins/lib_hid_common/dlg_log.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_log.c (revision 31004) +++ trunk/src_plugins/lib_hid_common/dlg_log.c (revision 31005) @@ -168,7 +168,7 @@ ctx->active = 1; ctx->last_added = -1; RND_DAD_DEFSIZE(ctx->dlg, 200, 300); - title = pcb_concat(rnd_app_package, " message log", NULL); + title = rnd_concat(rnd_app_package, " message log", NULL); RND_DAD_NEW("log", ctx->dlg, title, ctx, pcb_false, log_close_cb); free(title); Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31004) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31005) @@ -453,7 +453,7 @@ else { if (op != NULL) { rnd_bool succ; - period = pcb_get_value(op, NULL, NULL, &succ); + period = rnd_get_value(op, NULL, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "Invalid spacing value - must be a coordinate\n"); return -1; Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 31004) +++ trunk/src_plugins/millpath/toolpath.c (revision 31005) @@ -515,7 +515,7 @@ rnd_coord_t extra = 1000; req_setup(1); if (argc > 1) tool = atoi(argv[1]); - if (argc > 2) extra = pcb_get_value(argv[2], NULL, NULL, NULL); + if (argc > 2) extra = rnd_get_value(argv[2], NULL, NULL, NULL); trace_contour(pcb, result, tool, extra); } else if (strcmp(argv[0], "trace_spiral") == 0) { @@ -524,7 +524,7 @@ rnd_coord_t extra = 1000; req_setup(1); if (argc > 1) tool = atoi(argv[1]); - if (argc > 2) extra = pcb_get_value(argv[2], NULL, NULL, NULL); + if (argc > 2) extra = rnd_get_value(argv[2], NULL, NULL, NULL); if (argc > 3) passes = strtol(argv[3], NULL, 10); trace_spiral(pcb, result, tool, extra, passes); } Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 31004) +++ trunk/src_plugins/oldactions/oldactions.c (revision 31005) @@ -235,7 +235,7 @@ PCB_SUBC_LOOP(PCB->Data); { double rot; - const char *refdes = PCB_UNKNOWN(subc->refdes); + const char *refdes = RND_UNKNOWN(subc->refdes); if (pcb_subc_get_rotation(subc, &rot) == 0) rnd_message(RND_MSG_INFO, "%f %s\n", rot, refdes); else Index: trunk/src_plugins/order_pcbway/pcbway.c =================================================================== --- trunk/src_plugins/order_pcbway/pcbway.c (revision 31004) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 31005) @@ -96,7 +96,7 @@ int res = 0; wopts.header = (const char **)hdr; - hdr[0] = pcb_concat("api-key: ", CFG.api_key, NULL); + hdr[0] = rnd_concat("api-key: ", CFG.api_key, NULL); hdr[1] = "Content-Type: application/xml"; hdr[2] = "Accept: application/xml"; hdr[3] = NULL; @@ -359,7 +359,7 @@ val = __n__->children->content; \ RND_DAD_LABEL(dlg, (char *)__n__->name); \ if ((val != NULL) && (xmlStrcmp(__n__->name, (xmlChar *)pricetag) == 0)) { \ - char *__end__, *__tmp__ = pcb_concat("$", val, NULL); \ + char *__end__, *__tmp__ = rnd_concat("$", val, NULL); \ RND_DAD_LABEL(dlg, __tmp__); \ free(__tmp__); \ __prc__ = strtod(val, &__end__); \ @@ -507,7 +507,7 @@ pcb_wget_opts_t wopts; wopts.header = (const char **)hdr; - hdr[0] = pcb_concat("api-key: ", CFG.api_key, NULL); + hdr[0] = rnd_concat("api-key: ", CFG.api_key, NULL); hdr[1] = "Content-Type: application/xml"; hdr[2] = "Accept: application/xml"; hdr[3] = NULL; Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 31004) +++ trunk/src_plugins/propedit/propsel.c (revision 31005) @@ -906,7 +906,7 @@ } else sctx.d_absolute = ((*start != '-') && (*start != '+')); - sctx.c = pcb_get_value_ex(start, NULL, &sctx.c_absolute, NULL, NULL, &sctx.c_valid); + sctx.c = rnd_get_value_ex(start, NULL, &sctx.c_absolute, NULL, NULL, &sctx.c_valid); sctx.d = strtod(start, &end); sctx.d_valid = (*end == '\0'); sctx.set_cnt = 0; Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 31004) +++ trunk/src_plugins/puller/puller.c (revision 31005) @@ -717,7 +717,7 @@ { rnd_coord_t cx = shape->data.circ.x + ps->x, cy = shape->data.circ.y + ps->y; double max_dist2 = ((double)shape->data.circ.dia/2.0) * ((double)shape->data.circ.dia/2.0); - double dist2 = pcb_distance2(cx, cy, x, y); + double dist2 = rnd_distance2(cx, cy, x, y); return (dist2 <= max_dist2); } case PCB_PSSH_HSHADOW: Index: trunk/src_plugins/query/query_y.c =================================================================== --- trunk/src_plugins/query/query_y.c (revision 31004) +++ trunk/src_plugins/query/query_y.c (revision 31005) @@ -1866,7 +1866,7 @@ pcb_qry_node_t *fname, *nname; nname = pcb_qry_n_alloc(PCBQ_DATA_STRING); - nname->data.str = pcb_concat("design/drc/", (yyvsp[0].s), NULL); + nname->data.str = rnd_concat("design/drc/", (yyvsp[0].s), NULL); free((yyvsp[0].s)); fname = pcb_qry_n_alloc(PCBQ_FNAME); @@ -1929,7 +1929,7 @@ #line 364 "query_y.y" /* yacc.c:1652 */ { char *old = (yyvsp[0].n)->data.str, *sep = ((*old != '\0') ? " " : ""); - (yyvsp[0].n)->data.str = pcb_concat((yyvsp[-1].s), sep, old, NULL); + (yyvsp[0].n)->data.str = rnd_concat((yyvsp[-1].s), sep, old, NULL); free(old); free((yyvsp[-1].s)); (yyval.n) = (yyvsp[0].n); Index: trunk/src_plugins/query/query_y.y =================================================================== --- trunk/src_plugins/query/query_y.y (revision 31004) +++ trunk/src_plugins/query/query_y.y (revision 31005) @@ -322,7 +322,7 @@ pcb_qry_node_t *fname, *nname; nname = pcb_qry_n_alloc(PCBQ_DATA_STRING); - nname->data.str = pcb_concat("design/drc/", $2, NULL); + nname->data.str = rnd_concat("design/drc/", $2, NULL); free($2); fname = pcb_qry_n_alloc(PCBQ_FNAME); @@ -363,7 +363,7 @@ /* empty */ { $$ = pcb_qry_n_alloc(PCBQ_RNAME); $$->data.str = (const char *)rnd_strdup(""); } | T_STR words { char *old = $2->data.str, *sep = ((*old != '\0') ? " " : ""); - $2->data.str = pcb_concat($1, sep, old, NULL); + $2->data.str = rnd_concat($1, sep, old, NULL); free(old); free($1); $$ = $2; Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 31004) +++ trunk/src_plugins/renumber/renumber.c (revision 31005) @@ -165,7 +165,7 @@ /* add to the list of locked subcircuits which we won't try to renumber and whose reference designators are now reserved. */ pcb_fprintf(out, "*WARN* subc \"%s\" at %$md is locked and will not be renumbered.\n", - PCB_UNKNOWN(subc->refdes), ox, oy); + RND_UNKNOWN(subc->refdes), ox, oy); locked_subc_list[lock_cnt] = subc; lock_cnt++; } @@ -261,7 +261,7 @@ * subcircuits) names */ for (k = 0; k < lock_cnt; k++) { - if (strcmp(PCB_UNKNOWN(locked_subc_list[k]->refdes), tmps) == 0) { + if (strcmp(RND_UNKNOWN(locked_subc_list[k]->refdes), tmps) == 0) { ok = 0; break; } Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 31004) +++ trunk/src_plugins/report/report.c (revision 31005) @@ -310,8 +310,8 @@ subc->ID, pcb_strflg_f2s(subc->Flags, PCB_OBJ_SUBC, NULL, 0), subc->BoundingBox.X1, subc->BoundingBox.Y1, subc->BoundingBox.X2, subc->BoundingBox.Y2, - PCB_EMPTY(subc->refdes), - PCB_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint")), + RND_EMPTY(subc->refdes), + RND_EMPTY(rnd_attribute_get(&subc->Attributes, "footprint")), gen_locked(subc)); } Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 31004) +++ trunk/src_plugins/script/live_script.c (revision 31005) @@ -211,7 +211,7 @@ lvs->hidlib = hidlib; lvs->name = rnd_strdup(name); - lvs->longname = pcb_concat("_live_script_", name, NULL); + lvs->longname = rnd_concat("_live_script_", name, NULL); RND_DAD_BEGIN_VBOX(lvs->dlg); RND_DAD_COMPFLAG(lvs->dlg, RND_HATF_EXPFILL); RND_DAD_TEXT(lvs->dlg, lvs); @@ -259,7 +259,7 @@ RND_DAD_END(lvs->dlg); RND_DAD_DEFSIZE(lvs->dlg, 300, 500); - title = pcb_concat("Live Scripting: ", name, NULL); + title = rnd_concat("Live Scripting: ", name, NULL); RND_DAD_NEW("live_script", lvs->dlg, title, lvs, pcb_false, lvs_close_cb); free(title); rnd_gui->attr_dlg_widget_state(lvs->dlg_hid_ctx, lvs->wstop, 0); @@ -401,7 +401,7 @@ const char *default_ext = live_default_ext(lvs); if (lvs->fn == NULL) - lvs->fn = pcb_concat(lvs->name, ".", default_ext, NULL); + lvs->fn = rnd_concat(lvs->name, ".", default_ext, NULL); fn = rnd_gui->fileselect(rnd_gui, "Save live script", "Save the source of a live script", Index: trunk/src_plugins/script/script.c =================================================================== --- trunk/src_plugins/script/script.c (revision 31004) +++ trunk/src_plugins/script/script.c (revision 31005) @@ -172,7 +172,7 @@ goto err; } - fn = pcb_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, DOT_PCB_RND, RND_DIR_SEPARATOR_S, SCRIPT_PERS, RND_DIR_SEPARATOR_S, script_persistency_id, NULL); + fn = rnd_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, DOT_PCB_RND, RND_DIR_SEPARATOR_S, SCRIPT_PERS, RND_DIR_SEPARATOR_S, script_persistency_id, NULL); if (strcmp(cmd, "remove") == 0) { RND_ACT_IRES(pcb_remove(NULL, fn)); @@ -230,7 +230,7 @@ } force_id = script_persistency_id; } - return pcb_concat("script::fungw::", force_id, NULL); + return rnd_concat("script::fungw::", force_id, NULL); } int pcb_script_unload(const char *id, const char *preunload) Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 31004) +++ trunk/src_plugins/shand_cmd/command.c (revision 31005) @@ -149,7 +149,7 @@ if (PCB->Netlistname) free(PCB->Netlistname); - PCB->Netlistname = pcb_strdup_strip_wspace(filename); + PCB->Netlistname = rnd_strdup_strip_wspace(filename); RND_ACT_IRES(0); return 0; Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 31004) +++ trunk/src_plugins/shape/shape.c (revision 31005) @@ -336,9 +336,9 @@ tmp[offs] = '\0'; sx = tmp; sy = tmp + offs + 1; - *x = pcb_get_value(sx, NULL, NULL, &succ); + *x = rnd_get_value(sx, NULL, NULL, &succ); if (succ) - *y = pcb_get_value(sy, NULL, NULL, &succ); + *y = rnd_get_value(sy, NULL, NULL, &succ); free(tmp); if (!succ) { rnd_message(RND_MSG_ERROR, "regpoly(): invalid center coords '%s'\n", dst); @@ -365,13 +365,13 @@ tmp[offs] = '\0'; sx = tmp; sy = tmp + offs + 1; - *rx = pcb_get_value(sx, NULL, NULL, &succ); + *rx = rnd_get_value(sx, NULL, NULL, &succ); if (succ) - *ry = pcb_get_value(sy, NULL, NULL, &succ); + *ry = rnd_get_value(sy, NULL, NULL, &succ); free(tmp); } else - *rx = *ry = pcb_get_value(dst, NULL, NULL, &succ); + *rx = *ry = rnd_get_value(dst, NULL, NULL, &succ); return succ; } @@ -591,7 +591,7 @@ return 0; } - dia = pcb_get_value(args[a], NULL, NULL, &succ); + dia = rnd_get_value(args[a], NULL, NULL, &succ); if (!succ) { rnd_message(RND_MSG_ERROR, "circle(): failed to convert dia: invalid coord (%s)\n", args[a]); RND_ACT_IRES(1); Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 31004) +++ trunk/src_plugins/teardrops/teardrops.c (revision 31005) @@ -56,7 +56,7 @@ PCB_COORD_TO_MM(l->Point1.X), PCB_COORD_TO_MM(l->Point1.Y), PCB_COORD_TO_MM(l->Point2.X), PCB_COORD_TO_MM(l->Point2.Y)); /* if our line is to short ignore it */ - if (pcb_distance2(l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y) < MIN_LINE_LENGTH2) { + if (rnd_distance2(l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y) < MIN_LINE_LENGTH2) { fprintf(stderr, "not within max line length\n"); return 1; } @@ -63,7 +63,7 @@ fprintf(stderr, "......Point (%.6f, %.6f): ", PCB_COORD_TO_MM(px), PCB_COORD_TO_MM(py)); - if (pcb_distance2(l->Point1.X, l->Point1.Y, px, py) < MAX_DISTANCE2) { + if (rnd_distance2(l->Point1.X, l->Point1.Y, px, py) < MAX_DISTANCE2) { x1 = l->Point1.X; y1 = l->Point1.Y; x2 = l->Point2.X; @@ -211,7 +211,7 @@ mindist = PCB_MM_TO_COORD(8); mindist *= mindist; for(n = 0; n < shp->data.poly.len; n++) { - double dist = pcb_distance2(px, py, shp->data.poly.x[n], shp->data.poly.y[n]); + double dist = rnd_distance2(px, py, shp->data.poly.x[n], shp->data.poly.y[n]); if (dist < mindist) mindist = dist; } Index: trunk/src_plugins/tool_std/tool_arc.c =================================================================== --- trunk/src_plugins/tool_std/tool_arc.c (revision 31004) +++ trunk/src_plugins/tool_std/tool_arc.c (revision 31005) @@ -94,7 +94,7 @@ wx = hl->tool_x - pcb_crosshair.AttachedBox.Point1.X; wy = hl->tool_y - pcb_crosshair.AttachedBox.Point1.Y; rnd_trace("arc: %mm %mm wh %mm %mm\n", hl->tool_x, hl->tool_y, wx, wy); - if (PCB_XOR(pcb_crosshair.AttachedBox.otherway, coord_abs(wy) > coord_abs(wx))) { + if (RND_XOR(pcb_crosshair.AttachedBox.otherway, coord_abs(wy) > coord_abs(wx))) { pcb_crosshair.AttachedBox.Point2.X = pcb_crosshair.AttachedBox.Point1.X + coord_abs(wy) * RND_SGNZ(wx); sa = (wx >= 0) ? 0 : 180; dir = (RND_SGNZ(wx) == RND_SGNZ(wy)) ? 90 : -90; Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 31004) +++ trunk/src_plugins/vendordrill/vendor.c (revision 31005) @@ -174,7 +174,7 @@ } /* figure out the vendor name, if specified */ - vendor_name = (char *) PCB_UNKNOWN(rnd_hid_cfg_text_value(doc, "vendor")); + vendor_name = (char *) RND_UNKNOWN(rnd_hid_cfg_text_value(doc, "vendor")); /* figure out the units, if specified */ sval = rnd_hid_cfg_text_value(doc, "/units"); @@ -181,13 +181,13 @@ if (sval == NULL) { sf = PCB_MIL_TO_COORD(1); } - else if ((PCB_NSTRCMP(sval, "mil") == 0) || (PCB_NSTRCMP(sval, "mils") == 0)) { + else if ((RND_NSTRCMP(sval, "mil") == 0) || (RND_NSTRCMP(sval, "mils") == 0)) { sf = PCB_MIL_TO_COORD(1); } - else if ((PCB_NSTRCMP(sval, "inch") == 0) || (PCB_NSTRCMP(sval, "inches") == 0)) { + else if ((RND_NSTRCMP(sval, "inch") == 0) || (RND_NSTRCMP(sval, "inches") == 0)) { sf = PCB_INCH_TO_COORD(1); } - else if (PCB_NSTRCMP(sval, "mm") == 0) { + else if (RND_NSTRCMP(sval, "mm") == 0) { sf = PCB_MM_TO_COORD(1); } else { @@ -199,10 +199,10 @@ rounding_method = ROUND_UP; sval = rnd_hid_cfg_text_value(doc, "/round"); if (sval != NULL) { - if (PCB_NSTRCMP(sval, "up") == 0) { + if (RND_NSTRCMP(sval, "up") == 0) { rounding_method = ROUND_UP; } - else if (PCB_NSTRCMP(sval, "nearest") == 0) { + else if (RND_NSTRCMP(sval, "nearest") == 0) { rounding_method = CLOSEST; } else { @@ -501,15 +501,15 @@ for(n = res->data.list.first; n != NULL; n = n->next) { if (n->type == LHT_TEXT) { - if (PCB_NSTRCMP(n->name, "refdes") == 0) { + if (RND_NSTRCMP(n->name, "refdes") == 0) { cnt = &n_refdes; lst = &ignore_refdes; } - else if (PCB_NSTRCMP(n->name, "value") == 0) { + else if (RND_NSTRCMP(n->name, "value") == 0) { cnt = &n_value; lst = &ignore_value; } - else if (PCB_NSTRCMP(n->name, "descr") == 0) { + else if (RND_NSTRCMP(n->name, "descr") == 0) { cnt = &n_descr; lst = &ignore_descr; } @@ -542,9 +542,9 @@ TODO(": these 3 loops should be wrapped in a single loop that iterates over attribute keys") noskip = 1; for (i = 0; i < n_refdes; i++) { - if ((PCB_NSTRCMP(PCB_UNKNOWN(subc->refdes), ignore_refdes[i]) == 0) - || rematch(ignore_refdes[i], PCB_UNKNOWN(subc->refdes))) { - rnd_message(RND_MSG_INFO, "Vendor mapping skipped because refdes = %s matches %s\n", PCB_UNKNOWN(subc->refdes), ignore_refdes[i]); + if ((RND_NSTRCMP(RND_UNKNOWN(subc->refdes), ignore_refdes[i]) == 0) + || rematch(ignore_refdes[i], RND_UNKNOWN(subc->refdes))) { + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because refdes = %s matches %s\n", RND_UNKNOWN(subc->refdes), ignore_refdes[i]); noskip = 0; } } @@ -551,9 +551,9 @@ if (noskip) { const char *vl = rnd_attribute_get(&subc->Attributes, "value"); for (i = 0; i < n_value; i++) { - if ((PCB_NSTRCMP(PCB_UNKNOWN(vl), ignore_value[i]) == 0) - || rematch(ignore_value[i], PCB_UNKNOWN(vl))) { - rnd_message(RND_MSG_INFO, "Vendor mapping skipped because value = %s matches %s\n", PCB_UNKNOWN(vl), ignore_value[i]); + if ((RND_NSTRCMP(RND_UNKNOWN(vl), ignore_value[i]) == 0) + || rematch(ignore_value[i], RND_UNKNOWN(vl))) { + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because value = %s matches %s\n", RND_UNKNOWN(vl), ignore_value[i]); noskip = 0; } } @@ -562,11 +562,11 @@ if (noskip) { const char *fp = rnd_attribute_get(&subc->Attributes, "footprint"); for (i = 0; i < n_descr; i++) { - if ((PCB_NSTRCMP(PCB_UNKNOWN(fp), ignore_descr[i]) == 0) - || rematch(ignore_descr[i], PCB_UNKNOWN(fp))) { + if ((RND_NSTRCMP(RND_UNKNOWN(fp), ignore_descr[i]) == 0) + || rematch(ignore_descr[i], RND_UNKNOWN(fp))) { rnd_message(RND_MSG_INFO, "Vendor mapping skipped because descr = %s matches %s\n", - PCB_UNKNOWN(fp), ignore_descr[i]); + RND_UNKNOWN(fp), ignore_descr[i]); noskip = 0; } } @@ -573,7 +573,7 @@ } if (noskip && PCB_FLAG_TEST(PCB_FLAG_LOCK, subc)) { - rnd_message(RND_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", PCB_UNKNOWN(subc->refdes)); + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", RND_UNKNOWN(subc->refdes)); noskip = 0; } Index: trunk/tests/pcb-printf/prcli.c =================================================================== --- trunk/tests/pcb-printf/prcli.c (revision 31004) +++ trunk/tests/pcb-printf/prcli.c (revision 31005) @@ -16,7 +16,7 @@ for(n = 2; n < argc; n++) { rnd_bool success; - double val = pcb_get_value_ex(argv[n], NULL, NULL, NULL, "", &success); + double val = rnd_get_value_ex(argv[n], NULL, NULL, NULL, "", &success); if (!success) { fprintf(stderr, "Unable to convert '%s' to rnd_coord_t\n", argv[n]); return 1; Index: trunk/tests/strflags/tester.c =================================================================== --- trunk/tests/strflags/tester.c (revision 31004) +++ trunk/tests/strflags/tester.c (revision 31005) @@ -82,7 +82,7 @@ otype = PCB_OBJ_ANY; fh.Flags = empty_flags; - for (i = 0; i < PCB_ENTRIES(pcb_object_flagbits); i++) { + for (i = 0; i < RND_ENTRIES(pcb_object_flagbits); i++) { if (PCB_FLAG_TEST(pcb_object_flagbits[i].mask, &fh)) continue; if ((otype & pcb_object_flagbits[i].object_types) == 0) @@ -122,7 +122,7 @@ otype = PCB_OBJ_ANY; fh.Flags = empty_flags; - for (i = 0; i < PCB_ENTRIES(pcb_flagbits); i++) { + for (i = 0; i < RND_ENTRIES(pcb_flagbits); i++) { if (PCB_FLAG_TEST(pcb_flagbits[i].mask, &fh)) continue; if ((random() & 4) == 0) Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 31004) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 31005) @@ -270,7 +270,7 @@ load_project("/etc/gsch2pcb"); load_project("/usr/local/etc/gsch2pcb"); - path = pcb_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, ".gEDA", RND_DIR_SEPARATOR_S, "gsch2pcb", NULL); + path = rnd_concat(rnd_conf.rc.path.home, RND_DIR_SEPARATOR_S, ".gEDA", RND_DIR_SEPARATOR_S, "gsch2pcb", NULL); load_project(path); free(path); @@ -390,12 +390,12 @@ method_import_register(); rnd_conf_userdir_path = CONF_USER_DIR; - rnd_pcphl_conf_user_path = pcb_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); + rnd_pcphl_conf_user_path = rnd_concat(CONF_USER_DIR, "/pcb-conf.lht", NULL); rnd_conf_sysdir_path = PCBCONFDIR; - rnd_conf_sys_path = pcb_concat(PCBCONFDIR, "/pcb-conf.lht", NULL); + rnd_conf_sys_path = rnd_concat(PCBCONFDIR, "/pcb-conf.lht", NULL); rnd_menu_file_paths[0] = "./"; rnd_menu_file_paths[1] = "~/.pcb-rnd/"; - rnd_menu_file_paths[2] = pcb_concat(PCBCONFDIR, "/", NULL); + rnd_menu_file_paths[2] = rnd_concat(PCBCONFDIR, "/", NULL); rnd_menu_file_paths[3] = NULL; rnd_file_loaded_init(); Index: trunk/util/gsch2pcb-rnd/method_import.c =================================================================== --- trunk/util/gsch2pcb-rnd/method_import.c (revision 31004) +++ trunk/util/gsch2pcb-rnd/method_import.c (revision 31005) @@ -41,9 +41,9 @@ static void method_import_init(void) { - pcb_file_name = pcb_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".pcb", NULL); - cmd_file_name = pcb_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".cmd", NULL); - net_file_name = pcb_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".net", NULL); + pcb_file_name = rnd_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".pcb", NULL); + cmd_file_name = rnd_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".cmd", NULL); + net_file_name = rnd_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".net", NULL); local_project_pcb_name = pcb_file_name; } @@ -104,11 +104,11 @@ int res; char *name; - name = pcb_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".lht", NULL); + name = rnd_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".lht", NULL); res = rnd_file_readable(name); free(name); if (!res) { - name = pcb_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".pcb.lht", NULL); + name = rnd_concat(conf_g2pr.utils.gsch2pcb_rnd.sch_basename, ".pcb.lht", NULL); res = rnd_file_readable(name); free(name); } Index: trunk/util/gsch2pcb-rnd/netlister.c =================================================================== --- trunk/util/gsch2pcb-rnd/netlister.c (revision 31004) +++ trunk/util/gsch2pcb-rnd/netlister.c (revision 31005) @@ -92,7 +92,7 @@ char *out_file; char *backend; if (!s2) { - out_file = pcb_concat(basename, ".", s, NULL); + out_file = rnd_concat(basename, ".", s, NULL); backend = rnd_strdup(s); } else {