Index: file.c =================================================================== --- file.c (revision 30902) +++ file.c (revision 30903) @@ -349,9 +349,9 @@ /* write information about vias */ padstacklist_foreach(&Data->padstack, &it, ps) { - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; - pcb_bool plated; + rnd_bool plated; char *name = pcb_attribute_get(&ps->Attributes, "name"); if (!pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { @@ -426,7 +426,7 @@ gdl_iterator_t it; int l; - pcb_coord_t ox, oy, rx = 0, ry = 0; + rnd_coord_t ox, oy, rx = 0, ry = 0; int rdir = 0, rscale = 100, on_bot = 0; pcb_text_t *trefdes; pcb_pstk_t *ps; @@ -477,9 +477,9 @@ WriteAttributeList(FP, &sc->Attributes, "\t", attr_inhibit); padstacklist_foreach(&sc->data->padstack, &it, ps) { - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; pcb_pstk_compshape_t cshape; - pcb_bool plated, square, nopaste; + rnd_bool plated, square, nopaste; unsigned char ic = ps->intconn; if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { pcb_fprintf(FP, "\tPin[%[0] %[0] %[0] %[0] %[0] %[0] ", x - ox, y - oy, pad_dia, clearance*2, mask, drill_dia); @@ -691,7 +691,7 @@ ts = pcb_layer_get_top_silk(); if ((bs < 0) || (ts < 0)) { - pcb_message(PCB_MSG_ERROR, "The geda/pcb file format requires top and bottom silk layers.\nExporting a board without those will not be usable in geda/pcb.\n"); + rnd_message(PCB_MSG_ERROR, "The geda/pcb file format requires top and bottom silk layers.\nExporting a board without those will not be usable in geda/pcb.\n"); return; } @@ -730,7 +730,7 @@ } } -int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { pcb_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); @@ -904,7 +904,7 @@ return -1; } -int pcb_layer_improvise(pcb_board_t *pcb, pcb_bool setup) +int pcb_layer_improvise(pcb_board_t *pcb, rnd_bool setup) { pcb_layergrp_id_t gid; pcb_layer_id_t lid, silk = -1; @@ -1017,12 +1017,12 @@ static int yysubc_bottom; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *subc, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, - char *Value, pcb_coord_t TextX, pcb_coord_t TextY, unsigned int Direction, - int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName) + char *Value, rnd_coord_t TextX, rnd_coord_t TextY, unsigned int Direction, + int TextScale, pcb_flag_t TextFlags, rnd_bool uniqueName) { pcb_subc_t *sc = pcb_subc_new(); pcb_text_t *txt; @@ -1083,20 +1083,20 @@ return pcb_subc_get_layer(subc, PCB_LYT_SILK | side, /*PCB_LYC_AUTO*/0, pcb_true, name, pcb_false); } -pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness) +pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness) { pcb_layer_t *ly = subc_silk_layer(subc); return pcb_line_new(ly, X1, Y1, X2, Y2, Thickness, 0, pcb_no_flags()); } -pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, - pcb_coord_t Width, pcb_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, pcb_coord_t Thickness) +pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, + rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness) { pcb_layer_t *ly = subc_silk_layer(subc); return pcb_arc_new(ly, X, Y, Width, Height, angle, delta, Thickness, 0, pcb_no_flags(), pcb_true); } -pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags) +pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags) { pcb_pstk_t *p; p = pcb_old_via_new(subc->data, -1, X, Y, Thickness, Clearance, Mask, DrillingHole, Name, Flags); @@ -1110,7 +1110,7 @@ return p; } -pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags) +pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags) { pcb_pstk_t *p; @@ -1158,13 +1158,13 @@ if (PCB->Data->Layer[n].meta.real.grp == -1) { pcb_layergrp_t *grp = pcb_get_grp_new_intern(pcb, -1); - pcb_message(PCB_MSG_WARNING, "Broken input file: layer group string doesn't contain layer %ld\n(Trying to fix it by introducing a new intern copper layer)\n", n); + rnd_message(PCB_MSG_WARNING, "Broken input file: layer group string doesn't contain layer %ld\n(Trying to fix it by introducing a new intern copper layer)\n", n); if (grp != NULL) { pcb_layergrp_id_t gid = grp - PCB->LayerGroups.grp; pcb_layer_move_to_group(pcb, n, gid); } else - pcb_message(PCB_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); + rnd_message(PCB_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); } } Index: file.h =================================================================== --- file.h (revision 30902) +++ file.h (revision 30903) @@ -37,7 +37,7 @@ /* This is used by the lexer/parser */ typedef struct { int ival; - pcb_coord_t bval; + rnd_coord_t bval; double dval; char has_units; } PLMeasure; @@ -56,7 +56,7 @@ extern pcb_plug_io_t *pcb_preferred_io_pcb, *pcb_nanometer_io_pcb, *pcb_centimil_io_pcb; -int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency); int io_pcb_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs); int io_pcb_write_subcs_subc(pcb_plug_io_t *ctx, void **udata, FILE *f, pcb_subc_t *subc); int io_pcb_write_subcs_tail(pcb_plug_io_t *ctx, void **udata, FILE *f); @@ -79,14 +79,14 @@ int PCBFileVersionNeeded(void); /* Improvise layers and groups for a partial input file that lacks layer groups (and maybe even some layers) */ -int pcb_layer_improvise(pcb_board_t *pcb, pcb_bool setup); +int pcb_layer_improvise(pcb_board_t *pcb, rnd_bool setup); -pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *Element, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, pcb_coord_t TextX, pcb_coord_t TextY, unsigned int Direction, int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName); +pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *Element, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, rnd_coord_t TextX, rnd_coord_t TextY, unsigned int Direction, int TextScale, pcb_flag_t TextFlags, rnd_bool uniqueName); void io_pcb_element_fin(pcb_data_t *Data); -pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness); -pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Width, pcb_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, pcb_coord_t Thickness); -pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags); -pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags); +pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness); +pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness); +pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags); +pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags); void io_pcb_preproc_board(pcb_board_t *pcb); void io_pcb_postproc_board(pcb_board_t *pcb); Index: parse_l.c =================================================================== --- parse_l.c (revision 30902) +++ parse_l.c (revision 30903) @@ -942,13 +942,13 @@ pcb_board_t * yyPCB; /* used by parser */ pcb_data_t * yyData; pcb_subc_t *yysubc; -pcb_coord_t yysubc_ox, yysubc_oy; +rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; -pcb_bool yyFontReset; +rnd_bool yyFontReset; int yyElemFixLayers = 0; static int parse_number (void); @@ -2601,7 +2601,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static pcb_bool firsttime = pcb_true; + static rnd_bool firsttime = pcb_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -2830,20 +2830,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent unitless centimil input)\n", Filename, pcb_centimil_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent unitless centimil input)\n", Filename, pcb_centimil_io_pcb->description); PCB->Data->loader = pcb_centimil_io_pcb; break; case PCB_USTY_NANOMETER: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent nanometer input)\n", Filename, pcb_nanometer_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent nanometer input)\n", Filename, pcb_nanometer_io_pcb->description); PCB->Data->loader = pcb_nanometer_io_pcb; break; case PCB_USTY_UNITS: case PCB_USTY_UNITS | PCB_USTY_NANOMETER: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from non-nanometer explicit unit usage)\n", Filename, pcb_preferred_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from non-nanometer explicit unit usage)\n", Filename, pcb_preferred_io_pcb->description); PCB->Data->loader = pcb_preferred_io_pcb; break; default: - pcb_message(PCB_MSG_WARNING, "No preferred unit format info available and guessing failed for '%s' - will use '%s' on save\n", Filename, pcb_preferred_io_pcb->description); + rnd_message(PCB_MSG_WARNING, "No preferred unit format info available and guessing failed for '%s' - will use '%s' on save\n", Filename, pcb_preferred_io_pcb->description); PCB->Data->loader = pcb_preferred_io_pcb; } } @@ -2873,7 +2873,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: parse_l.l =================================================================== --- parse_l.l (revision 30902) +++ parse_l.l (revision 30903) @@ -73,13 +73,13 @@ pcb_board_t * yyPCB; /* used by parser */ pcb_data_t * yyData; pcb_subc_t *yysubc; -pcb_coord_t yysubc_ox, yysubc_oy; +rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; -pcb_bool yyFontReset; +rnd_bool yyFontReset; int yyElemFixLayers = 0; static int parse_number (void); @@ -218,7 +218,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static pcb_bool firsttime = pcb_true; + static rnd_bool firsttime = pcb_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -447,20 +447,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent unitless centimil input)\n", Filename, pcb_centimil_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent unitless centimil input)\n", Filename, pcb_centimil_io_pcb->description); PCB->Data->loader = pcb_centimil_io_pcb; break; case PCB_USTY_NANOMETER: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent nanometer input)\n", Filename, pcb_nanometer_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from consistent nanometer input)\n", Filename, pcb_nanometer_io_pcb->description); PCB->Data->loader = pcb_nanometer_io_pcb; break; case PCB_USTY_UNITS: case PCB_USTY_UNITS | PCB_USTY_NANOMETER: - pcb_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from non-nanometer explicit unit usage)\n", Filename, pcb_preferred_io_pcb->description); + rnd_message(PCB_MSG_INFO, "No preferred unit format info available for '%s' - will use '%s' on save (guessed from non-nanometer explicit unit usage)\n", Filename, pcb_preferred_io_pcb->description); PCB->Data->loader = pcb_preferred_io_pcb; break; default: - pcb_message(PCB_MSG_WARNING, "No preferred unit format info available and guessing failed for '%s' - will use '%s' on save\n", Filename, pcb_preferred_io_pcb->description); + rnd_message(PCB_MSG_WARNING, "No preferred unit format info available and guessing failed for '%s' - will use '%s' on save\n", Filename, pcb_preferred_io_pcb->description); PCB->Data->loader = pcb_preferred_io_pcb; } } @@ -490,7 +490,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: parse_y.c =================================================================== --- parse_y.c (revision 30902) +++ parse_y.c (revision 30903) @@ -141,7 +141,7 @@ static pcb_symbol_t *Symbol; static int pin_num; static pcb_net_t *currnet; -static pcb_bool LayerFlag[PCB_MAX_LAYER + 2]; +static rnd_bool LayerFlag[PCB_MAX_LAYER + 2]; static int old_fmt; /* 1 if we are reading a PCB(), 0 if PCB[] */ static unsigned char yy_intconn; @@ -149,9 +149,9 @@ extern pcb_board_t * yyPCB; extern pcb_data_t * yyData; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; extern pcb_font_t * yyFont; -extern pcb_bool yyFontReset; +extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; @@ -167,7 +167,7 @@ int yylex(); static int check_file_version (int); -static void do_measure (PLMeasure *m, pcb_coord_t i, double d, int u); +static void do_measure (PLMeasure *m, rnd_coord_t i, double d, int u); #define M(r,f,d) do_measure (&(r), f, d, 1) /* Macros for interpreting what "measure" means - integer value only, @@ -177,10 +177,10 @@ #define NU(m) new_units (m) static int integer_value (PLMeasure m); -static pcb_coord_t old_units (PLMeasure m); -static pcb_coord_t new_units (PLMeasure m); +static rnd_coord_t old_units (PLMeasure m); +static rnd_coord_t new_units (PLMeasure m); static pcb_flag_t pcb_flag_old(unsigned int flags); -static void load_meta_coord(const char *path, pcb_coord_t crd); +static void load_meta_coord(const char *path, rnd_coord_t crd); static void load_meta_float(const char *path, double val); #define YYDEBUG 1 @@ -1821,7 +1821,7 @@ if (!yyPCB) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) @@ -1847,20 +1847,20 @@ pcb_board_new_postproc(yyPCB, 0); if (layer_group_string == NULL) { if (pcb_layer_improvise(yyPCB, pcb_true) != 0) { - pcb_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - pcb_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); } else { if (pcb_layer_parse_group_string(yyPCB, layer_group_string, yyData->LayerN, old_fmt)) { - pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - pcb_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -1921,7 +1921,7 @@ if (!yyData || !yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) @@ -1937,7 +1937,7 @@ /* mark all symbols invalid */ if (!yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -2143,7 +2143,7 @@ { if (pcb_route_string_parse((yyvsp[-1].string), &yyPCB->RouteStyle, "mil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2156,7 +2156,7 @@ { if (pcb_route_string_parse(((yyvsp[-1].string) == NULL ? "" : (yyvsp[-1].string)), &yyPCB->RouteStyle, "cmil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2230,7 +2230,7 @@ case 70: #line 567 "parse_y.y" /* yacc.c:1652 */ { - pcb_coord_t hole = (OU((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE); + rnd_coord_t hole = (OU((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ if (OU((yyvsp[-3].measure)) - hole < PCB_MIN_PINORVIACOPPER && @@ -2429,7 +2429,7 @@ #line 771 "parse_y.y" /* yacc.c:1652 */ { pcb_cardinal_t contour, contour_start, contour_end; - pcb_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -2444,7 +2444,7 @@ if (bad_contour_found) { - pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -2751,7 +2751,7 @@ case 157: #line 1085 "parse_y.y" /* yacc.c:1652 */ { - pcb_coord_t hole = OU ((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE; + rnd_coord_t hole = OU ((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE; char p_number[8]; /* make sure that there's enough copper left */ @@ -2932,7 +2932,7 @@ char *old_val, *key = (yyvsp[-2].string), *val = (yyvsp[-1].string) ? (yyvsp[-1].string) : (char *)""; old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) - pcb_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else pcb_attribute_put(attr_list, key, val); free(key); @@ -3265,7 +3265,7 @@ */ int yyerror(const char * s) { - pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, pcb_lineno, s); @@ -3281,7 +3281,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - pcb_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(PCB_MSG_ERROR, "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" @@ -3294,7 +3294,7 @@ } static void -do_measure (PLMeasure *m, pcb_coord_t i, double d, int u) +do_measure (PLMeasure *m, rnd_coord_t i, double d, int u) { m->ival = i; m->bval = pcb_round (d); @@ -3310,7 +3310,7 @@ return m.ival; } -static pcb_coord_t +static rnd_coord_t old_units (PLMeasure m) { if (m.has_units) @@ -3320,7 +3320,7 @@ return pcb_round (PCB_MIL_TO_COORD (m.ival)); } -static pcb_coord_t +static rnd_coord_t new_units (PLMeasure m) { if (m.has_units) @@ -3350,7 +3350,7 @@ } /* load a board metadata into conf_core */ -static void load_meta_coord(const char *path, pcb_coord_t crd) +static void load_meta_coord(const char *path, rnd_coord_t crd) { char tmp[128]; pcb_sprintf(tmp, "%$mm", crd); Index: parse_y.y =================================================================== --- parse_y.y (revision 30902) +++ parse_y.y (revision 30903) @@ -64,7 +64,7 @@ static pcb_symbol_t *Symbol; static int pin_num; static pcb_net_t *currnet; -static pcb_bool LayerFlag[PCB_MAX_LAYER + 2]; +static rnd_bool LayerFlag[PCB_MAX_LAYER + 2]; static int old_fmt; /* 1 if we are reading a PCB(), 0 if PCB[] */ static unsigned char yy_intconn; @@ -72,9 +72,9 @@ extern pcb_board_t * yyPCB; extern pcb_data_t * yyData; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; extern pcb_font_t * yyFont; -extern pcb_bool yyFontReset; +extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; @@ -90,7 +90,7 @@ int yylex(); static int check_file_version (int); -static void do_measure (PLMeasure *m, pcb_coord_t i, double d, int u); +static void do_measure (PLMeasure *m, rnd_coord_t i, double d, int u); #define M(r,f,d) do_measure (&(r), f, d, 1) /* Macros for interpreting what "measure" means - integer value only, @@ -100,10 +100,10 @@ #define NU(m) new_units (m) static int integer_value (PLMeasure m); -static pcb_coord_t old_units (PLMeasure m); -static pcb_coord_t new_units (PLMeasure m); +static rnd_coord_t old_units (PLMeasure m); +static rnd_coord_t new_units (PLMeasure m); static pcb_flag_t pcb_flag_old(unsigned int flags); -static void load_meta_coord(const char *path, pcb_coord_t crd); +static void load_meta_coord(const char *path, rnd_coord_t crd); static void load_meta_float(const char *path, double val); #define YYDEBUG 1 @@ -160,7 +160,7 @@ if (!yyPCB) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) @@ -195,20 +195,20 @@ pcb_board_new_postproc(yyPCB, 0); if (layer_group_string == NULL) { if (pcb_layer_improvise(yyPCB, pcb_true) != 0) { - pcb_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - pcb_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); } else { if (pcb_layer_parse_group_string(yyPCB, layer_group_string, yyData->LayerN, old_fmt)) { - pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - pcb_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -259,7 +259,7 @@ if (!yyData || !yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) @@ -280,7 +280,7 @@ /* mark all symbols invalid */ if (!yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -469,7 +469,7 @@ { if (pcb_route_string_parse($3, &yyPCB->RouteStyle, "mil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -478,7 +478,7 @@ { if (pcb_route_string_parse(($3 == NULL ? "" : $3), &yyPCB->RouteStyle, "cmil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -565,7 +565,7 @@ /* old format: x, y, thickness, name, flags */ : T_VIA '(' measure measure measure STRING INTEGER ')' { - pcb_coord_t hole = (OU($5) * PCB_DEFAULT_DRILLINGHOLE); + rnd_coord_t hole = (OU($5) * PCB_DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ if (OU($5) - hole < PCB_MIN_PINORVIACOPPER && @@ -770,7 +770,7 @@ polygonholes ')' { pcb_cardinal_t contour, contour_start, contour_end; - pcb_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -785,7 +785,7 @@ if (bad_contour_found) { - pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -1083,7 +1083,7 @@ */ : T_PIN '(' measure measure measure STRING INTEGER ')' { - pcb_coord_t hole = OU ($5) * PCB_DEFAULT_DRILLINGHOLE; + rnd_coord_t hole = OU ($5) * PCB_DEFAULT_DRILLINGHOLE; char p_number[8]; /* make sure that there's enough copper left */ @@ -1323,7 +1323,7 @@ char *old_val, *key = $3, *val = $4 ? $4 : (char *)""; old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) - pcb_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else pcb_attribute_put(attr_list, key, val); free(key); @@ -1361,7 +1361,7 @@ */ int yyerror(const char * s) { - pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" " line: %i\n" " description: '%s'\n", yyfilename, pcb_lineno, s); @@ -1377,7 +1377,7 @@ check_file_version (int ver) { if ( ver > PCB_FILE_VERSION ) { - pcb_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(PCB_MSG_ERROR, "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" @@ -1390,7 +1390,7 @@ } static void -do_measure (PLMeasure *m, pcb_coord_t i, double d, int u) +do_measure (PLMeasure *m, rnd_coord_t i, double d, int u) { m->ival = i; m->bval = pcb_round (d); @@ -1406,7 +1406,7 @@ return m.ival; } -static pcb_coord_t +static rnd_coord_t old_units (PLMeasure m) { if (m.has_units) @@ -1416,7 +1416,7 @@ return pcb_round (PCB_MIL_TO_COORD (m.ival)); } -static pcb_coord_t +static rnd_coord_t new_units (PLMeasure m) { if (m.has_units) @@ -1446,7 +1446,7 @@ } /* load a board metadata into conf_core */ -static void load_meta_coord(const char *path, pcb_coord_t crd) +static void load_meta_coord(const char *path, rnd_coord_t crd) { char tmp[128]; pcb_sprintf(tmp, "%$mm", crd);