Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 3046) +++ trunk/src_plugins/autoplace/autoplace.c (revision 3047) @@ -161,7 +161,7 @@ c->Y = ((PinTypePtr) c->ptr2)->Y; break; default: - Message("Odd connection type encountered in " "UpdateXY"); + Message(PCB_MSG_DEFAULT, "Odd connection type encountered in " "UpdateXY"); break; } } @@ -684,13 +684,13 @@ */ Nets = ProcNetlist(&(PCB->NetlistLib[NETLIST_EDITED])); if (!Nets) { - Message(_("Can't add rat lines because no netlist is loaded.\n")); + Message(PCB_MSG_DEFAULT, _("Can't add rat lines because no netlist is loaded.\n")); goto done; } Selected = collectSelectedElements(); if (Selected.PtrN == 0) { - Message(_("No elements selected to autoplace.\n")); + Message(PCB_MSG_DEFAULT, _("No elements selected to autoplace.\n")); goto done; } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 3046) +++ trunk/src_plugins/autoroute/autoroute.c (revision 3047) @@ -2419,7 +2419,7 @@ db.X2 = last; break; default: - Message("previous edge bogus direction!"); + Message(PCB_MSG_DEFAULT, "previous edge bogus direction!"); assert(0); } return db; @@ -4314,7 +4314,7 @@ if (request_cancel) { ras.total_nets_routed = 0; ras.conflict_subnets = 0; - Message("Autorouting cancelled\n"); + Message(PCB_MSG_DEFAULT, "Autorouting cancelled\n"); goto out; } } @@ -4366,7 +4366,7 @@ this_cost = 0; } - Message("%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); + Message(PCB_MSG_DEFAULT, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); out: heap_destroy(&this_pass); @@ -4551,7 +4551,7 @@ for (i = 0; i < vtroutestyle_len(&PCB->RouteStyle); i++) { if (PCB->RouteStyle.array[i].Thick == 0 || PCB->RouteStyle.array[i].Diameter == 0 || PCB->RouteStyle.array[i].Hole == 0 || PCB->RouteStyle.array[i].Clearance == 0) { - Message("You must define proper routing styles\n" "before auto-routing.\n"); + Message(PCB_MSG_DEFAULT, "You must define proper routing styles\n" "before auto-routing.\n"); return (false); } } @@ -4646,7 +4646,7 @@ ASSIGN_FLAG(PCB_FLAG_SELECTED, true, line); DrawRat(line, 0); #endif /* DEBUG_STALE_RATS */ - Message("The rats nest is stale! Aborting autoroute...\n"); + Message(PCB_MSG_DEFAULT, "The rats nest is stale! Aborting autoroute...\n"); goto donerouting; } /* merge subnets into a net! */ @@ -4696,7 +4696,7 @@ if (changed) changed = IronDownAllUnfixedPaths(rd); - Message("Total added wire length = %$mS, %d vias added\n", (Coord) total_wire_length, total_via_count); + Message(PCB_MSG_DEFAULT, "Total added wire length = %$mS, %d vias added\n", (Coord) total_wire_length, total_via_count); DestroyRouteData(&rd); if (changed) { SaveUndoSerialNumber(); Index: trunk/src_plugins/debug/debug.c =================================================================== --- trunk/src_plugins/debug/debug.c (revision 3046) +++ trunk/src_plugins/debug/debug.c (revision 3047) @@ -60,12 +60,12 @@ conf_role_t role; const char *prefix = ""; if (argc <= 1) { - Message("conf(dumplht) needs a role"); + Message(PCB_MSG_DEFAULT, "conf(dumplht) needs a role"); return 1; } role = conf_role_parse(argv[1]); if (role == CFR_invalid) { - Message("Invalid role: '%s'", argv[1]); + Message(PCB_MSG_DEFAULT, "Invalid role: '%s'", argv[1]); return 1; } if (argc > 2) @@ -77,7 +77,7 @@ } else { - Message("Invalid conf command '%s'\n", argv[0]); + Message(PCB_MSG_DEFAULT, "Invalid conf command '%s'\n", argv[0]); return 1; } return 0; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 3046) +++ trunk/src_plugins/export_bom/bom.c (revision 3047) @@ -124,7 +124,7 @@ exit(1); } - /* + /* * copy over in to out with some character conversions. * Go all the way to then end to get the terminating \0 */ @@ -156,7 +156,7 @@ theta = 270.0; else { theta = 0.0; - Message("xyToAngle(): unable to figure out angle of element\n" + Message(PCB_MSG_DEFAULT, "xyToAngle(): unable to figure out angle of element\n" " because the pin is at the centroid of the part.\n" " This is a BUG!!!\n" " Setting to %g degrees\n", theta); } @@ -239,7 +239,7 @@ } -/* +/* * If fp is not NULL then print out the bill of materials contained in * bom. Either way, free all memory which has been allocated for bom. */ @@ -317,7 +317,7 @@ /* * For each element we calculate the centroid of the footprint. - * In addition, we need to extract some notion of rotation. + * In addition, we need to extract some notion of rotation. * While here generate the BOM list */ @@ -340,7 +340,7 @@ /* * iterate over the pins and pads keeping a running count of how * many pins/pads total and the sum of x and y coordinates - * + * * While we're at it, store the location of pin/pad #1 and #2 if * we can find them */ @@ -412,7 +412,8 @@ theta = xyToAngle(pin2x, pin2y); else { Message - ("PrintBOM(): unable to figure out angle of element\n" + (PCB_MSG_ERROR, + "PrintBOM(): unable to figure out angle of element\n" " %s because pin #1 is at the centroid of the part.\n" " and I could not find pin #2's location\n" " Setting to %g degrees\n", UNKNOWN(NAMEONPCB_NAME(element)), theta); @@ -426,7 +427,8 @@ else { theta = 0.0; Message - ("PrintBOM(): unable to figure out angle because I could\n" + (PCB_MSG_ERROR, + "PrintBOM(): unable to figure out angle because I could\n" " not find pin #1 of element %s\n" " Setting to %g degrees\n", UNKNOWN(NAMEONPCB_NAME(element)), theta); } Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 3046) +++ trunk/src_plugins/export_gcode/gcode.c (revision 3047) @@ -45,7 +45,7 @@ #include #include "global.h" -#include "error.h" /* Message() */ +#include "error.h" /* Message(PCB_MSG_DEFAULT, ) */ #include "data.h" #include "misc.h" #include "rats.h" @@ -319,7 +319,7 @@ #ifdef HAVE_GDIMAGEPNG gdImagePng(gcode_im, gcode_f); #else - Message("GCODE: PNG not supported by gd. Can't write layer mask.\n"); + Message(PCB_MSG_DEFAULT, "GCODE: PNG not supported by gd. Can't write layer mask.\n"); #endif gdImageDestroy(gcode_im); fclose(gcode_f); Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 3046) +++ trunk/src_plugins/export_gerber/gerber.c (revision 3047) @@ -682,7 +682,7 @@ assign_file_suffix(filesuff, idx); f = fopen(filename, "wb"); /* Binary needed to force CR-LF */ if (f == NULL) { - Message("Error: Could not open %s for writing.\n", filename); + Message(PCB_MSG_DEFAULT, "Error: Could not open %s for writing.\n", filename); return 1; } Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 3046) +++ trunk/src_plugins/export_nelma/nelma.c (revision 3047) @@ -62,7 +62,7 @@ #include #include "global.h" -#include "error.h" /* Message() */ +#include "error.h" /* Message(PCB_MSG_DEFAULT, ) */ #include "data.h" #include "layer.h" #include "misc.h" @@ -587,7 +587,7 @@ #ifdef HAVE_GDIMAGEPNG gdImagePng(nelma_im, nelma_f); #else - Message("NELMA: PNG not supported by gd. Can't write layer mask.\n"); + Message(PCB_MSG_DEFAULT, "NELMA: PNG not supported by gd. Can't write layer mask.\n"); #endif gdImageDestroy(nelma_im); fclose(nelma_f); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 3046) +++ trunk/src_plugins/export_png/png.c (revision 3047) @@ -723,7 +723,7 @@ im = gdImageCreate(w, h); if (im == NULL) { - Message("%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, w, h); + Message(PCB_MSG_DEFAULT, "%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, w, h); return; } @@ -744,7 +744,7 @@ white->a = 0; white->c = gdImageColorAllocateAlpha(im, white->r, white->g, white->b, white->a); if (white->c == BADC) { - Message("%s(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n", __FUNCTION__); return; } @@ -754,7 +754,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(im, black->r, black->g, black->b); if (black->c == BADC) { - Message("%s(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n", __FUNCTION__); return; } @@ -1012,7 +1012,7 @@ static color_struct *black = NULL, *white = NULL; *photo_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (photo_im == NULL) { - Message("%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, gdImageSX(im), gdImageSY(im)); + Message(PCB_MSG_DEFAULT, "%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, gdImageSX(im), gdImageSY(im)); return 0; } @@ -1022,7 +1022,7 @@ white->a = 0; white->c = gdImageColorAllocate(*photo_im, white->r, white->g, white->b); if (white->c == BADC) { - Message("%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); return 0; } @@ -1030,7 +1030,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(*photo_im, black->r, black->g, black->b); if (black->c == BADC) { - Message("%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); return 0; } @@ -1101,7 +1101,7 @@ if (mask_im == NULL) { mask_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!mask_im) { - Message("%s(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", __FUNCTION__, gdImageSY(im), gdImageSY(im)); + Message(PCB_MSG_DEFAULT, "%s(): gdImageCreate(%d, %d) returned NULL. Corrupt export!\n", __FUNCTION__, gdImageSY(im), gdImageSY(im)); return; } gdImagePaletteCopy(mask_im, im); @@ -1153,7 +1153,7 @@ sscanf(name + 1, "%2x%2x%2x", &(gc->color->r), &(gc->color->g), &(gc->color->b)); gc->color->c = gdImageColorAllocate(master_im, gc->color->r, gc->color->g, gc->color->b); if (gc->color->c == BADC) { - Message("%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); return; } cval.ptr = gc->color; @@ -1235,18 +1235,18 @@ int bg, fg; gc->brush = gdImageCreate(r, r); if (gc->brush == NULL) { - Message("%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, r, r); + Message(PCB_MSG_DEFAULT, "%s(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", __FUNCTION__, r, r); return; } bg = gdImageColorAllocate(gc->brush, 255, 255, 255); if (bg == BADC) { - Message("%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); return; } fg = gdImageColorAllocateAlpha(gc->brush, gc->color->r, gc->color->g, gc->color->b, 0); if (fg == BADC) { - Message("%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); + Message(PCB_MSG_DEFAULT, "%s(): gdImageColorAllocate() returned NULL. Aborting export.\n", __FUNCTION__); return; } gdImageColorTransparent(gc->brush, bg); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 3046) +++ trunk/src_plugins/export_ps/ps.c (revision 3047) @@ -1480,7 +1480,7 @@ if (xval < 2) ps_attribute_list[HA_xcalib].default_val.real_value = global.calibration_x = xval; else - Message("X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); + Message(PCB_MSG_DEFAULT, "X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); } if (guess(yval, 4, &global.calibration_y)) if (guess(yval, 20, &global.calibration_y)) @@ -1488,7 +1488,7 @@ if (yval < 2) ps_attribute_list[HA_ycalib].default_val.real_value = global.calibration_y = yval; else - Message("Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); + Message(PCB_MSG_DEFAULT, "Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); } return; } Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 3046) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 3047) @@ -119,7 +119,7 @@ /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); if (GetWorkingDirectory(olddir) == NULL) { - Message(_("fp_fs_list(): Could not determine initial working directory\n")); + Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine initial working directory\n")); return 0; } @@ -135,7 +135,7 @@ /* Determine subdir's abs path */ if (GetWorkingDirectory(new_subdir) == NULL) { - Message(_("fp_fs_list(): Could not determine new working directory\n")); + Message(PCB_MSG_DEFAULT, _("fp_fs_list(): Could not determine new working directory\n")); if (chdir(olddir)) ChdirErrorMessage(olddir); return 0; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 3047) @@ -9,7 +9,7 @@ if (gui == NULL) fprintf(stderr, "couldn't find gui for log: \"%s\"\n", msg); else - Message("%s", msg); + Message(PCB_MSG_DEFAULT, "%s", msg); } #define empty(s) (((s) == NULL) || ((*s) == '\0')) Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 3047) @@ -165,7 +165,7 @@ const Unit *u; u = get_unit_struct(end); if (u == NULL) { - Message("Invalid unit for HIDA_Coord in the script: '%s'\n", end); + Message(PCB_MSG_DEFAULT, "Invalid unit for HIDA_Coord in the script: '%s'\n", end); v.coord_value = 0; } else Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 3047) @@ -39,7 +39,7 @@ need_ddh(NULL); gc = ddh->make_gc(); if (gc == NULL) { - Message("debug_draw_dctx(): failed to make a new gc on ddh %p\n", ddh); + Message(PCB_MSG_DEFAULT, "debug_draw_dctx(): failed to make a new gc on ddh %p\n", ddh); return NULL; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 3047) @@ -7,7 +7,7 @@ #define setup \ hidGC gc = ctx->gc; \ HID *hid = ctx->hid; \ - if ((hid == NULL) && (gc == NULL)) Message("%s failed because of invalid hid or gc\n", __FUNCTION__); \ + if ((hid == NULL) && (gc == NULL)) Message(PCB_MSG_DEFAULT, "%s failed because of invalid hid or gc\n", __FUNCTION__); \ if ((hid == NULL) && (gc == NULL)) return Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 3047) @@ -19,7 +19,7 @@ /* This function is used to print a detailed GPMI error message */ void gpmi_hid_print_error(gpmi_err_stack_t *entry, char *string) { - Message("[GPMI] %s\n", string); + Message(PCB_MSG_DEFAULT, "[GPMI] %s\n", string); } @@ -50,7 +50,7 @@ if (i != NULL) hid_gpmi_reload_module(i); else - Message("Script %s not found\n", name); + Message(PCB_MSG_DEFAULT, "Script %s not found\n", name); } else { for(i = hid_gpmi_script_info; i != NULL; i = i->next) @@ -73,10 +73,10 @@ else if (strcasecmp(argv[0], "load") == 0) { if (argc == 3) { if (hid_gpmi_load_module(NULL, argv[1], argv[2], NULL) == NULL) - Message("Failed to load %s %s\n", argv[1], argv[2]); + Message(PCB_MSG_DEFAULT, "Failed to load %s %s\n", argv[1], argv[2]); } else - Message("Invalid number of arguments for load\n"); + Message(PCB_MSG_DEFAULT, "Invalid number of arguments for load\n"); } else if (strcasecmp(argv[0], "unload") == 0) { if (argc == 2) { @@ -83,22 +83,22 @@ hid_gpmi_script_info_t *i = hid_gpmi_lookup(argv[1]); if (i != NULL) { if (gpmi_hid_script_unload(i) != 0) { - Message("Failed to unload %s\n", argv[1]); + Message(PCB_MSG_DEFAULT, "Failed to unload %s\n", argv[1]); return 1; } } else { - Message("Failed to unload %s: not loaded\n", argv[1]); + Message(PCB_MSG_DEFAULT, "Failed to unload %s: not loaded\n", argv[1]); return 1; } } else { - Message("Invalid number of arguments for unload\n"); + Message(PCB_MSG_DEFAULT, "Invalid number of arguments for unload\n"); return 1; } } else { - Message("Invalid arguments in gpmi_scripts()\n"); + Message(PCB_MSG_DEFAULT, "Invalid arguments in gpmi_scripts()\n"); return 1; } return 0; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 3046) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/scripts.c (revision 3047) @@ -120,10 +120,10 @@ { gpmi_module *module; - Message("Loading GPMI module %s with params %s...\n", module_name, params); + Message(PCB_MSG_DEFAULT, "Loading GPMI module %s with params %s...\n", module_name, params); module = gpmi_mod_load(module_name, params); if (module == NULL) { - Message(" Failed loading the script. Details:\n"); + Message(PCB_MSG_DEFAULT, " Failed loading the script. Details:\n"); gpmi_err_stack_process_str(gpmi_hid_print_error); } gpmi_err_stack_destroy(NULL); @@ -308,19 +308,19 @@ int res; if (i->conffile_name == NULL) { - Message("gpmi_hid_script_remove(): can't remove script from configs, the script is not loaded from a config.\n"); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, the script is not loaded from a config.\n"); return -1; } fin = fopen(i->conffile_name, "r"); if (fin == NULL) { - Message("gpmi_hid_script_remove(): can't remove script from configs, can't open %s for read.\n", i->conffile_name); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't open %s for read.\n", i->conffile_name); return -1; } tmpfn = Concat(i->conffile_name, ".tmp", NULL); fout = fopen(tmpfn, "w"); if (fout == NULL) { - Message("gpmi_hid_script_remove(): can't remove script from configs, can't create %s.\n", tmpfn); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't create %s.\n", tmpfn); fclose(fin); free(tmpfn); return -1; @@ -332,13 +332,13 @@ fclose(fout); if (res < 1) { - Message("gpmi_hid_script_remove(): can't remove script from configs, can't find the correspondign config line in %s\n", i->conffile_name); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't find the correspondign config line in %s\n", i->conffile_name); free(tmpfn); return -1; } if (rename(tmpfn, i->conffile_name) != 0) { - Message("gpmi_hid_script_remove(): can't remove script from configs, can't move %s to %s.\n", tmpfn, i->conffile_name); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_remove(): can't remove script from configs, can't move %s to %s.\n", tmpfn, i->conffile_name); free(tmpfn); return -1; } @@ -372,7 +372,7 @@ f = fopen(fn, "a"); if (f == NULL) { - Message("gpmi_hid_script_addcfg: can't open %s for write\n", fn); + Message(PCB_MSG_DEFAULT, "gpmi_hid_script_addcfg: can't open %s for write\n", fn); return -1; } Index: trunk/src_plugins/hid_gtk/ghid-main-menu.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-main-menu.c (revision 3046) +++ trunk/src_plugins/hid_gtk/ghid-main-menu.c (revision 3047) @@ -13,14 +13,12 @@ #include "gui.h" #include "pcb-printf.h" #include "misc_util.h" - +#include "error.h" #include "ghid-main-menu.h" #include "ghid-layer-selector.h" #include "ghid-route-style-selector.h" #include "gschem_accel_label.h" -void Message(const char *, ...); - static int action_counter; struct _GHidMainMenu { @@ -340,7 +338,7 @@ gtk_widget_show_all(new_menu); } -/*! \brief Updates the toggle/active state of all items +/*! \brief Updates the toggle/active state of all items * \par Function Description * Loops through all actions, passing the action, its toggle * flag (maybe NULL), and its active flag (maybe NULL), to a @@ -421,7 +419,7 @@ GtkAccelGroup *ghid_main_menu_get_accel_group(GHidMainMenu * menu) { if (menu == NULL) { - Message("ghid: can't initialize the menu - is your menu .lht valid?\n"); + Message(PCB_MSG_DEFAULT, "ghid: can't initialize the menu - is your menu .lht valid?\n"); exit(1); } return menu->accel_group; Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 3046) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 3047) @@ -1214,7 +1214,7 @@ fmt = 0; } else { - Message("Error: no IO plugin avaialble for saving a buffer."); + Message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); return -1; } } @@ -1226,7 +1226,7 @@ fmt = 0; } else { - Message("Error: no IO plugin avaialble for saving a buffer."); + Message(PCB_MSG_DEFAULT, "Error: no IO plugin avaialble for saving a buffer."); return -1; } } @@ -1774,7 +1774,7 @@ mode = atoi(argv[0]); else { mode = atoi(argv[1]); - Message(_("The gtk gui currently ignores the optional first argument " + Message(PCB_MSG_DEFAULT, _("The gtk gui currently ignores the optional first argument " "to the Pan action.\nFeel free to provide patches.\n")); } @@ -1813,7 +1813,7 @@ } if (!GTK_IS_MENU(menu)) { - Message(_("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); + Message(PCB_MSG_DEFAULT, _("The specified popup menu \"%s\" has not been defined.\n"), argv[0]); return 1; } else { Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 3046) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 3047) @@ -232,7 +232,7 @@ conf_fields_foreach(e) { if (strncmp(e->key, wildp, pl) == 0) { if (conf_replace_subtree(ctx->dst_role, e->key, ctx->src_role, e->key) != 0) - Message("Error: failed to save config item %s\n", *p); + Message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); if (ctx->dst_role < CFR_max_real) { conf_update(e->key); need_update++; @@ -243,7 +243,7 @@ else { /* plain node */ if (conf_replace_subtree(ctx->dst_role, *p, ctx->src_role, *p) != 0) - Message("Error: failed to save config item %s\n", *p); + Message(PCB_MSG_DEFAULT, "Error: failed to save config item %s\n", *p); if (ctx->dst_role < CFR_max_real) { conf_update(*p); need_update++; @@ -1292,11 +1292,11 @@ | solder-side and component-side must not be the only one in the group */ if (layer_groups.Number[soldergroup] <= 1 || layer_groups.Number[componentgroup] <= 1) { - Message(_("Both 'solder side' or 'component side' layers must have at least\n" "\tone other layer in their group.\n")); + Message(PCB_MSG_DEFAULT, _("Both 'solder side' or 'component side' layers must have at least\n" "\tone other layer in their group.\n")); return; } else if (soldergroup == componentgroup) { - Message(_("The 'solder side' and 'component side' layers are not allowed\n" "\tto be in the same layer group #\n")); + Message(PCB_MSG_DEFAULT, _("The 'solder side' and 'component side' layers are not allowed\n" "\tto be in the same layer group #\n")); return; } PCB->LayerGroups = layer_groups; @@ -1950,13 +1950,13 @@ char *basename; e = sorted[n]; if (strlen(e->key) > sizeof(path)-1) { - Message("Warning: can't create config item for %s: path too long\n", e->key); + Message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: path too long\n", e->key); continue; } strcpy(path, e->key); basename = strrchr(path, '/'); if ((basename == NULL) || (basename == path)) { - Message("Warning: can't create config item for %s: invalid path\n", e->key); + Message(PCB_MSG_DEFAULT, "Warning: can't create config item for %s: invalid path\n", e->key); continue; } *basename = '\0'; Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 3046) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 3047) @@ -197,7 +197,7 @@ found_type = SearchObjectByID(PCB->Data, &ptr1, &ptr2, &ptr3, object_id, object_type); if (found_type == PCB_TYPE_NONE) { - Message(_("Object ID %i identified during DRC was not found. Stale DRC window?\n"), object_id); + Message(PCB_MSG_DEFAULT, _("Object ID %i identified during DRC was not found. Stale DRC window?\n"), object_id); continue; } AddObjectToFlagUndoList(object_type, ptr1, ptr2, ptr3); Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 3046) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 3047) @@ -181,7 +181,7 @@ GtkTreeModel *model; if (menu == NULL) { - Message("Error: can't update netlist window: there is no netlist loaded.\n"); + Message(PCB_MSG_DEFAULT, "Error: can't update netlist window: there is no netlist loaded.\n"); return; } Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 3046) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 3047) @@ -1441,7 +1441,7 @@ key = gdk_keyval_from_name(desc); if (key > 0xffff) { - Message("Ignoring invalid/exotic key sym: '%s'\n", desc); + Message(PCB_MSG_DEFAULT, "Ignoring invalid/exotic key sym: '%s'\n", desc); return 0; } return key; @@ -1641,7 +1641,7 @@ ghid_cfg = hid_cfg_load("gtk", 0, hid_gtk_menu_default); if (ghid_cfg == NULL) { - Message("FATAL: can't load the gtk menu res either from file or from hardwired default."); + Message(PCB_MSG_DEFAULT, "FATAL: can't load the gtk menu res either from file or from hardwired default."); abort(); } @@ -1668,7 +1668,7 @@ mr = hid_cfg_get_menu(ghid_cfg, "/mouse"); if (hid_cfg_mouse_init(ghid_cfg, &ghid_mouse) != 0) - Message("Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); + Message(PCB_MSG_DEFAULT, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); return menu_bar; } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 3046) +++ trunk/src_plugins/hid_lesstif/main.c (revision 3047) @@ -1672,7 +1672,7 @@ key = XStringToKeysym(desc); if (key == NoSymbol && len > 1) { - Message("no symbol for %s\n", desc); + Message(PCB_MSG_DEFAULT, "no symbol for %s\n", desc); return 0; } return key; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 3046) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 3047) @@ -931,7 +931,7 @@ lesstif_cfg = hid_cfg_load("lesstif", 0, lesstif_menu_default); if (lesstif_cfg == NULL) { - Message("FATAL: can't load the lesstif menu res either from file or from hardwired default."); + Message(PCB_MSG_DEFAULT, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); abort(); } Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 3046) +++ trunk/src_plugins/import_edif/edif.c (revision 3047) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -72,10 +72,10 @@ /* Copy the first part of user declarations. */ #line 1 "../../src_plugins/import_edif/edif.y" /* yacc.c:339 */ -/* +/* * PCB Edif parser based heavily on: * - * Header: edif.y,v 1.18 87/12/07 19:59:49 roger Locked + * Header: edif.y,v 1.18 87/12/07 19:59:49 roger Locked */ /************************************************************************ * * @@ -140,7 +140,7 @@ ps->next = NULL; return ps; } - + pair_list* new_pair_list(str_pair* ps) { pair_list* pl = (pair_list *)malloc(sizeof(pair_list)); @@ -161,7 +161,7 @@ free(node); } } - + void pair_list_free(pair_list* pl) { str_pair_free(pl->list); @@ -231,7 +231,7 @@ strcpy(buf,node->str1); /* make all upper case, because of PCB funky behaviour */ p=buf; - while ( *p ) + while ( *p ) { *p = toupper( (int) *p); p++; @@ -258,8 +258,8 @@ free(done_node); } } - - + + /* forward function declarations */ static int yylex(void); static void yyerror(const char *); @@ -597,7 +597,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 198 "../../src_plugins/import_edif/edif.y" /* yacc.c:355 */ @@ -608,6 +608,8 @@ #line 610 "edif.tab.c" /* yacc.c:355 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -621,7 +623,7 @@ /* Copy the second part of user declarations. */ -#line 625 "edif.tab.c" /* yacc.c:358 */ +#line 627 "edif.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -3369,796 +3371,796 @@ case 2: #line 510 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { PopC(); } -#line 3373 "edif.tab.c" /* yacc.c:1646 */ +#line 3375 "edif.tab.c" /* yacc.c:1646 */ break; case 11: #line 525 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3379 "edif.tab.c" /* yacc.c:1646 */ +#line 3381 "edif.tab.c" /* yacc.c:1646 */ break; case 12: #line 528 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3385 "edif.tab.c" /* yacc.c:1646 */ +#line 3387 "edif.tab.c" /* yacc.c:1646 */ break; case 13: #line 532 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 3391 "edif.tab.c" /* yacc.c:1646 */ +#line 3393 "edif.tab.c" /* yacc.c:1646 */ break; case 25: #line 556 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3397 "edif.tab.c" /* yacc.c:1646 */ +#line 3399 "edif.tab.c" /* yacc.c:1646 */ break; case 34: #line 573 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[-3].ps)); free((yyvsp[-2].s)); } -#line 3403 "edif.tab.c" /* yacc.c:1646 */ +#line 3405 "edif.tab.c" /* yacc.c:1646 */ break; case 36: #line 577 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3409 "edif.tab.c" /* yacc.c:1646 */ +#line 3411 "edif.tab.c" /* yacc.c:1646 */ break; case 47: #line 602 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3415 "edif.tab.c" /* yacc.c:1646 */ +#line 3417 "edif.tab.c" /* yacc.c:1646 */ break; case 69: #line 650 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); } -#line 3421 "edif.tab.c" /* yacc.c:1646 */ +#line 3423 "edif.tab.c" /* yacc.c:1646 */ break; case 70: #line 653 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3427 "edif.tab.c" /* yacc.c:1646 */ +#line 3429 "edif.tab.c" /* yacc.c:1646 */ break; case 80: #line 671 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3433 "edif.tab.c" /* yacc.c:1646 */ +#line 3435 "edif.tab.c" /* yacc.c:1646 */ break; case 84: #line 681 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3439 "edif.tab.c" /* yacc.c:1646 */ +#line 3441 "edif.tab.c" /* yacc.c:1646 */ break; case 91: #line 696 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3445 "edif.tab.c" /* yacc.c:1646 */ +#line 3447 "edif.tab.c" /* yacc.c:1646 */ break; case 102: #line 719 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3451 "edif.tab.c" /* yacc.c:1646 */ +#line 3453 "edif.tab.c" /* yacc.c:1646 */ break; case 140: #line 779 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3457 "edif.tab.c" /* yacc.c:1646 */ +#line 3459 "edif.tab.c" /* yacc.c:1646 */ break; case 147: #line 794 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3463 "edif.tab.c" /* yacc.c:1646 */ +#line 3465 "edif.tab.c" /* yacc.c:1646 */ break; case 150: #line 801 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3469 "edif.tab.c" /* yacc.c:1646 */ +#line 3471 "edif.tab.c" /* yacc.c:1646 */ break; case 182: #line 871 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3475 "edif.tab.c" /* yacc.c:1646 */ +#line 3477 "edif.tab.c" /* yacc.c:1646 */ break; case 184: #line 875 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3481 "edif.tab.c" /* yacc.c:1646 */ +#line 3483 "edif.tab.c" /* yacc.c:1646 */ break; case 240: #line 979 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3487 "edif.tab.c" /* yacc.c:1646 */ +#line 3489 "edif.tab.c" /* yacc.c:1646 */ break; case 247: #line 992 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3493 "edif.tab.c" /* yacc.c:1646 */ +#line 3495 "edif.tab.c" /* yacc.c:1646 */ break; case 278: #line 1039 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3499 "edif.tab.c" /* yacc.c:1646 */ +#line 3501 "edif.tab.c" /* yacc.c:1646 */ break; case 279: #line 1042 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3505 "edif.tab.c" /* yacc.c:1646 */ +#line 3507 "edif.tab.c" /* yacc.c:1646 */ break; case 333: #line 1128 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); free((yyvsp[-2].s)); } -#line 3511 "edif.tab.c" /* yacc.c:1646 */ +#line 3513 "edif.tab.c" /* yacc.c:1646 */ break; case 336: #line 1135 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3517 "edif.tab.c" /* yacc.c:1646 */ +#line 3519 "edif.tab.c" /* yacc.c:1646 */ break; case 337: #line 1138 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3523 "edif.tab.c" /* yacc.c:1646 */ +#line 3525 "edif.tab.c" /* yacc.c:1646 */ break; case 344: #line 1151 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3529 "edif.tab.c" /* yacc.c:1646 */ +#line 3531 "edif.tab.c" /* yacc.c:1646 */ break; case 346: #line 1155 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3535 "edif.tab.c" /* yacc.c:1646 */ +#line 3537 "edif.tab.c" /* yacc.c:1646 */ break; case 347: #line 1156 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3541 "edif.tab.c" /* yacc.c:1646 */ +#line 3543 "edif.tab.c" /* yacc.c:1646 */ break; case 348: #line 1157 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3547 "edif.tab.c" /* yacc.c:1646 */ +#line 3549 "edif.tab.c" /* yacc.c:1646 */ break; case 369: #line 1198 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[-2].s); } -#line 3553 "edif.tab.c" /* yacc.c:1646 */ +#line 3555 "edif.tab.c" /* yacc.c:1646 */ break; case 371: #line 1202 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3559 "edif.tab.c" /* yacc.c:1646 */ +#line 3561 "edif.tab.c" /* yacc.c:1646 */ break; case 374: #line 1209 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3565 "edif.tab.c" /* yacc.c:1646 */ +#line 3567 "edif.tab.c" /* yacc.c:1646 */ break; case 381: #line 1220 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3571 "edif.tab.c" /* yacc.c:1646 */ +#line 3573 "edif.tab.c" /* yacc.c:1646 */ break; case 384: #line 1227 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3577 "edif.tab.c" /* yacc.c:1646 */ +#line 3579 "edif.tab.c" /* yacc.c:1646 */ break; case 388: #line 1233 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3583 "edif.tab.c" /* yacc.c:1646 */ +#line 3585 "edif.tab.c" /* yacc.c:1646 */ break; case 390: #line 1237 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3589 "edif.tab.c" /* yacc.c:1646 */ +#line 3591 "edif.tab.c" /* yacc.c:1646 */ break; case 393: #line 1244 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3595 "edif.tab.c" /* yacc.c:1646 */ +#line 3597 "edif.tab.c" /* yacc.c:1646 */ break; case 397: #line 1252 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3601 "edif.tab.c" /* yacc.c:1646 */ +#line 3603 "edif.tab.c" /* yacc.c:1646 */ break; case 408: #line 1267 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 3607 "edif.tab.c" /* yacc.c:1646 */ +#line 3609 "edif.tab.c" /* yacc.c:1646 */ break; case 437: #line 1317 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.pl) = new_pair_list((yyvsp[-1].ps)); } -#line 3613 "edif.tab.c" /* yacc.c:1646 */ +#line 3615 "edif.tab.c" /* yacc.c:1646 */ break; case 438: #line 1320 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3619 "edif.tab.c" /* yacc.c:1646 */ +#line 3621 "edif.tab.c" /* yacc.c:1646 */ break; case 439: #line 1321 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyvsp[0].ps)->next = (yyvsp[-1].ps); (yyval.ps) = (yyvsp[0].ps); } -#line 3625 "edif.tab.c" /* yacc.c:1646 */ +#line 3627 "edif.tab.c" /* yacc.c:1646 */ break; case 455: #line 1347 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3631 "edif.tab.c" /* yacc.c:1646 */ +#line 3633 "edif.tab.c" /* yacc.c:1646 */ break; case 459: #line 1357 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3637 "edif.tab.c" /* yacc.c:1646 */ +#line 3639 "edif.tab.c" /* yacc.c:1646 */ break; case 460: #line 1360 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3643 "edif.tab.c" /* yacc.c:1646 */ +#line 3645 "edif.tab.c" /* yacc.c:1646 */ break; case 462: #line 1366 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3649 "edif.tab.c" /* yacc.c:1646 */ +#line 3651 "edif.tab.c" /* yacc.c:1646 */ break; case 463: #line 1369 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3655 "edif.tab.c" /* yacc.c:1646 */ +#line 3657 "edif.tab.c" /* yacc.c:1646 */ break; case 483: #line 1411 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3661 "edif.tab.c" /* yacc.c:1646 */ +#line 3663 "edif.tab.c" /* yacc.c:1646 */ break; case 484: #line 1414 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3667 "edif.tab.c" /* yacc.c:1646 */ +#line 3669 "edif.tab.c" /* yacc.c:1646 */ break; case 492: #line 1428 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3673 "edif.tab.c" /* yacc.c:1646 */ +#line 3675 "edif.tab.c" /* yacc.c:1646 */ break; case 506: #line 1456 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3679 "edif.tab.c" /* yacc.c:1646 */ +#line 3681 "edif.tab.c" /* yacc.c:1646 */ break; case 507: #line 1459 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3685 "edif.tab.c" /* yacc.c:1646 */ +#line 3687 "edif.tab.c" /* yacc.c:1646 */ break; case 514: #line 1474 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3691 "edif.tab.c" /* yacc.c:1646 */ +#line 3693 "edif.tab.c" /* yacc.c:1646 */ break; case 549: #line 1529 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3697 "edif.tab.c" /* yacc.c:1646 */ +#line 3699 "edif.tab.c" /* yacc.c:1646 */ break; case 555: #line 1541 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3703 "edif.tab.c" /* yacc.c:1646 */ +#line 3705 "edif.tab.c" /* yacc.c:1646 */ break; case 560: #line 1550 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); } -#line 3709 "edif.tab.c" /* yacc.c:1646 */ +#line 3711 "edif.tab.c" /* yacc.c:1646 */ break; case 561: #line 1553 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3715 "edif.tab.c" /* yacc.c:1646 */ +#line 3717 "edif.tab.c" /* yacc.c:1646 */ break; case 562: #line 1554 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3721 "edif.tab.c" /* yacc.c:1646 */ +#line 3723 "edif.tab.c" /* yacc.c:1646 */ break; case 582: #line 1596 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3727 "edif.tab.c" /* yacc.c:1646 */ +#line 3729 "edif.tab.c" /* yacc.c:1646 */ break; case 585: #line 1599 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 3733 "edif.tab.c" /* yacc.c:1646 */ +#line 3735 "edif.tab.c" /* yacc.c:1646 */ break; case 586: #line 1602 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[-1].s); } -#line 3739 "edif.tab.c" /* yacc.c:1646 */ +#line 3741 "edif.tab.c" /* yacc.c:1646 */ break; case 587: #line 1605 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3745 "edif.tab.c" /* yacc.c:1646 */ +#line 3747 "edif.tab.c" /* yacc.c:1646 */ break; case 589: #line 1609 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3751 "edif.tab.c" /* yacc.c:1646 */ +#line 3753 "edif.tab.c" /* yacc.c:1646 */ break; case 590: #line 1610 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3757 "edif.tab.c" /* yacc.c:1646 */ +#line 3759 "edif.tab.c" /* yacc.c:1646 */ break; case 591: #line 1611 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3763 "edif.tab.c" /* yacc.c:1646 */ +#line 3765 "edif.tab.c" /* yacc.c:1646 */ break; case 592: #line 1614 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3769 "edif.tab.c" /* yacc.c:1646 */ +#line 3771 "edif.tab.c" /* yacc.c:1646 */ break; case 593: #line 1615 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3775 "edif.tab.c" /* yacc.c:1646 */ +#line 3777 "edif.tab.c" /* yacc.c:1646 */ break; case 594: #line 1618 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { define_pcb_net((yyvsp[-2].ps), (yyvsp[-1].pl)); } -#line 3781 "edif.tab.c" /* yacc.c:1646 */ +#line 3783 "edif.tab.c" /* yacc.c:1646 */ break; case 595: #line 1621 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.pl)=(yyvsp[0].pl); } -#line 3787 "edif.tab.c" /* yacc.c:1646 */ +#line 3789 "edif.tab.c" /* yacc.c:1646 */ break; case 611: #line 1643 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[-2].ps)); } -#line 3793 "edif.tab.c" /* yacc.c:1646 */ +#line 3795 "edif.tab.c" /* yacc.c:1646 */ break; case 632: #line 1680 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3799 "edif.tab.c" /* yacc.c:1646 */ +#line 3801 "edif.tab.c" /* yacc.c:1646 */ break; case 633: #line 1681 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3805 "edif.tab.c" /* yacc.c:1646 */ +#line 3807 "edif.tab.c" /* yacc.c:1646 */ break; case 634: #line 1685 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3811 "edif.tab.c" /* yacc.c:1646 */ +#line 3813 "edif.tab.c" /* yacc.c:1646 */ break; case 639: #line 1694 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3817 "edif.tab.c" /* yacc.c:1646 */ +#line 3819 "edif.tab.c" /* yacc.c:1646 */ break; case 644: #line 1705 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3823 "edif.tab.c" /* yacc.c:1646 */ +#line 3825 "edif.tab.c" /* yacc.c:1646 */ break; case 698: #line 1807 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-3].s)); } -#line 3829 "edif.tab.c" /* yacc.c:1646 */ +#line 3831 "edif.tab.c" /* yacc.c:1646 */ break; case 701: #line 1814 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3835 "edif.tab.c" /* yacc.c:1646 */ +#line 3837 "edif.tab.c" /* yacc.c:1646 */ break; case 727: #line 1866 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 3841 "edif.tab.c" /* yacc.c:1646 */ +#line 3843 "edif.tab.c" /* yacc.c:1646 */ break; case 730: #line 1873 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3847 "edif.tab.c" /* yacc.c:1646 */ +#line 3849 "edif.tab.c" /* yacc.c:1646 */ break; case 747: #line 1908 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 3853 "edif.tab.c" /* yacc.c:1646 */ +#line 3855 "edif.tab.c" /* yacc.c:1646 */ break; case 766: #line 1939 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3859 "edif.tab.c" /* yacc.c:1646 */ +#line 3861 "edif.tab.c" /* yacc.c:1646 */ break; case 789: #line 1974 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3865 "edif.tab.c" /* yacc.c:1646 */ +#line 3867 "edif.tab.c" /* yacc.c:1646 */ break; case 791: #line 1980 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3871 "edif.tab.c" /* yacc.c:1646 */ +#line 3873 "edif.tab.c" /* yacc.c:1646 */ break; case 803: #line 1996 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3877 "edif.tab.c" /* yacc.c:1646 */ +#line 3879 "edif.tab.c" /* yacc.c:1646 */ break; case 818: #line 2015 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3883 "edif.tab.c" /* yacc.c:1646 */ +#line 3885 "edif.tab.c" /* yacc.c:1646 */ break; case 823: #line 2026 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3889 "edif.tab.c" /* yacc.c:1646 */ +#line 3891 "edif.tab.c" /* yacc.c:1646 */ break; case 827: #line 2032 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3895 "edif.tab.c" /* yacc.c:1646 */ +#line 3897 "edif.tab.c" /* yacc.c:1646 */ break; case 829: #line 2036 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3901 "edif.tab.c" /* yacc.c:1646 */ +#line 3903 "edif.tab.c" /* yacc.c:1646 */ break; case 831: #line 2041 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ - { + { if ((yyvsp[-1].ps)) { (yyval.ps) = new_str_pair((yyvsp[-1].ps)->str1,(yyvsp[-2].s)); free((yyvsp[-1].ps)); } - else + else { /* handle port with no instance by passing up the chain */ (yyval.ps) = new_str_pair(NULL,(yyvsp[-2].s)); } } -#line 3918 "edif.tab.c" /* yacc.c:1646 */ +#line 3920 "edif.tab.c" /* yacc.c:1646 */ break; case 832: #line 2055 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3924 "edif.tab.c" /* yacc.c:1646 */ +#line 3926 "edif.tab.c" /* yacc.c:1646 */ break; case 833: #line 2056 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=(yyvsp[0].ps); } -#line 3930 "edif.tab.c" /* yacc.c:1646 */ +#line 3932 "edif.tab.c" /* yacc.c:1646 */ break; case 834: #line 2057 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[0].s),NULL); } -#line 3936 "edif.tab.c" /* yacc.c:1646 */ +#line 3938 "edif.tab.c" /* yacc.c:1646 */ break; case 835: #line 2058 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps)=NULL; } -#line 3942 "edif.tab.c" /* yacc.c:1646 */ +#line 3944 "edif.tab.c" /* yacc.c:1646 */ break; case 848: #line 2085 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3948 "edif.tab.c" /* yacc.c:1646 */ +#line 3950 "edif.tab.c" /* yacc.c:1646 */ break; case 849: #line 2088 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3954 "edif.tab.c" /* yacc.c:1646 */ +#line 3956 "edif.tab.c" /* yacc.c:1646 */ break; case 881: #line 2141 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.ps) = new_str_pair((yyvsp[-2].s),(yyvsp[-1].s)); } -#line 3960 "edif.tab.c" /* yacc.c:1646 */ +#line 3962 "edif.tab.c" /* yacc.c:1646 */ break; case 882: #line 2144 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3966 "edif.tab.c" /* yacc.c:1646 */ +#line 3968 "edif.tab.c" /* yacc.c:1646 */ break; case 883: #line 2145 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3972 "edif.tab.c" /* yacc.c:1646 */ +#line 3974 "edif.tab.c" /* yacc.c:1646 */ break; case 884: #line 2148 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 3978 "edif.tab.c" /* yacc.c:1646 */ +#line 3980 "edif.tab.c" /* yacc.c:1646 */ break; case 885: #line 2149 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=NULL; } -#line 3984 "edif.tab.c" /* yacc.c:1646 */ +#line 3986 "edif.tab.c" /* yacc.c:1646 */ break; case 889: #line 2159 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 3990 "edif.tab.c" /* yacc.c:1646 */ +#line 3992 "edif.tab.c" /* yacc.c:1646 */ break; case 891: #line 2165 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 3996 "edif.tab.c" /* yacc.c:1646 */ +#line 3998 "edif.tab.c" /* yacc.c:1646 */ break; case 892: #line 2166 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4002 "edif.tab.c" /* yacc.c:1646 */ +#line 4004 "edif.tab.c" /* yacc.c:1646 */ break; case 893: #line 2169 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4008 "edif.tab.c" /* yacc.c:1646 */ +#line 4010 "edif.tab.c" /* yacc.c:1646 */ break; case 894: #line 2172 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4014 "edif.tab.c" /* yacc.c:1646 */ +#line 4016 "edif.tab.c" /* yacc.c:1646 */ break; case 896: #line 2178 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4020 "edif.tab.c" /* yacc.c:1646 */ +#line 4022 "edif.tab.c" /* yacc.c:1646 */ break; case 898: #line 2180 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4026 "edif.tab.c" /* yacc.c:1646 */ +#line 4028 "edif.tab.c" /* yacc.c:1646 */ break; case 903: #line 2191 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4032 "edif.tab.c" /* yacc.c:1646 */ +#line 4034 "edif.tab.c" /* yacc.c:1646 */ break; case 935: #line 2255 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4038 "edif.tab.c" /* yacc.c:1646 */ +#line 4040 "edif.tab.c" /* yacc.c:1646 */ break; case 943: #line 2271 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4044 "edif.tab.c" /* yacc.c:1646 */ +#line 4046 "edif.tab.c" /* yacc.c:1646 */ break; case 946: #line 2276 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4050 "edif.tab.c" /* yacc.c:1646 */ +#line 4052 "edif.tab.c" /* yacc.c:1646 */ break; case 973: #line 2321 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4056 "edif.tab.c" /* yacc.c:1646 */ +#line 4058 "edif.tab.c" /* yacc.c:1646 */ break; case 987: #line 2343 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 4062 "edif.tab.c" /* yacc.c:1646 */ +#line 4064 "edif.tab.c" /* yacc.c:1646 */ break; case 994: #line 2359 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-6].s)); free((yyvsp[-5].s)); free((yyvsp[-4].s)); free((yyvsp[-3].s)); free((yyvsp[-2].s)); free((yyvsp[-1].s)); } -#line 4068 "edif.tab.c" /* yacc.c:1646 */ +#line 4070 "edif.tab.c" /* yacc.c:1646 */ break; case 1054: #line 2466 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4074 "edif.tab.c" /* yacc.c:1646 */ +#line 4076 "edif.tab.c" /* yacc.c:1646 */ break; case 1055: #line 2467 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4080 "edif.tab.c" /* yacc.c:1646 */ +#line 4082 "edif.tab.c" /* yacc.c:1646 */ break; case 1056: #line 2468 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4086 "edif.tab.c" /* yacc.c:1646 */ +#line 4088 "edif.tab.c" /* yacc.c:1646 */ break; case 1057: #line 2469 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4092 "edif.tab.c" /* yacc.c:1646 */ +#line 4094 "edif.tab.c" /* yacc.c:1646 */ break; case 1059: #line 2473 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4098 "edif.tab.c" /* yacc.c:1646 */ +#line 4100 "edif.tab.c" /* yacc.c:1646 */ break; case 1061: #line 2477 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4104 "edif.tab.c" /* yacc.c:1646 */ +#line 4106 "edif.tab.c" /* yacc.c:1646 */ break; case 1063: #line 2481 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[-1].s)); } -#line 4110 "edif.tab.c" /* yacc.c:1646 */ +#line 4112 "edif.tab.c" /* yacc.c:1646 */ break; case 1085: #line 2517 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4116 "edif.tab.c" /* yacc.c:1646 */ +#line 4118 "edif.tab.c" /* yacc.c:1646 */ break; case 1086: #line 2520 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { free((yyvsp[0].s)); } -#line 4122 "edif.tab.c" /* yacc.c:1646 */ +#line 4124 "edif.tab.c" /* yacc.c:1646 */ break; case 1107: #line 2561 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { str_pair_free((yyvsp[0].ps)); } -#line 4128 "edif.tab.c" /* yacc.c:1646 */ +#line 4130 "edif.tab.c" /* yacc.c:1646 */ break; case 1109: #line 2563 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { pair_list_free((yyvsp[0].pl)); } -#line 4134 "edif.tab.c" /* yacc.c:1646 */ +#line 4136 "edif.tab.c" /* yacc.c:1646 */ break; case 1126: #line 2590 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4140 "edif.tab.c" /* yacc.c:1646 */ +#line 4142 "edif.tab.c" /* yacc.c:1646 */ break; case 1127: #line 2593 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4146 "edif.tab.c" /* yacc.c:1646 */ +#line 4148 "edif.tab.c" /* yacc.c:1646 */ break; case 1128: #line 2596 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4152 "edif.tab.c" /* yacc.c:1646 */ +#line 4154 "edif.tab.c" /* yacc.c:1646 */ break; case 1129: #line 2599 "../../src_plugins/import_edif/edif.y" /* yacc.c:1646 */ { (yyval.s)=(yyvsp[0].s); } -#line 4158 "edif.tab.c" /* yacc.c:1646 */ +#line 4160 "edif.tab.c" /* yacc.c:1646 */ break; -#line 4162 "edif.tab.c" /* yacc.c:1646 */ +#line 4164 "edif.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -5555,7 +5557,7 @@ */ static void EnterKeyword(char * str) { - /* + /* * Locals. */ register Keyword *key; @@ -5829,7 +5831,7 @@ * Allocate space for the string, set the pointer at the end. */ cp = (char *) Malloc(StringSize + 1); - + cp += StringSize; *cp-- = '\0'; /* @@ -6236,7 +6238,7 @@ int ReadEdifNetlist(char *filename) { - Message(_("Importing edif netlist %s\n"), filename); + Message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_edif/edif.h =================================================================== --- trunk/src_plugins/import_edif/edif.h (revision 3046) +++ trunk/src_plugins/import_edif/edif.h (revision 3047) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -342,7 +342,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 198 "../../src_plugins/import_edif/edif.y" /* yacc.c:1909 */ @@ -353,6 +353,8 @@ #line 355 "edif.tab.h" /* yacc.c:1909 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif Index: trunk/src_plugins/import_edif/edif.y =================================================================== --- trunk/src_plugins/import_edif/edif.y (revision 3046) +++ trunk/src_plugins/import_edif/edif.y (revision 3047) @@ -1,8 +1,8 @@ %{ -/* +/* * PCB Edif parser based heavily on: * - * Header: edif.y,v 1.18 87/12/07 19:59:49 roger Locked + * Header: edif.y,v 1.18 87/12/07 19:59:49 roger Locked */ /************************************************************************ * * @@ -67,7 +67,7 @@ ps->next = NULL; return ps; } - + pair_list* new_pair_list(str_pair* ps) { pair_list* pl = (pair_list *)malloc(sizeof(pair_list)); @@ -88,7 +88,7 @@ free(node); } } - + void pair_list_free(pair_list* pl) { str_pair_free(pl->list); @@ -158,7 +158,7 @@ strcpy(buf,node->str1); /* make all upper case, because of PCB funky behaviour */ p=buf; - while ( *p ) + while ( *p ) { *p = toupper( (int) *p); p++; @@ -185,8 +185,8 @@ free(done_node); } } - - + + /* forward function declarations */ static int yylex(void); static void yyerror(const char *); @@ -2037,14 +2037,14 @@ | Member ; -PortRef : EDIF_TOK_PORTREF PortNameRef _PortRef PopC -{ +PortRef : EDIF_TOK_PORTREF PortNameRef _PortRef PopC +{ if ($3) { $$ = new_str_pair($3->str1,$2); free($3); } - else + else { /* handle port with no instance by passing up the chain */ $$ = new_str_pair(NULL,$2); @@ -3767,7 +3767,7 @@ */ static void EnterKeyword(char * str) { - /* + /* * Locals. */ register Keyword *key; @@ -4041,7 +4041,7 @@ * Allocate space for the string, set the pointer at the end. */ cp = (char *) Malloc(StringSize + 1); - + cp += StringSize; *cp-- = '\0'; /* @@ -4448,7 +4448,7 @@ int ReadEdifNetlist(char *filename) { - Message(_("Importing edif netlist %s\n"), filename); + Message(PCB_MSG_INFO, _("Importing edif netlist %s\n"), filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 3046) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 3047) @@ -57,12 +57,12 @@ if (!filename) return (1); /* nothing to do */ - Message(_("Importing PCB netlist %s\n"), filename); + Message(PCB_MSG_DEFAULT, _("Importing PCB netlist %s\n"), filename); if (EMPTY_STRING_P(conf_core.rc.rat_command)) { fp = fopen(filename, "r"); if (!fp) { - Message("Cannot open %s for reading", filename); + Message(PCB_MSG_DEFAULT, "Cannot open %s for reading", filename); return 1; } } @@ -89,7 +89,7 @@ /* check for maximum length line */ if (len) { if (inputline[--len] != '\n') - Message(_("Line length (%i) exceeded in netlist file.\n" + Message(PCB_MSG_DEFAULT, _("Line length (%i) exceeded in netlist file.\n" "additional characters will be ignored.\n"), MAX_NETLIST_LINE_LENGTH); else inputline[len] = '\0'; @@ -136,7 +136,7 @@ kind = 0; } if (!lines) { - Message(_("Empty netlist file!\n")); + Message(PCB_MSG_DEFAULT, _("Empty netlist file!\n")); pclose(fp); return (1); } Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 3046) +++ trunk/src_plugins/import_sch/import_sch.c (revision 3047) @@ -232,7 +232,7 @@ y = GetValue(ys, units, NULL, NULL); } else { - Message(_("Bad syntax for Import(setnewpoint)")); + Message(PCB_MSG_DEFAULT, _("Bad syntax for Import(setnewpoint)")); return 1; } @@ -313,7 +313,7 @@ int i; if (tmpfile == NULL) { - Message(_("Could not create temp file")); + Message(PCB_MSG_DEFAULT, _("Could not create temp file")); return 1; } @@ -372,7 +372,7 @@ else { tmpfile = tempfile_name_new("gnetlist_output"); if (tmpfile == NULL) { - Message(_("Could not create temp file")); + Message(PCB_MSG_DEFAULT, _("Could not create temp file")); return 1; } must_free_tmpfile = 1; @@ -422,7 +422,7 @@ tempfile_unlink(tmpfile); } else { - Message(_("Unknown import mode: %s\n"), mode); + Message(PCB_MSG_DEFAULT, _("Unknown import mode: %s\n"), mode); return 1; } Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 3046) +++ trunk/src_plugins/io_lihata/read.c (revision 3047) @@ -595,7 +595,7 @@ lht_node_t *sub; if ((nd->type != LHT_HASH) || (strcmp(nd->name, "pcb-rnd-board-v1"))) { - Message("Not a board lihata.\n"); + Message(PCB_MSG_DEFAULT, "Not a board lihata.\n"); return -1; } @@ -626,7 +626,7 @@ lht_doc_t *doc = lht_dom_load(Filename, &errmsg); if (doc == NULL) { - Message("Error loading '%s': %s\n", Filename, errmsg); + Message(PCB_MSG_DEFAULT, "Error loading '%s': %s\n", Filename, errmsg); return -1; } Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 3046) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 3047) @@ -7,8 +7,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -87,25 +87,13 @@ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus +/* TODO: this is always defined, so inline it */ +#define yyconst const -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -161,6 +149,11 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + extern int yyleng; extern FILE *yyin, *yyout; @@ -183,6 +176,13 @@ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -200,11 +200,6 @@ #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -217,7 +212,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -273,7 +268,7 @@ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -296,7 +291,7 @@ int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -355,7 +350,7 @@ typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; @@ -364,12 +359,15 @@ int yylineno = 1; extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static void yynoreturn yy_fatal_error (yyconst char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -376,7 +374,7 @@ */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -419,7 +417,7 @@ 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -451,7 +449,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[51] = +static yyconst YY_CHAR yy_meta[51] = { 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, @@ -460,7 +458,7 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[226] = +static yyconst flex_uint16_t yy_base[226] = { 0, 0, 0, 256, 257, 253, 257, 257, 46, 0, 0, 42, 45, 46, 13, 16, 230, 213, 23, 207, 208, @@ -518,7 +516,7 @@ 0, 221, 221, 221, 221 } ; -static yyconst flex_int16_t yy_nxt[308] = +static yyconst flex_uint16_t yy_nxt[308] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 4, 12, 13, 14, 4, 15, 16, 17, 18, 19, 20, 21, @@ -712,7 +710,7 @@ */ static int Parse(FILE *Pipe, char *Executable, char *Path, const char *Filename, char *Parameter); -#line 716 "lex.yy.c" +#line 714 "lex.yy.c" #define INITIAL 0 @@ -745,19 +743,19 @@ FILE *yyget_in (void ); -void yyset_in (FILE * in_str ); +void yyset_in (FILE * _in_str ); FILE *yyget_out (void ); -void yyset_out (FILE * out_str ); +void yyset_out (FILE * _out_str ); -int yyget_leng (void ); + int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); -void yyset_lineno (int line_number ); +void yyset_lineno (int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -771,8 +769,12 @@ #endif #endif +#ifndef YY_NO_UNPUT + static void yyunput (int c,char *buf_ptr ); +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -806,7 +808,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -830,7 +832,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -885,7 +887,7 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -895,15 +897,10 @@ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 108 "../../src_plugins/io_pcb/parse_l.l" - - -#line 906 "lex.yy.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -930,7 +927,13 @@ yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 108 "../../src_plugins/io_pcb/parse_l.l" + + +#line 935 "lex.yy.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -946,7 +949,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -958,7 +961,7 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 257 ); @@ -976,7 +979,7 @@ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - int yyl; + yy_size_t yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) @@ -1313,7 +1316,7 @@ #line 210 "../../src_plugins/io_pcb/parse_l.l" ECHO; YY_BREAK -#line 1317 "lex.yy.c" +#line 1320 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1444,6 +1447,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1455,9 +1459,9 @@ */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1486,7 +1490,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1506,7 +1510,7 @@ { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1526,7 +1530,7 @@ } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1544,7 +1548,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1568,9 +1572,9 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -1589,14 +1593,14 @@ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1608,7 +1612,7 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -1621,10 +1625,10 @@ */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1636,15 +1640,17 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 221); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); @@ -1654,10 +1660,10 @@ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1666,7 +1672,7 @@ yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); @@ -1683,6 +1689,8 @@ (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1731,7 +1739,7 @@ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1837,7 +1845,7 @@ if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -1872,10 +1880,6 @@ yyfree((void *) b ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1996,7 +2000,7 @@ * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); @@ -2013,7 +2017,7 @@ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc @@ -2043,7 +2047,7 @@ base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) @@ -2052,7 +2056,7 @@ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -2075,7 +2079,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - return yy_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes(yystr,(int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2090,10 +2094,10 @@ YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2119,9 +2123,9 @@ #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2187,29 +2191,29 @@ } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void yyset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - yylineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (void) @@ -2217,9 +2221,9 @@ return yy_flex_debug; } -void yyset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) @@ -2231,10 +2235,10 @@ /* We do not touch yylineno unless the option is enabled. */ yylineno = 1; - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -2243,8 +2247,8 @@ yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2282,7 +2286,8 @@ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2291,7 +2296,7 @@ #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2301,11 +2306,12 @@ void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2313,12 +2319,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr ) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" @@ -2367,7 +2373,7 @@ { /* Special case this one, we get it all the time... */ if (strcmp (tmps, "./default_font")) - Message("Can't open %s for reading\n", tmps); + Message(PCB_MSG_ERROR, "Can't open %s for reading\n", tmps); return(1); } free (tmps); @@ -2551,7 +2557,7 @@ r = Parse(NULL, conf_core.rc.font_command, NULL, Filename, NULL); if (r == 0) { #ifdef DEBUG - Message ("Found %s in %s\n", Filename, conf_core.rc.font_command); + Message (PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; @@ -2564,4 +2570,3 @@ return FLOATING; } - Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 3046) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 3047) @@ -249,7 +249,7 @@ { /* Special case this one, we get it all the time... */ if (strcmp (tmps, "./default_font")) - Message("Can't open %s for reading\n", tmps); + Message(PCB_MSG_ERROR, "Can't open %s for reading\n", tmps); return(1); } free (tmps); @@ -433,7 +433,7 @@ r = Parse(NULL, conf_core.rc.font_command, NULL, Filename, NULL); if (r == 0) { #ifdef DEBUG - Message ("Found %s in %s\n", Filename, conf_core.rc.font_command); + Message (PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; @@ -445,4 +445,3 @@ yylval.number = strtod ((char *) yytext, NULL); return FLOATING; } - Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 3046) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 3047) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -132,13 +132,13 @@ extern ElementTypePtr yyElement; extern FontTypePtr yyFont; extern int yylineno; /* linenumber */ -extern const char *yyfilename; /* in this file */ +extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; extern FlagType yy_pcb_flags; -static char *layer_group_string; +static char *layer_group_string; -static AttributeListTypePtr attr_list; +static AttributeListTypePtr attr_list; int yyerror(const char *s); int yylex(); @@ -251,7 +251,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 115 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:355 */ @@ -264,6 +264,8 @@ #line 266 "parse_y.tab.c" /* yacc.c:355 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -277,7 +279,7 @@ /* Copy the second part of user declarations. */ -#line 281 "parse_y.tab.c" /* yacc.c:358 */ +#line 283 "parse_y.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -1779,7 +1781,7 @@ case 5: #line 145 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { YYABORT; } -#line 1783 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1785 "parse_y.tab.c" /* yacc.c:1646 */ break; case 6: @@ -1792,7 +1794,7 @@ if (!yyPCB) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -1804,7 +1806,7 @@ yyPCB->NetlistPatches = yyPCB->NetlistPatchLast = NULL; layer_group_string = NULL; } -#line 1808 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1810 "parse_y.tab.c" /* yacc.c:1646 */ break; case 7: @@ -1816,7 +1818,7 @@ CreateNewPCBPost (yyPCB, 0); if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN)) { - Message("illegal layer-group string\n"); + Message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } /* initialize the polygon clipping now since @@ -1831,7 +1833,7 @@ ENDALL_LOOP; PCB = pcb_save; } -#line 1835 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1837 "parse_y.tab.c" /* yacc.c:1646 */ break; case 8: @@ -1838,7 +1840,7 @@ #line 226 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { PreLoadElementPCB (); layer_group_string = NULL; } -#line 1842 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1844 "parse_y.tab.c" /* yacc.c:1646 */ break; case 9: @@ -1848,7 +1850,7 @@ yyData->LayerN = 2; PostLoadElementPCB (); } -#line 1852 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1854 "parse_y.tab.c" /* yacc.c:1646 */ break; case 10: @@ -1861,7 +1863,7 @@ if (!yyData || !yyFont) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -1868,7 +1870,7 @@ LayerFlag[i] = false; yyData->LayerN = 0; } -#line 1872 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1874 "parse_y.tab.c" /* yacc.c:1646 */ break; case 14: @@ -1879,7 +1881,7 @@ if (!yyFont) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } yyFont->Valid = false; @@ -1887,7 +1889,7 @@ free (yyFont->Symbol[i].Line); memset(yyFont->Symbol, 0, sizeof(yyFont->Symbol)); } -#line 1891 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1893 "parse_y.tab.c" /* yacc.c:1646 */ break; case 15: @@ -1896,7 +1898,7 @@ yyFont->Valid = true; SetFontInfo(yyFont); } -#line 1900 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1902 "parse_y.tab.c" /* yacc.c:1646 */ break; case 17: @@ -1907,7 +1909,7 @@ YYABORT; } } -#line 1911 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1913 "parse_y.tab.c" /* yacc.c:1646 */ break; case 18: @@ -1917,7 +1919,7 @@ yyPCB->MaxWidth = MAX_COORD; yyPCB->MaxHeight = MAX_COORD; } -#line 1921 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1923 "parse_y.tab.c" /* yacc.c:1646 */ break; case 19: @@ -1927,7 +1929,7 @@ yyPCB->MaxWidth = OU ((yyvsp[-2].measure)); yyPCB->MaxHeight = OU ((yyvsp[-1].measure)); } -#line 1931 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1933 "parse_y.tab.c" /* yacc.c:1646 */ break; case 20: @@ -1937,7 +1939,7 @@ yyPCB->MaxWidth = NU ((yyvsp[-2].measure)); yyPCB->MaxHeight = NU ((yyvsp[-1].measure)); } -#line 1941 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1943 "parse_y.tab.c" /* yacc.c:1646 */ break; case 24: @@ -1947,7 +1949,7 @@ yyPCB->GridOffsetX = OU ((yyvsp[-2].measure)); yyPCB->GridOffsetY = OU ((yyvsp[-1].measure)); } -#line 1951 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1953 "parse_y.tab.c" /* yacc.c:1646 */ break; case 25: @@ -1963,7 +1965,7 @@ conf_set(yy_settings_dest, "editor/draw_grid", -1, "false", POL_OVERWRITE); } } -#line 1967 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1969 "parse_y.tab.c" /* yacc.c:1646 */ break; case 26: @@ -1979,7 +1981,7 @@ conf_set(yy_settings_dest, "editor/draw_grid", -1, "false", POL_OVERWRITE); } } -#line 1983 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1985 "parse_y.tab.c" /* yacc.c:1646 */ break; case 27: @@ -1989,7 +1991,7 @@ yyPCB->CursorY = OU ((yyvsp[-2].measure)); yyPCB->Zoom = (yyvsp[-1].number)*2; } -#line 1993 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1995 "parse_y.tab.c" /* yacc.c:1646 */ break; case 28: @@ -1999,7 +2001,7 @@ yyPCB->CursorY = NU ((yyvsp[-2].measure)); yyPCB->Zoom = (yyvsp[-1].number); } -#line 2003 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2005 "parse_y.tab.c" /* yacc.c:1646 */ break; case 31: @@ -2008,7 +2010,7 @@ /* Read in cmil^2 for now; in future this should be a noop. */ yyPCB->IsleArea = PCB_MIL_TO_COORD (PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100.0) / 100.0; } -#line 2012 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2014 "parse_y.tab.c" /* yacc.c:1646 */ break; case 33: @@ -2016,7 +2018,7 @@ { yyPCB->ThermScale = (yyvsp[-1].number); } -#line 2020 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2022 "parse_y.tab.c" /* yacc.c:1646 */ break; case 38: @@ -2027,7 +2029,7 @@ yyPCB->minWid = NU ((yyvsp[-1].measure)); yyPCB->minRing = NU ((yyvsp[-1].measure)); } -#line 2031 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2033 "parse_y.tab.c" /* yacc.c:1646 */ break; case 39: @@ -2039,7 +2041,7 @@ yyPCB->minSlk = NU ((yyvsp[-1].measure)); yyPCB->minRing = NU ((yyvsp[-2].measure)); } -#line 2043 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2045 "parse_y.tab.c" /* yacc.c:1646 */ break; case 40: @@ -2052,7 +2054,7 @@ yyPCB->minDrill = NU ((yyvsp[-2].measure)); yyPCB->minRing = NU ((yyvsp[-1].measure)); } -#line 2056 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2058 "parse_y.tab.c" /* yacc.c:1646 */ break; case 41: @@ -2060,7 +2062,7 @@ { yy_pcb_flags = MakeFlags ((yyvsp[-1].integer) & PCB_FLAGS); } -#line 2064 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2066 "parse_y.tab.c" /* yacc.c:1646 */ break; case 42: @@ -2069,7 +2071,7 @@ yy_pcb_flags = string_to_pcbflags ((yyvsp[-1].string), yyerror); free((yyvsp[-1].string)); } -#line 2073 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2075 "parse_y.tab.c" /* yacc.c:1646 */ break; case 44: @@ -2077,7 +2079,7 @@ { layer_group_string = (yyvsp[-1].string); } -#line 2081 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2083 "parse_y.tab.c" /* yacc.c:1646 */ break; case 46: @@ -2085,12 +2087,12 @@ { if (ParseRouteString((yyvsp[-1].string), &yyPCB->RouteStyle, "mil")) { - Message("illegal route-style string\n"); + Message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); } -#line 2094 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2096 "parse_y.tab.c" /* yacc.c:1646 */ break; case 47: @@ -2098,35 +2100,35 @@ { if (ParseRouteString((yyvsp[-1].string), &yyPCB->RouteStyle, "cmil")) { - Message("illegal route-style string\n"); + Message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); } -#line 2107 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2109 "parse_y.tab.c" /* yacc.c:1646 */ break; case 54: #line 699 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyPCB->Attributes; } -#line 2113 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2115 "parse_y.tab.c" /* yacc.c:1646 */ break; case 58: #line 703 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { - /* clear pointer to force memory allocation by + /* clear pointer to force memory allocation by * the appropriate subroutine */ yyElement = NULL; } -#line 2124 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2126 "parse_y.tab.c" /* yacc.c:1646 */ break; case 60: #line 710 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { YYABORT; } -#line 2130 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2132 "parse_y.tab.c" /* yacc.c:1646 */ break; case 66: @@ -2136,7 +2138,7 @@ NU ((yyvsp[-3].measure)), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-2].string)); } -#line 2140 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2142 "parse_y.tab.c" /* yacc.c:1646 */ break; case 67: @@ -2146,7 +2148,7 @@ OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2150 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2152 "parse_y.tab.c" /* yacc.c:1646 */ break; case 68: @@ -2156,7 +2158,7 @@ OU ((yyvsp[-5].measure)) + OU((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2160 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2162 "parse_y.tab.c" /* yacc.c:1646 */ break; case 69: @@ -2166,7 +2168,7 @@ OU((yyvsp[-4].measure)) + 2*MASKFRAME, OU ((yyvsp[-3].measure)), (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2170 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2172 "parse_y.tab.c" /* yacc.c:1646 */ break; case 70: @@ -2175,7 +2177,7 @@ Coord hole = (OU((yyvsp[-3].measure)) * DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ - if (OU((yyvsp[-3].measure)) - hole < MIN_PINORVIACOPPER && + if (OU((yyvsp[-3].measure)) - hole < MIN_PINORVIACOPPER && OU((yyvsp[-3].measure)) > MIN_PINORVIACOPPER) hole = OU((yyvsp[-3].measure)) - MIN_PINORVIACOPPER; @@ -2183,7 +2185,7 @@ OU((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2187 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2189 "parse_y.tab.c" /* yacc.c:1646 */ break; case 71: @@ -2192,7 +2194,7 @@ CreateNewRat(yyData, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), (yyvsp[-5].integer), (yyvsp[-2].integer), conf_core.appearance.rat_thickness, (yyvsp[-1].flagtype)); } -#line 2196 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2198 "parse_y.tab.c" /* yacc.c:1646 */ break; case 72: @@ -2201,7 +2203,7 @@ CreateNewRat(yyData, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-5].integer), (yyvsp[-2].integer), conf_core.appearance.rat_thickness, OldFlags((yyvsp[-1].integer))); } -#line 2205 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2207 "parse_y.tab.c" /* yacc.c:1646 */ break; case 73: @@ -2229,7 +2231,7 @@ if ((yyvsp[-2].string) != NULL) free((yyvsp[-2].string)); } -#line 2233 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2235 "parse_y.tab.c" /* yacc.c:1646 */ break; case 85: @@ -2238,13 +2240,13 @@ CreateNewPolygonFromRectangle(Layer, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-5].measure)) + OU ((yyvsp[-3].measure)), OU ((yyvsp[-4].measure)) + OU ((yyvsp[-2].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2242 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2244 "parse_y.tab.c" /* yacc.c:1646 */ break; case 89: #line 920 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & Layer->Attributes; } -#line 2248 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2250 "parse_y.tab.c" /* yacc.c:1646 */ break; case 92: @@ -2253,7 +2255,7 @@ CreateNewLineOnLayer(Layer, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), (yyvsp[-1].flagtype)); } -#line 2257 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2259 "parse_y.tab.c" /* yacc.c:1646 */ break; case 93: @@ -2262,7 +2264,7 @@ CreateNewLineOnLayer(Layer, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2266 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2268 "parse_y.tab.c" /* yacc.c:1646 */ break; case 94: @@ -2273,7 +2275,7 @@ CreateNewLineOnLayer(Layer, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), 200*GROUNDPLANEFRAME, OldFlags(IV ((yyvsp[-1].measure)))); } -#line 2277 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2279 "parse_y.tab.c" /* yacc.c:1646 */ break; case 95: @@ -2282,7 +2284,7 @@ CreateNewArcOnLayer(Layer, NU ((yyvsp[-9].measure)), NU ((yyvsp[-8].measure)), NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-1].flagtype)); } -#line 2286 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2288 "parse_y.tab.c" /* yacc.c:1646 */ break; case 96: @@ -2291,7 +2293,7 @@ CreateNewArcOnLayer(Layer, OU ((yyvsp[-9].measure)), OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2295 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2297 "parse_y.tab.c" /* yacc.c:1646 */ break; case 97: @@ -2300,7 +2302,7 @@ CreateNewArcOnLayer(Layer, OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-6].measure)), IV ((yyvsp[-3].measure)), (yyvsp[-2].number), OU ((yyvsp[-4].measure)), 200*GROUNDPLANEFRAME, OldFlags((yyvsp[-1].integer))); } -#line 2304 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2306 "parse_y.tab.c" /* yacc.c:1646 */ break; case 98: @@ -2310,7 +2312,7 @@ CreateNewText(Layer,yyFont,OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), 100, (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2314 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2316 "parse_y.tab.c" /* yacc.c:1646 */ break; case 99: @@ -2329,7 +2331,7 @@ OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2333 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2335 "parse_y.tab.c" /* yacc.c:1646 */ break; case 100: @@ -2353,7 +2355,7 @@ CreateNewText(Layer, yyFont, NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), (yyvsp[-4].number), (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-2].string)); } -#line 2357 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2359 "parse_y.tab.c" /* yacc.c:1646 */ break; case 101: @@ -2361,7 +2363,7 @@ { Polygon = CreateNewPolygon(Layer, (yyvsp[-2].flagtype)); } -#line 2365 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2367 "parse_y.tab.c" /* yacc.c:1646 */ break; case 102: @@ -2383,7 +2385,7 @@ if (bad_contour_found) { - Message("WARNING parsing file '%s'\n" + Message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, yylineno); @@ -2397,7 +2399,7 @@ r_insert_entry (Layer->polygon_tree, (BoxType *) Polygon, 0); } } -#line 2401 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2403 "parse_y.tab.c" /* yacc.c:1646 */ break; case 105: @@ -2405,7 +2407,7 @@ { CreateNewHoleInPolygon (Polygon); } -#line 2409 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2411 "parse_y.tab.c" /* yacc.c:1646 */ break; case 109: @@ -2413,7 +2415,7 @@ { CreateNewPointInPolygon(Polygon, OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2417 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2419 "parse_y.tab.c" /* yacc.c:1646 */ break; case 110: @@ -2421,7 +2423,7 @@ { CreateNewPointInPolygon(Polygon, NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2425 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2427 "parse_y.tab.c" /* yacc.c:1646 */ break; case 116: @@ -2433,7 +2435,7 @@ free ((yyvsp[-5].string)); pin_num = 1; } -#line 2437 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2439 "parse_y.tab.c" /* yacc.c:1646 */ break; case 117: @@ -2441,7 +2443,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2445 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2447 "parse_y.tab.c" /* yacc.c:1646 */ break; case 118: @@ -2453,7 +2455,7 @@ free ((yyvsp[-7].string)); pin_num = 1; } -#line 2457 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2459 "parse_y.tab.c" /* yacc.c:1646 */ break; case 119: @@ -2461,7 +2463,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2465 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2467 "parse_y.tab.c" /* yacc.c:1646 */ break; case 120: @@ -2474,7 +2476,7 @@ free ((yyvsp[-7].string)); pin_num = 1; } -#line 2478 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2480 "parse_y.tab.c" /* yacc.c:1646 */ break; case 121: @@ -2482,7 +2484,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2486 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2488 "parse_y.tab.c" /* yacc.c:1646 */ break; case 122: @@ -2497,7 +2499,7 @@ free ((yyvsp[-10].string)); free ((yyvsp[-9].string)); } -#line 2501 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2503 "parse_y.tab.c" /* yacc.c:1646 */ break; case 123: @@ -2505,7 +2507,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2509 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2511 "parse_y.tab.c" /* yacc.c:1646 */ break; case 124: @@ -2520,7 +2522,7 @@ free ((yyvsp[-10].string)); free ((yyvsp[-9].string)); } -#line 2524 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2526 "parse_y.tab.c" /* yacc.c:1646 */ break; case 125: @@ -2528,7 +2530,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2532 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2534 "parse_y.tab.c" /* yacc.c:1646 */ break; case 133: @@ -2536,7 +2538,7 @@ { CreateNewLineInElement(yyElement, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2540 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2542 "parse_y.tab.c" /* yacc.c:1646 */ break; case 134: @@ -2544,7 +2546,7 @@ { CreateNewLineInElement(yyElement, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2548 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2550 "parse_y.tab.c" /* yacc.c:1646 */ break; case 135: @@ -2552,7 +2554,7 @@ { CreateNewArcInElement(yyElement, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-1].measure))); } -#line 2556 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2558 "parse_y.tab.c" /* yacc.c:1646 */ break; case 136: @@ -2560,7 +2562,7 @@ { CreateNewArcInElement(yyElement, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-1].measure))); } -#line 2564 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2566 "parse_y.tab.c" /* yacc.c:1646 */ break; case 137: @@ -2569,7 +2571,7 @@ yyElement->MarkX = NU ((yyvsp[-2].measure)); yyElement->MarkY = NU ((yyvsp[-1].measure)); } -#line 2573 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2575 "parse_y.tab.c" /* yacc.c:1646 */ break; case 138: @@ -2578,13 +2580,13 @@ yyElement->MarkX = OU ((yyvsp[-2].measure)); yyElement->MarkY = OU ((yyvsp[-1].measure)); } -#line 2582 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2584 "parse_y.tab.c" /* yacc.c:1646 */ break; case 139: #line 1482 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyElement->Attributes; } -#line 2588 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2590 "parse_y.tab.c" /* yacc.c:1646 */ break; case 147: @@ -2594,7 +2596,7 @@ NU ((yyvsp[-4].measure)) + yyElement->MarkY, NU ((yyvsp[-3].measure)) + yyElement->MarkX, NU ((yyvsp[-2].measure)) + yyElement->MarkY, NU ((yyvsp[-1].measure))); } -#line 2598 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2600 "parse_y.tab.c" /* yacc.c:1646 */ break; case 148: @@ -2604,7 +2606,7 @@ OU ((yyvsp[-4].measure)) + yyElement->MarkY, OU ((yyvsp[-3].measure)) + yyElement->MarkX, OU ((yyvsp[-2].measure)) + yyElement->MarkY, OU ((yyvsp[-1].measure))); } -#line 2608 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2610 "parse_y.tab.c" /* yacc.c:1646 */ break; case 149: @@ -2613,7 +2615,7 @@ CreateNewArcInElement(yyElement, NU ((yyvsp[-7].measure)) + yyElement->MarkX, NU ((yyvsp[-6].measure)) + yyElement->MarkY, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-1].measure))); } -#line 2617 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2619 "parse_y.tab.c" /* yacc.c:1646 */ break; case 150: @@ -2622,13 +2624,13 @@ CreateNewArcInElement(yyElement, OU ((yyvsp[-7].measure)) + yyElement->MarkX, OU ((yyvsp[-6].measure)) + yyElement->MarkY, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-1].measure))); } -#line 2626 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2628 "parse_y.tab.c" /* yacc.c:1646 */ break; case 151: #line 1519 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyElement->Attributes; } -#line 2632 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2634 "parse_y.tab.c" /* yacc.c:1646 */ break; case 153: @@ -2640,7 +2642,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2644 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2646 "parse_y.tab.c" /* yacc.c:1646 */ break; case 154: @@ -2652,7 +2654,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2656 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2658 "parse_y.tab.c" /* yacc.c:1646 */ break; case 155: @@ -2663,7 +2665,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2667 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2669 "parse_y.tab.c" /* yacc.c:1646 */ break; case 156: @@ -2677,7 +2679,7 @@ free ((yyvsp[-2].string)); } -#line 2681 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2683 "parse_y.tab.c" /* yacc.c:1646 */ break; case 157: @@ -2687,7 +2689,7 @@ char p_number[8]; /* make sure that there's enough copper left */ - if (OU ((yyvsp[-3].measure)) - hole < MIN_PINORVIACOPPER && + if (OU ((yyvsp[-3].measure)) - hole < MIN_PINORVIACOPPER && OU ((yyvsp[-3].measure)) > MIN_PINORVIACOPPER) hole = OU ((yyvsp[-3].measure)) - MIN_PINORVIACOPPER; @@ -2696,7 +2698,7 @@ OU ((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), p_number, OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2700 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2702 "parse_y.tab.c" /* yacc.c:1646 */ break; case 158: @@ -2710,7 +2712,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2714 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2716 "parse_y.tab.c" /* yacc.c:1646 */ break; case 159: @@ -2723,7 +2725,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2727 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2729 "parse_y.tab.c" /* yacc.c:1646 */ break; case 160: @@ -2734,7 +2736,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2738 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2740 "parse_y.tab.c" /* yacc.c:1646 */ break; case 161: @@ -2747,19 +2749,19 @@ OU ((yyvsp[-3].measure)) + 2*MASKFRAME, (yyvsp[-2].string),p_number, OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2751 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2753 "parse_y.tab.c" /* yacc.c:1646 */ break; case 162: #line 1714 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.flagtype) = OldFlags((yyvsp[0].integer)); } -#line 2757 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2759 "parse_y.tab.c" /* yacc.c:1646 */ break; case 163: #line 1715 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.flagtype) = string_to_flags ((yyvsp[0].string), yyerror); free((yyvsp[0].string)); } -#line 2763 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2765 "parse_y.tab.c" /* yacc.c:1646 */ break; case 167: @@ -2779,7 +2781,7 @@ Symbol->Valid = true; Symbol->Delta = NU ((yyvsp[-2].measure)); } -#line 2783 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2785 "parse_y.tab.c" /* yacc.c:1646 */ break; case 168: @@ -2799,7 +2801,7 @@ Symbol->Valid = true; Symbol->Delta = OU ((yyvsp[-2].measure)); } -#line 2803 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2805 "parse_y.tab.c" /* yacc.c:1646 */ break; case 174: @@ -2807,7 +2809,7 @@ { CreateNewLineInSymbol(Symbol, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2811 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2813 "parse_y.tab.c" /* yacc.c:1646 */ break; case 175: @@ -2815,7 +2817,7 @@ { CreateNewLineInSymbol(Symbol, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2819 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2821 "parse_y.tab.c" /* yacc.c:1646 */ break; case 183: @@ -2825,7 +2827,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2829 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2831 "parse_y.tab.c" /* yacc.c:1646 */ break; case 189: @@ -2834,25 +2836,25 @@ CreateNewConnection(Menu, (yyvsp[-1].string)); free ((yyvsp[-1].string)); } -#line 2838 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2840 "parse_y.tab.c" /* yacc.c:1646 */ break; case 197: #line 1952 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_ADD_CONN, (yyvsp[-2].string), (yyvsp[-1].string), NULL); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2844 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2846 "parse_y.tab.c" /* yacc.c:1646 */ break; case 198: #line 1953 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_DEL_CONN, (yyvsp[-2].string), (yyvsp[-1].string), NULL); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2850 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2852 "parse_y.tab.c" /* yacc.c:1646 */ break; case 199: #line 1954 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_CHANGE_ATTRIB, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string)); free((yyvsp[-3].string)); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2856 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2858 "parse_y.tab.c" /* yacc.c:1646 */ break; case 200: @@ -2862,95 +2864,95 @@ free ((yyvsp[-2].string)); free ((yyvsp[-1].string)); } -#line 2866 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2868 "parse_y.tab.c" /* yacc.c:1646 */ break; case 201: #line 1989 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 2872 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2874 "parse_y.tab.c" /* yacc.c:1646 */ break; case 202: #line 1990 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.string) = 0; } -#line 2878 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2880 "parse_y.tab.c" /* yacc.c:1646 */ break; case 203: #line 1994 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[0].number); } -#line 2884 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2886 "parse_y.tab.c" /* yacc.c:1646 */ break; case 204: #line 1995 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[0].integer); } -#line 2890 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2892 "parse_y.tab.c" /* yacc.c:1646 */ break; case 205: #line 2000 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { do_measure(&(yyval.measure), (yyvsp[0].number), PCB_MIL_TO_COORD ((yyvsp[0].number)) / 100.0, 0); } -#line 2896 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2898 "parse_y.tab.c" /* yacc.c:1646 */ break; case 206: #line 2001 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100000.0); } -#line 2902 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2904 "parse_y.tab.c" /* yacc.c:1646 */ break; case 207: #line 2002 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100.0); } -#line 2908 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2910 "parse_y.tab.c" /* yacc.c:1646 */ break; case 208: #line 2003 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number))); } -#line 2914 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2916 "parse_y.tab.c" /* yacc.c:1646 */ break; case 209: #line 2004 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_INCH_TO_COORD ((yyvsp[-1].number))); } -#line 2920 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2922 "parse_y.tab.c" /* yacc.c:1646 */ break; case 210: #line 2005 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) / 1000000.0); } -#line 2926 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2928 "parse_y.tab.c" /* yacc.c:1646 */ break; case 211: #line 2006 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) / 1000.0); } -#line 2932 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2934 "parse_y.tab.c" /* yacc.c:1646 */ break; case 212: #line 2007 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number))); } -#line 2938 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2940 "parse_y.tab.c" /* yacc.c:1646 */ break; case 213: #line 2008 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) * 1000.0); } -#line 2944 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2946 "parse_y.tab.c" /* yacc.c:1646 */ break; case 214: #line 2009 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) * 1000000.0); } -#line 2950 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2952 "parse_y.tab.c" /* yacc.c:1646 */ break; -#line 2954 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2956 "parse_y.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3186,7 +3188,7 @@ */ int yyerror(const char * s) { - Message("ERROR parsing file '%s'\n" + Message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, yylineno, s); @@ -3202,7 +3204,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - Message ("ERROR: The file you are attempting to load is in a format\n" + Message (PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" "which is too new for this version of pcb. To load this file\n" "you need a version of pcb which is >= %d. If you are\n" "using a version built from git source, the source date\n" @@ -3210,7 +3212,7 @@ "up to file version %d.\n", ver, ver, PCB_FILE_VERSION); return 1; } - + return 0; } Index: trunk/src_plugins/io_pcb/parse_y.h =================================================================== --- trunk/src_plugins/io_pcb/parse_y.h (revision 3046) +++ trunk/src_plugins/io_pcb/parse_y.h (revision 3047) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -98,7 +98,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 115 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1909 */ @@ -111,6 +111,8 @@ #line 113 "parse_y.tab.h" /* yacc.c:1909 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 3046) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 3047) @@ -4,7 +4,7 @@ * * If the file format is modified in any way, update * PCB_FILE_VERSION in file.h - * + * * ************************** README ******************* */ @@ -81,9 +81,9 @@ extern conf_role_t yy_settings_dest; extern FlagType yy_pcb_flags; -static char *layer_group_string; +static char *layer_group_string; -static AttributeListTypePtr attr_list; +static AttributeListTypePtr attr_list; int yyerror(const char *s); int yylex(); @@ -164,7 +164,7 @@ @ref{Object Flags}. %end-doc */ - + parsepcb : { /* reset flags for 'used layers'; @@ -174,7 +174,7 @@ if (!yyPCB) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -187,11 +187,11 @@ layer_group_string = NULL; } pcbfileversion - pcbname + pcbname pcbgrid pcbcursor polyarea - pcbthermal + pcbthermal pcbdrc pcbflags pcbgroups @@ -207,7 +207,7 @@ CreateNewPCBPost (yyPCB, 0); if (ParseGroupString(layer_group_string, &yyPCB->LayerGroups, yyData->LayerN)) { - Message("illegal layer-group string\n"); + Message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } /* initialize the polygon clipping now since @@ -222,7 +222,7 @@ ENDALL_LOOP; PCB = pcb_save; } - + | { PreLoadElementPCB (); layer_group_string = NULL; } element @@ -242,7 +242,7 @@ if (!yyData || !yyFont) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < MAX_LAYER + 2; i++) @@ -265,7 +265,7 @@ if (!yyFont) { - Message("illegal fileformat\n"); + Message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } yyFont->Valid = false; @@ -308,7 +308,7 @@ YYABORT; } } -; +; /* %start-doc pcbfile PCB @@ -349,7 +349,7 @@ yyPCB->MaxWidth = NU ($4); yyPCB->MaxHeight = NU ($5); } - ; + ; /* %start-doc pcbfile Grid @@ -456,7 +456,7 @@ @end syntax @table @var -@item Area +@item Area Minimum area of polygon island to retain. If a polygon has clearances that cause an isolated island to be created, then will only be retained if the area exceeds this minimum area. @end table @@ -667,7 +667,7 @@ { if (ParseRouteString($3, &yyPCB->RouteStyle, "mil")) { - Message("illegal route-style string\n"); + Message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -676,7 +676,7 @@ { if (ParseRouteString($3, &yyPCB->RouteStyle, "cmil")) { - Message("illegal route-style string\n"); + Message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -701,7 +701,7 @@ | layer | { - /* clear pointer to force memory allocation by + /* clear pointer to force memory allocation by * the appropriate subroutine */ yyElement = NULL; @@ -797,7 +797,7 @@ Coord hole = (OU($5) * DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ - if (OU($5) - hole < MIN_PINORVIACOPPER && + if (OU($5) - hole < MIN_PINORVIACOPPER && OU($5) > MIN_PINORVIACOPPER) hole = OU($5) - MIN_PINORVIACOPPER; @@ -1169,7 +1169,7 @@ if (bad_contour_found) { - Message("WARNING parsing file '%s'\n" + Message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, yylineno); @@ -1313,7 +1313,7 @@ ; element_newformat - /* element_flags, description, pcb-name, value, + /* element_flags, description, pcb-name, value, * text_x, text_y, text_direction, text_scale, text_flags */ : T_ELEMENT '(' INTEGER STRING STRING STRING measure measure measure measure INTEGER ')' '(' @@ -1614,7 +1614,7 @@ char p_number[8]; /* make sure that there's enough copper left */ - if (OU ($5) - hole < MIN_PINORVIACOPPER && + if (OU ($5) - hole < MIN_PINORVIACOPPER && OU ($5) > MIN_PINORVIACOPPER) hole = OU ($5) - MIN_PINORVIACOPPER; @@ -1842,7 +1842,7 @@ ; netdefs - : net + : net | netdefs net ; @@ -2016,7 +2016,7 @@ */ int yyerror(const char * s) { - Message("ERROR parsing file '%s'\n" + Message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, yylineno, s); @@ -2032,7 +2032,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - Message ("ERROR: The file you are attempting to load is in a format\n" + Message (PCB_MSG_DEFAULT, "ERROR: The file you are attempting to load is in a format\n" "which is too new for this version of pcb. To load this file\n" "you need a version of pcb which is >= %d. If you are\n" "using a version built from git source, the source date\n" @@ -2040,7 +2040,7 @@ "up to file version %d.\n", ver, ver, PCB_FILE_VERSION); return 1; } - + return 0; } Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 3046) +++ trunk/src_plugins/oldactions/oldactions.c (revision 3047) @@ -39,11 +39,11 @@ { conf_native_t *n = conf_get_field(path); if (n == NULL) { - Message("Error: can't find config node %s to toggle\n", path); + Message(PCB_MSG_DEFAULT, "Error: can't find config node %s to toggle\n", path); return; } if (n->type != CFN_BOOLEAN) { - Message("Error: config node %s is not a boolean, can't toggle\n", path); + Message(PCB_MSG_DEFAULT, "Error: config node %s is not a boolean, can't toggle\n", path); return; } Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 3046) +++ trunk/src_plugins/propedit/propedit.c (revision 3047) @@ -47,7 +47,7 @@ htsp_entry_t *pe; if ((gui == NULL) || (gui->propedit_start == NULL)) { - Message("Error: there's no GUI or the active GUI can't edit properties.\n"); + Message(PCB_MSG_DEFAULT, "Error: there's no GUI or the active GUI can't edit properties.\n"); return 1; } Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 3046) +++ trunk/src_plugins/renumber/renumber.c (revision 3047) @@ -110,7 +110,7 @@ } if ((out = fopen(name, "w")) == NULL) { - Message(_("Could not open %s\n"), name); + Message(PCB_MSG_DEFAULT, _("Could not open %s\n"), name); if (free_name && name) free(name); return 1; Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 3046) +++ trunk/src_plugins/report/report.c (revision 3047) @@ -455,7 +455,7 @@ } if ((report == NULL) || (report == '\0')) { - Message(_("Nothing found to report on\n")); + Message(PCB_MSG_DEFAULT, _("Nothing found to report on\n")); return 1; } @@ -740,7 +740,7 @@ if (use_re) { regex = re_sei_comp(tofind); if (re_sei_errno(regex) != 0) { - Message(_("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return (1); } Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 3046) +++ trunk/src_plugins/shand_cmd/command.c (revision 3047) @@ -78,7 +78,7 @@ static int CommandHelp(int argc, char **argv, Coord x, Coord y) { - Message("following commands are supported:\n" + Message(PCB_MSG_DEFAULT, "following commands are supported:\n" " Command() execute an action command (too numerous to list)\n" " see the manual for the list of action commands\n" " h display this help message\n" @@ -122,7 +122,7 @@ break; default: /* usage */ - Message("Usage: l [name]\n loads layout data\n"); + Message(PCB_MSG_DEFAULT, "Usage: l [name]\n loads layout data\n"); return (1); } @@ -159,7 +159,7 @@ break; default: /* usage */ - Message(false, "Usage: le [name]\n loads element data to buffer\n"); + Message(PCB_MSG_DEFAULT, false, "Usage: le [name]\n loads element data to buffer\n"); return (1); } return (0); @@ -195,7 +195,7 @@ break; default: /* usage */ - Message("Usage: m [name]\n loads layout data to buffer\n"); + Message(PCB_MSG_DEFAULT, "Usage: m [name]\n loads layout data to buffer\n"); return (1); } return (0); @@ -272,7 +272,7 @@ break; default: /* usage */ - Message("Usage: rn [name]\n reads in a netlist file\n"); + Message(PCB_MSG_DEFAULT, "Usage: rn [name]\n reads in a netlist file\n"); return (1); } if (PCB->Netlistname) @@ -321,7 +321,7 @@ SetChangedFlag(false); } else - Message("No filename to save to yet\n"); + Message(PCB_MSG_DEFAULT, "No filename to save to yet\n"); break; case 1: @@ -335,7 +335,7 @@ break; default: - Message("Usage: s [name] | w [name]\n saves layout data\n"); + Message(PCB_MSG_DEFAULT, "Usage: s [name] | w [name]\n saves layout data\n"); return (1); } return (0); Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 3046) +++ trunk/src_plugins/stroke/stroke.c (revision 3047) @@ -133,7 +133,7 @@ } default: - Message(_("Unknown stroke %s\n"), msg); + Message(PCB_MSG_DEFAULT, _("Unknown stroke %s\n"), msg); break; } } Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 3046) +++ trunk/src_plugins/toporouter/toporouter.c (revision 3047) @@ -1205,7 +1205,7 @@ usecs += 1000; } - Message(_("Elapsed time: %d.%02d seconds\n"), secs, usecs); + Message(PCB_MSG_DEFAULT, _("Elapsed time: %d.%02d seconds\n"), secs, usecs); free(r->layers); free(r); @@ -6965,8 +6965,8 @@ i = i->next; } - Message(_("Reticulating splines... successful\n\n")); - Message(_("Wiring cost: %f inches\n"), r->wiring_score / 1000.); + Message(PCB_MSG_DEFAULT, _("Reticulating splines... successful\n\n")); + Message(PCB_MSG_DEFAULT, _("Wiring cost: %f inches\n"), r->wiring_score / 1000.); printf("Wiring cost: %f inches\n", r->wiring_score / 1000.); g_list_free(oproutes); @@ -7767,7 +7767,7 @@ guint j; gint pfailcount = failcount + 1; - Message(_("ROAR router: ")); + Message(PCB_MSG_DEFAULT, _("ROAR router: ")); for (j = 0; j < 6; j++) { GList *failed = g_list_copy(r->failednets), *k = failed; @@ -7781,10 +7781,10 @@ printf("\tROAR pass %d - %d routed - %d failed\n", j, g_list_length(r->routednets), g_list_length(r->failednets)); if (!failcount || failcount >= pfailcount) { - Message(_("%d nets remaining\n"), failcount); + Message(PCB_MSG_DEFAULT, _("%d nets remaining\n"), failcount); break; } - Message(_("%d -> "), failcount); + Message(PCB_MSG_DEFAULT, _("%d -> "), failcount); pfailcount = failcount; } @@ -7965,7 +7965,7 @@ r->flags |= TOPOROUTER_FLAG_AFTERRUBIX; failcount = rubix_router(r, failcount); - Message(_("RUBIX router: %d nets remaining\n"), failcount); + Message(PCB_MSG_DEFAULT, _("RUBIX router: %d nets remaining\n"), failcount); printf("RUBIX router: %d nets remaining\n", failcount); r->flags |= TOPOROUTER_FLAG_GOFAR; @@ -8053,10 +8053,10 @@ gts_predicates_init(); - Message(_("Topological Autorouter\n")); - Message(_("Started %s"), asctime(localtime(<ime))); - Message(_("-------------------------------------\n")); - Message(_("Copyright 2009 Anthony Blake (tonyb33@gmail.com)\n\n")); + Message(PCB_MSG_DEFAULT, _("Topological Autorouter\n")); + Message(PCB_MSG_DEFAULT, _("Started %s"), asctime(localtime(<ime))); + Message(PCB_MSG_DEFAULT, _("-------------------------------------\n")); + Message(PCB_MSG_DEFAULT, _("Copyright 2009 Anthony Blake (tonyb33@gmail.com)\n\n")); return r; } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 3046) +++ trunk/src_plugins/vendordrill/vendor.c (revision 3047) @@ -186,7 +186,7 @@ /* load the resource file */ doc = hid_cfg_load_lht(fname); if (doc == NULL) { - Message(_("Could not load vendor resource file \"%s\"\n"), fname); + Message(PCB_MSG_DEFAULT, _("Could not load vendor resource file \"%s\"\n"), fname); return 1; } @@ -208,7 +208,7 @@ sf = PCB_MM_TO_COORD(1); } else { - Message("\"%s\" is not a supported units. Defaulting to inch\n", sval); + Message(PCB_MSG_DEFAULT, "\"%s\" is not a supported units. Defaulting to inch\n", sval); sf = PCB_INCH_TO_COORD(1); } @@ -223,7 +223,7 @@ rounding_method = CLOSEST; } else { - Message(_("\"%s\" is not a valid rounding type. Defaulting to up\n"), sval); + Message(PCB_MSG_DEFAULT, _("\"%s\" is not a valid rounding type. Defaulting to up\n"), sval); rounding_method = ROUND_UP; } } @@ -242,49 +242,49 @@ add_to_drills(n->data.text.value); } } - Message(_("Broken drillmap: /drillmap should be a list\n")); + Message(PCB_MSG_DEFAULT, _("Broken drillmap: /drillmap should be a list\n")); } else - Message(_("No drillmap resource found\n")); + Message(PCB_MSG_DEFAULT, _("No drillmap resource found\n")); sval = hid_cfg_text_value(doc, "/drc/copper_space"); if (sval != NULL) { PCB->Bloat = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->Bloat); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->Bloat); } sval = hid_cfg_text_value(doc, "/drc/copper_overlap"); if (sval != NULL) { PCB->Shrink = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum copper overlap to %.2f mils\n"), 0.01 * PCB->Shrink); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper overlap to %.2f mils\n"), 0.01 * PCB->Shrink); } sval = hid_cfg_text_value(doc, "/drc/copper_width"); if (sval != NULL) { PCB->minWid = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->minWid); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum copper spacing to %.2f mils\n"), 0.01 * PCB->minWid); } sval = hid_cfg_text_value(doc, "/drc/silk_width"); if (sval != NULL) { PCB->minSlk = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum silk width to %.2f mils\n"), 0.01 * PCB->minSlk); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum silk width to %.2f mils\n"), 0.01 * PCB->minSlk); } sval = hid_cfg_text_value(doc, "/drc/min_drill"); if (sval != NULL) { PCB->minDrill = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum drill diameter to %.2f mils\n"), 0.01 * PCB->minDrill); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum drill diameter to %.2f mils\n"), 0.01 * PCB->minDrill); } sval = hid_cfg_text_value(doc, "/drc/min_ring"); if (sval != NULL) { PCB->minRing = floor(sf * atof(sval) + 0.5); - Message(_("Set DRC minimum annular ring to %.2f mils\n"), 0.01 * PCB->minRing); + Message(PCB_MSG_DEFAULT, _("Set DRC minimum annular ring to %.2f mils\n"), 0.01 * PCB->minRing); } - Message(_("Loaded %d vendor drills from %s\n"), n_vendor_drills, fname); - Message(_("Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"), n_refdes, n_value, n_descr); + Message(PCB_MSG_DEFAULT, _("Loaded %d vendor drills from %s\n"), n_vendor_drills, fname); + Message(PCB_MSG_DEFAULT, _("Loaded %d RefDes skips, %d Value skips, %d Descr skips\n"), n_refdes, n_value, n_descr); conf_set(CFR_DESIGN, "plugins/vendor/enable", -1, "0", POL_OVERWRITE); @@ -322,7 +322,7 @@ if (ChangeObject2ndSize(PCB_TYPE_VIA, via, NULL, NULL, vendorDrillMap(via->DrillingHole), true, false)) changed++; else { - Message(_ + Message(PCB_MSG_DEFAULT, _ ("Via at %.2f, %.2f not changed. Possible reasons:\n" "\t- pad size too small\n" "\t- new size would be too large or too small\n"), 0.01 * via->X, 0.01 * via->Y); @@ -329,7 +329,7 @@ } } else { - Message(_("Locked via at %.2f, %.2f not changed.\n"), 0.01 * via->X, 0.01 * via->Y); + Message(PCB_MSG_DEFAULT, _("Locked via at %.2f, %.2f not changed.\n"), 0.01 * via->X, 0.01 * via->Y); } } } @@ -352,7 +352,7 @@ if (ChangeObject2ndSize(PCB_TYPE_PIN, element, pin, NULL, vendorDrillMap(pin->DrillingHole), true, false)) changed++; else { - Message(_ + Message(PCB_MSG_DEFAULT, _ ("Pin %s (%s) at %.2f, %.2f (element %s, %s, %s) not changed.\n" "\tPossible reasons:\n" "\t- pad size too small\n" @@ -363,7 +363,7 @@ } } else { - Message(_("Locked pin at %-6.2f, %-6.2f not changed.\n"), 0.01 * pin->X, 0.01 * pin->Y); + Message(PCB_MSG_DEFAULT, _("Locked pin at %-6.2f, %-6.2f not changed.\n"), 0.01 * pin->X, 0.01 * pin->Y); } } } @@ -372,7 +372,7 @@ } END_LOOP; - Message(_("Updated %d drill sizes out of %d total\n"), changed, tot); + Message(PCB_MSG_DEFAULT, _("Updated %d drill sizes out of %d total\n"), changed, tot); #warning TODO: this should not happen; modify some local setting? #if 0 @@ -380,7 +380,7 @@ if (conf_core.design.via_drilling_hole != vendorDrillMap(Settings.ViaDrillingHole)) { changed++; Settings.ViaDrillingHole = vendorDrillMap(Settings.ViaDrillingHole); - Message(_("Adjusted active via hole size to be %6.2f mils\n"), 0.01 * Settings.ViaDrillingHole); + Message(PCB_MSG_DEFAULT, _("Adjusted active via hole size to be %6.2f mils\n"), 0.01 * Settings.ViaDrillingHole); } /* and update the vias for the various routing styles */ @@ -388,12 +388,12 @@ if (PCB->RouteStyle[i].Hole != vendorDrillMap(PCB->RouteStyle[i].Hole)) { changed++; PCB->RouteStyle[i].Hole = vendorDrillMap(PCB->RouteStyle[i].Hole); - Message(_ + Message(PCB_MSG_DEFAULT, _ ("Adjusted %s routing style via hole size to be %6.2f mils\n"), PCB->RouteStyle[i].Name, 0.01 * PCB->RouteStyle[i].Hole); if (PCB->RouteStyle[i].Diameter < PCB->RouteStyle[i].Hole + MIN_PINORVIACOPPER) { PCB->RouteStyle[i].Diameter = PCB->RouteStyle[i].Hole + MIN_PINORVIACOPPER; - Message(_ + Message(PCB_MSG_DEFAULT, _ ("Increased %s routing style via diameter to %6.2f mils\n"), PCB->RouteStyle[i].Name, 0.01 * PCB->RouteStyle[i].Diameter); } @@ -439,7 +439,7 @@ /* are we larger than the largest drill? */ if (in > vendor_drills[n_vendor_drills - 1]) { - Message(_("Vendor drill list does not contain a drill >= %6.2f mil\n" + Message(PCB_MSG_DEFAULT, _("Vendor drill list does not contain a drill >= %6.2f mil\n" "Using %6.2f mil instead.\n"), 0.01 * in, 0.01 * vendor_drills[n_vendor_drills - 1]); cached_map = vendor_drills[n_vendor_drills - 1]; return vendor_drills[n_vendor_drills - 1]; @@ -577,7 +577,7 @@ for (i = 0; i < n_refdes; i++) { if ((NSTRCMP(UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]) == 0) || rematch(ignore_refdes[i], UNKNOWN(NAMEONPCB_NAME(element)))) { - Message(_("Vendor mapping skipped because refdes = %s matches %s\n"), UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]); + Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because refdes = %s matches %s\n"), UNKNOWN(NAMEONPCB_NAME(element)), ignore_refdes[i]); noskip = 0; } } @@ -585,7 +585,7 @@ for (i = 0; i < n_value; i++) { if ((NSTRCMP(UNKNOWN(VALUE_NAME(element)), ignore_value[i]) == 0) || rematch(ignore_value[i], UNKNOWN(VALUE_NAME(element)))) { - Message(_("Vendor mapping skipped because value = %s matches %s\n"), UNKNOWN(VALUE_NAME(element)), ignore_value[i]); + Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because value = %s matches %s\n"), UNKNOWN(VALUE_NAME(element)), ignore_value[i]); noskip = 0; } } @@ -595,7 +595,7 @@ if ((NSTRCMP(UNKNOWN(DESCRIPTION_NAME(element)), ignore_descr[i]) == 0) || rematch(ignore_descr[i], UNKNOWN(DESCRIPTION_NAME(element)))) { - Message(_ + Message(PCB_MSG_DEFAULT, _ ("Vendor mapping skipped because descr = %s matches %s\n"), UNKNOWN(DESCRIPTION_NAME(element)), ignore_descr[i]); noskip = 0; @@ -603,7 +603,7 @@ } if (noskip && TEST_FLAG(PCB_FLAG_LOCK, element)) { - Message(_("Vendor mapping skipped because element %s is locked\n"), UNKNOWN(NAMEONPCB_NAME(element))); + Message(PCB_MSG_DEFAULT, _("Vendor mapping skipped because element %s is locked\n"), UNKNOWN(NAMEONPCB_NAME(element))); noskip = 0; } @@ -621,7 +621,7 @@ /* compile the regular expression */ regex = re_sei_comp(re); if (re_sei_errno(regex) != 0) { - Message(_("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); + Message(PCB_MSG_DEFAULT, _("regexp error: %s\n"), re_error_str(re_sei_errno(regex))); re_sei_free(regex); return false; }