Index: excitation.c =================================================================== --- excitation.c (revision 26937) +++ excitation.c (revision 26938) @@ -75,7 +75,7 @@ { if (save) { char tmp[128]; - sprintf(tmp, "%d", exc_ctx.dlg[widx].val.int_value); + sprintf(tmp, "%d", exc_ctx.dlg[widx].val.lng); ser_save(tmp, attrkey); } else { @@ -84,14 +84,14 @@ const char *orig = ser_load(attrkey); if (orig != NULL) { - hv.int_value = strtol(orig, &end, 10); + hv.lng = strtol(orig, &end, 10); if (*end != '\0') { pcb_message(PCB_MSG_ERROR, "Invalid integer value in board attribute '%s': '%s'\n", attrkey, orig); - hv.int_value = 0; + hv.lng = 0; } } else - hv.int_value = 0; + hv.lng = 0; pcb_gui->attr_dlg_set_value(exc_ctx.dlg_hid_ctx, widx, &hv); } @@ -344,7 +344,7 @@ static void select_update(int setattr) { pcb_hid_attr_val_t hv; - hv.int_value = exc_ctx.selected; + hv.lng = exc_ctx.selected; if ((exc_ctx.selected < 0) || (exc_ctx.selected >= sizeof(excitations)/sizeof(excitations[0]))) { pcb_message(PCB_MSG_ERROR, "Invalid excitation selected\n"); @@ -364,7 +364,7 @@ static void select_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { - exc_ctx.selected = attr->val.int_value; + exc_ctx.selected = attr->val.lng; select_update(1); } Index: export_openems.c =================================================================== --- export_openems.c (revision 26937) +++ export_openems.c (revision 26938) @@ -205,7 +205,7 @@ fprintf(ctx->f, "%%%% base_priority and offset: chassis for the board to sit in.\n"); fprintf(ctx->f, "%% base priority: if the board displaces the model of the chassis or the other way around.\n"); - fprintf(ctx->f, "base_priority=%d;\n", ctx->options[HA_base_prio].int_value); + fprintf(ctx->f, "base_priority=%d;\n", ctx->options[HA_base_prio].lng); fprintf(ctx->f, "\n"); fprintf(ctx->f, "%% offset on the whole layout to locate it relative to the simulation origin\n"); pcb_fprintf(ctx->f, "offset.x = %mm;\n", -ctx->ox); @@ -222,7 +222,7 @@ fprintf(ctx->f, "\n"); fprintf(ctx->f, "%% how many points should be used to describe the round end of traces.\n"); - fprintf(ctx->f, "kludge.segments = %d;\n", ctx->options[HA_segments].int_value); + fprintf(ctx->f, "kludge.segments = %d;\n", ctx->options[HA_segments].lng); fprintf(ctx->f, "\n"); fprintf(ctx->f, "\n"); Index: mesh.c =================================================================== --- mesh.c (revision 26937) +++ mesh.c (revision 26938) @@ -56,22 +56,22 @@ static void mesh2dlg(void) { int n; - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.pml, int_value, mesh.pml); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.pml, lng, mesh.pml); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_obj, coord_value, PCB_MM_TO_COORD(0.15)); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_gap, coord_value, PCB_MM_TO_COORD(0.5)); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.min_space, coord_value, PCB_MM_TO_COORD(0.1)); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.smooth, int_value, 1); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.noimpl, int_value, 0); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.hor, int_value, 1); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.ver, int_value, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.smooth, lng, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.noimpl, lng, 0); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.hor, lng, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.ver, lng, 1); TODO("enum lookup"); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.subslines, int_value, 3); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.subslines, lng, 3); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.def_subs_thick, coord_value, PCB_MM_TO_COORD(1.5)); /* PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.def_copper_thick, coord_value, PCB_MM_TO_COORD(1.5));*/ - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_top, int_value, 1); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_bot, int_value, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_top, lng, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_bot, lng, 1); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_air, coord_value, PCB_MM_TO_COORD(0.7)); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.smoothz, int_value, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.smoothz, lng, 1); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.max_air, coord_value, PCB_MM_TO_COORD(4)); for(n = 0; n < 6; n++) { const char **a; @@ -79,7 +79,7 @@ if (mesh.bnd[n] != NULL) for(i = 0, a = bnds; *a != NULL; a++,i++) if (strcmp(*a, mesh.bnd[n]) == 0) - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.bnd[n], int_value, i); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.bnd[n], lng, i); } } @@ -86,25 +86,25 @@ static void dlg2mesh(void) { int n; - mesh.pml = ia.dlg[ia.pml].val.int_value; + mesh.pml = ia.dlg[ia.pml].val.lng; mesh.dens_obj = ia.dlg[ia.dens_obj].val.coord_value; mesh.dens_gap = ia.dlg[ia.dens_gap].val.coord_value; mesh.min_space = ia.dlg[ia.min_space].val.coord_value; - mesh.smooth = ia.dlg[ia.smooth].val.int_value; - mesh.noimpl = ia.dlg[ia.noimpl].val.int_value; - mesh.hor = ia.dlg[ia.hor].val.int_value; - mesh.ver = ia.dlg[ia.ver].val.int_value; + mesh.smooth = ia.dlg[ia.smooth].val.lng; + mesh.noimpl = ia.dlg[ia.noimpl].val.lng; + mesh.hor = ia.dlg[ia.hor].val.lng; + mesh.ver = ia.dlg[ia.ver].val.lng; TODO("enum lookup"); - mesh.subslines = ia.dlg[ia.subslines].val.int_value; + mesh.subslines = ia.dlg[ia.subslines].val.lng; mesh.def_subs_thick = ia.dlg[ia.def_subs_thick].val.coord_value; mesh.def_copper_thick = ia.dlg[ia.def_copper_thick].val.coord_value; - mesh.air_top = ia.dlg[ia.air_top].val.int_value; - mesh.air_bot = ia.dlg[ia.air_top].val.int_value; + mesh.air_top = ia.dlg[ia.air_top].val.lng; + mesh.air_bot = ia.dlg[ia.air_top].val.lng; mesh.dens_air = ia.dlg[ia.dens_air].val.coord_value; - mesh.smoothz = ia.dlg[ia.smoothz].val.int_value; + mesh.smoothz = ia.dlg[ia.smoothz].val.lng; mesh.max_air = ia.dlg[ia.max_air].val.coord_value; for(n = 0; n < 6; n++) - mesh.bnd[n] = bnds[ia.dlg[ia.bnd[n]].val.int_value]; + mesh.bnd[n] = bnds[ia.dlg[ia.bnd[n]].val.lng]; } #if 1 @@ -117,7 +117,7 @@ static void mesh_auto_add_smooth(vtc0_t *v, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t d1, pcb_coord_t d, pcb_coord_t d2); #define SAVE_INT(name) \ - pcb_append_printf(dst, "%s " #name" = %d\n", prefix, (int)me->dlg[me->name].val.int_value); + pcb_append_printf(dst, "%s " #name" = %d\n", prefix, (int)me->dlg[me->name].val.lng); #define SAVE_COORD(name) \ pcb_append_printf(dst, "%s " #name" = %.08$$mm\n", prefix, (pcb_coord_t)me->dlg[me->name].val.coord_value); void pcb_mesh_save(const mesh_dlg_t *me, gds_t *dst, const char *prefix) @@ -145,7 +145,7 @@ SAVE_COORD(def_copper_thick); pcb_append_printf(dst, "%s li:boundary = {", prefix); for(n = 0; n < 6; n++) { - int bidx = me->dlg[me->bnd[n]].val.int_value; + int bidx = me->dlg[me->bnd[n]].val.lng; const char *bs; if ((bidx < 0) || (bidx >= sizeof(bnds) / sizeof(bnds[0]))) bs = "invalid"; @@ -157,7 +157,7 @@ gds_append_str(dst, "}\n"); { - int sidx = me->dlg[me->subslines].val.int_value; + int sidx = me->dlg[me->subslines].val.lng; const char *bs; if ((sidx < 0) || (sidx >= sizeof(subslines) / sizeof(subslines[0]))) bs = "invalid"; @@ -186,7 +186,7 @@ pcb_message(PCB_MSG_ERROR, "Invalid mesh integer: " #name "\n"); \ return -1; \ } \ - PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, int_value, v); \ + PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, lng, v); \ } \ } while(0) @@ -229,7 +229,7 @@ pcb_message(PCB_MSG_ERROR, "Invalid mesh value '%s' for " #name "\n", node->data.text.value); \ return -1; \ } \ - PCB_DAD_SET_VALUE(me->dlg_hid_ctx, dst, int_value, __n__); \ + PCB_DAD_SET_VALUE(me->dlg_hid_ctx, dst, lng, __n__); \ } \ } while(0) @@ -612,7 +612,7 @@ vtc0_truncate(&mesh->line[PCB_MESH_Z].result, 0); - lns = num_subslines[ia.dlg[ia.subslines].val.int_value]; + lns = num_subslines[ia.dlg[ia.subslines].val.lng]; if (lns != 0) lns++; for(gid = 0; gid < PCB->LayerGroups.len; gid++) { @@ -652,8 +652,8 @@ } } - if (ia.dlg[ia.air_top].val.int_value) { - if (ia.dlg[ia.smoothz].val.int_value) { + if (ia.dlg[ia.air_top].val.lng) { + if (ia.dlg[ia.smoothz].val.lng) { mesh_auto_add_smooth(&mesh->line[PCB_MESH_Z].result, ytop - ia.dlg[ia.max_air].val.coord_value, ytop, ia.dlg[ia.dens_air].val.coord_value, ia.dlg[ia.dens_air].val.coord_value, top_dens); } @@ -663,8 +663,8 @@ } } - if (ia.dlg[ia.air_bot].val.int_value) { - if (ia.dlg[ia.smoothz].val.int_value) { + if (ia.dlg[ia.air_bot].val.lng) { + if (ia.dlg[ia.smoothz].val.lng) { mesh_auto_add_smooth(&mesh->line[PCB_MESH_Z].result, ybottom, ybottom + ia.dlg[ia.max_air].val.coord_value, bottom_dens, ia.dlg[ia.dens_air].val.coord_value, ia.dlg[ia.dens_air].val.coord_value); } @@ -1015,9 +1015,9 @@ dlg2mesh(); - if (ia.dlg[ia.hor].val.int_value) + if (ia.dlg[ia.hor].val.lng) mesh_auto(&mesh, PCB_MESH_HORIZONTAL); - if (ia.dlg[ia.ver].val.int_value) + if (ia.dlg[ia.ver].val.lng) mesh_auto(&mesh, PCB_MESH_VERTICAL); mesh_auto_z(&mesh);