Index: cli.c =================================================================== --- cli.c (revision 30954) +++ cli.c (revision 30955) @@ -355,13 +355,13 @@ break; case CLI_PERP: - rnd_message(PCB_MSG_ERROR, "perp not yet implemented\n"); + rnd_message(RND_MSG_ERROR, "perp not yet implemented\n"); return -1; case CLI_PARAL: - rnd_message(PCB_MSG_ERROR, "paral not yet implemented\n"); + rnd_message(RND_MSG_ERROR, "paral not yet implemented\n"); return -1; case CLI_TANGENT: - rnd_message(PCB_MSG_ERROR, "tangent not yet implemented\n"); + rnd_message(RND_MSG_ERROR, "tangent not yet implemented\n"); return -1; case CLI_CENTER: @@ -450,20 +450,20 @@ { int n; for(n = 0; n < argc; n++) { - pcb_trace(" [%d] %s/%d {%d..%d}", n, find_rev_type(argv[n].type), argv[n].type, argv[n].begin, argv[n].end); + rnd_trace(" [%d] %s/%d {%d..%d}", n, find_rev_type(argv[n].type), argv[n].type, argv[n].begin, argv[n].end); if (!argv[n].invalid) { switch(argv[n].type) { - case CLI_COORD: pcb_trace(": %$mm,%$mm", argv[n].x, argv[n].y); break; - case CLI_ANGLE: pcb_trace(": %f", argv[n].angle); break; - case CLI_DIST: pcb_trace(": %$mm", argv[n].dist); break; - case CLI_OFFS: pcb_trace(": %f", argv[n].offs); break; - case_object: pcb_trace(": %ld", (long)argv[n].id); break; + case CLI_COORD: rnd_trace(": %$mm,%$mm", argv[n].x, argv[n].y); break; + case CLI_ANGLE: rnd_trace(": %f", argv[n].angle); break; + case CLI_DIST: rnd_trace(": %$mm", argv[n].dist); break; + case CLI_OFFS: rnd_trace(": %f", argv[n].offs); break; + case_object: rnd_trace(": %ld", (long)argv[n].id); break; default:; } - pcb_trace("\n"); + rnd_trace("\n"); } else - pcb_trace(": INVALID\n"); + rnd_trace(": INVALID\n"); } } @@ -550,7 +550,7 @@ opp = find_op(op, oplen); if (opp == NULL) { if (strcmp(cmd, "/edit") != 0) - rnd_message(PCB_MSG_ERROR, "ddraft: unknown operator '%s'\n", op); + rnd_message(RND_MSG_ERROR, "ddraft: unknown operator '%s'\n", op); RND_ACT_IRES(-1); goto ret0; } Index: cli_line.c =================================================================== --- cli_line.c (revision 30954) +++ cli_line.c (revision 30955) @@ -5,18 +5,18 @@ if (argv[n].type == CLI_FROM) n++; else if (argv[n].type == CLI_TO) { - rnd_message(PCB_MSG_ERROR, "Incremental line drawing is not yet supported\n"); + rnd_message(RND_MSG_ERROR, "Incremental line drawing is not yet supported\n"); return -1; } n = cli_apply_coord(argv, n, argc, &box->X1, &box->Y1, annot); if (n < 0) { if (verbose) - rnd_message(PCB_MSG_ERROR, "Invalid 'from' coord\n"); + rnd_message(RND_MSG_ERROR, "Invalid 'from' coord\n"); return -1; } if (argv[n].type != CLI_TO) { if (verbose) - rnd_message(PCB_MSG_ERROR, "Missing 'to'\n"); + rnd_message(RND_MSG_ERROR, "Missing 'to'\n"); return -1; } n++; @@ -25,12 +25,12 @@ n = cli_apply_coord(argv, n, argc, &box->X2, &box->Y2, annot); if (n < 0) { if (verbose) - rnd_message(PCB_MSG_ERROR, "Invalid 'to' coord\n"); + rnd_message(RND_MSG_ERROR, "Invalid 'to' coord\n"); return -1; } if (n != argc) { if (verbose) - rnd_message(PCB_MSG_ERROR, "Excess tokens after the to coord\n"); + rnd_message(RND_MSG_ERROR, "Excess tokens after the to coord\n"); return -1; } return 0; @@ -41,12 +41,12 @@ int res; rnd_box_t box; - pcb_trace("line e: '%s'\n", line); + rnd_trace("line e: '%s'\n", line); memset(&box, 0, sizeof(box)); res = line_parse(line, argc, argv, &box, 1, 0); if (res == 0) { - pcb_trace("line_exec: %mm;%mm -> %mm;%mm\n", box.X1, box.Y1, box.X2, box.Y2); + rnd_trace("line_exec: %mm;%mm -> %mm;%mm\n", box.X1, box.Y1, box.X2, box.Y2); pcb_line_new(PCB_CURRLAYER(PCB), box.X1, box.Y1, box.X2, box.Y2, conf_core.design.line_thickness, 2 * conf_core.design.clearance, pcb_flag_make(conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0)); @@ -65,7 +65,7 @@ if (pcb_tool_next_id != pcb_ddraft_tool) pcb_tool_select_by_id(&PCB->hidlib, pcb_ddraft_tool); - pcb_trace("line e: '%s':%d\n", line, cursor); + rnd_trace("line e: '%s':%d\n", line, cursor); memset(&box, 0, sizeof(box)); res = line_parse(line, argc, argv, &box, 0, 1); if (res == 0) { @@ -109,7 +109,7 @@ rnd_coord_t ox, oy; char buff[CLI_MAX_INS_LEN]; - pcb_trace("line c: '%s':%d (argn=%d)\n", line, cursor, argn); + rnd_trace("line c: '%s':%d (argn=%d)\n", line, cursor, argn); cli_print_args(argc, argv); if (argn < 0) { @@ -141,7 +141,7 @@ case CLI_ABSOLUTE: case CLI_FROM: case CLI_TO: - pcb_trace("abs"); + rnd_trace("abs"); pcb_snprintf(buff, sizeof(buff), "%.08$$mm,%.08$$mm", pcb_crosshair.X, pcb_crosshair.Y); goto maybe_replace_after; break; @@ -148,10 +148,10 @@ case CLI_RELATIVE: res = get_rel_coord(argc, argv, argn, &ox, &oy); if (res < 0) { - rnd_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(RND_MSG_ERROR, "Failed to interpret coords already entered\n"); return 0; } - pcb_trace("rel from %$mm,%$mm", ox, oy); + rnd_trace("rel from %$mm,%$mm", ox, oy); pcb_snprintf(buff, sizeof(buff), "%.08$$mm,%.08$$mm", pcb_crosshair.X - ox, pcb_crosshair.Y - oy); maybe_replace_after:; if ((by+1 < argc) && (argv[by+1].type == CLI_COORD)) { @@ -162,7 +162,7 @@ case CLI_ANGLE: res = get_rel_coord(argc, argv, argn, &ox, &oy); if (res < 0) { - rnd_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(RND_MSG_ERROR, "Failed to interpret coords already entered\n"); return 0; } replace=1; @@ -171,7 +171,7 @@ case CLI_DIST: res = get_rel_coord(argc, argv, argn, &ox, &oy); if (res < 0) { - rnd_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(RND_MSG_ERROR, "Failed to interpret coords already entered\n"); return 0; } replace=1; @@ -193,22 +193,22 @@ } if (*buff == '\0') { - pcb_trace("nope...\n"); + rnd_trace("nope...\n"); return 0; } if (replace) { - pcb_trace(" replace %d: '%s'\n", argn, buff); + rnd_trace(" replace %d: '%s'\n", argn, buff); cli_str_remove(line, argv[argn].begin, argv[argn].end); cursor = cli_str_insert(line, argv[argn].begin, buff, 1); } else { - pcb_trace(" insert-after %d: '%s'\n", argn, buff); + rnd_trace(" insert-after %d: '%s'\n", argn, buff); cursor = cli_str_insert(line, argv[argn].end, buff, 1); } -pcb_trace("line='%s'\n", line); +rnd_trace("line='%s'\n", line); update:; pcb_hid_command_entry(line, &cursor); @@ -217,7 +217,7 @@ static int line_tab(char *line, int cursor, int argc, cli_node_t *argv) { - pcb_trace("line t: '%s':%d\n", line, cursor); + rnd_trace("line t: '%s':%d\n", line, cursor); return -1; } Index: ddraft.c =================================================================== --- ddraft.c (revision 30954) +++ ddraft.c (revision 30955) @@ -103,7 +103,7 @@ type = pcb_search_screen(x, y, CUT_TYPES, &ptr1, &ptr2, &ptr3); if (type == 0) { - rnd_message(PCB_MSG_ERROR, "Can't cut that object\n"); + rnd_message(RND_MSG_ERROR, "Can't cut that object\n"); continue; } res += pcb_trim_split(edges, NULL, (pcb_any_obj_t *)ptr2, REMO_INVALID, x, y, trim); @@ -111,7 +111,7 @@ } break; default: - rnd_message(PCB_MSG_ERROR, "Invalid second argument\n"); + rnd_message(RND_MSG_ERROR, "Invalid second argument\n"); return -1; } @@ -135,7 +135,7 @@ vtp0_init(&edges); if ((kwobj == kwcut) && (kwobj != F_Object)) { - rnd_message(PCB_MSG_ERROR, "Both cutting edge and objects to cut can't be '%s'\n", kwcut == F_Selected ? "selected" : "found"); + rnd_message(RND_MSG_ERROR, "Both cutting edge and objects to cut can't be '%s'\n", kwcut == F_Selected ? "selected" : "found"); goto err; } @@ -144,7 +144,7 @@ rnd_hid_get_coords("Select cutting edge object", &x, &y, 0); type = pcb_search_screen(x, y, EDGE_TYPES, &ptr1, &ptr2, &ptr3); if (type == 0) { - rnd_message(PCB_MSG_ERROR, "Invalid cutting edge object\n"); + rnd_message(RND_MSG_ERROR, "Invalid cutting edge object\n"); goto err; } vtp0_append(&edges, ptr2); @@ -156,12 +156,12 @@ list_by_flag(PCB->Data, &edges, EDGE_TYPES, PCB_FLAG_FOUND); break; default: - rnd_message(PCB_MSG_ERROR, "Invalid first argument\n"); + rnd_message(RND_MSG_ERROR, "Invalid first argument\n"); goto err; } if (vtp0_len(&edges) < 1) { - rnd_message(PCB_MSG_ERROR, "No cutting edge found\n"); + rnd_message(RND_MSG_ERROR, "No cutting edge found\n"); goto err; } @@ -253,7 +253,7 @@ do { \ int n; \ if (argc-2 >= sizeof(arr) / sizeof(arr[0])) { \ - rnd_message(PCB_MSG_ERROR, "constraint: Too many " msg "\n"); \ + rnd_message(RND_MSG_ERROR, "constraint: Too many " msg "\n"); \ RND_ACT_IRES(-1); \ return 0; \ } \ @@ -320,7 +320,7 @@ cons_changed(); break; case ddraft_fields_SPHASH_INVALID: - rnd_message(PCB_MSG_ERROR, "constraint: invalid field '%s'\n", stype); + rnd_message(RND_MSG_ERROR, "constraint: invalid field '%s'\n", stype); RND_ACT_IRES(-1); return 0; break; @@ -350,7 +350,7 @@ } if (type != PCB_OBJ_LINE) { - rnd_message(PCB_MSG_ERROR, "%s: target object must be a line\n", actname); + rnd_message(RND_MSG_ERROR, "%s: target object must be a line\n", actname); RND_ACT_IRES(-1); return 0; } @@ -359,7 +359,7 @@ dx = line->Point2.X - line->Point1.X; dy = line->Point2.Y - line->Point1.Y; if ((dx == 0.0) && (dy == 0.0)) { - rnd_message(PCB_MSG_ERROR, "%s: target line must be longer than 0\n", actname); + rnd_message(RND_MSG_ERROR, "%s: target line must be longer than 0\n", actname); RND_ACT_IRES(-1); return 0; } @@ -390,7 +390,7 @@ if (((pcb_crosshair.AttachedLine.State != PCB_CH_STATE_SECOND) && (pcb_crosshair.AttachedLine.State != PCB_CH_STATE_THIRD)) || (pcb_crosshair.Route.size < 1)) { err_nonline:; - rnd_message(PCB_MSG_ERROR, "tang: must be in line drawing mode with the first point already set\n"); + rnd_message(RND_MSG_ERROR, "tang: must be in line drawing mode with the first point already set\n"); RND_ACT_IRES(-1); return 0; } @@ -409,7 +409,7 @@ } if (type != PCB_OBJ_ARC) { - rnd_message(PCB_MSG_ERROR, "tang: target object must be an arc\n"); + rnd_message(RND_MSG_ERROR, "tang: target object must be an arc\n"); RND_ACT_IRES(-1); return 0; } @@ -416,7 +416,7 @@ arc = (pcb_arc_t *)ptr2; if (fabs((double)(arc->Height - arc->Width)) > 100) { - rnd_message(PCB_MSG_ERROR, "tang: elliptical arcs are not supported (%$mm != %$mm)\n", arc->Height, arc->Width); + rnd_message(RND_MSG_ERROR, "tang: elliptical arcs are not supported (%$mm != %$mm)\n", arc->Height, arc->Width); RND_ACT_IRES(-1); return 0; } @@ -425,7 +425,7 @@ r = arc->Width; if (d <= r) { - rnd_message(PCB_MSG_ERROR, "tang: line must start outside of the circle\n"); + rnd_message(RND_MSG_ERROR, "tang: line must start outside of the circle\n"); RND_ACT_IRES(-1); return 0; }