Index: read.c =================================================================== --- read.c (revision 30954) +++ read.c (revision 30955) @@ -86,7 +86,7 @@ { if (sattr->refdes != NULL) { if (sattr->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "protel autotrax: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(RND_MSG_ERROR, "protel autotrax: not importing refdes=%s: no footprint specified\n", sattr->refdes); else rnd_actionva(hl, "ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL); } @@ -128,7 +128,7 @@ return NULL; } if (autotrax_layer == 0) { - rnd_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax layer zero, %s:%d\n", otyp, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored '%s' on easy/autotrax layer zero, %s:%d\n", otyp, st->Filename, st->lineno); st->ignored_layer_zero_element++; return NULL; } @@ -135,7 +135,7 @@ lid = st->protel_to_stackup[autotrax_layer]; if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); return NULL; } @@ -189,7 +189,7 @@ qparse_free(argc, &argv); } else { - rnd_message(PCB_MSG_ERROR, "Insufficient free string attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient free string attribute fields, %s:%d\n", st->Filename, st->lineno); qparse_free(argc, &argv); return -1; } @@ -196,12 +196,12 @@ } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Failed to parse text attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to parse text attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty free string text field, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty free string text field, %s:%d\n", st->Filename, st->lineno); strcpy(line, "(empty text field)"); } /* this helps the parser fail more gracefully if excessive newlines, or empty text field */ @@ -227,7 +227,7 @@ TODO("do not use strlen() for this, decide where to move this code") /* if (strlen(t) == 0) { - rnd_message(PCB_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); return 0; } */ @@ -272,7 +272,7 @@ qparse_free(argc, &argv); } else { - rnd_message(PCB_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); qparse_free(argc, &argv); return -1; } @@ -333,13 +333,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -469,13 +469,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -516,7 +516,7 @@ argc = qparse2(s, &argv, 0); if (argc <= 6) { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); @@ -541,7 +541,7 @@ } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -548,7 +548,7 @@ /* now find name as string on next line and copy it */ TODO("can not exit above if we need to read this line") if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); return -1; } s = line; @@ -561,19 +561,19 @@ so we warn the user is this is the case */ switch (Connects) { case 1: - rnd_message(PCB_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); break; case 2: - rnd_message(PCB_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); break; case 4: - rnd_message(PCB_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 3: - rnd_message(PCB_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 5: - rnd_message(PCB_MSG_ERROR, "pin should connect to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin should connect to GND plane, %s:%d.\n", st->Filename, st->lineno); break; } @@ -581,7 +581,7 @@ Mask = Thickness + st->mask_clearance; if (autotrax_layer == 0) { - rnd_message(PCB_MSG_ERROR, "Ignored pad on easy/autotrax layer zero, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored pad on easy/autotrax layer zero, %s:%d\n", st->Filename, st->lineno); st->ignored_layer_zero_element++; return 0; } @@ -597,7 +597,7 @@ 5 Cross Hair Target 6 Moiro Target */ if ((Shape == 5) || (Shape == 6)) { - rnd_message(PCB_MSG_ERROR, "Unsupported FP target shape %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP target shape %d, %s:%d.\n", Shape, st->Filename, st->lineno); return 0; } @@ -633,7 +633,7 @@ sh[n].layer_mask |= PCB_LYT_BOTTOM; break; default: - rnd_message(PCB_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); return 0; } @@ -657,12 +657,12 @@ case 3: /* octa */ TODO("generate octa") default: - rnd_message(PCB_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); return 0; } ps = pcb_pstk_new_from_shape(data, X, Y, Drill, 1, Clearance, sh); if (ps == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); return (ps != NULL); } @@ -705,13 +705,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Fill attribute fields unable to be parsed, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Fill attribute fields unable to be parsed, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -723,7 +723,7 @@ polygon = pcb_poly_new(ly, 0, flags); if (polygon == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -756,7 +756,7 @@ pcb_shape_rect(&sh[2], w, h); if (pcb_pstk_new_from_shape(subc->data, (X1+X2)/2, (Y1+Y2)/2, 0, 0, Clearance, sh) != NULL) return 1; - rnd_message(PCB_MSG_ERROR, "SMD pad: filed to convert from polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "SMD pad: filed to convert from polygon, %s:%d\n", st->Filename, st->lineno); } return -1; @@ -796,7 +796,7 @@ st->protel_to_stackup[13] = pcb_layer_create(st->pcb, gid, "Multi", 0); } else { - rnd_message(PCB_MSG_ERROR, "Unable to create Keepout, Multi layers in default top silk group\n"); + rnd_message(RND_MSG_ERROR, "Unable to create Keepout, Multi layers in default top silk group\n"); } g = pcb_get_grp_new_intern(st->pcb, -1); @@ -853,7 +853,7 @@ netname = rnd_strdup(line); } else { - rnd_message(PCB_MSG_ERROR, "Empty netlist name found, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty netlist name found, %s:%d\n", st->Filename, st->lineno); return -1; } fgetline(line, sizeof(line), FP, st->lineno); @@ -865,11 +865,11 @@ in_comp = 1; while(in_comp) { if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); } else { if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); } else { s = line; @@ -879,7 +879,7 @@ sattr.refdes = rnd_strdup(line); } if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); free(sattr.footprint); sattr.footprint = rnd_strdup("unknown"); } @@ -934,7 +934,7 @@ } } else if (length >= 6 && strncmp(line, "ENDPCB", 6) == 0) { - rnd_message(PCB_MSG_ERROR, "End of protel Autotrax file found in netlist section?!, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "End of protel Autotrax file found in netlist section?!, %s:%d\n", st->Filename, st->lineno); endpcb = 1; /* if we get here, something went wrong */ } } @@ -1004,13 +1004,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -1034,7 +1034,7 @@ break; } else { - rnd_message(PCB_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); TODO("TODO safely free new_module") return 0; } @@ -1154,10 +1154,10 @@ fclose(FP); box = pcb_data_bbox(&board_size, Ptr->Data, pcb_false); if (st.ignored_keepout_element) { - rnd_message(PCB_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); + rnd_message(RND_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); } if (st.ignored_layer_zero_element) { - rnd_message(PCB_MSG_ERROR, "Ignored %d auto/easytrax layer zero feature(s)\n", st.ignored_layer_zero_element); + rnd_message(RND_MSG_ERROR, "Ignored %d auto/easytrax layer zero feature(s)\n", st.ignored_layer_zero_element); } if (box != NULL) { @@ -1165,7 +1165,7 @@ Ptr->hidlib.size_y = box->Y2; } else - rnd_message(PCB_MSG_ERROR, "Can not determine board extents - empty board?\n"); + rnd_message(RND_MSG_ERROR, "Can not determine board extents - empty board?\n"); /* we now flip the board about the X-axis, to invert the Y coords used by autotrax */ pcb_undo_freeze_add(); Index: write.c =================================================================== --- write.c (revision 30954) +++ write.c (revision 30955) @@ -562,7 +562,7 @@ polylist_foreach(&layer->Polygon, &it, polygon) { if (pcb_cpoly_is_simple_rect(polygon)) { - pcb_trace(" simple rectangular polyogon\n"); + rnd_trace(" simple rectangular polyogon\n"); TODO("why do we recalculate the bounding box here?") minx = maxx = polygon->Points[0].X; @@ -586,7 +586,7 @@ /* here we need to test for non rectangular polygons to flag imperfect export to easy/autotrax if (helper_clipped_polygon_type_function(clipped_thing)) { - rnd_message(PCB_MSG_ERROR, "Polygon exported as a bounding box only.\n"); + rnd_message(RND_MSG_ERROR, "Polygon exported as a bounding box only.\n"); }*/ } else { @@ -670,7 +670,7 @@ TODO("this is a bug - exporting to a file shall not change the content we are exporting") if (pcb_board_normalize(PCB) < 0) { - rnd_message(PCB_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); + rnd_message(RND_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); return -1; } @@ -681,7 +681,7 @@ /* we sort out if the layout dimensions exceed the autotrax maxima */ if (PCB_COORD_TO_MIL(PCB->hidlib.size_x) > max_width_mil || PCB_COORD_TO_MIL(PCB->hidlib.size_y) > max_height_mil) { - rnd_message(PCB_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); + rnd_message(RND_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); return -1; }