Index: trunk/src/hid_attrib.c =================================================================== --- trunk/src/hid_attrib.c (revision 26939) +++ trunk/src/hid_attrib.c (revision 26940) @@ -145,7 +145,7 @@ break; case PCB_HATT_STRING: if (a->value) - *(const char **) a->value = pcb_strdup(PCB_EMPTY(a->default_val.str_value)); + *(const char **) a->value = pcb_strdup(PCB_EMPTY(a->default_val.str)); break; case PCB_HATT_ENUM: if (a->value) @@ -206,7 +206,7 @@ if (a->value) *(char **) a->value = pcb_strdup(PCB_EMPTY((*argv)[1])); else - a->default_val.str_value = pcb_strdup(PCB_EMPTY((*argv)[1])); + a->default_val.str = pcb_strdup(PCB_EMPTY((*argv)[1])); (*argc)--; (*argv)++; break; @@ -223,7 +223,7 @@ if (strcmp(a->enumerations[e], ep) == 0) { ok = 1; a->default_val.lng = e; - a->default_val.str_value = ep; + a->default_val.str = ep; break; } if (!ok) { @@ -240,7 +240,7 @@ exit(1); } a->default_val.lng = unit->index; - a->default_val.str_value = unit->suffix; + a->default_val.str = unit->suffix; (*argc)--; (*argv)++; break; Index: trunk/src/hid_attrib.h =================================================================== --- trunk/src/hid_attrib.h (revision 26939) +++ trunk/src/hid_attrib.h (revision 26940) @@ -7,11 +7,11 @@ /* Used for HID attributes (exporting and printing, mostly). HA_boolean uses lng, HA_enum sets lng to the index and - str_value to the enumeration string. PCB_HATT_LABEL just shows the - default str_value. */ + str to the enumeration string. PCB_HATT_LABEL just shows the + default str. */ struct pcb_hid_attr_val_s { long lng; - const char *str_value; + const char *str; double real_value; pcb_coord_t coord_value; pcb_color_t clr_value; Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 26939) +++ trunk/src/hid_cam.c (revision 26940) @@ -160,9 +160,9 @@ void pcb_derive_default_filename(const char *pcbfile, pcb_export_opt_t *filename_attrib, const char *suffix) { - if (filename_attrib->default_val.str_value) - free((char *)filename_attrib->default_val.str_value); - filename_attrib->default_val.str_value = pcb_derive_default_filename_(pcbfile, suffix); + if (filename_attrib->default_val.str) + free((char *)filename_attrib->default_val.str); + filename_attrib->default_val.str = pcb_derive_default_filename_(pcbfile, suffix); } /* remove leading and trailing whitespace */ Index: trunk/src/hid_dad.h =================================================================== --- trunk/src/hid_dad.h (revision 26939) +++ trunk/src/hid_dad.h (revision 26940) @@ -210,13 +210,13 @@ #define PCB_DAD_BUTTON(table, text) \ do { \ PCB_DAD_ALLOC(table, PCB_HATT_BUTTON); \ - table[table ## _len - 1].val.str_value = text; \ + table[table ## _len - 1].val.str = text; \ } while(0) #define PCB_DAD_BUTTON_CLOSE(table, text, retval) \ do { \ PCB_DAD_ALLOC(table, PCB_HATT_BUTTON); \ - table[table ## _len - 1].val.str_value = text; \ + table[table ## _len - 1].val.str = text; \ table[table ## _len - 1].val.lng = retval; \ table[table ## _len - 1].enumerations = (const char **)(&table ## _ret_override); \ PCB_DAD_CHANGE_CB(table, pcb_hid_dad_close_cb); \ @@ -495,7 +495,7 @@ case PCB_HATT_TEXT: \ case PCB_HATT_BUTTON: \ case PCB_HATT_TREE: \ - table[table ## _len - 1].field.str_value = (char *)val; \ + table[table ## _len - 1].field.str = (char *)val; \ break; \ case PCB_HATT_COLOR: \ table[table ## _len - 1].field.clr_value = *(pcb_color_t *)val; \ @@ -595,7 +595,7 @@ case PCB_HATT_TEXT: \ case PCB_HATT_BUTTON: \ case PCB_HATT_TREE: \ - table[table ## _len - 1].field.str_value = (char *)val_; \ + table[table ## _len - 1].field.str = (char *)val_; \ break; \ case PCB_HATT_COLOR: \ table[table ## _len - 1].field.clr_value = *((pcb_color_t *)val_); \ Index: trunk/src/hid_dad_spin.c =================================================================== --- trunk/src/hid_dad_spin.c (revision 26939) +++ trunk/src/hid_dad_spin.c (revision 26940) @@ -92,7 +92,7 @@ end->changed = 1; /* determine whether textual input is empty and indicate that in the compound end widget */ - s = str->val.str_value; + s = str->val.str; if (s == NULL) s = ""; while(isspace(*s)) s++; end->empty = (*s == '\0'); @@ -142,7 +142,7 @@ unit = pcbhl_conf.editor.grid_unit; pcb_snprintf(su->buf, sizeof(su->buf), "%$m*", unit->suffix, su->end->val.coord_value); - hv.str_value = su->buf; + hv.str = su->buf; pcb_gui->attr_dlg_set_value(hid_ctx, su->wout, &hv); hv.lng = 0; pcb_gui->attr_dlg_set_value(hid_ctx, su->wglob, &hv); @@ -166,7 +166,7 @@ PCB_DAD_BEGIN_TABLE(ctx.dlg, 2); PCB_DAD_COMPFLAG(ctx.dlg, PCB_HATF_FRAME); PCB_DAD_LABEL(ctx.dlg, "Original:"); - PCB_DAD_LABEL(ctx.dlg, str->val.str_value); + PCB_DAD_LABEL(ctx.dlg, str->val.str); PCB_DAD_LABEL(ctx.dlg, "With new unit:"); PCB_DAD_LABEL(ctx.dlg, ""); ctx.wout = PCB_DAD_CURRENT(ctx.dlg); @@ -216,7 +216,7 @@ spin->unit = NULL; spin->no_unit_chg = ctx.dlg[ctx.wstick].val.lng; - hv.str_value = pcb_strdup(ctx.buf); + hv.str = pcb_strdup(ctx.buf); pcb_gui->attr_dlg_set_value(spin_hid_ctx, spin->wstr, &hv); } @@ -243,8 +243,8 @@ case PCB_DAD_SPIN_COORD: if (spin->unit == NULL) { pcb_bool succ = 0; - if (str->val.str_value != NULL) - succ = pcb_get_value_unit(str->val.str_value, NULL, 0, &v, &unit); + if (str->val.str != NULL) + succ = pcb_get_value_unit(str->val.str, NULL, 0, &v, &unit); if (!succ) { v = end->val.coord_value; unit = pcbhl_conf.editor.grid_unit; @@ -299,7 +299,7 @@ } spin_warn(hid_ctx, spin, end, warn); - hv.str_value = pcb_strdup(buf); + hv.str = pcb_strdup(buf); spin->set_writeback_lock++; pcb_gui->attr_dlg_set_value(hid_ctx, spin->wstr, &hv); spin->set_writeback_lock--; @@ -347,7 +347,7 @@ switch(spin->type) { case PCB_DAD_SPIN_INT: - l = strtol(str->val.str_value, &ends, 10); + l = strtol(str->val.str, &ends, 10); SPIN_CLAMP(l); if (*ends != '\0') warn = "Invalid integer - result is truncated"; @@ -354,7 +354,7 @@ end->val.lng = l; break; case PCB_DAD_SPIN_DOUBLE: - d = strtod(str->val.str_value, &ends); + d = strtod(str->val.str, &ends); SPIN_CLAMP(d); if (*ends != '\0') warn = "Invalid numeric - result is truncated"; @@ -361,7 +361,7 @@ end->val.real_value = d; break; case PCB_DAD_SPIN_COORD: - succ = pcb_get_value_unit(str->val.str_value, &absolute, 0, &d, &unit); + succ = pcb_get_value_unit(str->val.str, &absolute, 0, &d, &unit); if (succ) SPIN_CLAMP(d); else @@ -394,7 +394,7 @@ switch(spin->type) { case PCB_DAD_SPIN_COORD: - inval = str->val.str_value; + inval = str->val.str; while(isspace(*inval)) inval++; if (*inval == '\0') inval = "0"; @@ -407,11 +407,11 @@ char *tmp = pcb_concat(inval, " ", pcbhl_conf.editor.grid_unit->suffix, NULL); changed = 1; - hv.str_value = tmp; + hv.str = tmp; spin->set_writeback_lock++; pcb_gui->attr_dlg_set_value(hid_ctx, spin->wstr, &hv); spin->set_writeback_lock--; - succ = pcb_get_value_unit(str->val.str_value, &absolute, 0, &d, &unit); + succ = pcb_get_value_unit(str->val.str, &absolute, 0, &d, &unit); if (succ) end->val.coord_value = d; free(tmp); @@ -464,19 +464,19 @@ switch(spin->type) { case PCB_DAD_SPIN_INT: attr->val.lng = l; - free((char *)str->val.str_value); - str->val.str_value = pcb_strdup_printf("%ld", l); + free((char *)str->val.str); + str->val.str = pcb_strdup_printf("%ld", l); break; case PCB_DAD_SPIN_DOUBLE: attr->val.real_value = d; - free((char *)str->val.str_value); - str->val.str_value = pcb_strdup_printf("%f", d); + free((char *)str->val.str); + str->val.str = pcb_strdup_printf("%f", d); break; case PCB_DAD_SPIN_COORD: attr->val.coord_value = c; spin->unit = NULL; - free((char *)str->val.str_value); - str->val.str_value = gen_str_coord(spin, c, NULL, 0); + free((char *)str->val.str); + str->val.str = gen_str_coord(spin, c, NULL, 0); break; default: pcb_trace("INTERNAL ERROR: spin_set_num\n"); } Index: trunk/src_plugins/cam/cam_gui.c =================================================================== --- trunk/src_plugins/cam/cam_gui.c (revision 26939) +++ trunk/src_plugins/cam/cam_gui.c (revision 26940) @@ -74,7 +74,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wjobs, &hv); } } @@ -136,8 +136,8 @@ pcb_hid_row_t *r; char *cell[3], *cursor_path = NULL; - cam_parse_opt_outfile(&ctx->cam, ctx->dlg[ctx->woutfile].val.str_value); - hv.str_value = ctx->cam.prefix == NULL ? "" : ctx->cam.prefix; + cam_parse_opt_outfile(&ctx->cam, ctx->dlg[ctx->woutfile].val.str); + hv.str = ctx->cam.prefix == NULL ? "" : ctx->cam.prefix; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wprefix, &hv); attr = &ctx->dlg[ctx->wopts]; @@ -162,7 +162,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wopts, &hv); } } @@ -182,7 +182,7 @@ attr = &ctx->dlg[ctx->wjobs]; tree = (pcb_hid_tree_t *)attr->enumerations; - text = attr_inp->val.str_value; + text = attr_inp->val.str; pcb_dad_tree_hide_all(tree, &tree->rows, 1); pcb_dad_tree_unhide_filter(tree, &tree->rows, 0, text); @@ -196,7 +196,7 @@ pcb_hid_row_t *row = pcb_dad_tree_get_selected(attr); if (row != NULL) { - const char *outfile = ctx->dlg[ctx->woutfile].val.str_value; + const char *outfile = ctx->dlg[ctx->woutfile].val.str; char *tmp = pcb_strdup_printf("outfile=%s", outfile); pcb_actionl("cam", "call", row->cell[0], tmp, NULL); free(tmp); @@ -339,9 +339,9 @@ { /* set default outfile */ pcb_hid_attr_val_t hv; - hv.str_value = pcb_derive_default_filename_(PCB->hidlib.filename, ""); + hv.str = pcb_derive_default_filename_(PCB->hidlib.filename, ""); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->woutfile, &hv); - free((char *)hv.str_value); + free((char *)hv.str); cam_gui_opts2dlg(ctx); } Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 26939) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 26940) @@ -66,7 +66,7 @@ len -= l; \ end += l; \ } \ - PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.name, str_value, pcb_strdup(buff)); \ + PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.name, str, pcb_strdup(buff)); \ } while(0) #define c2g_float(name) \ @@ -97,7 +97,7 @@ #define g2c_array(name, conv) \ do { \ - const char *inp = cnstgui_ctx.dlg[cnstgui_ctx.name].val.str_value; \ + const char *inp = cnstgui_ctx.dlg[cnstgui_ctx.name].val.str; \ char *curr, *next; \ cons.name ## _len = 0; \ if (inp == NULL) break; \ @@ -140,9 +140,9 @@ static void reset_line(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { - PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_angle, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_angle, str, pcb_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_angle_mod, real_value, 0); - PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_length, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_length, str, pcb_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_length_mod, coord_value, 0); gui2cons(hid_ctx, caller_data, attr); } @@ -149,9 +149,9 @@ static void reset_move(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { - PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_angle, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_angle, str, pcb_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_angle_mod, real_value, 0); - PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_length, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_length, str, pcb_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_length_mod, coord_value, 0); gui2cons(hid_ctx, caller_data, attr); } Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 26940) @@ -112,7 +112,7 @@ if ((ctx == NULL) || (!ctx->active)) return; - hv.str_value = NULL; + hv.str = NULL; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wprev, &hv); } Index: trunk/src_plugins/dialogs/dlg_infobar.c =================================================================== --- trunk/src_plugins/dialogs/dlg_infobar.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_infobar.c (revision 26940) @@ -97,11 +97,11 @@ } /* update labels */ - hv.str_value = pcb_strdup_printf("The file %s has changed on disk", PCB->hidlib.filename); + hv.str = pcb_strdup_printf("The file %s has changed on disk", PCB->hidlib.filename); pcb_gui->attr_dlg_set_value(sub.dlg_hid_ctx, wlab[0], &hv); - free((char *)hv.str_value); + free((char *)hv.str); - hv.str_value = (PCB->Changed ? "Do you want to drop your changes and reload the file?" : "Do you want to reload the file?"); + hv.str = (PCB->Changed ? "Do you want to drop your changes and reload the file?" : "Do you want to reload the file?"); pcb_gui->attr_dlg_set_value(sub.dlg_hid_ctx, wlab[1], &hv); } else if (strcmp(cmd, "close") == 0) { Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 26940) @@ -115,10 +115,10 @@ #define layer_name_mismatch(w, layer) \ -((ctx->attrs[w->name].val.str_value == NULL) || (strcmp(layer->name, ctx->attrs[w->name].val.str_value) != 0)) +((ctx->attrs[w->name].val.str == NULL) || (strcmp(layer->name, ctx->attrs[w->name].val.str) != 0)) #define layer_purpose_mismatch(w, layer) \ -((ctx->attrs[w->purpose].val.str_value == NULL) || (layer->meta.bound.purpose == NULL) || (strcmp(layer->meta.bound.purpose, ctx->attrs[w->purpose].val.str_value) != 0)) +((ctx->attrs[w->purpose].val.str == NULL) || (layer->meta.bound.purpose == NULL) || (strcmp(layer->meta.bound.purpose, ctx->attrs[w->purpose].val.str) != 0)) static void lb_data2dialog(void *hid_ctx, lb_ctx_t *ctx) { @@ -139,13 +139,13 @@ /* name and type */ if (layer_name_mismatch(w, layer)) - PCB_DAD_SET_VALUE(hid_ctx, w->name, str_value, pcb_strdup(layer->name)); + PCB_DAD_SET_VALUE(hid_ctx, w->name, str, pcb_strdup(layer->name)); if (layer_purpose_mismatch(w, layer)) { char *purp = layer->meta.bound.purpose; if (purp == NULL) purp = ""; - PCB_DAD_SET_VALUE(hid_ctx, w->purpose, str_value, pcb_strdup(purp)); + PCB_DAD_SET_VALUE(hid_ctx, w->purpose, str, pcb_strdup(purp)); } PCB_DAD_SET_VALUE(hid_ctx, w->comp, lng, layer->comb); @@ -193,11 +193,11 @@ if (layer_name_mismatch(w, layer)) { free((char *)layer->name); - layer->name = pcb_strdup(ctx->attrs[w->name].val.str_value); + layer->name = pcb_strdup(ctx->attrs[w->name].val.str); } if (layer_purpose_mismatch(w, layer)) { - const char *purp = ctx->attrs[w->purpose].val.str_value; + const char *purp = ctx->attrs[w->purpose].val.str; free((char *)layer->meta.bound.purpose); if ((purp == NULL) || (*purp == '\0')) layer->meta.bound.purpose = NULL; Index: trunk/src_plugins/dialogs/dlg_layer_flags.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 26940) @@ -65,7 +65,7 @@ PCB_DAD_END(dlg); - dlg[wname].val.str_value = pcb_strdup(ly->name); + dlg[wname].val.str = pcb_strdup(ly->name); dlg[wsub].val.lng = ly->comb & PCB_LYC_SUB; dlg[wauto].val.lng = ly->comb & PCB_LYC_AUTO; @@ -73,8 +73,8 @@ if (failed == 0) { pcb_layer_combining_t comb = 0; - if (strcmp(ly->name, dlg[wname].val.str_value) != 0) { - ar |= pcb_layer_rename_(ly, (char *)dlg[wname].val.str_value); + if (strcmp(ly->name, dlg[wname].val.str) != 0) { + ar |= pcb_layer_rename_(ly, (char *)dlg[wname].val.str); pcb_board_set_changed_flag(pcb_true); } if (dlg[wsub].val.lng) comb |= PCB_LYC_SUB; @@ -143,9 +143,9 @@ PCB_DAD_END(dlg); - dlg[wname].val.str_value = pcb_strdup(g->name); + dlg[wname].val.str = pcb_strdup(g->name); dlg[wtype].val.lng = orig_type = pcb_ly_type2enum(g->ltype); - dlg[wpurp].val.str_value = pcb_strdup(g->purpose == NULL ? "" : g->purpose); + dlg[wpurp].val.str = pcb_strdup(g->purpose == NULL ? "" : g->purpose); if (!omit_loc) dlg[wloc].val.lng = def_loc; @@ -165,9 +165,9 @@ PCB_DAD_AUTORUN("layer_grp_prop", dlg, "Edit the properties of a layer group (physical layer)", NULL, failed); if (failed == 0) { - if (strcmp(g->name, dlg[wname].val.str_value) != 0) { - ar |= pcb_layergrp_rename_(g, (char *)dlg[wname].val.str_value); - dlg[wname].val.str_value = NULL; + if (strcmp(g->name, dlg[wname].val.str) != 0) { + ar |= pcb_layergrp_rename_(g, (char *)dlg[wname].val.str); + dlg[wname].val.str = NULL; pcb_board_set_changed_flag(pcb_true); } @@ -190,17 +190,17 @@ pcb_message(PCB_MSG_ERROR, "Ignoring location - for this layer group type it is determined by the stackup\n"); } - if (dlg[wpurp].val.str_value == NULL) { + if (dlg[wpurp].val.str == NULL) { if (g->purpose != NULL) { pcb_layergrp_set_purpose__(g, NULL); changed = 1; } } - else if ((g->purpose == NULL) || (strcmp(g->purpose, dlg[wpurp].val.str_value) != 0)) { - if (*dlg[wpurp].val.str_value == '\0') + else if ((g->purpose == NULL) || (strcmp(g->purpose, dlg[wpurp].val.str) != 0)) { + if (*dlg[wpurp].val.str == '\0') pcb_layergrp_set_purpose__(g, NULL); else - pcb_layergrp_set_purpose__(g, pcb_strdup(dlg[wpurp].val.str_value)); + pcb_layergrp_set_purpose__(g, pcb_strdup(dlg[wpurp].val.str)); changed = 1; } Index: trunk/src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 26940) @@ -122,7 +122,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); } @@ -230,7 +230,7 @@ else ctx->proto_id = PCB_PADSTACK_INVALID; - hv.str_value = NULL; + hv.str = NULL; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wprev, &hv); } @@ -277,7 +277,7 @@ attr = &ctx->dlg[ctx->wlist]; tree = (pcb_hid_tree_t *)attr->enumerations; - text = attr_inp->val.str_value; + text = attr_inp->val.str; if ((text == NULL) || (*text == '\0')) { for(r = gdl_first(&tree->rows); r != NULL; r = gdl_next(&tree->rows, r)) @@ -359,7 +359,7 @@ /* make sure the new item appears in the list and is selected */ pstklib_data2dlg(ctx); sprintf(tmp, "%u", ctx->proto_id); - hv.str_value = tmp; + hv.str = tmp; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); pstklib_proto_edit_common(ctx, data, ctx->proto_id, tab); Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 26940) @@ -170,10 +170,10 @@ gds_append_str(&tmp, l->data.fp.loc_info); gds_append_str(&tmp, "\n"); - hv.str_value = tmp.array; + hv.str = tmp.array; } else - hv.str_value = ""; + hv.str = ""; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtags, &hv); gds_uninit(&tmp); @@ -182,7 +182,7 @@ static void timed_update_preview_cb(pcb_hidval_t user_data) { library_ctx_t *ctx = user_data.ptr; - const char *otext = ctx->dlg[ctx->wfilt].val.str_value; + const char *otext = ctx->dlg[ctx->wfilt].val.str; if (pcb_buffer_load_footprint(PCB_PASTEBUFFER, otext, NULL)) { pcb_tool_select_by_id(&PCB->hidlib, PCB_MODE_PASTE_BUFFER); @@ -213,7 +213,7 @@ static void update_edit_button(library_ctx_t *ctx) { - const char *otext = ctx->dlg[ctx->wfilt].val.str_value; + const char *otext = ctx->dlg[ctx->wfilt].val.str; pcb_gui->attr_dlg_widget_state(ctx->dlg_hid_ctx, ctx->wedit, !ctx->pactive && (otext != NULL) && (strchr(otext, '(') != NULL)); } @@ -272,7 +272,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtree, &hv); free(cursor_path); } @@ -309,7 +309,7 @@ if (close_param) library_param_dialog(ctx, NULL); - hv.str_value = NULL; + hv.str = NULL; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wpreview, &hv); } @@ -378,7 +378,7 @@ attr = &ctx->dlg[ctx->wtree]; tree = (pcb_hid_tree_t *)attr->enumerations; - otext = attr_inp->val.str_value; + otext = attr_inp->val.str; text = pcb_strdup(otext); have_filter_text = (*text != '\0'); @@ -478,7 +478,7 @@ library_ctx_t *ctx = caller_data; pcb_hid_attribute_t *attr; pcb_hid_row_t *r, *rnew; - const char *otext = ctx->dlg[ctx->wfilt].val.str_value; + const char *otext = ctx->dlg[ctx->wfilt].val.str; char *name, *sep; int namelen; Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 26940) @@ -79,7 +79,7 @@ } break; case PCB_HATT_STRING: - hv.str_value = val; + hv.str = val; break; case PCB_HATT_COORD: case PCB_HATT_END: /* compound widget for the spinbox! */ @@ -287,7 +287,7 @@ } break; case PCB_HATT_STRING: - val = a->val.str_value; + val = a->val.str; break; case PCB_HATT_COORD: case PCB_HATT_END: @@ -320,7 +320,7 @@ char *cmd = gen_cmd(ctx); pcb_hid_attr_val_t hv; - hv.str_value = cmd; + hv.str = cmd; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wfilt, &hv); free(cmd); timed_update_preview(ctx, 1); @@ -433,13 +433,13 @@ static void library_param_fillin(library_ctx_t *ctx, pcb_fplibrary_t *l) { pcb_hid_attr_val_t hv; - const char *filter_txt = ctx->dlg[ctx->wfilt].val.str_value; + const char *filter_txt = ctx->dlg[ctx->wfilt].val.str; if (filter_txt == NULL) { filter_txt = ctx->example; - hv.str_value = filter_txt; + hv.str = filter_txt; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wfilt, &hv); } @@ -450,7 +450,7 @@ if ((prm == NULL) || (prm[1] == ')')) { if (ctx->example != NULL) { filter_txt = ctx->example; - hv.str_value = filter_txt; + hv.str = filter_txt; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wfilt, &hv); prm = strchr(filter_txt, '('); } @@ -460,9 +460,9 @@ load_params(ctx, prm+1); } - hv.str_value = ctx->descr.array; - if (hv.str_value == NULL) - hv.str_value = ""; + hv.str = ctx->descr.array; + if (hv.str == NULL) + hv.str = ""; pcb_gui->attr_dlg_set_value(ctx->pdlg_hid_ctx, ctx->pwdesc, &hv); timed_update_preview(ctx, 1); } Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 26940) @@ -82,7 +82,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnetlist, &hv); } } @@ -122,7 +122,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtermlist, &hv); free(cursor_path); } Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 26940) @@ -83,7 +83,7 @@ if ((proto != NULL) && (proto->name != NULL)) prn = proto->name; pcb_snprintf(tmp, sizeof(tmp), "#%ld:%d (%s)", (long int)pse->ps->proto, pse->ps->protoi, prn); - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_id, str_value, tmp); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_id, str, tmp); PCB_DAD_SET_VALUE(hid_ctx, pse->clearance, coord_value, pse->ps->Clearance); PCB_DAD_SET_VALUE(hid_ctx, pse->rot, real_value, pse->ps->rot); PCB_DAD_SET_VALUE(hid_ctx, pse->xmirror, lng, pse->ps->xmirror); @@ -101,10 +101,10 @@ switch(shape->shape) { case PCB_PSSH_HSHADOW: *tmp = '\0'; - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, "hshadow"); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, "hshadow"); break; case PCB_PSSH_CIRC: - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, "circle"); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, "circle"); if ((shape->data.circ.x != 0) || (shape->data.circ.y != 0)) pcb_snprintf(tmp, sizeof(tmp), "dia=%.06$mm\nat %.06$mm;%.06$mm", shape->data.circ.dia, shape->data.circ.x, shape->data.circ.y); else @@ -112,25 +112,25 @@ break; case PCB_PSSH_LINE: if (shape->data.line.square) - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, "square line"); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, "square line"); else - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, "round line"); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, "round line"); pcb_snprintf(tmp, sizeof(tmp), "thickness=%.06$mm", shape->data.line.thickness); break; case PCB_PSSH_POLY: - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, "polygon"); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, "polygon"); pcb_snprintf(tmp, sizeof(tmp), "corners=%d", shape->data.poly.len); break; default: - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, ""); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, ""); strcpy(tmp, ""); } - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_info[n], str_value, tmp); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_info[n], str, tmp); PCB_DAD_SET_VALUE(hid_ctx, pse->proto_clr[n], coord_value, shape->clearance); } else { - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str_value, ""); - PCB_DAD_SET_VALUE(hid_ctx, pse->proto_info[n], str_value, ""); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_shape[n], str, ""); + PCB_DAD_SET_VALUE(hid_ctx, pse->proto_info[n], str, ""); PCB_DAD_SET_VALUE(hid_ctx, pse->proto_clr[n], coord_value, 0); } } @@ -165,11 +165,11 @@ } pcb_gui->attr_dlg_widget_state(hid_ctx, pse->hdia, 1); } - PCB_DAD_SET_VALUE(hid_ctx, pse->hole_header, str_value, s); + PCB_DAD_SET_VALUE(hid_ctx, pse->hole_header, str, s); - free((char *)pse->attrs[pse->prname].val.str_value); - pse->attrs[pse->prname].val.str_value = NULL; - PCB_DAD_SET_VALUE(hid_ctx, pse->prname, str_value, pcb_strdup(proto->name == NULL ? "" : proto->name)); + free((char *)pse->attrs[pse->prname].val.str); + pse->attrs[pse->prname].val.str = NULL; + PCB_DAD_SET_VALUE(hid_ctx, pse->prname, str, pcb_strdup(proto->name == NULL ? "" : proto->name)); PCB_DAD_SET_VALUE(hid_ctx, pse->hdia, coord_value, proto->hdia); PCB_DAD_SET_VALUE(hid_ctx, pse->hplated, lng, proto->hplated); PCB_DAD_SET_VALUE(hid_ctx, pse->htop_val, lng, proto->htop); @@ -179,15 +179,15 @@ strcpy(tmp, "top copper group"); else sprintf(tmp, "%d groups from\nthe %s copper group", proto->htop, proto->htop > 0 ? "top" : "bottom"); - PCB_DAD_SET_VALUE(hid_ctx, pse->htop_text, str_value, tmp); - PCB_DAD_SET_VALUE(hid_ctx, pse->htop_layer, str_value, pse_group_string(pse->pcb, top_grp, tmp, sizeof(tmp))); + PCB_DAD_SET_VALUE(hid_ctx, pse->htop_text, str, tmp); + PCB_DAD_SET_VALUE(hid_ctx, pse->htop_layer, str, pse_group_string(pse->pcb, top_grp, tmp, sizeof(tmp))); if (proto->hbottom == 0) strcpy(tmp, "bottom copper group"); else sprintf(tmp, "%d groups from\nthe %s copper group", proto->hbottom, proto->hbottom > 0 ? "bottom" : "top"); - PCB_DAD_SET_VALUE(hid_ctx, pse->hbot_text, str_value, tmp); - PCB_DAD_SET_VALUE(hid_ctx, pse->hbot_layer, str_value, pse_group_string(pse->pcb, bottom_grp, tmp, sizeof(tmp))); + PCB_DAD_SET_VALUE(hid_ctx, pse->hbot_text, str, tmp); + PCB_DAD_SET_VALUE(hid_ctx, pse->hbot_layer, str, pse_group_string(pse->pcb, bottom_grp, tmp, sizeof(tmp))); } @@ -280,7 +280,7 @@ pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); static int lock = 0; - const char *new_name = pse->attrs[pse->prname].val.str_value; + const char *new_name = pse->attrs[pse->prname].val.str; if ((lock != 0) || (proto == NULL)) return; @@ -970,7 +970,7 @@ PCB_DAD_SET_VALUE(dlg_hid_ctx, pse->tab, lng, target_tab); PCB_DAD_RUN(dlg); - free((char *)pse->attrs[pse->prname].val.str_value); + free((char *)pse->attrs[pse->prname].val.str); PCB_DAD_FREE(dlg); } Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 26940) @@ -87,16 +87,16 @@ pcb_hid_attr_val_t val; if ((obj->term != NULL) && (pcb_obj_parent_subc(obj) == ctx->tempsc) && (obj->term != NULL)) { - val.str_value = obj->term; + val.str = obj->term; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_num, &val); - val.str_value = pcb_attribute_get(&obj->Attributes, "name"); - if (val.str_value != NULL) + val.str = pcb_attribute_get(&obj->Attributes, "name"); + if (val.str != NULL) pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_name, &val); if (ctx->pcb != NULL) { { pcb_net_term_t *term = pcb_net_find_by_obj(&ctx->pcb->netlist[PCB_NETLIST_EDITED], obj); if (term != NULL) { - val.str_value = term->parent.net->name; + val.str = term->parent.net->name; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_net, &val); } } @@ -114,7 +114,7 @@ pcb_box_t b; pcb_hid_attr_val_t val; - val.str_value = "n/a"; + val.str = "n/a"; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_num, &val); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_name, &val); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_net, &val); Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 26940) @@ -72,7 +72,7 @@ PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, real_value, cn->val.real[0]); break; case CFN_STRING: - PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, str_value, cn->val.string[0]); + PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, str, cn->val.string[0]); break; default: pcb_message(PCB_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); } @@ -102,8 +102,8 @@ conf_setf(ctx->role, item->confpath, -1, "%f", attr->val.real_value); break; case CFN_STRING: - if (strcmp(cn->val.string[0], attr->val.str_value) != 0) - conf_set(ctx->role, item->confpath, -1, attr->val.str_value, POL_OVERWRITE); + if (strcmp(cn->val.string[0], attr->val.str) != 0) + conf_set(ctx->role, item->confpath, -1, attr->val.str, POL_OVERWRITE); break; default: pcb_message(PCB_MSG_ERROR, "pcb_pref_dlg2conf_item(): widget type not handled\n"); } @@ -173,7 +173,7 @@ case CFN_STRING: PCB_DAD_STRING(ctx->dlg); item->wid = PCB_DAD_CURRENT(ctx->dlg); - ctx->dlg[item->wid].val.str_value = pcb_strdup(cn->val.string[0]); + ctx->dlg[item->wid].val.str = pcb_strdup(cn->val.string[0]); PCB_DAD_HELP(ctx->dlg, cn->description); PCB_DAD_CHANGE_CB(ctx->dlg, change_cb); break; Index: trunk/src_plugins/dialogs/dlg_pref_board.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_board.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pref_board.c (revision 26940) @@ -35,9 +35,9 @@ /* Actual board meta to dialog box */ static void pref_board_brd2dlg(pref_ctx_t *ctx) { - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wname, str_value, PCB_EMPTY(PCB->hidlib.name)); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wname, str, PCB_EMPTY(PCB->hidlib.name)); PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wthermscale, real_value, PCB->ThermScale); - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wtype, str_value, (PCB->is_footprint ? "footprint" : "PCB board")); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->board.wtype, str, (PCB->is_footprint ? "footprint" : "PCB board")); } /* Dialog box to actual board meta */ @@ -48,7 +48,7 @@ double newtherm; pref_ctx_t *ctx = caller_data; - newname = PCB_EMPTY(ctx->dlg[ctx->board.wname].val.str_value); + newname = PCB_EMPTY(ctx->dlg[ctx->board.wname].val.str); oldname = PCB_EMPTY(PCB->hidlib.name); if (strcmp(oldname, newname) != 0) { free(PCB->hidlib.name); @@ -85,7 +85,7 @@ PCB_DAD_LABEL(ctx->dlg, "Board name"); PCB_DAD_STRING(ctx->dlg); ctx->board.wname = PCB_DAD_CURRENT(ctx->dlg); - ctx->dlg[ctx->board.wname].val.str_value = pcb_strdup(PCB_EMPTY(PCB->hidlib.name)); + ctx->dlg[ctx->board.wname].val.str = pcb_strdup(PCB_EMPTY(PCB->hidlib.name)); PCB_DAD_CHANGE_CB(ctx->dlg, pref_board_dlg2brd); PCB_DAD_LABEL(ctx->dlg, "Thermal scale"); PCB_DAD_REAL(ctx->dlg, ""); Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 26940) @@ -202,7 +202,7 @@ ctx->conf.selected_idx = idx; if (nat == NULL) { - hv.str_value = ""; + hv.str = ""; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wname, &hv); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wdesc, &hv); setup_intree(ctx, NULL, 0); @@ -213,12 +213,12 @@ return; } - hv.str_value = path == NULL ? "" : path; + hv.str = path == NULL ? "" : path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wname, &hv); tmp = pcb_strdup(nat->description); pcb_text_wrap(tmp, DESC_WRAP_WIDTH, '\n', ' '); - hv.str_value = tmp; + hv.str = tmp; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wdesc, &hv); free(tmp); @@ -249,16 +249,16 @@ } /* default: set the value of the given node from hv loaded above */ - hv.str_value = print_conf_val(nat->type, &nat->val, buf, sizeof(buf)); + hv.str = print_conf_val(nat->type, &nat->val, buf, sizeof(buf)); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wnatval[nat->type], &hv); src = nat->prop[idx].src; if (src != NULL) { rolename = conf_role_name(conf_lookup_role(nat->prop[idx].src)); - hv.str_value = tmp = pcb_strdup_printf("prio: %d role: %s\nsource: %s:%d.%d", nat->prop[idx].prio, rolename, src->file_name, src->line, src->col); + hv.str = tmp = pcb_strdup_printf("prio: %d role: %s\nsource: %s:%d.%d", nat->prop[idx].prio, rolename, src->file_name, src->line, src->col); } else - hv.str_value = tmp = pcb_strdup_printf("prio: %d\nsource: ", nat->prop[idx].prio); + hv.str = tmp = pcb_strdup_printf("prio: %d\nsource: ", nat->prop[idx].prio); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wsrc[nat->type], &hv); free(tmp); @@ -321,7 +321,7 @@ attr = &ctx->dlg[ctx->conf.wtree]; tree = (pcb_hid_tree_t *)attr->enumerations; - text = attr_inp->val.str_value; + text = attr_inp->val.str; have_filter_text = (*text != '\0'); /* hide or unhide everything */ @@ -472,7 +472,7 @@ if (tabarg != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = pcb_strdup(tabarg); + hv.str = pcb_strdup(tabarg); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wfilter, &hv); pcb_pref_dlg_conf_filter_cb(ctx->dlg_hid_ctx, ctx, &ctx->dlg[ctx->conf.wfilter]); pcb_dad_tree_expcoll(&ctx->dlg[ctx->conf.wtree], NULL, 1, 1); Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 26940) @@ -61,7 +61,7 @@ switch(ctx->nat->type) { case CFN_STRING: - hv.str_value = val; + hv.str = val; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; case CFN_BOOLEAN: @@ -126,7 +126,7 @@ attr = &ctx->dlg[ctx->wnewval]; switch(ctx->nat->type) { - case CFN_STRING: val = attr->val.str_value; break; + case CFN_STRING: val = attr->val.str; break; case CFN_BOOLEAN: case CFN_INTEGER: sprintf(buf, "%ld", attr->val.lng); break; case CFN_REAL: sprintf(buf, "%f", attr->val.real_value); break; Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 26940) @@ -104,7 +104,7 @@ pcb_dad_tree_append(attr, NULL, cell); } - hv.str_value = pref_ctx.lib.cursor_path; + hv.str = pref_ctx.lib.cursor_path; if (pcb_gui->attr_dlg_set_value(pref_ctx.dlg_hid_ctx, pref_ctx.lib.wlist, &hv) == 0) { free(pref_ctx.lib.cursor_path); pref_ctx.lib.cursor_path = NULL; @@ -199,7 +199,7 @@ pcb_hid_attr_val_t hv; pcb_dad_tree_insert(attr, prev, cell); pref_lib_dlg2conf(hid_ctx, caller_data, attr); - hv.str_value = cell[0]; + hv.str = cell[0]; pcb_gui->attr_dlg_set_value(pref_ctx.dlg_hid_ctx, pref_ctx.lib.wlist, &hv); } } @@ -226,7 +226,7 @@ pcb_hid_attr_val_t hv; pcb_dad_tree_append(attr, next, cell); pref_lib_dlg2conf(hid_ctx, caller_data, attr); - hv.str_value = cell[0]; + hv.str = cell[0]; pcb_gui->attr_dlg_set_value(pref_ctx.dlg_hid_ctx, pref_ctx.lib.wlist, &hv); } } @@ -241,9 +241,9 @@ cell_edit_ctx_t *ctx = caller_data; char *tmp; - pcb_path_resolve(&PCB->hidlib, ctx->dlg[ctx->wpath].val.str_value, &tmp, 0, pcb_true); + pcb_path_resolve(&PCB->hidlib, ctx->dlg[ctx->wpath].val.str, &tmp, 0, pcb_true); if (tmp != NULL) - PCB_DAD_SET_VALUE(hid_ctx, ctx->wexp, str_value, tmp); + PCB_DAD_SET_VALUE(hid_ctx, ctx->wexp, str, tmp); } static int lib_cell_edit(char **cell) @@ -258,7 +258,7 @@ PCB_DAD_LABEL(ctx.dlg, "Path:"); PCB_DAD_STRING(ctx.dlg); ctx.wpath = PCB_DAD_CURRENT(ctx.dlg); - ctx.dlg[ctx.wpath].val.str_value = pcb_strdup(cell[0]); + ctx.dlg[ctx.wpath].val.str = pcb_strdup(cell[0]); PCB_DAD_CHANGE_CB(ctx.dlg, lib_cell_edit_update); PCB_DAD_LABEL(ctx.dlg, "Expanded\nversion:"); @@ -279,9 +279,9 @@ } free(cell[0]); - cell[0] = pcb_strdup(ctx.dlg[ctx.wpath].val.str_value); + cell[0] = pcb_strdup(ctx.dlg[ctx.wpath].val.str); free(cell[1]); - cell[1] = pcb_strdup(ctx.dlg[ctx.wexp].val.str_value); + cell[1] = pcb_strdup(ctx.dlg[ctx.wexp].val.str); PCB_DAD_FREE(ctx.dlg); return 0; Index: trunk/src_plugins/dialogs/dlg_search.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_search.c (revision 26940) @@ -172,12 +172,12 @@ if (e->valid) { gds_init(&buf); append_expr(&buf, e, '\n'); - hv.str_value = buf.array; + hv.str = buf.array; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wexpr_lab[row][col], &hv); gds_uninit(&buf); } else { - hv.str_value = NEW_EXPR_LAB; + hv.str = NEW_EXPR_LAB; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wexpr_lab[row][col], &hv); } } @@ -206,7 +206,7 @@ } gds_append(&buf, ')'); } - hv.str_value = buf.array; + hv.str = buf.array; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wexpr_str, &hv); gds_uninit(&buf); } @@ -297,8 +297,8 @@ static void search_apply_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; - if (ctx->dlg[ctx->wexpr_str].val.str_value != NULL) - pcb_actionl("query", search_acts[ctx->dlg[ctx->wact].val.lng], ctx->dlg[ctx->wexpr_str].val.str_value, NULL); + if (ctx->dlg[ctx->wexpr_str].val.str != NULL) + pcb_actionl("query", search_acts[ctx->dlg[ctx->wact].val.lng], ctx->dlg[ctx->wexpr_str].val.str, NULL); } Index: trunk/src_plugins/dialogs/dlg_search_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search_edit.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_search_edit.c (revision 26940) @@ -50,7 +50,7 @@ switch(ctx->se.expr->rtype) { case RIGHT_STR: - ctx->se.right = pcb_strdup(attr->val.str_value); + ctx->se.right = pcb_strdup(attr->val.str); break; case RIGHT_INT: ctx->se.right = pcb_strdup_printf("%d", attr->val.lng); @@ -104,7 +104,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wop, &hv); free(cursor_path); } @@ -136,7 +136,7 @@ /* set cursor to last known value */ if ((s != NULL) && (s->right != NULL)) { pcb_hid_attr_val_t hv; - hv.str_value = s->right; + hv.str = s->right; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wright[RIGHT_CONST], &hv); } } @@ -153,9 +153,9 @@ for(n = 0; n < RIGHT_max; n++) pcb_gui->attr_dlg_widget_hide(ctx->dlg_hid_ctx, ctx->wright[n], 1); - hv.str_value = ctx->se.right; - if (hv.str_value == NULL) { - hv.str_value = ""; + hv.str = ctx->se.right; + if (hv.str == NULL) { + hv.str = ""; empty = 1; } @@ -164,19 +164,19 @@ pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wright[s->expr->rtype], &hv); break; case RIGHT_INT: - hv.lng = strtol(hv.str_value, NULL, 10); + hv.lng = strtol(hv.str, NULL, 10); pcb_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]]); break; case RIGHT_DOUBLE: - hv.real_value = strtod(hv.str_value, NULL); + hv.real_value = strtod(hv.str, NULL); pcb_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]]); break; case RIGHT_COORD: - hv.coord_value = pcb_get_value_ex(hv.str_value, NULL, NULL, NULL, "mm", NULL); + hv.coord_value = pcb_get_value_ex(hv.str, NULL, NULL, NULL, "mm", NULL); pcb_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_test.c =================================================================== --- trunk/src_plugins/dialogs/dlg_test.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_test.c (revision 26940) @@ -318,7 +318,7 @@ pcb_hid_attr_val_t hv; char tmp[256]; - hv.str_value = tmp; + hv.str = tmp; sprintf(tmp, "%ld", ctx->dlg[ctx->wspin_int].val.lng); pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wspout_int, &hv); @@ -382,7 +382,7 @@ test_t *ctx = caller_data; pcb_hid_attr_val_t val; - val.str_value = "two/under_two"; + val.str = "two/under_two"; pcb_gui->attr_dlg_set_value(hid_ctx, ctx->tt, &val); } @@ -410,8 +410,8 @@ static void cb_ttbl_select(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(attr); - if (attr->val.str_value != NULL) - pcb_trace("tt tbl selected: path=%s row=%p '%s'\n", attr->val.str_value, row, row->cell[0]); + if (attr->val.str != NULL) + pcb_trace("tt tbl selected: path=%s row=%p '%s'\n", attr->val.str, row, row->cell[0]); else pcb_trace("tt tbl selected: \n"); } @@ -487,7 +487,7 @@ txt->hid_get_xy(attr, hid_ctx, &x, &y); o = txt->hid_get_offs(attr, hid_ctx); sprintf(buf, "cursor after edit: line %ld col %ld offs %ld", y, x, o); - val.str_value = buf; + val.str = buf; pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wtxtpos, &val); } Index: trunk/src_plugins/dialogs/dlg_undo.c =================================================================== --- trunk/src_plugins/dialogs/dlg_undo.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_undo.c (revision 26940) @@ -109,7 +109,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); } Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 26939) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 26940) @@ -123,7 +123,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); } @@ -137,10 +137,10 @@ if (cnt >= 0) { char tmp[32]; sprintf(tmp, "%ld", cnt+1); - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wpos, str_value, pcb_strdup(tmp)); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wpos, str, pcb_strdup(tmp)); } else - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wpos, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wpos, str, pcb_strdup("")); } static void view2dlg_count(view_ctx_t *ctx) @@ -148,7 +148,7 @@ char tmp[32]; sprintf(tmp, "%ld", (long)pcb_view_list_length(ctx->lst)); - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wcount, str_value, pcb_strdup(tmp)); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wcount, str, pcb_strdup(tmp)); } static void view2dlg(view_ctx_t *ctx) @@ -167,16 +167,16 @@ pcb_view_t *v = pcb_view_by_uid(ctx->lst, ctx->selected); if (v != NULL) { pcb_view_goto(v); - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str_value, pcb_text_wrap(pcb_strdup(v->description), 32, '\n', ' ')); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str, pcb_text_wrap(pcb_strdup(v->description), 32, '\n', ' ')); switch(v->data_type) { case PCB_VIEW_PLAIN: - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str, pcb_strdup("")); break; case PCB_VIEW_DRC: if (v->data.drc.have_measured) - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str_value, pcb_strdup_printf("DRC: %m+required: %$ms\nmeasured: %$ms\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.required_value, v->data.drc.measured_value)); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str, pcb_strdup_printf("DRC: %m+required: %$ms\nmeasured: %$ms\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.required_value, v->data.drc.measured_value)); else - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str_value, pcb_strdup_printf("DRC: %m+required: %$ms\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.required_value)); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str, pcb_strdup_printf("DRC: %m+required: %$ms\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.required_value)); break; } } @@ -183,8 +183,8 @@ if (v == NULL) { ctx->selected = 0; - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str_value, pcb_strdup("")); - PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str_value, pcb_strdup("")); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wdescription, str, pcb_strdup("")); + PCB_DAD_SET_VALUE(ctx->dlg_hid_ctx, ctx->wmeasure, str, pcb_strdup("")); } else pcb_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &v->bbox); @@ -274,7 +274,7 @@ if ((ctx == NULL) || (!ctx->active) || (ctx->selected == 0)) return; - hv.str_value = NULL; + hv.str = NULL; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wprev, &hv); } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 26939) +++ trunk/src_plugins/export_bboard/bboard.c (revision 26940) @@ -160,10 +160,10 @@ static pcb_export_opt_t *bboard_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (bboard_options[HA_bboardfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (bboard_options[HA_bboardfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &bboard_options[HA_bboardfile], ".png"); - bboard_options[HA_bgcolor].default_val.str_value = pcb_strdup("#FFFFFF"); + bboard_options[HA_bgcolor].default_val.str = pcb_strdup("#FFFFFF"); if (n) *n = NUM_OPTIONS; @@ -498,11 +498,11 @@ bboard_values[i] = bboard_options[i].default_val; options = bboard_values; } - bboard_filename = options[HA_bboardfile].str_value; + bboard_filename = options[HA_bboardfile].str; if (!bboard_filename) bboard_filename = "unknown.png"; - bboard_bgcolor = options[HA_bgcolor].str_value; + bboard_bgcolor = options[HA_bgcolor].str; if (!bboard_bgcolor) bboard_bgcolor = "FFFFFF"; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 26939) +++ trunk/src_plugins/export_bom/bom.c (revision 26940) @@ -66,7 +66,7 @@ static pcb_export_opt_t *bom_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (bom_options[HA_bomfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (bom_options[HA_bomfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &bom_options[HA_bomfile], ".bom"); if (n) @@ -273,7 +273,7 @@ options = bom_values; } - bom_filename = options[HA_bomfile].str_value; + bom_filename = options[HA_bomfile].str; if (!bom_filename) bom_filename = "pcb-out.bom"; Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 26939) +++ trunk/src_plugins/export_dsn/dsn.c (revision 26940) @@ -107,7 +107,7 @@ static pcb_export_opt_t *dsn_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (dsn_options[HA_dsnfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (dsn_options[HA_dsnfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &dsn_options[HA_dsnfile], ".dsn"); if (n) *n = NUM_OPTIONS; @@ -577,7 +577,7 @@ dsn_values[i] = dsn_options[i].default_val; options = dsn_values; } - dsn_filename = options[HA_dsnfile].str_value; + dsn_filename = options[HA_dsnfile].str; if (!dsn_filename) dsn_filename = "pcb-out.dsn"; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 26939) +++ trunk/src_plugins/export_dxf/dxf.c (revision 26940) @@ -204,7 +204,7 @@ { const char *suffix = ".dxf"; - if ((PCB != NULL) && (dxf_attribute_list[HA_dxffile].default_val.str_value == NULL)) + if ((PCB != NULL) && (dxf_attribute_list[HA_dxffile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &dxf_attribute_list[HA_dxffile], suffix); if (n) @@ -282,9 +282,9 @@ options = dxf_values; } - pcb_cam_begin(PCB, &dxf_cam, options[HA_cam].str_value, dxf_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &dxf_cam, options[HA_cam].str, dxf_attribute_list, NUM_OPTIONS, options); - filename = options[HA_dxffile].str_value; + filename = options[HA_dxffile].str; if (!filename) filename = "pcb.dxf"; @@ -298,7 +298,7 @@ else dxf_ctx.f = NULL; - fn = options[HA_template].str_value; + fn = options[HA_template].str; if (fn == NULL) { fn = ""; dxf_ctx.temp = lht_dom_load_string(dxf_templ_default_arr, fn, &errmsg); @@ -337,7 +337,7 @@ fclose(dxf_ctx.f); if (pcb_cam_end(&dxf_cam) == 0) - pcb_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content\n", options[HA_cam].str); } static int dxf_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 26939) +++ trunk/src_plugins/export_excellon/excellon.c (revision 26940) @@ -192,7 +192,7 @@ static pcb_export_opt_t *excellon_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (excellon_options[HA_excellonfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (excellon_options[HA_excellonfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &excellon_options[HA_excellonfile], ""); if (n) @@ -223,9 +223,9 @@ options = excellon_values; } - pcb_cam_begin(PCB, &excellon_cam, options[HA_cam].str_value, excellon_options, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &excellon_cam, options[HA_cam].str, excellon_options, NUM_OPTIONS, options); - fnbase = options[HA_excellonfile].str_value; + fnbase = options[HA_excellonfile].str; if (!fnbase) fnbase = "pcb-out"; @@ -257,25 +257,25 @@ pcb_drill_export_excellon(PCB, &pdrills, conf_excellon.plugins.export_excellon.plated_g85_slot, options[HA_excellonfile_coordfmt].lng, fn); } else { - if (options[HA_excellonfile_plated].str_value == NULL) { + if (options[HA_excellonfile_plated].str == NULL) { strcpy(filesuff, ".plated.cnc"); fn = filename; } else - fn = options[HA_excellonfile_plated].str_value; + fn = options[HA_excellonfile_plated].str; pcb_drill_export_excellon(PCB, &pdrills, conf_excellon.plugins.export_excellon.plated_g85_slot, options[HA_excellonfile_coordfmt].lng, fn); - if (options[HA_excellonfile_unplated].str_value == NULL) { + if (options[HA_excellonfile_unplated].str == NULL) { strcpy(filesuff, ".unplated.cnc"); fn = filename; } else - fn = options[HA_excellonfile_unplated].str_value; + fn = options[HA_excellonfile_unplated].str; pcb_drill_export_excellon(PCB, &udrills, conf_excellon.plugins.export_excellon.unplated_g85_slot, options[HA_excellonfile_coordfmt].lng, fn); } if (pcb_cam_end(&excellon_cam) == 0) - pcb_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content\n", options[HA_cam].str); pcb_drill_uninit(&pdrills); pcb_drill_uninit(&udrills); Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 26939) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 26940) @@ -88,7 +88,7 @@ { const char *suffix = ".fcd"; - if ((PCB != NULL) && (fidocadj_attribute_list[HA_fidocadjfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (fidocadj_attribute_list[HA_fidocadjfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &fidocadj_attribute_list[HA_fidocadjfile], suffix); if (n) @@ -178,7 +178,7 @@ options = fidocadj_values; } - libfile = options[HA_libfile].str_value; + libfile = options[HA_libfile].str; if ((libfile != NULL) && (*libfile != '\0')) { htsi_init(&lib_names, strhash, strkeyeq); have_lib = 1; @@ -188,7 +188,7 @@ else have_lib = 0; - filename = options[HA_fidocadjfile].str_value; + filename = options[HA_fidocadjfile].str; if (!filename) filename = "pcb-rnd-default.fcd"; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 26939) +++ trunk/src_plugins/export_gcode/gcode.c (revision 26940) @@ -246,7 +246,7 @@ last_unit_value = gcode_attribute_list[HA_unit].default_val.lng; } - if ((PCB != NULL) && (gcode_attribute_list[HA_basename].default_val.str_value == NULL)) + if ((PCB != NULL) && (gcode_attribute_list[HA_basename].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &gcode_attribute_list[HA_basename], ".gcode"); if (n) { *n = NUM_OPTIONS; @@ -388,7 +388,7 @@ } options = gcode_values; } - gcode_basename = options[HA_basename].str_value; + gcode_basename = options[HA_basename].str; if (!gcode_basename) { gcode_basename = "pcb-out"; } Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 26939) +++ trunk/src_plugins/export_gerber/gerber.c (revision 26940) @@ -262,7 +262,7 @@ static pcb_export_opt_t *gerber_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (gerber_options[HA_gerberfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (gerber_options[HA_gerberfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &gerber_options[HA_gerberfile], ""); if (n) @@ -546,9 +546,9 @@ pcb_printf_slot[4] = gerber_cfmt->cfmt; pcb_printf_slot[5] = gerber_cfmt->afmt; - pcb_cam_begin(PCB, &gerber_cam, options[HA_cam].str_value, gerber_options, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &gerber_cam, options[HA_cam].str, gerber_options, NUM_OPTIONS, options); - fnbase = options[HA_gerberfile].str_value; + fnbase = options[HA_gerberfile].str; if (!fnbase) fnbase = "pcb-out"; @@ -656,7 +656,7 @@ } if (pcb_cam_end(&gerber_cam) == 0) - pcb_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content\n", options[HA_cam].str); pcb_drill_uninit(&pdrills); pcb_drill_uninit(&udrills); Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 26939) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 26940) @@ -418,7 +418,7 @@ static pcb_export_opt_t *ipcd356_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (ipcd356_options[HA_ipcd356_filename].default_val.str_value == NULL)) + if ((PCB != NULL) && (ipcd356_options[HA_ipcd356_filename].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &ipcd356_options[HA_ipcd356_filename], ".net"); if (n != NULL) @@ -447,7 +447,7 @@ options = ipcd356_values; } - fn = options[HA_ipcd356_filename].str_value; + fn = options[HA_ipcd356_filename].str; if (fn == NULL) fn = "pcb-rnd-out.net"; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 26939) +++ trunk/src_plugins/export_lpr/lpr.c (revision 26940) @@ -50,8 +50,8 @@ * HID's may want to free() this string value and replace it with a * new one based on how a user fills out a print dialog. */ - if (base_lpr_options[HA_lprcommand].default_val.str_value == NULL) { - base_lpr_options[HA_lprcommand].default_val.str_value = pcb_strdup("lpr"); + if (base_lpr_options[HA_lprcommand].default_val.str == NULL) { + base_lpr_options[HA_lprcommand].default_val.str = pcb_strdup("lpr"); } if (lpr_options == 0) { @@ -79,7 +79,7 @@ options = lpr_values; } - filename = options[HA_lprcommand].str_value; + filename = options[HA_lprcommand].str; printf("LPR: open %s\n", filename); f = pcb_popen(NULL, filename, "w"); Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 26939) +++ trunk/src_plugins/export_openems/excitation.c (revision 26940) @@ -130,13 +130,13 @@ static void ser_str(int save, int widx, const char *attrkey) { if (save) { - ser_save(exc_ctx.dlg[widx].val.str_value, attrkey); + ser_save(exc_ctx.dlg[widx].val.str, attrkey); } else { pcb_hid_attr_val_t hv; - hv.str_value = ser_load(attrkey); - if (hv.str_value == NULL) - hv.str_value = ""; + hv.str = ser_load(attrkey); + if (hv.str == NULL) + hv.str = ""; pcb_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, widx, &hv); } } Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 26939) +++ trunk/src_plugins/export_openems/export_openems.c (revision 26940) @@ -162,7 +162,7 @@ const char *suffix = ".m"; pcb_mesh_t *mesh = pcb_mesh_get(MESH_NAME); - if ((PCB != NULL) && (openems_attribute_list[HA_openemsfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (openems_attribute_list[HA_openemsfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &openems_attribute_list[HA_openemsfile], suffix); if (mesh != NULL) { @@ -171,12 +171,12 @@ } TODO(": when export dialogs change into DAD, this hack to convert the strings to allocated ones will not be needed anymore") - openems_attribute_list[HA_def_copper_cond].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_copper_cond].default_val.str_value); - openems_attribute_list[HA_def_subst_epsilon].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_epsilon].default_val.str_value); - openems_attribute_list[HA_def_subst_mue].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_mue].default_val.str_value); - openems_attribute_list[HA_def_subst_kappa].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_kappa].default_val.str_value); - openems_attribute_list[HA_def_subst_sigma].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_sigma].default_val.str_value); - openems_attribute_list[HA_void_name].default_val.str_value = pcb_strdup(openems_attribute_list[HA_void_name].default_val.str_value); + openems_attribute_list[HA_def_copper_cond].default_val.str = pcb_strdup(openems_attribute_list[HA_def_copper_cond].default_val.str); + openems_attribute_list[HA_def_subst_epsilon].default_val.str = pcb_strdup(openems_attribute_list[HA_def_subst_epsilon].default_val.str); + openems_attribute_list[HA_def_subst_mue].default_val.str = pcb_strdup(openems_attribute_list[HA_def_subst_mue].default_val.str); + openems_attribute_list[HA_def_subst_kappa].default_val.str = pcb_strdup(openems_attribute_list[HA_def_subst_kappa].default_val.str); + openems_attribute_list[HA_def_subst_sigma].default_val.str = pcb_strdup(openems_attribute_list[HA_def_subst_sigma].default_val.str); + openems_attribute_list[HA_void_name].default_val.str = pcb_strdup(openems_attribute_list[HA_void_name].default_val.str); if (n) *n = NUM_OPTIONS; @@ -214,7 +214,7 @@ fprintf(ctx->f, "\n"); fprintf(ctx->f, "%% void is the material used for: fill holes, cutouts in substrate, etc\n"); - fprintf(ctx->f, "void.name = '%s';\n", ctx->options[HA_void_name].str_value); + fprintf(ctx->f, "void.name = '%s';\n", ctx->options[HA_void_name].str); fprintf(ctx->f, "void.epsilon = %f;\n", ctx->options[HA_void_epsilon].real_value); fprintf(ctx->f, "void.mue = %f;\n", ctx->options[HA_void_mue].real_value); fprintf(ctx->f, "%% void.kappa = kappa;\n"); @@ -250,7 +250,7 @@ opt = (grp->ltype & PCB_LYT_COPPER) ? cop_opt : subs_opt; assert(opt >= 0); if (is_str) - pcb_fprintf(ctx->f, "%s", ctx->options[opt].str_value); + pcb_fprintf(ctx->f, "%s", ctx->options[opt].str); else pcb_fprintf(ctx->f, "%mm", ctx->options[opt].coord_value); } @@ -645,7 +645,7 @@ options = openems_values; } - filename = options[HA_openemsfile].str_value; + filename = options[HA_openemsfile].str; if (!filename) filename = "pcb.m"; Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 26939) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 26940) @@ -131,7 +131,7 @@ { const char *suffix = ".scad"; - if ((PCB != NULL) && (openscad_attribute_list[HA_openscadfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (openscad_attribute_list[HA_openscadfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &openscad_attribute_list[HA_openscadfile], suffix); if (n) @@ -305,7 +305,7 @@ options = openscad_values; } - filename = options[HA_openscadfile].str_value; + filename = options[HA_openscadfile].str; if (!filename) filename = "pcb.openscad"; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 26939) +++ trunk/src_plugins/export_png/png.c (revision 26940) @@ -476,7 +476,7 @@ { const char *suffix = get_file_suffix(); - if ((PCB != NULL) && (png_attribute_list[HA_pngfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (png_attribute_list[HA_pngfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &png_attribute_list[HA_pngfile], suffix); if (n) @@ -999,7 +999,7 @@ options = png_values; } - pcb_cam_begin(PCB, &png_cam, options[HA_cam].str_value, png_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &png_cam, options[HA_cam].str, png_attribute_list, NUM_OPTIONS, options); if (options[HA_photo_mode].lng) { photo_mode = 1; @@ -1018,7 +1018,7 @@ else photo_mode = 0; - filename = options[HA_pngfile].str_value; + filename = options[HA_pngfile].str; if (!filename) filename = "pcb-out.png"; @@ -1112,7 +1112,7 @@ master_im = im; - parse_bloat(options[HA_bloat].str_value); + parse_bloat(options[HA_bloat].str); /* * Allocate white and black -- the first color allocated @@ -1202,7 +1202,7 @@ free(black); if (pcb_cam_end(&png_cam) == 0) - pcb_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content\n", options[HA_cam].str); } static int png_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 26939) +++ trunk/src_plugins/export_ps/eps.c (revision 26940) @@ -121,7 +121,7 @@ static pcb_export_opt_t *eps_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (eps_attribute_list[HA_psfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (eps_attribute_list[HA_psfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &eps_attribute_list[HA_psfile], ".eps"); if (n) @@ -326,9 +326,9 @@ options = eps_values; } - pcb_cam_begin(PCB, &eps_cam, options[HA_cam].str_value, eps_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &eps_cam, options[HA_cam].str, eps_attribute_list, NUM_OPTIONS, options); - filename = options[HA_psfile].str_value; + filename = options[HA_psfile].str; if (!filename) filename = "pcb-out.eps"; @@ -351,7 +351,7 @@ fclose(f); if (pcb_cam_end(&eps_cam) == 0) - pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content\n", options[HA_cam].str); } static int eps_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 26939) +++ trunk/src_plugins/export_ps/ps.c (revision 26940) @@ -341,7 +341,7 @@ static pcb_export_opt_t *ps_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (ps_attribute_list[HA_psfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (ps_attribute_list[HA_psfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &ps_attribute_list[HA_psfile], ".ps"); if (n) @@ -619,9 +619,9 @@ options = global.ps_values; } - pcb_cam_begin(PCB, &ps_cam, options[HA_cam].str_value, ps_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &ps_cam, options[HA_cam].str, ps_attribute_list, NUM_OPTIONS, options); - global.filename = options[HA_psfile].str_value; + global.filename = options[HA_psfile].str; if (!global.filename) global.filename = "pcb-out.ps"; @@ -659,7 +659,7 @@ } if (pcb_cam_end(&ps_cam) == 0) - pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content\n", options[HA_cam].str); } static int ps_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) @@ -1354,18 +1354,18 @@ return; } - if (ps_calib_attribute_list[0].val.str_value == NULL) { - ps_calib_attribute_list[0].val.str_value = pcb_strdup("lpr"); + if (ps_calib_attribute_list[0].val.str == NULL) { + ps_calib_attribute_list[0].val.str = pcb_strdup("lpr"); } if (pcb_attribute_dialog("ps_calibrate", ps_calib_attribute_list, 1, vals, "Print Calibration Page", NULL)) return; - if (vals[0].str_value == NULL) + if (vals[0].str == NULL) return; - if (use_command || strchr(vals[0].str_value, '|')) { - const char *cmd = vals[0].str_value; + if (use_command || strchr(vals[0].str, '|')) { + const char *cmd = vals[0].str; while (*cmd == ' ' || *cmd == '|') cmd++; ps_cal_file = pcb_popen(&PCB->hidlib, cmd, "w"); @@ -1372,7 +1372,7 @@ used_popen = 1; } else - ps_cal_file = pcb_fopen(&PCB->hidlib, vals[0].str_value, "w"); + ps_cal_file = pcb_fopen(&PCB->hidlib, vals[0].str, "w"); for (c = 0; calib_lines[c]; c++) fputs(calib_lines[c], ps_cal_file); Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 26939) +++ trunk/src_plugins/export_stat/stat.c (revision 26940) @@ -113,7 +113,7 @@ { const char *suffix = ".stat.lht"; - if ((PCB != NULL) && (stat_attribute_list[HA_statfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (stat_attribute_list[HA_statfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &stat_attribute_list[HA_statfile], suffix); if (n) @@ -149,7 +149,7 @@ options = stat_values; } - filename = options[HA_statfile].str_value; + filename = options[HA_statfile].str; if (!filename) filename = "pcb.stat.lht"; @@ -168,7 +168,7 @@ fprintf(f, " built=%ld\n", options[HA_built].lng); fprintf(f, " lht_built=%s\n", (options[HA_lht_built].lng ? "yes" : "no")); fprintf(f, " orig_rnd=%s\n", (options[HA_orig].lng ? "yes" : "no")); - fprintf(f, " first_ver=%s\n", options[HA_first_ver].str_value); + fprintf(f, " first_ver=%s\n", options[HA_first_ver].str); fprintf(f, " curr_ver=%s\n", PCB_VERSION); #ifdef PCB_REVISION fprintf(f, " curr_rev=%s\n", PCB_REVISION); @@ -341,8 +341,8 @@ } fprintf(f, " ha:board {\n"); - fprintf(f, " id={%s}\n", options[HA_board_id].str_value == NULL ? "" : options[HA_board_id].str_value); - fprintf(f, " license={%s}\n", options[HA_license].str_value); + fprintf(f, " id={%s}\n", options[HA_board_id].str == NULL ? "" : options[HA_board_id].str); + fprintf(f, " license={%s}\n", options[HA_license].str); fprintf(f, " format={%s}\n", PCB->Data->loader == NULL ? "unknown" : PCB->Data->loader->description); pcb_fprintf(f, " width=%$mm\n", width); pcb_fprintf(f, " height=%$mm\n", height); @@ -386,10 +386,10 @@ void pplg_uninit_export_stat(void) { - free((char *)stat_attribute_list[HA_first_ver].default_val.str_value); - free((char *)stat_attribute_list[HA_license].default_val.str_value); - stat_attribute_list[HA_first_ver].default_val.str_value = NULL; - stat_attribute_list[HA_license].default_val.str_value = NULL; + free((char *)stat_attribute_list[HA_first_ver].default_val.str); + free((char *)stat_attribute_list[HA_license].default_val.str); + stat_attribute_list[HA_first_ver].default_val.str = NULL; + stat_attribute_list[HA_license].default_val.str = NULL; pcb_hid_remove_attributes_by_cookie(stat_cookie); } @@ -412,8 +412,8 @@ stat_hid.usage = stat_usage; - stat_attribute_list[HA_first_ver].default_val.str_value = pcb_strdup(PCB_VERSION); - stat_attribute_list[HA_license].default_val.str_value = pcb_strdup("proprietary/private"); + stat_attribute_list[HA_first_ver].default_val.str = pcb_strdup(PCB_VERSION); + stat_attribute_list[HA_license].default_val.str = pcb_strdup("proprietary/private"); pcb_hid_register_hid(&stat_hid); Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 26939) +++ trunk/src_plugins/export_svg/svg.c (revision 26940) @@ -202,7 +202,7 @@ { const char *suffix = ".svg"; - if ((PCB != NULL) && (svg_attribute_list[HA_svgfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (svg_attribute_list[HA_svgfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &svg_attribute_list[HA_svgfile], suffix); if (n) @@ -339,10 +339,10 @@ options = svg_values; } - pcb_cam_begin(PCB, &svg_cam, options[HA_cam].str_value, svg_attribute_list, NUM_OPTIONS, options); + pcb_cam_begin(PCB, &svg_cam, options[HA_cam].str, svg_attribute_list, NUM_OPTIONS, options); if (svg_cam.fn_template == NULL) { - filename = options[HA_svgfile].str_value; + filename = options[HA_svgfile].str; if (!filename) filename = "pcb.svg"; @@ -369,7 +369,7 @@ f = NULL; if (pcb_cam_end(&svg_cam) == 0) - pcb_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content\n", options[HA_cam].str_value); + pcb_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content\n", options[HA_cam].str); } static int svg_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 26939) +++ trunk/src_plugins/export_test/export_test.c (revision 26940) @@ -43,7 +43,7 @@ static pcb_export_opt_t *export_test_get_export_options(pcb_hid_t *hid, int *n) { - if ((PCB != NULL) && (export_test_options[HA_export_testfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (export_test_options[HA_export_testfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &export_test_options[HA_export_testfile], ".export_test"); if (n) @@ -67,7 +67,7 @@ options = export_test_values; } - export_test_filename = options[HA_export_testfile].str_value; + export_test_filename = options[HA_export_testfile].str; if (!export_test_filename) export_test_filename = "pcb-out.export_test"; else { Index: trunk/src_plugins/export_vfs_mc/export_vfs_mc.c =================================================================== --- trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 26939) +++ trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 26940) @@ -116,10 +116,10 @@ options = export_vfs_mc_values; } - cmd = options[HA_export_vfs_mc_cmd].str_value; + cmd = options[HA_export_vfs_mc_cmd].str; if (strcmp(cmd, "list") == 0) mc_list(); - else if (strcmp(cmd, "copyout") == 0) mc_copyout(options[HA_export_vfs_mc_qpath].str_value); - else if (strcmp(cmd, "copyin") == 0) mc_copyin(options[HA_export_vfs_mc_qpath].str_value); + else if (strcmp(cmd, "copyout") == 0) mc_copyout(options[HA_export_vfs_mc_qpath].str); + else if (strcmp(cmd, "copyin") == 0) mc_copyin(options[HA_export_vfs_mc_qpath].str); else { fprintf(stderr, "Unknown vfs_mc command: '%s'\n", cmd); exit(1); Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 26939) +++ trunk/src_plugins/export_xy/xy.c (revision 26940) @@ -141,7 +141,7 @@ xy_options[HA_unit].default_val.lng = get_unit_struct("mil")->index; last_unit_value = xy_options[HA_unit].default_val.lng; } - if ((PCB != NULL) && (xy_options[HA_xyfile].default_val.str_value == NULL)) + if ((PCB != NULL) && (xy_options[HA_xyfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &xy_options[HA_xyfile], ".xy"); if (n) @@ -800,7 +800,7 @@ options = xy_values; } - xy_filename = options[HA_xyfile].str_value; + xy_filename = options[HA_xyfile].str; if (!xy_filename) xy_filename = "pcb-out.xy"; @@ -818,7 +818,7 @@ templ.subc = get_templ(*tid, "subc"); templ.term = get_templ(*tid, "term"); - PrintXY(&templ, options[HA_format].str_value); + PrintXY(&templ, options[HA_format].str); } static int xy_usage(pcb_hid_t *hid, const char *topic) Index: trunk/src_plugins/extedit/extedit_dad.c =================================================================== --- trunk/src_plugins/extedit/extedit_dad.c (revision 26939) +++ trunk/src_plugins/extedit/extedit_dad.c (revision 26940) @@ -42,7 +42,7 @@ { PCB_DAD_SET_VALUE(ee->dlg_hid_ctx, ee->wmethod, lng, ee->mthi); PCB_DAD_SET_VALUE(ee->dlg_hid_ctx, ee->wfmt, lng, methods[ee->mthi].fmt); - PCB_DAD_SET_VALUE(ee->dlg_hid_ctx, ee->wcmd, str_value, pcb_strdup(methods[ee->mthi].command)); + PCB_DAD_SET_VALUE(ee->dlg_hid_ctx, ee->wcmd, str, pcb_strdup(methods[ee->mthi].command)); /* we have only one format, so disable the combo box for selecting it */ pcb_gui->attr_dlg_widget_state(ee->dlg_hid_ctx, ee->wfmt, pcb_false); @@ -71,7 +71,7 @@ if (lock) return; - methods[ee->mthi].command = pcb_strdup(ee->dlg[ee->wcmd].val.str_value); + methods[ee->mthi].command = pcb_strdup(ee->dlg[ee->wcmd].val.str); lock = 1; ee_data2dialog(ee); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 26939) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 26940) @@ -203,12 +203,12 @@ ctx->attrs[widx].val.lng = XmToggleButtonGetState(ctx->wl[widx]); break; case PCB_HATT_STRING: - free((char *)ctx->attrs[widx].val.str_value); - ctx->attrs[widx].val.str_value = pcb_strdup(XmTextGetString(ctx->wl[widx])); + free((char *)ctx->attrs[widx].val.str); + ctx->attrs[widx].val.str = pcb_strdup(XmTextGetString(ctx->wl[widx])); if (ctx->results != NULL) { - TODO("this is a memory leak at the moment, because ctx->results[widx].str_value may be const char * in some cases; will be gone when result is gone"); -/* free((char *)ctx->results[widx].str_value);*/ - ctx->results[widx].str_value = ctx->attrs[widx].val.str_value; + TODO("this is a memory leak at the moment, because ctx->results[widx].str may be const char * in some cases; will be gone when result is gone"); +/* free((char *)ctx->results[widx].str);*/ + ctx->results[widx].str = ctx->attrs[widx].val.str; } return; /* can't rely on central copy because of the allocation */ case PCB_HATT_ENUM: @@ -417,7 +417,7 @@ case PCB_HATT_STRING: stdarg(XmNcolumns, 40); stdarg(XmNresizeWidth, True); - stdarg(XmNvalue, ctx->results[i].str_value); + stdarg(XmNvalue, ctx->results[i].str); ctx->wl[i] = XmCreateTextField(parent, XmStrCast(ctx->attrs[i].name), stdarg_args, stdarg_n); XtAddCallback(ctx->wl[i], XmNvalueChangedCallback, valchg, ctx->wl[i]); XtAddCallback(ctx->wl[i], XmNactivateCallback, activated, ctx->wl[i]); @@ -474,7 +474,7 @@ } break; case PCB_HATT_BUTTON: - stdarg(XmNlabelString, XmStringCreatePCB(ctx->attrs[i].val.str_value)); + stdarg(XmNlabelString, XmStringCreatePCB(ctx->attrs[i].val.str)); ctx->wl[i] = XmCreatePushButton(parent, XmStrCast(ctx->attrs[i].name), stdarg_args, stdarg_n); XtAddCallback(ctx->wl[i], XmNactivateCallback, valchg, ctx->wl[i]); break; @@ -522,17 +522,17 @@ /* not possible to change the pane with the default motif widget */ break; case PCB_HATT_BUTTON: - XtVaSetValues(ctx->wl[idx], XmNlabelString, XmStringCreatePCB(val->str_value), NULL); + XtVaSetValues(ctx->wl[idx], XmNlabelString, XmStringCreatePCB(val->str), NULL); break; case PCB_HATT_LABEL: - XtVaSetValues(ctx->wl[idx], XmNlabelString, XmStringCreatePCB(val->str_value), NULL); + XtVaSetValues(ctx->wl[idx], XmNlabelString, XmStringCreatePCB(val->str), NULL); break; case PCB_HATT_BOOL: XtVaSetValues(ctx->wl[idx], XmNset, val->lng, NULL); break; case PCB_HATT_STRING: - XtVaSetValues(ctx->wl[idx], XmNvalue, XmStrCast(val->str_value), NULL); - ctx->attrs[idx].val.str_value = pcb_strdup(val->str_value); + XtVaSetValues(ctx->wl[idx], XmNvalue, XmStrCast(val->str), NULL); + ctx->attrs[idx].val.str = pcb_strdup(val->str); copied = 1; break; case PCB_HATT_INTEGER: @@ -549,10 +549,10 @@ ltf_preview_set(ctx, idx, val->real_value); break; case PCB_HATT_TEXT: - ltf_text_set(ctx, idx, val->str_value); + ltf_text_set(ctx, idx, val->str); break; case PCB_HATT_TREE: - ltf_tree_set(ctx, idx, val->str_value); + ltf_tree_set(ctx, idx, val->str); break; case PCB_HATT_ENUM: for (n = 0; ctx->attrs[idx].enumerations[n]; n++) { @@ -650,10 +650,10 @@ for (i = 0; i < n_attrs; i++) { results[i] = attrs[i].val; - if (PCB_HAT_IS_STR(attrs[i].type) && (results[i].str_value)) - results[i].str_value = pcb_strdup(results[i].str_value); + if (PCB_HAT_IS_STR(attrs[i].type) && (results[i].str)) + results[i].str = pcb_strdup(results[i].str); else - results[i].str_value = NULL; + results[i].str = NULL; } ctx->wl = (Widget *) calloc(n_attrs, sizeof(Widget)); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 26939) +++ trunk/src_plugins/hid_lesstif/main.c (revision 26940) @@ -1737,7 +1737,7 @@ r->resource_type = XtRString; r->default_type = XtRString; r->resource_size = sizeof(char *); - r->default_addr = (char *) a->default_val.str_value; + r->default_addr = (char *) a->default_val.str; rcount++; break; case PCB_HATT_BOOL: @@ -1825,7 +1825,7 @@ if (a->value) *(char **) a->value = v->s; else - a->default_val.str_value = v->s; + a->default_val.str = v->s; rcount++; break; default: Index: trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 26939) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 26940) @@ -188,9 +188,9 @@ if (ctx->inhibit_valchg) return; if (r != NULL) - attr->val.str_value = r->path; + attr->val.str = r->path; else - attr->val.str_value = NULL; + attr->val.str = NULL; change_cb(ctx, attr); if (tree->user_selected_cb != NULL) tree->user_selected_cb(attr, ctx, r); @@ -370,7 +370,7 @@ GtkTreePath *path; pcb_hid_tree_t *tree = (pcb_hid_tree_t *)attr->enumerations; pcb_hid_row_t *r; - const char *s = val->str_value; + const char *s = val->str; if ((s == NULL) || (*s == '\0')) { TODO("DAD: remove cursor - is it possible with gtk?") Index: trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 26939) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 26940) @@ -178,7 +178,7 @@ static int ghid_text_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) { - txt_set_text(&ctx->attrs[idx], ctx, PCB_HID_TEXT_REPLACE, val->str_value); + txt_set_text(&ctx->attrs[idx], ctx, PCB_HID_TEXT_REPLACE, val->str); return 0; } Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 26939) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 26940) @@ -106,8 +106,8 @@ if (ctx->inhibit_valchg) return; - free((char *)dst->val.str_value); - dst->val.str_value = pcb_strdup(gtk_entry_get_text(entry)); + free((char *)dst->val.str); + dst->val.str = pcb_strdup(gtk_entry_get_text(entry)); change_cb(ctx, dst); } @@ -430,8 +430,8 @@ g_object_set_data(G_OBJECT(entry), PCB_OBJ_PROP, ctx); ctx->wl[j] = entry; - if (ctx->attrs[j].val.str_value != NULL) - gtk_entry_set_text(GTK_ENTRY(entry), ctx->attrs[j].val.str_value); + if (ctx->attrs[j].val.str != NULL) + gtk_entry_set_text(GTK_ENTRY(entry), ctx->attrs[j].val.str); gtk_widget_set_tooltip_text(entry, ctx->attrs[j].help_text); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(entry_changed_cb), &(ctx->attrs[j])); g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(entry_activate_cb), &(ctx->attrs[j])); @@ -509,9 +509,9 @@ gtk_box_pack_start(GTK_BOX(parent), hbox, expfill, expfill, 0); if (ctx->attrs[j].pcb_hatt_flags & PCB_HATF_TOGGLE) - ctx->wl[j] = gtk_toggle_button_new_with_label(ctx->attrs[j].val.str_value); + ctx->wl[j] = gtk_toggle_button_new_with_label(ctx->attrs[j].val.str); else - ctx->wl[j] = gtk_button_new_with_label(ctx->attrs[j].val.str_value); + ctx->wl[j] = gtk_button_new_with_label(ctx->attrs[j].val.str); gtk_box_pack_start(GTK_BOX(hbox), ctx->wl[j], expfill, expfill, 0); gtk_widget_set_tooltip_text(ctx->wl[j], ctx->attrs[j].help_text); @@ -593,9 +593,9 @@ case PCB_HATT_LABEL: { const char *txt = gtk_label_get_text(GTK_LABEL(ctx->wl[idx])); - if (strcmp(txt, val->str_value) == 0) + if (strcmp(txt, val->str) == 0) goto nochg; - gtk_label_set_text(GTK_LABEL(ctx->wl[idx]), val->str_value); + gtk_label_set_text(GTK_LABEL(ctx->wl[idx]), val->str); } break; @@ -604,13 +604,13 @@ case PCB_HATT_STRING: { const char *nv, *s = gtk_entry_get_text(GTK_ENTRY(ctx->wl[idx])); - nv = val->str_value; + nv = val->str; if (nv == NULL) nv = ""; if (strcmp(s, nv) == 0) goto nochg; - gtk_entry_set_text(GTK_ENTRY(ctx->wl[idx]), val->str_value); - ctx->attrs[idx].val.str_value = pcb_strdup(val->str_value); + gtk_entry_set_text(GTK_ENTRY(ctx->wl[idx]), val->str); + ctx->attrs[idx].val.str = pcb_strdup(val->str); *copied = 1; } break; @@ -640,9 +640,9 @@ case PCB_HATT_BUTTON: { const char *s = gtk_button_get_label(GTK_BUTTON(ctx->wl[idx])); - if (strcmp(s, val->str_value) == 0) + if (strcmp(s, val->str) == 0) goto nochg; - gtk_button_set_label(GTK_BUTTON(ctx->wl[idx]), val->str_value); + gtk_button_set_label(GTK_BUTTON(ctx->wl[idx]), val->str); } break; @@ -844,10 +844,10 @@ if (ctx->rc == 0) { /* copy over the results */ for (i = 0; i < ctx->n_attrs; i++) { ctx->results[i] = ctx->attrs[i].val; - if (PCB_HAT_IS_STR(ctx->attrs[i].type) && (ctx->results[i].str_value)) - ctx->results[i].str_value = pcb_strdup(ctx->results[i].str_value); + if (PCB_HAT_IS_STR(ctx->attrs[i].type) && (ctx->results[i].str)) + ctx->results[i].str = pcb_strdup(ctx->results[i].str); else - ctx->results[i].str_value = NULL; + ctx->results[i].str = NULL; } } Index: trunk/src_plugins/lib_hid_common/act_dad.c =================================================================== --- trunk/src_plugins/lib_hid_common/act_dad.c (revision 26939) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 26940) @@ -473,7 +473,7 @@ case PCB_HATT_LABEL: case PCB_HATT_BUTTON: PCB_ACT_CONVARG(4, FGW_STR, dad, txt = argv[4].val.str); - PCB_DAD_SET_VALUE(dad->dlg_hid_ctx, wid, str_value, txt); + PCB_DAD_SET_VALUE(dad->dlg_hid_ctx, wid, str, txt); break; default: pcb_message(PCB_MSG_ERROR, "Invalid widget type %d - can not change value (set ignored)\n", wid); @@ -518,7 +518,7 @@ case PCB_HATT_LABEL: case PCB_HATT_BUTTON: res->type = FGW_STR; - res->val.str = (char *)dad->dlg[wid].val.str_value; + res->val.str = (char *)dad->dlg[wid].val.str; break; default: pcb_message(PCB_MSG_ERROR, "Invalid widget type %d - can not retrieve value (get ignored)\n", wid); Index: trunk/src_plugins/lib_hid_common/dlg_comm_m.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 26939) +++ trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 26940) @@ -60,7 +60,7 @@ PCB_DAD_LABEL(dlg, label); PCB_DAD_STRING(dlg); ws = PCB_DAD_CURRENT(dlg); - dlg[ws].val.str_value = pcb_strdup(default_str == NULL ? "" : default_str); + dlg[ws].val.str = pcb_strdup(default_str == NULL ? "" : default_str); PCB_DAD_ENTER_CB(dlg, prompt_enter_cb); dlg[ws].user_data = &dlg_ret_override; PCB_DAD_BUTTON_CLOSES(dlg, clbtn); @@ -73,7 +73,7 @@ } res->type = FGW_STR | FGW_DYN; - res->val.str = pcb_strdup(dlg[ws].val.str_value); + res->val.str = pcb_strdup(dlg[ws].val.str); PCB_DAD_FREE(dlg); return 0; Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 26939) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 26940) @@ -109,8 +109,8 @@ if (rst.sub.dlg[rst.wlab[n]].val.lng != hv.lng) pcb_gui->attr_dlg_set_value(rst.sub.dlg_hid_ctx, rst.wchk[n], &hv); - hv.str_value = PCB->RouteStyle.array[n].name; - if (strcmp(rst.sub.dlg[rst.wlab[n]].name, hv.str_value) != 0) + hv.str = PCB->RouteStyle.array[n].name; + if (strcmp(rst.sub.dlg[rst.wlab[n]].name, hv.str) != 0) pcb_gui->attr_dlg_set_value(rst.sub.dlg_hid_ctx, rst.wlab[n], &hv); } if (vtroutestyle_len(&PCB->RouteStyle) != rst.last_len) { Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 26939) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 26940) @@ -73,7 +73,7 @@ rst = vtroutestyle_get(&PCB->RouteStyle, rst_idx, 0); - hv.str_value = rst->name; + hv.str = rst->name; pcb_gui->attr_dlg_set_value(rstdlg_ctx.dlg_hid_ctx, rstdlg_ctx.wname, &hv); hv.coord_value = rst->Thick; @@ -127,7 +127,7 @@ TODO("This change is not undoable"); if (idx == rstdlg_ctx.wname) { - const char *s = attr->val.str_value; + const char *s = attr->val.str; while(isspace(*s)) s++; strncpy(rst->name, s, sizeof(rst->name)); } @@ -176,8 +176,8 @@ PCB_DAD_NEW("route_style_attr", dlg, "Edit route style attribute", NULL, pcb_true, NULL); res = PCB_DAD_RUN(dlg); if (res == 0) { - *key = pcb_strdup(dlg[wkey].val.str_value); - *val = pcb_strdup(dlg[wval].val.str_value); + *key = pcb_strdup(dlg[wkey].val.str); + *val = pcb_strdup(dlg[wval].val.str); } PCB_DAD_FREE(dlg); return res; Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 26939) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 26940) @@ -143,13 +143,13 @@ build_st_line2(); pcb_gui->attr_dlg_widget_hide(status.stsub.dlg_hid_ctx, status.wst2, 1); } - hv.str_value = status.buf.array; + hv.str = status.buf.array; pcb_gui->attr_dlg_set_value(status.stsub.dlg_hid_ctx, status.wst1, &hv); if (conf_core.appearance.compact) { status.buf.used = 0; build_st_line2(); - hv.str_value = status.buf.array; + hv.str = status.buf.array; pcb_gui->attr_dlg_set_value(status.stsub.dlg_hid_ctx, status.wst2, &hv); if (!status.st_has_text) pcb_gui->attr_dlg_widget_hide(status.stsub.dlg_hid_ctx, status.wst2, 0); @@ -174,12 +174,12 @@ if (conf_core.appearance.compact) { status.buf.used = 0; pcb_append_printf(&status.buf, "%m+%-mS", pcbhl_conf.editor.grid_unit->allow, pcb_crosshair.X); - hv.str_value = status.buf.array; + hv.str = status.buf.array; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd2[0], &hv); status.buf.used = 0; pcb_append_printf(&status.buf, "%m+%-mS", pcbhl_conf.editor.grid_unit->allow, pcb_crosshair.Y); - hv.str_value = status.buf.array; + hv.str = status.buf.array; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd2[1], &hv); pcb_gui->attr_dlg_widget_hide(status.rdsub.dlg_hid_ctx, status.wrd2[1], 0); } @@ -186,7 +186,7 @@ else { status.buf.used = 0; pcb_append_printf(&status.buf, "%m+%-mS %-mS", pcbhl_conf.editor.grid_unit->allow, pcb_crosshair.X, pcb_crosshair.Y); - hv.str_value = status.buf.array; + hv.str = status.buf.array; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd2[0], &hv); pcb_gui->attr_dlg_widget_hide(status.rdsub.dlg_hid_ctx, status.wrd2[1], 1); } @@ -215,12 +215,12 @@ s3 = status.buf.array + 17; } - hv.str_value = s1; + hv.str = s1; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd1[0], &hv); if (conf_core.appearance.compact) { - hv.str_value = s2; + hv.str = s2; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd1[1], &hv); - hv.str_value = s3; + hv.str = s3; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrd1[2], &hv); pcb_gui->attr_dlg_widget_hide(status.rdsub.dlg_hid_ctx, status.wrd1[1], 0); pcb_gui->attr_dlg_widget_hide(status.rdsub.dlg_hid_ctx, status.wrd1[2], 0); @@ -233,7 +233,7 @@ if (status.last_unit != pcbhl_conf.editor.grid_unit) { status.lock++; status.last_unit = pcbhl_conf.editor.grid_unit; - hv.str_value = pcbhl_conf.editor.grid_unit->suffix; + hv.str = pcbhl_conf.editor.grid_unit->suffix; pcb_gui->attr_dlg_set_value(status.rdsub.dlg_hid_ctx, status.wrdunit, &hv); status.lock--; } @@ -352,9 +352,9 @@ if (text != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = text; + hv.str = text; pcb_gui->attr_dlg_set_value(status.stsub.dlg_hid_ctx, status.wsttxt, &hv); - hv.str_value = ""; + hv.str = ""; pcb_gui->attr_dlg_set_value(status.stsub.dlg_hid_ctx, status.wst2, &hv); pcb_gui->attr_dlg_widget_hide(status.stsub.dlg_hid_ctx, status.wst1, 1); pcb_gui->attr_dlg_widget_hide(status.stsub.dlg_hid_ctx, status.wsttxt, 0); Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 26939) +++ trunk/src_plugins/loghid/loghid.c (revision 26940) @@ -63,7 +63,7 @@ pcb_hid_register_attributes(loghid_attribute_list, NUM_OPTIONS, loghid_cookie, 0); pcb_hid_parse_command_line(argc, argv); - target_name = loghid_attribute_list[HA_target_hid].default_val.str_value; + target_name = loghid_attribute_list[HA_target_hid].default_val.str; if (is_gui) { target = pcb_hid_find_gui(target_name); Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 26939) +++ trunk/src_plugins/propedit/propdlg.c (revision 26940) @@ -71,7 +71,7 @@ attr = &ctx->dlg[ctx->wtree]; attr_inp = &ctx->dlg[ctx->wfilter]; tree = (pcb_hid_tree_t *)attr->enumerations; - text = attr_inp->val.str_value; + text = attr_inp->val.str; have_filter_text = (text != NULL) && (*text != '\0'); /* hide or unhide everything */ @@ -130,7 +130,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtree, &hv); free(cursor_path); } @@ -188,7 +188,7 @@ gds_truncate(&scope, gds_len(&scope)-2); - hv.str_value = scope.array; + hv.str = scope.array; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wscope, &hv); } } @@ -222,7 +222,7 @@ memset(&hv, 0, sizeof(hv)); switch(p->type) { - case PCB_PROPT_STRING: hv.str_value = pcb_strdup(pv->string == NULL ? "" : pv->string); break; + case PCB_PROPT_STRING: hv.str = pcb_strdup(pv->string == NULL ? "" : pv->string); break; case PCB_PROPT_COORD: hv.coord_value = pv->coord; break; case PCB_PROPT_ANGLE: hv.real_value = pv->angle; break; case PCB_PROPT_BOOL: @@ -319,7 +319,7 @@ case PCB_PROPT_max: return; case PCB_PROPT_STRING: - sctx.s = ctx->dlg[ctx->wedit[p->type]].val.str_value; + sctx.s = ctx->dlg[ctx->wedit[p->type]].val.str; break; case PCB_PROPT_COORD: sctx.c = ctx->dlg[ctx->wedit[p->type]].val.coord_value; @@ -375,13 +375,13 @@ PCB_DAD_END(dlg); PCB_DAD_AUTORUN("propedit_add", dlg, "Propedit: add new attribute", NULL, failed); - key = dlg[wkey].val.str_value; + key = dlg[wkey].val.str; if (key == NULL) key = ""; while(isspace(*key)) key++; if ((failed == 0) && (*key != '\0')) { char *path = pcb_strdup_printf("a/%s", key); - pcb_propsel_set_str(&ctx->pe, path, dlg[wval].val.str_value); + pcb_propsel_set_str(&ctx->pe, path, dlg[wval].val.str); free(path); prop_refresh(ctx); } Index: trunk/src_plugins/script/script_act.c =================================================================== --- trunk/src_plugins/script/script_act.c (revision 26939) +++ trunk/src_plugins/script/script_act.c (revision 26940) @@ -135,7 +135,7 @@ /* restore cursor */ if (cursor_path != NULL) { pcb_hid_attr_val_t hv; - hv.str_value = cursor_path; + hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wslist, &hv); free(cursor_path); } @@ -206,7 +206,7 @@ tmp = strrchr(fn, PCB_DIR_SEPARATOR_C); if (tmp != NULL) { tmp++; - idlang.dlg[idlang.wid].val.str_value = tmp = pcb_strdup(tmp); + idlang.dlg[idlang.wid].val.str = tmp = pcb_strdup(tmp); tmp = strchr(tmp, '.'); if (tmp != NULL) *tmp = '\0'; @@ -218,7 +218,7 @@ idlang.wlang = PCB_DAD_CURRENT(idlang.dlg); tmp = strrchr(fn, '.'); if (tmp != NULL) - idlang.dlg[idlang.wlang].val.str_value = pcb_strdup(guess_lang(tmp+1)); + idlang.dlg[idlang.wlang].val.str = pcb_strdup(guess_lang(tmp+1)); PCB_DAD_END(idlang.dlg); PCB_DAD_BUTTON_CLOSES(idlang.dlg, clbtn); PCB_DAD_END(idlang.dlg); @@ -226,7 +226,7 @@ PCB_DAD_AUTORUN("script_load", idlang.dlg, "load script", NULL, failed); - if ((!failed) && (pcb_script_load(idlang.dlg[idlang.wid].val.str_value, fn, idlang.dlg[idlang.wlang].val.str_value) == 0)) + if ((!failed) && (pcb_script_load(idlang.dlg[idlang.wid].val.str, fn, idlang.dlg[idlang.wlang].val.str) == 0)) script_dlg_s2d(ctx); PCB_DAD_FREE(idlang.dlg);