Index: centgeo.c =================================================================== --- centgeo.c (revision 31001) +++ centgeo.c (revision 31002) @@ -273,7 +273,7 @@ void pcb_carc_offs(pcb_arc_t *arc, double offs, rnd_coord_t *dstx, rnd_coord_t *dsty) { - double ang = (arc->StartAngle + offs * arc->Delta) / PCB_RAD_TO_DEG; + double ang = (arc->StartAngle + offs * arc->Delta) / RND_RAD_TO_DEG; *dstx = arc->X + cos(ang) * arc->Width; *dsty = arc->Y - sin(ang) * arc->Height; @@ -286,7 +286,7 @@ /* won't work with elliptical arc - see also pcb_is_point_on_arc */ dy = (double)(py - arc->Y) / (double)arc->Height; dx = (double)(px - arc->X) / (double)arc->Width; - ang = (-atan2(dy, dx)) * PCB_RAD_TO_DEG + 180; + ang = (-atan2(dy, dx)) * RND_RAD_TO_DEG + 180; end = arc->StartAngle + arc->Delta; /* normalize the angle: there are multiple ways an arc can cover the same @@ -313,10 +313,10 @@ static void get_arc_ends(rnd_coord_t *box, pcb_arc_t *arc) { - box[0] = arc->X - arc->Width * cos(PCB_M180 * arc->StartAngle); - box[1] = arc->Y + arc->Height * sin(PCB_M180 * arc->StartAngle); - box[2] = arc->X - arc->Width * cos(PCB_M180 * (arc->StartAngle + arc->Delta)); - box[3] = arc->Y + arc->Height * sin(PCB_M180 * (arc->StartAngle + arc->Delta)); + box[0] = arc->X - arc->Width * cos(RND_M180 * arc->StartAngle); + box[1] = arc->Y + arc->Height * sin(RND_M180 * arc->StartAngle); + box[2] = arc->X - arc->Width * cos(RND_M180 * (arc->StartAngle + arc->Delta)); + box[3] = arc->Y + arc->Height * sin(RND_M180 * (arc->StartAngle + arc->Delta)); } /* reduce arc start angle and delta to 0..360 */ @@ -333,7 +333,7 @@ static int radius_crosses_arc(double x, double y, pcb_arc_t *arc) { - double alpha = atan2(y - arc->Y, -x + arc->X) * PCB_RAD_TO_DEG; + double alpha = atan2(y - arc->Y, -x + arc->X) * RND_RAD_TO_DEG; rnd_angle_t sa = arc->StartAngle, d = arc->Delta; normalize_angles(&sa, &d); Index: cli.c =================================================================== --- cli.c (revision 31001) +++ cli.c (revision 31002) @@ -202,7 +202,7 @@ } memcpy(tmp, s, sep-s); tmp[sep-s] = '\0'; - dst[i-1].x = pcb_get_value_ex(tmp, NULL, NULL, NULL, pcbhl_conf.editor.grid_unit->suffix, &succ); + dst[i-1].x = pcb_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); if (!succ) dst[i-1].invalid = 1; @@ -213,12 +213,12 @@ } memcpy(tmp, sep, next-sep); tmp[next-sep] = '\0'; - dst[i-1].y = pcb_get_value_ex(tmp, NULL, NULL, NULL, pcbhl_conf.editor.grid_unit->suffix, &succ); + dst[i-1].y = pcb_get_value_ex(tmp, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); if (!succ) dst[i-1].invalid = 1; break; case CLI_DIST: - dst[i-1].dist = pcb_get_value_ex(s, NULL, NULL, NULL, pcbhl_conf.editor.grid_unit->suffix, &succ); + dst[i-1].dist = pcb_get_value_ex(s, NULL, NULL, NULL, rnd_conf.editor.grid_unit->suffix, &succ); dst[i-1].invalid = !succ; dst[i-1].end = next - line; break; @@ -413,8 +413,8 @@ goto over; apply:; if (have_angle && have_dist) { - x += cos(angle / PCB_RAD_TO_DEG) * dist; - y += sin(angle / PCB_RAD_TO_DEG) * dist; + x += cos(angle / RND_RAD_TO_DEG) * dist; + y += sin(angle / RND_RAD_TO_DEG) * dist; have_angle = have_dist = 0; moved = 1; } @@ -431,7 +431,7 @@ c[2] = rnd_round(x); c[3] = rnd_round(y); } - angle = atan2(y - ly, x - lx) * PCB_RAD_TO_DEG; + angle = atan2(y - ly, x - lx) * RND_RAD_TO_DEG; lx = x; ly = y; len++; Index: cli_line.c =================================================================== --- cli_line.c (revision 31001) +++ cli_line.c (revision 31002) @@ -166,7 +166,7 @@ return 0; } replace=1; - pcb_snprintf(buff, sizeof(buff), "<%f", atan2(pcb_crosshair.Y - oy, pcb_crosshair.X - ox) * PCB_RAD_TO_DEG); + pcb_snprintf(buff, sizeof(buff), "<%f", atan2(pcb_crosshair.Y - oy, pcb_crosshair.X - ox) * RND_RAD_TO_DEG); break; case CLI_DIST: res = get_rel_coord(argc, argv, argn, &ox, &oy); Index: constraint.c =================================================================== --- constraint.c (revision 31001) +++ constraint.c (revision 31002) @@ -46,7 +46,7 @@ double diff, ang, best_diff, target_ang; int n, best; - ang = atan2(y2 - y1, x2 - x1) * PCB_RAD_TO_DEG; + ang = atan2(y2 - y1, x2 - x1) * RND_RAD_TO_DEG; if (anglen > 0) { /* find the best matching constraint angle */ @@ -73,7 +73,7 @@ if (angle_mod > 0) target_ang = floor(target_ang / angle_mod) * angle_mod; - target_ang /= PCB_RAD_TO_DEG; + target_ang /= RND_RAD_TO_DEG; *out_ang = target_ang; return 0; } Index: ddraft.c =================================================================== --- ddraft.c (revision 31001) +++ ddraft.c (revision 31002) @@ -365,7 +365,7 @@ } cons.line_angle_len = 2; - cons.line_angle[0] = atan2(dy, dx) * PCB_RAD_TO_DEG; + cons.line_angle[0] = atan2(dy, dx) * RND_RAD_TO_DEG; if (actname[1] == 'e') /* perp */ cons.line_angle[0] += 90; cons.line_angle[1] = fmod(cons.line_angle[0]+180, 360); @@ -433,8 +433,8 @@ base = atan2(arc->Y - line->point1.Y, arc->X - line->point1.X); cons.line_angle_len = 2; - cons.line_angle[0] = (base + asin(r / d)) * PCB_RAD_TO_DEG; - cons.line_angle[1] = (base + asin(-r / d)) * PCB_RAD_TO_DEG; + cons.line_angle[0] = (base + asin(r / d)) * RND_RAD_TO_DEG; + cons.line_angle[1] = (base + asin(-r / d)) * RND_RAD_TO_DEG; cons_changed(); RND_ACT_IRES(0); @@ -521,7 +521,7 @@ { static int ddraft_tool_selected = 0; - if (pcbhl_conf.editor.mode == pcb_ddraft_tool) { + if (rnd_conf.editor.mode == pcb_ddraft_tool) { if (!ddraft_tool_selected) { ddraft_tool_selected = 1; rnd_cli_enter("ddraft", "ddraft");