Index: font.c =================================================================== --- font.c (revision 31019) +++ font.c (revision 31020) @@ -76,9 +76,9 @@ } LINE_END; - *width = PCB_MM_TO_COORD(tw); - *height = PCB_MM_TO_COORD((double)lines * (pcb_mentor_font_ymax[font_id] - pcb_mentor_font_ymin[font_id])); - *yoffs = PCB_MM_TO_COORD(pcb_mentor_font_ymin[font_id]); + *width = RND_MM_TO_COORD(tw); + *height = RND_MM_TO_COORD((double)lines * (pcb_mentor_font_ymax[font_id] - pcb_mentor_font_ymin[font_id])); + *yoffs = RND_MM_TO_COORD(pcb_mentor_font_ymin[font_id]); return bad_glyph ? FSR_INVALID_GLYPH_ID : FSR_SUCCESS; } Index: read.c =================================================================== --- read.c (revision 31019) +++ read.c (revision 31020) @@ -338,7 +338,7 @@ filled = (strcmp(tmp->argv[1], "FILLED") == 0); } else { - th = PCB_MM_TO_COORD(0.5); + th = RND_MM_TO_COORD(0.5); tmp = find_nth(pp->first_child, "WIDTH", 0); if (tmp != NULL) parse_coord(ctx, tmp->argv[1], &th); @@ -388,9 +388,9 @@ srx = -(sx - cx); sry = sy - cy; /* Since angle = 0 is towards -x, change sign to x part */ erx = -(ex - cx); ery = ey - cy; /* Since angle = 0 is towards -x, change sign to x part */ *sa = atan2(sry, srx) * RND_RAD_TO_DEG; - *sa = pcb_normalize_angle(360 + *sa); /* normalize angle between 0 and 359 */ + *sa = rnd_normalize_angle(360 + *sa); /* normalize angle between 0 and 359 */ ea = atan2(ery, erx) * RND_RAD_TO_DEG; - ea = pcb_normalize_angle(360 + ea); /* normalize angle between 0 and 359 */ + ea = rnd_normalize_angle(360 + ea); /* normalize angle between 0 and 359 */ if (*r < 0) { /* counterclockwise */ @@ -427,7 +427,7 @@ filled = (strcmp(tmp->argv[1], "FILLED") == 0); } else { - th = PCB_MM_TO_COORD(0.5); + th = RND_MM_TO_COORD(0.5); tmp = find_nth(pp->first_child, "WIDTH", 0); if (tmp != NULL) parse_coord(ctx, tmp->argv[1], &th); @@ -597,9 +597,9 @@ return; } - width = width * PCB_COORD_TO_MM(h) + thickness; - height = height * PCB_COORD_TO_MM(h) + thickness; - ymin = ymin * PCB_COORD_TO_MM(h); + width = width * RND_COORD_TO_MM(h) + thickness; + height = height * RND_COORD_TO_MM(h) + thickness; + ymin = ymin * RND_COORD_TO_MM(h); tmp = find_nth(attr->first_child, "HORZ_JUST", 0); if (tmp != NULL) { @@ -1160,10 +1160,10 @@ static const rnd_unit_t *parse_units(const char *ust) { - if (strcmp(ust, "MIL") == 0) return get_unit_struct("mil"); - if (strcmp(ust, "TH") == 0) return get_unit_struct("mil"); - if (strcmp(ust, "MM") == 0) return get_unit_struct("mm"); - if (strcmp(ust, "IN") == 0) return get_unit_struct("inch"); + if (strcmp(ust, "MIL") == 0) return rnd_get_unit_struct("mil"); + if (strcmp(ust, "TH") == 0) return rnd_get_unit_struct("mil"); + if (strcmp(ust, "MM") == 0) return rnd_get_unit_struct("mm"); + if (strcmp(ust, "IN") == 0) return rnd_get_unit_struct("inch"); return NULL; } @@ -1430,7 +1430,7 @@ } ctx.pcb = pcb; - ctx.unit = get_unit_struct("mm"); + ctx.unit = rnd_get_unit_struct("mm"); Index: read_net.c =================================================================== --- read_net.c (revision 31019) +++ read_net.c (revision 31020) @@ -32,7 +32,7 @@ { if ((lid < 0) || (lid >= PCB_MAX_LAYER)) { hkp_error(errnode, "failed to determine clearance, falling back to default value\n"); - return PCB_MIL_TO_COORD(12); + return RND_MIL_TO_COORD(12); } return ctx->nc_dflt.clearance[lid][type]; }