Index: read.c =================================================================== --- read.c (revision 31019) +++ read.c (revision 31020) @@ -445,7 +445,7 @@ Thickness = 0; Clearance = st->copper_clearance; /* start with sane default */ - Drill = PCB_MM_TO_COORD(0.300); /* start with something sane */ + Drill = RND_MM_TO_COORD(0.300); /* start with something sane */ name = rnd_strdup("unnamed"); @@ -505,7 +505,7 @@ Thickness = 0; Clearance = st->copper_clearance; /* start with sane default */ - Drill = PCB_MM_TO_COORD(0.300); /* start with something sane */ + Drill = RND_MM_TO_COORD(0.300); /* start with something sane */ if (fgetline(line, sizeof(line), FP, st->lineno) != NULL) { int argc; @@ -1095,8 +1095,8 @@ st.Filename = Filename; st.settings_dest = settings_dest; st.lineno = 0; - st.mask_clearance = st.copper_clearance = PCB_MIL_TO_COORD(10); /* sensible default values */ - st.minimum_comp_pin_drill = PCB_MIL_TO_COORD(30); /* Easytrax PCB FILE 5 uses zero in COMP pins */ + st.mask_clearance = st.copper_clearance = RND_MIL_TO_COORD(10); /* sensible default values */ + st.minimum_comp_pin_drill = RND_MIL_TO_COORD(30); /* Easytrax PCB FILE 5 uses zero in COMP pins */ st.trax_version = 4; /* assume autotrax, not easytrax */ st.ignored_keepout_element = 0; st.ignored_layer_zero_element = 0; Index: write.c =================================================================== --- write.c (revision 31019) +++ write.c (revision 31020) @@ -501,14 +501,14 @@ rnd_coord_t xPos, yPos, yPos2, yPos3; TODO("do not hardcode things like this, especially when actual data is available") - rnd_coord_t text_offset = PCB_MIL_TO_COORD(400); /* this gives good placement of refdes relative to element */ + rnd_coord_t text_offset = RND_MIL_TO_COORD(400); /* this gives good placement of refdes relative to element */ TODO("rename these variables to something more expressive") TODO("instead of hardwiring coords, just read existing dyntex coords") xPos = (box->X1 + box->X2) / 2; yPos = PCB->hidlib.size_y - (box->Y1 - text_offset); - yPos2 = yPos - PCB_MIL_TO_COORD(200); - yPos3 = yPos2 - PCB_MIL_TO_COORD(200); + yPos2 = yPos - RND_MIL_TO_COORD(200); + yPos3 = yPos2 - RND_MIL_TO_COORD(200); pcb_subc_get_side(subc, &on_bottom); @@ -591,7 +591,7 @@ } else { rnd_coord_t Thickness; - Thickness = PCB_MIL_TO_COORD(10); + Thickness = RND_MIL_TO_COORD(10); autotrax_cpoly_hatch_lines(ctx, polygon, PCB_CPOLY_HATCH_HORIZONTAL | PCB_CPOLY_HATCH_VERTICAL, Thickness * 3, Thickness, current_layer, dx, dy); TODO("do we really need to reimplement this, can not cpoly_hatch_lines handle it?") for(pa = pcb_poly_island_first(polygon, &poly_it); pa != NULL; pa = pcb_poly_island_next(&poly_it)) { @@ -680,7 +680,7 @@ fputs("PCB FILE 4\r\n", FP); /*autotrax header */ /* 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) { + if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > max_width_mil || RND_COORD_TO_MIL(PCB->hidlib.size_y) > max_height_mil) { rnd_message(RND_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); return -1; }