Index: trunk/doc/developer/plugin/template_pup/ext_foo.c =================================================================== --- trunk/doc/developer/plugin/template_pup/ext_foo.c (revision 30954) +++ trunk/doc/developer/plugin/template_pup/ext_foo.c (revision 30955) @@ -36,7 +36,7 @@ static const char pcb_acth_ExtFoo[] = "Help text: short description of what the action does."; static fgw_error_t pcb_act_ExtFoo(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "PLEASE CONSIDER DEVELOPING A CORE PLUGIN INSTEAD!\n"); + rnd_message(RND_MSG_ERROR, "PLEASE CONSIDER DEVELOPING A CORE PLUGIN INSTEAD!\n"); RND_ACT_IRES(0); return 0; } Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 30954) +++ trunk/src/board.c (revision 30955) @@ -130,9 +130,9 @@ fclose(f); dpcb = pcb_load_pcb(efn, NULL, pcb_false, 1 | 0x10); if (dpcb == 0) - rnd_message(PCB_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); + rnd_message(RND_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); else - rnd_message(PCB_MSG_ERROR, "Couldn't find default.pcb and failed to load the embedded fallback\n"); + rnd_message(RND_MSG_ERROR, "Couldn't find default.pcb and failed to load the embedded fallback\n"); pcb_remove(NULL, efn); free(efn); } @@ -432,8 +432,8 @@ if (grp->ltype & PCB_LYT_SUBSTRATE) { if (flags & PCB_BRDTHICK_PRINT_ERROR) { if (namespace != NULL) - rnd_message(PCB_MSG_ERROR, "%s: ", namespace); - rnd_message(PCB_MSG_ERROR, "can not determine substrate thickness on layer group %ld - total board thickness is probably wrong\n", (long)gid); + rnd_message(RND_MSG_ERROR, "%s: ", namespace); + rnd_message(RND_MSG_ERROR, "can not determine substrate thickness on layer group %ld - total board thickness is probably wrong\n", (long)gid); } if (flags & PCB_BRDTHICK_TOLERANT) continue; Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 30954) +++ trunk/src/brave.c (revision 30955) @@ -264,13 +264,13 @@ RND_PCB_ACT_CONVARG(2, FGW_STR, Brave, op = argv[2].val.str); d = find_by_name(name); if (d == NULL) { - rnd_message(PCB_MSG_ERROR, "Unknown brave setting: %s\n", name); + rnd_message(RND_MSG_ERROR, "Unknown brave setting: %s\n", name); RND_ACT_IRES(-1); return 0; } brave_set(d->bit, (rnd_strcasecmp(op, "on") == 0)); - rnd_message(PCB_MSG_INFO, "Brave setting: %s in %s\n", name, (pcb_brave & d->bit) ? "on" : "off"); + rnd_message(RND_MSG_INFO, "Brave setting: %s in %s\n", name, (pcb_brave & d->bit) ? "on" : "off"); RND_ACT_IRES(0); return 0; Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 30954) +++ trunk/src/buffer.c (revision 30955) @@ -262,12 +262,12 @@ len = pcb_subclist_length(&PCB_PASTEBUFFER->Data->subc); if (len == 0) { - rnd_message(PCB_MSG_ERROR, "Footprint %s contains no subcircuits", name); + rnd_message(RND_MSG_ERROR, "Footprint %s contains no subcircuits", name); RND_ACT_IRES(1); return 0; } if (len > 1) { - rnd_message(PCB_MSG_ERROR, "Footprint %s contains multiple subcircuits", name); + rnd_message(RND_MSG_ERROR, "Footprint %s contains multiple subcircuits", name); RND_ACT_IRES(1); return 0; } @@ -473,7 +473,7 @@ } if ((ang < -360000) || (ang > +360000)) { - rnd_message(PCB_MSG_ERROR, "Angle too large\n"); + rnd_message(RND_MSG_ERROR, "Angle too large\n"); RND_ACT_IRES(-1); return 0; } @@ -630,7 +630,7 @@ for (i = 0; i < num_layers; i++) { pcb_layer_t *layer = Buffer->Data->Layer + i; if (textlist_length(&layer->Text)) { - rnd_message(PCB_MSG_ERROR, "You can't mirror a buffer that has text!\n"); + rnd_message(RND_MSG_ERROR, "You can't mirror a buffer that has text!\n"); return; } } @@ -794,7 +794,7 @@ const char *src_name = sourcelayer->name; if ((src_name == NULL) || (*src_name == '\0')) src_name = ""; - rnd_message(PCB_MSG_WARNING, "Couldn't resolve buffer layer #%d (%s) on the current board\n", i, src_name); + rnd_message(RND_MSG_WARNING, "Couldn't resolve buffer layer #%d (%s) on the current board\n", i, src_name); } continue; } @@ -860,7 +860,7 @@ { pcb_subc_t *nsubc; if (pcb->is_footprint) { - rnd_message(PCB_MSG_WARNING, "Can not paste subcircuit in the footprint edit mode\n"); + rnd_message(RND_MSG_WARNING, "Can not paste subcircuit in the footprint edit mode\n"); break; } nsubc = pcb_subcop_copy(&ctx, subc); @@ -1001,7 +1001,7 @@ if (sp < sizeof(stack) / sizeof(stack[0])) stack[sp++] = conf_core.editor.buffer_number; else - rnd_message(PCB_MSG_ERROR, "Paste buffer stack overflow on push.\n"); + rnd_message(RND_MSG_ERROR, "Paste buffer stack overflow on push.\n"); break; case F_Pop: @@ -1008,7 +1008,7 @@ if (sp > 0) pcb_buffer_set_number(stack[--sp]); else - rnd_message(PCB_MSG_ERROR, "Paste buffer stack underflow on pop.\n"); + rnd_message(RND_MSG_ERROR, "Paste buffer stack underflow on pop.\n"); break; /* copies objects to paste buffer */ @@ -1015,7 +1015,7 @@ case F_AddSelected: pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, 0, 0, pcb_false, pcb_false); if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { - rnd_message(PCB_MSG_WARNING, "Nothing buffer-movable is selected, nothing copied to the paste buffer\n"); + rnd_message(RND_MSG_WARNING, "Nothing buffer-movable is selected, nothing copied to the paste buffer\n"); goto error; } break; @@ -1024,7 +1024,7 @@ case F_MoveSelected: pcb_buffer_move_selected(PCB, PCB_PASTEBUFFER, 0, 0, pcb_false, pcb_false); if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { - rnd_message(PCB_MSG_WARNING, "Nothing buffer-movable is selected, nothing moved to the paste buffer\n"); + rnd_message(RND_MSG_WARNING, "Nothing buffer-movable is selected, nothing moved to the paste buffer\n"); goto error; } break; @@ -1038,7 +1038,7 @@ /* break up subcircuit for editing */ case F_Restore: if (!pcb_subc_smash_buffer(PCB_PASTEBUFFER)) - rnd_message(PCB_MSG_ERROR, "Error breaking up subcircuits - only one can be broken up at a time\n"); + rnd_message(RND_MSG_ERROR, "Error breaking up subcircuits - only one can be broken up at a time\n"); break; /* Mirror buffer */ @@ -1108,7 +1108,7 @@ name = sbufnum; if (pcb_load_buffer(RND_ACT_HIDLIB, PCB_PASTEBUFFER, name, NULL) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to load buffer from %s\n", name); + rnd_message(RND_MSG_ERROR, "Failed to load buffer from %s\n", name); RND_ACT_IRES(-1); } else @@ -1165,13 +1165,13 @@ char *end; number = strtol(sbufnum, &end, 10); if (*end != 0) { - rnd_message(PCB_MSG_ERROR, "invalid buffer number '%s': should be an integer\n", sbufnum); + rnd_message(RND_MSG_ERROR, "invalid buffer number '%s': should be an integer\n", sbufnum); pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); return FGW_ERR_ARG_CONV; } number--; if ((number < 0) || (number >= PCB_MAX_BUFFER)) { - rnd_message(PCB_MSG_ERROR, "invalid buffer number '%d': out of range 1..%d\n", number+1, PCB_MAX_BUFFER); + rnd_message(RND_MSG_ERROR, "invalid buffer number '%d': out of range 1..%d\n", number+1, PCB_MAX_BUFFER); pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); return FGW_ERR_ARG_CONV; } Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 30954) +++ trunk/src/build_run.c (revision 30955) @@ -252,6 +252,6 @@ s = "unknown"; break; } - rnd_message(PCB_MSG_ERROR, "aborted by %s signal\n", s); + rnd_message(RND_MSG_ERROR, "aborted by %s signal\n", s); exit(1); } Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 30954) +++ trunk/src/change_act.c (revision 30955) @@ -184,7 +184,7 @@ set_selected = value ? pcb_clr_selected_join : pcb_set_selected_join; } else { - rnd_message(PCB_MSG_ERROR, "%s(): Flag \"%s\" is not valid\n", cmd_name, flag_name); + rnd_message(RND_MSG_ERROR, "%s(): Flag \"%s\" is not valid\n", cmd_name, flag_name); return; } @@ -200,7 +200,7 @@ if ((type = pcb_search_screen(x, y, PCB_CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); } if (set_object(type, ptr1, ptr2, ptr3)) pcb_board_set_changed_flag(pcb_true); @@ -226,7 +226,7 @@ case F_SelectedNames: case F_SelectedElements: - rnd_message(PCB_MSG_ERROR, "Feature not supported\n"); + rnd_message(RND_MSG_ERROR, "Feature not supported\n"); break; case F_Selected: @@ -308,7 +308,7 @@ if (type != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); } if (tostyle) { if (pcb_chg_obj_1st_size(type, ptr1, ptr2, ptr3, value, absolute)) @@ -344,7 +344,7 @@ case F_SelectedNames: case F_SelectedElements: - rnd_message(PCB_MSG_ERROR, "Feature not supported.\n"); + rnd_message(RND_MSG_ERROR, "Feature not supported.\n"); break; case F_Selected: @@ -821,7 +821,7 @@ else if (rnd_strcasecmp(prim, "delta") == 0) which = 1; else if (rnd_strcasecmp(prim, "both") == 0) which = 2; else { - rnd_message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); + rnd_message(RND_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); return -1; } @@ -836,7 +836,7 @@ while(isspace(*delta)) delta++; value = strtod(delta, &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid numeric (in angle)\n"); + rnd_message(RND_MSG_ERROR, "Invalid numeric (in angle)\n"); return -1; } absolute = ((*delta != '-') && (*delta != '+')); @@ -848,7 +848,7 @@ if (type != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); else { if (pcb_chg_obj_angle(type, ptr1, ptr2, ptr3, which, value, absolute)) pcb_board_set_changed_flag(pcb_true); @@ -899,7 +899,7 @@ else if ((rnd_strcasecmp(prim, "height") == 0) || (rnd_strcasecmp(prim, "y") == 0)) which = 1; else if (rnd_strcasecmp(prim, "both") == 0) which = 2; else { - rnd_message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); + rnd_message(RND_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); return -1; } @@ -917,7 +917,7 @@ if (type != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); else { if (pcb_chg_obj_radius(type, ptr1, ptr2, ptr3, which, value, absolute)) pcb_board_set_changed_flag(pcb_true); Index: trunk/src/conf_core.c =================================================================== --- trunk/src/conf_core.c (revision 30954) +++ trunk/src/conf_core.c (revision 30955) @@ -46,11 +46,11 @@ rnd_conf_native_t *nlegacy = rnd_conf_get_field(legacy_path); rnd_conf_native_t *ndst = rnd_conf_get_field(dst_path); if (nlegacy == NULL) { - rnd_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid legacy path '%s' for %s\n", legacy_path, dst_path); + rnd_message(RND_MSG_ERROR, "pcb_conf_legacy: invalid legacy path '%s' for %s\n", legacy_path, dst_path); return; } if (ndst == NULL) { - rnd_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid new path %s\n", dst_path); + rnd_message(RND_MSG_ERROR, "pcb_conf_legacy: invalid new path %s\n", dst_path); return; } pcb_conf_legacy_(ndst, nlegacy); Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30954) +++ trunk/src/data.c (revision 30955) @@ -722,7 +722,7 @@ data->clip_inhibit++; if (old > data->clip_inhibit) { - rnd_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); + rnd_message(RND_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); abort(); } } @@ -730,7 +730,7 @@ void pcb_data_clip_inhibit_dec(pcb_data_t *data, rnd_bool enable_progbar) { if (data->clip_inhibit == 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); + rnd_message(RND_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); assert(!"clip_inhibit underflow"); return; } Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 30954) +++ trunk/src/draw.c (revision 30955) @@ -990,7 +990,7 @@ pcb_gfx_invalidate_erase((pcb_gfx_t *)ptr); break; default: - rnd_message(PCB_MSG_ERROR, "hace: Internal ERROR, trying to erase an unknown type\n"); + rnd_message(RND_MSG_ERROR, "hace: Internal ERROR, trying to erase an unknown type\n"); } } Index: trunk/src/drc.c =================================================================== --- trunk/src/drc.c (revision 30954) +++ trunk/src/drc.c (revision 30955) @@ -108,15 +108,15 @@ else if (rnd_strcasecmp(dlg_type, "log") == 0) { pcb_view_t *v; for(v = pcb_view_list_first(lst); v != NULL; v = pcb_view_list_next(v)) { - rnd_message(PCB_MSG_INFO, "%ld: %s: %s\n", v->uid, v->type, v->title); + rnd_message(RND_MSG_INFO, "%ld: %s: %s\n", v->uid, v->type, v->title); if (v->have_bbox) - rnd_message(PCB_MSG_INFO, "%m+within %$m4\n", pcbhl_conf.editor.grid_unit->allow, v->bbox.X1, v->bbox.Y1, v->bbox.X2, v->bbox.Y2); + rnd_message(RND_MSG_INFO, "%m+within %$m4\n", pcbhl_conf.editor.grid_unit->allow, v->bbox.X1, v->bbox.Y1, v->bbox.X2, v->bbox.Y2); if (v->have_xy) - rnd_message(PCB_MSG_INFO, "%m+at %$m2\n", pcbhl_conf.editor.grid_unit->allow, v->x, v->y); + rnd_message(RND_MSG_INFO, "%m+at %$m2\n", pcbhl_conf.editor.grid_unit->allow, v->x, v->y); pcb_printf("%m+required value %$mS\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.required_value); if (v->data.drc.have_measured) - rnd_message(PCB_MSG_INFO, "%m+measured value %$mS\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.measured_value); - rnd_message(PCB_MSG_INFO, "%s\n\n", v->description); + rnd_message(RND_MSG_INFO, "%m+measured value %$mS\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.measured_value); + rnd_message(RND_MSG_INFO, "%s\n\n", v->description); } } if (rnd_strcasecmp(dlg_type, "dump") == 0) { Index: trunk/src/extobj_act.c =================================================================== --- trunk/src/extobj_act.c (revision 30954) +++ trunk/src/extobj_act.c (revision 30955) @@ -86,7 +86,7 @@ if (strcmp(eoname, "@gui") != 0) { eo = pcb_extobj_lookup(eoname); if (eo == NULL) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: extended object '%s' is not available\n", eoname); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: extended object '%s' is not available\n", eoname); RND_ACT_IRES(-1); return 0; } @@ -115,13 +115,13 @@ rnd_hid_get_coords("Click on object to convert", &x, &y, 0); obj = NULL; if (pcb_search_screen(x, y, PCB_OBJ_CLASS_REAL, &p1, (void **)&obj, &p3) == 0) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); RND_ACT_IRES(-1); return 0; } } if ((obj == NULL) || ((obj->type & PCB_OBJ_CLASS_REAL) == 0)) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found\n"); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: object not found\n"); RND_ACT_IRES(-1); return 0; } @@ -141,7 +141,7 @@ } if (sc == NULL) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: failed to create the extended object\n"); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: failed to create the extended object\n"); RND_ACT_IRES(-1); return 0; } @@ -176,13 +176,13 @@ rnd_hid_get_coords("Click on extended object to edit", &x, &y, 0); obj = NULL; if (pcb_search_screen(x, y, PCB_OBJ_SUBC, &p1, (void **)&obj, &p3) == 0) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); RND_ACT_IRES(-1); return 0; } } if ((obj == NULL) || ((obj->type & PCB_OBJ_CLASS_REAL) == 0)) { - rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found\n"); + rnd_message(RND_MSG_ERROR, "ExtobjConvFrom: object not found\n"); RND_ACT_IRES(-1); return 0; } @@ -193,7 +193,7 @@ } if ((obj == NULL) || (obj->type != PCB_OBJ_SUBC) || (obj->extobj == NULL)) { - rnd_message(PCB_MSG_ERROR, "Object is not an extended object"); + rnd_message(RND_MSG_ERROR, "Object is not an extended object"); RND_ACT_IRES(1); return 0; } @@ -200,7 +200,7 @@ eo = pcb_extobj_get(obj); if (eo == NULL) { - rnd_message(PCB_MSG_ERROR, "Extended object '%s' is not available", obj->extobj); + rnd_message(RND_MSG_ERROR, "Extended object '%s' is not available", obj->extobj); RND_ACT_IRES(1); return 0; } @@ -208,7 +208,7 @@ if (eo->gui_propedit != NULL) eo->gui_propedit(obj); else - rnd_message(PCB_MSG_ERROR, "Extended object '%s' does not implement GUI property editor", obj->extobj); + rnd_message(RND_MSG_ERROR, "Extended object '%s' does not implement GUI property editor", obj->extobj); RND_ACT_IRES(0); return 0; Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 30954) +++ trunk/src/extobj_helper.h (revision 30955) @@ -158,7 +158,7 @@ pcb = data->parent.board; pcb_uchg_attr(pcb, (pcb_any_obj_t *)subc, (char *)attr->user_data, newval); - pcb_trace("chg: %s\n", (char *)attr->user_data); + rnd_trace("chg: %s\n", (char *)attr->user_data); pcb_gui->invalidate_all(pcb_gui); } Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 30954) +++ trunk/src/file_act.c (revision 30955) @@ -108,7 +108,7 @@ if (!pcb_import_netlist(RND_ACT_HIDLIB, PCB->Netlistname)) pcb_netlist_changed(1); else - rnd_message(PCB_MSG_ERROR, "None of the netlist import plugins could handle that file (unknown or broken file format?)\n"); + rnd_message(RND_MSG_ERROR, "None of the netlist import plugins could handle that file (unknown or broken file format?)\n"); break; case F_Revert: @@ -117,7 +117,7 @@ break; default: - rnd_message(PCB_MSG_ERROR, "LoadFrom(): invalid command (first arg)\n"); + rnd_message(RND_MSG_ERROR, "LoadFrom(): invalid command (first arg)\n"); RND_ACT_IRES(1); return 0; } @@ -203,12 +203,12 @@ if (*target != '\0') { bn = strtol(target, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Expected buffer number, got '%s'\n", target); + rnd_message(RND_MSG_ERROR, "Expected buffer number, got '%s'\n", target); RND_ACT_IRES(-1); } bn--; if ((bn < 0) || (bn >= PCB_MAX_BUFFER)) { - rnd_message(PCB_MSG_ERROR, "Buffer number out of range\n"); + rnd_message(RND_MSG_ERROR, "Buffer number out of range\n"); RND_ACT_IRES(-1); } } @@ -251,7 +251,7 @@ switch(op) { case F_Layout: if (argc != 2) { - rnd_message(PCB_MSG_ERROR, "SaveTo(Layout) doesn't take file name or format - did you mean SaveTo(LayoutAs)?\n"); + rnd_message(RND_MSG_ERROR, "SaveTo(Layout) doesn't take file name or format - did you mean SaveTo(LayoutAs)?\n"); return FGW_ERR_ARGC; } if (pcb_save_pcb(RND_ACT_HIDLIB->filename, NULL) == 0) @@ -271,11 +271,11 @@ case F_PasteBuffer: if (pcb_subclist_length(&PCB_PASTEBUFFER->Data->subc) == 0) { - rnd_message(PCB_MSG_ERROR, "Can not save subcircuit: there is no subcircuit in the paste buffer.\n"); + rnd_message(RND_MSG_ERROR, "Can not save subcircuit: there is no subcircuit in the paste buffer.\n"); RND_ACT_IRES(-1); } else if (pcb_subclist_length(&PCB_PASTEBUFFER->Data->subc) > 1) { - rnd_message(PCB_MSG_ERROR, "Can not save subcircuit: there are more than one subcircuits in the paste buffer.\nDid you mean saving a library instead?\n"); + rnd_message(RND_MSG_ERROR, "Can not save subcircuit: there are more than one subcircuits in the paste buffer.\nDid you mean saving a library instead?\n"); RND_ACT_IRES(-1); } else @@ -284,14 +284,14 @@ /* shorthand kept only for compatibility reasons - do not use */ case F_AllConnections: - rnd_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(RND_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); return rnd_actionva(RND_ACT_HIDLIB, "ExportOldConn", "AllConnections", name, NULL); case F_AllUnusedPins: - rnd_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(RND_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); return rnd_actionva(RND_ACT_HIDLIB, "ExportOldConn", "AllUnusedPins", name, NULL); case F_ElementConnections: case F_SubcConnections: - rnd_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(RND_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); return rnd_actionva(RND_ACT_HIDLIB, "ExportOldConn", "SubcConnections", name, NULL); } @@ -322,7 +322,7 @@ if ((err != 0) || (res.val.str == NULL)) /* cancel */ return -1; if ((res.type & (FGW_STR | FGW_DYN)) != (FGW_STR | FGW_DYN)) { - rnd_message(PCB_MSG_ERROR, "Internal error: Save(DialogByPattern) did not return a dynamic string\n"); + rnd_message(RND_MSG_ERROR, "Internal error: Save(DialogByPattern) did not return a dynamic string\n"); return -1; } *name_out = res.val.str; /* will be free'd by the caller */ @@ -384,7 +384,7 @@ f = pcb_fopen(RND_ACT_HIDLIB, name, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to open %s for write\n", name); + rnd_message(RND_MSG_ERROR, "Failed to open %s for write\n", name); free(name); RND_ACT_IRES(-1); return 0; @@ -417,9 +417,9 @@ p = pcb_io_find_writer(PCB_IOT_FOOTPRINT, fmt); if (p == NULL) { if (fmt == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to find a plugin that can write subcircuits", fmt); + rnd_message(RND_MSG_ERROR, "Failed to find a plugin that can write subcircuits", fmt); else - rnd_message(PCB_MSG_ERROR, "Failed to find a plugin for format %s", fmt); + rnd_message(RND_MSG_ERROR, "Failed to find a plugin for format %s", fmt); RND_ACT_IRES(-1); return 0; } @@ -452,7 +452,7 @@ } if (ares != 0) - rnd_message(PCB_MSG_ERROR, "Some of the subcircuits failed to export\n"); + rnd_message(RND_MSG_ERROR, "Some of the subcircuits failed to export\n"); RND_ACT_IRES(ares); free(name); } @@ -488,12 +488,12 @@ int n; if (argc < 1) { - rnd_message(PCB_MSG_ERROR, "Export() needs at least one argument, the name of the export plugin\n"); + rnd_message(RND_MSG_ERROR, "Export() needs at least one argument, the name of the export plugin\n"); return 1; } if (argc > sizeof(args)/sizeof(args[0])) { - rnd_message(PCB_MSG_ERROR, "Export(): too many arguments\n"); + rnd_message(RND_MSG_ERROR, "Export(): too many arguments\n"); return 1; } @@ -503,7 +503,7 @@ pcb_exporter = pcb_hid_find_exporter(args[0]); if (pcb_exporter == NULL) { - rnd_message(PCB_MSG_ERROR, "Export plugin %s not found. Was it enabled in ./configure?\n", args[0]); + rnd_message(RND_MSG_ERROR, "Export plugin %s not found. Was it enabled in ./configure?\n", args[0]); return 1; } Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 30954) +++ trunk/src/font.c (revision 30955) @@ -107,7 +107,7 @@ const char *s; gds_t buff; s = rnd_conf_concat_strlist(&conf_core.rc.default_font_file, &buff, NULL, ':'); - rnd_message(PCB_MSG_WARNING, "Can't find font-symbol-file. Searched: '%s'; falling back to the embedded default font\n", s); + rnd_message(RND_MSG_WARNING, "Can't find font-symbol-file. Searched: '%s'; falling back to the embedded default font\n", s); pcb_font_load_internal(&pcb->fontkit.dflt); pcb_file_loaded_set_at("font", "default", "", "original default font"); gds_uninit(&buff); Index: trunk/src/font_act.c =================================================================== --- trunk/src/font_act.c (revision 30954) +++ trunk/src/font_act.c (revision 30955) @@ -53,7 +53,7 @@ char *end; fid = strtol(sid, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "LoadFontFrom(): when second argument is present, it must be an integer\n"); + rnd_message(RND_MSG_ERROR, "LoadFontFrom(): when second argument is present, it must be an integer\n"); return 1; } if (pcb_font(PCB_ACT_BOARD, fid, 0) != NULL) { /* font already exists */ @@ -89,7 +89,7 @@ fnt = pcb_new_font(&PCB_ACT_BOARD->fontkit, fid, NULL); if (fnt == NULL) { - rnd_message(PCB_MSG_ERROR, "LoadFontFrom(): unable to allocate font\n"); + rnd_message(RND_MSG_ERROR, "LoadFontFrom(): unable to allocate font\n"); return 1; } @@ -96,7 +96,7 @@ r = pcb_parse_font(fnt, fname); pcb_event(RND_ACT_HIDLIB, PCB_EVENT_FONT_CHANGED, "i", fnt->id); if (r != 0) { - rnd_message(PCB_MSG_ERROR, "LoadFontFrom(): failed to load font from %s\n", fname); + rnd_message(RND_MSG_ERROR, "LoadFontFrom(): failed to load font from %s\n", fname); pcb_del_font(&PCB_ACT_BOARD->fontkit, fnt->id); return 1; } @@ -106,7 +106,7 @@ } fid = dst_fid == 0 ? 0 : fnt->id; - rnd_message(PCB_MSG_INFO, "LoadFontFrom(): new font (ID %d) successfully loaded from file %s\n", fid, fname); + rnd_message(RND_MSG_INFO, "LoadFontFrom(): new font (ID %d) successfully loaded from file %s\n", fid, fname); RND_ACT_IRES(0); return 0; } @@ -130,11 +130,11 @@ char *end; fid = strtol(sid, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "SaveFontTo(): when second argument is present, it must be an integer\n"); + rnd_message(RND_MSG_ERROR, "SaveFontTo(): when second argument is present, it must be an integer\n"); return 1; } if (pcb_font(PCB_ACT_BOARD, fid, 0) == NULL) { - rnd_message(PCB_MSG_ERROR, "SaveFontTo(): can not fetch font ID %d\n", fid); + rnd_message(RND_MSG_ERROR, "SaveFontTo(): can not fetch font ID %d\n", fid); return 1; } } @@ -143,7 +143,7 @@ fnt = pcb_font(PCB_ACT_BOARD, fid, 0); if (fnt == NULL) { - rnd_message(PCB_MSG_ERROR, "SaveFontTo(): failed to fetch font %d\n", fid); + rnd_message(RND_MSG_ERROR, "SaveFontTo(): failed to fetch font %d\n", fid); return 1; } @@ -161,7 +161,7 @@ r = pcb_write_font(fnt, fname, "lihata"); if (r != 0) { - rnd_message(PCB_MSG_ERROR, "SaveFontTo(): failed to save font to %s\n", fname); + rnd_message(RND_MSG_ERROR, "SaveFontTo(): failed to save font to %s\n", fname); return 1; } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 30954) +++ trunk/src/gui_act.c (revision 30955) @@ -181,7 +181,7 @@ break; case F_ToggleUniqueNames: - rnd_message(PCB_MSG_ERROR, "Unique names/refdes is not supported any more - please use the renumber plugin\n"); + rnd_message(RND_MSG_ERROR, "Unique names/refdes is not supported any more - please use the renumber plugin\n"); break; case F_ToggleSnapPin: @@ -549,7 +549,7 @@ } else { RND_ACT_IRES(-1); - rnd_message(PCB_MSG_ERROR, "Error: invalid route style name or index\n"); + rnd_message(RND_MSG_ERROR, "Error: invalid route style name or index\n"); } return 0; } @@ -638,7 +638,7 @@ if (!explicit && (*arg == '@')) { pcb_layer_id_t lid = pcb_layer_by_name(PCB->Data, arg+1); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find layer named %s\n", arg+1); + rnd_message(RND_MSG_ERROR, "Can't find layer named %s\n", arg+1); return 1; } ly = pcb_get_layer(PCB->Data, lid); @@ -670,7 +670,7 @@ interactive = 0; n++; if (n >= argc) { - rnd_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); + rnd_message(RND_MSG_ERROR, "Need an attribute name=value\n", arg+1); return 1; } key = rnd_strdup(arg); @@ -689,7 +689,7 @@ pcb_board_set_changed_flag(pcb_true); } else { - rnd_message(PCB_MSG_ERROR, "Invalid EditLayer() command: %s\n", arg); + rnd_message(RND_MSG_ERROR, "Invalid EditLayer() command: %s\n", arg); RND_ACT_FAIL(EditLayer); } } @@ -725,7 +725,7 @@ pcb_layergrp_t *g = NULL; if (PCB_CURRLAYER(PCB_ACT_BOARD)->is_bound) { - rnd_message(PCB_MSG_ERROR, "Can't edit bound layers yet\n"); + rnd_message(RND_MSG_ERROR, "Can't edit bound layers yet\n"); RND_ACT_IRES(1); return 0; } @@ -743,7 +743,7 @@ else gid = pcb_layergrp_by_name(PCB, arg+1); if (gid < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", arg+1); + rnd_message(RND_MSG_ERROR, "Can't find layer group named %s\n", arg+1); RND_ACT_IRES(1); return 0; } @@ -763,7 +763,7 @@ else if (strcmp(sbit+1, "anywhere") == 0) bit = PCB_LYT_ANYWHERE; } if (bit == 0) { - rnd_message(PCB_MSG_ERROR, "Unknown type bit %s\n", sbit+1); + rnd_message(RND_MSG_ERROR, "Unknown type bit %s\n", sbit+1); RND_ACT_IRES(1); return 0; } @@ -779,7 +779,7 @@ interactive = 0; n++; if (n >= argc) { - rnd_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); + rnd_message(RND_MSG_ERROR, "Need an attribute name=value\n", arg+1); RND_ACT_IRES(1); return 0; } @@ -798,7 +798,7 @@ free(key); } else { - rnd_message(PCB_MSG_ERROR, "Invalid EditGroup() command: %s\n", arg); + rnd_message(RND_MSG_ERROR, "Invalid EditGroup() command: %s\n", arg); RND_ACT_FAIL(EditLayer); } } @@ -843,7 +843,7 @@ if (name[1] != '\0') gid = pcb_layergrp_by_name(PCB, name+1); if (gid < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", name+1); + rnd_message(RND_MSG_ERROR, "Can't find layer group named %s\n", name+1); RND_ACT_IRES(1); return 0; } @@ -850,7 +850,7 @@ } else { if (g == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find layer group\n"); + rnd_message(RND_MSG_ERROR, "Can't find layer group\n"); RND_ACT_IRES(1); return 0; } @@ -878,13 +878,13 @@ ltype = pcb_layer_type_str2bit(stype) & PCB_LYT_ANYTHING; if (ltype == 0) { - rnd_message(PCB_MSG_ERROR, "Invalid type: '%s'\n", sloc); + rnd_message(RND_MSG_ERROR, "Invalid type: '%s'\n", sloc); RND_ACT_IRES(-1); return 0; } if ((ltype == PCB_LYT_COPPER) || (ltype == PCB_LYT_SUBSTRATE)) { - rnd_message(PCB_MSG_ERROR, "Can not create this type of layer group: '%s'\n", sloc); + rnd_message(RND_MSG_ERROR, "Can not create this type of layer group: '%s'\n", sloc); RND_ACT_IRES(-1); return 0; } @@ -893,7 +893,7 @@ if (strcmp(sloc, "global") != 0) { lloc = pcb_layer_type_str2bit(sloc) & PCB_LYT_ANYWHERE; if (lloc == 0) { - rnd_message(PCB_MSG_ERROR, "Invalid location: '%s'\n", sloc); + rnd_message(RND_MSG_ERROR, "Invalid location: '%s'\n", sloc); RND_ACT_IRES(-1); return 0; } @@ -990,7 +990,7 @@ if (name[1] != '\0') gid = pcb_layergrp_by_name(PCB, name+1); if (gid < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", name+1); + rnd_message(RND_MSG_ERROR, "Can't find layer group named %s\n", name+1); RND_ACT_IRES(1); return 0; } @@ -997,7 +997,7 @@ } else { if (g == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find layer group\n"); + rnd_message(RND_MSG_ERROR, "Can't find layer group\n"); RND_ACT_IRES(1); return 0; } @@ -1046,7 +1046,7 @@ pcb_layervis_change_group_vis(RND_ACT_HIDLIB, lid, 1, 1); } else { - rnd_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); + rnd_message(RND_MSG_ERROR, "Can't find this-side silk layer\n"); RND_ACT_IRES(-1); } return 0; @@ -1057,7 +1057,7 @@ rnd_bool *v = (rnd_bool *)((char *)PCB + ml->vis_offs); rnd_bool *s = (rnd_bool *)((char *)PCB + ml->sel_offs); if (ml->sel_offs == 0) { - rnd_message(PCB_MSG_ERROR, "Virtual layer '%s' (%s) can not be selected\n", ml->name, ml->abbrev); + rnd_message(RND_MSG_ERROR, "Virtual layer '%s' (%s) can not be selected\n", ml->name, ml->abbrev); RND_ACT_IRES(-1); return 0; } @@ -1098,7 +1098,7 @@ RND_ACT_IRES(-1); return 0; } - rnd_message(PCB_MSG_ERROR, "pcb_act_ChkLayer: '%s' is not a valid layer ID - check your menu file!\n", argv[0]); + rnd_message(RND_MSG_ERROR, "pcb_act_ChkLayer: '%s' is not a valid layer ID - check your menu file!\n", argv[0]); RND_ACT_IRES(-1); return 0; } @@ -1157,7 +1157,7 @@ if (pcb_layer_list(PCB, PCB_LYT_VISIBLE_SIDE() | PCB_LYT_SILK, &lid, 1) > 0) pcb_layervis_change_group_vis(RND_ACT_HIDLIB, lid, -1, 0); else - rnd_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); + rnd_message(RND_MSG_ERROR, "Can't find this-side silk layer\n"); } else if ((rnd_strcasecmp(name, "padstacks") == 0) || (rnd_strcasecmp(name, "vias") == 0) || (rnd_strcasecmp(name, "pins") == 0) || (rnd_strcasecmp(name, "pads") == 0)) { PCB->pstk_on = !PCB->pstk_on; @@ -1172,7 +1172,7 @@ else if (strncmp(name, "ui:", 3) == 0) { pcb_layer_t *ly = pcb_uilayer_get(atoi(name+3)); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid ui layer id: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "Invalid ui layer id: '%s'\n", name); RND_ACT_IRES(-1); return 0; } @@ -1198,7 +1198,7 @@ pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } - rnd_message(PCB_MSG_ERROR, "Invalid layer id: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "Invalid layer id: '%s'\n", name); } } @@ -1239,7 +1239,7 @@ return 0; } - rnd_message(PCB_MSG_ERROR, "pcb_act_ChkView: '%s' is not a valid layer ID - check your menu file!\n", name); + rnd_message(RND_MSG_ERROR, "pcb_act_ChkView: '%s' is not a valid layer ID - check your menu file!\n", name); return FGW_ERR_ARGV_TYPE; } Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 30954) +++ trunk/src/hid_cam.c (revision 30955) @@ -250,7 +250,7 @@ else if (strcmp(curr, "okempty-content") == 0) dst->okempty_content = 1; else - rnd_message(PCB_MSG_ERROR, "CAM: ignoring unknown global parameter [%s]\n", curr); + rnd_message(RND_MSG_ERROR, "CAM: ignoring unknown global parameter [%s]\n", curr); } else *str = NULL; @@ -278,7 +278,7 @@ /* parse: get file name name */ next = strchr(dst->inst, '='); if (next == NULL) { - rnd_message(PCB_MSG_ERROR, "CAM rule missing '='\n"); + rnd_message(RND_MSG_ERROR, "CAM rule missing '='\n"); goto err; } read_out_params(dst, &next); @@ -303,7 +303,7 @@ next = pcb_parse_layergrp_address(curr, spk, spv, &spc); if (next == pcb_parse_layergrp_err) { - rnd_message(PCB_MSG_ERROR, "CAM rule: invalid layer transformation\n"); + rnd_message(RND_MSG_ERROR, "CAM rule: invalid layer transformation\n"); goto err; } @@ -374,7 +374,7 @@ read_out_params(dst, &eq); start = strchr(src, '('); if ((start != eq) || (start == NULL)) { - rnd_message(PCB_MSG_ERROR, "global exporter --cam doesn't take layers, only a file name and optionally global supplements\n"); + rnd_message(RND_MSG_ERROR, "global exporter --cam doesn't take layers, only a file name and optionally global supplements\n"); } if (start != NULL) { /* parse supplements for global xform */ char *tmp; @@ -385,10 +385,10 @@ tmp = rnd_strdup(start); end = pcb_parse_layergrp_address(start, spk, spv, &spc); if ((end != NULL) && (*end != '\0')) - rnd_message(PCB_MSG_ERROR, "global exporter --cam takes only one set of global supplements\n"); + rnd_message(RND_MSG_ERROR, "global exporter --cam takes only one set of global supplements\n"); pcb_parse_layer_supplements(spk, spv, spc, &purpose, &dummy, dst_xform); if (purpose != NULL) - rnd_message(PCB_MSG_ERROR, "global exporter --cam ignores layer purpose\n"); + rnd_message(RND_MSG_ERROR, "global exporter --cam ignores layer purpose\n"); free(tmp); } } @@ -478,7 +478,7 @@ gds_append_str(s, val); } else - rnd_message(PCB_MSG_ERROR, "cam job error: %%%% variable name too long at: '%%%s' - did not substitute\n", *input); + rnd_message(RND_MSG_ERROR, "cam job error: %%%% variable name too long at: '%%%s' - did not substitute\n", *input); } *input = end+1; Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 30954) +++ trunk/src/layer.c (revision 30955) @@ -114,7 +114,7 @@ #define layer_if_too_many(pcb, fail_cmd) \ do { \ if (pcb->Data->LayerN >= PCB_MAX_LAYER) { \ - rnd_message(PCB_MSG_ERROR, "Too many layers - can't have more than %d\n", PCB_MAX_LAYER); \ + rnd_message(RND_MSG_ERROR, "Too many layers - can't have more than %d\n", PCB_MAX_LAYER); \ fail_cmd; \ } \ } while(0) @@ -880,7 +880,7 @@ g = pcb_get_layergrp(pcb, pcb->Data->Layer[old_index].meta.real.grp); grp_idx = pcb_layergrp_index_in_grp(g, old_index); if (grp_idx < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error; layer not in group\n"); + rnd_message(RND_MSG_ERROR, "Internal error; layer not in group\n"); return -1; } @@ -1061,12 +1061,12 @@ { /* sanity checks */ if (old_index < -1 || old_index >= pcb->Data->LayerN) { - rnd_message(PCB_MSG_ERROR, "Invalid old layer %d for move: must be -1..%d\n", old_index, pcb->Data->LayerN - 1); + rnd_message(RND_MSG_ERROR, "Invalid old layer %d for move: must be -1..%d\n", old_index, pcb->Data->LayerN - 1); return 1; } if (new_index < -1 || new_index > pcb->Data->LayerN || new_index >= PCB_MAX_LAYER) { - rnd_message(PCB_MSG_ERROR, "Invalid new layer %d for move: must be -1..%d\n", new_index, pcb->Data->LayerN); + rnd_message(RND_MSG_ERROR, "Invalid new layer %d for move: must be -1..%d\n", new_index, pcb->Data->LayerN); return 1; } @@ -1087,7 +1087,7 @@ return pcb_layer_move_delete(pcb, old_index, undoable); - rnd_message(PCB_MSG_ERROR, "Logical layer move is not supported any more. This function should have not been called. Please report this error.\n"); + rnd_message(RND_MSG_ERROR, "Logical layer move is not supported any more. This function should have not been called. Please report this error.\n"); /* Removed r8686: The new layer design presents the layers by groups to preserve physical order. In this system the index of the logical layer on the logical @@ -1152,7 +1152,7 @@ dst->meta.bound.stack_offs = -from_bottom; } else - rnd_message(PCB_MSG_ERROR, "Internal error: can't figure the inter copper\nlayer offset for %s\n", src->name); + rnd_message(RND_MSG_ERROR, "Internal error: can't figure the inter copper\nlayer offset for %s\n", src->name); } else dst->meta.bound.stack_offs = 0; @@ -1253,7 +1253,7 @@ pcb_layer_type_t lyt = src->meta.bound.type; if ((lyt & PCB_LYT_BOUNDARY) && (lyt & PCB_LYT_ANYWHERE)) { lyt = PCB_LYT_BOUNDARY; - rnd_message(PCB_MSG_WARNING, "Ignoring invalid layer flag combination for %s: boundary layer must be global\n(fixed up by removing location specifier bits)\n", src->name); + rnd_message(RND_MSG_WARNING, "Ignoring invalid layer flag combination for %s: boundary layer must be global\n(fixed up by removing location specifier bits)\n", src->name); } for(gid = 0, grp = pcb->LayerGroups.grp; gid < pcb->LayerGroups.len; gid++,grp++) if ((grp->ltype & lyt) == lyt) Index: trunk/src/layer_addr.c =================================================================== --- trunk/src/layer_addr.c (revision 30954) +++ trunk/src/layer_addr.c (revision 30955) @@ -106,7 +106,7 @@ if (soffs != NULL) { *offs = strtol(soffs+1, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "CAM rule: invalid offset '%s'\n", soffs); + rnd_message(RND_MSG_ERROR, "CAM rule: invalid offset '%s'\n", soffs); return 1; } *has_offs = 1; @@ -125,7 +125,7 @@ nxt++; } if (l == 0) { - rnd_message(PCB_MSG_ERROR, "CAM rule: invalid layer type '%s'\n", cur); + rnd_message(RND_MSG_ERROR, "CAM rule: invalid layer type '%s'\n", cur); return 1; } (*lyt) |= l; @@ -156,7 +156,7 @@ *xf = xf_; } else - rnd_message(PCB_MSG_ERROR, "CAM: ignoring invalid layer supplement value '%s' for bloat\n", val); + rnd_message(RND_MSG_ERROR, "CAM: ignoring invalid layer supplement value '%s' for bloat\n", val); } else if (strcmp(key, "faded") == 0) { if (xf_ != NULL) xf_->layer_faded = 1; @@ -191,7 +191,7 @@ if (xf != NULL) *xf = xf_; } else - rnd_message(PCB_MSG_ERROR, "CAM: ignoring unknown layer supplement key '%s'\n", key); + rnd_message(RND_MSG_ERROR, "CAM: ignoring unknown layer supplement key '%s'\n", key); } } @@ -213,7 +213,7 @@ return 1; } if (err_prefix != NULL) - rnd_message(PCB_MSG_ERROR, "%sinvalid layer group number\n", err_prefix); + rnd_message(RND_MSG_ERROR, "%sinvalid layer group number\n", err_prefix); return -1; } @@ -237,7 +237,7 @@ } if (gid < 0) { if (err_prefix != NULL) - rnd_message(PCB_MSG_ERROR, "%sno such layer group '%s'\n", curr, err_prefix); + rnd_message(RND_MSG_ERROR, "%sno such layer group '%s'\n", curr, err_prefix); return -1; } if (pcb->LayerGroups.grp[gid].len <= 0) @@ -260,7 +260,7 @@ vl = pcb_vlayer_get_first(lyt, purpose, -1); if ((lyt & PCB_LYT_VIRTUAL) && (vl == NULL)) { if (err_prefix != NULL) - rnd_message(PCB_MSG_ERROR, "%sno virtual layer with purpose '%s'\n", err_prefix, purpose); + rnd_message(RND_MSG_ERROR, "%sno virtual layer with purpose '%s'\n", err_prefix, purpose); return -1; } if (vl == NULL) { Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 30954) +++ trunk/src/layer_grp.c (revision 30955) @@ -354,7 +354,7 @@ if ((rnd_strcasecmp(value, "true") == 0) || (rnd_strcasecmp(value, "yes") == 0) || (rnd_strcasecmp(value, "on") == 0) || (strcmp(value, "1") == 0)) newv = 1; else if ((rnd_strcasecmp(value, "false") == 0) || (rnd_strcasecmp(value, "no") == 0) || (rnd_strcasecmp(value, "off") == 0) || (strcmp(value, "0") == 0)) newv = 0; else { - rnd_message(PCB_MSG_ERROR, "unrecognized value '%s' of layer group %s's init-invis attribute", value, g->name == NULL ? "" : g->name); + rnd_message(RND_MSG_ERROR, "unrecognized value '%s' of layer group %s's init-invis attribute", value, g->name == NULL ? "" : g->name); return; } g->init_invis = newv; @@ -832,7 +832,7 @@ pcb->Data->Layer[lids[n]].comb |= PCB_LYC_AUTO; } else - rnd_message(PCB_MSG_ERROR, "outline layer can not be on the solder or component side - converting it into a copper layer\n"); + rnd_message(RND_MSG_ERROR, "outline layer can not be on the solder or component side - converting it into a copper layer\n"); } pcb_layer_add_in_group_(pcb, g, g - LayerGroup->grp, lids[n]); } @@ -1341,12 +1341,12 @@ } if (!((ly->meta.bound.type & PCB_LYT_DOC) || (ly->meta.bound.type & PCB_LYT_MECH))) /* doc layers are created later */ - rnd_message(PCB_MSG_ERROR, "Failed to create layer from recipe %s\n", ly->name); + rnd_message(RND_MSG_ERROR, "Failed to create layer from recipe %s\n", ly->name); } if (want_intern > existing_intern) { int int_ofs = 0; -/*pcb_trace("want: %d have: %d\n", want_intern, existing_intern);*/ +/*rnd_trace("want: %d have: %d\n", want_intern, existing_intern);*/ /* create enough dummy internal layers, mark them by name anon */ while(want_intern > existing_intern) { pcb_layergrp_t *grp = pcb_get_grp_new_intern(pcb, -1); @@ -1362,7 +1362,7 @@ pcb_layer_t *ly = layer + m; if ((ly->meta.bound.type & PCB_LYT_COPPER) && (ly->meta.bound.type & PCB_LYT_INTERN)) { int offs = ly->meta.bound.stack_offs; -/*pcb_trace("offs: %d (%d) == %d\n", offs, existing_intern + offs + 1, int_ofs);*/ +/*rnd_trace("offs: %d (%d) == %d\n", offs, existing_intern + offs + 1, int_ofs);*/ if (offs < 0) offs = existing_intern + offs + 1; if ((offs == int_ofs) && (ly->name != NULL)) { Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30954) +++ trunk/src/layer_vis.c (revision 30955) @@ -167,7 +167,7 @@ } if (SavedStack.cnt != 0) - rnd_message(PCB_MSG_ERROR, "pcb_layervis_save_stack() layerstack was already saved and not yet restored. cnt = %d\n", SavedStack.cnt); + rnd_message(RND_MSG_ERROR, "pcb_layervis_save_stack() layerstack was already saved and not yet restored. cnt = %d\n", SavedStack.cnt); for (i = 0; i < pcb_max_layer(PCB); i++) { if (!(pcb_layer_flags(PCB, i) & PCB_LYT_SILK)) @@ -189,11 +189,11 @@ rnd_cardinal_t i; if (SavedStack.cnt == 0) { - rnd_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); + rnd_message(RND_MSG_ERROR, "pcb_layervis_restore_stack() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); return; } else if (SavedStack.cnt != 1) { - rnd_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack save count is" " wrong. cnt = %d\n", SavedStack.cnt); + rnd_message(RND_MSG_ERROR, "pcb_layervis_restore_stack() layerstack save count is" " wrong. cnt = %d\n", SavedStack.cnt); } for (i = 0; i < pcb_max_layer(PCB); i++) { @@ -278,7 +278,7 @@ for(n = 0; n < g->len; n++) { pcb_layer_t *l = pcb_get_layer(PCB->Data, g->lid[n]); if (l == NULL) - rnd_message(PCB_MSG_ERROR, "broken layer groups; layer group references to non-existing layer\n"); + rnd_message(RND_MSG_ERROR, "broken layer groups; layer group references to non-existing layer\n"); else l->meta.real.vis = 0; } Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 30954) +++ trunk/src/librnd/core/actions.c (revision 30955) @@ -90,12 +90,12 @@ int len; if (check_action_name(a[i].name)) { - rnd_message(PCB_MSG_ERROR, "ERROR! Invalid action name, " "action \"%s\" not registered.\n", a[i].name); + rnd_message(RND_MSG_ERROR, "ERROR! Invalid action name, " "action \"%s\" not registered.\n", a[i].name); continue; } len = strlen(a[i].name); if (len >= sizeof(fn)) { - rnd_message(PCB_MSG_ERROR, "Invalid action name: \"%s\" (too long).\n", a[i].name); + rnd_message(RND_MSG_ERROR, "Invalid action name: \"%s\" (too long).\n", a[i].name); continue; } @@ -106,7 +106,7 @@ rnd_make_action_name(fn, a[i].name, len); f = fgw_func_reg(pcb_fgw_obj, fn, a[i].trigger_cb); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to register action \"%s\" (already registered?)\n", a[i].name); + rnd_message(RND_MSG_ERROR, "Failed to register action \"%s\" (already registered?)\n", a[i].name); free(ca); continue; } @@ -140,7 +140,7 @@ for (i = 0; i < n; i++) { fgw_func_t *f = rnd_act_lookup(a[i].name); if (f == NULL) { - rnd_message(PCB_MSG_WARNING, "Failed to remove action \"%s\" (is it registered?)\n", a[i].name); + rnd_message(RND_MSG_WARNING, "Failed to remove action \"%s\" (is it registered?)\n", a[i].name); continue; } pcb_remove_action(f); @@ -170,7 +170,7 @@ f = rnd_act_lookup(name); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "unknown action `%s'\n", name); + rnd_message(RND_MSG_ERROR, "unknown action `%s'\n", name); return NULL; } ca = f->reg_data; @@ -337,7 +337,7 @@ return 1; if (argc >= RND_ACTION_MAX_ARGS) { - rnd_message(PCB_MSG_ERROR, "can not call action %s with this many arguments (%d >= %d)\n", name, argc, RND_ACTION_MAX_ARGS); + rnd_message(RND_MSG_ERROR, "can not call action %s with this many arguments (%d >= %d)\n", name, argc, RND_ACTION_MAX_ARGS); return 1; } @@ -344,10 +344,10 @@ f = rnd_act_lookup(name); if (f == NULL) { int i; - rnd_message(PCB_MSG_ERROR, "no action %s(", name); + rnd_message(RND_MSG_ERROR, "no action %s(", name); for (i = 0; i < argc; i++) - rnd_message(PCB_MSG_ERROR, "%s%s", i ? ", " : "", argsv[i]); - rnd_message(PCB_MSG_ERROR, ")\n"); + rnd_message(RND_MSG_ERROR, "%s%s", i ? ", " : "", argsv[i]); + rnd_message(RND_MSG_ERROR, ")\n"); return 1; } argv[0].type = FGW_FUNC; @@ -434,8 +434,8 @@ sp++; } else if (require_parens) { - rnd_message(PCB_MSG_ERROR, "Syntax error: %s\n", rstr); - rnd_message(PCB_MSG_ERROR, " expected: Action(arg1, arg2)"); + rnd_message(RND_MSG_ERROR, "Syntax error: %s\n", rstr); + rnd_message(RND_MSG_ERROR, " expected: Action(arg1, arg2)"); retcode = 1; goto cleanup; } @@ -689,7 +689,7 @@ /* backend: let the backend action handle it */ a = rnd_find_action(pcbhl_conf.rc.cli_backend, &f); if (!a) { - rnd_message(PCB_MSG_ERROR, "cli: no action %s; leaving mode\n", pcbhl_conf.rc.cli_backend); + rnd_message(RND_MSG_ERROR, "cli: no action %s; leaving mode\n", pcbhl_conf.rc.cli_backend); rnd_cli_leave(); return -1; } @@ -887,7 +887,7 @@ static void pcb_action_err(fgw_obj_t *obj, const char *msg) { - rnd_message(PCB_MSG_ERROR, "fungw(%s): %s", obj->name, msg); + rnd_message(RND_MSG_ERROR, "fungw(%s): %s", obj->name, msg); } int rnd_act_execute_file(rnd_hidlib_t *hidlib, const char *fn) @@ -898,7 +898,7 @@ f = pcb_fopen(hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "rnd_act_execute_file(): Could not open actions file \"%s\".\n", fn); + rnd_message(RND_MSG_ERROR, "rnd_act_execute_file(): Could not open actions file \"%s\".\n", fn); return 1; } Index: trunk/src/librnd/core/actions.h =================================================================== --- trunk/src/librnd/core/actions.h (revision 30954) +++ trunk/src/librnd/core/actions.h (revision 30955) @@ -211,7 +211,7 @@ res->val.nat_double = v; \ } while(0) -#define RND_ACT_FAIL(x) { rnd_message(PCB_MSG_ERROR, "Syntax error. Usage:\n%s\n", (pcb_acts_ ## x)); return FGW_ERR_ARG_CONV; } +#define RND_ACT_FAIL(x) { rnd_message(RND_MSG_ERROR, "Syntax error. Usage:\n%s\n", (pcb_acts_ ## x)); return FGW_ERR_ARG_CONV; } /*** The default unit to use when a coord value doesn't have its own unit ***/ extern char *fgw_str2coord_unit; /* saved is char * too */ Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 30954) +++ trunk/src/librnd/core/compat_fs.c (revision 30955) @@ -111,7 +111,7 @@ pid = fork(); if (pid < 0) { /* error */ - rnd_message(PCB_MSG_ERROR, "Cannot fork!"); + rnd_message(RND_MSG_ERROR, "Cannot fork!"); return 1; } else if (pid == 0) { Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30954) +++ trunk/src/librnd/core/conf.c (revision 30955) @@ -144,18 +144,18 @@ } if (d == NULL) { - rnd_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (can't open the file or syntax error)\n", ifn); + rnd_message(RND_MSG_ERROR, "error: failed to load lht plugin config: %s (can't open the file or syntax error)\n", ifn); return NULL; } if (d->root == NULL) { - rnd_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (no root)\n", ifn); + rnd_message(RND_MSG_ERROR, "error: failed to load lht plugin config: %s (no root)\n", ifn); lht_dom_uninit(d); return NULL; } if ((d->root->type != LHT_LIST) || (strcmp(d->root->name, "pcb-rnd-conf-v1") != 0)) { - rnd_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (not a pcb-rnd-conf-v1)\n", ifn); + rnd_message(RND_MSG_ERROR, "error: failed to load lht plugin config: %s (not a pcb-rnd-conf-v1)\n", ifn); lht_dom_uninit(d); return NULL; } @@ -191,7 +191,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f != NULL) { /* warn only if the file is there - missing file is normal */ - rnd_message(PCB_MSG_ERROR, "error: failed to load lht config: %s (%s)\n", fn, efn); + rnd_message(RND_MSG_ERROR, "error: failed to load lht config: %s (%s)\n", fn, efn); fclose(f); } free(efn); @@ -258,7 +258,7 @@ err = lht_tree_merge(pcb_conf_plug_root[role]->root, d->root); lht_dom_uninit(d); if (err != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to lihata-merge plugin config %s: %s\n", path, lht_err_str(err)); + rnd_message(RND_MSG_ERROR, "Failed to lihata-merge plugin config %s: %s\n", path, lht_err_str(err)); return 0; } return 1; @@ -900,7 +900,7 @@ int nl, ppl = strlen(path_prefix), res = 0; if (ppl >= sizeof(path)) { - rnd_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", path_prefix); + rnd_message(RND_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", path_prefix); return -1; } @@ -911,7 +911,7 @@ for(n = lht_dom_first(&it, sect); n != NULL; n = lht_dom_next(&it)) { nl = strlen(n->name); if (nl >= (sizeof(path) - (pathe - path))) { - rnd_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", n->name); + rnd_message(RND_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", n->name); return -1; } memcpy(pathe, n->name, nl); @@ -1456,7 +1456,7 @@ } if (idx >= nat->array_size) { - rnd_message(PCB_MSG_ERROR, "Error: can't rnd_conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); + rnd_message(RND_MSG_ERROR, "Error: can't rnd_conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); free(path); return -1; } @@ -1483,7 +1483,7 @@ return 0; } if (pcb_conf_main_root_lock[target]) { - rnd_message(PCB_MSG_WARNING, "WARNING: can't set config item %s because target in-memory lihata does not have the node and is tree-locked\n", path_); + rnd_message(RND_MSG_WARNING, "WARNING: can't set config item %s because target in-memory lihata does not have the node and is tree-locked\n", path_); free(path); return -1; } @@ -1514,7 +1514,7 @@ } nn = lht_dom_node_alloc(ty, basename); if (cwd->type != LHT_HASH) { - rnd_message(PCB_MSG_ERROR, "Expected HASH conf subtree '%s' (in path '%s'); cleaning up broken conf, check your config sources!\n", cwd->name, path); + rnd_message(RND_MSG_ERROR, "Expected HASH conf subtree '%s' (in path '%s'); cleaning up broken conf, check your config sources!\n", cwd->name, path); lht_tree_del(cwd); free(path); return -1; @@ -1897,7 +1897,7 @@ case RND_CFR_PROJECT: fn = rnd_conf_get_project_conf_name(project_fn, pcb_fn, &try); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can not save config to project file: %s does not exist - please create an empty file there first\n", try); + rnd_message(RND_MSG_ERROR, "Error: can not save config to project file: %s does not exist - please create an empty file there first\n", try); return -1; } break; @@ -1919,7 +1919,7 @@ path = pcb_build_fn(hidlib, fn); if (path == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: failed to calculate the project file name (board file name or allocation error)\n"); + rnd_message(RND_MSG_ERROR, "Error: failed to calculate the project file name (board file name or allocation error)\n"); fclose(f); return -1; } @@ -1928,12 +1928,12 @@ if (end != NULL) { *end = '\0'; if (pcb_mkdir(NULL, path, 0755) == 0) { - rnd_message(PCB_MSG_INFO, "Created directory %s for saving %s\n", path, fn); + rnd_message(RND_MSG_INFO, "Created directory %s for saving %s\n", path, fn); *end = '/'; f = pcb_fopen(hidlib, path, "w"); } else - rnd_message(PCB_MSG_ERROR, "Error: failed to create directory %s for saving %s\n", path, efn); + rnd_message(RND_MSG_ERROR, "Error: failed to create directory %s for saving %s\n", path, efn); } free(path); } @@ -1946,7 +1946,7 @@ fclose(f); } else - rnd_message(PCB_MSG_ERROR, "Error: can't save config to %s - can't open the file for write\n", fn); + rnd_message(RND_MSG_ERROR, "Error: can't save config to %s - can't open the file for write\n", fn); } free(efn); Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 30954) +++ trunk/src/librnd/core/conf_act.c (revision 30955) @@ -73,13 +73,13 @@ int rs; if (argc < 4) { - rnd_message(PCB_MSG_ERROR, "conf(set) needs at least two arguments"); + rnd_message(RND_MSG_ERROR, "conf(set) needs at least two arguments"); return FGW_ERR_ARGC; } if (argc > 4) { role = rnd_conf_role_parse(a3); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a3); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", a3); return FGW_ERR_ARG_CONV; } } @@ -86,7 +86,7 @@ if (argc > 5) { pol = rnd_conf_policy_parse(a4); if (pol == RND_POL_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid policy: '%s'", a4); + rnd_message(RND_MSG_ERROR, "Invalid policy: '%s'", a4); return FGW_ERR_ARG_CONV; } } @@ -99,7 +99,7 @@ rnd_conf_native_t *n = rnd_conf_get_field(a1); if (n == 0) { - rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': no such path\n", argv[1]); + rnd_message(RND_MSG_ERROR, "Can't delta-set '%s': no such path\n", argv[1]); return FGW_ERR_ARG_CONV; } @@ -107,7 +107,7 @@ case RND_CFN_REAL: d = strtod(val, &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': invalid delta value\n", a1); + rnd_message(RND_MSG_ERROR, "Can't delta-set '%s': invalid delta value\n", a1); return FGW_ERR_ARG_CONV; } d += *n->val.real; @@ -117,7 +117,7 @@ case RND_CFN_COORD: case RND_CFN_INTEGER: default: - rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': not a numeric item\n", a1); + rnd_message(RND_MSG_ERROR, "Can't delta-set '%s': not a numeric item\n", a1); return FGW_ERR_ARG_CONV; } } @@ -125,7 +125,7 @@ if (role == RND_CFR_invalid) { rnd_conf_native_t *n = rnd_conf_get_field(a1); if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); + rnd_message(RND_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_ARG_CONV; } rs = rnd_conf_set_native(n, 0, val); @@ -135,7 +135,7 @@ rs = rnd_conf_set(role, path, -1, val, pol); if (rs != 0) { - rnd_message(PCB_MSG_ERROR, "conf(set) failed.\n"); + rnd_message(RND_MSG_ERROR, "conf(set) failed.\n"); return FGW_ERR_UNKNOWN; } } @@ -147,7 +147,7 @@ rnd_conf_native_t *n; if (argc != 4) { - rnd_message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); + rnd_message(RND_MSG_ERROR, "conf(iseq) needs two arguments"); return FGW_ERR_ARGC; } path = a1; @@ -156,7 +156,7 @@ n = rnd_conf_get_field(a1); if (n == NULL) { if (pcbhl_conf.rc.verbose) - rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s' in iseq: no such path\n", path); + rnd_message(RND_MSG_ERROR, "Invalid conf field '%s' in iseq: no such path\n", path); return FGW_ERR_ARG_CONV; } @@ -177,21 +177,21 @@ int res; if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); + rnd_message(RND_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_UNKNOWN; } if (n->type != RND_CFN_BOOLEAN) { - rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': not a boolean\n", a1); + rnd_message(RND_MSG_ERROR, "Can not toggle '%s': not a boolean\n", a1); return FGW_ERR_UNKNOWN; } if (n->used != 1) { - rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': array size should be 1, not %d\n", a1, n->used); + rnd_message(RND_MSG_ERROR, "Can not toggle '%s': array size should be 1, not %d\n", a1, n->used); return FGW_ERR_UNKNOWN; } if (argc > 3) { role = rnd_conf_role_parse(a2); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a2); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", a2); return FGW_ERR_ARG_CONV; } } @@ -205,7 +205,7 @@ res = rnd_conf_set(role, a1, -1, new_value, RND_POL_OVERWRITE); if (res != 0) { - rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': failed to set new value\n", a1); + rnd_message(RND_MSG_ERROR, "Can not toggle '%s': failed to set new value\n", a1); return FGW_ERR_UNKNOWN; } rnd_conf_update(a1, -1); @@ -215,7 +215,7 @@ rnd_conf_role_t role; role = rnd_conf_role_parse(a1); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a1); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", a1); return FGW_ERR_ARG_CONV; } rnd_conf_reset(role, ""); @@ -223,7 +223,7 @@ } else { - rnd_message(PCB_MSG_ERROR, "Invalid conf command\n"); + rnd_message(RND_MSG_ERROR, "Invalid conf command\n"); return FGW_ERR_ARG_CONV; } @@ -302,7 +302,7 @@ d = strtod(val+1, &end); if ((*end != '\0') || (d <= 0)) { - rnd_message(PCB_MSG_ERROR, "SetGrid: Invalid multiplier/divider for grid set: needs to be a positive number\n"); + rnd_message(RND_MSG_ERROR, "SetGrid: Invalid multiplier/divider for grid set: needs to be a positive number\n"); return 1; } pcb_grid_inval(); Index: trunk/src/librnd/core/conf_hid.c =================================================================== --- trunk/src/librnd/core/conf_hid.c (revision 30954) +++ trunk/src/librnd/core/conf_hid.c (revision 30955) @@ -151,15 +151,15 @@ } -void rnd_conf_loglevel_props(enum pcb_message_level level, const char **tag, int *popup) +void rnd_conf_loglevel_props(rnd_message_level_t level, const char **tag, int *popup) { *tag = NULL; *popup = 0; switch(level) { - case PCB_MSG_DEBUG: *tag = pcbhl_conf.appearance.loglevels.debug_tag; *popup = pcbhl_conf.appearance.loglevels.debug_popup; break; - case PCB_MSG_INFO: *tag = pcbhl_conf.appearance.loglevels.info_tag; *popup = pcbhl_conf.appearance.loglevels.info_popup; break; - case PCB_MSG_WARNING: *tag = pcbhl_conf.appearance.loglevels.warning_tag; *popup = pcbhl_conf.appearance.loglevels.warning_popup; break; - case PCB_MSG_ERROR: *tag = pcbhl_conf.appearance.loglevels.error_tag; *popup = pcbhl_conf.appearance.loglevels.error_popup; break; + case RND_MSG_DEBUG: *tag = pcbhl_conf.appearance.loglevels.debug_tag; *popup = pcbhl_conf.appearance.loglevels.debug_popup; break; + case RND_MSG_INFO: *tag = pcbhl_conf.appearance.loglevels.info_tag; *popup = pcbhl_conf.appearance.loglevels.info_popup; break; + case RND_MSG_WARNING: *tag = pcbhl_conf.appearance.loglevels.warning_tag; *popup = pcbhl_conf.appearance.loglevels.warning_popup; break; + case RND_MSG_ERROR: *tag = pcbhl_conf.appearance.loglevels.error_tag; *popup = pcbhl_conf.appearance.loglevels.error_popup; break; break; } } Index: trunk/src/librnd/core/conf_hid.h =================================================================== --- trunk/src/librnd/core/conf_hid.h (revision 30954) +++ trunk/src/librnd/core/conf_hid.h (revision 30955) @@ -74,7 +74,7 @@ /****** Utility/helper functions ******/ /* Looking at the log level, return a log format tag and whether the window should pop up. */ -void rnd_conf_loglevel_props(enum pcb_message_level level, const char **tag, int *popup); +void rnd_conf_loglevel_props(rnd_message_level_t level, const char **tag, int *popup); /****** Internal ******/ void rnd_conf_hid_global_cb_int_(rnd_conf_native_t *item, int arr_idx, int offs); Index: trunk/src/librnd/core/error.c =================================================================== --- trunk/src/librnd/core/error.c (revision 30954) +++ trunk/src/librnd/core/error.c (revision 30955) @@ -37,7 +37,7 @@ #include #include -void pcb_trace(const char *Format, ...) +void rnd_trace(const char *Format, ...) { #ifndef NDEBUG va_list args; @@ -47,19 +47,19 @@ #endif } -unsigned long pcb_log_next_ID = 0; -pcb_logline_t *pcb_log_first, *pcb_log_last; +unsigned long rnd_log_next_ID = 0; +rnd_logline_t *rnd_log_first, *rnd_log_last; -void rnd_message(enum pcb_message_level level, const char *Format, ...) +void rnd_message(rnd_message_level_t level, const char *Format, ...) { va_list args; - pcb_message_level_t min_level = PCB_MSG_INFO; + rnd_message_level_t min_level = RND_MSG_INFO; gds_t tmp; - pcb_logline_t *line; + rnd_logline_t *line; if ((pcb_gui == NULL) || (pcbhl_conf.rc.dup_log_to_stderr)) { if (pcbhl_conf.rc.quiet) - min_level = PCB_MSG_ERROR; + min_level = RND_MSG_ERROR; if ((level >= min_level) || (pcbhl_conf.rc.verbose)) { va_start(args, Format); @@ -71,33 +71,33 @@ /* allocate a new log line; for efficiency pretend it is a string during the allocation */ gds_init(&tmp); - gds_enlarge(&tmp, sizeof(pcb_logline_t)); - tmp.used = offsetof(pcb_logline_t, str); + gds_enlarge(&tmp, sizeof(rnd_logline_t)); + tmp.used = offsetof(rnd_logline_t, str); va_start(args, Format); pcb_safe_append_vprintf(&tmp, 0, Format, args); va_end(args); /* add the header and link in */ - line = (pcb_logline_t *)tmp.array; + line = (rnd_logline_t *)tmp.array; line->stamp = time(NULL); - line->ID = pcb_log_next_ID++; + line->ID = rnd_log_next_ID++; line->level = level; line->seen = 0; line->next = NULL; - line->prev = pcb_log_last; - if (pcb_log_first == NULL) - pcb_log_first = line; - if (pcb_log_last != NULL) - pcb_log_last->next = line; - pcb_log_last = line; - line->len = tmp.used - offsetof(pcb_logline_t, str); + line->prev = rnd_log_last; + if (rnd_log_first == NULL) + rnd_log_first = line; + if (rnd_log_last != NULL) + rnd_log_last->next = line; + rnd_log_last = line; + line->len = tmp.used - offsetof(rnd_logline_t, str); pcb_event(NULL, PCB_EVENT_LOG_APPEND, "p", line); } -pcb_logline_t *pcb_log_find_min_(pcb_logline_t *from, unsigned long ID) +rnd_logline_t *rnd_log_find_min_(rnd_logline_t *from, unsigned long ID) { - pcb_logline_t *n; + rnd_logline_t *n; if (ID == -1) return from; for(n = from; n != NULL; n = n->next) @@ -106,32 +106,32 @@ return NULL; } -pcb_logline_t *pcb_log_find_min(unsigned long ID) +rnd_logline_t *rnd_log_find_min(unsigned long ID) { - return pcb_log_find_min_(pcb_log_first, ID); + return rnd_log_find_min_(rnd_log_first, ID); } -pcb_logline_t *pcb_log_find_first_unseen(void) +rnd_logline_t *rnd_log_find_first_unseen(void) { - pcb_logline_t *n; - for(n = pcb_log_last; n != NULL; n = n->prev) + rnd_logline_t *n; + for(n = rnd_log_last; n != NULL; n = n->prev) if (n->seen) return n->next; - return pcb_log_first; + return rnd_log_first; } -void pcb_log_del_range(unsigned long from, unsigned long to) +void rnd_log_del_range(unsigned long from, unsigned long to) { - pcb_logline_t *start = pcb_log_find_min(from), *end = NULL; - pcb_logline_t *next, *n, *start_prev, *end_next; + rnd_logline_t *start = rnd_log_find_min(from), *end = NULL; + rnd_logline_t *next, *n, *start_prev, *end_next; if (start == NULL) return; /* start is beyond the end of the list - do not delete anything */ if (to != -1) - end = pcb_log_find_min_(start, to); + end = rnd_log_find_min_(start, to); if (end == NULL) - end = pcb_log_last; + end = rnd_log_last; /* remember boundary elems near the range */ start_prev = start->prev; @@ -151,20 +151,20 @@ if (start_prev != NULL) start_prev->next = end_next; else - pcb_log_first = end_next; + rnd_log_first = end_next; if (end_next != NULL) end_next->prev = start_prev; else - pcb_log_last = start_prev; + rnd_log_last = start_prev; } -int pcb_log_export(rnd_hidlib_t *hidlib, const char *fn, int fmt_lihata) +int rnd_log_export(rnd_hidlib_t *hidlib, const char *fn, int fmt_lihata) { FILE *f; - pcb_logline_t *n; + rnd_logline_t *n; f = pcb_fopen(hidlib, fn, "w"); if (f == NULL) @@ -175,7 +175,7 @@ fprintf(f, " li:entries {\n"); } - for(n = pcb_log_first; n != NULL; n = n->next) { + for(n = rnd_log_first; n != NULL; n = n->next) { if (fmt_lihata) { fprintf(f, " ha:%lu {", n->ID); fprintf(f, "stamp=%ld; level=%d; seen=%d; ", (long int)n->stamp, n->level, n->seen); @@ -192,9 +192,9 @@ return 0; } -void pcb_log_uninit(void) +void rnd_log_uninit(void) { - pcb_log_del_range(-1, -1); + rnd_log_del_range(-1, -1); } @@ -213,7 +213,7 @@ unsigned long from = -1, to = -1; rnd_PCB_ACT_MAY_CONVARG(2, FGW_ULONG, Log, from = fgw_keyword(&argv[2])); rnd_PCB_ACT_MAY_CONVARG(3, FGW_ULONG, Log, from = fgw_keyword(&argv[3])); - pcb_log_del_range(from, to); + rnd_log_del_range(from, to); pcb_event(NULL, PCB_EVENT_LOG_CLEAR, "pp", &from, &to); ret = 0; } @@ -228,9 +228,9 @@ wfmt = PCB_DAD_CURRENT(fmtsub.dlg); fn = pcb_gui->fileselect(pcb_gui, "Export log", NULL, "log.txt", NULL, NULL, "log", PCB_HID_FSD_MAY_NOT_EXIST, &fmtsub); if (fn != NULL) { - ret = pcb_log_export(NULL, fn, (fmtsub.dlg[wfmt].val.lng == 1)); + ret = rnd_log_export(NULL, fn, (fmtsub.dlg[wfmt].val.lng == 1)); if (ret != 0) - rnd_message(PCB_MSG_ERROR, "Failed to export log to '%s'\n", fn); + rnd_message(RND_MSG_ERROR, "Failed to export log to '%s'\n", fn); free(fn); } else @@ -250,7 +250,7 @@ /* DOC: message.html */ static fgw_error_t pcb_act_Message(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - int i, how = PCB_MSG_INFO; + int i, how = RND_MSG_INFO; if (argc < 2) RND_ACT_FAIL(Message); @@ -259,10 +259,10 @@ if (argc > 2) { const char *hows; rnd_PCB_ACT_MAY_CONVARG(i, FGW_STR, Message, hows = argv[i].val.str); - if (strcmp(hows, "ERROR") == 0) { i++; how = PCB_MSG_ERROR; } - else if (strcmp(hows, "WARNING") == 0) { i++; how = PCB_MSG_WARNING; } - else if (strcmp(hows, "INFO") == 0) { i++; how = PCB_MSG_INFO; } - else if (strcmp(hows, "DEBUG") == 0) { i++; how = PCB_MSG_DEBUG; } + if (strcmp(hows, "ERROR") == 0) { i++; how = RND_MSG_ERROR; } + else if (strcmp(hows, "WARNING") == 0) { i++; how = RND_MSG_WARNING; } + else if (strcmp(hows, "INFO") == 0) { i++; how = RND_MSG_INFO; } + else if (strcmp(hows, "DEBUG") == 0) { i++; how = RND_MSG_DEBUG; } } RND_ACT_IRES(0); Index: trunk/src/librnd/core/error.h =================================================================== --- trunk/src/librnd/core/error.h (revision 30954) +++ trunk/src/librnd/core/error.h (revision 30955) @@ -26,70 +26,70 @@ /* Messages, error reporting, debug and logging */ -#ifndef PCB_ERROR_H -#define PCB_ERROR_H +#ifndef RND_ERROR_H +#define RND_ERROR_H #include #include -/* pcb_printf()-like call to print temporary trace messages to stderr; +/* rnd_printf()-like call to print temporary trace messages to stderr; disabled in non-debug compilation */ -void pcb_trace(const char *Format, ...); +void rnd_trace(const char *Format, ...); -typedef enum pcb_message_level { - PCB_MSG_DEBUG = 0, /* Debug message. Should probably not be shown in regular operation. */ - PCB_MSG_INFO, /* Info message. FYI for the user, no action needed. */ - PCB_MSG_WARNING, /* Something the user should probably take note */ - PCB_MSG_ERROR /* Couldn't finish an action, needs user attention. */ -} pcb_message_level_t; +typedef enum rnd_message_level_s { + RND_MSG_DEBUG = 0, /* Debug message. Should probably not be shown in regular operation. */ + RND_MSG_INFO, /* Info message. FYI for the user, no action needed. */ + RND_MSG_WARNING, /* Something the user should probably take note */ + RND_MSG_ERROR /* Couldn't finish an action, needs user attention. */ +} rnd_message_level_t; /*** central log write API ***/ /* printf-like logger to the log dialog and stderr */ -void rnd_message(enum pcb_message_level level, const char *Format, ...); +void rnd_message(rnd_message_level_t level, const char *Format, ...); /* shorthands for indicating common errors using rnd_message() */ -#define pcb_FS_error_message(filename, func) rnd_message(PCB_MSG_ERROR, "Can't open file\n '%s'\n" func "() returned: '%s'\n", filename, strerror(errno)) +#define rnd_FS_error_message(filename, func) rnd_message(RND_MSG_ERROR, "Can't open file\n '%s'\n" func "() returned: '%s'\n", filename, strerror(errno)) -#define pcb_open_error_message(filename) pcb_FS_error_message(filename, "open") -#define pcb_popen_error_message(filename) pcb_FS_error_message(filename, "popen") -#define pcb_opendir_error_message(filename) pcb_FS_error_message(filename, "opendir") -#define pcb_chdir_error_message(filename) pcb_FS_error_message(filename, "chdir") +#define rnd_open_error_message(filename) rnd_FS_error_message(filename, "open") +#define rnd_popen_error_message(filename) rnd_FS_error_message(filename, "popen") +#define rnd_opendir_error_message(filename) rnd_FS_error_message(filename, "opendir") +#define rnd_chdir_error_message(filename) rnd_FS_error_message(filename, "chdir") /*** central log storage and read API ***/ -typedef struct pcb_logline_s pcb_logline_t; +typedef struct rnd_logline_s rnd_logline_t; -struct pcb_logline_s { +struct rnd_logline_s { time_t stamp; unsigned long ID; - pcb_message_level_t level; + rnd_message_level_t level; unsigned seen:1; /* message ever shown to the user - set by the code that presented the message */ - pcb_logline_t *prev, *next; + rnd_logline_t *prev, *next; size_t len; char str[1]; }; -extern unsigned long pcb_log_next_ID; +extern unsigned long rnd_log_next_ID; /* Return the first log line that has at least the specified value in its ID. */ -pcb_logline_t *pcb_log_find_min(unsigned long ID); -pcb_logline_t *pcb_log_find_min_(pcb_logline_t *from, unsigned long ID); +rnd_logline_t *rnd_log_find_min(unsigned long ID); +rnd_logline_t *rnd_log_find_min_(rnd_logline_t *from, unsigned long ID); /* Search back from the bottom of the log and return the oldest unseen entry (or NULL if all entries have been shown) */ -pcb_logline_t *pcb_log_find_first_unseen(void); +rnd_logline_t *rnd_log_find_first_unseen(void); /* Remove log lines between ID from and to, inclusive; -1 in these fields mean begin or end of the list. */ -void pcb_log_del_range(unsigned long from, unsigned long to); +void rnd_log_del_range(unsigned long from, unsigned long to); /* Export the whole log list to a file, in lihata or plain text */ -int pcb_log_export(rnd_hidlib_t *hidlib, const char *fn, int fmt_lihata); +int rnd_log_export(rnd_hidlib_t *hidlib, const char *fn, int fmt_lihata); /* Free all memory and reset the log system */ -void pcb_log_uninit(void); +void rnd_log_uninit(void); -extern pcb_logline_t *pcb_log_first, *pcb_log_last; +extern rnd_logline_t *rnd_log_first, *rnd_log_last; #endif Index: trunk/src/librnd/core/event.c =================================================================== --- trunk/src/librnd/core/event.c (revision 30954) +++ trunk/src/librnd/core/event.c (revision 30955) @@ -198,7 +198,7 @@ va_start(ap, fmt); for (a++, fa++; *fmt != '\0'; fmt++, a++, fa++, argc++) { if (argc >= EVENT_MAX_ARG) { - rnd_message(PCB_MSG_ERROR, "pcb_event(): too many arguments\n"); + rnd_message(RND_MSG_ERROR, "pcb_event(): too many arguments\n"); break; } switch (*fmt) { @@ -239,7 +239,7 @@ a->type = PCB_EVARG_INT; a->d.i = 0; fa->type = FGW_INVALID; - rnd_message(PCB_MSG_ERROR, "pcb_event(): invalid argument type '%c'\n", *fmt); + rnd_message(RND_MSG_ERROR, "pcb_event(): invalid argument type '%c'\n", *fmt); break; } } Index: trunk/src/librnd/core/gui_act.c =================================================================== --- trunk/src/librnd/core/gui_act.c (revision 30954) +++ trunk/src/librnd/core/gui_act.c (revision 30955) @@ -50,7 +50,7 @@ static fgw_error_t pcb_act_CreateMenu(fgw_arg_t *res, int argc, fgw_arg_t *argv) { if (pcb_gui == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can't create menu, there's no GUI hid loaded\n"); + rnd_message(RND_MSG_ERROR, "Error: can't create menu, there's no GUI hid loaded\n"); RND_ACT_IRES(-1); return 0; } @@ -84,13 +84,13 @@ static fgw_error_t pcb_act_RemoveMenu(fgw_arg_t *res, int argc, fgw_arg_t *argv) { if (pcb_gui == NULL) { - rnd_message(PCB_MSG_ERROR, "can't remove menu, there's no GUI hid loaded\n"); + rnd_message(RND_MSG_ERROR, "can't remove menu, there's no GUI hid loaded\n"); RND_ACT_IRES(-1); return 0; } if (pcb_gui->remove_menu == NULL) { - rnd_message(PCB_MSG_ERROR, "can't remove menu, the GUI doesn't support it\n"); + rnd_message(RND_MSG_ERROR, "can't remove menu, the GUI doesn't support it\n"); RND_ACT_IRES(-1); return 0; } @@ -97,7 +97,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, RemoveMenu, ;); if (pcb_gui->remove_menu(pcb_gui, argv[1].val.str) != 0) { - rnd_message(PCB_MSG_ERROR, "failed to remove some of the menu items\n"); + rnd_message(RND_MSG_ERROR, "failed to remove some of the menu items\n"); RND_ACT_IRES(-1); } else @@ -319,10 +319,10 @@ if ((pcb_gui != NULL) && (pcb_gui->benchmark != NULL)) { fps = pcb_gui->benchmark(pcb_gui); - rnd_message(PCB_MSG_INFO, "%f redraws per second\n", fps); + rnd_message(RND_MSG_INFO, "%f redraws per second\n", fps); } else - rnd_message(PCB_MSG_ERROR, "benchmark is not available in the current HID\n"); + rnd_message(RND_MSG_ERROR, "benchmark is not available in the current HID\n"); RND_ACT_DRES(fps); return 0; Index: trunk/src/librnd/core/hid_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 30954) +++ trunk/src/librnd/core/hid_attrib.c (revision 30955) @@ -120,7 +120,7 @@ default: if (PCB_HATT_IS_COMPOSITE(a->type)) /* function callback */ break; - rnd_message(PCB_MSG_ERROR, "Invalid attribute type %d for attribute %s\n", a->type, a->name); + rnd_message(RND_MSG_ERROR, "Invalid attribute type %d for attribute %s\n", a->type, a->name); abort(); } } @@ -234,7 +234,7 @@ (*argv)++; } else { - rnd_message(PCB_MSG_ERROR, "Multiple filenames not supported. First filename was: %s; offending second filename: %s\n", filename, (*argv)[0]); + rnd_message(RND_MSG_ERROR, "Multiple filenames not supported. First filename was: %s; offending second filename: %s\n", filename, (*argv)[0]); return -1; } } Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 30954) +++ trunk/src/librnd/core/hid_cfg.c (revision 30955) @@ -49,7 +49,7 @@ const char *fn; int line, col; lht_dom_loc_active(doc, &fn, &line, &col); - rnd_message(PCB_MSG_ERROR, "Resource error: %s (%s:%d.%d)*\n", lht_err_str(err), filename, line+1, col+1); + rnd_message(RND_MSG_ERROR, "Resource error: %s (%s:%d.%d)*\n", lht_err_str(err), filename, line+1, col+1); return 1; } @@ -374,7 +374,7 @@ va_start(ap, fmt); end += pcb_vsnprintf(end, maxlen, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_ERROR, hid_cfg_error_shared); + rnd_message(RND_MSG_ERROR, hid_cfg_error_shared); } /*** minimal menu support for feature plugins - needs to stay in core ***/ @@ -435,7 +435,7 @@ used += len+1; } memcpy(path+used, name, l0+1); -/* pcb_trace("path='%s' used=%d\n", path, used);*/ +/* rnd_trace("path='%s' used=%d\n", path, used);*/ cb(ctx, pcb_gui->hid_cfg, node, path); used = 0; } @@ -459,7 +459,7 @@ break; ncookie = lht_dom_hash_get(node, "cookie"); -/* pcb_trace(" '%s' cookie='%s'\n", node->name, ncookie == NULL ? "NULL":ncookie->data.text.value );*/ +/* rnd_trace(" '%s' cookie='%s'\n", node->name, ncookie == NULL ? "NULL":ncookie->data.text.value );*/ if ((ncookie == NULL) || (ncookie->type != LHT_TEXT) || (strcmp(ncookie->data.text.value, cookie) != 0)) break; Index: trunk/src/librnd/core/hid_cfg_input.c =================================================================== --- trunk/src/librnd/core/hid_cfg_input.c (revision 30954) +++ trunk/src/librnd/core/hid_cfg_input.c (revision 30955) @@ -59,7 +59,7 @@ else if ((vlen >= 7) && (rnd_strncasecmp(value, "release", 7) == 0)) m |= PCB_M_Release; else if ((vlen >= 5) && (rnd_strncasecmp(value, "press", 5) == 0)) press = 1; else - rnd_message(PCB_MSG_ERROR, "Unknown modifier: %s\n", value); + rnd_message(RND_MSG_ERROR, "Unknown modifier: %s\n", value); /* skip to next word */ next = strpbrk(value, "<- \t"); if (next == NULL) @@ -75,7 +75,7 @@ *last = value; if (press && (m & PCB_M_Release)) - rnd_message(PCB_MSG_ERROR, "Bogus modifier: both press and release\n"); + rnd_message(RND_MSG_ERROR, "Bogus modifier: both press and release\n"); return m; } @@ -95,7 +95,7 @@ else if (rnd_strcasecmp(name, "scroll-left") == 0) return PCB_MB_SCROLL_UP; else if (rnd_strcasecmp(name, "scroll-right") == 0) return PCB_MB_SCROLL_DOWN; else { - rnd_message(PCB_MSG_ERROR, "Error: unknown mouse button: %s\n", name); + rnd_message(RND_MSG_ERROR, "Error: unknown mouse button: %s\n", name); return 0; } } @@ -127,7 +127,7 @@ mouse->mouse = pcb_hid_cfg_get_menu(hr, "/mouse"); if (mouse->mouse == NULL) { - rnd_message(PCB_MSG_ERROR, "Warning: no /mouse section in the resource file - mouse is disabled\n"); + rnd_message(RND_MSG_ERROR, "Warning: no /mouse section in the resource file - mouse is disabled\n"); return -1; } @@ -258,7 +258,7 @@ return *desc; if (len > sizeof(tmp)-1) { - rnd_message(PCB_MSG_ERROR, "key sym name too long\n"); + rnd_message(RND_MSG_ERROR, "key sym name too long\n"); return 0; } strncpy(tmp, desc, len); @@ -304,7 +304,7 @@ k = strchr(last, '<'); if (k == NULL) { - rnd_message(PCB_MSG_ERROR, "Missing in the key description: '%s' at %s:%ld\n", keydesc, loc->file_name, loc->line+1); + rnd_message(RND_MSG_ERROR, "Missing in the key description: '%s' at %s:%ld\n", keydesc, loc->file_name, loc->line+1); return -1; } len -= k-last; @@ -324,7 +324,7 @@ k++; len--; } else { - rnd_message(PCB_MSG_ERROR, "Missing or in the key description starting at %s at %s:%ld\n", k-1, loc->file_name, loc->line+1); + rnd_message(RND_MSG_ERROR, "Missing or in the key description starting at %s at %s:%ld\n", k-1, loc->file_name, loc->line+1); return -1; } @@ -333,7 +333,7 @@ s = malloc(len+1); memcpy(s, k, len); s[len] = '\0'; - rnd_message(PCB_MSG_ERROR, "Unrecognised key symbol in key description: %s at %s:%ld\n", s, loc->file_name, loc->line+1); + rnd_message(RND_MSG_ERROR, "Unrecognised key symbol in key description: %s at %s:%ld\n", s, loc->file_name, loc->line+1); free(s); return -1; } @@ -371,7 +371,7 @@ s = pcb_hid_cfg_keys_add_under(km, lasts, mods[n], key_raws[n], key_trs[n], terminal, &errmsg); if (s == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to add hotkey binding: %s: %s\n", keydesc, errmsg); + rnd_message(RND_MSG_ERROR, "Failed to add hotkey binding: %s: %s\n", keydesc, errmsg); TODO(": free stuff?") return -1; } @@ -552,7 +552,7 @@ if (key_raw == 0) { static int warned = 0; if (!warned) { - rnd_message(PCB_MSG_ERROR, "Keyboard translation error: probably the US layout is not enabled. Some hotkeys may not work properly\n"); + rnd_message(RND_MSG_ERROR, "Keyboard translation error: probably the US layout is not enabled. Some hotkeys may not work properly\n"); warned = 1; } /* happens if only the translated version is available. Try to reverse Index: trunk/src/librnd/core/hid_dad_spin.c =================================================================== --- trunk/src/librnd/core/hid_dad_spin.c (revision 30954) +++ trunk/src/librnd/core/hid_dad_spin.c (revision 30955) @@ -405,7 +405,7 @@ if (!spin->no_unit_chg) spin->unit = unit; break; - default: pcb_trace("INTERNAL ERROR: spin_set_num\n"); + default: rnd_trace("INTERNAL ERROR: spin_set_num\n"); } spin_warn(hid_ctx, spin, end, warn); @@ -517,7 +517,7 @@ free((char *)str->val.str); str->val.str = gen_str_coord(spin, c, NULL, 0); break; - default: pcb_trace("INTERNAL ERROR: spin_set_num\n"); + default: rnd_trace("INTERNAL ERROR: spin_set_num\n"); } } Index: trunk/src/librnd/core/hid_dlg.c =================================================================== --- trunk/src/librnd/core/hid_dlg.c (revision 30954) +++ trunk/src/librnd/core/hid_dlg.c (revision 30955) @@ -261,7 +261,7 @@ { if (PCB_HAVE_GUI_ATTR_DLG && (fgw_func_lookup(&rnd_fgw, "printgui") != NULL)) return rnd_actionv_bin(RND_ACT_HIDLIB, "printgui", res, argc, argv); - rnd_message(PCB_MSG_ERROR, "action Print() is available only under a GUI HID. Please use the lpr exporter instead.\n"); + rnd_message(RND_MSG_ERROR, "action Print() is available only under a GUI HID. Please use the lpr exporter instead.\n"); return FGW_ERR_NOT_FOUND; } Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 30954) +++ trunk/src/librnd/core/hid_init.c (revision 30955) @@ -417,7 +417,7 @@ if (res == 0) break; /* HID accepted, don't try anything else */ if (res < 0) { - rnd_message(PCB_MSG_ERROR, "Failed to initialize HID %s (unrecoverable, have to give up)\n", pcb_gui->name); + rnd_message(RND_MSG_ERROR, "Failed to initialize HID %s (unrecoverable, have to give up)\n", pcb_gui->name); return -1; } fprintf(stderr, "Failed to initialize HID %s (recoverable)\n", pcb_gui->name); @@ -424,10 +424,10 @@ if (apg == NULL) { if (pcbhl_conf.rc.hid_fallback) { ran_out_of_hids:; - rnd_message(PCB_MSG_ERROR, "Tried all available HIDs, all failed, giving up.\n"); + rnd_message(RND_MSG_ERROR, "Tried all available HIDs, all failed, giving up.\n"); } else - rnd_message(PCB_MSG_ERROR, "Not trying any other hid as fallback because rc/hid_fallback is disabled.\n"); + rnd_message(RND_MSG_ERROR, "Not trying any other hid as fallback because rc/hid_fallback is disabled.\n"); return -1; } @@ -624,7 +624,7 @@ case DO_GUI: pcb_render = pcb_gui = pcb_hid_find_gui(ga->hid_name); if (pcb_gui == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find the gui (%s) requested.\n", ga->hid_name); + rnd_message(RND_MSG_ERROR, "Can't find the gui (%s) requested.\n", ga->hid_name); return 1; } break; @@ -641,7 +641,7 @@ /* try anything */ if (pcb_gui == NULL) { - rnd_message(PCB_MSG_WARNING, "Warning: can't find any of the preferred GUIs, falling back to anything available...\nYou may want to check if the plugin is loaded, try --dump-plugins and --dump-plugindirs\n"); + rnd_message(RND_MSG_WARNING, "Warning: can't find any of the preferred GUIs, falling back to anything available...\nYou may want to check if the plugin is loaded, try --dump-plugins and --dump-plugindirs\n"); pcb_render = pcb_gui = pcb_hid_find_gui(NULL); } } @@ -665,7 +665,7 @@ if (ga->main_action != NULL) { int res = rnd_parse_command(NULL, ga->main_action, pcb_true); /* hidlib is NULL because there is no context yet */ if ((res != 0) && (ga->main_action_hint != NULL)) - rnd_message(PCB_MSG_ERROR, "\nHint: %s\n", ga->main_action_hint); + rnd_message(RND_MSG_ERROR, "\nHint: %s\n", ga->main_action_hint); pcbhl_log_print_uninit_errs("main_action parse error"); *exitval = res; return 1; @@ -686,7 +686,7 @@ return 0; if (is_empty) - rnd_message(PCB_MSG_WARNING, "Exporting empty board (nothing loaded or drawn).\n"); + rnd_message(RND_MSG_WARNING, "Exporting empty board (nothing loaded or drawn).\n"); if (pcb_gui->set_hidlib != NULL) pcb_gui->set_hidlib(pcb_gui, hidlib); pcb_event(hidlib, PCB_EVENT_EXPORT_SESSION_BEGIN, NULL); Index: trunk/src/librnd/core/hid_nogui.c =================================================================== --- trunk/src/librnd/core/hid_nogui.c (revision 30954) +++ trunk/src/librnd/core/hid_nogui.c (revision 30955) @@ -395,12 +395,12 @@ if (pcbhl_conf.rc.quiet) return 0; if (message == NULL) { - if ((on) && (pcbhl_conf.rc.verbose >= PCB_MSG_INFO)) + if ((on) && (pcbhl_conf.rc.verbose >= RND_MSG_INFO)) fprintf(stderr, "progress: finished\n"); on = 0; } else { - if ((pcbhl_conf.rc.verbose >= PCB_MSG_INFO) || (pcb_gui != &nogui_hid)) { + if ((pcbhl_conf.rc.verbose >= RND_MSG_INFO) || (pcb_gui != &nogui_hid)) { now = rnd_dtime(); if (now >= nextt) { fprintf(stderr, "progress: %ld/%ld %s\n", so_far, total, message); @@ -420,7 +420,7 @@ { static int warned = 0; if (!warned) { - rnd_message(PCB_MSG_ERROR, "The current GUI HID does not support clipboard.\nClipboard is emulated, not shared withother programs\n"); + rnd_message(RND_MSG_ERROR, "The current GUI HID does not support clipboard.\nClipboard is emulated, not shared withother programs\n"); warned = 1; } return 0; Index: trunk/src/librnd/core/hidlib.c =================================================================== --- trunk/src/librnd/core/hidlib.c (revision 30954) +++ trunk/src/librnd/core/hidlib.c (revision 30955) @@ -49,11 +49,11 @@ void pcbhl_log_print_uninit_errs(const char *title) { - pcb_logline_t *n, *from = pcb_log_find_first_unseen(); + rnd_logline_t *n, *from = rnd_log_find_first_unseen(); int printed = 0; for(n = from; n != NULL; n = n->next) { - if ((n->level >= PCB_MSG_INFO) || pcbhl_conf.rc.verbose) { + if ((n->level >= RND_MSG_INFO) || pcbhl_conf.rc.verbose) { if (!printed) fprintf(stderr, "*** %s:\n", title); fprintf(stderr, "%s", n->str); Index: trunk/src/librnd/core/paths.c =================================================================== --- trunk/src/librnd/core/paths.c (revision 30954) +++ trunk/src/librnd/core/paths.c (revision 30955) @@ -152,7 +152,7 @@ if ((*template == '~') && (flags & PCB_SUBST_HOME)) { if (pcbhl_conf.rc.path.home == NULL) { - rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve home dir required for path %s\n", template); + rnd_message(RND_MSG_ERROR, "pcb_strdup_subst(): can't resolve home dir required for path %s\n", template); goto error; } gds_append_str(s, pcbhl_conf.rc.path.home); @@ -225,7 +225,7 @@ size_t len = end - start; if (len > sizeof(path) - 1) { if (!(flags & PCB_SUBST_QUIET)) - rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $() conf var, name too long: %s\n", start); + rnd_message(RND_MSG_ERROR, "pcb_strdup_subst(): can't resolve $() conf var, name too long: %s\n", start); goto error; } memcpy(path, start, len); @@ -236,12 +236,12 @@ cn = rnd_conf_get_field(path); if (cn == NULL) { if (!(flags & PCB_SUBST_QUIET)) - rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: not found in the conf tree\n", path); + rnd_message(RND_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: not found in the conf tree\n", path); goto error; } if (cn->type != RND_CFN_STRING) { if (!(flags & PCB_SUBST_QUIET)) - rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: value type is not string\n", path); + rnd_message(RND_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: value type is not string\n", path); goto error; } if (cn->val.string[0] != NULL) { @@ -260,7 +260,7 @@ } else { if (!(flags & PCB_SUBST_QUIET)) - rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): unterminated $(%s)\n", start); + rnd_message(RND_MSG_ERROR, "pcb_strdup_subst(): unterminated $(%s)\n", start); goto error; } break; Index: trunk/src/librnd/core/pixmap.c =================================================================== --- trunk/src/librnd/core/pixmap.c (revision 30954) +++ trunk/src/librnd/core/pixmap.c (revision 30955) @@ -135,7 +135,7 @@ { pcb_pixmap_import_t *i; for(i = pcb_pixmap_chain; i != NULL; i = i->next) - rnd_message(PCB_MSG_ERROR, "pcb_pixmap_chain is not empty: %s. Fix your plugins!\n", i->cookie); + rnd_message(RND_MSG_ERROR, "pcb_pixmap_chain is not empty: %s. Fix your plugins!\n", i->cookie); } int pcb_pixmap_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) Index: trunk/src/librnd/core/safe_fs.c =================================================================== --- trunk/src/librnd/core/safe_fs.c (revision 30954) +++ trunk/src/librnd/core/safe_fs.c (revision 30955) @@ -57,7 +57,7 @@ #define CHECK(func, op, arg1, arg2, err_inst) \ do { \ if (pcb_safe_fs_check(op, arg1, arg2) != 0) { \ - rnd_message(PCB_MSG_ERROR, "File system operation %s(): access denied on %s(%s,%s)\n", func, op, arg1, arg2); \ + rnd_message(RND_MSG_ERROR, "File system operation %s(): access denied on %s(%s,%s)\n", func, op, arg1, arg2); \ err_inst; \ } \ } while(0) Index: trunk/src/librnd/core/tool.c =================================================================== --- trunk/src/librnd/core/tool.c (revision 30954) +++ trunk/src/librnd/core/tool.c (revision 30955) @@ -61,7 +61,7 @@ { while(vtp0_len(&pcb_tools) != 0) { const pcb_tool_t *tool = pcb_tool_get(0); - rnd_message(PCB_MSG_WARNING, "Unregistered tool: %s of %s; check your plugins, fix them to unregister their tools!\n", tool->name, tool->cookie); + rnd_message(RND_MSG_WARNING, "Unregistered tool: %s of %s; check your plugins, fix them to unregister their tools!\n", tool->name, tool->cookie); pcb_tool_unreg_by_cookie(tool->cookie); } vtp0_uninit(&pcb_tools); @@ -186,7 +186,7 @@ int pcb_tool_restore(rnd_hidlib_t *hidlib) { if (save_position == 0) { - rnd_message(PCB_MSG_ERROR, "hace: underflow of restore mode\n"); + rnd_message(RND_MSG_ERROR, "hace: underflow of restore mode\n"); return -1; } return pcb_tool_select_by_id(hidlib, save_stack[--save_position]); @@ -351,7 +351,7 @@ } else { if (pcb_tool_select_by_name(RND_ACT_HIDLIB, cmd) != 0) - rnd_message(PCB_MSG_ERROR, "No such tool: '%s'\n", cmd); + rnd_message(RND_MSG_ERROR, "No such tool: '%s'\n", cmd); } pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); return 0; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30954) +++ trunk/src/librnd/pcb_compat.h (revision 30955) @@ -369,3 +369,25 @@ #define pcb_conf_loglevel_props rnd_conf_loglevel_props #define pcb_conf_hid_global_cb_int rnd_conf_hid_global_cb_int #define pcb_conf_hid_global_cb_ptr rnd_conf_hid_global_cb_ptr +#define pcb_trace rnd_trace +#define pcb_log_find_min rnd_log_find_min +#define pcb_log_find_min_ rnd_log_find_min_ +#define pcb_log_find_first_unseen rnd_log_find_first_unseen +#define pcb_log_del_range rnd_log_del_range +#define pcb_log_export rnd_log_export +#define pcb_log_uninit rnd_log_uninit +#define PCB_MSG_DEBUG RND_MSG_DEBUG +#define PCB_MSG_INFO RND_MSG_INFO +#define PCB_MSG_WARNING RND_MSG_WARNING +#define PCB_MSG_ERROR RND_MSG_ERROR +#define pcb_message_level_t rnd_message_level_t +#define pcb_FS_error_message rnd_FS_error_message +#define pcb_logline_s rnd_logline_s +#define pcb_logline_t rnd_logline_t +#define pcb_open_error_message rnd_open_error_message +#define pcb_popen_error_message rnd_popen_error_message +#define pcb_opendir_error_message rnd_opendir_error_message +#define pcb_chdir_error_message rnd_chdir_error_message +#define pcb_log_next_ID rnd_log_next_ID +#define pcb_log_first rnd_log_first +#define pcb_log_last rnd_log_last Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 30954) +++ trunk/src/main.c (revision 30955) @@ -255,10 +255,10 @@ static const char *plugin_name = "dialogs"; int state = 0; loaded = 1; - rnd_message(PCB_MSG_DEBUG, "Loading GUI support plugin: '%s'\n", plugin_name); + rnd_message(RND_MSG_DEBUG, "Loading GUI support plugin: '%s'\n", plugin_name); puphand = pup_load(&pcb_pup, (const char **)pcb_pup_paths, plugin_name, 0, &state); if (puphand == NULL) - rnd_message(PCB_MSG_ERROR, "Error: failed to load GUI support plugin '%s'\n-> expect missing widgets and dialog boxes\n", plugin_name); + rnd_message(RND_MSG_ERROR, "Error: failed to load GUI support plugin '%s'\n-> expect missing widgets and dialog boxes\n", plugin_name); } if (!load && loaded && (puphand != NULL)) { pup_unload(&pcb_pup, puphand, NULL); @@ -316,8 +316,8 @@ void pcb_main_uninit(void) { - if (pcb_log_last != NULL) - pcb_log_last->seen = 1; /* ignore anything unseen before the uninit */ + if (rnd_log_last != NULL) + rnd_log_last->seen = 1; /* ignore anything unseen before the uninit */ conf_core_uninit_pre(); pcb_brave_uninit(); @@ -363,7 +363,7 @@ pcb_poly_uninit(); pcbhl_log_print_uninit_errs("Log produced during uninitialization"); - pcb_log_uninit(); + rnd_log_uninit(); main_path_uninit(); conf_core_uninit(); } @@ -386,7 +386,7 @@ void print_pup_err(pup_err_stack_t *entry, char *string) { - rnd_message(PCB_MSG_ERROR, "puplug: %s\n", string); + rnd_message(RND_MSG_ERROR, "puplug: %s\n", string); } #include "funchash_core.h" @@ -463,16 +463,16 @@ pcb_text_init(); if (pcb_pup.err_stack != NULL) { - rnd_message(PCB_MSG_ERROR, "Some of the static linked buildins could not be loaded:\n"); + rnd_message(RND_MSG_ERROR, "Some of the static linked buildins could not be loaded:\n"); pup_err_stack_process_str(&pcb_pup, print_pup_err); } for(sp = pcb_pup_paths; *sp != NULL; sp++) { - rnd_message(PCB_MSG_DEBUG, "Loading plugins from '%s'\n", *sp); + rnd_message(RND_MSG_DEBUG, "Loading plugins from '%s'\n", *sp); pup_autoload_dir(&pcb_pup, *sp, (const char **)pcb_pup_paths); } if (pcb_pup.err_stack != NULL) { - rnd_message(PCB_MSG_ERROR, "Some of the dynamic linked plugins could not be loaded:\n"); + rnd_message(RND_MSG_ERROR, "Some of the dynamic linked plugins could not be loaded:\n"); pup_err_stack_process_str(&pcb_pup, print_pup_err); } @@ -499,7 +499,7 @@ PCB = pcb_board_new(0); if (PCB == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't create an empty layout, exiting\n"); + rnd_message(RND_MSG_ERROR, "Can't create an empty layout, exiting\n"); pcbhl_log_print_uninit_errs("Initialization"); exit(1); } @@ -520,7 +520,7 @@ int how = conf_core.rc.silently_create_on_load ? 0x10 : 0; if (pcb_load_pcb(command_line_pcb, NULL, pcb_true, how) != 0) { if (pcbhl_main_exporting) { - rnd_message(PCB_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_pcb); + rnd_message(RND_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_pcb); pcbhl_log_print_uninit_errs("Export load error"); exit(1); } @@ -530,7 +530,7 @@ } if (conf_core.design.initial_layer_stack && conf_core.design.initial_layer_stack[0]) - rnd_message(PCB_MSG_ERROR, "Config setting desgin/initial_layer_stack is set but is deprecated and ignored. Please edit your config files to remove it.\n"); + rnd_message(RND_MSG_ERROR, "Config setting desgin/initial_layer_stack is set but is deprecated and ignored. Please edit your config files to remove it.\n"); /* read the library file and display it if it's not empty */ if (!pcb_fp_read_lib_all() && pcb_library.data.dir.children.used) @@ -537,11 +537,11 @@ pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); if (conf_core.rc.script_filename) { - rnd_message(PCB_MSG_INFO, "Executing startup script file %s\n", conf_core.rc.script_filename); + rnd_message(RND_MSG_INFO, "Executing startup script file %s\n", conf_core.rc.script_filename); rnd_actionva(&PCB->hidlib, "ExecuteFile", conf_core.rc.script_filename, NULL); } if (conf_core.rc.action_string) { - rnd_message(PCB_MSG_INFO, "Executing startup action %s\n", conf_core.rc.action_string); + rnd_message(RND_MSG_INFO, "Executing startup action %s\n", conf_core.rc.action_string); rnd_parse_actions(&PCB->hidlib, conf_core.rc.action_string); } @@ -558,11 +558,11 @@ gui_support_plugins(1); if (EXPERIMENTAL != NULL) { - rnd_message(PCB_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); - rnd_message(PCB_MSG_ERROR, "This revision of pcb-rnd is experimental, unstable, do NOT attempt to use\n"); - rnd_message(PCB_MSG_ERROR, "it for production. The reason for this state is:\n"); - rnd_message(PCB_MSG_ERROR, "%s\n", EXPERIMENTAL); - rnd_message(PCB_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); + rnd_message(RND_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); + rnd_message(RND_MSG_ERROR, "This revision of pcb-rnd is experimental, unstable, do NOT attempt to use\n"); + rnd_message(RND_MSG_ERROR, "it for production. The reason for this state is:\n"); + rnd_message(RND_MSG_ERROR, "%s\n", EXPERIMENTAL); + rnd_message(RND_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); } pcb_tool_select_by_name(&PCB->hidlib, "arrow"); pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 30954) +++ trunk/src/netlist.c (revision 30955) @@ -108,13 +108,13 @@ int res; if (net == NULL) { - rnd_message(PCB_MSG_ERROR, "undo_term_alloc_undo failed: net is NULL\n"); + rnd_message(RND_MSG_ERROR, "undo_term_alloc_undo failed: net is NULL\n"); return -1; } term = pcb_net_term_get(net, a->refdes, a->term, PCB_NETA_NOALLOC); if (term == NULL) { - rnd_message(PCB_MSG_ERROR, "undo_term_alloc_undo failed: term is NULL\n"); + rnd_message(RND_MSG_ERROR, "undo_term_alloc_undo failed: term is NULL\n"); return -1; } @@ -174,7 +174,7 @@ return pcb_net_term_alloc(net, a->refdes, a->term); } else - rnd_message(PCB_MSG_ERROR, "Internal error: failed to add terminal in an undoable way\nUndo will not affect this temrinal. Please report this bug."); + rnd_message(RND_MSG_ERROR, "Internal error: failed to add terminal in an undoable way\nUndo will not affect this temrinal. Please report this bug."); /* intentional fall-through */ case PCB_NETA_ALLOC: return pcb_net_term_alloc(net, refdes, term); @@ -465,7 +465,7 @@ o = pcb_term_find_name(pcb, pcb->Data, PCB_LYT_COPPER, term->refdes, term->term, NULL, NULL); if (o == NULL) { if (missing != NULL) { - rnd_message(PCB_MSG_WARNING, "Netlist problem: terminal %s-%s is missing from the board but referenced from the netlist\n", term->refdes, term->term); + rnd_message(RND_MSG_WARNING, "Netlist problem: terminal %s-%s is missing from the board but referenced from the netlist\n", term->refdes, term->term); (*missing)++; } return 0; @@ -515,7 +515,7 @@ order = strcmp(net1->name, net2->name); if (order == 0) { - rnd_message(PCB_MSG_ERROR, "netlist internal error: short_ctx_is_dup() net %s shorted with itself?!\n", net1->name); + rnd_message(RND_MSG_ERROR, "netlist internal error: short_ctx_is_dup() net %s shorted with itself?!\n", net1->name); return 1; } if (order > 0) @@ -551,9 +551,9 @@ } if (offnn != NULL) - rnd_message(PCB_MSG_WARNING, "SHORT: net \"%s\" is shorted to \"%s\" at terminal %s-%s\n", sctx->current_net->name, offnn, sc->refdes, offender->term); + rnd_message(RND_MSG_WARNING, "SHORT: net \"%s\" is shorted to \"%s\" at terminal %s-%s\n", sctx->current_net->name, offnn, sc->refdes, offender->term); else - rnd_message(PCB_MSG_WARNING, "SHORT: net \"%s\" is shorted to terminal %s-%s\n", sctx->current_net->name, sc->refdes, offender->term); + rnd_message(RND_MSG_WARNING, "SHORT: net \"%s\" is shorted to terminal %s-%s\n", sctx->current_net->name, sc->refdes, offender->term); pcb_event(&PCB->hidlib, PCB_EVENT_NET_INDICATE_SHORT, "ppppp", sctx->current_net, offender, offn, &handled, &sctx->cancel_advanced); if (!handled) { @@ -774,7 +774,7 @@ found, so some subnets will remain disconnected (there is no point in looping more, this won't improve) */ sctx->missing++; - rnd_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#1)\n"); + rnd_message(RND_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#1)\n"); break; } @@ -790,7 +790,7 @@ } else { sctx->missing++; - rnd_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#2)\n"); + rnd_message(RND_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#2)\n"); } done[bestu] = 1; } @@ -842,7 +842,7 @@ vtp0_init(&subnets); if (acc & PCB_RATACC_INFO) - rnd_message(PCB_MSG_INFO, "\n--- netlist check ---\n"); + rnd_message(RND_MSG_INFO, "\n--- netlist check ---\n"); pcb_net_short_ctx_init(&sctx, pcb, NULL); @@ -873,13 +873,13 @@ if (acc & PCB_RATACC_INFO) { long rem = ratlist_length(&pcb->Data->Rat); if (rem > 0) - rnd_message(PCB_MSG_INFO, "%d rat line%s remaining\n", rem, rem > 1 ? "s" : ""); + rnd_message(RND_MSG_INFO, "%d rat line%s remaining\n", rem, rem > 1 ? "s" : ""); else if (acc & PCB_RATACC_ONLY_SELECTED) - rnd_message(PCB_MSG_WARNING, "No rat for any network that has selected terminal\n"); + rnd_message(RND_MSG_WARNING, "No rat for any network that has selected terminal\n"); else if (sctx.missing > 0) - rnd_message(PCB_MSG_WARNING, "Nothing more to add, but there are\neither rat-lines in the layout, disabled nets\nin the net-list, or missing components\n"); + rnd_message(RND_MSG_WARNING, "Nothing more to add, but there are\neither rat-lines in the layout, disabled nets\nin the net-list, or missing components\n"); else if (sctx.num_shorts == 0) - rnd_message(PCB_MSG_INFO, "Congratulations!!\n" "The layout is complete and has no shorted nets.\n"); + rnd_message(RND_MSG_INFO, "Congratulations!!\n" "The layout is complete and has no shorted nets.\n"); } vtp0_uninit(&subnets); @@ -967,7 +967,7 @@ long old_len, new_len; if ((o1 == o2) || (o1 == NULL) || (o2 == NULL)) { - rnd_message(PCB_MSG_ERROR, "Missing start or end terminal\n"); + rnd_message(RND_MSG_ERROR, "Missing start or end terminal\n"); return NULL; } @@ -977,7 +977,7 @@ sc1 = pcb_obj_parent_subc(o1); sc2 = pcb_obj_parent_subc(o2); if ((sc1 == NULL) || (sc2 == NULL) || (sc1->refdes == NULL) || (sc2->refdes == NULL)) { - rnd_message(PCB_MSG_ERROR, "Both start or end terminal must be in a subcircuit with refdes\n"); + rnd_message(RND_MSG_ERROR, "Both start or end terminal must be in a subcircuit with refdes\n"); return NULL; } @@ -987,11 +987,11 @@ if (term2 != NULL) net1 = term2->parent.net; if ((net1 == net2) && (net1 != NULL)) { - rnd_message(PCB_MSG_ERROR, "Those terminals are already on the same net (%s)\n", net1->name); + rnd_message(RND_MSG_ERROR, "Those terminals are already on the same net (%s)\n", net1->name); return NULL; } if ((net1 != NULL) && (net2 != NULL)) { - rnd_message(PCB_MSG_ERROR, "Can not connect two existing nets with a rat (%s and %s)\n", net1->name, net2->name); + rnd_message(RND_MSG_ERROR, "Can not connect two existing nets with a rat (%s and %s)\n", net1->name, net2->name); return NULL; } } @@ -1007,7 +1007,7 @@ group1 = get_side_group(pcb, o1); group2 = get_side_group(pcb, o2); if ((group1 == -1) && (group2 == -1)) { - rnd_message(PCB_MSG_ERROR, "Can not determine copper layer group of that terminal\n"); + rnd_message(RND_MSG_ERROR, "Can not determine copper layer group of that terminal\n"); return NULL; } @@ -1066,13 +1066,13 @@ o = ptr2; if ((type == PCB_OBJ_VOID) || (o->term == NULL)) { - rnd_message(PCB_MSG_ERROR, "Can't find a terminal at %s\n", loc); + rnd_message(RND_MSG_ERROR, "Can't find a terminal at %s\n", loc); return NULL; } sc = pcb_obj_parent_subc(o); if ((sc == NULL) || (sc->refdes == NULL)) { - rnd_message(PCB_MSG_ERROR, "The terminal terminal found at %s is not part of a subc with refdes\n", loc); + rnd_message(RND_MSG_ERROR, "The terminal terminal found at %s is not part of a subc with refdes\n", loc); return NULL; } Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 30954) +++ trunk/src/netlist_act.c (revision 30955) @@ -69,7 +69,7 @@ int le, lp; if (next > 2) { - rnd_message(PCB_MSG_ERROR, "Exactly two terminals should be selected for swap (more than 2 selected at the moment)\n"); + rnd_message(RND_MSG_ERROR, "Exactly two terminals should be selected for swap (more than 2 selected at the moment)\n"); goto quit; } @@ -84,7 +84,7 @@ PCB_END_LOOP; if (next < 2) { - rnd_message(PCB_MSG_ERROR, "Exactly two terminals should be selected for swap (less than 2 selected at the moment)\n"); + rnd_message(RND_MSG_ERROR, "Exactly two terminals should be selected for swap (less than 2 selected at the moment)\n"); goto quit; } @@ -92,7 +92,7 @@ t1 = pcb_net_find_by_pinname(&PCB->netlist[PCB_NETLIST_EDITED], pins[0]); t2 = pcb_net_find_by_pinname(&PCB->netlist[PCB_NETLIST_EDITED], pins[1]); if ((t1 == NULL) || (t2 == NULL)) { - rnd_message(PCB_MSG_ERROR, "That terminal is not on a net.\n"); + rnd_message(RND_MSG_ERROR, "That terminal is not on a net.\n"); goto quit; } @@ -99,7 +99,7 @@ n1 = t1->parent.net; n2 = t2->parent.net; if (n1 == n2) { - rnd_message(PCB_MSG_ERROR, "Those two terminals are on the same net, can't swap them.\n"); + rnd_message(RND_MSG_ERROR, "Those two terminals are on the same net, can't swap them.\n"); goto quit; } @@ -312,7 +312,7 @@ nfrom = pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], from, 0); if (nfrom == NULL) { - rnd_message(PCB_MSG_ERROR, "No such net: '%s'\n", from); + rnd_message(RND_MSG_ERROR, "No such net: '%s'\n", from); return 1; } @@ -319,13 +319,13 @@ nto = pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], to, 0); if (merge) { if (nto == NULL) { - rnd_message(PCB_MSG_ERROR, "No such net: '%s'\n", to); + rnd_message(RND_MSG_ERROR, "No such net: '%s'\n", to); return 1; } } else { if (nto != NULL) { - rnd_message(PCB_MSG_ERROR, "Net name '%s' already in use\n", to); + rnd_message(RND_MSG_ERROR, "Net name '%s' already in use\n", to); return 1; } nto = pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], to, PCB_NETA_ALLOC); @@ -459,11 +459,11 @@ netlist_unfreeze(PCB); if (argc > 3 && !pin_found) { - rnd_message(PCB_MSG_ERROR, "Net %s has no pin %s\n", a1, a2); + rnd_message(RND_MSG_ERROR, "Net %s has no pin %s\n", a1, a2); return 1; } else if (!net_found) { - rnd_message(PCB_MSG_ERROR, "No net named %s\n", a1); + rnd_message(RND_MSG_ERROR, "No net named %s\n", a1); } @@ -578,7 +578,7 @@ if (termlist.used < 1) { vtp0_uninit(&termlist); - rnd_message(PCB_MSG_ERROR, "Can not claim network: no terminal found.\nPlease pick objects that have terminals with refdes-termID.\n"); + rnd_message(RND_MSG_ERROR, "Can not claim network: no terminal found.\nPlease pick objects that have terminals with refdes-termID.\n"); RND_ACT_IRES(1); return 0; } @@ -595,7 +595,7 @@ if (pcb_net_get(PCB, &PCB->netlist[PCB_NETLIST_EDITED], netname, 0) != NULL) { free(free_netname); vtp0_uninit(&termlist); - rnd_message(PCB_MSG_ERROR, "Can not claim network: '%s' is an existing network\n", netname); + rnd_message(RND_MSG_ERROR, "Can not claim network: '%s' is an existing network\n", netname); RND_ACT_IRES(1); return 0; } @@ -605,7 +605,7 @@ if (net == NULL) { vtp0_uninit(&termlist); - rnd_message(PCB_MSG_ERROR, "Can not claim network: failed to create net '%s'\n", netname); + rnd_message(RND_MSG_ERROR, "Can not claim network: failed to create net '%s'\n", netname); RND_ACT_IRES(1); return 0; } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 30954) +++ trunk/src/obj_arc.c (revision 30955) @@ -458,7 +458,7 @@ if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_arcop_move_buffer\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_arcop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -719,7 +719,7 @@ pcb_arc_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) { - rnd_message(PCB_MSG_WARNING, "Sorry, arc object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, arc object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 30954) +++ trunk/src/obj_common.c (revision 30955) @@ -93,7 +93,7 @@ case PCB_OBJ_ARC_POINT: return pcb_obj_ui_arc_point_bbox(Type, Ptr1, Ptr2, Ptr3, res); default: - rnd_message(PCB_MSG_ERROR, "Request for bounding box of unsupported type %d\n", Type); + rnd_message(RND_MSG_ERROR, "Request for bounding box of unsupported type %d\n", Type); *res = *(rnd_box_t *)Ptr2; return -1; } @@ -175,7 +175,7 @@ pcb_term_add(&subc->terminals, obj); inv = pcb_obj_id_invalid(obj->term); if (inv != NULL) - rnd_message(PCB_MSG_ERROR, "Invalid character '%c' in terminal name (term attribute) '%s'\n", *inv, obj->term); + rnd_message(RND_MSG_ERROR, "Invalid character '%c' in terminal name (term attribute) '%s'\n", *inv, obj->term); } else if (strcmp(name, "intconn") == 0) { long cid = 0; Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 30954) +++ trunk/src/obj_gfx.c (revision 30955) @@ -328,7 +328,7 @@ if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_gfxop_move_buffer\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_gfxop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -419,7 +419,7 @@ pcb_gfx_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, gfx)) { - rnd_message(PCB_MSG_WARNING, "Sorry, gfx object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, gfx object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 30954) +++ trunk/src/obj_line.c (revision 30955) @@ -497,7 +497,7 @@ if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_lineop_move_buffer\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_lineop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -782,7 +782,7 @@ void *ptr1, *ptr2, *ptr3; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line)) { - rnd_message(PCB_MSG_WARNING, "Sorry, line object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, line object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30954) +++ trunk/src/obj_poly.c (revision 30955) @@ -654,7 +654,7 @@ if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_polyop_move_buffer\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_polyop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -706,7 +706,7 @@ } /* poly does not clear other polys */ - rnd_message(PCB_MSG_WARNING, + rnd_message(RND_MSG_WARNING, "To change the clearance of objects in a polygon, change \nthe objects, not the polygon.\n" "Alternatively, set the clearpolypoly flag on the polygon to \nallow it to clear other polygons.\n" "Hint: To set a minimum clearance for a group of objects, \nselect them all then :MinClearGap(Selected,=10,mil)\n", @@ -885,7 +885,7 @@ pcb_poly_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Polygon)) { - rnd_message(PCB_MSG_WARNING, "Sorry, polygon object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, polygon object is locked\n"); return NULL; } if (Layer == ctx->move.dst_layer) Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30954) +++ trunk/src/obj_pstk.c (revision 30955) @@ -1397,7 +1397,7 @@ for(n = 0; (subc == NULL) && (n < PCB_MAX_BUFFER); n++) subc = pcb_subc_by_id(pcb_buffers[n].Data, u->parent_ID); if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack change: parent subc #%ld is not found\n", u->parent_ID); return -1; } data = subc->data; @@ -1407,7 +1407,7 @@ ps = pcb_pstk_by_id(data, u->ID); if (ps == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack change: padstack ID #%ld is not available\n", u->ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack change: padstack ID #%ld is not available\n", u->ID); return -1; } Index: trunk/src/obj_pstk_act.c =================================================================== --- trunk/src/obj_pstk_act.c (revision 30954) +++ trunk/src/obj_pstk_act.c (revision 30955) @@ -89,7 +89,7 @@ } if (pid != PCB_PADSTACK_INVALID) { - rnd_message(PCB_MSG_INFO, "Pad stack registered with ID %d\n", pid); + rnd_message(RND_MSG_INFO, "Pad stack registered with ID %d\n", pid); pcb_pstk_new(PCB_PASTEBUFFER->Data, -1, pid, 0, 0, conf_core.design.clearance, pcb_flag_make(PCB_FLAG_CLEARLINE)); pcb_set_buffer_bbox(PCB_PASTEBUFFER); PCB_PASTEBUFFER->X = PCB_PASTEBUFFER->Y = 0; @@ -96,7 +96,7 @@ RND_ACT_IRES(0); } else { - rnd_message(PCB_MSG_ERROR, "(failed to convert to padstack)\n", pid); + rnd_message(RND_MSG_ERROR, "(failed to convert to padstack)\n", pid); RND_ACT_IRES(1); } @@ -121,12 +121,12 @@ rnd_hid_get_coords("Select a padstack to break up", &x, &y, 0); if ((type = pcb_search_screen(x, y, PCB_OBJ_PSTK, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_PSTK) { - rnd_message(PCB_MSG_ERROR, "Need a padstack under the cursor\n"); + rnd_message(RND_MSG_ERROR, "Need a padstack under the cursor\n"); break; } ps = (pcb_pstk_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, (pcb_any_obj_t *)ps)) { - rnd_message(PCB_MSG_ERROR, "Sorry, that padstack is locked\n"); + rnd_message(RND_MSG_ERROR, "Sorry, that padstack is locked\n"); break; } RND_ACT_IRES(pcb_pstk_proto_breakup(PCB->Data, ps, 1)); @@ -192,19 +192,19 @@ char *end; pid = strtol(pids, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Error in proto ID format: need an integer\n"); + rnd_message(RND_MSG_ERROR, "Error in proto ID format: need an integer\n"); return -1; } } if ((pid >= PCB->Data->ps_protos.used) || (PCB->Data->ps_protos.array[pid].in_use == 0)) { - rnd_message(PCB_MSG_ERROR, "Invalid padstack proto %ld\n", (long)pid); + rnd_message(RND_MSG_ERROR, "Invalid padstack proto %ld\n", (long)pid); return -1; } ps = pcb_pstk_new(PCB->Data, -1, pid, x, y, conf_core.design.clearance, pcb_no_flags()); if (ps == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to place padstack\n"); + rnd_message(RND_MSG_ERROR, "Failed to place padstack\n"); return -1; } Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 30954) +++ trunk/src/obj_pstk_proto.c (revision 30955) @@ -182,7 +182,7 @@ int purpi; if (has_slot) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: multiple mechanical objects (slots) are not allowed\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: multiple mechanical objects (slots) are not allowed\n"); goto quit; } has_slot++; @@ -198,7 +198,7 @@ case PCB_OBJ_PSTK: if (pstk != NULL) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: multiple vias/padstacks\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: multiple vias/padstacks\n"); goto quit; } pstk = *(pcb_pstk_t **)o; @@ -205,7 +205,7 @@ prt = pcb_pstk_get_proto(pstk); if (prt == NULL) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: invalid input padstacks proto\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: invalid input padstacks proto\n"); goto quit; } if (prt->hdia > 0) @@ -213,7 +213,7 @@ dst->hdia = prt->hdia; dst->hplated = prt->hplated; if ((ox != pstk->x) || (oy != pstk->y)) { - rnd_message(PCB_MSG_INFO, "Padstack conversion: adjusting origin to padstack hole\n"); + rnd_message(RND_MSG_INFO, "Padstack conversion: adjusting origin to padstack hole\n"); ox = pstk->x; oy = pstk->y; } @@ -221,7 +221,7 @@ break; default:; if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: invalid object type (%x) selected; must be via, padstack, line or polygon\n", (*o)->type); + rnd_message(RND_MSG_ERROR, "Padstack conversion: invalid object type (%x) selected; must be via, padstack, line or polygon\n", (*o)->type); goto quit; } } @@ -228,13 +228,13 @@ if ((vtp0_len(objs) - extra_obj) > data->LayerN) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: too many objects selected\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: too many objects selected\n"); goto quit; } if ((ts->len == 0) && (pstk == NULL)) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: there are no shapes and there is no via/padstack participating in the conversion; can not create empty padstack\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: there are no shapes and there is no via/padstack participating in the conversion; can not create empty padstack\n"); goto quit; } @@ -276,12 +276,12 @@ n++; if (poly->HoleIndexN != 0) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: can not convert polygon with holes\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: can not convert polygon with holes\n"); goto quit; } if (len >= maxlen) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: polygon has too many points (%ld >= %ld)\n", (long)len, (long)maxlen); + rnd_message(RND_MSG_ERROR, "Padstack conversion: polygon has too many points (%ld >= %ld)\n", (long)len, (long)maxlen); goto quit; } pcb_pstk_shape_alloc_poly(&ts->shape[n].data.poly, len); @@ -311,13 +311,13 @@ for(m = 0; m < n; m++) { if ((ts->shape[n].layer_mask == ts->shape[m].layer_mask) && (ts->shape[n].comb == ts->shape[m].comb)) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: multiple objects on the same layer\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: multiple objects on the same layer\n"); goto quit; } } if ((ts->shape[n].layer_mask & PCB_LYT_COPPER) && (ts->shape[n].layer_mask & PCB_LYT_INTERN) && (!has_hole) && (!has_slot)) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: can not have internal copper shape if there is no hole\n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: can not have internal copper shape if there is no hole\n"); goto quit; } } @@ -324,7 +324,7 @@ if (has_hole && has_slot) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Padstack conversion: can not have both hole (padstack) and slot \n"); + rnd_message(RND_MSG_ERROR, "Padstack conversion: can not have both hole (padstack) and slot \n"); goto quit; } @@ -377,7 +377,7 @@ pcb_poly_t *p; if ((shp->layer_mask & PCB_LYT_ANYTHING) == 0) - rnd_message(PCB_MSG_ERROR, "ERROR: breaking up padstack prototype: shape %d has invalid layer type, placing it on a random layer\nTHIS PADSTACK PROTOTYPE MUST BE FIXED.\n"); + rnd_message(RND_MSG_ERROR, "ERROR: breaking up padstack prototype: shape %d has invalid layer type, placing it on a random layer\nTHIS PADSTACK PROTOTYPE MUST BE FIXED.\n"); /* look up the best layer type */ for(lid = 0; lid < dst->LayerN; lid++) { @@ -421,7 +421,7 @@ mats = pcb_layer_type_bit2str(lyt & PCB_LYT_ANYTHING); if (locs == NULL) locs = ""; if (mats == NULL) mats = ""; - rnd_message(PCB_MSG_WARNING, "Can not create shape on %s %s\n", locs, mats); + rnd_message(RND_MSG_WARNING, "Can not create shape on %s %s\n", locs, mats); continue; } @@ -702,7 +702,7 @@ if (a->in_data) { /* move from data proto vector to undo struct */ int n = pcb_vtpadstack_proto_len(&a->data->ps_protos); if (n < a->pid) { - rnd_message(PCB_MSG_ERROR, "undo_proto_set_swap(): not enough proto in data\n save and exit ASAP and report this bug!\n"); + rnd_message(RND_MSG_ERROR, "undo_proto_set_swap(): not enough proto in data\n save and exit ASAP and report this bug!\n"); return -1; } a->proto = a->data->ps_protos.array[a->pid]; @@ -915,7 +915,7 @@ if (u->parent_ID != -1) { pcb_subc_t *subc = pcb_subc_by_id(PCB->Data, u->parent_ID); if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); return -1; } data = subc->data; @@ -925,7 +925,7 @@ proto = pcb_pstk_get_proto_(data, u->proto); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); return -1; } @@ -992,7 +992,7 @@ if (u->parent_ID != -1) { pcb_subc_t *subc = pcb_subc_by_id(PCB->Data, u->parent_ID); if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); return -1; } data = subc->data; @@ -1002,7 +1002,7 @@ proto = pcb_pstk_get_proto_(data, u->proto); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); + rnd_message(RND_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); return -1; } Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 30954) +++ trunk/src/obj_subc.c (revision 30955) @@ -98,7 +98,7 @@ sc->refdes = value; inv = pcb_obj_id_invalid(sc->refdes); if (inv != NULL) - rnd_message(PCB_MSG_ERROR, "Invalid character '%c' in subc refdes '%s'\n", *inv, sc->refdes); + rnd_message(RND_MSG_ERROR, "Invalid character '%c' in subc refdes '%s'\n", *inv, sc->refdes); } else if (strcmp(name, "extobj") == 0) sc->extobj = value; @@ -228,7 +228,7 @@ return 0; if (sc->aux_layer == NULL) { - rnd_message(PCB_MSG_WARNING, "Can't find subc aux layer\n"); + rnd_message(RND_MSG_WARNING, "Can't find subc aux layer\n"); return -1; } @@ -675,7 +675,7 @@ if (dst_top_silk != NULL) pcb_text_new(dst_top_silk, pcb_font(PCB, 0, 0), buffer->X, buffer->Y, 0, 100, 0, "%a.parent.refdes%", pcb_flag_make(PCB_FLAG_DYNTEXT | PCB_FLAG_FLOATER)); else - rnd_message(PCB_MSG_ERROR, "Error: can't create top silk layer in subc for placing the refdes\n"); + rnd_message(RND_MSG_ERROR, "Error: can't create top silk layer in subc for placing the refdes\n"); } } @@ -909,7 +909,7 @@ if (!(dl->meta.bound.type & PCB_LYT_VIRTUAL)) { const char *name = dl->name; if (name == NULL) name = ""; - rnd_message(PCB_MSG_WARNING, "Couldn't bind layer %s of subcircuit while placing it\n", name); + rnd_message(RND_MSG_WARNING, "Couldn't bind layer %s of subcircuit while placing it\n", name); } } else @@ -1507,7 +1507,7 @@ if (sl->polygon_tree == NULL) sl->polygon_tree = pcb_r_create_tree(); if (sl->gfx_tree == NULL) sl->gfx_tree = pcb_r_create_tree(); if (!(sl->meta.bound.type & PCB_LYT_VIRTUAL)) - rnd_message(PCB_MSG_ERROR, "Couldn't bind subc layer %s on buffer move\n", sl->name == NULL ? "" : sl->name); + rnd_message(RND_MSG_ERROR, "Couldn't bind subc layer %s on buffer move\n", sl->name == NULL ? "" : sl->name); } } else @@ -1581,7 +1581,7 @@ pcb_subc_free(subc); } if (warn) - rnd_message(PCB_MSG_WARNING, "There are %ld layers that got lost in the smash because they were on unbound subc layers\nThis normally happens if your subcircuits in buffer refer to layers that do not exist on your board.\n", warn); + rnd_message(RND_MSG_WARNING, "There are %ld layers that got lost in the smash because they were on unbound subc layers\nThis normally happens if your subcircuits in buffer refer to layers that do not exist on your board.\n", warn); return pcb_true; } @@ -2251,7 +2251,7 @@ pcb_subc_part_changed__(sc, 0); } else - rnd_message(PCB_MSG_ERROR, "Internal error: pcb_subc_part_changed_inhibit_dec(): underflow; please reprot this bug\n"); + rnd_message(RND_MSG_ERROR, "Internal error: pcb_subc_part_changed_inhibit_dec(): underflow; please reprot this bug\n"); } Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30954) +++ trunk/src/obj_text.c (revision 30955) @@ -491,7 +491,7 @@ if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_textop_move_buffer\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_textop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -715,7 +715,7 @@ void *pcb_textop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, text)) { - rnd_message(PCB_MSG_WARNING, "Sorry, text object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, text object is locked\n"); return NULL; } if (ctx->move.dst_layer != layer) { @@ -1528,7 +1528,7 @@ if (pcb_text_font_chg_data(PCB->Data, argv[1].d.i)) pcb_gui->invalidate_all(pcb_gui); /* can't just redraw the text, as the old text may have been bigger, before the change! */ - pcb_trace("font change %d\n", argv[1].d.i); + rnd_trace("font change %d\n", argv[1].d.i); } rnd_bool pcb_text_old_direction(int *dir_out, double rot) Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 30954) +++ trunk/src/object_act.c (revision 30955) @@ -77,7 +77,7 @@ RND_ACT_IRES(0); if (!pcb_gui->edit_attributes) { - rnd_message(PCB_MSG_ERROR, "This GUI doesn't support Attribute Editing\n"); + rnd_message(RND_MSG_ERROR, "This GUI doesn't support Attribute Editing\n"); return FGW_ERR_UNKNOWN; } @@ -100,7 +100,7 @@ break; } if (layer == NULL) { - rnd_message(PCB_MSG_ERROR, "No layer named %s\n", layername); + rnd_message(RND_MSG_ERROR, "No layer named %s\n", layername); return 1; } } @@ -122,7 +122,7 @@ } PCB_END_LOOP; if (n_found > 1) { - rnd_message(PCB_MSG_ERROR, "Too many subcircuits selected\n"); + rnd_message(RND_MSG_ERROR, "Too many subcircuits selected\n"); return 1; } if (n_found == 0) { @@ -132,7 +132,7 @@ if ((pcb_search_screen(x, y, PCB_OBJ_SUBC, &ptrtmp, &ptrtmp, &ptrtmp)) != PCB_OBJ_VOID) s = (pcb_subc_t *)ptrtmp; else { - rnd_message(PCB_MSG_ERROR, "No subcircuit found there\n"); + rnd_message(RND_MSG_ERROR, "No subcircuit found there\n"); RND_ACT_IRES(-1); return 0; } @@ -207,7 +207,7 @@ *maxy = newy2; if (*maxy > pcb->hidlib.size_y - GAP) { *maxy = GAP; - rnd_message(PCB_MSG_WARNING, "The board is too small for hosting all subcircuits,\ndiesperse restarted from the top.\nExpect overlapping subcircuits\n"); + rnd_message(RND_MSG_WARNING, "The board is too small for hosting all subcircuits,\ndiesperse restarted from the top.\nExpect overlapping subcircuits\n"); } } } @@ -315,7 +315,7 @@ type = pcb_search_screen(pcb_crosshair.X, pcb_crosshair.Y, PCB_MOVE_TYPES, &ptr1, &ptr2, &ptr3); if (type == PCB_OBJ_VOID) { - rnd_message(PCB_MSG_ERROR, "Nothing found under crosshair\n"); + rnd_message(RND_MSG_ERROR, "Nothing found under crosshair\n"); return 1; } @@ -369,7 +369,7 @@ int old_len = subc->data->LayerN; target = pcb_subc_get_layer(subc, lyt, PCB_CURRLAYER(pcb)->comb, 1, PCB_CURRLAYER(pcb)->name, 0); if (target == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to find or allocate the matching subc layer\n"); + rnd_message(RND_MSG_ERROR, "Failed to find or allocate the matching subc layer\n"); break; } if (old_len != subc->data->LayerN) @@ -461,13 +461,13 @@ if (rnd_strcasecmp(conf_plc_met, "disperse") == 0) plc->plc_method = PLC_DISPERSE; else if (rnd_strcasecmp(conf_plc_met, "frame") == 0) plc->plc_method = PLC_FRAME; else if (rnd_strcasecmp(conf_plc_met, "fit") == 0) plc->plc_method = PLC_FIT; - else rnd_message(PCB_MSG_ERROR, "Invalid import/footprint_placement/method '%s', falling back to disperse\n", conf_plc_met); + else rnd_message(RND_MSG_ERROR, "Invalid import/footprint_placement/method '%s', falling back to disperse\n", conf_plc_met); s = conf_core.import.footprint_placement.location; if ((s == NULL) || (*s == '\0')) plc->location = PLC_AT; else if (rnd_strcasecmp(s, "mark") == 0) plc->location = PLC_MARK; else if (rnd_strcasecmp(s, "center") == 0) plc->location = PLC_CENTER; - else rnd_message(PCB_MSG_ERROR, "Invalid import/footprint_placement/location '%s', falling back to coordinates\n", s); + else rnd_message(RND_MSG_ERROR, "Invalid import/footprint_placement/location '%s', falling back to coordinates\n", s); } else { @@ -481,7 +481,7 @@ if (rnd_strcasecmp(conf_rem_met, "select") == 0) plc->rem_method = PLC_SELECT; else if (rnd_strcasecmp(conf_rem_met, "remove") == 0) plc->rem_method = PLC_REMOVE; else if (rnd_strcasecmp(conf_rem_met, "list") == 0) plc->rem_method = PLC_LIST; - else rnd_message(PCB_MSG_ERROR, "Invalid import/footprint_removal/method '%s', falling back to select\n", conf_plc_met); + else rnd_message(RND_MSG_ERROR, "Invalid import/footprint_removal/method '%s', falling back to select\n", conf_plc_met); } switch(plc->location) { @@ -580,7 +580,7 @@ plc->remlst = NULL; } if ((number_of_footprints_not_found > 0) && (!pcbhl_conf.rc.quiet)) - rnd_message(PCB_MSG_ERROR, "Footprint import: not all requested footprints were found.\nSee the message log above for details\n"); + rnd_message(RND_MSG_ERROR, "Footprint import: not all requested footprints were found.\nSee the message log above for details\n"); } @@ -776,7 +776,7 @@ sc = pcb_subc_by_refdes(pcb->Data, refdes); if (sc == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find subcircuit with refdes '%s'\n", refdes); + rnd_message(RND_MSG_ERROR, "Can't find subcircuit with refdes '%s'\n", refdes); RND_ACT_IRES(1); return 0; } @@ -1007,7 +1007,7 @@ pcb_layer_t *l = PCB_CURRLAYER(pcb); pcb_layergrp_t *g = pcb_get_layergrp(pcb, l->meta.real.grp); if (g == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid layer group\n"); + rnd_message(RND_MSG_ERROR, "Invalid layer group\n"); return 1; } @@ -1015,7 +1015,7 @@ switch(a1[4]) { case '+': RND_ACT_IRES(pcb_layergrp_step_layer(pcb, g, pcb_layer_id(pcb->Data, l), +1)); break; case '-': RND_ACT_IRES(pcb_layergrp_step_layer(pcb, g, pcb_layer_id(pcb->Data, l), -1)); break; - default: rnd_message(PCB_MSG_ERROR, "Invalid step direction\n"); + default: rnd_message(RND_MSG_ERROR, "Invalid step direction\n"); } return 0; } @@ -1028,7 +1028,7 @@ pcb_layer_t *l = pcb_get_layer(pcb->Data, old_index); pcb_layergrp_t *g = pcb_get_layergrp(pcb, l->meta.real.grp); if (g->len == 1) { - rnd_message(PCB_MSG_ERROR, "Removing this layer would result in an empty top or bottom silk group, which is not possible at the moment.\n"); + rnd_message(RND_MSG_ERROR, "Removing this layer would result in an empty top or bottom silk group, which is not possible at the moment.\n"); RND_ACT_IRES(1); return 0; } @@ -1059,12 +1059,12 @@ RND_PCB_ACT_CONVARG(7, FGW_STR, CreateText, txt = argv[7].val.str); if (scale < 1) { - rnd_message(PCB_MSG_ERROR, "Invalid scale (must be larger than zero)\n"); + rnd_message(RND_MSG_ERROR, "Invalid scale (must be larger than zero)\n"); return 1; } if ((dir < 0) || (dir > 3)) { - rnd_message(PCB_MSG_ERROR, "Invalid direction (must be 0, 1, 2 or 3)\n"); + rnd_message(RND_MSG_ERROR, "Invalid direction (must be 0, 1, 2 or 3)\n"); return 1; } @@ -1117,7 +1117,7 @@ polylist_foreach(&pcb->Data->subc, &it, sc) { if (selected_only && !PCB_FLAG_TEST(PCB_FLAG_SELECTED, sc)) continue; - rnd_message(PCB_MSG_INFO, "subc #%ld (%s): %u\n", sc->ID, (sc->refdes == NULL ? "" : sc->refdes), pcb_subc_hash(sc)); + rnd_message(RND_MSG_INFO, "subc #%ld (%s): %u\n", sc->ID, (sc->refdes == NULL ? "" : sc->refdes), pcb_subc_hash(sc)); } } break; @@ -1162,7 +1162,7 @@ sc = (pcb_subc_t *)vt->array[n]; pcb_append_printf(&str, " #%ld(%s):%d", sc->ID, (sc->refdes == NULL ? "" : sc->refdes), pcb_subc_eq(sc, (pcb_subc_t*)vt->array[0])); } - rnd_message(PCB_MSG_INFO, "%s\n", str.array); + rnd_message(RND_MSG_INFO, "%s\n", str.array); vtp0_uninit(vt); free(vt); } Index: trunk/src/pixmap_pcb.c =================================================================== --- trunk/src/pixmap_pcb.c (revision 30954) +++ trunk/src/pixmap_pcb.c (revision 30955) @@ -126,7 +126,7 @@ } } - pcb_trace("sx;sy: %ld %ld -> %ld %ld\n", ipm->sx, ipm->sy, pm->sx, pm->sy); + rnd_trace("sx;sy: %ld %ld -> %ld %ld\n", ipm->sx, ipm->sy, pm->sx, pm->sy); TODO("create the transformed version if not in the cache already (by headers)"); return pm; Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 30954) +++ trunk/src/plug_footprint.c (revision 30955) @@ -96,7 +96,7 @@ htsp_entry_t *e; if (pcb_plug_fp_chain != NULL) - rnd_message(PCB_MSG_ERROR, "pcb_plug_fp_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); + rnd_message(RND_MSG_ERROR, "pcb_plug_fp_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); pcb_fp_free_children(&pcb_library); if (fp_tags != NULL) { @@ -415,7 +415,7 @@ if (res >= 0) n_footprints += res; else if (!silent_fail) - rnd_message(PCB_MSG_WARNING, "Warning: footprint library list error on %s\n", toppath); + rnd_message(RND_MSG_WARNING, "Warning: footprint library list error on %s\n", toppath); } #ifdef DEBUG Index: trunk/src/plug_footprint_act.c =================================================================== --- trunk/src/plug_footprint_act.c (revision 30954) +++ trunk/src/plug_footprint_act.c (revision 30955) @@ -49,25 +49,25 @@ l = pcb_fp_lib_search(&pcb_library, name); if (l == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find library path %s\n", name); + rnd_message(RND_MSG_ERROR, "Can't find library path %s\n", name); RND_ACT_IRES(1); return 0; } if (l->type != PCB_LIB_DIR) { - rnd_message(PCB_MSG_ERROR, "Library path %s is not a directory\n", name); + rnd_message(RND_MSG_ERROR, "Library path %s is not a directory\n", name); RND_ACT_IRES(1); return 0; } if (l->data.dir.backend == NULL) { - rnd_message(PCB_MSG_ERROR, "Library path %s is not a top level directory of a fp_ plugin\n", name); + rnd_message(RND_MSG_ERROR, "Library path %s is not a top level directory of a fp_ plugin\n", name); RND_ACT_IRES(1); return 0; } if (pcb_fp_rehash(RND_ACT_HIDLIB, l) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to rehash %s\n", name); + rnd_message(RND_MSG_ERROR, "Failed to rehash %s\n", name); RND_ACT_IRES(1); return 0; } Index: trunk/src/plug_import.c =================================================================== --- trunk/src/plug_import.c (revision 30954) +++ trunk/src/plug_import.c (revision 30955) @@ -106,18 +106,18 @@ pcb_plug_import_t *plug; if (!rnd_file_readable(filename)) { - rnd_message(PCB_MSG_ERROR, "Error: can't find a suitable netlist parser for %s - might be related: can't open %s for reading\n", filename, filename); + rnd_message(RND_MSG_ERROR, "Error: can't find a suitable netlist parser for %s - might be related: can't open %s for reading\n", filename, filename); return 1; } if (!filename) { - rnd_message(PCB_MSG_ERROR, "Error: need a file name for pcb_import_netlist()\n"); + rnd_message(RND_MSG_ERROR, "Error: need a file name for pcb_import_netlist()\n"); return 1; /* nothing to do */ } plug = find_importer(aspect, &filename, 1); if (plug == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can't find a suitable netlist parser for %s\n", filename); + rnd_message(RND_MSG_ERROR, "Error: can't find a suitable netlist parser for %s\n", filename); return 1; } @@ -132,5 +132,5 @@ void pcb_import_uninit(void) { if (pcb_plug_import_chain != NULL) - rnd_message(PCB_MSG_ERROR, "pcb_plug_import_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); + rnd_message(RND_MSG_ERROR, "pcb_plug_import_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); } Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30954) +++ trunk/src/plug_io.c (revision 30955) @@ -105,7 +105,7 @@ if (filename == NULL) filename = ""; } - rnd_message(PCB_MSG_ERROR, "IO error during %s: %s %s %s\n", what, reason, filename, comment); + rnd_message(RND_MSG_ERROR, "IO error during %s: %s %s %s\n", what, reason, filename, comment); } } @@ -141,7 +141,7 @@ if (ft == NULL) { if (!ignore_missing) - rnd_message(PCB_MSG_ERROR, "Error: can't open %s for reading (format is %s)\n", Filename, fmt); + rnd_message(RND_MSG_ERROR, "Error: can't open %s for reading (format is %s)\n", Filename, fmt); return -1; } @@ -164,14 +164,14 @@ } if (*accept_total <= 0) { - rnd_message(PCB_MSG_ERROR, "can't find a IO_ plugin to load a PCB using format %s\n", fmt); + rnd_message(RND_MSG_ERROR, "can't find a IO_ plugin to load a PCB using format %s\n", fmt); return -1; } if (*accept_total > 1) { - rnd_message(PCB_MSG_INFO, "multiple IO_ plugins can handle format %s - I'm going to try them all, but you may want to be more specific next time; formats found:\n", fmt); + rnd_message(RND_MSG_INFO, "multiple IO_ plugins can handle format %s - I'm going to try them all, but you may want to be more specific next time; formats found:\n", fmt); for(n = 0; n < len; n++) - rnd_message(PCB_MSG_INFO, " %s\n", available[n].plug->description); + rnd_message(RND_MSG_INFO, " %s\n", available[n].plug->description); } } else { @@ -191,7 +191,7 @@ } if (*accept_total == 0) { - rnd_message(PCB_MSG_ERROR, "none of the IO_ plugin recognized the file format of %s - it's either not a valid board file or does not match the format specified\n", Filename); + rnd_message(RND_MSG_ERROR, "none of the IO_ plugin recognized the file format of %s - it's either not a valid board file or does not match the format specified\n", Filename); return -1; } return len; @@ -365,12 +365,12 @@ /* no file name or format hint, or file name not recognized: choose the ultimate default */ fmt = conf_core.rc.save_final_fallback_fmt; if (fmt == NULL) { - rnd_message(PCB_MSG_WARNING, "Saving a file with unknown format: failed to guess format from file name, no value configured in rc/save_final_fallback_fmt - CAN NOT SAVE FILE, try save as.\n"); + rnd_message(RND_MSG_WARNING, "Saving a file with unknown format: failed to guess format from file name, no value configured in rc/save_final_fallback_fmt - CAN NOT SAVE FILE, try save as.\n"); return NULL; } else { if (PCB->hidlib.filename != NULL) - rnd_message(PCB_MSG_WARNING, "Saving a file with unknown format: failed to guess format from file name, falling back to %s as configured in rc/save_final_fallback_fmt\n", fmt); + rnd_message(RND_MSG_WARNING, "Saving a file with unknown format: failed to guess format from file name, falling back to %s as configured in rc/save_final_fallback_fmt\n", fmt); } } @@ -389,7 +389,7 @@ int res; if ((subc_idx >= 0) && (subc_idx >= avail)) { - rnd_message(PCB_MSG_ERROR, "pcb_write_buffer: subc index out of range"); + rnd_message(RND_MSG_ERROR, "pcb_write_buffer: subc index out of range"); return -1; } if (subc_idx < 0) { @@ -397,7 +397,7 @@ gdl_iterator_t sit; if (p->write_subcs_head(p, &udata, f, (avail > 1), avail) != 0) { - rnd_message(PCB_MSG_ERROR, "pcb_write_buffer: failed to write head"); + rnd_message(RND_MSG_ERROR, "pcb_write_buffer: failed to write head"); return -1; } res = 0; @@ -408,7 +408,7 @@ } else { if (p->write_subcs_head(p, &udata, f, 0, 1) != 0) { - rnd_message(PCB_MSG_ERROR, "pcb_write_buffer: failed to write head"); + rnd_message(RND_MSG_ERROR, "pcb_write_buffer: failed to write head"); return -1; } res = p->write_subcs_subc(p, &udata, f, pcb_subclist_nth(&data->subc, subc_idx)); @@ -494,7 +494,7 @@ pcb_event(&PCB->hidlib, PCB_EVENT_SAVE_POST, "si", fmt, res); } else { - rnd_message(PCB_MSG_ERROR, "Can't write PCB: internal error: io plugin %s doesn't implement write_pcb()\n", p->description); + rnd_message(RND_MSG_ERROR, "Can't write PCB: internal error: io plugin %s doesn't implement write_pcb()\n", p->description); res = -1; } } @@ -562,7 +562,7 @@ /* enable default font if necessary */ if (!PCB->fontkit.valid) { if ((require_font) && (!PCB->is_footprint)) - rnd_message(PCB_MSG_WARNING, "File '%s' has no font information, using default font\n", new_filename); + rnd_message(RND_MSG_WARNING, "File '%s' has no font information, using default font\n", new_filename); PCB->fontkit.valid = pcb_true; } @@ -602,7 +602,7 @@ #ifdef DEBUG end = clock(); elapsed = ((double) (end - start)) / CLOCKS_PER_SEC; - rnd_message(PCB_MSG_INFO, "Loading file %s took %f seconds of CPU time\n", new_filename, elapsed); + rnd_message(RND_MSG_INFO, "Loading file %s took %f seconds of CPU time\n", new_filename, elapsed); #endif conf_core.temp.rat_warn = pcb_true; /* make sure the first click can remove warnings */ @@ -617,7 +617,7 @@ /* bozo: we are trying to revert back to a non-existing pcb... create one to avoid a segfault */ PCB = pcb_board_new_(pcb_false); if (PCB == NULL) { - rnd_message(PCB_MSG_ERROR, "FATAL: can't create a new empty pcb!"); + rnd_message(RND_MSG_ERROR, "FATAL: can't create a new empty pcb!"); exit(1); } } @@ -671,7 +671,7 @@ } printf("write to pipe \"%s\"\n", command.array); if ((fp = pcb_popen(&PCB->hidlib, command.array, "w")) == NULL) { - pcb_popen_error_message(command.array); + rnd_popen_error_message(command.array); return (-1); } @@ -717,7 +717,7 @@ if (conf_core.editor.io_incomp_popup) { long int len = pcb_view_list_length(&pcb_io_incompat_lst); if (len > 0) { - rnd_message(PCB_MSG_ERROR, "There were %ld save incompatibility errors.\nData in memory is not affected, but the file created may be slightly broken.\nSee the popup view listing for detauls.\n", len); + rnd_message(RND_MSG_ERROR, "There were %ld save incompatibility errors.\nData in memory is not affected, but the file created may be slightly broken.\nSee the popup view listing for detauls.\n", len); rnd_actionva(&PCB->hidlib, "IOincompatList", conf_core.editor.io_incomp_style, "auto", NULL); } } @@ -735,7 +735,7 @@ /* a footprint has no board size set, need to invent one */ pcb_data_bbox(&b, PCB->Data, 0); if ((b.X2 < b.X1) || (b.Y2 < b.Y1)) { - rnd_message(PCB_MSG_ERROR, "Invalid footprint file: can not determine bounding box\n"); + rnd_message(RND_MSG_ERROR, "Invalid footprint file: can not determine bounding box\n"); res = -1; } else @@ -815,7 +815,7 @@ if (PCB && PCB->Changed && (conf_core.rc.emergency_name != NULL) && (*conf_core.rc.emergency_name != '\0')) { const char *fmt = conf_core.rc.emergency_format == NULL ? DEFAULT_EMERGENCY_FMT : conf_core.rc.emergency_format; sprintf(filename, conf_core.rc.emergency_name, (long int)rnd_getpid()); - rnd_message(PCB_MSG_INFO, "Trying to save your layout in '%s'\n", filename); + rnd_message(RND_MSG_INFO, "Trying to save your layout in '%s'\n", filename); pcb_write_pcb_file(filename, pcb_true, fmt, pcb_true, pcb_false, -1, 0); } } @@ -915,7 +915,7 @@ Filename = fn_tmp; } else { - rnd_message(PCB_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); + rnd_message(RND_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); return -1; } } @@ -927,7 +927,7 @@ fp = pcb_fopen(&PCB->hidlib, Filename, "w"); if (fp == NULL) { - pcb_open_error_message(Filename); + rnd_open_error_message(Filename); return (-1); } @@ -996,14 +996,14 @@ pcb_view_list_append(&pcb_io_incompat_lst, violation); } else { - rnd_message(PCB_MSG_ERROR, "save error: %s\n", title); + rnd_message(RND_MSG_ERROR, "save error: %s\n", title); if (obj != NULL) { rnd_coord_t x = (obj->BoundingBox.X1 + obj->BoundingBox.X2)/2; rnd_coord_t y = (obj->BoundingBox.Y1 + obj->BoundingBox.Y2)/2; - rnd_message(PCB_MSG_ERROR, " near %$mm %$mm\n", x, y); + rnd_message(RND_MSG_ERROR, " near %$mm %$mm\n", x, y); } if (description != NULL) - rnd_message(PCB_MSG_ERROR, " (%s)\n", description); + rnd_message(RND_MSG_ERROR, " (%s)\n", description); } return 0; } @@ -1084,8 +1084,8 @@ { pcb_view_list_free_fields(&pcb_io_incompat_lst); if (pcb_plug_io_chain != NULL) { - rnd_message(PCB_MSG_ERROR, "pcb_plug_io_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); - rnd_message(PCB_MSG_ERROR, "head: desc='%s'\n", pcb_plug_io_chain->description); + rnd_message(RND_MSG_ERROR, "pcb_plug_io_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); + rnd_message(RND_MSG_ERROR, "head: desc='%s'\n", pcb_plug_io_chain->description); } free(last_design_dir); last_design_dir = NULL; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30954) +++ trunk/src/polygon.c (revision 30955) @@ -267,7 +267,7 @@ #if 0 if (!pcb_poly_valid(np)) { rnd_cardinal_t cnt = pcb_polyarea_split_selfint(np); - rnd_message(PCB_MSG_ERROR, "Had to split up self-intersecting polygon into %ld parts\n", (long)cnt); + rnd_message(RND_MSG_ERROR, "Had to split up self-intersecting polygon into %ld parts\n", (long)cnt); if (cnt > 1) *need_full = pcb_true; assert(pcb_poly_valid(np)); @@ -333,7 +333,7 @@ p->Clipped = biggest(merged); assert(!p->Clipped || pcb_poly_valid(p->Clipped)); if (!p->Clipped) - rnd_message(PCB_MSG_WARNING, "Polygon #%ld cleared out of existence near (%$mm, %$mm)\n", + rnd_message(RND_MSG_WARNING, "Polygon #%ld cleared out of existence near (%$mm, %$mm)\n", p->ID, (p->BoundingBox.X1 + p->BoundingBox.X2) / 2, (p->BoundingBox.Y1 + p->BoundingBox.Y2) / 2); return 1; } @@ -948,7 +948,7 @@ pcb_polyarea_free(&p->Clipped); p->Clipped = pcb_poly_to_polyarea(p, &need_full); if (need_full && !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, p)) { - rnd_message(PCB_MSG_WARNING, "Polygon #%ld was self intersecting; it had to be split up and\nthe full poly flag set.\n", (long)p->ID); + rnd_message(RND_MSG_WARNING, "Polygon #%ld was self intersecting; it had to be split up and\nthe full poly flag set.\n", (long)p->ID); PCB_FLAG_SET(PCB_FLAG_FULLPOLY, p); } pcb_poly_contours_free(&p->NoHoles); @@ -1150,7 +1150,7 @@ dx = coord_abs(pcb_crosshair.AttachedPolygon.Points[n - 1].X - pcb_crosshair.AttachedPolygon.Points[0].X); dy = coord_abs(pcb_crosshair.AttachedPolygon.Points[n - 1].Y - pcb_crosshair.AttachedPolygon.Points[0].Y); if (!(dx == 0 || dy == 0 || dx == dy)) { - rnd_message(PCB_MSG_ERROR, "Cannot close polygon because 45 degree lines are requested.\n"); + rnd_message(RND_MSG_ERROR, "Cannot close polygon because 45 degree lines are requested.\n"); return; } } @@ -1158,7 +1158,7 @@ pcb_draw(); } else - rnd_message(PCB_MSG_ERROR, "A polygon has to have at least 3 points\n"); + rnd_message(RND_MSG_ERROR, "A polygon has to have at least 3 points\n"); } static void poly_copy_data(pcb_poly_t *dst, pcb_poly_t *src) @@ -1228,7 +1228,7 @@ dx = coord_abs(pcb_crosshair.AttachedPolygon.Points[n - 1].X - pcb_crosshair.AttachedPolygon.Points[0].X); dy = coord_abs(pcb_crosshair.AttachedPolygon.Points[n - 1].Y - pcb_crosshair.AttachedPolygon.Points[0].Y); if (!(dx == 0 || dy == 0 || dx == dy)) { - rnd_message(PCB_MSG_ERROR, "Cannot close polygon hole because 45 degree lines are requested.\n"); + rnd_message(RND_MSG_ERROR, "Cannot close polygon hole because 45 degree lines are requested.\n"); return; } } @@ -1236,7 +1236,7 @@ pcb_draw(); } else - rnd_message(PCB_MSG_ERROR, "A polygon hole has to have at least 3 points\n"); + rnd_message(RND_MSG_ERROR, "A polygon hole has to have at least 3 points\n"); } /* --------------------------------------------------------------------------- Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 30954) +++ trunk/src/rats_act.c (revision 30955) @@ -126,7 +126,7 @@ fctx.flag_chg_undoable = 1; fctx.consider_rats = !!conf_core.editor.conn_find_rat; res = pcb_find_from_xy(&fctx, PCB->Data, x, y); - rnd_message(PCB_MSG_INFO, "found %ld objects\n", res); + rnd_message(RND_MSG_INFO, "found %ld objects\n", res); pcb_find_free(&fctx); break; } Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 30954) +++ trunk/src/rats_patch.c (revision 30955) @@ -445,7 +445,7 @@ PCB_END_LOOP; if (!(found)) { - rnd_message(PCB_MSG_ERROR, "ReplaceFootprint(Selected) called with no selection\n"); + rnd_message(RND_MSG_ERROR, "ReplaceFootprint(Selected) called with no selection\n"); return 1; } break; @@ -454,7 +454,7 @@ void *ptr1, *ptr2, *ptr3; pcb_objtype_t type = pcb_search_screen(pcb_crosshair.X, pcb_crosshair.Y, PCB_OBJ_SUBC, &ptr1, &ptr2, &ptr3); if ((type != PCB_OBJ_SUBC) || (ptr1 == NULL)) { - rnd_message(PCB_MSG_ERROR, "ReplaceFootprint(Object): no subc under cursor\n"); + rnd_message(RND_MSG_ERROR, "ReplaceFootprint(Object): no subc under cursor\n"); return 1; } *olds = ptr1; @@ -462,7 +462,7 @@ break; default: - rnd_message(PCB_MSG_ERROR, "ReplaceFootprint(): invalid first argument\n"); + rnd_message(RND_MSG_ERROR, "ReplaceFootprint(): invalid first argument\n"); return 1; } return 0; @@ -476,7 +476,7 @@ if (fpname == NULL) { fpname = pcb_hid_prompt_for(&PCB->hidlib, "Footprint name to use for replacement:", "", "Footprint"); if (fpname == NULL) { - rnd_message(PCB_MSG_ERROR, "No footprint name supplied\n"); + rnd_message(RND_MSG_ERROR, "No footprint name supplied\n"); return 1; } } @@ -498,12 +498,12 @@ len = pcb_subclist_length(&pcb_buffers[bidx].Data->subc); if (len == 0) { - rnd_message(PCB_MSG_ERROR, "%s%s contains no subcircuits\n", what, what2); + rnd_message(RND_MSG_ERROR, "%s%s contains no subcircuits\n", what, what2); return 1; } if (len > 1) { - rnd_message(PCB_MSG_ERROR, "%s%s contains multiple subcircuits\n", what, what2); + rnd_message(RND_MSG_ERROR, "%s%s contains multiple subcircuits\n", what, what2); return 1; } *news = pcb_subclist_first(&pcb_buffers[bidx].Data->subc); @@ -619,7 +619,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open netlist patch file %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open netlist patch file %s for writing\n", fn); RND_ACT_IRES(-1); return 0; } Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 30954) +++ trunk/src/rotate.c (revision 30955) @@ -155,7 +155,7 @@ if ((type = pcb_search_screen(X, Y, PCB_ROTATE_TYPES | PCB_LOOSE_SUBC(PCB), &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) { - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); @@ -175,7 +175,7 @@ if ((type = pcb_search_screen(X, Y, PCB_ROTATE_TYPES | PCB_LOOSE_SUBC(PCB), &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) { - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); Index: trunk/src/route_style.c =================================================================== --- trunk/src/route_style.c (revision 30954) +++ trunk/src/route_style.c (revision 30955) @@ -89,7 +89,7 @@ if (len > sizeof(routeStyle->name)-1) { memcpy(routeStyle->name, Name, sizeof(routeStyle->name)-1); routeStyle->name[sizeof(routeStyle->name)-1] = '\0'; - rnd_message(PCB_MSG_WARNING, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); + rnd_message(RND_MSG_WARNING, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); } else strcpy(routeStyle->name, Name); @@ -213,7 +213,7 @@ case PCB_OBJ_ARC: return pcb_get_style_size(F_SelectedArcs, out, 0, size_id); } - rnd_message(PCB_MSG_ERROR, "Sorry, can't fetch the style of that object type (%x)\n", type); + rnd_message(RND_MSG_ERROR, "Sorry, can't fetch the style of that object type (%x)\n", type); return -1; case F_SelectedPads: if (size_id != 2) /* don't mess with pad size */ @@ -239,7 +239,7 @@ return 0; case F_SelectedTexts: case F_SelectedNames: - rnd_message(PCB_MSG_ERROR, "Sorry, can't change style of every selected object\n"); + rnd_message(RND_MSG_ERROR, "Sorry, can't change style of every selected object\n"); return -1; } return 0; Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30954) +++ trunk/src/search.c (revision 30955) @@ -1613,7 +1613,7 @@ { int res = pcb_search_obj_by_id_(Base, Result1, Result2, Result3, ID, type); if (res == PCB_OBJ_VOID) - rnd_message(PCB_MSG_ERROR, "pcb_search_obj_by_id(): internal error, search for ID %d failed\n", ID); + rnd_message(RND_MSG_ERROR, "pcb_search_obj_by_id(): internal error, search for ID %d failed\n", ID); return res; } @@ -1635,7 +1635,7 @@ break; } - rnd_message(PCB_MSG_ERROR, "pcb_search_obj_by_id_buf2(): internal error, search for ID %d failed\n", ID); + rnd_message(RND_MSG_ERROR, "pcb_search_obj_by_id_buf2(): internal error, search for ID %d failed\n", ID); return PCB_OBJ_VOID; } Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 30954) +++ trunk/src/thermal.c (revision 30955) @@ -126,7 +126,7 @@ sa = atan2(-(e1y - cy), e1x - cx) * PCB_RAD_TO_DEG + 180.0; ea = atan2(-(e2y - cy), e2x - cx) * PCB_RAD_TO_DEG + 180.0; -/* pcb_trace("sa=%f ea=%f diff=%f\n", sa, ea, ea-sa);*/ +/* rnd_trace("sa=%f ea=%f diff=%f\n", sa, ea, ea-sa);*/ atmp.Flags = pcb_no_flags(); atmp.X = rnd_round(cx); @@ -422,9 +422,9 @@ for(n = 0, go = pcb_poly_vect_first(it, &cx, &cy); go; go = pcb_poly_vect_next(it, &cx, &cy), n++) { x = cx; y = cy; if (first) { -/*pcb_trace("prev %mm;%mm\n", cx, cy);*/ +/*rnd_trace("prev %mm;%mm\n", cx, cy);*/ pcb_poly_vect_peek_prev(it, &cx, &cy); -/*pcb_trace(" %mm;%mm\n", cx, cy);*/ +/*rnd_trace(" %mm;%mm\n", cx, cy);*/ px = cx; py = cy; first = 0; } @@ -463,7 +463,7 @@ first = 0; } -/*pcb_trace("[%d] %d %mm;%mm\n", n, cong[n], (rnd_coord_t)x, (rnd_coord_t)y);*/ +/*rnd_trace("[%d] %d %mm;%mm\n", n, cong[n], (rnd_coord_t)x, (rnd_coord_t)y);*/ dx = x - px; @@ -566,7 +566,7 @@ first = 0; } -/*pcb_trace("[%d] %d %mm;%mm\n", n, cong[n], (rnd_coord_t)x, (rnd_coord_t)y);*/ +/*rnd_trace("[%d] %d %mm;%mm\n", n, cong[n], (rnd_coord_t)x, (rnd_coord_t)y);*/ /* skip points too dense */ if ((n >= CONG_MAX) || (cong[n])) { Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 30954) +++ trunk/src/tool_logic.c (revision 30955) @@ -55,7 +55,7 @@ int id = argv[2].d.i; pcb_board_t *pcb = (pcb_board_t *)hidlib; if (pcb->RatDraw && !(pcb_tool_get(id)->user_flags & PCB_TLF_RAT)) { - rnd_message(PCB_MSG_WARNING, "That tool can not be used on the rat layer!\n"); + rnd_message(RND_MSG_WARNING, "That tool can not be used on the rat layer!\n"); *ok = 0; } } Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 30954) +++ trunk/src/undo.c (revision 30955) @@ -86,17 +86,17 @@ pcb_undo_and_draw = draw; if (pcb_uundo.num_undo == 0) { - rnd_message(PCB_MSG_INFO, "Nothing to undo - buffer is empty\n"); + rnd_message(RND_MSG_INFO, "Nothing to undo - buffer is empty\n"); return -1; } if (pcb_uundo.serial == 0) { - rnd_message(PCB_MSG_ERROR, "ERROR: Attempt to pcb_undo() with Serial == 0\n Please save your work and report this bug.\n"); + rnd_message(RND_MSG_ERROR, "ERROR: Attempt to pcb_undo() with Serial == 0\n Please save your work and report this bug.\n"); return -1; } if ((pcb_uundo.tail != NULL) && (pcb_uundo.tail->serial > pcb_uundo.serial)) { - rnd_message(PCB_MSG_ERROR, "ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n" + rnd_message(RND_MSG_ERROR, "ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n" " Please save your work and report this bug.\n", pcb_uundo.tail->serial, pcb_uundo.serial); /* It is likely that the serial number got corrupted through some bad @@ -117,7 +117,7 @@ pcb_undo_unlock(); if (res != 0) - rnd_message(PCB_MSG_ERROR, "ERROR: Failed to undo some operations\n"); + rnd_message(RND_MSG_ERROR, "ERROR: Failed to undo some operations\n"); else if (pcb_undo_and_draw) pcb_draw(); @@ -138,13 +138,13 @@ pcb_undo_and_draw = draw; if (pcb_uundo.num_redo == 0) { - rnd_message(PCB_MSG_INFO, "Nothing to redo. Perhaps changes have been made since last undo\n"); + rnd_message(RND_MSG_INFO, "Nothing to redo. Perhaps changes have been made since last undo\n"); return 0; } if ((pcb_uundo.tail != NULL) && (pcb_uundo.tail->next != NULL) && (pcb_uundo.tail->next->serial > pcb_uundo.serial)) { - rnd_message(PCB_MSG_ERROR, "ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n" + rnd_message(RND_MSG_ERROR, "ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n" " Please save your work and report this bug.\n", pcb_uundo.tail->next->serial, pcb_uundo.serial); /* It is likely that the serial number got corrupted through some bad @@ -166,7 +166,7 @@ pcb_undo_unlock(); if (res != 0) - rnd_message(PCB_MSG_ERROR, "ERROR: Failed to redo some operations\n"); + rnd_message(RND_MSG_ERROR, "ERROR: Failed to redo some operations\n"); else if (pcb_undo_and_draw) pcb_draw(); @@ -181,7 +181,7 @@ void pcb_undo_restore_serial(void) { if (added_undo_between_increment_and_restore) - rnd_message(PCB_MSG_ERROR, "ERROR: Operations were added to the Undo stack with an incorrect serial number\n"); + rnd_message(RND_MSG_ERROR, "ERROR: Operations were added to the Undo stack with an incorrect serial number\n"); between_increment_and_restore = pcb_false; added_undo_between_increment_and_restore = pcb_false; uundo_restore_serial(&pcb_uundo); Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 30954) +++ trunk/src/undo_act.c (revision 30955) @@ -82,7 +82,7 @@ pcb_undo_unfreeze_serial(); break; default: - rnd_message(PCB_MSG_ERROR, "Invalid argument for Atomic()\n"); + rnd_message(RND_MSG_ERROR, "Invalid argument for Atomic()\n"); RND_ACT_IRES(-1); return 0; } Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 30954) +++ trunk/src/undo_old.c (revision 30955) @@ -460,8 +460,8 @@ pcb_draw_obj((pcb_any_obj_t *)ptr2); return pcb_true; } - rnd_message(PCB_MSG_ERROR, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); - rnd_message(PCB_MSG_ERROR, "for UndoFlag Operation. Previous flags: %s\n", pcb_strflg_f2s(Entry->Data.Flags, 0, NULL, 0)); + rnd_message(RND_MSG_ERROR, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); + rnd_message(RND_MSG_ERROR, "for UndoFlag Operation. Previous flags: %s\n", pcb_strflg_f2s(Entry->Data.Flags, 0, NULL, 0)); return pcb_false; } @@ -485,7 +485,7 @@ DrawSubc(subc); return pcb_true; } - rnd_message(PCB_MSG_ERROR, "hace Internal error: UndoOtherside on object type %x\n", type); + rnd_message(RND_MSG_ERROR, "hace Internal error: UndoOtherside on object type %x\n", type); return pcb_false; } Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 30954) +++ trunk/src/view.c (revision 30955) @@ -154,12 +154,12 @@ case PCB_OBJ_GFX: idp = pcb_obj2idpath(obj); if (idp == NULL) - rnd_message(PCB_MSG_ERROR, "Internal error in pcb_drc_append_obj: can not resolve object id path\n"); + rnd_message(RND_MSG_ERROR, "Internal error in pcb_drc_append_obj: can not resolve object id path\n"); else pcb_idpath_list_append(&view->objs[grp], idp); break; default: - rnd_message(PCB_MSG_ERROR, "Internal error in pcb_drc_append_obj: unknown object type %i\n", obj->type); + rnd_message(RND_MSG_ERROR, "Internal error in pcb_drc_append_obj: unknown object type %i\n", obj->type); } } @@ -365,7 +365,7 @@ for(m = n->data.list.first, len = 0; m != NULL; m = m->next) { if (m->type != LHT_TEXT) { - rnd_message(PCB_MSG_ERROR, LOADERR "Invalid object id (non-text)\n"); + rnd_message(RND_MSG_ERROR, LOADERR "Invalid object id (non-text)\n"); goto nope; } len++; @@ -378,7 +378,7 @@ pcb_idpath_list_append(&dst->objs[grp], i); } else - rnd_message(PCB_MSG_ERROR, LOADERR "Invalid object id-path\n"); + rnd_message(RND_MSG_ERROR, LOADERR "Invalid object id-path\n"); nope:; } } @@ -410,7 +410,7 @@ else if (strcmp(n->data.text.value, "plain") == 0) data_type = PCB_VIEW_PLAIN; else { - rnd_message(PCB_MSG_ERROR, LOADERR "Invalid data type: '%s'\n", n->data.text.value); + rnd_message(RND_MSG_ERROR, LOADERR "Invalid data type: '%s'\n", n->data.text.value); return NULL; } } @@ -467,7 +467,7 @@ if ((c == NULL) && (ok == 4)) dst->have_bbox = 1; else - rnd_message(PCB_MSG_ERROR, LOADERR "Invalid bbox values\n"); + rnd_message(RND_MSG_ERROR, LOADERR "Invalid bbox values\n"); } n = lht_dom_hash_get(ctx->next, "xy"); @@ -488,7 +488,7 @@ if ((c == NULL) && (ok == 2)) dst->have_bbox = 1; else - rnd_message(PCB_MSG_ERROR, LOADERR "Invalid xy values\n"); + rnd_message(RND_MSG_ERROR, LOADERR "Invalid xy values\n"); } n = lht_dom_hash_get(ctx->next, "objs.0"); @@ -508,7 +508,7 @@ if ((c != NULL) && (c->type == LHT_TEXT)) { dst->data.drc.required_value = pcb_get_value(c->data.text.value, NULL, NULL, &succ); if (!succ) - rnd_message(PCB_MSG_ERROR, LOADERR "invalid drc required value: '%s'\n", c->data.text.value); + rnd_message(RND_MSG_ERROR, LOADERR "invalid drc required value: '%s'\n", c->data.text.value); } c = lht_dom_hash_get(n, "measured_value"); if ((c != NULL) && (c->type == LHT_TEXT)) { @@ -516,7 +516,7 @@ if (succ) dst->data.drc.have_measured = 1; else - rnd_message(PCB_MSG_ERROR, LOADERR "invalid drc measured value: '%s'\n", c->data.text.value); + rnd_message(RND_MSG_ERROR, LOADERR "invalid drc measured value: '%s'\n", c->data.text.value); } } break; Index: trunk/src_plugins/acompnet/meshgraph.c =================================================================== --- trunk/src_plugins/acompnet/meshgraph.c (revision 30954) +++ trunk/src_plugins/acompnet/meshgraph.c (revision 30955) @@ -73,7 +73,7 @@ cp.Y = curr->bbox.Y1; pcb_route_calculate(PCB, &route, &np, &cp, PCB_CURRLID(PCB), conf_core.design.line_thickness, conf_core.design.bloat, pcb_flag_make(PCB_FLAG_CLEARLINE), 0, 0); - pcb_trace("size=%d\n", route.size); + rnd_trace("size=%d\n", route.size); return curr->gscore + rnd_distance(curr->bbox.X1, curr->bbox.Y1, next->bbox.X1, next->bbox.Y1) * (next->iscore + 1.0); } @@ -120,16 +120,16 @@ } if (curr == NULL) { -pcb_trace("NO PATH\n"); +rnd_trace("NO PATH\n"); return 0; } htip_pop(&open, curr->id); if (curr->id == endid) { -pcb_trace("found path\n"); +rnd_trace("found path\n"); return 1; } htip_set(&closed, curr->id, curr); -pcb_trace("first: %ld\n", curr->id); +rnd_trace("first: %ld\n", curr->id); /* search potential neighbors */ sb.x1 = curr->bbox.X1 - SEARCHR; @@ -150,7 +150,7 @@ else if (tentative_g > next->gscore) continue; -pcb_trace("add: %ld\n", next->id); +rnd_trace("add: %ld\n", next->id); next->came_from = curr->id; next->gscore = tentative_g; next->fscore = msgr_heurist(curr, end); Index: trunk/src_plugins/act_draw/act_draw.c =================================================================== --- trunk/src_plugins/act_draw/act_draw.c (revision 30954) +++ trunk/src_plugins/act_draw/act_draw.c (revision 30955) @@ -44,7 +44,7 @@ static int flg_error(const char *msg) { - rnd_message(PCB_MSG_ERROR, "act_draw flag conversion error: %s\n", msg); + rnd_message(RND_MSG_ERROR, "act_draw flag conversion error: %s\n", msg); return 0; } @@ -177,7 +177,7 @@ text = pcb_text_new(layer, font, x, y, rot, scale, th, str, flags); } else - rnd_message(PCB_MSG_ERROR, "NewText: font %d not found\n", fontid); + rnd_message(RND_MSG_ERROR, "NewText: font %d not found\n", fontid); if (text != NULL) { RET_IDPATH(text); @@ -274,7 +274,7 @@ } c[len % 2] = pcb_get_value_ex(s, NULL, NULL, NULL, "mm", &success); if (!success) { - rnd_message(PCB_MSG_ERROR, "act_draw ptlist processing: '%s' is not a valid coordinate\n", s); + rnd_message(RND_MSG_ERROR, "act_draw ptlist processing: '%s' is not a valid coordinate\n", s); free(tmp); return -1; } @@ -283,7 +283,7 @@ } free(tmp); if ((len % 2) == 1) { - rnd_message(PCB_MSG_ERROR, "act_draw ptlist processing: odd number of points\n"); + rnd_message(RND_MSG_ERROR, "act_draw ptlist processing: odd number of points\n"); return -1; } return len/2; @@ -368,7 +368,7 @@ RND_PCB_ACT_CONVARG(1+ao, FGW_PTR, PolyNewPoints, poly = argv[1+ao].val.ptr_void); RND_PCB_ACT_CONVARG(2+ao, FGW_STR, PolyNewPoints, ptlist = argv[2+ao].val.str); if (!fgw_ptr_in_domain(&rnd_fgw, &argv[1], PTR_DOMAIN_POLY)) { - rnd_message(PCB_MSG_ERROR, "PolyNewPoints: invalid polygon pointer\n"); + rnd_message(RND_MSG_ERROR, "PolyNewPoints: invalid polygon pointer\n"); RND_ACT_IRES(-1); return 0; } @@ -394,12 +394,12 @@ RND_PCB_ACT_CONVARG(2+ao, FGW_LAYER, PolyNewFromPoints, layer = fgw_layer(&argv[2+ao])); RND_PCB_ACT_CONVARG(3+ao, FGW_PTR, PolyNewPoints, poly = argv[3+ao].val.ptr_void); if (!fgw_ptr_in_domain(&rnd_fgw, &argv[1], PTR_DOMAIN_POLY)) { - rnd_message(PCB_MSG_ERROR, "PolyNewEnd: invalid polygon pointer\n"); + rnd_message(RND_MSG_ERROR, "PolyNewEnd: invalid polygon pointer\n"); RND_ACT_IRES(0); return 0; } if (poly->PointN < 3) { - rnd_message(PCB_MSG_ERROR, "PolyNewEnd: can not finish polygon, need at least 3 points\n"); + rnd_message(RND_MSG_ERROR, "PolyNewEnd: can not finish polygon, need at least 3 points\n"); RND_ACT_IRES(0); return 0; } @@ -432,7 +432,7 @@ RND_PCB_ACT_CONVARG(2+ao, FGW_LAYER, LayerObjDup, layer = fgw_layer(&argv[2+ao])); RND_PCB_ACT_CONVARG(3+ao, FGW_PTR, LayerObjDup, idp = argv[3+ao].val.ptr_void); if (!fgw_ptr_in_domain(&rnd_fgw, &argv[3], RND_PTR_DOMAIN_IDPATH)) { - rnd_message(PCB_MSG_ERROR, "LayerObjDup: invalid object pointer\n"); + rnd_message(RND_MSG_ERROR, "LayerObjDup: invalid object pointer\n"); return FGW_ERR_PTR_DOMAIN; } src = pcb_idpath2obj(PCB, idp); Index: trunk/src_plugins/act_draw/act_pstk_proto.c =================================================================== --- trunk/src_plugins/act_draw/act_pstk_proto.c (revision 30954) +++ trunk/src_plugins/act_draw/act_pstk_proto.c (revision 30955) @@ -119,7 +119,7 @@ } RND_PCB_ACT_CONVARG(3+ao, FGW_PTR, PstkProtoTmp, proto = argv[3+ao].val.ptr_void); if (!fgw_ptr_in_domain(&rnd_fgw, &argv[3+ao], PCB_PTR_DOMAIN_PSTK_PROTO) || (proto == NULL)) { - rnd_message(PCB_MSG_ERROR, "PstkProtoTmp: invalid proto pointer\n"); + rnd_message(RND_MSG_ERROR, "PstkProtoTmp: invalid proto pointer\n"); RND_ACT_IRES(-1); return 0; } @@ -163,7 +163,7 @@ RND_PCB_ACT_CONVARG(2+ao, FGW_STR, PstkProtoEdit, cmd = argv[2+ao].val.str); if (!fgw_ptr_in_domain(&rnd_fgw, &argv[1+ao], PCB_PTR_DOMAIN_PSTK_PROTO) || (proto == NULL)) { - rnd_message(PCB_MSG_ERROR, "PstkProtoEdit: invalid proto pointer\n"); + rnd_message(RND_MSG_ERROR, "PstkProtoEdit: invalid proto pointer\n"); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/act_read/act_read.c =================================================================== --- trunk/src_plugins/act_read/act_read.c (revision 30954) +++ trunk/src_plugins/act_read/act_read.c (revision 30955) @@ -88,7 +88,7 @@ static int flg_error(const char *msg) { - rnd_message(PCB_MSG_ERROR, "act_read flag conversion error: %s\n", msg); + rnd_message(RND_MSG_ERROR, "act_read flag conversion error: %s\n", msg); return 0; } Index: trunk/src_plugins/ar_cpcb/ar_cpcb.c =================================================================== --- trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 30954) +++ trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 30955) @@ -164,11 +164,11 @@ lidx = strtol(nl->str, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Ignoring invalid layer index '%s' (not an integer) in line %ld\n", nl->str, (long)nl->line); + rnd_message(RND_MSG_ERROR, "Ignoring invalid layer index '%s' (not an integer) in line %ld\n", nl->str, (long)nl->line); continue; } if ((lidx < 0) || (lidx >= stack->maxlayer)) { - rnd_message(PCB_MSG_ERROR, "Ignoring invalid layer index '%s' (out of range) in line %ld\n", nl->str, (long)nl->line); + rnd_message(RND_MSG_ERROR, "Ignoring invalid layer index '%s' (out of range) in line %ld\n", nl->str, (long)nl->line); continue; } @@ -180,7 +180,7 @@ 0, PCB_PSTK_COMPAT_ROUND, pcb_true); } else - rnd_message(PCB_MSG_ERROR, "Invalid via: not vertical, in line %ld:%ld\n", (long)nl->line, (long)nl->col); + rnd_message(RND_MSG_ERROR, "Invalid via: not vertical, in line %ld:%ld\n", (long)nl->line, (long)nl->col); } else line = pcb_line_new(stack->copper[lidx], lx, ly, x, y, thick, clear, pcb_flag_make(PCB_FLAG_CLEARLINE)); @@ -296,7 +296,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not open %s for read\n", fn); + rnd_message(RND_MSG_ERROR, "Can not open %s for read\n", fn); RND_ACT_IRES(-1); return 0; } @@ -323,7 +323,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not open %s for write\n", fn); + rnd_message(RND_MSG_ERROR, "Can not open %s for write\n", fn); RND_ACT_IRES(-1); return 0; } @@ -330,7 +330,7 @@ if (cpcb_map_nets(PCB, &nmap) != 0) { fclose(f); - rnd_message(PCB_MSG_ERROR, "Failed to map nets\n"); + rnd_message(RND_MSG_ERROR, "Failed to map nets\n"); RND_ACT_IRES(-1); return 0; } @@ -359,7 +359,7 @@ rnd_PCB_ACT_MAY_CONVARG(2, FGW_STR, cpcb, cmd = argv[2].val.str); if (strcmp(scope, "board") != 0) { - rnd_message(PCB_MSG_ERROR, "Only board routing is supported at the moment\n"); + rnd_message(RND_MSG_ERROR, "Only board routing is supported at the moment\n"); RND_ACT_IRES(-1); return 0; } @@ -366,7 +366,7 @@ f = pcb_fopen(&PCB->hidlib, tmpfn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not open temp file %s for write\n", tmpfn); + rnd_message(RND_MSG_ERROR, "Can not open temp file %s for write\n", tmpfn); RND_ACT_IRES(-1); return 0; } @@ -373,7 +373,7 @@ if (cpcb_map_nets(PCB, &nmap) != 0) { fclose(f); - rnd_message(PCB_MSG_ERROR, "Failed to map nets\n"); + rnd_message(RND_MSG_ERROR, "Failed to map nets\n"); RND_ACT_IRES(-1); return 0; } @@ -390,7 +390,7 @@ RND_ACT_IRES(0); } else { - rnd_message(PCB_MSG_ERROR, "Failed to execute c-pcb\n"); + rnd_message(RND_MSG_ERROR, "Failed to execute c-pcb\n"); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/asm/asm.c =================================================================== --- trunk/src_plugins/asm/asm.c (revision 30954) +++ trunk/src_plugins/asm/asm.c (revision 30955) @@ -126,7 +126,7 @@ else if (strcmp(s, "y") == 0) templ_append(dst, TT_Y, NULL); else - rnd_message(PCB_MSG_ERROR, "Ignoring unknown asm template entry: '%s'\n", s); + rnd_message(RND_MSG_ERROR, "Ignoring unknown asm template entry: '%s'\n", s); } return src; } Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 30954) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30955) @@ -174,7 +174,7 @@ return layer->meta.real.grp; return SLayer; /* any layer will do */ default: - rnd_message(PCB_MSG_ERROR, "Odd terminal type encountered in obj_layergrp()\n"); + rnd_message(RND_MSG_ERROR, "Odd terminal type encountered in obj_layergrp()\n"); } return -1; } @@ -742,7 +742,7 @@ Selected = collectSelectedSubcircuits(); if (vtp0_len(&Selected) == 0) { - rnd_message(PCB_MSG_ERROR, "No subcircuits selected to autoplace.\n"); + rnd_message(RND_MSG_ERROR, "No subcircuits selected to autoplace.\n"); goto done; } Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 30954) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30955) @@ -2498,7 +2498,7 @@ db.X2 = last; break; default: - rnd_message(PCB_MSG_ERROR, "previous edge bogus direction!"); + rnd_message(RND_MSG_ERROR, "previous edge bogus direction!"); assert(0); } return db; @@ -4379,7 +4379,7 @@ if (request_cancel) { ras.total_nets_routed = 0; ras.conflict_subnets = 0; - rnd_message(PCB_MSG_INFO, "Autorouting cancelled\n"); + rnd_message(RND_MSG_INFO, "Autorouting cancelled\n"); goto out; } } @@ -4431,7 +4431,7 @@ this_cost = 0; } - rnd_message(PCB_MSG_INFO, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); + rnd_message(RND_MSG_INFO, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); out: pcb_heap_destroy(&this_pass); @@ -4613,7 +4613,7 @@ for (i = 0; i < vtroutestyle_len(&PCB->RouteStyle); i++) { if (PCB->RouteStyle.array[i].Thick == 0 || PCB->RouteStyle.array[i].Diameter == 0 || PCB->RouteStyle.array[i].Hole == 0 || PCB->RouteStyle.array[i].Clearance == 0) { - rnd_message(PCB_MSG_ERROR, "You must define proper routing styles\n" "before auto-routing.\n"); + rnd_message(RND_MSG_ERROR, "You must define proper routing styles\n" "before auto-routing.\n"); return pcb_false; } } @@ -4621,7 +4621,7 @@ return pcb_false; rd = CreateRouteData(); if (rd == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to initialize data; might be missing\n" "top or bottom copper layer.\n"); + rnd_message(RND_MSG_ERROR, "Failed to initialize data; might be missing\n" "top or bottom copper layer.\n"); return pcb_false; } @@ -4711,7 +4711,7 @@ PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, pcb_true, line); pcb_rat_invalidate_draw(line, 0); #endif /* DEBUG_STALE_RATS */ - rnd_message(PCB_MSG_ERROR, "The rats nest is stale! Aborting autoroute...\n"); + rnd_message(RND_MSG_ERROR, "The rats nest is stale! Aborting autoroute...\n"); goto donerouting; } /* merge subnets into a net! */ @@ -4761,7 +4761,7 @@ if (changed) changed = IronDownAllUnfixedPaths(rd); - rnd_message(PCB_MSG_INFO, "Total added wire length = %$mS, %d vias added\n", (rnd_coord_t) total_wire_length, total_via_count); + rnd_message(RND_MSG_INFO, "Total added wire length = %$mS, %d vias added\n", (rnd_coord_t) total_wire_length, total_via_count); DestroyRouteData(&rd); if (changed) { pcb_undo_save_serial(); Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 30954) +++ trunk/src_plugins/cam/cam.c (revision 30955) @@ -106,7 +106,7 @@ return cam_exec(ctx); } - rnd_message(PCB_MSG_ERROR, "cam: can not find job configuration '%s'\n", job); + rnd_message(RND_MSG_ERROR, "cam: can not find job configuration '%s'\n", job); return -1; } @@ -169,7 +169,7 @@ for(n = 3; n < argc; n++) { RND_PCB_ACT_CONVARG(n, FGW_STR, cam, opt = argv[n].val.str); if (cam_parse_opt(&ctx, opt) != 0) { - rnd_message(PCB_MSG_ERROR, "cam: invalid action option '%s'\n", opt); + rnd_message(RND_MSG_ERROR, "cam: invalid action option '%s'\n", opt); cam_uninit_inst(&ctx); RND_ACT_IRES(1); return 0; @@ -181,7 +181,7 @@ } else { if (arg == NULL) { - rnd_message(PCB_MSG_ERROR, "cam: need one more argument for '%s'\n", cmd); + rnd_message(RND_MSG_ERROR, "cam: need one more argument for '%s'\n", cmd); cam_uninit_inst(&ctx); RND_ACT_IRES(1); return 0; @@ -228,7 +228,7 @@ { int d, s, oargc; if (*argc < 1) { - rnd_message(PCB_MSG_ERROR, "-x cam needs a job name\n"); + rnd_message(RND_MSG_ERROR, "-x cam needs a job name\n"); return -1; } @@ -247,7 +247,7 @@ else if (strcmp(opt, "-o") == 0) { s++; (*argc)--; if (cam_parse_set_var(&cam_export_ctx, (*argv)[s]) != 0) { - rnd_message(PCB_MSG_ERROR, "cam -o requires a key=value argument\n"); + rnd_message(RND_MSG_ERROR, "cam -o requires a key=value argument\n"); goto err; } } @@ -271,7 +271,7 @@ cam_init_inst_fn(&cam_export_ctx); if (cam_call(cam_export_job, &cam_export_ctx) != 0) - rnd_message(PCB_MSG_ERROR, "CAM job %s failed\n", cam_export_job); + rnd_message(RND_MSG_ERROR, "CAM job %s failed\n", cam_export_job); cam_uninit_inst(&cam_export_ctx); free(cam_export_job); Index: trunk/src_plugins/cam/cam_compile.c =================================================================== --- trunk/src_plugins/cam/cam_compile.c (revision 30954) +++ trunk/src_plugins/cam/cam_compile.c (revision 30955) @@ -93,7 +93,7 @@ case PCB_CAM_WRITE: if (ctx->exporter == NULL) { - rnd_message(PCB_MSG_ERROR, "cam: no exporter selected before write\n"); + rnd_message(RND_MSG_ERROR, "cam: no exporter selected before write\n"); return -1; } @@ -108,7 +108,7 @@ argc = ctx->argc; argv = ctx->argv; if (ctx->exporter->parse_arguments(ctx->exporter, &argc, &argv) != 0) { - rnd_message(PCB_MSG_ERROR, "cam: exporter '%s' refused the arguments\n", code->op.write.arg); + rnd_message(RND_MSG_ERROR, "cam: exporter '%s' refused the arguments\n", code->op.write.arg); ctx->argv[0] = NULL; ctx->argv[1] = NULL; return -1; @@ -217,7 +217,7 @@ } code->op.plugin.exporter = pcb_hid_find_exporter(arg); if (code->op.plugin.exporter == NULL) { - rnd_message(PCB_MSG_ERROR, "cam: can not find export plugin: '%s'\n", arg); + rnd_message(RND_MSG_ERROR, "cam: can not find export plugin: '%s'\n", arg); return -1; } free(ctx->args); @@ -249,7 +249,7 @@ code->op.plugin.argv[ctx->argc] = NULL; } else { - rnd_message(PCB_MSG_ERROR, "cam: syntax error (unknown instruction): '%s'\n", cmd); + rnd_message(RND_MSG_ERROR, "cam: syntax error (unknown instruction): '%s'\n", cmd); return -1; } return 0; Index: trunk/src_plugins/ddraft/cli.c =================================================================== --- trunk/src_plugins/ddraft/cli.c (revision 30954) +++ trunk/src_plugins/ddraft/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: trunk/src_plugins/ddraft/cli_line.c =================================================================== --- trunk/src_plugins/ddraft/cli_line.c (revision 30954) +++ trunk/src_plugins/ddraft/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: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 30954) +++ trunk/src_plugins/ddraft/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; } Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 30954) +++ trunk/src_plugins/diag/diag.c (revision 30955) @@ -83,7 +83,7 @@ rnd_PCB_ACT_MAY_CONVARG(3, FGW_STR, DumpConf, prefix = argv[3].val.str); role = rnd_conf_role_parse(srole); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'\n", argv[1]); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'\n", argv[1]); RND_ACT_IRES(1); return 0; } @@ -123,7 +123,7 @@ nat = rnd_conf_get_field(path); if (nat == NULL) { - rnd_message(PCB_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); + rnd_message(RND_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); RND_ACT_IRES(-1); return 0; } @@ -399,7 +399,7 @@ if (conf_diag.plugins.diag.auto_integrity) { static int cnt = 0; if ((cnt++ % 100) == 0) { - pcb_trace("Number of integrity checks so far: %d\n", cnt); + rnd_trace("Number of integrity checks so far: %d\n", cnt); } pcb_check_integrity(PCB); } @@ -416,7 +416,7 @@ PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(233), PCB_MIL_TO_COORD(233), 15, pcb_flag_make(0)); pxm = rnd_pixmap_load(RND_ACT_HIDLIB, "A.pnm"); -pcb_trace("pxm=%p\n", pxm); +rnd_trace("pxm=%p\n", pxm); pcb_gfx_set_pixmap_free(g, pxm, 1); @@ -462,7 +462,7 @@ } PCB_END_LOOP; - rnd_message(PCB_MSG_INFO, "Measuring find.c peformance for %f seconds starting from %ld pins...\n", duration, pins); + rnd_message(RND_MSG_INFO, "Measuring find.c peformance for %f seconds starting from %ld pins...\n", duration, pins); from = rnd_dtime(); end = from + duration; @@ -478,7 +478,7 @@ its++; now = rnd_dtime(); } while(now < end); - rnd_message(PCB_MSG_INFO, "find2.c peformance: %d %f pin find per second\n", its, (double)its * (double)pins / (now-from)); + rnd_message(RND_MSG_INFO, "find2.c peformance: %d %f pin find per second\n", its, (double)its * (double)pins / (now-from)); RND_ACT_IRES(0); return 0; } @@ -555,7 +555,7 @@ void *ptr1, *ptr2, *ptr3; const char *new_color; - rnd_message(PCB_MSG_ERROR, "pcb_acth_forcecolor() is temporarily disabled.\n"); + rnd_message(RND_MSG_ERROR, "pcb_acth_forcecolor() is temporarily disabled.\n"); return -1; RND_PCB_ACT_CONVARG(1, FGW_STR, forcecolor, new_color = argv[1].val.str); Index: trunk/src_plugins/diag/integrity.c =================================================================== --- trunk/src_plugins/diag/integrity.c (revision 30954) +++ trunk/src_plugins/diag/integrity.c (revision 30955) @@ -37,15 +37,15 @@ do { \ pcb_any_obj_t *__obj__ = (pcb_any_obj_t *)(obj); \ if (__obj__->type != exp_type) \ - rnd_message(PCB_MSG_ERROR, CHK "%s %ld type broken (%d != %d)\n", pcb_obj_type_name(exp_type), __obj__->ID, __obj__->type, exp_type); \ + rnd_message(RND_MSG_ERROR, CHK "%s %ld type broken (%d != %d)\n", pcb_obj_type_name(exp_type), __obj__->ID, __obj__->type, exp_type); \ } while(0) #define check_parent(name, obj, pt, prnt) \ do { \ if (obj->parent_type != pt) \ - rnd_message(PCB_MSG_ERROR, CHK "%s " name " %ld parent type broken (%d != %d)\n", whose, obj->ID, obj->parent_type, pt); \ + rnd_message(RND_MSG_ERROR, CHK "%s " name " %ld parent type broken (%d != %d)\n", whose, obj->ID, obj->parent_type, pt); \ else if (obj->parent.any != prnt) \ - rnd_message(PCB_MSG_ERROR, CHK "%s " name " %ld parent type broken (%p != %p)\n", whose, obj->ID, obj->parent.any, prnt); \ + rnd_message(RND_MSG_ERROR, CHK "%s " name " %ld parent type broken (%p != %p)\n", whose, obj->ID, obj->parent.any, prnt); \ } while(0) #define check_obj_id(name, data, obj) \ @@ -52,7 +52,7 @@ do { \ pcb_any_obj_t *__ao__ = htip_get(&data->id2obj, obj->ID); \ if (__ao__ != (pcb_any_obj_t *)obj) \ - rnd_message(PCB_MSG_ERROR, CHK "%s " name " %ld id hash broken (%p != %p)\n", whose, obj->ID, obj, __ao__); \ + rnd_message(RND_MSG_ERROR, CHK "%s " name " %ld id hash broken (%p != %p)\n", whose, obj->ID, obj, __ao__); \ id_chk_cnt++; \ } while(0) @@ -60,13 +60,13 @@ #define chk_attr(name, obj) \ do { \ if (((obj)->Attributes.Number > 0) && ((obj)->Attributes.List == NULL)) \ - rnd_message(PCB_MSG_ERROR, CHK "%s " name " %ld broken empty attribute list\n", whose, (obj)->ID); \ + rnd_message(RND_MSG_ERROR, CHK "%s " name " %ld broken empty attribute list\n", whose, (obj)->ID); \ } while(0) #define check_field_eq(name, obj, st1, st2, fld, fmt) \ do { \ if ((st1)->fld != (st2)->fld) \ - rnd_message(PCB_MSG_ERROR, CHK "%s " name " field ." #fld " value mismatch (" fmt " != " fmt ")\n", whose, obj->ID, (st1)->fld, (st2)->fld); \ + rnd_message(RND_MSG_ERROR, CHK "%s " name " field ." #fld " value mismatch (" fmt " != " fmt ")\n", whose, obj->ID, (st1)->fld, (st2)->fld); \ } while(0) static void chk_layers(const char *whose, pcb_data_t *data, pcb_parenttype_t pt, void *parent, int name_chk); @@ -77,20 +77,20 @@ const char *s_intconn = rnd_attribute_get(&obj->Attributes, "intconn"); if (pcb_obj_id_invalid(aterm)) - rnd_message(PCB_MSG_ERROR, CHK "%s %ld has term attribute '%s' with invalid characters\n", whose, obj->ID, aterm); + rnd_message(RND_MSG_ERROR, CHK "%s %ld has term attribute '%s' with invalid characters\n", whose, obj->ID, aterm); if ((aterm == NULL) && (obj->term == NULL)) return; if (obj->term == NULL) { - rnd_message(PCB_MSG_ERROR, CHK "%s %ld has term attribute '%s' but no ->term set\n", whose, obj->ID, aterm); + rnd_message(RND_MSG_ERROR, CHK "%s %ld has term attribute '%s' but no ->term set\n", whose, obj->ID, aterm); return; } if (aterm == NULL) { - rnd_message(PCB_MSG_ERROR, CHK "%s %ld has ->term '%s' but no attribute term set\n", whose, obj->ID, obj->term); + rnd_message(RND_MSG_ERROR, CHK "%s %ld has ->term '%s' but no attribute term set\n", whose, obj->ID, obj->term); return; } if (aterm != obj->term) { - rnd_message(PCB_MSG_ERROR, CHK "%s %ld has mismatching pointer of ->term ('%s') and attribute term ('%s')\n", whose, obj->ID, obj->term, aterm); + rnd_message(RND_MSG_ERROR, CHK "%s %ld has mismatching pointer of ->term ('%s') and attribute term ('%s')\n", whose, obj->ID, obj->term, aterm); return; } @@ -99,7 +99,7 @@ long intconn = strtol(s_intconn, &end, 10); if (*end == '\0') { if (intconn != obj->intconn) { - rnd_message(PCB_MSG_ERROR, CHK "%s %ld has mismatching intconn: cached is %d, attribute is '%s'\n", whose, obj->ID, obj->intconn, s_intconn); + rnd_message(RND_MSG_ERROR, CHK "%s %ld has mismatching intconn: cached is %d, attribute is '%s'\n", whose, obj->ID, obj->intconn, s_intconn); return; } } @@ -111,26 +111,26 @@ const char *arefdes = rnd_attribute_get(&subc->Attributes, "refdes"); if (pcb_obj_id_invalid(arefdes)) - rnd_message(PCB_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' with invalid characters\n", subc->ID, arefdes); + rnd_message(RND_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' with invalid characters\n", subc->ID, arefdes); if ((subc->BoundingBox.X2 < 0) || (subc->BoundingBox.Y2 < 0)) - rnd_message(PCB_MSG_ERROR, CHK "subc %ld is on negative coordinates; its bottom right corner is %$mm;%$mm\n", subc->ID, subc->BoundingBox.X2, subc->BoundingBox.Y2); + rnd_message(RND_MSG_ERROR, CHK "subc %ld is on negative coordinates; its bottom right corner is %$mm;%$mm\n", subc->ID, subc->BoundingBox.X2, subc->BoundingBox.Y2); if ((subc->BoundingBox.X1 > PCB->hidlib.size_x) || (subc->BoundingBox.Y1 > PCB->hidlib.size_y)) - rnd_message(PCB_MSG_ERROR, CHK "subc %ld is olost beyond board extents; its top left corner is %$mm;%$mm\n", subc->ID, subc->BoundingBox.X1, subc->BoundingBox.Y1); + rnd_message(RND_MSG_ERROR, CHK "subc %ld is olost beyond board extents; its top left corner is %$mm;%$mm\n", subc->ID, subc->BoundingBox.X1, subc->BoundingBox.Y1); if ((arefdes == NULL) && (subc->refdes == NULL)) return; if (subc->refdes == NULL) { - rnd_message(PCB_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' but no ->refdes set\n", subc->ID, arefdes); + rnd_message(RND_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' but no ->refdes set\n", subc->ID, arefdes); return; } if (arefdes == NULL) { - rnd_message(PCB_MSG_ERROR, CHK "subc %ld has ->refdes '%s' but no attribute refdes set\n", subc->ID, subc->refdes); + rnd_message(RND_MSG_ERROR, CHK "subc %ld has ->refdes '%s' but no attribute refdes set\n", subc->ID, subc->refdes); return; } if (arefdes != subc->refdes) { - rnd_message(PCB_MSG_ERROR, CHK "subc %ld has mismatching pointer of ->refdes ('%s') and attribute refdes ('%s')\n", subc->ID, subc->refdes, arefdes); + rnd_message(RND_MSG_ERROR, CHK "subc %ld has mismatching pointer of ->refdes ('%s') and attribute refdes ('%s')\n", subc->ID, subc->refdes, arefdes); return; } } @@ -147,11 +147,11 @@ chk_subc_cache(subc); if (pcb_subc_get_origin(subc, &dummy, &dummy) != 0) - rnd_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc origin\n", whose, subc->ID); + rnd_message(RND_MSG_ERROR, CHK "%s %ld: can not determine subc origin\n", whose, subc->ID); if (pcb_subc_get_rotation(subc, &dummy2) != 0) - rnd_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc rotation\n", whose, subc->ID); + rnd_message(RND_MSG_ERROR, CHK "%s %ld: can not determine subc rotation\n", whose, subc->ID); if (pcb_subc_get_side(subc, &dummy) != 0) - rnd_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc side\n", whose, subc->ID); + rnd_message(RND_MSG_ERROR, CHK "%s %ld: can not determine subc side\n", whose, subc->ID); /* check term chaches */ for(ps = padstacklist_first(&subc->data->padstack); ps != NULL; ps = padstacklist_next(ps)) @@ -165,7 +165,7 @@ pcb_poly_t *pol; if (!ly->is_bound) - rnd_message(PCB_MSG_ERROR, CHK "%ld subc layer %ld is not a bound layer\n", subc->ID, n); + rnd_message(RND_MSG_ERROR, CHK "%ld subc layer %ld is not a bound layer\n", subc->ID, n); for(lin = linelist_first(&ly->Line); lin != NULL; lin = linelist_next(lin)) chk_term("line", (pcb_any_obj_t *)lin); @@ -190,9 +190,9 @@ htip_entry_t *e; if (data->parent_type != pt) - rnd_message(PCB_MSG_ERROR, CHK "%s data: parent type broken (%d != %d)\n", whose, data->parent_type, pt); + rnd_message(RND_MSG_ERROR, CHK "%s data: parent type broken (%d != %d)\n", whose, data->parent_type, pt); else if (data->parent.any != parent) - rnd_message(PCB_MSG_ERROR, CHK "%s data: parent broken (%p != %p)\n", whose, data->parent, parent); + rnd_message(RND_MSG_ERROR, CHK "%s data: parent broken (%p != %p)\n", whose, data->parent, parent); for(n = 0; n < data->LayerN; n++) { @@ -204,9 +204,9 @@ /* check layers */ if (data->Layer[n].parent.data != data) - rnd_message(PCB_MSG_ERROR, CHK "%s layer %ld/%s parent broken (%p != %p)\n", whose, n, data->Layer[n].name, data->Layer[n].parent, data); + rnd_message(RND_MSG_ERROR, CHK "%s layer %ld/%s parent broken (%p != %p)\n", whose, n, data->Layer[n].name, data->Layer[n].parent, data); if (name_chk && ((data->Layer[n].name == NULL) || (*data->Layer[n].name == '\0'))) - rnd_message(PCB_MSG_ERROR, CHK "%s layer %ld has invalid name\n", whose, n); + rnd_message(RND_MSG_ERROR, CHK "%s layer %ld has invalid name\n", whose, n); check_type(&data->Layer[n], PCB_OBJ_LAYER); check_parent("layer", (&data->Layer[n]), PCB_PARENT_DATA, data); chk_attr("layer", &data->Layer[n]); @@ -222,15 +222,15 @@ } } if (!found) - rnd_message(PCB_MSG_ERROR, CHK "%s layer %ld is linked to group %ld but the group does not link back to the layer\n", whose, n, data->Layer[n].meta.real.grp); + rnd_message(RND_MSG_ERROR, CHK "%s layer %ld is linked to group %ld but the group does not link back to the layer\n", whose, n, data->Layer[n].meta.real.grp); } else - rnd_message(PCB_MSG_ERROR, CHK "%s layer %ld is linked to non-existing group %ld\n", whose, n, data->Layer[n].meta.real.grp); + rnd_message(RND_MSG_ERROR, CHK "%s layer %ld is linked to non-existing group %ld\n", whose, n, data->Layer[n].meta.real.grp); } if (data->Layer[n].is_bound) { if ((data->Layer[n].meta.bound.type & PCB_LYT_BOUNDARY) && (data->Layer[n].meta.bound.type & PCB_LYT_ANYWHERE)) - rnd_message(PCB_MSG_ERROR, CHK "%s layer %ld/%s is a non-global boundary (bound layer)\n", whose, n, data->Layer[n].name); + rnd_message(RND_MSG_ERROR, CHK "%s layer %ld/%s is a non-global boundary (bound layer)\n", whose, n, data->Layer[n].name); } /* check layer objects */ @@ -301,7 +301,7 @@ id_chk_cnt--; } if (id_chk_cnt != 0) - rnd_message(PCB_MSG_ERROR, CHK "id hash contains %ld excess IDs in %s\n", id_chk_cnt, whose); + rnd_message(RND_MSG_ERROR, CHK "id hash contains %ld excess IDs in %s\n", id_chk_cnt, whose); } static void chk_layergrps(pcb_board_t *pcb) @@ -316,7 +316,7 @@ check_parent("layer_group", grp, PCB_PARENT_BOARD, pcb); check_type(grp, PCB_OBJ_LAYERGRP); if ((grp->ltype & PCB_LYT_BOUNDARY) && (grp->ltype & PCB_LYT_ANYWHERE)) - rnd_message(PCB_MSG_ERROR, CHK "layer group %ld/%s is a non-global boundary\n", n, grp->name); + rnd_message(RND_MSG_ERROR, CHK "layer group %ld/%s is a non-global boundary\n", n, grp->name); for(i = 0; i < grp->len; i++) { pcb_layer_t *ly; @@ -323,15 +323,15 @@ for(i2 = 0; i2 < i; i2++) if (grp->lid[i] == grp->lid[i2]) - rnd_message(PCB_MSG_ERROR, CHK "layer group %ld/%s has duplicate layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); + rnd_message(RND_MSG_ERROR, CHK "layer group %ld/%s has duplicate layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); ly = pcb_get_layer(pcb->Data, grp->lid[i]); if (ly != NULL) { if (ly->meta.real.grp != n) - rnd_message(PCB_MSG_ERROR, CHK "layer group %ld/%s conains layer %ld/%s but it doesn't link back to the group but links to %ld instead \n", n, grp->name, (long)grp->lid[i], ly->name, ly->meta.real.grp); + rnd_message(RND_MSG_ERROR, CHK "layer group %ld/%s conains layer %ld/%s but it doesn't link back to the group but links to %ld instead \n", n, grp->name, (long)grp->lid[i], ly->name, ly->meta.real.grp); } else - rnd_message(PCB_MSG_ERROR, CHK "layer group %ld/%s contains invalid layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); + rnd_message(RND_MSG_ERROR, CHK "layer group %ld/%s contains invalid layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); } } } @@ -351,5 +351,5 @@ } if (undo_check() != 0) - rnd_message(PCB_MSG_ERROR, CHK "undo\n"); + rnd_message(RND_MSG_ERROR, CHK "undo\n"); } Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 30955) @@ -89,12 +89,12 @@ export_ctx->hid[h]->do_export(export_ctx->hid[h], results); pcb_event(&PCB->hidlib, PCB_EVENT_EXPORT_SESSION_END, NULL); free(results); - rnd_message(PCB_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); + rnd_message(RND_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); goto done; } } - rnd_message(PCB_MSG_ERROR, "Internal error: can not find which exporter to call\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can not find which exporter to call\n"); done:; if (have_gui) { @@ -156,7 +156,7 @@ } if (export_ctx.len == 0) { - rnd_message(PCB_MSG_ERROR, "Can not export: there are no export plugins available\n"); + rnd_message(RND_MSG_ERROR, "Can not export: there are no export plugins available\n"); return; } Index: trunk/src_plugins/dialogs/dlg_flag_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 30955) @@ -107,7 +107,7 @@ RND_ACT_FAIL(FlagEdit); if ((ctx.obj_type != 0) && (PCB_FLAG_TEST(PCB_FLAG_LOCK, ctx.obj))) { - rnd_message(PCB_MSG_ERROR, "Can't edit the flags of a locked object, unlock first.\n"); + rnd_message(RND_MSG_ERROR, "Can't edit the flags of a locked object, unlock first.\n"); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30955) @@ -134,7 +134,7 @@ static void btn_remove_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { if (conf_core.design.text_font_id == 0) { - rnd_message(PCB_MSG_ERROR, "Can not remove the default font.\n"); + rnd_message(RND_MSG_ERROR, "Can not remove the default font.\n"); return; } pcb_del_font(&PCB->fontkit, conf_core.design.text_font_id); @@ -159,7 +159,7 @@ for(c = gdl_first(&fontsels); c != NULL; c = gdl_next(&fontsels, c)) { pcb_text_t *txt = (pcb_text_t *)pcb_idpath2obj_in(c->pcb->Data, c->txt_id); if (txt == txt_obj) { - rnd_message(PCB_MSG_ERROR, "There is already an active fontedit dialog for that object,\nnot going to open a second dialog.\n"); + rnd_message(RND_MSG_ERROR, "There is already an active fontedit dialog for that object,\nnot going to open a second dialog.\n"); return; } } Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30955) @@ -270,7 +270,7 @@ rnd_hid_get_coords("Click on subc to change the layer binding of", &x, &y, 0); type = pcb_search_screen(x, y, PCB_OBJ_SUBC, &ptr1, &ptr2, &ptr3); if (type != PCB_OBJ_SUBC) { - rnd_message(PCB_MSG_ERROR, "No subc under the cursor\n"); + rnd_message(RND_MSG_ERROR, "No subc under the cursor\n"); return -1; } ctx.subc = ptr2; @@ -278,7 +278,7 @@ } else if (op == F_Selected) { TODO("subc TODO") - rnd_message(PCB_MSG_ERROR, "TODO\n"); + rnd_message(RND_MSG_ERROR, "TODO\n"); return 1; } else if (op == F_Buffer) { Index: trunk/src_plugins/dialogs/dlg_layer_flags.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30955) @@ -189,7 +189,7 @@ changed = 1; } else - rnd_message(PCB_MSG_ERROR, "Ignoring location - for this layer group type it is determined by the stackup\n"); + rnd_message(RND_MSG_ERROR, "Ignoring location - for this layer group type it is determined by the stackup\n"); } if (dlg[wpurp].val.str == NULL) { Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30955) @@ -583,7 +583,7 @@ } if ((name == NULL) || (*name == '\0')) { - rnd_message(PCB_MSG_ERROR, "Filed to figure the name of the parametric footprint\n"); + rnd_message(RND_MSG_ERROR, "Filed to figure the name of the parametric footprint\n"); return; } namelen = strlen(name); @@ -601,7 +601,7 @@ library_param_dialog(ctx, rnew->user_data); } else - rnd_message(PCB_MSG_ERROR, "No such parametric footprint: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "No such parametric footprint: '%s'\n", name); free(name); } @@ -625,9 +625,9 @@ oname = rnd_strdup(l->name); /* need to save the name because refresh invalidates l */ if (pcb_fp_rehash(&PCB->hidlib, l) == 0) - rnd_message(PCB_MSG_INFO, "Refreshed library '%s'\n", oname); + rnd_message(RND_MSG_INFO, "Refreshed library '%s'\n", oname); else - rnd_message(PCB_MSG_ERROR, "Failed to refresh library '%s'\n", oname); + rnd_message(RND_MSG_ERROR, "Failed to refresh library '%s'\n", oname); free(oname); } Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 30955) @@ -135,7 +135,7 @@ do { \ if (curr >= MAX_PARAMS) { \ if (curr == MAX_PARAMS) \ - rnd_message(PCB_MSG_ERROR, "too many parameters, displaying only the first %d\n", MAX_PARAMS); \ + rnd_message(RND_MSG_ERROR, "too many parameters, displaying only the first %d\n", MAX_PARAMS); \ break; \ } \ if (curr_type == PCB_HATT_END) \ @@ -450,7 +450,7 @@ } else { if (posi >= argc_help) { - rnd_message(PCB_MSG_ERROR, "More positional parameters than expected - ignoring %s", argv_in[n]); + rnd_message(RND_MSG_ERROR, "More positional parameters than expected - ignoring %s", argv_in[n]); continue; } key = argv_help[posi]; @@ -460,7 +460,7 @@ e = htsi_getentry(&ctx->param_names, key); if (e == NULL) { - rnd_message(PCB_MSG_ERROR, "Unknown parameter %s - ignoring value %s", key, val); + rnd_message(RND_MSG_ERROR, "Unknown parameter %s - ignoring value %s", key, val); continue; } pidx = e->value; @@ -565,7 +565,7 @@ f = pcb_popen(NULL, cmd, "r"); free(cmd); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not execute parametric footprint %s\n", l->data.fp.loc_info); + rnd_message(RND_MSG_ERROR, "Can not execute parametric footprint %s\n", l->data.fp.loc_info); return NULL; } Index: trunk/src_plugins/dialogs/dlg_loadsave.c =================================================================== --- trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30955) @@ -79,7 +79,7 @@ else if (rnd_strcasecmp(function, "Layout") == 0) name = pcb_gui->fileselect(pcb_gui, "Load layout file", "load layout (board) as board to edit", last_layout, NULL, NULL, "board", PCB_HID_FSD_READ, NULL); else { - rnd_message(PCB_MSG_ERROR, "Invalid subcommand for Load(): '%s'\n", function); + rnd_message(RND_MSG_ERROR, "Invalid subcommand for Load(): '%s'\n", function); RND_ACT_IRES(1); return 0; } @@ -481,7 +481,7 @@ if (fmt < 0) { static int warned = 0; if (!warned) - rnd_message(PCB_MSG_WARNING, "Could not find an io_ plugin for the preferred footprint save format (configured in rc/save_fp_fmt): '%s'\n", default_pattern); + rnd_message(RND_MSG_WARNING, "Could not find an io_ plugin for the preferred footprint save format (configured in rc/save_fp_fmt): '%s'\n", default_pattern); warned = 1; } } @@ -494,7 +494,7 @@ name_in = pcb_concat("unnamed", avail.plug[fmt]->fp_extension, NULL); } else { - rnd_message(PCB_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); + rnd_message(RND_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); RND_ACT_IRES(-1); return 0; } @@ -518,7 +518,7 @@ fmtsub = &fmtsub_local; } else { - rnd_message(PCB_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); + rnd_message(RND_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 30955) @@ -229,7 +229,7 @@ free(tmp); } else { - rnd_message(PCB_MSG_ERROR, "Internal error: netlist_button_cb() called from an invalid widget\n"); + rnd_message(RND_MSG_ERROR, "Internal error: netlist_button_cb() called from an invalid widget\n"); return; } pcb_gui->invalidate_all(pcb_gui); Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 30955) @@ -143,7 +143,7 @@ if (shp_found[n] == 0) not_found++; if (not_found) - rnd_message(PCB_MSG_ERROR, "This padstack has %d shape(s) that are not listed in the padstack editor\nFor editing all shapes, please break the padstack up\n", not_found); + rnd_message(RND_MSG_ERROR, "This padstack has %d shape(s) that are not listed in the padstack editor\nFor editing all shapes, please break the padstack up\n", not_found); } /* proto - hole */ @@ -243,7 +243,7 @@ assert(pse->ps->parent_type == PCB_PARENT_DATA); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't determine prototype\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't determine prototype\n"); return; } proto_id = pcb_pstk_proto_insert_forcedup(pse->ps->parent.data, proto, 0, pcb_data_get_top(pse->ps->parent.data) == pse->pcb); @@ -351,13 +351,13 @@ if (pse->proto_clr[n] == (attr - pse->attrs)) idx = n; if (idx < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find shape - clearance unchanged (a)\n"); + rnd_message(RND_MSG_ERROR, "Can't find shape - clearance unchanged (a)\n"); return; } sidx = pcb_pstk_get_shape_idx(&proto->tr.array[0], pcb_proto_layers[idx].mask, pcb_proto_layers[idx].comb); if (sidx < 0) { - rnd_message(PCB_MSG_ERROR, "Can't find shape - clearance unchanged (b)\n"); + rnd_message(RND_MSG_ERROR, "Can't find shape - clearance unchanged (b)\n"); return; } @@ -417,7 +417,7 @@ if (ts == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't derive shape: no shapes (empty padstack)\n"); + rnd_message(RND_MSG_ERROR, "Can't derive shape: no shapes (empty padstack)\n"); return; } @@ -440,7 +440,7 @@ if (end > src_shape_names) end--; *end = 0; - rnd_message(PCB_MSG_ERROR, "Can't derive shape: source shapes (%s) are empty\n", src_shape_names); + rnd_message(RND_MSG_ERROR, "Can't derive shape: source shapes (%s) are empty\n", src_shape_names); return; } @@ -461,7 +461,7 @@ int src_idx; if (ts == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't copy shape: no such source shape (empty padstack)\n"); + rnd_message(RND_MSG_ERROR, "Can't copy shape: no such source shape (empty padstack)\n"); return; } @@ -469,12 +469,12 @@ src_idx = pcb_pstk_get_shape_idx(ts, pcb_proto_layers[from].mask, pcb_proto_layers[from].comb); if (src_idx < 0) { - rnd_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); + rnd_message(RND_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); return; } if (src_idx == dst_idx) { - rnd_message(PCB_MSG_ERROR, "Can't copy shape: source shape and destination shape are the same layer type\n"); + rnd_message(RND_MSG_ERROR, "Can't copy shape: source shape and destination shape are the same layer type\n"); return; } @@ -495,7 +495,7 @@ int src_idx; if (ts == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't swap shape: no such shapes (empty padstack)\n"); + rnd_message(RND_MSG_ERROR, "Can't swap shape: no such shapes (empty padstack)\n"); return; } @@ -503,12 +503,12 @@ src_idx = pcb_pstk_get_shape_idx(ts, pcb_proto_layers[from].mask, pcb_proto_layers[from].comb); if (src_idx < 0) { - rnd_message(PCB_MSG_ERROR, "Can't swap shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); + rnd_message(RND_MSG_ERROR, "Can't swap shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); return; } if (src_idx == dst_idx) { - rnd_message(PCB_MSG_ERROR, "Can't swap shape: source shape and destination shape are the same layer type\n"); + rnd_message(RND_MSG_ERROR, "Can't swap shape: source shape and destination shape are the same layer type\n"); return; } @@ -532,7 +532,7 @@ return; if (dst_idx < 0) { - rnd_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[pse->editing_shape].name); + rnd_message(RND_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[pse->editing_shape].name); return; } @@ -648,7 +648,7 @@ int idx = ts->len; if (size <= 0) { - rnd_message(PCB_MSG_ERROR, "Invalid size - has to be larger than 0\n"); + rnd_message(RND_MSG_ERROR, "Invalid size - has to be larger than 0\n"); return -1; } @@ -729,12 +729,12 @@ pcb_pstk_proto_update(&proto); if (pse->gen_shape_in_place) { if (pcb_pstk_proto_replace(pse->data, pse->ps->proto, &proto) == PCB_PADSTACK_INVALID) - rnd_message(PCB_MSG_ERROR, "Internal error: pse_gen() failed to raplace padstack prototype\n"); + rnd_message(RND_MSG_ERROR, "Internal error: pse_gen() failed to raplace padstack prototype\n"); } else { pid = pcb_pstk_proto_insert_dup(pse->data, &proto, 1, 1); if (pid == PCB_PADSTACK_INVALID) - rnd_message(PCB_MSG_ERROR, "Internal error: pse_gen() failed to insert padstack prototype\n"); + rnd_message(RND_MSG_ERROR, "Internal error: pse_gen() failed to insert padstack prototype\n"); else pcb_pstk_change_instance(pse->ps, &pid, NULL, NULL, NULL, NULL); } @@ -1019,7 +1019,7 @@ rnd_hid_get_coords("Click on a padstack to edit", &x, &y, 0); type = pcb_search_screen(x, y, PCB_OBJ_PSTK | PCB_OBJ_SUBC_PART | PCB_LOOSE_SUBC(PCB), &ptr1, &ptr2, &ptr3); if (type != PCB_OBJ_PSTK) { - rnd_message(PCB_MSG_ERROR, "Need a padstack.\n"); + rnd_message(RND_MSG_ERROR, "Need a padstack.\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 30955) @@ -187,7 +187,7 @@ RND_ACT_IRES(0); } else { - rnd_message(PCB_MSG_ERROR, "pinout dialog: there's no subcircuit there\n"); + rnd_message(RND_MSG_ERROR, "pinout dialog: there's no subcircuit there\n"); RND_ACT_IRES(-1); } return 0; Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 30955) @@ -74,7 +74,7 @@ case RND_CFN_STRING: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, str, cn->val.string[0]); break; - default: rnd_message(PCB_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); + default: rnd_message(RND_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); } } @@ -105,7 +105,7 @@ if (strcmp(cn->val.string[0], attr->val.str) != 0) rnd_conf_set(ctx->role, item->confpath, -1, attr->val.str, RND_POL_OVERWRITE); break; - default: rnd_message(PCB_MSG_ERROR, "pcb_pref_dlg2conf_item(): widget type not handled\n"); + default: rnd_message(RND_MSG_ERROR, "pcb_pref_dlg2conf_item(): widget type not handled\n"); } ctx->pcb_conf_lock = old; } @@ -130,7 +130,7 @@ rnd_conf_native_t *cn = rnd_conf_get_field(item->confpath); if (cn == NULL) { - rnd_message(PCB_MSG_ERROR, "Internal error: pcb_pref_create_conf_item(): invalid conf node %s\n", item->confpath); + rnd_message(RND_MSG_ERROR, "Internal error: pcb_pref_create_conf_item(): invalid conf node %s\n", item->confpath); item->wid = -1; return; } Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30955) @@ -72,13 +72,13 @@ e = sorted[n]; if (strlen(e->key) > sizeof(path) - 1) { - rnd_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: path too long\n", e->key); + rnd_message(RND_MSG_WARNING, "Warning: can't create config item for %s: path too long\n", e->key); continue; } strcpy(path, e->key); basename = strrchr(path, '/'); if ((basename == NULL) || (basename == path)) { - rnd_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: invalid path (node in root)\n", e->key); + rnd_message(RND_MSG_WARNING, "Warning: can't create config item for %s: invalid path (node in root)\n", e->key); continue; } bnsep = basename; @@ -87,7 +87,7 @@ parent = pcb_dad_tree_mkdirp(tree, path, NULL); if (parent == NULL) { - rnd_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: invalid path\n", e->key); + rnd_message(RND_MSG_WARNING, "Warning: can't create config item for %s: invalid path\n", e->key); continue; } @@ -291,7 +291,7 @@ char tmp[1024]; int len = end - row->path; if ((len <= 0) || (len > sizeof(tmp)-1)) { - rnd_message(PCB_MSG_WARNING, "Warning: can't show array item %s: path too long\n", row->path); + rnd_message(RND_MSG_WARNING, "Warning: can't show array item %s: path too long\n", row->path); return; } memcpy(tmp, row->path, len); Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30955) @@ -108,11 +108,11 @@ } break; case RND_CFN_HLIST: -/* rnd_message(PCB_MSG_ERROR, "ERROR: can not import hash lists on GUI\n");*/ +/* rnd_message(RND_MSG_ERROR, "ERROR: can not import hash lists on GUI\n");*/ /* Nothing to do, for now it's just a bunch of buttons */ break; case RND_CFN_max: - rnd_message(PCB_MSG_ERROR, "ERROR: invalid conf node type\n"); + rnd_message(RND_MSG_ERROR, "ERROR: invalid conf node type\n"); break; } } @@ -149,12 +149,12 @@ lht_node_t *nd = rnd_conf_lht_get_at(ctx->role, ctx->nat->hash_path, 0); if (nd == NULL) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't copy back to non-existing list!\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't copy back to non-existing list!\n"); return; } if (nd->type != LHT_LIST) { - rnd_message(PCB_MSG_ERROR, "Internal error: can't copy back list into non-list!\n"); + rnd_message(RND_MSG_ERROR, "Internal error: can't copy back list into non-list!\n"); return; } @@ -255,24 +255,24 @@ int b[4] = {0}; if (pctx->conf.selected_nat == NULL) { - rnd_message(PCB_MSG_ERROR, "You need to select a conf leaf node to edit\nTry the tree on the left.\n"); + rnd_message(RND_MSG_ERROR, "You need to select a conf leaf node to edit\nTry the tree on the left.\n"); return; } r = pcb_dad_tree_get_selected(&pctx->dlg[pctx->conf.wintree]); if (r == NULL) { - rnd_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); + rnd_message(RND_MSG_ERROR, "You need to select a role (upper right list)\n"); return; } if (pctx->conf.selected_idx >= pctx->conf.selected_nat->array_size) { - rnd_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); + rnd_message(RND_MSG_ERROR, "Internal error: array index out of bounds\n"); return; } if (pctx->conf.selected_nat->type == RND_CFN_HLIST) { if (pctx->conf.selected_nat->gui_edit_act == NULL) { - rnd_message(PCB_MSG_ERROR, "ERROR: can not edit hash lists on GUI\n"); + rnd_message(RND_MSG_ERROR, "ERROR: can not edit hash lists on GUI\n"); return; } } @@ -398,23 +398,23 @@ pcb_hid_row_t *r; if (pctx->conf.selected_nat == NULL) { - rnd_message(PCB_MSG_ERROR, "You need to select a conf leaf node to remove\nTry the tree on the left.\n"); + rnd_message(RND_MSG_ERROR, "You need to select a conf leaf node to remove\nTry the tree on the left.\n"); return; } r = pcb_dad_tree_get_selected(&pctx->dlg[pctx->conf.wintree]); if (r == NULL) { - rnd_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); + rnd_message(RND_MSG_ERROR, "You need to select a role (upper right list)\n"); return; } if (pctx->conf.selected_idx >= pctx->conf.selected_nat->array_size) { - rnd_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); + rnd_message(RND_MSG_ERROR, "Internal error: array index out of bounds\n"); return; } if (rnd_conf_is_read_only(r->user_data2.lng)) { - rnd_message(PCB_MSG_ERROR, "Role is read-only, can not remove item\n"); + rnd_message(RND_MSG_ERROR, "Role is read-only, can not remove item\n"); return; } Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30955) @@ -322,7 +322,7 @@ switch(pos) { case 0: /* replace */ - rnd_message(PCB_MSG_ERROR, "need to select a library path row first\n"); + rnd_message(RND_MSG_ERROR, "need to select a library path row first\n"); return; case -1: /* before */ Index: trunk/src_plugins/dialogs/dlg_pref_win.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30955) @@ -109,7 +109,7 @@ return; if (pcb_wplc_save_to_file(fname) != 0) - rnd_message(PCB_MSG_ERROR, "Error saving window geometry to '%s'\n", fname); + rnd_message(RND_MSG_ERROR, "Error saving window geometry to '%s'\n", fname); } Index: trunk/src_plugins/dialogs/dlg_printcalib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30955) @@ -45,7 +45,7 @@ pcb_hid_t *printer = pcb_hid_find_printer(); if (printer == NULL) { - rnd_message(PCB_MSG_ERROR, "No printer available\n"); + rnd_message(RND_MSG_ERROR, "No printer available\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/dialogs/dlg_search.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_search.c (revision 30955) @@ -275,7 +275,7 @@ return; } } - rnd_message(PCB_MSG_ERROR, "Too many expressions in the row, can not add more\n"); + rnd_message(RND_MSG_ERROR, "Too many expressions in the row, can not add more\n"); } static void search_append_row_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) @@ -292,7 +292,7 @@ return; } } - rnd_message(PCB_MSG_ERROR, "Too many expression rows, can not add more\n"); + rnd_message(RND_MSG_ERROR, "Too many expression rows, can not add more\n"); } static void search_apply_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) Index: trunk/src_plugins/dialogs/dlg_test.c =================================================================== --- trunk/src_plugins/dialogs/dlg_test.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_test.c (revision 30955) @@ -277,7 +277,7 @@ PCB_DAD_AUTORUN("dlg_test", ctx.dlg, "attribute dialog test", &ctx, failed); if (failed != 0) - rnd_message(PCB_MSG_WARNING, "Test dialog cancelled"); + rnd_message(RND_MSG_WARNING, "Test dialog cancelled"); PCB_DAD_FREE(ctx.dlg); @@ -411,9 +411,9 @@ { pcb_hid_row_t *row = pcb_dad_tree_get_selected(attr); if (attr->val.str != NULL) - pcb_trace("tt tbl selected: path=%s row=%p '%s'\n", attr->val.str, row, row->cell[0]); + rnd_trace("tt tbl selected: path=%s row=%p '%s'\n", attr->val.str, row, row->cell[0]); else - pcb_trace("tt tbl selected: \n"); + rnd_trace("tt tbl selected: \n"); } /* row level selection */ @@ -420,9 +420,9 @@ static void cb_ttbl_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { if (row != NULL) - pcb_trace("tt row selected: row=%p '%s'\n", row, row->cell[0]); + rnd_trace("tt row selected: row=%p '%s'\n", row, row->cell[0]); else - pcb_trace("tt row selected: \n"); + rnd_trace("tt row selected: \n"); } static void cb_ttbl_free_row(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 30954) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 30955) @@ -447,7 +447,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open %s for write\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open %s for write\n", fn); return; } @@ -476,13 +476,13 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fn); return; } load_ctx = pcb_view_load_start_file(f); if (load_ctx == NULL) { - rnd_message(PCB_MSG_ERROR, "Error parsing %s - is it a view list?\n", fn); + rnd_message(RND_MSG_ERROR, "Error parsing %s - is it a view list?\n", fn); fclose(f); return; } @@ -792,7 +792,7 @@ rnd_PCB_ACT_MAY_CONVARG(3, FGW_PTR, ViewList, lst = argv[3].val.ptr_void); if ((lst != NULL) && (!fgw_ptr_in_domain(&rnd_fgw, &argv[3], PCB_PTR_DOMAIN_VIEWLIST))) { - rnd_message(PCB_MSG_ERROR, "invalid list pointer"); + rnd_message(RND_MSG_ERROR, "invalid list pointer"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 30954) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 30955) @@ -630,12 +630,12 @@ grp = pcb_get_layergrp(PCB, pcb_layer_get_group(PCB, lid)); if (grp == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid source group.\n"); + rnd_message(RND_MSG_ERROR, "Invalid source group.\n"); return -1; } if ((tflg & PCB_LYT_SILK) && (grp->len == 1)) { - rnd_message(PCB_MSG_ERROR, "Can not remove the last layer of this group because this group must have at least one layer.\n"); + rnd_message(RND_MSG_ERROR, "Can not remove the last layer of this group because this group must have at least one layer.\n"); return -1; } @@ -840,7 +840,7 @@ else if (check_layer_del(drag_lid) == 0) { g = &PCB->LayerGroups.grp[gactive]; pcb_layer_move_to_group(PCB, drag_lid, gactive); - rnd_message(PCB_MSG_INFO, "moved layer %s to group %d\n", l->name, gactive); + rnd_message(RND_MSG_INFO, "moved layer %s to group %d\n", l->name, gactive); move_layer_to_its_place:; if (lactive_idx < g->len-1) { memmove(g->lid + lactive_idx + 1, g->lid + lactive_idx, (g->len - 1 - lactive_idx) * sizeof(pcb_layer_id_t)); @@ -852,10 +852,10 @@ else if (outline_gactive >= 0 && PCB->LayerGroups.grp[outline_gactive].len == 0) { pcb_layer_t *l = &PCB->Data->Layer[drag_lid]; pcb_layer_move_to_group(PCB, drag_lid, outline_gactive); - rnd_message(PCB_MSG_INFO, "moved layer %s to group %d\n", l->name, outline_gactive); + rnd_message(RND_MSG_INFO, "moved layer %s to group %d\n", l->name, outline_gactive); } else - rnd_message(PCB_MSG_ERROR, "Can not move layer into that layer group\n"); + rnd_message(RND_MSG_ERROR, "Can not move layer into that layer group\n"); res = 1; drag_lid = -1; gactive = -1; Index: trunk/src_plugins/drc_orig/drc_orig.c =================================================================== --- trunk/src_plugins/drc_orig/drc_orig.c (revision 30954) +++ trunk/src_plugins/drc_orig/drc_orig.c (revision 30955) @@ -88,7 +88,7 @@ } break; default: - rnd_message(PCB_MSG_ERROR, "hace: Bad Plow object in callback\n"); + rnd_message(RND_MSG_ERROR, "hace: Bad Plow object in callback\n"); } return PCB_R_DIR_NOT_FOUND; Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 30954) +++ trunk/src_plugins/drc_query/dlg.c (revision 30955) @@ -96,7 +96,7 @@ txt->hid_set_text(atxt, ctx->dlg_hid_ctx, PCB_HID_TEXT_REPLACE, textval(nd, "query")); } else { - rnd_message(PCB_MSG_ERROR, "Rule %s disappeared from the config tree.\n", ctx->rule); + rnd_message(RND_MSG_ERROR, "Rule %s disappeared from the config tree.\n", ctx->rule); pcb_hid_dad_close(ctx->dlg_hid_ctx, &retovr, -1); } } @@ -140,7 +140,7 @@ nnew = lht_tree_path_(parent->doc, parent, nname0, 1, 1, &err); \ if (parent->type == LHT_LIST) free(nname0); \ if ((nnew != NULL) && (nnew->type != ntype)) { \ - rnd_message(PCB_MSG_ERROR, "Internal error: invalid existing node type for %s: %d, rule is NOT saved\n", nname, nnew->type); \ + rnd_message(RND_MSG_ERROR, "Internal error: invalid existing node type for %s: %d, rule is NOT saved\n", nname, nnew->type); \ return; \ } \ else if (nnew == NULL) { \ @@ -149,7 +149,7 @@ case LHT_HASH: err = lht_dom_hash_put(parent, nnew); break; \ case LHT_LIST: err = lht_dom_list_append(parent, nnew); break; \ default: \ - rnd_message(PCB_MSG_ERROR, "Internal error: invalid parent node type for %s: %d, rule is NOT saved\n", parent->name, parent->type); \ + rnd_message(RND_MSG_ERROR, "Internal error: invalid parent node type for %s: %d, rule is NOT saved\n", parent->name, parent->type); \ return; \ } \ } \ @@ -161,7 +161,7 @@ lht_node_t *ntxt; \ MKDIR_ND(ntxt, parent, LHT_TEXT, nname); \ if (ntxt == NULL) { \ - rnd_message(PCB_MSG_ERROR, "Internal error: new text node for %s is NULL, rule is NOT saved\n", nname); \ + rnd_message(RND_MSG_ERROR, "Internal error: new text node for %s is NULL, rule is NOT saved\n", nname); \ return; \ } \ free(ntxt->data.text.value); \ @@ -178,7 +178,7 @@ pcb_hid_text_t *txt = atxt->wdata; if ((ri < 0) || (ri >= sizeof(save_rolee)/sizeof(save_rolee[0]))) { - rnd_message(PCB_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); + rnd_message(RND_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); return; } @@ -187,7 +187,7 @@ if (nd == NULL) { nd = rnd_conf_lht_get_first(role, 1); if (nd == NULL) { - rnd_message(PCB_MSG_ERROR, "Internal error: failed to create role root, rule is NOT saved\n"); + rnd_message(RND_MSG_ERROR, "Internal error: failed to create role root, rule is NOT saved\n"); return; } MKDIR_ND(nd, nd, LHT_HASH, "plugins"); @@ -202,10 +202,10 @@ lht_node_t *nnew = lht_dom_duptree(i->prop.src); lht_dom_list_append(nd, nnew); } - rnd_message(PCB_MSG_WARNING, "NOTE: Copying ALL drc rule to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(RND_MSG_WARNING, "NOTE: Copying ALL drc rule to config role %s\n", ctx->rule, save_roles[ri]); } MKDIR_ND(nd, nd, LHT_HASH, ctx->rule); - rnd_message(PCB_MSG_INFO, "NOTE: Copying drc rule '%s' to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(RND_MSG_INFO, "NOTE: Copying drc rule '%s' to config role %s\n", ctx->rule, save_roles[ri]); } MKDIR_ND_SET_TEXT(nd, "type", ctx->dlg[ctx->wtype].val.str); @@ -230,7 +230,7 @@ for(ctx = gdl_first(&rule_edit_dialogs); ctx != NULL; ctx = gdl_next(&rule_edit_dialogs, ctx)) { if (strcmp(rule, ctx->rule) == 0) { - rnd_message(PCB_MSG_ERROR, "An edit dialog for rule %s is already open.\n", rule); + rnd_message(RND_MSG_ERROR, "An edit dialog for rule %s is already open.\n", rule); return 0; } } @@ -238,7 +238,7 @@ path = pcb_concat(DRC_CONF_PATH_RULES, rule, ":0", NULL); nd = rnd_conf_lht_get_at_mainplug(role, path, 1, 0); if (nd == NULL) { - rnd_message(PCB_MSG_ERROR, "Rule %s not found on this role.\n", rule); + rnd_message(RND_MSG_ERROR, "Rule %s not found on this role.\n", rule); return -1; } @@ -431,13 +431,13 @@ int *dis; if (row == NULL) { - rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); + rnd_message(RND_MSG_ERROR, "Select a rule first!\n"); return; } dis = drc_get_disable(row->cell[0]); if (dis == NULL) { - rnd_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); + rnd_message(RND_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); return; } @@ -448,12 +448,12 @@ #define rlist_fetch() \ do { \ if (row == NULL) { \ - rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); \ + rnd_message(RND_MSG_ERROR, "Select a rule first!\n"); \ return; \ } \ role = rnd_conf_role_parse(row->cell[1]); \ if (role == RND_CFR_invalid) { \ - rnd_message(PCB_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); \ + rnd_message(RND_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); \ return; \ } \ } while(0) @@ -463,7 +463,7 @@ char *path = pcb_concat(DRC_CONF_PATH_RULES, row->cell[0], ":0", NULL); \ nd = rnd_conf_lht_get_at_mainplug(role, path, 1, 0); \ if (nd == NULL) { \ - rnd_message(PCB_MSG_ERROR, "internal error: rule not found at %s\n", path); \ + rnd_message(RND_MSG_ERROR, "internal error: rule not found at %s\n", path); \ return; \ } \ free(path); \ @@ -495,7 +495,7 @@ script = textval(nd, "query"); if (script == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not run rule %s: no query specified\n", row->cell[0]); + rnd_message(RND_MSG_ERROR, "Can not run rule %s: no query specified\n", row->cell[0]); return; } Index: trunk/src_plugins/drc_query/drc_query.c =================================================================== --- trunk/src_plugins/drc_query/drc_query.c (revision 30954) +++ trunk/src_plugins/drc_query/drc_query.c (revision 30955) @@ -149,7 +149,7 @@ double ts, te; if (query == NULL) { - rnd_message(PCB_MSG_ERROR, "drc_query: igoring rule with no query string:%s\n", name); + rnd_message(RND_MSG_ERROR, "drc_query: igoring rule with no query string:%s\n", name); return 0; } if (type == NULL) type = "DRC violation"; @@ -184,7 +184,7 @@ if (n == NULL) return NULL; if (n->type != LHT_TEXT) { - rnd_message(PCB_MSG_ERROR, "drc_query: igoring non-text node %s of rule %s \n", name, i->name); + rnd_message(RND_MSG_ERROR, "drc_query: igoring non-text node %s of rule %s \n", name, i->name); return NULL; } return n->data.text.value; @@ -219,7 +219,7 @@ lht_node_t *rule = i->prop.src; int *dis; if (rule->type != LHT_HASH) { - rnd_message(PCB_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); + rnd_message(RND_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); continue; } @@ -272,7 +272,7 @@ nat = rnd_conf_reg_field_(b, 1, RND_CFN_BOOLEAN, path, rnd_strdup(sdesc), 0); if (nat == NULL) { free(b); - rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(RND_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); goto fail; } @@ -311,13 +311,13 @@ if (stype == NULL) { - rnd_message(PCB_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); + rnd_message(RND_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); goto fail; } type = rnd_conf_native_type_parse(stype); if (type >= RND_CFN_LIST) { - rnd_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); + rnd_message(RND_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); goto fail; } @@ -325,7 +325,7 @@ nat = rnd_conf_reg_field_(c, 1, type, path, rnd_strdup(sdesc), 0); if (nat == NULL) { free(c); - rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(RND_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); goto fail; } Index: trunk/src_plugins/expfeat/expfeat.c =================================================================== --- trunk/src_plugins/expfeat/expfeat.c (revision 30954) +++ trunk/src_plugins/expfeat/expfeat.c (revision 30955) @@ -42,7 +42,7 @@ doc/user/09_appendix/action_src/) */ static fgw_error_t pcb_act_ExpFeatTmp(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_INFO, "Hello world from expfeat!\n"); + rnd_message(RND_MSG_INFO, "Hello world from expfeat!\n"); RND_ACT_IRES(0); return 0; } Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 30954) +++ trunk/src_plugins/export_bom/bom.c (revision 30955) @@ -200,7 +200,7 @@ fp = pcb_fopen_askovr(&PCB->hidlib, bom_filename, "w", NULL); if (!fp) { - rnd_message(PCB_MSG_ERROR, "Cannot open file %s for writing\n", bom_filename); + rnd_message(RND_MSG_ERROR, "Cannot open file %s for writing\n", bom_filename); print_and_free(NULL, bom); return 1; } Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 30954) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30955) @@ -510,7 +510,7 @@ /* Print out the dsn .dsn file. */ fp = pcb_fopen_askovr(&PCB->hidlib, dsn_filename, "w", NULL); if (!fp) { - rnd_message(PCB_MSG_WARNING, "Cannot open file %s for writing\n", dsn_filename); + rnd_message(RND_MSG_WARNING, "Cannot open file %s for writing\n", dsn_filename); return 1; } Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 30954) +++ trunk/src_plugins/export_dxf/dxf.c (revision 30955) @@ -247,7 +247,7 @@ dxf_gen_layer(&dxf_ctx, *s); } else { - rnd_message(PCB_MSG_ERROR, "Invalid header insertion: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "Invalid header insertion: '%s'\n", name); return -1; } @@ -256,7 +256,7 @@ int insert_ftr(FILE *f, const char *prefix, char *name, lht_err_t *err) { - rnd_message(PCB_MSG_ERROR, "Invalid footer insertion: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "Invalid footer insertion: '%s'\n", name); return -1; } @@ -310,7 +310,7 @@ } if (dxf_ctx.temp == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open dxf template: %s\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open dxf template: %s\n", fn); fclose(dxf_ctx.f); return; } @@ -318,7 +318,7 @@ dxf_ctx.handle = 100; if (dxf_ctx.f != NULL) { if (lht_temp_exec(dxf_ctx.f, "", dxf_ctx.temp, "header", insert_hdr, &err) != 0) - rnd_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(RND_MSG_ERROR, "Can't render dxf template header\n"); } if (!dxf_cam.active) @@ -330,7 +330,7 @@ pcb_hid_restore_layer_ons(save_ons); if (lht_temp_exec(dxf_ctx.f, "", dxf_ctx.temp, "footer", insert_ftr, &err) != 0) - rnd_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(RND_MSG_ERROR, "Can't render dxf template header\n"); fclose(dxf_ctx.f); if (!dxf_cam.active) dxf_cam.okempty_content = 1; /* never warn in direct export */ @@ -337,11 +337,11 @@ if (pcb_cam_end(&dxf_cam) == 0) { if (!dxf_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (dxf_ctx.drawn_objs == 0) { if (!dxf_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -363,7 +363,7 @@ if (dxf_ctx.f != NULL) { if (lht_temp_exec(dxf_ctx.f, "", dxf_ctx.temp, "footer", insert_ftr, &err) != 0) - rnd_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(RND_MSG_ERROR, "Can't render dxf template header\n"); fclose(dxf_ctx.f); } @@ -373,7 +373,7 @@ return 0; } if (lht_temp_exec(dxf_ctx.f, "", dxf_ctx.temp, "header", insert_hdr, &err) != 0) - rnd_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(RND_MSG_ERROR, "Can't render dxf template header\n"); } if (!dxf_cam.active) { @@ -508,7 +508,7 @@ static void dxf_calibrate(pcb_hid_t *hid, double xval, double yval) { - rnd_message(PCB_MSG_ERROR, "dxf_calibrate() not implemented"); + rnd_message(RND_MSG_ERROR, "dxf_calibrate() not implemented"); return; } Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30954) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30955) @@ -62,7 +62,7 @@ if (i == 0 || pd->diam != *excellon_last_tool_dia) { aperture_t *ap = find_aperture(&ctx->apr, pd->diam, ROUND); if (ap == NULL) { - rnd_message(PCB_MSG_ERROR, "excellon: internal error: can't register ROUND aperture of dia %$mm\n", pd->diam); + rnd_message(RND_MSG_ERROR, "excellon: internal error: can't register ROUND aperture of dia %$mm\n", pd->diam); continue; } fprintf(f, "T%02d\r\n", ap->dCode); @@ -117,12 +117,12 @@ coord_format_t *cfmt; if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: Could not open %s for writing the excellon file.\n", fn); + rnd_message(RND_MSG_ERROR, "Error: Could not open %s for writing the excellon file.\n", fn); return; } if ((coord_fmt_idx < 0) || (coord_fmt_idx >= NUM_COORD_FORMATS)) { - rnd_message(PCB_MSG_ERROR, "Error: Invalid excellon coordinate format idx %d.\n", coord_fmt_idx); + rnd_message(RND_MSG_ERROR, "Error: Invalid excellon coordinate format idx %d.\n", coord_fmt_idx); return; } @@ -287,11 +287,11 @@ if (pcb_cam_end(&excellon_cam) == 0) { if (!excellon_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (exc_drawn_objs == 0) { if (!excellon_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } pcb_drill_uninit(&pdrills); @@ -349,7 +349,7 @@ case PCB_HID_COMP_NEGATIVE: if (!warn.comp) { warn.comp = 1; - rnd_message(PCB_MSG_ERROR, "Excellon: can not draw composite layers (some features may be missing from the export)\n"); + rnd_message(RND_MSG_ERROR, "Excellon: can not draw composite layers (some features may be missing from the export)\n"); } } } @@ -385,7 +385,7 @@ exc_drawn_objs++; if ((gc->style != pcb_cap_round) && (!warn.nonround)) { warn.nonround = 1; - rnd_message(PCB_MSG_ERROR, "Excellon: can not set non-round aperture (some features may be missing from the export)\n"); + rnd_message(RND_MSG_ERROR, "Excellon: can not set non-round aperture (some features may be missing from the export)\n"); } if (radius == 0) @@ -424,7 +424,7 @@ { if (!warn.arc) { warn.arc = 1; - rnd_message(PCB_MSG_ERROR, "Excellon: can not export arcs (some features may be missing from the export)\n"); + rnd_message(RND_MSG_ERROR, "Excellon: can not export arcs (some features may be missing from the export)\n"); } } @@ -443,7 +443,7 @@ { if (!warn.poly) { warn.poly = 1; - rnd_message(PCB_MSG_ERROR, "Excellon: can not export polygons (some features may be missing from the export)\n"); + rnd_message(RND_MSG_ERROR, "Excellon: can not export polygons (some features may be missing from the export)\n"); } } @@ -460,7 +460,7 @@ static void excellon_calibrate(pcb_hid_t *hid, double xval, double yval) { - rnd_message(PCB_MSG_ERROR, "Excellon internal error: can not calibrate()\n"); + rnd_message(RND_MSG_ERROR, "Excellon internal error: can not calibrate()\n"); } static int excellon_usage(pcb_hid_t *hid, const char *topic) Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30954) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30955) @@ -100,13 +100,13 @@ char line[1024]; f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open fidocadj PCB library file '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open fidocadj PCB library file '%s' for read\n", fn); return -1; } *line = '\0'; fgets(line, sizeof(line), f); if (rnd_strncasecmp(line, "[FIDOLIB PCB Footprints]", 24) != 0) { - rnd_message(PCB_MSG_ERROR, "'%s' doesn't have the fidocadj lib header\n", fn); + rnd_message(RND_MSG_ERROR, "'%s' doesn't have the fidocadj lib header\n", fn); fclose(f); return -1; } Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 30954) +++ trunk/src_plugins/export_gcode/gcode.c (revision 30955) @@ -167,7 +167,7 @@ if (step > 0) step = -step; else if (step == 0) { - rnd_message(PCB_MSG_ERROR, "export_gcode: cut increment not configured - not exporting thru-cut layer\n"); + rnd_message(RND_MSG_ERROR, "export_gcode: cut increment not configured - not exporting thru-cut layer\n"); return; } @@ -175,7 +175,7 @@ if (total == 0) { total = pcb_board_thickness(gctx.pcb, "gcode", PCB_BRDTHICK_PRINT_ERROR); if (total == 0) { - rnd_message(PCB_MSG_ERROR, "export_gcode: can't determine board thickness - not exporting thru-cut layer\n"); + rnd_message(RND_MSG_ERROR, "export_gcode: can't determine board thickness - not exporting thru-cut layer\n"); return; } } @@ -369,11 +369,11 @@ if (pcb_cam_end(&gctx.cam) == 0) { if (!gctx.cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (gctx.drawn_objs == 0) { if (!gctx.cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 30954) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30955) @@ -333,7 +333,7 @@ /* set up the coord format */ i = options[HA_coord_format].lng; if ((i < 0) || (i >= NUM_COORD_FORMATS)) { - rnd_message(PCB_MSG_ERROR, "Invalid coordinate format (out of bounds)\n"); + rnd_message(RND_MSG_ERROR, "Invalid coordinate format (out of bounds)\n"); return; } gerber_cfmt = &coord_format[i]; @@ -406,11 +406,11 @@ if (pcb_cam_end(&gerber_cam) == 0) { if (!gerber_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (gerber_drawn_objs == 0) { if (!gerber_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } /* in cam mode we have f still open */ @@ -527,7 +527,7 @@ if (f == NULL) { /* open a new file if we closed the previous (cam mode: only one file) */ f = pcb_fopen_askovr(&PCB->hidlib, gerber_cam.active ? gerber_cam.fn : filename, "wb", &gerber_ovr); /* Binary needed to force CR-LF */ if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: Could not open %s for writing.\n", filename); + rnd_message(RND_MSG_ERROR, "Error: Could not open %s for writing.\n", filename); return 1; } } Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30954) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30955) @@ -92,7 +92,7 @@ dst[n] = ' '; } if (*d != '\0') - rnd_message(PCB_MSG_WARNING, "Data '%s' is too long for a(n) %s, truncated\n", data, name); + rnd_message(RND_MSG_WARNING, "Data '%s' is too long for a(n) %s, truncated\n", data, name); } static void fill_field_coord(write_ctx_t *ctx, char *dst, int start, int end, rnd_coord_t crd, int sign, const char *name) @@ -463,7 +463,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open %s for write\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open %s for write\n", fn); return; } ipcd356_write(PCB, f); Index: trunk/src_plugins/export_oldconn/oldconn.c =================================================================== --- trunk/src_plugins/export_oldconn/oldconn.c (revision 30954) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 30955) @@ -249,7 +249,7 @@ return NULL; } if ((fp = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL)) == NULL) - pcb_open_error_message(Filename); + rnd_open_error_message(Filename); } return fp; } Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 30954) +++ trunk/src_plugins/export_openems/excitation.c (revision 30955) @@ -86,7 +86,7 @@ if (orig != NULL) { hv.lng = strtol(orig, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid integer value in board attribute '%s': '%s'\n", attrkey, orig); + rnd_message(RND_MSG_ERROR, "Invalid integer value in board attribute '%s': '%s'\n", attrkey, orig); hv.lng = 0; } } @@ -115,7 +115,7 @@ if (*end != '\0') { while(isspace(*end)) end++; if (rnd_strcasecmp(end, "hz") != 0) { - rnd_message(PCB_MSG_ERROR, "Invalid real value (Hz) in board attribute '%s': '%s'\n", attrkey, orig); + rnd_message(RND_MSG_ERROR, "Invalid real value (Hz) in board attribute '%s': '%s'\n", attrkey, orig); hv.dbl = 0; } } @@ -187,10 +187,10 @@ double f0 = 0, fc = 0; if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) - rnd_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); + rnd_message(RND_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) - rnd_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::fc\n"); + rnd_message(RND_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::fc\n"); return pcb_strdup_printf("FDTD = SetGaussExcite(FDTD, %f, %f);", fc, f0); } @@ -225,7 +225,7 @@ double f0; if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) - rnd_message(PCB_MSG_ERROR, "Sinus excitation: unable to parse frequency sinusoidal::f0\n"); + rnd_message(RND_MSG_ERROR, "Sinus excitation: unable to parse frequency sinusoidal::f0\n"); return pcb_strdup_printf("FDTD = SetSinusExcite(FDTD, %f);", f0); } @@ -265,7 +265,7 @@ double f0; if (!to_hz(rnd_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) - rnd_message(PCB_MSG_ERROR, "Custom excitation: unable to parse frequency custom::f0\n"); + rnd_message(RND_MSG_ERROR, "Custom excitation: unable to parse frequency custom::f0\n"); return pcb_strdup_printf( "FDTD = SetCustomExcite(FDTD, %f, %s)", @@ -371,7 +371,7 @@ hv.lng = exc_ctx.selected; if ((exc_ctx.selected < 0) || (exc_ctx.selected >= sizeof(excitations)/sizeof(excitations[0]))) { - rnd_message(PCB_MSG_ERROR, "Invalid excitation selected\n"); + rnd_message(RND_MSG_ERROR, "Invalid excitation selected\n"); exc_ctx.selected = 0; } @@ -410,7 +410,7 @@ if (excnames[0] == NULL) { for(n = 0, e = excitations; e->name != NULL; n++,e++) { if (n >= MAX_EXC) { - rnd_message(PCB_MSG_ERROR, "internal error: too many excitations"); + rnd_message(RND_MSG_ERROR, "internal error: too many excitations"); break; } excnames[n] = e->name; @@ -470,7 +470,7 @@ pcb_dlg_exc(); else if (strcmp(op, "select") == 0) { if (a1 == NULL) { - rnd_message(PCB_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); + rnd_message(RND_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); goto error; } rnd_attribute_put(&PCB->Attributes, AEPREFIX "type", a1); @@ -485,7 +485,7 @@ case 4: a1 = excitations[exc_ctx.selected].name; start = 2; break; case 5: start = 3; break; default: - rnd_message(PCB_MSG_ERROR, "OpenemsExcitation(set) needs exactly 2 or 3 more arguments"); + rnd_message(RND_MSG_ERROR, "OpenemsExcitation(set) needs exactly 2 or 3 more arguments"); goto error; } @@ -506,7 +506,7 @@ case 3: a1 = excitations[exc_ctx.selected].name; start = 2; break; case 4: start = 3; break; default: - rnd_message(PCB_MSG_ERROR, "OpenemsExcitation(get) needs exactly 1 or 2 more arguments"); + rnd_message(RND_MSG_ERROR, "OpenemsExcitation(get) needs exactly 1 or 2 more arguments"); goto error; } @@ -528,7 +528,7 @@ static char *pcb_openems_excitation_get(pcb_board_t *pcb) { if ((exc_ctx.selected < 0) || (exc_ctx.selected >= sizeof(excitations)/sizeof(excitations[0]))) { - rnd_message(PCB_MSG_ERROR, "No excitation selected\n"); + rnd_message(RND_MSG_ERROR, "No excitation selected\n"); return rnd_strdup("%% ERROR: no excitation selected\n"); } return excitations[exc_ctx.selected].get(exc_ctx.selected); Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 30954) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30955) @@ -375,7 +375,7 @@ if (*end == '\0') resistance = tmp; else - rnd_message(PCB_MSG_WARNING, "Ignoring invalid openems::resistance value for port %s: '%s' (must be a number without suffix)\n", port_name, att); + rnd_message(RND_MSG_WARNING, "Ignoring invalid openems::resistance value for port %s: '%s' (must be a number without suffix)\n", port_name, att); } att = rnd_attribute_get(&o->Attributes, "openems::active"); @@ -385,7 +385,7 @@ else if (rnd_strcasecmp(att, "false") == 0) act = 0; else - rnd_message(PCB_MSG_WARNING, "Ignoring invalid openems::active value for port %s: '%s' (must be true or false)\n", port_name, att); + rnd_message(RND_MSG_WARNING, "Ignoring invalid openems::active value for port %s: '%s' (must be true or false)\n", port_name, att); } for(s = safe_name; *s != '\0'; s++) @@ -408,15 +408,15 @@ bot = (pcb_pstk_shape(ps, PCB_LYT_COPPER | PCB_LYT_BOTTOM, 0) != NULL); intern = (pcb_pstk_shape(ps, PCB_LYT_INTERN | PCB_LYT_BOTTOM, 0) != NULL); if (intern) { - rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: it has internal copper\n(must be either top or bottom copper)\n", port_name); + rnd_message(RND_MSG_ERROR, "Can not export openems vport %s: it has internal copper\n(must be either top or bottom copper)\n", port_name); return -1; } if (top && bot) { - rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: it has both top and bottom copper\n", port_name); + rnd_message(RND_MSG_ERROR, "Can not export openems vport %s: it has both top and bottom copper\n", port_name); return -1; } if (!top && !bot) { - rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: it does not have copper either on top or bottom\n", port_name); + rnd_message(RND_MSG_ERROR, "Can not export openems vport %s: it does not have copper either on top or bottom\n", port_name); return -1; } @@ -430,7 +430,7 @@ *gstep = -1; } if (gid1 < 0) { - rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: can not find top or bottom layer group ID\n", port_name); + rnd_message(RND_MSG_ERROR, "Can not export openems vport %s: can not find top or bottom layer group ID\n", port_name); return -1; } @@ -445,7 +445,7 @@ if (pcb->LayerGroups.grp[gid2].ltype & PCB_LYT_COPPER) return gid2; - rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: can not find pair layer\n", port_name); + rnd_message(RND_MSG_ERROR, "Can not export openems vport %s: can not find pair layer\n", port_name); return -1; } @@ -467,7 +467,7 @@ if (o->type == PCB_OBJ_SUBC) { if (!ctx->warn_subc_term) - rnd_message(PCB_MSG_ERROR, "Subcircuit being a terminal is not supported.\n"); + rnd_message(RND_MSG_ERROR, "Subcircuit being a terminal is not supported.\n"); ctx->warn_subc_term = 1; continue; } @@ -501,7 +501,7 @@ break; default: if (!ctx->warn_port_pstk) - rnd_message(PCB_MSG_ERROR, "Only padstacks can be openems ports at the moment\n"); + rnd_message(RND_MSG_ERROR, "Only padstacks can be openems ports at the moment\n"); ctx->warn_port_pstk = 1; break; } @@ -717,7 +717,7 @@ case PCB_HID_COMP_POSITIVE_XOR: break; case PCB_HID_COMP_NEGATIVE: - rnd_message(PCB_MSG_ERROR, "Can't draw composite layer, especially not on copper\n"); + rnd_message(RND_MSG_ERROR, "Can't draw composite layer, especially not on copper\n"); break; case PCB_HID_COMP_FLUSH: break; @@ -808,7 +808,7 @@ static void openems_calibrate(pcb_hid_t *hid, double xval, double yval) { - rnd_message(PCB_MSG_ERROR, "openems_calibrate() not implemented"); + rnd_message(RND_MSG_ERROR, "openems_calibrate() not implemented"); return; } Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 30954) +++ trunk/src_plugins/export_openems/mesh.c (revision 30955) @@ -60,7 +60,7 @@ subst_thick = pcb_board_thickness(PCB, "openems", PCB_BRDTHICK_PRINT_ERROR); if (subst_thick <= 0) { - rnd_message(PCB_MSG_ERROR, "Assuming 1.5mm thick substrate because of the missing thickness attributes.\nFeel free to change it in the mesh dialog or add the attributes to the substrate groups."); + rnd_message(RND_MSG_ERROR, "Assuming 1.5mm thick substrate because of the missing thickness attributes.\nFeel free to change it in the mesh dialog or add the attributes to the substrate groups."); subst_thick = PCB_MM_TO_COORD(1.5); } @@ -186,12 +186,12 @@ int v; \ char *end; \ if (n->type != LHT_TEXT) { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ return -1; \ } \ v = strtol(n->data.text.value, &end, 10); \ if (*end != '\0') { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh integer: " #name "\n"); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh integer: " #name "\n"); \ return -1; \ } \ PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, lng, v); \ @@ -205,12 +205,12 @@ double v; \ rnd_bool succ; \ if (n->type != LHT_TEXT) { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ return -1; \ } \ v = pcb_get_value(n->data.text.value, NULL, NULL, &succ); \ if (!succ) { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh coord: " #name "\n"); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh coord: " #name "\n"); \ return -1; \ } \ PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, crd, (rnd_coord_t)v); \ @@ -223,7 +223,7 @@ int __found__ = 0, __n__; \ const char **__a__; \ if (node->type != LHT_TEXT) { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh value: " #name " should be text\n"); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh value: " #name " should be text\n"); \ return -1; \ } \ if (strcmp(node->data.text.value, "invalid") == 0) break; \ @@ -234,7 +234,7 @@ } \ } \ if (!__found__) { \ - rnd_message(PCB_MSG_ERROR, "Invalid mesh value '%s' for " #name "\n", node->data.text.value); \ + rnd_message(RND_MSG_ERROR, "Invalid mesh value '%s' for " #name "\n", node->data.text.value); \ return -1; \ } \ PCB_DAD_SET_VALUE(me->dlg_hid_ctx, dst, lng, __n__); \ @@ -246,7 +246,7 @@ lht_node_t *lst, *nd; if ((root->type != LHT_HASH) || (strcmp(root->name, "pcb-rnd-mesh-v1") != 0)) { - rnd_message(PCB_MSG_ERROR, "Input is not a valid mesh save - should be a ha:pcb-rnd-mesh subtree\n"); + rnd_message(RND_MSG_ERROR, "Input is not a valid mesh save - should be a ha:pcb-rnd-mesh subtree\n"); return -1; } @@ -271,7 +271,7 @@ if (lst != NULL) { int n; if (lst->type != LHT_LIST) { - rnd_message(PCB_MSG_ERROR, "Boundary shall be a list\n"); + rnd_message(RND_MSG_ERROR, "Boundary shall be a list\n"); return -1; } for(n = 0, nd = lst->data.list.first; (n < 6) && (nd != NULL); n++,nd = nd->next) @@ -512,7 +512,7 @@ pcb_range_t *r; if (vtr0_len(&mesh->line[dir].dens) < 1) { - rnd_message(PCB_MSG_ERROR, "There are not enough objects to do the meshing\n"); + rnd_message(RND_MSG_ERROR, "There are not enough objects to do the meshing\n"); return -1; } @@ -528,7 +528,7 @@ vtc0_remove(&mesh->line[dir].edge, n+1, 1); } else - rnd_message(PCB_MSG_ERROR, "meshing error: invalid minimum spacing (%$mm) required: forced %s edges are closer than that around %$mm..%$mm; try decreasing your minimum spacing to below %$mm\n", mesh->min_space, dir == PCB_MESH_VERTICAL ? "vertical" : "horizonal", c1, c2, c2-c1); + rnd_message(RND_MSG_ERROR, "meshing error: invalid minimum spacing (%$mm) required: forced %s edges are closer than that around %$mm..%$mm; try decreasing your minimum spacing to below %$mm\n", mesh->min_space, dir == PCB_MESH_VERTICAL ? "vertical" : "horizonal", c1, c2, c2-c1); } } @@ -982,7 +982,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fname, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not open '%s' for write\n", fname); + rnd_message(RND_MSG_ERROR, "Can not open '%s' for write\n", fname); return; } @@ -1012,11 +1012,11 @@ f = pcb_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not open '%s' for read\n", fname); + rnd_message(RND_MSG_ERROR, "Can not open '%s' for read\n", fname); return; } if (mesh_load_file(&ia, f) != 0) - rnd_message(PCB_MSG_ERROR, "Loading mesh settings from '%s' failed.\n", fname); + rnd_message(RND_MSG_ERROR, "Loading mesh settings from '%s' failed.\n", fname); fclose(f); } Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30954) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30955) @@ -585,7 +585,7 @@ static void openscad_calibrate(pcb_hid_t *hid, double xval, double yval) { - rnd_message(PCB_MSG_ERROR, "openscad_calibrate() not implemented"); + rnd_message(RND_MSG_ERROR, "openscad_calibrate() not implemented"); return; } @@ -613,7 +613,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to open %s for writing\n", name); + rnd_message(RND_MSG_ERROR, "Failed to open %s for writing\n", name); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/export_openscad/scad_models.c =================================================================== --- trunk/src_plugins/export_openscad/scad_models.c (revision 30954) +++ trunk/src_plugins/export_openscad/scad_models.c (revision 30955) @@ -68,7 +68,7 @@ } else { htsp_set(models, (char *)name, NULL); - rnd_message(PCB_MSG_WARNING, "openscad: can't find model file for %s in the footprint library\n", name); + rnd_message(RND_MSG_WARNING, "openscad: can't find model file for %s in the footprint library\n", name); } } ref = htsp_get(models, (char *)name); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 30954) +++ trunk/src_plugins/export_png/png.c (revision 30955) @@ -703,7 +703,7 @@ im = gdImageCreate(w, h); if (im == NULL) { - rnd_message(PCB_MSG_ERROR, "png_do_export(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", w, h); + rnd_message(RND_MSG_ERROR, "png_do_export(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", w, h); return; } @@ -724,7 +724,7 @@ white->a = 0; white->c = gdImageColorAllocateAlpha(im, white->r, white->g, white->b, white->a); if (white->c == BADC) { - rnd_message(PCB_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); return; } @@ -733,7 +733,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(im, black->r, black->g, black->b); if (black->c == BADC) { - rnd_message(PCB_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); return; } @@ -783,11 +783,11 @@ if (pcb_cam_end(&png_cam) == 0) { if (!png_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "png cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (png_drawn_objs == 0) { if (!png_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "png cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -886,7 +886,7 @@ if (comp_im == NULL) { comp_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!comp_im) { - rnd_message(PCB_MSG_ERROR, "png_set_drawing_mode(): gdImageCreate(%d, %d) returned NULL on comp_im. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); + rnd_message(RND_MSG_ERROR, "png_set_drawing_mode(): gdImageCreate(%d, %d) returned NULL on comp_im. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); return; } } @@ -897,7 +897,7 @@ if (erase_im == NULL) { erase_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!erase_im) { - rnd_message(PCB_MSG_ERROR, "png_set_drawing_mode(): gdImageCreate(%d, %d) returned NULL on erase_im. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); + rnd_message(RND_MSG_ERROR, "png_set_drawing_mode(): gdImageCreate(%d, %d) returned NULL on erase_im. Corrupt export!\n", gdImageSY(im), gdImageSY(im)); return; } } @@ -973,7 +973,7 @@ gc->color->b = color->b; gc->color->c = gdImageColorAllocate(im, gc->color->r, gc->color->g, gc->color->b); if (gc->color->c == BADC) { - rnd_message(PCB_MSG_ERROR, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } } @@ -1082,13 +1082,13 @@ int bg, fg; agc->brush = gdImageCreate(r, r); if (agc->brush == NULL) { - rnd_message(PCB_MSG_ERROR, "use_gc(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", r, r); + rnd_message(RND_MSG_ERROR, "use_gc(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", r, r); return; } bg = gdImageColorAllocate(agc->brush, 255, 255, 255); if (bg == BADC) { - rnd_message(PCB_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } if (unerase_override) @@ -1096,7 +1096,7 @@ else fg = gdImageColorAllocateAlpha(agc->brush, agc->r, agc->g, agc->b, 0); if (fg == BADC) { - rnd_message(PCB_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } gdImageColorTransparent(agc->brush, bg); Index: trunk/src_plugins/export_png/png_photo2.c =================================================================== --- trunk/src_plugins/export_png/png_photo2.c (revision 30954) +++ trunk/src_plugins/export_png/png_photo2.c (revision 30955) @@ -178,7 +178,7 @@ static color_struct *black = NULL, *white = NULL; *photo_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (photo_im == NULL) { - rnd_message(PCB_MSG_ERROR, "png_set_layer(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", gdImageSX(im), gdImageSY(im)); + rnd_message(RND_MSG_ERROR, "png_set_layer(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", gdImageSX(im), gdImageSY(im)); return 0; } @@ -188,7 +188,7 @@ white->a = 0; white->c = gdImageColorAllocate(*photo_im, white->r, white->g, white->b); if (white->c == BADC) { - rnd_message(PCB_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return 0; } @@ -196,7 +196,7 @@ black->r = black->g = black->b = black->a = 0; black->c = gdImageColorAllocate(*photo_im, black->r, black->g, black->b); if (black->c == BADC) { - rnd_message(PCB_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(RND_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return 0; } Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 30954) +++ trunk/src_plugins/export_ps/eps.c (revision 30955) @@ -349,11 +349,11 @@ if (pcb_cam_end(&eps_cam) == 0) { if (!eps_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "eps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (eps_drawn_objs == 0) { if (!eps_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "eps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 30954) +++ trunk/src_plugins/export_ps/ps.c (revision 30955) @@ -661,11 +661,11 @@ if (pcb_cam_end(&ps_cam) == 0) { if (!ps_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "ps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "ps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (global.drawn_objs == 0) { if (!ps_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "ps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "ps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -1351,7 +1351,7 @@ if (xval < 2) ps_attribute_list[HA_xcalib].default_val.dbl = global.calibration_x = xval; else - rnd_message(PCB_MSG_ERROR, "X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); + rnd_message(RND_MSG_ERROR, "X value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 15.0, 7.5\n", xval); } if (guess(yval, 4, &global.calibration_y)) if (guess(yval, 20, &global.calibration_y)) @@ -1359,7 +1359,7 @@ if (yval < 2) ps_attribute_list[HA_ycalib].default_val.dbl = global.calibration_y = yval; else - rnd_message(PCB_MSG_ERROR, "Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); + rnd_message(RND_MSG_ERROR, "Y value of %g is too far off.\n" "Expecting it near: 1.0, 4.0, 20.0, 10.0\n", yval); } return; } Index: trunk/src_plugins/export_stl/export_stl.c =================================================================== --- trunk/src_plugins/export_stl/export_stl.c (revision 30954) +++ trunk/src_plugins/export_stl/export_stl.c (revision 30955) @@ -212,7 +212,7 @@ if (options[HA_ovrthick].crd > 0) thick = options[HA_ovrthick].crd; else thick = pcb_board_thickness(PCB, "stl", PCB_BRDTHICK_PRINT_ERROR); if (thick <= 0) { - rnd_message(PCB_MSG_WARNING, "STL: can not determine board thickness - falling back to hardwired 1.6mm\n"); + rnd_message(RND_MSG_WARNING, "STL: can not determine board thickness - falling back to hardwired 1.6mm\n"); thick = PCB_MM_TO_COORD(1.6); } Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 30954) +++ trunk/src_plugins/export_svg/svg.c (revision 30955) @@ -369,11 +369,11 @@ if (pcb_cam_end(&svg_cam) == 0) { if (!svg_cam.okempty_group) - rnd_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "svg cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); } else if (svg_drawn_objs == 0) { if (!svg_cam.okempty_content) - rnd_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(RND_MSG_ERROR, "svg cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -742,7 +742,7 @@ maxdiff = height; if (diff2 > maxdiff / 1000) { if (!gc->warned_elliptical) { - rnd_message(PCB_MSG_ERROR, "Can't draw elliptical arc on svg; object omitted; expect BROKEN TRACE\n"); + rnd_message(RND_MSG_ERROR, "Can't draw elliptical arc on svg; object omitted; expect BROKEN TRACE\n"); gc->warned_elliptical = 1; } return; @@ -866,7 +866,7 @@ static void svg_calibrate(pcb_hid_t *hid, double xval, double yval) { - rnd_message(PCB_MSG_ERROR, "svg_calibrate() not implemented"); + rnd_message(RND_MSG_ERROR, "svg_calibrate() not implemented"); return; } Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30954) +++ trunk/src_plugins/export_xy/xy.c (revision 30955) @@ -114,7 +114,7 @@ int len; if (sep == NULL) { - rnd_message(PCB_MSG_ERROR, "export_xy: ignoring invalid template name (missing period): '%s'\n", li->name); + rnd_message(RND_MSG_ERROR, "export_xy: ignoring invalid template name (missing period): '%s'\n", li->name); continue; } if (strcmp(sep+1, "name") != 0) @@ -121,7 +121,7 @@ continue; len = sep - li->name; if (len > sizeof(id)-1) { - rnd_message(PCB_MSG_ERROR, "export_xy: ignoring invalid template name (too long): '%s'\n", li->name); + rnd_message(RND_MSG_ERROR, "export_xy: ignoring invalid template name (too long): '%s'\n", li->name); continue; } memcpy(id, li->name, len); @@ -131,7 +131,7 @@ } if (fmt_names.used == 0) { - rnd_message(PCB_MSG_ERROR, "export_xy: can not set up export options: no template available\n"); + rnd_message(RND_MSG_ERROR, "export_xy: can not set up export options: no template available\n"); return NULL; } @@ -391,7 +391,7 @@ end = strpbrk(*input, "?|%"); len = end - *input; if (len >= sizeof(aname) - 1) { - rnd_message(PCB_MSG_ERROR, "xy tempalte error: attribute name '%s' too long\n", *input); + rnd_message(RND_MSG_ERROR, "xy tempalte error: attribute name '%s' too long\n", *input); return 1; } memcpy(aname, *input, len); @@ -401,7 +401,7 @@ end = strchr(*input, '%'); len = end - *input; if (len >= sizeof(unk_buf) - 1) { - rnd_message(PCB_MSG_ERROR, "xy tempalte error: elem atribute '|unknown' field '%s' too long\n", *input); + rnd_message(RND_MSG_ERROR, "xy tempalte error: elem atribute '|unknown' field '%s' too long\n", *input); return 1; } memcpy(unk_buf, *input, len); @@ -414,7 +414,7 @@ end = strchr(*input, '%'); len = end - *input; if (len >= sizeof(unk_buf) - 1) { - rnd_message(PCB_MSG_ERROR, "xy tempalte error: elem atribute trenary field '%s' too long\n", *input); + rnd_message(RND_MSG_ERROR, "xy tempalte error: elem atribute trenary field '%s' too long\n", *input); return 1; } @@ -670,7 +670,7 @@ fp = pcb_fopen_askovr(&PCB->hidlib, xy_filename, "w", NULL); if (!fp) { - rnd_message(PCB_MSG_ERROR, "Cannot open file %s for writing\n", xy_filename); + rnd_message(RND_MSG_ERROR, "Cannot open file %s for writing\n", xy_filename); return 1; } @@ -700,10 +700,10 @@ /* prefer the pnp-origin but if that doesn't exist, pick the subc origin */ if (!pcb_subc_find_aux_point(subc, "pnp-origin", &ctx.x, &ctx.y)) if (pcb_subc_get_origin(subc, &ctx.x, &ctx.y) != 0) - rnd_message(PCB_MSG_ERROR, "xy: can't get subc origin for %s\n", ctx.name); + rnd_message(RND_MSG_ERROR, "xy: can't get subc origin for %s\n", ctx.name); - if (pcb_subc_get_rotation(subc, &ctx.theta) != 0) rnd_message(PCB_MSG_ERROR, "xy: can't get subc rotation for %s\n", ctx.name); - if (pcb_subc_get_side(subc, &bott) != 0) rnd_message(PCB_MSG_ERROR, "xy: can't get subc side for %s\n", ctx.name); + if (pcb_subc_get_rotation(subc, &ctx.theta) != 0) rnd_message(RND_MSG_ERROR, "xy: can't get subc rotation for %s\n", ctx.name); + if (pcb_subc_get_side(subc, &bott) != 0) rnd_message(RND_MSG_ERROR, "xy: can't get subc side for %s\n", ctx.name); ctx.theta = -ctx.theta; if (ctx.theta == -0) @@ -759,7 +759,7 @@ char buff[256], *id, *sect; int nl = strlen(i->name); if (nl > sizeof(buff)-1) { - rnd_message(PCB_MSG_ERROR, "export_xy: ignoring template '%s': name too long\n", i->name); + rnd_message(RND_MSG_ERROR, "export_xy: ignoring template '%s': name too long\n", i->name); continue; } memcpy(buff, i->name, nl+1); @@ -766,7 +766,7 @@ id = buff; sect = strchr(id, '.'); if (sect == NULL) { - rnd_message(PCB_MSG_ERROR, "export_xy: ignoring template '%s': does not have a .section suffix\n", i->name); + rnd_message(RND_MSG_ERROR, "export_xy: ignoring template '%s': does not have a .section suffix\n", i->name); continue; } *sect = '\0'; @@ -819,7 +819,7 @@ tid = vts0_get(&fmt_ids, options[HA_format].lng, 0); if ((tid == NULL) || (*tid == NULL)) { - rnd_message(PCB_MSG_ERROR, "export_xy: invalid template selected\n"); + rnd_message(RND_MSG_ERROR, "export_xy: invalid template selected\n"); return; } templ.hdr = get_templ(*tid, "hdr"); Index: trunk/src_plugins/extedit/extedit.c =================================================================== --- trunk/src_plugins/extedit/extedit.c (revision 30954) +++ trunk/src_plugins/extedit/extedit.c (revision 30955) @@ -192,7 +192,7 @@ pcb_buffer_set_number(bn); pcb_buffer_clear(PCB, PCB_PASTEBUFFER); if (pcb_copy_obj_to_buffer(PCB, pcb_buffers[bn].Data, PCB->Data, type, ptr1, ptr2, ptr3) == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to copy target objects to temporary paste buffer\n"); + rnd_message(RND_MSG_ERROR, "Failed to copy target objects to temporary paste buffer\n"); goto quit0; } paste = 1; @@ -206,7 +206,7 @@ del_selected = 1; paste = 1; if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { - rnd_message(PCB_MSG_WARNING, "Nothing is selected, can't ext-edit selection\n"); + rnd_message(RND_MSG_WARNING, "Nothing is selected, can't ext-edit selection\n"); goto quit0; } } @@ -213,12 +213,12 @@ else if ((argc > 1) && (rnd_strcasecmp(cmd, "buffer") == 0)) { load_bn = bn = conf_core.editor.buffer_number; if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { - rnd_message(PCB_MSG_WARNING, "Nothing in current buffer, can't ext-edit selection\n"); + rnd_message(RND_MSG_WARNING, "Nothing in current buffer, can't ext-edit selection\n"); goto quit0; } } else { - rnd_message(PCB_MSG_ERROR, "Wrong 1st argument '%s'\n", cmd); + rnd_message(RND_MSG_ERROR, "Wrong 1st argument '%s'\n", cmd); ret = 1; goto quit0; } @@ -230,13 +230,13 @@ break; } if (mth->name == NULL) { - rnd_message(PCB_MSG_ERROR, "unknown method '%s'; available methods:\n", method); + rnd_message(RND_MSG_ERROR, "unknown method '%s'; available methods:\n", method); for(mth = methods; mth->name != NULL; mth++) { if (mth != methods) - rnd_message(PCB_MSG_ERROR, ", ", mth->name); - rnd_message(PCB_MSG_ERROR, "%s", mth->name); + rnd_message(RND_MSG_ERROR, ", ", mth->name); + rnd_message(RND_MSG_ERROR, "%s", mth->name); } - rnd_message(PCB_MSG_ERROR, "\n"); + rnd_message(RND_MSG_ERROR, "\n"); ret = 1; goto quit0; } @@ -252,7 +252,7 @@ tmp_fn = rnd_tempfile_name_new("extedit"); tmp_cfg_fn = rnd_tempfile_name_new("extedit_cfg"); if ((tmp_fn == NULL) || (tmp_cfg_fn == NULL)) { - rnd_message(PCB_MSG_ERROR, "Failed to create temporary file\n"); + rnd_message(RND_MSG_ERROR, "Failed to create temporary file\n"); ret = 1; goto quit1; } @@ -268,7 +268,7 @@ f = pcb_fopen(&PCB->hidlib, tmp_fn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to open temporary file\n"); + rnd_message(RND_MSG_ERROR, "Failed to open temporary file\n"); goto quit1; } @@ -280,7 +280,7 @@ if (res != 0) { fclose(f); - rnd_message(PCB_MSG_ERROR, "Failed to export target objects to lihata footprint.\n"); + rnd_message(RND_MSG_ERROR, "Failed to export target objects to lihata footprint.\n"); goto quit1; } fclose(f); @@ -303,7 +303,7 @@ pcb_buffer_clear(PCB, PCB_PASTEBUFFER); if (io_lihata_parse_subc(plug_io_lihata_default, pcb_buffers[bn].Data, tmp_fn, NULL) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to load the edited footprint. File left at '%s'.\n", tmp_fn); + rnd_message(RND_MSG_ERROR, "Failed to load the edited footprint. File left at '%s'.\n", tmp_fn); ret = 1; goto quit1; } Index: trunk/src_plugins/exto_std/bus.c =================================================================== --- trunk/src_plugins/exto_std/bus.c (revision 30954) +++ trunk/src_plugins/exto_std/bus.c (revision 30955) @@ -44,7 +44,7 @@ static void pcb_bus_del_pre(pcb_subc_t *subc) { bus_t *bus = subc->extobj_data; - pcb_trace("bus del_pre\n"); + rnd_trace("bus del_pre\n"); if ((bus != NULL) && (bus->gui_active)) PCB_DAD_FREE(bus->dlg); @@ -134,7 +134,7 @@ l->Thickness = bus->vthickness; if (l1 == NULL) l1 = l; -/* pcb_trace("line\n");*/ +/* rnd_trace("line\n");*/ sb.x1 = l->Point1.X-1; sb.y1 = l->Point1.Y-1; sb.x2 = l->Point1.X+1; sb.y2 = l->Point1.Y+1; for(ltmp = pcb_rtree_first(&it, ely->line_tree, &sb); ltmp != NULL; ltmp = pcb_rtree_next(&it)) @@ -143,13 +143,13 @@ if (close_enough(l->Point1, ltmp->Point1)) { a1 = atan2(ltmp->Point2.Y - ltmp->Point1.Y, ltmp->Point2.X - ltmp->Point1.X); c1 = 1; -/* pcb_trace(" conn1 2-1 %f\n", a1);*/ +/* rnd_trace(" conn1 2-1 %f\n", a1);*/ break; } else if (close_enough(l->Point1, ltmp->Point2)) { a1 = atan2(ltmp->Point1.Y - ltmp->Point2.Y, ltmp->Point1.X - ltmp->Point2.X); c1 = 1; -/* pcb_trace(" conn1 1-2 %f\n", a1);*/ +/* rnd_trace(" conn1 1-2 %f\n", a1);*/ break; } } @@ -161,13 +161,13 @@ if (close_enough(l->Point2, ltmp->Point1)) { a2 = atan2(ltmp->Point2.Y - ltmp->Point1.Y, ltmp->Point2.X - ltmp->Point1.X); c2 = 1; -/* pcb_trace(" conn2 2-1 %f\n", a1);*/ +/* rnd_trace(" conn2 2-1 %f\n", a1);*/ break; } if (close_enough(l->Point2, ltmp->Point2)) { a2 = atan2(ltmp->Point1.Y - ltmp->Point2.Y, ltmp->Point1.X - ltmp->Point2.X); c2 = 1; -/* pcb_trace(" conn2 2-1 %f\n", a1);*/ +/* rnd_trace(" conn2 2-1 %f\n", a1);*/ break; } } @@ -176,7 +176,7 @@ if (c1) { double a0 = atan2(l->Point1.Y - l->Point2.Y, l->Point1.X - l->Point2.X); -/*pcb_trace("c1 a0=%f a1=%f\n", a0 * PCB_RAD_TO_DEG, a1 * PCB_RAD_TO_DEG);*/ +/*rnd_trace("c1 a0=%f a1=%f\n", a0 * PCB_RAD_TO_DEG, a1 * PCB_RAD_TO_DEG);*/ a1 = a1 - a0; tune1 = tan(a1/2.0); } @@ -185,7 +185,7 @@ if (c2) { double a0 = atan2(l->Point2.Y - l->Point1.Y, l->Point2.X - l->Point1.X); -/*pcb_trace("c1 a0=%f a2=%f\n", a0 * PCB_RAD_TO_DEG, a2 * PCB_RAD_TO_DEG);*/ +/*rnd_trace("c1 a0=%f a2=%f\n", a0 * PCB_RAD_TO_DEG, a2 * PCB_RAD_TO_DEG);*/ a2 = a2 - a0; tune2 = tan(a2/2.0); } @@ -192,12 +192,12 @@ else tune2 = 0; -/* pcb_trace("tune: %f:%f %f:%f\n", a1 * PCB_RAD_TO_DEG, tune1, a2 * PCB_RAD_TO_DEG, tune2);*/ +/* rnd_trace("tune: %f:%f %f:%f\n", a1 * PCB_RAD_TO_DEG, tune1, a2 * PCB_RAD_TO_DEG, tune2);*/ for(n = 0; n < bus->width; n++,o-=bus->pitch) { double o2 = -o; -/* pcb_trace(" off1: %f %f %ml = %ml\n", vx, tune1, (rnd_coord_t)o, (rnd_coord_t)(vx * tune1 * o)); - pcb_trace(" off2: %f %f %ml = %ml\n", vx, tune2, (rnd_coord_t)o, (rnd_coord_t)(vx * tune2 * o));*/ +/* rnd_trace(" off1: %f %f %ml = %ml\n", vx, tune1, (rnd_coord_t)o, (rnd_coord_t)(vx * tune1 * o)); + rnd_trace(" off2: %f %f %ml = %ml\n", vx, tune2, (rnd_coord_t)o, (rnd_coord_t)(vx * tune2 * o));*/ pcb_line_new(tly, l->Point1.X + nx * o + vx * tune1 * o2, l->Point1.Y + ny * o + vy * tune1 * o2, l->Point2.X + nx * o + vx * tune2 * o2, l->Point2.Y + ny * o + vy * tune2 * o2, @@ -207,7 +207,7 @@ } if (l1 != NULL) { -pcb_trace("bus origin at %mm %mm\n", l1->Point1.X, l1->Point1.Y); +rnd_trace("bus origin at %mm %mm\n", l1->Point1.X, l1->Point1.Y); pcb_subc_move_origin_to(subc, l1->Point1.X, l1->Point1.Y, 0); } return pcb_exto_regen_end(subc); @@ -248,19 +248,19 @@ static void pcb_bus_float_pre(pcb_subc_t *subc, pcb_any_obj_t *edit_obj) { - pcb_trace("bus: edit pre %ld %ld\n", subc->ID, edit_obj->ID); + rnd_trace("bus: edit pre %ld %ld\n", subc->ID, edit_obj->ID); bus_clear(subc); } static void pcb_bus_float_geo(pcb_subc_t *subc, pcb_any_obj_t *edit_obj) { - pcb_trace("bus: edit geo %ld %ld\n", subc->ID, edit_obj == NULL ? -1 : edit_obj->ID); + rnd_trace("bus: edit geo %ld %ld\n", subc->ID, edit_obj == NULL ? -1 : edit_obj->ID); bus_gen(subc, edit_obj); } static pcb_extobj_new_t pcb_bus_float_new(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("bus: float new %ld %ld\n", subc->ID, floater->ID); + rnd_trace("bus: float new %ld %ld\n", subc->ID, floater->ID); return PCB_EXTONEW_FLOATER; } @@ -269,7 +269,7 @@ pcb_layer_t *ly = &subc->data->Layer[LID_EDIT]; long len = linelist_length(&ly->Line); - pcb_trace("bus: float del %ld %ld edit-objs=%ld\n", subc->ID, floater->ID, len); + rnd_trace("bus: float del %ld %ld edit-objs=%ld\n", subc->ID, floater->ID, len); return len == 1 ? PCB_EXTODEL_SUBC : PCB_EXTODEL_FLOATER; /* removing the last floater should remove the subc */ } @@ -277,7 +277,7 @@ static void pcb_bus_chg_attr(pcb_subc_t *subc, const char *key, const char *value) { - pcb_trace("bus chg_attr\n"); + rnd_trace("bus chg_attr\n"); if (strncmp(key, "extobj::", 8) == 0) { bus_clear(subc); bus_unpack(subc); @@ -298,7 +298,7 @@ {NULL, 0, NULL, 0, 0} }; - pcb_trace("bus: conv_objs\n"); + rnd_trace("bus: conv_objs\n"); /* refuse anything that's not a line */ for(n = 0; n < objs->used; n++) { @@ -344,7 +344,7 @@ PCB_FLAG_SET(PCB_FLAG_FLOATER, l); PCB_FLAG_CLEAR(PCB_FLAG_SELECTED, l); rnd_attribute_put(&l->Attributes, "extobj::role", "edit"); -pcb_trace(" subc=%p l=%p\n", subc, ly); +rnd_trace(" subc=%p l=%p\n", subc, ly); } bus_gen(subc, NULL); @@ -366,13 +366,13 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; bus_t *bus; - pcb_trace("bus: gui propedit\n"); + rnd_trace("bus: gui propedit\n"); if (subc->extobj_data == NULL) bus_unpack(subc); bus = subc->extobj_data; - pcb_trace("bus: active=%d\n", bus->gui_active); + rnd_trace("bus: active=%d\n", bus->gui_active); if (bus->gui_active) return; /* do not open another */ Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 30954) +++ trunk/src_plugins/exto_std/cord.c (revision 30955) @@ -110,7 +110,7 @@ cord_get_ends(subc, group, &e1, &a1, &e2, &a2); if ((e1 == NULL) || (e2 == NULL)) { - rnd_message(PCB_MSG_ERROR, "extended object cord: failed to generate cord for #%ld group %s: missing endpoint\n", subc->ID, group); + rnd_message(RND_MSG_ERROR, "extended object cord: failed to generate cord for #%ld group %s: missing endpoint\n", subc->ID, group); return -1; } @@ -179,7 +179,7 @@ static void pcb_cord_float_pre(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("cord: float pre %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); + rnd_trace("cord: float pre %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); if (floater->extobj_role == NULL) return; @@ -196,7 +196,7 @@ return; } - pcb_trace("cord: float geo %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); + rnd_trace("cord: float geo %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); if (floater->extobj_role == NULL) return; @@ -219,7 +219,7 @@ const char *group = group_of(floater); int has_other_grp = 0; - pcb_trace("cord: float del %ld %ld\n", subc->ID, floater->ID); + rnd_trace("cord: float del %ld %ld\n", subc->ID, floater->ID); if ((floater->type != PCB_OBJ_LINE) || (group == NULL)) return PCB_EXTODEL_FLOATER; /* e.g. refdes text - none of our business */ @@ -241,7 +241,7 @@ static void pcb_cord_chg_attr(pcb_subc_t *subc, const char *key, const char *value) { - pcb_trace("cord chg_attr\n"); + rnd_trace("cord chg_attr\n"); } static rnd_cardinal_t endpt_pstk_proto(pcb_data_t *data, pcb_layer_type_t lyt) @@ -338,7 +338,7 @@ {NULL, 0, NULL, 0, 0} }; - pcb_trace("cord: conv_objs\n"); + rnd_trace("cord: conv_objs\n"); /* origin override: if converting subcircuits, keep the first subcircuits origin */ for(n = 0; n < objs->used; n++) { @@ -371,9 +371,9 @@ /* create padstack prototypes */ if (endpt_pstk_proto(subc->data, PCB_LYT_COPPER | PCB_LYT_TOP) != COPPER_END) - rnd_message(PCB_MSG_WARNING, "extended object cord: wrong pstk proto ID for copper end\n"); + rnd_message(RND_MSG_WARNING, "extended object cord: wrong pstk proto ID for copper end\n"); if (endpt_pstk_proto(subc->data, PCB_LYT_SILK | PCB_LYT_TOP) != SILK_END) - rnd_message(PCB_MSG_WARNING, "extended object cord: wrong pstk proto ID for silk end\n"); + rnd_message(RND_MSG_WARNING, "extended object cord: wrong pstk proto ID for silk end\n"); /* convert lines into 2-ended cords */ for(n = 0; n < objs->used; n++) { Index: trunk/src_plugins/exto_std/dimension.c =================================================================== --- trunk/src_plugins/exto_std/dimension.c (revision 30954) +++ trunk/src_plugins/exto_std/dimension.c (revision 30955) @@ -51,7 +51,7 @@ static void pcb_dimension_del_pre(pcb_subc_t *subc) { - pcb_trace("dim del_pre\n"); + rnd_trace("dim del_pre\n"); free(subc->extobj_data); subc->extobj_data = NULL; } @@ -252,7 +252,7 @@ static void pcb_dimension_float_pre(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("dim: float pre %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); + rnd_trace("dim: float pre %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); dimension_clear(subc); } @@ -288,12 +288,12 @@ d = -d; } -pcb_trace("new disp: %mm f=%mm;%mm\n", (rnd_coord_t)d, fx, fy); +rnd_trace("new disp: %mm f=%mm;%mm\n", (rnd_coord_t)d, fx, fy); if ((d > -PCB_MM_TO_COORD(0.1)) && (d < PCB_MM_TO_COORD(0.1))) return; -pcb_trace("let's do it!\n"); +rnd_trace("let's do it!\n"); dimension_clear(subc); dim->displace = d; @@ -304,7 +304,7 @@ static void pcb_dimension_float_geo(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("dim: float geo %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); + rnd_trace("dim: float geo %ld %ld role=%s\n", subc->ID, floater->ID, floater->extobj_role); if (floater->extobj_role == NULL) return; @@ -318,19 +318,19 @@ static pcb_extobj_new_t pcb_dimension_float_new(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("dim: float new %ld %ld\n", subc->ID, floater->ID); + rnd_trace("dim: float new %ld %ld\n", subc->ID, floater->ID); return PCB_EXTONEW_SPAWN; } static pcb_extobj_del_t pcb_dimension_float_del(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("dim: float del %ld %ld\n", subc->ID, floater->ID); + rnd_trace("dim: float del %ld %ld\n", subc->ID, floater->ID); return PCB_EXTODEL_SUBC; } static void pcb_dimension_chg_attr(pcb_subc_t *subc, const char *key, const char *value) { - pcb_trace("dim chg_attr\n"); + rnd_trace("dim chg_attr\n"); if (strncmp(key, "extobj::", 8) == 0) { dimension_clear(subc); dimension_unpack(subc); @@ -349,7 +349,7 @@ {NULL, 0, NULL, 0, 0} }; - pcb_trace("dim: conv_objs\n"); + rnd_trace("dim: conv_objs\n"); if (objs->used != 1) return NULL; /* there must be a single line */ @@ -404,13 +404,13 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; dimension *dim; - pcb_trace("dim: gui propedit\n"); + rnd_trace("dim: gui propedit\n"); if (subc->extobj_data == NULL) dimension_unpack(subc); dim = subc->extobj_data; - pcb_trace("dim: active=%d\n", dim->gui_active); + rnd_trace("dim: active=%d\n", dim->gui_active); if (dim->gui_active) return; /* do not open another */ Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 30954) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 30955) @@ -40,7 +40,7 @@ static void pcb_line_of_vias_del_pre(pcb_subc_t *subc) { line_of_vias *lov = subc->extobj_data; - pcb_trace("LoV del_pre\n"); + rnd_trace("LoV del_pre\n"); if ((lov != NULL) && (lov->gui_active)) PCB_DAD_FREE(lov->dlg); @@ -135,7 +135,7 @@ lov = subc->extobj_data; if (lov->pitch < PCB_MM_TO_COORD(0.001)) { - rnd_message(PCB_MSG_ERROR, "line_of_vias_gen(): can not generate line-of-vias, pitch value is too small\n"); + rnd_message(RND_MSG_ERROR, "line_of_vias_gen(): can not generate line-of-vias, pitch value is too small\n"); return -1; } @@ -202,19 +202,19 @@ static void pcb_line_of_vias_float_pre(pcb_subc_t *subc, pcb_any_obj_t *edit_obj) { - pcb_trace("LoV: edit pre %ld %ld\n", subc->ID, edit_obj->ID); + rnd_trace("LoV: edit pre %ld %ld\n", subc->ID, edit_obj->ID); line_of_vias_clear(subc); } static void pcb_line_of_vias_float_geo(pcb_subc_t *subc, pcb_any_obj_t *edit_obj) { - pcb_trace("LoV: edit geo %ld %ld\n", subc->ID, edit_obj == NULL ? -1 : edit_obj->ID); + rnd_trace("LoV: edit geo %ld %ld\n", subc->ID, edit_obj == NULL ? -1 : edit_obj->ID); line_of_vias_gen(subc, edit_obj); } static pcb_extobj_new_t pcb_line_of_vias_float_new(pcb_subc_t *subc, pcb_any_obj_t *floater) { - pcb_trace("LoV: float new %ld %ld\n", subc->ID, floater->ID); + rnd_trace("LoV: float new %ld %ld\n", subc->ID, floater->ID); return PCB_EXTONEW_FLOATER; } @@ -223,7 +223,7 @@ pcb_layer_t *ly = &subc->data->Layer[LID_EDIT]; long len = linelist_length(&ly->Line); - pcb_trace("LoV: float del %ld %ld edit-objs=%ld\n", subc->ID, floater->ID, len); + rnd_trace("LoV: float del %ld %ld edit-objs=%ld\n", subc->ID, floater->ID, len); return len == 1 ? PCB_EXTODEL_SUBC : PCB_EXTODEL_FLOATER; /* removing the last floater should remove the subc */ } @@ -231,7 +231,7 @@ static void pcb_line_of_vias_chg_attr(pcb_subc_t *subc, const char *key, const char *value) { - pcb_trace("LoV chg_attr\n"); + rnd_trace("LoV chg_attr\n"); if (strncmp(key, "extobj::", 8) == 0) { line_of_vias_clear(subc); line_of_vias_unpack(subc); @@ -251,7 +251,7 @@ {NULL, 0, NULL, 0, 0} }; - pcb_trace("LoV: conv_objs\n"); + rnd_trace("LoV: conv_objs\n"); /* refuse anything that's not a line */ for(n = 0; n < objs->used; n++) { @@ -304,13 +304,13 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; line_of_vias *lov; - pcb_trace("LoV: gui propedit\n"); + rnd_trace("LoV: gui propedit\n"); if (subc->extobj_data == NULL) line_of_vias_unpack(subc); lov = subc->extobj_data; - pcb_trace("LoV: active=%d\n", lov->gui_active); + rnd_trace("LoV: active=%d\n", lov->gui_active); if (lov->gui_active) return; /* do not open another */ Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 30954) +++ trunk/src_plugins/fontmode/fontmode.c (revision 30955) @@ -108,7 +108,7 @@ font = pcb_font_unlink(PCB, conf_core.design.text_font_id); if (font == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't fetch font id %d\n", conf_core.design.text_font_id); + rnd_message(RND_MSG_ERROR, "Can't fetch font id %d\n", conf_core.design.text_font_id); return 1; } Index: trunk/src_plugins/fp_board/fp_board.c =================================================================== --- trunk/src_plugins/fp_board/fp_board.c (revision 30954) +++ trunk/src_plugins/fp_board/fp_board.c (revision 30955) @@ -35,7 +35,7 @@ /* load file */ memset(&buff, 0, sizeof(buff)); if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != pcb_true) { - rnd_message(PCB_MSG_ERROR, "Warning: failed to load %s\n", fpath); + rnd_message(RND_MSG_ERROR, "Warning: failed to load %s\n", fpath); return -1; } @@ -107,7 +107,7 @@ /* load file */ memset(&buff, 0, sizeof(buff)); if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != pcb_true) { - rnd_message(PCB_MSG_ERROR, "Warning: failed to load %s\n", fpath); + rnd_message(RND_MSG_ERROR, "Warning: failed to load %s\n", fpath); goto err; } @@ -138,7 +138,7 @@ static void fp_board_fclose(pcb_plug_fp_t *ctx, FILE * f, pcb_fp_fopen_ctx_t *fctx) { - rnd_message(PCB_MSG_ERROR, "Internal error: fp_board_fclose() shouldn't have been called. Please report this bug.\n"); + rnd_message(RND_MSG_ERROR, "Internal error: fp_board_fclose() shouldn't have been called. Please report this bug.\n"); } Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 30954) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 30955) @@ -127,7 +127,7 @@ /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); if (rnd_get_wd(olddir) == NULL) { - rnd_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine initial working directory\n"); + rnd_message(RND_MSG_ERROR, "fp_fs_list(): Could not determine initial working directory\n"); return 0; } @@ -136,7 +136,7 @@ if (chdir(subdir)) { if (!subdir_may_not_exist) - pcb_chdir_error_message(subdir); + rnd_chdir_error_message(subdir); return 0; } @@ -143,9 +143,9 @@ /* Determine subdir's abs path */ if (rnd_get_wd(new_subdir) == NULL) { - rnd_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine new working directory\n"); + rnd_message(RND_MSG_ERROR, "fp_fs_list(): Could not determine new working directory\n"); if (chdir(olddir)) - pcb_chdir_error_message(olddir); + rnd_chdir_error_message(olddir); return 0; } @@ -157,9 +157,9 @@ /* First try opening the directory specified by path */ if ((subdirobj = pcb_opendir(&PCB->hidlib, new_subdir)) == NULL) { - pcb_opendir_error_message(new_subdir); + rnd_opendir_error_message(new_subdir); if (chdir(olddir)) - pcb_chdir_error_message(olddir); + rnd_chdir_error_message(olddir); return 0; } @@ -225,7 +225,7 @@ /* Done. Clean up, cd back into old dir, and return */ pcb_closedir(subdirobj); if (chdir(olddir)) - pcb_chdir_error_message(olddir); + rnd_chdir_error_message(olddir); return n_footprints; } @@ -427,7 +427,7 @@ pcb_pclose(fp); } else - rnd_message(PCB_MSG_ERROR, "Parametric footprint: failed to execute %s\n", cmd); + rnd_message(RND_MSG_ERROR, "Parametric footprint: failed to execute %s\n", cmd); rewind(f); } free(cmd); Index: trunk/src_plugins/fp_wget/edakrill.c =================================================================== --- trunk/src_plugins/fp_wget/edakrill.c (revision 30954) +++ trunk/src_plugins/fp_wget/edakrill.c (revision 30955) @@ -185,7 +185,7 @@ mode = 0; if (fp_wget_open(url_idx_list, conf_fp_wget.plugins.fp_wget.cache_dir, &f, &fctx, mode) != 0) { - rnd_message(PCB_MSG_ERROR, "edakrill: failed to download the new list\n"); + rnd_message(RND_MSG_ERROR, "edakrill: failed to download the new list\n"); pcb_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ goto err; } Index: trunk/src_plugins/fp_wget/gedasymbols.c =================================================================== --- trunk/src_plugins/fp_wget/gedasymbols.c (revision 30954) +++ trunk/src_plugins/fp_wget/gedasymbols.c (revision 30955) @@ -106,7 +106,7 @@ mode = 0; if (fp_wget_open(url_idx_list, conf_fp_wget.plugins.fp_wget.cache_dir, &f, &fctx, mode) != 0) { - rnd_message(PCB_MSG_ERROR, "gedasymbols: failed to download the new list\n"); + rnd_message(RND_MSG_ERROR, "gedasymbols: failed to download the new list\n"); pcb_remove(NULL, last_sum_fn); /* make sure it is downloaded next time */ goto err; } Index: trunk/src_plugins/fp_wget/wget_common.c =================================================================== --- trunk/src_plugins/fp_wget/wget_common.c (revision 30954) +++ trunk/src_plugins/fp_wget/wget_common.c (revision 30955) @@ -95,7 +95,7 @@ int res; sprintf(cmd, "%s/%s", cache_path, cdir); res = pcb_wget_disk(url, cmd, update, NULL); -/* pcb_trace("------res=%d\n", res); */ +/* rnd_trace("------res=%d\n", res); */ if ((res != 0) && (res != 768)) { /* some versions of wget will return error on -c if the file doesn't need update; try to guess whether it's really an error */ /* when wget fails, a 0-long file might be left there - remove it so it won't block new downloads */ pcb_remove(NULL, cmd); Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30954) +++ trunk/src_plugins/hid_batch/batch.c (revision 30955) @@ -79,17 +79,17 @@ prompt = rnd_strdup("no-board"); } -static void log_append(pcb_logline_t *line) +static void log_append(rnd_logline_t *line) { - if ((line->level < PCB_MSG_INFO) && !pcbhl_conf.rc.verbose) + if ((line->level < RND_MSG_INFO) && !pcbhl_conf.rc.verbose) return; if ((line->prev == NULL) || (line->prev->str[line->prev->len-1] == '\n')) { switch(line->level) { - case PCB_MSG_DEBUG: printf("D: "); break; - case PCB_MSG_INFO: printf("I: "); break; - case PCB_MSG_WARNING: printf("W: "); break; - case PCB_MSG_ERROR: printf("E: "); break; + case RND_MSG_DEBUG: printf("D: "); break; + case RND_MSG_INFO: printf("I: "); break; + case RND_MSG_WARNING: printf("W: "); break; + case RND_MSG_ERROR: printf("E: "); break; } } printf("%s", line->str); @@ -101,13 +101,13 @@ if (!batch_active) return; - log_append((pcb_logline_t *)argv[1].d.p); + log_append((rnd_logline_t *)argv[1].d.p); } static void log_import(void) { - pcb_logline_t *n; - for(n = pcb_log_first; n != NULL; n = n->next) + rnd_logline_t *n; + for(n = rnd_log_first; n != NULL; n = n->next) log_append(n); } Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 30955) @@ -874,7 +874,7 @@ static const char pcb_acth_AdjustSizes[] = "not supported, please use Preferences() instead"; static fgw_error_t pcb_act_AdjustSizes(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "AdjustSizes() is not supported anymore, please use the Preferences() action\n"); + rnd_message(RND_MSG_ERROR, "AdjustSizes() is not supported anymore, please use the Preferences() action\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/hid_lesstif/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30955) @@ -262,7 +262,7 @@ return; if (!(res.type & FGW_STR)) { - rnd_message(PCB_MSG_ERROR, CPACT " returned non-string\n"); + rnd_message(RND_MSG_ERROR, CPACT " returned non-string\n"); fgw_arg_free(&rnd_fgw, &res); return; } @@ -270,7 +270,7 @@ r = rnd_color_load_str(&nclr, res.val.str); fgw_arg_free(&rnd_fgw, &res); if (r != 0) { - rnd_message(PCB_MSG_ERROR, CPACT " returned invalid color string\n"); + rnd_message(RND_MSG_ERROR, CPACT " returned invalid color string\n"); return; } Index: trunk/src_plugins/hid_lesstif/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_tree.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/dlg_attr_tree.c (revision 30955) @@ -389,9 +389,9 @@ ltf_tree_expcoll(lt, lt->cursor, !lt->cursor->flags.is_unfolded); REDRAW(); } - pcb_trace("tree key {enter}\n"); + rnd_trace("tree key {enter}\n"); break; - default: pcb_trace("tree key %s\n", text); + default: rnd_trace("tree key %s\n", text); } break; } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30955) @@ -800,7 +800,7 @@ static void LoadBackgroundImage(const char *fn) { if (pcb_pixmap_load(ltf_hidlib, <f_bg_img, fn) != 0) - rnd_message(PCB_MSG_ERROR, "Failed to load pixmap %s for background image\n", fn); + rnd_message(RND_MSG_ERROR, "Failed to load pixmap %s for background image\n", fn); } /* ---------------------------------------------------------------------- */ @@ -1371,7 +1371,7 @@ key = XStringToKeysym(desc); if (key == NoSymbol && len > 1) { - rnd_message(PCB_MSG_INFO, "lesstif_translate_key: no symbol for %s\n", desc); + rnd_message(RND_MSG_INFO, "lesstif_translate_key: no symbol for %s\n", desc); return 0; } return key; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30955) @@ -511,7 +511,7 @@ } else { if (*uo != '\0') - rnd_message(PCB_MSG_WARNING, "Checkbox menu item %s not updated on any conf change - try to use the update_on field\n", checked); + rnd_message(RND_MSG_WARNING, "Checkbox menu item %s not updated on any conf change - try to use the update_on field\n", checked); } } } @@ -569,7 +569,7 @@ lesstif_cfg = pcb_hid_cfg_load(ltf_hidlib, "lesstif", 0, NULL); lesstif_hid.hid_cfg = lesstif_cfg; if (lesstif_cfg == NULL) { - rnd_message(PCB_MSG_ERROR, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); + rnd_message(RND_MSG_ERROR, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); abort(); } @@ -631,7 +631,7 @@ menu_data_t *md; lht_node_t *menu_node = pcb_hid_cfg_get_menu(lesstif_cfg, menupath); - pcb_trace("ltf_open_popup: %s: %p\n", menupath, menu_node); + rnd_trace("ltf_open_popup: %s: %p\n", menupath, menu_node); if (menu_node == NULL) return -1; Index: trunk/src_plugins/hid_lesstif/mouse.c =================================================================== --- trunk/src_plugins/hid_lesstif/mouse.c (revision 30954) +++ trunk/src_plugins/hid_lesstif/mouse.c (revision 30955) @@ -66,7 +66,7 @@ return; } } - rnd_message(PCB_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); + rnd_message(RND_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); } else { XColor fg, bg; Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30954) +++ trunk/src_plugins/hid_remote/remote.c (revision 30955) @@ -164,7 +164,7 @@ int gci = proto_send_make_gc(); int max = sizeof(remote_gc) / sizeof(remote_gc[0]); if (gci >= max) { - rnd_message(PCB_MSG_ERROR, "remote_make_gc(): GC index too high: %d >= %d\n", gci, max); + rnd_message(RND_MSG_ERROR, "remote_make_gc(): GC index too high: %d >= %d\n", gci, max); proto_send_del_gc(gci); return NULL; } @@ -178,7 +178,7 @@ int max = sizeof(remote_gc) / sizeof(remote_gc[0]); if ((idx < 0) || (idx >= max)) { - rnd_message(PCB_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); + rnd_message(RND_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); return -1; } return idx; @@ -197,7 +197,7 @@ if ((op >= 0) && (op < sizeof(drawing_mode_names) / sizeof(drawing_mode_names[0]))) proto_send_set_drawing_mode(drawing_mode_names[op], direct); else - rnd_message(PCB_MSG_ERROR, "Invalid drawing mode %d\n", op); + rnd_message(RND_MSG_ERROR, "Invalid drawing mode %d\n", op); } static void remote_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) @@ -220,7 +220,7 @@ if (style >= max) { - rnd_message(PCB_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); + rnd_message(RND_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); return; } if (idx >= 0) { Index: trunk/src_plugins/import_calay/calay.c =================================================================== --- trunk/src_plugins/import_calay/calay.c (revision 30954) +++ trunk/src_plugins/import_calay/calay.c (revision 30955) @@ -101,10 +101,10 @@ if (curr != NULL) rnd_actionva(&PCB->hidlib, "Netlist", "Add", curr, s, NULL); else - rnd_message(PCB_MSG_ERROR, "Calay syntax error: %s is after a ;, not in any net\n", s); + rnd_message(RND_MSG_ERROR, "Calay syntax error: %s is after a ;, not in any net\n", s); } else - rnd_message(PCB_MSG_ERROR, "Calay syntax error: %s should have been refdes(pin)\n", s); + rnd_message(RND_MSG_ERROR, "Calay syntax error: %s should have been refdes(pin)\n", s); if ((next == NULL) || (*next == '\0')) break; @@ -114,7 +114,7 @@ case ',': next++; break; case ';': next++; free(curr); curr = NULL; next++; break; default: - rnd_message(PCB_MSG_ERROR, "Calay syntax error: invalid separator: %s %d (expected , or ;)\n", next, *next); + rnd_message(RND_MSG_ERROR, "Calay syntax error: invalid separator: %s %d (expected , or ;)\n", next, *next); } s = next; } @@ -137,7 +137,7 @@ while(fgets(line, sizeof(line), f) != NULL) { len = strlen(line); if ((len > 2) && (len < 54)) { - rnd_message(PCB_MSG_ERROR, "Calay component syntax error: short line: '%s'\n", line); + rnd_message(RND_MSG_ERROR, "Calay component syntax error: short line: '%s'\n", line); continue; } val = line; @@ -174,7 +174,7 @@ f = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open calay netlist file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open calay netlist file '%s' for read\n", fname_net); return -1; } ret = calay_parse_net(f); @@ -182,7 +182,7 @@ f = pcb_fopen(&PCB->hidlib, fname_cmp, "r"); if (f == NULL) - rnd_message(PCB_MSG_ERROR, "can't open calay component file '%s' for read\n(non-fatal, but footprints will not be placed)\n", fname_cmp); + rnd_message(RND_MSG_ERROR, "can't open calay component file '%s' for read\n(non-fatal, but footprints will not be placed)\n", fname_cmp); ret = calay_parse_comp(f); @@ -251,7 +251,7 @@ static int calay_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_calay: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_calay: requires exactly 1 input file name\n"); return -1; } return rnd_actionva(&PCB->hidlib, "LoadCalayFrom", fns[0], NULL); Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 30954) +++ trunk/src_plugins/import_dsn/dsn.c (revision 30955) @@ -68,17 +68,17 @@ return -1; if (strcmp(end+2, grp->name) != 0) { - rnd_message(PCB_MSG_ERROR, "layer (group) name mismatch: group %ld should be '%s' but is '%s'\nses file not for this board?\n", gid, grp->name, end+2); + rnd_message(RND_MSG_ERROR, "layer (group) name mismatch: group %ld should be '%s' but is '%s'\nses file not for this board?\n", gid, grp->name, end+2); return -1; } if (grp->len <= 0) { - rnd_message(PCB_MSG_ERROR, "layer (group) '%s' has no layers\nses file not for this board?\n", name); + rnd_message(RND_MSG_ERROR, "layer (group) '%s' has no layers\nses file not for this board?\n", name); return -1; } if (!(grp->ltype & PCB_LYT_COPPER)) { - rnd_message(PCB_MSG_ERROR, "layer (group) type %s should a copper layer group\nses file not for this board?\n", name); + rnd_message(RND_MSG_ERROR, "layer (group) type %s should a copper layer group\nses file not for this board?\n", name); return -1; } @@ -98,13 +98,13 @@ thick = pcb_get_value(sthick, unit, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping polyline because thickness is invalid: %s\n", sthick); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline because thickness is invalid: %s\n", sthick); return; } lid = ses_layer_by_name(PCB, slayer); if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping polyline because layer name is invalid: %s\n", slayer); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline because layer name is invalid: %s\n", slayer); return; } layer = PCB->Data->Layer+lid; @@ -115,12 +115,12 @@ const char *sy = c->next->str; x = pcb_get_value(sx, unit, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sx); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sx); return; } y = pcb_get_value(sy, unit, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sy); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sy); return; } if (workaround0 && ((y < PCB_MM_TO_COORD(0.01)) || (x < PCB_MM_TO_COORD(0.01)))) /* workaround for broken polyline coords */ @@ -155,7 +155,7 @@ /* ignore */ } else - rnd_message(PCB_MSG_WARNING, "import_dsn: ignoring unknown wire directive %s\n", n->str); + rnd_message(RND_MSG_WARNING, "import_dsn: ignoring unknown wire directive %s\n", n->str); } } @@ -171,13 +171,13 @@ const char *unit = (type == TYPE_PCB) ? "mm" : "nm"; if (strncmp(name, "via_", 4) != 0) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via with invalid name (prefix): %s\n", name); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping via with invalid name (prefix): %s\n", name); return; } name += 4; if (sscanf(name, "%ld_%ld", &l1, &l2) != 2) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via with invalid name (diameters): %s\n", name); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping via with invalid name (diameters): %s\n", name); return; } @@ -186,12 +186,12 @@ x = pcb_get_value(sx, unit, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sx); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sx); return; } y = pcb_get_value(sy, unit, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sy); + rnd_message(RND_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sy); return; } @@ -231,7 +231,7 @@ /* load and parse the file into a dom tree */ f = pcb_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "import_dsn: can't open %s for read\n", fname); + rnd_message(RND_MSG_ERROR, "import_dsn: can't open %s for read\n", fname); return 1; } gsxl_init(&dom, gsxl_node_t); @@ -252,7 +252,7 @@ fclose(f); if (rs != GSX_RES_EOE) { - rnd_message(PCB_MSG_ERROR, "import_dsn: parse error in %s at %d:%d\n", fname, dom.parse.line, dom.parse.col); + rnd_message(RND_MSG_ERROR, "import_dsn: parse error in %s at %d:%d\n", fname, dom.parse.line, dom.parse.col); goto error; } gsxl_compact_tree(&dom); @@ -265,7 +265,7 @@ else if (strcmp(dom.root->str, "session") == 0) type = TYPE_SESSION; else { - rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr is not a PCB or session\n"); + rnd_message(RND_MSG_ERROR, "import_dsn: s-expr is not a PCB or session\n"); goto error; } @@ -276,7 +276,7 @@ break; if (wiring == NULL) { - rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a wiring section\n"); + rnd_message(RND_MSG_ERROR, "import_dsn: s-expr does not have a wiring section\n"); goto error; } @@ -296,7 +296,7 @@ break; if (routes == NULL) { - rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a routes section\n"); + rnd_message(RND_MSG_ERROR, "import_dsn: s-expr does not have a routes section\n"); goto error; } @@ -305,7 +305,7 @@ break; if (nout == NULL) { - rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a network_out section\n"); + rnd_message(RND_MSG_ERROR, "import_dsn: s-expr does not have a network_out section\n"); goto error; } @@ -322,7 +322,7 @@ break; } - rnd_message(PCB_MSG_INFO, "import_dsn: loaded %ld wires and %ld vias\n", nlines, nvias); + rnd_message(RND_MSG_INFO, "import_dsn: loaded %ld wires and %ld vias\n", nlines, nvias); gsxl_uninit(&dom); RND_ACT_IRES(0); Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 30954) +++ trunk/src_plugins/import_edif/edif.c (revision 30955) @@ -5782,7 +5782,7 @@ #ifdef DEBUG DumpStack(); #endif /* DEBUG */ - rnd_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); + rnd_message(RND_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); } /* * String bucket definitions. @@ -6244,7 +6244,7 @@ int ReadEdifNetlist(char *filename) { - rnd_message(PCB_MSG_INFO,"Importing edif netlist %s\n", filename); + rnd_message(RND_MSG_INFO,"Importing edif netlist %s\n", filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_edif/edif.y =================================================================== --- trunk/src_plugins/import_edif/edif.y (revision 30954) +++ trunk/src_plugins/import_edif/edif.y (revision 30955) @@ -3984,7 +3984,7 @@ #ifdef DEBUG DumpStack(); #endif /* DEBUG */ - rnd_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); + rnd_message(RND_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); } /* * String bucket definitions. @@ -4446,7 +4446,7 @@ int ReadEdifNetlist(char *filename) { - rnd_message(PCB_MSG_INFO,"Importing edif netlist %s\n", filename); + rnd_message(RND_MSG_INFO,"Importing edif netlist %s\n", filename); ParseEDIF(filename, NULL); return 0; Index: trunk/src_plugins/import_edif/import_edif.c =================================================================== --- trunk/src_plugins/import_edif/import_edif.c (revision 30954) +++ trunk/src_plugins/import_edif/import_edif.c (revision 30955) @@ -77,7 +77,7 @@ int ret; if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_edif: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_edif: requires exactly 1 input file name\n"); return -1; } Index: trunk/src_plugins/import_fpcb_nl/fpcb_nl.c =================================================================== --- trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 30954) +++ trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 30955) @@ -67,7 +67,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); + rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fn); return -1; } @@ -95,13 +95,13 @@ ltrim(line); len = strlen(line); if (len == 0) { - rnd_message(PCB_MSG_ERROR, "Empty/missing net name in *SINGAL*\n"); + rnd_message(RND_MSG_ERROR, "Empty/missing net name in *SINGAL*\n"); sprintf(signame, "pcbrndanonymous%d", anon++); } else { if (len > sizeof(signame)-1) { len = sizeof(signame)-1; - rnd_message(PCB_MSG_ERROR, "Net name %s is too long, truncating.\nThis may result in broken netlist, please use shorter names \n", line); + rnd_message(RND_MSG_ERROR, "Net name %s is too long, truncating.\nThis may result in broken netlist, please use shorter names \n", line); } memcpy(signame, line, len); signame[len] = '\0'; @@ -127,7 +127,7 @@ rnd_actionva(&PCB->hidlib, "ElementList", "Need", line, fp, "", NULL); } else - rnd_message(PCB_MSG_ERROR, "No footprint specified for %s\n", line); + rnd_message(RND_MSG_ERROR, "No footprint specified for %s\n", line); break; case MODE_SIGNAL: ltrim(line); @@ -142,7 +142,7 @@ continue; tn = strchr(curr, '.'); if (tn == NULL) { - rnd_message(PCB_MSG_ERROR, "Syntax error in netlist: '%s' in net '%s' should be refdes.termid\n", curr, signame); + rnd_message(RND_MSG_ERROR, "Syntax error in netlist: '%s' in net '%s' should be refdes.termid\n", curr, signame); continue; } *tn = '-'; @@ -215,7 +215,7 @@ static int fpcb_nl_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_fpcb_nl: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_fpcb_nl: requires exactly 1 input file name\n"); return -1; } return fpcb_nl_load(fns[0]); Index: trunk/src_plugins/import_gnetlist/import_gnetlist.c =================================================================== --- trunk/src_plugins/import_gnetlist/import_gnetlist.c (revision 30954) +++ trunk/src_plugins/import_gnetlist/import_gnetlist.c (revision 30955) @@ -93,7 +93,7 @@ PCB_IMPORT_SCH_VERBOSE(verbose); if (tmpfn == NULL) { - rnd_message(PCB_MSG_ERROR, "Could not create temp file for gnetlist output"); + rnd_message(RND_MSG_ERROR, "Could not create temp file for gnetlist output"); return -1; } @@ -112,16 +112,16 @@ cmd[numfns+8] = NULL; if (verbose) { - rnd_message(PCB_MSG_DEBUG, "import_gnetlist: running gnetlist:\n"); + rnd_message(RND_MSG_DEBUG, "import_gnetlist: running gnetlist:\n"); for(n = 0; n < numfns+8; n++) - rnd_message(PCB_MSG_DEBUG, " %s", cmd[n]); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " %s", cmd[n]); + rnd_message(RND_MSG_DEBUG, "\n"); } res = rnd_spawnvp((const char **)cmd); if (res == 0) { if (verbose) - rnd_message(PCB_MSG_DEBUG, "pcb_gnetlist: about to run pcb_act_ExecuteFile, file = %s\n", tmpfn); + rnd_message(RND_MSG_DEBUG, "pcb_gnetlist: about to run pcb_act_ExecuteFile, file = %s\n", tmpfn); fgw_uvcall(&rnd_fgw, &PCB->hidlib, &rs, "executefile", FGW_STR, tmpfn, 0); } for(n = 0; n < numfns; n++) Index: trunk/src_plugins/import_hpgl/hpgl.c =================================================================== --- trunk/src_plugins/import_hpgl/hpgl.c (revision 30954) +++ trunk/src_plugins/import_hpgl/hpgl.c (revision 30955) @@ -105,7 +105,7 @@ static int load_poly(uhpgl_ctx_t *ctx, uhpgl_poly_t *poly) { /* pcb_data_t *data = (pcb_data_t *)ctx->user_data;*/ - rnd_message(PCB_MSG_ERROR, "HPGL: polygons are not yet supported\n"); + rnd_message(RND_MSG_ERROR, "HPGL: polygons are not yet supported\n"); return 0; } @@ -122,7 +122,7 @@ f = pcb_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Error opening HP-GL %s for read\n", fname); + rnd_message(RND_MSG_ERROR, "Error opening HP-GL %s for read\n", fname); return 1; } @@ -133,7 +133,7 @@ if ((uhpgl_parse_open(&ctx) == 0) && (uhpgl_parse_file(&ctx, f) == 0) && (uhpgl_parse_close(&ctx) == 0)) { fclose(f); if (PCB_PASTEBUFFER->Data->LayerN == 0) { - rnd_message(PCB_MSG_ERROR, "Error loading HP-GL: could not load any object from %s\n", fname); + rnd_message(RND_MSG_ERROR, "Error loading HP-GL: could not load any object from %s\n", fname); return 0; } rnd_actionva(&PCB->hidlib, "mode", "buffer", NULL); @@ -141,7 +141,7 @@ } fclose(f); - rnd_message(PCB_MSG_ERROR, "Error loading HP-GL at %s:%d.%d: %s\n", fname, ctx.error.line, ctx.error.col, ctx.error.msg); + rnd_message(RND_MSG_ERROR, "Error loading HP-GL at %s:%d.%d: %s\n", fname, ctx.error.line, ctx.error.col, ctx.error.msg); return 1; } Index: trunk/src_plugins/import_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/import_ipcd356/ipcd356.c (revision 30954) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 30955) @@ -83,7 +83,7 @@ if (has_sign) { if ((*sign != '+') && (*sign != '-') && (*sign != ' ')) { - rnd_message(PCB_MSG_WARNING, "Invalid coordinate sign: '%c':\n", *line); + rnd_message(RND_MSG_WARNING, "Invalid coordinate sign: '%c':\n", *line); return -1; } } @@ -118,11 +118,11 @@ static int parse_feature(char *line, test_feature_t *tf, const char *fn, long lineno, int is_mil, int is_rad, char *netname, char *refdes, char *term) { if (line[2] != '7') { - rnd_message(PCB_MSG_WARNING, "Ignoring unknown test feautre '3%c%c' in %s:%ld' - does not end in 7\n", line[1], line[2], fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring unknown test feautre '3%c%c' in %s:%ld' - does not end in 7\n", line[1], line[2], fn, lineno); return -1; } if (line[26] != '-') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing dash between refdes and pin number\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing dash between refdes and pin number\n", fn, lineno); return -1; } extract_field(netname, line, 3, 16); @@ -132,7 +132,7 @@ tf->is_middle = (line[31] == 'M'); if (line[32] == 'D') { if (extract_dim(&tf->hole, line, 33, 36, 0, is_mil)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid hole dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid hole dimension\n", fn, lineno); return -1; } if (line[37] == 'P') @@ -140,7 +140,7 @@ else if (line[37] == 'U') tf->is_plated = 0; else { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - hole is neither plated nor unplated\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - hole is neither plated nor unplated\n", fn, lineno); return -1; } } @@ -149,59 +149,59 @@ tf->is_plated = 0; } if (line[38] != 'A') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'A' for access\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'A' for access\n", fn, lineno); return -1; } if (extract_int(&tf->side, line, 39, 40)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid access side\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid access side\n", fn, lineno); return -1; } if (line[41] != 'X') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'X'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'X'\n", fn, lineno); return -1; } if (extract_dim(&tf->cx, line, 42, 48, 1, is_mil)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid X dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid X dimension\n", fn, lineno); return -1; } if (line[49] != 'Y') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'Y'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'Y'\n", fn, lineno); return -1; } if (extract_dim(&tf->cy, line, 50, 56, 1, is_mil)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid Y dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid Y dimension\n", fn, lineno); return -1; } if (line[57] != 'X') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing width 'X'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing width 'X'\n", fn, lineno); return -1; } if (extract_dim(&tf->width, line, 58, 61, 0, is_mil)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid width dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid width dimension\n", fn, lineno); return -1; } if (line[62] != 'Y') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing height 'Y'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing height 'Y'\n", fn, lineno); return -1; } if (extract_dim(&tf->height, line, 63, 66, 0, is_mil)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); return -1; } if (line[67] != 'R') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing rotation 'R'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing rotation 'R'\n", fn, lineno); return -1; } if (extract_int(&tf->rot, line, 68, 70)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); return -1; } if (line[72] != 'S') { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - solder mask marker 'S'\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - solder mask marker 'S'\n", fn, lineno); return -1; } if (extract_int(&tf->mask, line, 73, 73)) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); return -1; } tf->is_tooling = 0; @@ -212,18 +212,18 @@ tf->is_tooling = 1; case '1': /* through hole */ if (tf->hole == 0) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - thru-hole feature without hole dia\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - thru-hole feature without hole dia\n", fn, lineno); return -1; } break; case '2': /* SMT feature */ if (tf->hole > 0) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - SMD feature with hole dia\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - SMD feature with hole dia\n", fn, lineno); break; } break; default: - rnd_message(PCB_MSG_WARNING, "Ignoring unknown test feautre '3%c%c' in %s:%ld - unknown second digit'\n", line[1], line[2], fn, lineno); + rnd_message(RND_MSG_WARNING, "Ignoring unknown test feautre '3%c%c' in %s:%ld - unknown second digit'\n", line[1], line[2], fn, lineno); } return 0; } @@ -273,7 +273,7 @@ y = pcb->hidlib.size_y - tf->cy; if ((y < 0) || (y > pcb->hidlib.size_y) || (tf->cx < 0) || (tf->cx > pcb->hidlib.size_x)) - rnd_message(PCB_MSG_WARNING, "Test feature ended up out of the board extents in %s:%ld - board too small please use autocrop()\n", fn, lineno); + rnd_message(RND_MSG_WARNING, "Test feature ended up out of the board extents in %s:%ld - board too small please use autocrop()\n", fn, lineno); ps = pcb_pstk_new_from_shape(data, tf->cx, y, tf->hole, tf->is_plated, conf_core.design.bloat, sh); if (tf->is_middle) @@ -308,7 +308,7 @@ case '2': is_mil = 1; is_rad = 1; break; } if (is_rad) { - rnd_message(PCB_MSG_ERROR, "Unimplemented unit in %s:%ld - requested radians in rotation, the code doesn't handle that\n", fn, lineno); + rnd_message(RND_MSG_ERROR, "Unimplemented unit in %s:%ld - requested radians in rotation, the code doesn't handle that\n", fn, lineno); return 1; } } @@ -345,12 +345,12 @@ case '9': /* EOF */ if ((line[1] == '9') && (line[2] == '9')) return 0; - rnd_message(PCB_MSG_ERROR, "Invalid end-of-file marker in %s:%ld - expected '999'\n", fn, lineno); + rnd_message(RND_MSG_ERROR, "Invalid end-of-file marker in %s:%ld - expected '999'\n", fn, lineno); return 1; } } - rnd_message(PCB_MSG_ERROR, "Unexpected end of file - expected '999'\n"); + rnd_message(RND_MSG_ERROR, "Unexpected end of file - expected '999'\n"); return 1; } @@ -383,7 +383,7 @@ f = pcb_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't open %s for read\n", fname); + rnd_message(RND_MSG_ERROR, "Can't open %s for read\n", fname); RND_ACT_IRES(1); return 0; } @@ -476,7 +476,7 @@ static int ipcd356_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_ipcd356: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_ipcd356: requires exactly 1 input file name\n"); return -1; } return rnd_actionva(&PCB->hidlib, "LoadIpc356From", fns[0], NULL); Index: trunk/src_plugins/import_ltspice/ltspice.c =================================================================== --- trunk/src_plugins/import_ltspice/ltspice.c (revision 30954) +++ trunk/src_plugins/import_ltspice/ltspice.c (revision 30955) @@ -80,11 +80,11 @@ static void sym_flush(symattr_t *sattr) { -/* pcb_trace("ltspice sym: refdes=%s val=%s fp=%s\n", sattr->refdes, sattr->value, sattr->footprint);*/ +/* rnd_trace("ltspice sym: refdes=%s val=%s fp=%s\n", sattr->refdes, sattr->value, sattr->footprint);*/ if (sattr->refdes != NULL) { if (sattr->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "ltspice: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(RND_MSG_ERROR, "ltspice: not importing refdes=%s: no footprint specified\n", sattr->refdes); else rnd_actionva(&PCB->hidlib, "ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL); } @@ -216,7 +216,7 @@ if ((argc > 1) && (strcmp(argv[0], "NET") == 0)) { int n; for(n = 2; n < argc; n++) { -/* pcb_trace("net-add '%s' '%s'\n", argv[1], argv[n]);*/ +/* rnd_trace("net-add '%s' '%s'\n", argv[1], argv[n]);*/ rnd_actionva(&PCB->hidlib, "Netlist", "Add", argv[1], argv[n], NULL); } } @@ -236,18 +236,18 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } fa = pcb_fopen(&PCB->hidlib, fname_asc, "r"); if (fa == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_asc); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_asc); fclose(fn); return -1; } if (ltspice_hdr_asc(fa)) { - rnd_message(PCB_MSG_ERROR, "file '%s' doesn't look like a verison 4 asc file\n", fname_asc); + rnd_message(RND_MSG_ERROR, "file '%s' doesn't look like a verison 4 asc file\n", fname_asc); goto error; } @@ -366,7 +366,7 @@ static int ltspice_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_ltspice: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_ltspice: requires exactly 1 input file name\n"); return -1; } return rnd_actionva(&PCB->hidlib, "LoadLtspiceFrom", fns[0], NULL); Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 30954) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 30955) @@ -149,7 +149,7 @@ } } if (cnt == 0) - rnd_message(PCB_MSG_WARNING, "Couldn't find any part map rules - check your map_search_paths and rule files\n"); + rnd_message(RND_MSG_WARNING, "Couldn't find any part map rules - check your map_search_paths and rule files\n"); for(contents = view->children; contents != NULL; contents = contents->next) { if (strcmp(contents->str, "contents") == 0) { @@ -173,7 +173,7 @@ /* check the header */ if (strcmp(dom->root->str, "edif") != 0) { - rnd_message(PCB_MSG_ERROR, "Invalid mentor edf header: not an EDIF file\n"); + rnd_message(RND_MSG_ERROR, "Invalid mentor edf header: not an EDIF file\n"); return -1; } @@ -224,7 +224,7 @@ fn = pcb_fopen(NULL, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -244,7 +244,7 @@ ret = mentor_parse_tree(&dom); } else { - rnd_message(PCB_MSG_ERROR, "Invalid mentor edf: not a valid s-expression file near %d:%d\n", dom.parse.line, dom.parse.col); + rnd_message(RND_MSG_ERROR, "Invalid mentor edf: not a valid s-expression file near %d:%d\n", dom.parse.line, dom.parse.col); ret = -1; } @@ -291,7 +291,7 @@ static int mentor_sch_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_mentor_sch: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_mentor_sch: requires exactly 1 input file name\n"); return -1; } return mentor_sch_load(fns[0]); Index: trunk/src_plugins/import_mentor_sch/netlist_helper.c =================================================================== --- trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 30954) +++ trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 30955) @@ -121,13 +121,13 @@ int prio; if (argc != 5) { - rnd_message(PCB_MSG_ERROR, "Loading part map: wrong number of fields %d in %s:%d - expected 5 - ignoring this rule\n", argc, fn, lineno); + rnd_message(RND_MSG_ERROR, "Loading part map: wrong number of fields %d in %s:%d - expected 5 - ignoring this rule\n", argc, fn, lineno); return -1; } if (*argv[0] != '*') { prio = strtol(argv[0], &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Loading part map: invaid priority '%s' in %s:%d - ignoring this rule\n", argv[0], fn, lineno); + rnd_message(RND_MSG_ERROR, "Loading part map: invaid priority '%s' in %s:%d - ignoring this rule\n", argv[0], fn, lineno); return -1; } } @@ -135,13 +135,13 @@ prio = nethlp_prio_always; kr = re_se_comp(argv[1]); if (kr == NULL) { - rnd_message(PCB_MSG_ERROR, "Loading part map: can't compile attribute name regex in %s:%d - ignoring this rule\n", fn, lineno); + rnd_message(RND_MSG_ERROR, "Loading part map: can't compile attribute name regex in %s:%d - ignoring this rule\n", fn, lineno); return -1; } vr = re_se_comp(argv[2]); if (vr == NULL) { re_se_free(kr); - rnd_message(PCB_MSG_ERROR, "Loading part map: can't compile attribute value regex in %s:%d - ignoring this rule\n", fn, lineno); + rnd_message(RND_MSG_ERROR, "Loading part map: can't compile attribute value regex in %s:%d - ignoring this rule\n", fn, lineno); return -1; } @@ -260,7 +260,7 @@ /* printf("Elem '%s' -> %s:%s:%s\n", ectx->id, refdes, footprint, value);*/ } else - rnd_message(PCB_MSG_ERROR, "Ignoring part %s: no refdes\n", ectx->id); + rnd_message(RND_MSG_ERROR, "Ignoring part %s: no refdes\n", ectx->id); /* free */ for (e = htsp_first(&ectx->attr); e; e = htsp_next(&ectx->attr, e)) { @@ -293,7 +293,7 @@ char *refdes = htsp_get(&nctx->nhctx->id2refdes, part); char term[256]; if (refdes == NULL) { - rnd_message(PCB_MSG_ERROR, "nethelper: can't resolve refdes of part %s\n", part); + rnd_message(RND_MSG_ERROR, "nethelper: can't resolve refdes of part %s\n", part); } pcb_snprintf(term, sizeof(term), "%s-%s", refdes, pin); rnd_actionva(hl, "Netlist", "Add", nctx->netname, term, NULL); Index: trunk/src_plugins/import_mucs/mucs.c =================================================================== --- trunk/src_plugins/import_mucs/mucs.c (revision 30954) +++ trunk/src_plugins/import_mucs/mucs.c (revision 30955) @@ -67,7 +67,7 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, LoadMucsFrom, fname = argv[1].val.str); if (!(pcb_layer_flags(PCB, PCB_CURRLID(PCB)) & PCB_LYT_COPPER)) { - rnd_message(PCB_MSG_ERROR, "The currently active layer is not a copper layer.\n"); + rnd_message(RND_MSG_ERROR, "The currently active layer is not a copper layer.\n"); RND_ACT_IRES(1); return 0; } @@ -92,13 +92,13 @@ fi = pcb_fopen(&PCB->hidlib, fname, "r"); if (!fi) { - rnd_message(PCB_MSG_ERROR, "Can't load mucs unixplot file %s for read\n", fname); + rnd_message(RND_MSG_ERROR, "Can't load mucs unixplot file %s for read\n", fname); RND_ACT_IRES(1); return 0; } while ((c = getc(fi)) != EOF) { -/* pcb_trace("Char: %d \n", c); */ +/* rnd_trace("Char: %d \n", c); */ switch (c) { case 's': x1 = 100 * (getc(fi) + (getc(fi) * 256)); @@ -105,7 +105,7 @@ y1 = 100 * (getc(fi) + (getc(fi) * 256)); x2 = 100 * (getc(fi) + (getc(fi) * 256)); y2 = 100 * (getc(fi) + (getc(fi) * 256)); - pcb_trace("s--%i %i %i %i ???\n", x1, y1, x2, y2); + rnd_trace("s--%i %i %i %i ???\n", x1, y1, x2, y2); break; case 'l': x1 = (getc(fi) + (getc(fi) * 256)); @@ -112,7 +112,7 @@ y1 = (getc(fi) + (getc(fi) * 256)); x2 = (getc(fi) + (getc(fi) * 256)); y2 = (getc(fi) + (getc(fi) * 256)); - pcb_trace("Line(%d %d %d %d 20 \" \")\n", x1, y1, x2, y2); + rnd_trace("Line(%d %d %d %d 20 \" \")\n", x1, y1, x2, y2); /* consider a bounds checking function to censor absurd coord sizes */ pcb_line_new(PCB_CURRLAYER(PCB), PCB_MIL_TO_COORD(x1), PCB_MIL_TO_COORD(y1), PCB_MIL_TO_COORD(x2), PCB_MIL_TO_COORD(y2), PCB_MIL_TO_COORD(10), PCB_MIL_TO_COORD(10), pcb_flag_make(PCB_FLAG_AUTO)); break; @@ -120,7 +120,7 @@ x1 = (getc(fi) + (getc(fi) * 256)); y1 = (getc(fi) + (getc(fi) * 256)); r = (getc(fi) + (getc(fi) * 256)); - pcb_trace("Via(%d %d 60 25 \"\" \" \")\n", x1, y1); + rnd_trace("Via(%d %d 60 25 \"\" \" \")\n", x1, y1); ps = pcb_pstk_new_compat_via(PCB->Data, -1, PCB_MIL_TO_COORD(x1), PCB_MIL_TO_COORD(y1), conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, 0, PCB_PSTK_COMPAT_ROUND, 1); PCB_FLAG_SET(PCB_FLAG_AUTO, ps); break; @@ -127,7 +127,7 @@ case 'n': x1 = (getc(fi) + (getc(fi) * 256)); y1 = (getc(fi) + (getc(fi) * 256)); - pcb_trace("Line(%d %d %d %d 20 \" \")\n", x1, y1, x2, y2); + rnd_trace("Line(%d %d %d %d 20 \" \")\n", x1, y1, x2, y2); pcb_line_new(PCB_CURRLAYER(PCB), PCB_MIL_TO_COORD(x1), PCB_MIL_TO_COORD(y1), PCB_MIL_TO_COORD(x2), PCB_MIL_TO_COORD(y2), PCB_MIL_TO_COORD(10), PCB_MIL_TO_COORD(10), pcb_flag_make(PCB_FLAG_AUTO)); x2 = x1; y2 = y1; @@ -138,7 +138,7 @@ x2 = 100 * ((getc(fi) * 256) + getc(fi)); y2 = 100 * ((getc(fi) * 256) + getc(fi)); r = 100 * ((getc(fi) * 256) + getc(fi)); - pcb_trace("a--stroke newpath\n%d %d %d %d %d arc\n", x1, y1, x2, y2, r); + rnd_trace("a--stroke newpath\n%d %d %d %d %d arc\n", x1, y1, x2, y2, r); break; case 'e': break; Index: trunk/src_plugins/import_net_action/import_net_action.c =================================================================== --- trunk/src_plugins/import_net_action/import_net_action.c (revision 30954) +++ trunk/src_plugins/import_net_action/import_net_action.c (revision 30955) @@ -87,7 +87,7 @@ static int net_action_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **args, int numargs) { if (numargs != 1) { - rnd_message(PCB_MSG_ERROR, "import_net_action: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_net_action: requires exactly 1 input file name\n"); return -1; } pcb_act_execute_file(&PCB->hidlib, args[0]); Index: trunk/src_plugins/import_net_cmd/import_net_cmd.c =================================================================== --- trunk/src_plugins/import_net_cmd/import_net_cmd.c (revision 30954) +++ trunk/src_plugins/import_net_cmd/import_net_cmd.c (revision 30955) @@ -55,7 +55,7 @@ PCB_IMPORT_SCH_VERBOSE(verbose); if (numfns != 2) { - rnd_message(PCB_MSG_ERROR, "net_cmd_import: requires exactly two arguments:\nfirst argument must be the output file name or -\nsecond argument must be a full command line\n"); + rnd_message(RND_MSG_ERROR, "net_cmd_import: requires exactly two arguments:\nfirst argument must be the output file name or -\nsecond argument must be a full command line\n"); return -1; } @@ -63,7 +63,7 @@ cmdline = fns[1]; if ((outfn == NULL) || (*outfn == '\0')) { - rnd_message(PCB_MSG_ERROR, "net_cmd_import: Could not create temp file for the netlist output"); + rnd_message(RND_MSG_ERROR, "net_cmd_import: Could not create temp file for the netlist output"); return -1; } if ((outfn[0] == '-') && (outfn[1] == '\0')) { @@ -72,7 +72,7 @@ } if (verbose) - rnd_message(PCB_MSG_DEBUG, "import_net_cmd: running cmd: '%s' outfn='%s'\n", cmdline, outfn); + rnd_message(RND_MSG_DEBUG, "import_net_cmd: running cmd: '%s' outfn='%s'\n", cmdline, outfn); rnd_setenv("IMPORT_NET_CMD_PCB", PCB->hidlib.filename, 1); rnd_setenv("IMPORT_NET_CMD_OUT", outfn, 1); @@ -79,7 +79,7 @@ res = pcb_system(&PCB->hidlib, cmdline); if (res == 0) { if (verbose) - rnd_message(PCB_MSG_DEBUG, "pcb_net_cmd: about to run pcb_act_ExecuteFile, outfn='%s'\n", outfn); + rnd_message(RND_MSG_DEBUG, "pcb_net_cmd: about to run pcb_act_ExecuteFile, outfn='%s'\n", outfn); pcb_import_netlist(&PCB->hidlib, outfn); } if (tmpfn != NULL) Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 30954) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 30955) @@ -67,13 +67,13 @@ if (!filename) return 1; /* nothing to do */ - rnd_message(PCB_MSG_INFO, "Importing PCB netlist %s\n", filename); + rnd_message(RND_MSG_INFO, "Importing PCB netlist %s\n", filename); ratcmd = conf_core.rc.rat_command; if (PCB_EMPTY_STRING_P(ratcmd)) { fp = pcb_fopen(&PCB->hidlib, filename, "r"); if (!fp) { - rnd_message(PCB_MSG_ERROR, "Cannot open %s for reading", filename); + rnd_message(RND_MSG_ERROR, "Cannot open %s for reading", filename); return 1; } } @@ -88,7 +88,7 @@ /* open pipe to stdout of command */ if (*command == '\0' || (fp = pcb_popen(&PCB->hidlib, command, "r")) == NULL) { - pcb_popen_error_message(command); + rnd_popen_error_message(command); free(command); return 1; } @@ -105,7 +105,7 @@ /* check for maximum length line */ if (len) { if (inputline[--len] != '\n') - rnd_message(PCB_MSG_ERROR, "Line length (%i) exceeded in netlist file.\n" + rnd_message(RND_MSG_ERROR, "Line length (%i) exceeded in netlist file.\n" "additional characters will be ignored.\n", PCB_MAX_NETLIST_LINE_LENGTH); else inputline[len] = '\0'; @@ -143,7 +143,7 @@ kind = 0; } if (!lines) { - rnd_message(PCB_MSG_ERROR, "Empty netlist file!\n"); + rnd_message(RND_MSG_ERROR, "Empty netlist file!\n"); pcb_pclose(fp); return 1; } @@ -168,7 +168,7 @@ static int netlist_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_netlist: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_netlist: requires exactly 1 input file name\n"); return -1; } return ReadNetlist(fns[0]); Index: trunk/src_plugins/import_sch2/import_sch.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch.c (revision 30954) +++ trunk/src_plugins/import_sch2/import_sch.c (revision 30955) @@ -116,12 +116,12 @@ if ((imp_name == NULL) || (*imp_name == '\0')) { if (convert_attribs()) { - rnd_message(PCB_MSG_ERROR, "Had to convert import:: attributes to import_sch config\nNOTE: changes done to import settings will not change the old attribute values.\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0001.html\n"); + rnd_message(RND_MSG_ERROR, "Had to convert import:: attributes to import_sch config\nNOTE: changes done to import settings will not change the old attribute values.\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0001.html\n"); imp_name = conf_import_sch.plugins.import_sch.import_fmt; } else { if (!PCB_HAVE_GUI_ATTR_DLG) { - rnd_message(PCB_MSG_ERROR, "import_sch not configured; please use ImportSch(setup, ...)\n"); + rnd_message(RND_MSG_ERROR, "import_sch not configured; please use ImportSch(setup, ...)\n"); return 1; } else @@ -131,7 +131,7 @@ p = pcb_lookup_importer(imp_name); if (p == NULL) { - rnd_message(PCB_MSG_ERROR, "import_sch2: can not find importer called '%s'\nIs the corresponding plugin compiled?\n", imp_name); + rnd_message(RND_MSG_ERROR, "import_sch2: can not find importer called '%s'\nIs the corresponding plugin compiled?\n", imp_name); return 1; } @@ -141,7 +141,7 @@ a = malloc((len+1) * sizeof(char *)); for(n = 0, ci = rnd_conflist_first((rnd_conflist_t *)&conf_import_sch.plugins.import_sch.args); ci != NULL; ci = rnd_conflist_next(ci), n++) a[n] = ci->val.string[0]; - rnd_message(PCB_MSG_DEBUG, "import_sch2: reimport with %s -> %p\n", imp_name, p); + rnd_message(RND_MSG_DEBUG, "import_sch2: reimport with %s -> %p\n", imp_name, p); res = p->import(p, IMPORT_ASPECT_NETLIST, a, len); free(a); return res; @@ -153,13 +153,13 @@ pcb_plug_import_t *p; if (argc < 1) { - rnd_message(PCB_MSG_ERROR, "ImportSch: setup needs importer name\n"); + rnd_message(RND_MSG_ERROR, "ImportSch: setup needs importer name\n"); return -1; } for(n = 0; n < argc; n++) { if (fgw_arg_conv(&rnd_fgw, &argv[n], FGW_STR) != 0) { - rnd_message(PCB_MSG_ERROR, "ImportSch: failed to convert argument %d to string\n", n+1); + rnd_message(RND_MSG_ERROR, "ImportSch: failed to convert argument %d to string\n", n+1); return -1; } } @@ -166,16 +166,16 @@ p = pcb_lookup_importer(argv[0].val.str); if (p == NULL) { - rnd_message(PCB_MSG_ERROR, "ImportSch: importer not found: '%s'\n", argv[0].val.str); + rnd_message(RND_MSG_ERROR, "ImportSch: importer not found: '%s'\n", argv[0].val.str); return -1; } if (p->single_arg && (argc != 2)) { - rnd_message(PCB_MSG_ERROR, "ImportSch: importer '%s' requires exactly one file name argument\n", argv[0].val.str); + rnd_message(RND_MSG_ERROR, "ImportSch: importer '%s' requires exactly one file name argument\n", argv[0].val.str); return -1; } else if (p->all_filenames && (argc < 2)) { - rnd_message(PCB_MSG_ERROR, "ImportSch: importer '%s' requires at least one file name argument\n", argv[0].val.str); + rnd_message(RND_MSG_ERROR, "ImportSch: importer '%s' requires at least one file name argument\n", argv[0].val.str); return -1; } Index: trunk/src_plugins/import_tinycad/tinycad.c =================================================================== --- trunk/src_plugins/import_tinycad/tinycad.c (revision 30954) +++ trunk/src_plugins/import_tinycad/tinycad.c (revision 30955) @@ -70,9 +70,9 @@ static void sym_flush(symattr_t *sattr) { if (sattr->refdes != NULL) { -/* pcb_trace("tinycad sym: refdes=%s val=%s fp=%s\n", sattr->refdes, sattr->value, sattr->footprint);*/ +/* rnd_trace("tinycad sym: refdes=%s val=%s fp=%s\n", sattr->refdes, sattr->value, sattr->footprint);*/ if (sattr->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "tinycad: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(RND_MSG_ERROR, "tinycad: not importing refdes=%s: no footprint specified\n", sattr->refdes); else rnd_actionva(&PCB->hidlib, "ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL); } @@ -119,7 +119,7 @@ sep = strchr(curr, ','); if (sep != NULL) { *sep = '-'; -/* pcb_trace("net-add '%s' '%s'\n", argv[2], curr);*/ +/* rnd_trace("net-add '%s' '%s'\n", argv[2], curr);*/ rnd_actionva(&PCB->hidlib, "Netlist", "Add", argv[2], curr, NULL); } } @@ -161,7 +161,7 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -235,7 +235,7 @@ static int tinycad_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_tinycad: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_tinycad: requires exactly 1 input file name\n"); return -1; } return tinycad_load(fns[0]); Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 30954) +++ trunk/src_plugins/io_autotrax/read.c (revision 30955) @@ -86,7 +86,7 @@ { if (sattr->refdes != NULL) { if (sattr->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "protel autotrax: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(RND_MSG_ERROR, "protel autotrax: not importing refdes=%s: no footprint specified\n", sattr->refdes); else rnd_actionva(hl, "ElementList", "Need", null_empty(sattr->refdes), null_empty(sattr->footprint), null_empty(sattr->value), NULL); } @@ -128,7 +128,7 @@ return NULL; } if (autotrax_layer == 0) { - rnd_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax layer zero, %s:%d\n", otyp, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored '%s' on easy/autotrax layer zero, %s:%d\n", otyp, st->Filename, st->lineno); st->ignored_layer_zero_element++; return NULL; } @@ -135,7 +135,7 @@ lid = st->protel_to_stackup[autotrax_layer]; if (lid < 0) { - rnd_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); return NULL; } @@ -189,7 +189,7 @@ qparse_free(argc, &argv); } else { - rnd_message(PCB_MSG_ERROR, "Insufficient free string attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient free string attribute fields, %s:%d\n", st->Filename, st->lineno); qparse_free(argc, &argv); return -1; } @@ -196,12 +196,12 @@ } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Failed to parse text attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to parse text attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty free string text field, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty free string text field, %s:%d\n", st->Filename, st->lineno); strcpy(line, "(empty text field)"); } /* this helps the parser fail more gracefully if excessive newlines, or empty text field */ @@ -227,7 +227,7 @@ TODO("do not use strlen() for this, decide where to move this code") /* if (strlen(t) == 0) { - rnd_message(PCB_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); return 0; } */ @@ -272,7 +272,7 @@ qparse_free(argc, &argv); } else { - rnd_message(PCB_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); qparse_free(argc, &argv); return -1; } @@ -333,13 +333,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -469,13 +469,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -516,7 +516,7 @@ argc = qparse2(s, &argv, 0); if (argc <= 6) { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } X = pcb_get_value_ex(argv[0], NULL, NULL, NULL, "mil", &success); @@ -541,7 +541,7 @@ } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -548,7 +548,7 @@ /* now find name as string on next line and copy it */ TODO("can not exit above if we need to read this line") if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); return -1; } s = line; @@ -561,19 +561,19 @@ so we warn the user is this is the case */ switch (Connects) { case 1: - rnd_message(PCB_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); break; case 2: - rnd_message(PCB_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); break; case 4: - rnd_message(PCB_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 3: - rnd_message(PCB_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 5: - rnd_message(PCB_MSG_ERROR, "pin should connect to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "pin should connect to GND plane, %s:%d.\n", st->Filename, st->lineno); break; } @@ -581,7 +581,7 @@ Mask = Thickness + st->mask_clearance; if (autotrax_layer == 0) { - rnd_message(PCB_MSG_ERROR, "Ignored pad on easy/autotrax layer zero, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Ignored pad on easy/autotrax layer zero, %s:%d\n", st->Filename, st->lineno); st->ignored_layer_zero_element++; return 0; } @@ -597,7 +597,7 @@ 5 Cross Hair Target 6 Moiro Target */ if ((Shape == 5) || (Shape == 6)) { - rnd_message(PCB_MSG_ERROR, "Unsupported FP target shape %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP target shape %d, %s:%d.\n", Shape, st->Filename, st->lineno); return 0; } @@ -633,7 +633,7 @@ sh[n].layer_mask |= PCB_LYT_BOTTOM; break; default: - rnd_message(PCB_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); return 0; } @@ -657,12 +657,12 @@ case 3: /* octa */ TODO("generate octa") default: - rnd_message(PCB_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); return 0; } ps = pcb_pstk_new_from_shape(data, X, Y, Drill, 1, Clearance, sh); if (ps == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); return (ps != NULL); } @@ -705,13 +705,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Fill attribute fields unable to be parsed, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Fill attribute fields unable to be parsed, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -723,7 +723,7 @@ polygon = pcb_poly_new(ly, 0, flags); if (polygon == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -756,7 +756,7 @@ pcb_shape_rect(&sh[2], w, h); if (pcb_pstk_new_from_shape(subc->data, (X1+X2)/2, (Y1+Y2)/2, 0, 0, Clearance, sh) != NULL) return 1; - rnd_message(PCB_MSG_ERROR, "SMD pad: filed to convert from polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "SMD pad: filed to convert from polygon, %s:%d\n", st->Filename, st->lineno); } return -1; @@ -796,7 +796,7 @@ st->protel_to_stackup[13] = pcb_layer_create(st->pcb, gid, "Multi", 0); } else { - rnd_message(PCB_MSG_ERROR, "Unable to create Keepout, Multi layers in default top silk group\n"); + rnd_message(RND_MSG_ERROR, "Unable to create Keepout, Multi layers in default top silk group\n"); } g = pcb_get_grp_new_intern(st->pcb, -1); @@ -853,7 +853,7 @@ netname = rnd_strdup(line); } else { - rnd_message(PCB_MSG_ERROR, "Empty netlist name found, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty netlist name found, %s:%d\n", st->Filename, st->lineno); return -1; } fgetline(line, sizeof(line), FP, st->lineno); @@ -865,11 +865,11 @@ in_comp = 1; while(in_comp) { if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); } else { if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); } else { s = line; @@ -879,7 +879,7 @@ sattr.refdes = rnd_strdup(line); } if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - rnd_message(PCB_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); free(sattr.footprint); sattr.footprint = rnd_strdup("unknown"); } @@ -934,7 +934,7 @@ } } else if (length >= 6 && strncmp(line, "ENDPCB", 6) == 0) { - rnd_message(PCB_MSG_ERROR, "End of protel Autotrax file found in netlist section?!, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "End of protel Autotrax file found in netlist section?!, %s:%d\n", st->Filename, st->lineno); endpcb = 1; /* if we get here, something went wrong */ } } @@ -1004,13 +1004,13 @@ } else { qparse_free(argc, &argv); - rnd_message(PCB_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - rnd_message(PCB_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -1034,7 +1034,7 @@ break; } else { - rnd_message(PCB_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(RND_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); TODO("TODO safely free new_module") return 0; } @@ -1154,10 +1154,10 @@ fclose(FP); box = pcb_data_bbox(&board_size, Ptr->Data, pcb_false); if (st.ignored_keepout_element) { - rnd_message(PCB_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); + rnd_message(RND_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); } if (st.ignored_layer_zero_element) { - rnd_message(PCB_MSG_ERROR, "Ignored %d auto/easytrax layer zero feature(s)\n", st.ignored_layer_zero_element); + rnd_message(RND_MSG_ERROR, "Ignored %d auto/easytrax layer zero feature(s)\n", st.ignored_layer_zero_element); } if (box != NULL) { @@ -1165,7 +1165,7 @@ Ptr->hidlib.size_y = box->Y2; } else - rnd_message(PCB_MSG_ERROR, "Can not determine board extents - empty board?\n"); + rnd_message(RND_MSG_ERROR, "Can not determine board extents - empty board?\n"); /* we now flip the board about the X-axis, to invert the Y coords used by autotrax */ pcb_undo_freeze_add(); Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 30954) +++ trunk/src_plugins/io_autotrax/write.c (revision 30955) @@ -562,7 +562,7 @@ polylist_foreach(&layer->Polygon, &it, polygon) { if (pcb_cpoly_is_simple_rect(polygon)) { - pcb_trace(" simple rectangular polyogon\n"); + rnd_trace(" simple rectangular polyogon\n"); TODO("why do we recalculate the bounding box here?") minx = maxx = polygon->Points[0].X; @@ -586,7 +586,7 @@ /* here we need to test for non rectangular polygons to flag imperfect export to easy/autotrax if (helper_clipped_polygon_type_function(clipped_thing)) { - rnd_message(PCB_MSG_ERROR, "Polygon exported as a bounding box only.\n"); + rnd_message(RND_MSG_ERROR, "Polygon exported as a bounding box only.\n"); }*/ } else { @@ -670,7 +670,7 @@ TODO("this is a bug - exporting to a file shall not change the content we are exporting") if (pcb_board_normalize(PCB) < 0) { - rnd_message(PCB_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); + rnd_message(RND_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); return -1; } @@ -681,7 +681,7 @@ /* 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) { - rnd_message(PCB_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); + rnd_message(RND_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); return -1; } Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 30954) +++ trunk/src_plugins/io_bxl/read.c (revision 30955) @@ -213,7 +213,7 @@ { htsi_entry_t *e = htsi_getentry(&ctx->proto_name2id, name); if (e != NULL) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: padstack '%s' redefined\n", name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: padstack '%s' redefined\n", name); ctx->state.proto.name = name; ctx->state.proto.in_use = 1; @@ -233,12 +233,12 @@ return; if (ctx->state.proto.hdia <= 0) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: padstack '%s' marked as non-surface-mounted yet there is no hole in it\n", ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: padstack '%s' marked as non-surface-mounted yet there is no hole in it\n", ctx->state.proto.name); if (ctx->state.has_mask_shape) return; /* do not override user's mask */ if (ctx->state.copper_shape_idx < 0) { - rnd_message(PCB_MSG_WARNING, "bxl footprint error: padstack '%s' is thru-hole, does not have mask or copper\n", ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: padstack '%s' is thru-hole, does not have mask or copper\n", ctx->state.proto.name); return; } @@ -266,7 +266,7 @@ i = pcb_pstk_proto_insert_forcedup(ctx->subc->data, &ctx->state.proto, 0, 0); if (ctx->proto_id-1 != i) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: failed to insert padstack '%s'\n", ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: failed to insert padstack '%s'\n", ctx->state.proto.name); ctx->state.proto.name = NULL; /* do not free it as it is the hash key */ pcb_pstk_proto_free_fields(&ctx->state.proto); @@ -278,7 +278,7 @@ else if (rnd_strcasecmp(name, "square") == 0) ctx->state.shape_type = 1; else if (rnd_strcasecmp(name, "round") == 0) ctx->state.shape_type = 2; else { - rnd_message(PCB_MSG_WARNING, "bxl footprint error: unknown padstack shape '%s' in '%s' - omitting shape\n", name, ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: unknown padstack shape '%s' in '%s' - omitting shape\n", name, ctx->state.proto.name); return; } } @@ -291,7 +291,7 @@ if ((ctx->state.width == 0) || (ctx->state.height == 0)) { /* 0 sizes shape should not appear on the output */ if (ctx->state.layer->meta.bound.type & PCB_LYT_COPPER) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: 0 sized copper shape in padstack '%s'\n", ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: 0 sized copper shape in padstack '%s'\n", ctx->state.proto.name); return; } @@ -328,7 +328,7 @@ sh->data.circ.x = sh->data.circ.y = 0; sh->data.circ.dia = (ctx->state.width + ctx->state.height)/2; if (ctx->state.width != ctx->state.height) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: padstack: asymmetric round shape - probably a typo, using real round shape in '%s'\n", ctx->state.proto.name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: padstack: asymmetric round shape - probably a typo, using real round shape in '%s'\n", ctx->state.proto.name); break; } @@ -369,7 +369,7 @@ } } else - rnd_message(PCB_MSG_ERROR, "bxl footprint: internal error: failed to create padstack - expect missing padstacks\n"); + rnd_message(RND_MSG_ERROR, "bxl footprint: internal error: failed to create padstack - expect missing padstacks\n"); free(ctx->state.pin_name); ctx->state.pin_name = NULL; @@ -384,7 +384,7 @@ e = htsi_getentry(&ctx->proto_name2id, pstkname); if (e == NULL) { ctx->state.pstk_proto_id = -1; - rnd_message(PCB_MSG_WARNING, "bxl footprint error: invalid padstack reference '%s' - pad will not be created\n", pstkname); + rnd_message(RND_MSG_WARNING, "bxl footprint error: invalid padstack reference '%s' - pad will not be created\n", pstkname); return; } ctx->state.pstk_proto_id = e->value; @@ -507,7 +507,7 @@ htsp_set(&ctx->text_name2style, name, ts); /* name is not free'd at the caller */ } else - rnd_message(PCB_MSG_WARNING, "bxl footprint error: text style '%s' is redefined; second definition will override first\n", name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: text style '%s' is redefined; second definition will override first\n", name); ctx->state.text_style = ts; } @@ -520,7 +520,7 @@ { ctx->state.text_style = htsp_get(&ctx->text_name2style, name); if (ctx->state.text_style == NULL) - rnd_message(PCB_MSG_WARNING, "bxl footprint error: text style '%s' not defined (using default style)\n", name); + rnd_message(RND_MSG_WARNING, "bxl footprint error: text style '%s' not defined (using default style)\n", name); } @@ -550,9 +550,9 @@ htsi_entry_t *ei; /* emit all accumulated warnings */ - WARN_CNT(poly_broken, (PCB_MSG_WARNING, "footprint contains %ld invalid polygons (polygons ignored)\n", cnt)); - WARN_CNT(property_null_obj, (PCB_MSG_WARNING, "footprint contains %ld properties that could not be attached to any object\n", cnt)); - WARN_CNT(property_nosep, (PCB_MSG_WARNING, "footprint contains %ld properties without separator between key and value\n", cnt)); + WARN_CNT(poly_broken, (RND_MSG_WARNING, "footprint contains %ld invalid polygons (polygons ignored)\n", cnt)); + WARN_CNT(property_null_obj, (RND_MSG_WARNING, "footprint contains %ld properties that could not be attached to any object\n", cnt)); + WARN_CNT(property_nosep, (RND_MSG_WARNING, "footprint contains %ld properties without separator between key and value\n", cnt)); for(e = htsp_first(&bctx->layer_name2ly); e != NULL; e = htsp_next(&bctx->layer_name2ly, e)) @@ -683,11 +683,11 @@ /* found an opening token, tok is the ID */ case T_PADSTACK: - pcb_trace("BXL testparse; padstack '%s'\n", lval.un.s); + rnd_trace("BXL testparse; padstack '%s'\n", lval.un.s); found_tok = T_ENDPADSTACK; break; case T_PATTERN: - pcb_trace("BXL testparse; footprint '%s'\n", lval.un.s); + rnd_trace("BXL testparse; footprint '%s'\n", lval.un.s); if (pat_cb != NULL) pat_cb(cbctx, lval.un.s); if (typ & PCB_IOT_FOOTPRINT) Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30954) +++ trunk/src_plugins/io_dsn/read.c (revision 30955) @@ -83,7 +83,7 @@ #define if_save_uniq(node, name) \ if (rnd_strcasecmp(node->str, #name) == 0) { \ if (n ## name != NULL) { \ - rnd_message(PCB_MSG_ERROR, "Multiple " #name " nodes where only one is expected (at %ld:%ld)\n", (long)node->line, (long)node->col); \ + rnd_message(RND_MSG_ERROR, "Multiple " #name " nodes where only one is expected (at %ld:%ld)\n", (long)node->line, (long)node->col); \ return -1; \ } \ n ## name = node; \ @@ -95,7 +95,7 @@ double v = strtod(s, &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid coord: '%s' (at %ld:%ld)\n", s, (long)n->line, (long)n->col); + rnd_message(RND_MSG_ERROR, "Invalid coord: '%s' (at %ld:%ld)\n", s, (long)n->line, (long)n->col); return 0; } v /= ctx->unit->scale_factor; @@ -142,7 +142,7 @@ ctx->unit = get_unit_struct(su); if (ctx->unit == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid unit: '%s' (at %ld:%ld)\n", su, (long)nu->line, (long)nu->col); + rnd_message(RND_MSG_ERROR, "Invalid unit: '%s' (at %ld:%ld)\n", su, (long)nu->line, (long)nu->col); return NULL; } @@ -194,7 +194,7 @@ rnd_coord_t x, y; if (src == NULL) { - rnd_message(PCB_MSG_ERROR, "Missing coord in rect\n"); + rnd_message(RND_MSG_ERROR, "Missing coord in rect\n"); return -1; } @@ -221,7 +221,7 @@ return 0; err:; - rnd_message(PCB_MSG_ERROR, "Missing coord in rect (at %ld:%ld)\n", (long)src->line, (long)src->col); + rnd_message(RND_MSG_ERROR, "Missing coord in rect (at %ld:%ld)\n", (long)src->line, (long)src->col); return -1; } @@ -255,11 +255,11 @@ b = gsxl_children(bnd); if (!do_bbox && (rnd_strcasecmp(STRE(b), "pcb") == 0)) { - rnd_message(PCB_MSG_ERROR, "PCB boundary shall be a rect, not a path;\naccepting the path, but other software may choke on this file\n"); + rnd_message(RND_MSG_ERROR, "PCB boundary shall be a rect, not a path;\naccepting the path, but other software may choke on this file\n"); ctx->has_pcb_boundary = 1; } if ((b->next == NULL) || (b->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "not enough arguments for boundary poly (at %ld:%ld)\n", (long)b->line, (long)b->col); + rnd_message(RND_MSG_ERROR, "not enough arguments for boundary poly (at %ld:%ld)\n", (long)b->line, (long)b->col); return -1; } @@ -268,7 +268,7 @@ for(len = 0, n = b->next->next; n != NULL; len++) { x = COORDX(ctx, n); if (n->next == NULL) { - rnd_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(RND_MSG_ERROR, "Not enough coordinate values (missing y)\n"); break; } n = n->next; @@ -298,7 +298,7 @@ b = gsxl_children(bnd); if ((b->next == NULL) || (b->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "not enough arguments for boundary rect (at %ld:%ld)\n", (long)b->line, (long)b->col); + rnd_message(RND_MSG_ERROR, "not enough arguments for boundary rect (at %ld:%ld)\n", (long)b->line, (long)b->col); return -1; } if (rnd_strcasecmp(STRE(b), "pcb") == 0) @@ -328,7 +328,7 @@ return 0; if (pcb_layer_list(ctx->pcb, PCB_LYT_BOUNDARY, &olid, 1) < 1) { - rnd_message(PCB_MSG_ERROR, "Intenal error: no boundary layer found\n"); + rnd_message(RND_MSG_ERROR, "Intenal error: no boundary layer found\n"); return -1; } oly = pcb_get_layer(ctx->pcb->Data, olid); @@ -352,7 +352,7 @@ return 0; } - rnd_message(PCB_MSG_WARNING, "Ignoring unknown layer type '%s' for %s\n", ty, grp->name); + rnd_message(RND_MSG_WARNING, "Ignoring unknown layer type '%s' for %s\n", ty, grp->name); return 0; } @@ -359,7 +359,7 @@ #define CHECK_TOO_MANY_LAYERS(node, num) \ do { \ if (num >= PCB_MAX_LAYERGRP) { \ - rnd_message(PCB_MSG_ERROR, "Too many layer groups in the layer stack (at %ld:%ld)\n", (long)node->line, (long)node->col); \ + rnd_message(RND_MSG_ERROR, "Too many layer groups in the layer stack (at %ld:%ld)\n", (long)node->line, (long)node->col); \ return -1; \ } \ } while(0) @@ -386,7 +386,7 @@ }; if (str == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not parse board without a structure subtree\n"); + rnd_message(RND_MSG_ERROR, "Can not parse board without a structure subtree\n"); return -1; } @@ -416,7 +416,7 @@ ly = pcb_get_layer(ctx->pcb->Data, botcop->lid[0]); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "io_dsn internal error: no layer in group\n"); + rnd_message(RND_MSG_ERROR, "io_dsn internal error: no layer in group\n"); return -1; } htsp_set(&ctx->name2layer, (char *)ly->name, ly); @@ -436,7 +436,7 @@ } if (topcop == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not parse board without a copper layers\n"); + rnd_message(RND_MSG_ERROR, "Can not parse board without a copper layers\n"); return -1; } @@ -484,7 +484,7 @@ } if ((ctx->bbox.X1 < 0) || (ctx->bbox.Y1 < 0)) - rnd_message(PCB_MSG_WARNING, "Negative coordinates on input - you may want to execute autocrop()\n"); + rnd_message(RND_MSG_WARNING, "Negative coordinates on input - you may want to execute autocrop()\n"); ctx->pcb->hidlib.size_x = ctx->bbox.X2 - ctx->bbox.X1; ctx->pcb->hidlib.size_y = ctx->bbox.Y2 - ctx->bbox.Y1; @@ -491,7 +491,7 @@ if (!ctx->has_pcb_boundary) { ctx->bbox.X1 = ctx->bbox.Y1 = ctx->bbox.X2 = ctx->bbox.Y2 = 0; - rnd_message(PCB_MSG_ERROR, "Missing pcb boundary; every dsn design must have a pcb boundary.\ntrying to make up one using the bounding box.\nYou may want to execute autocrop()\n"); + rnd_message(RND_MSG_ERROR, "Missing pcb boundary; every dsn design must have a pcb boundary.\ntrying to make up one using the bounding box.\nYou may want to execute autocrop()\n"); } /* place polygons on planes */ @@ -499,7 +499,7 @@ if (rnd_attribute_get(&grp->Attributes, "plane") != NULL) { pcb_layer_t *ly; if (!ctx->has_pcb_boundary) { - rnd_message(PCB_MSG_ERROR, "Because of the missing pcb boundary power planes are not filled with polygons.\n"); + rnd_message(RND_MSG_ERROR, "Because of the missing pcb boundary power planes are not filled with polygons.\n"); return 0; } ly = pcb_get_layer(ctx->pcb->Data, grp->lid[0]); @@ -518,7 +518,7 @@ gsxl_node_t *args = nd->children->next; if ((args == NULL) || (args->str == NULL)) { - rnd_message(PCB_MSG_ERROR, "Padstack circle: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Padstack circle: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } @@ -566,13 +566,13 @@ gsxl_node_t *th = nd->children->next, *args = th->next; if ((args == NULL) || (args->next == NULL) || (args->next->next == NULL) || (args->next->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "Padstack path: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Padstack path: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } extra = args->next->next->next->next; if ((extra != NULL) && (!isalpha(*extra->str))) { - rnd_message(PCB_MSG_ERROR, "Padstack path: too many arguments - only a single line supported (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Padstack path: too many arguments - only a single line supported (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } @@ -598,12 +598,12 @@ for(len = 0, n = args; (n != NULL) && !(isalpha(*n->str)); n = n->next, len++) ; if (len < 3) { - rnd_message(PCB_MSG_ERROR, "Padstack poly: too few points (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Padstack poly: too few points (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } if ((len % 2) != 0) { - rnd_message(PCB_MSG_ERROR, "Padstack poly: wrong (odd) number of arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Padstack poly: wrong (odd) number of arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } @@ -639,7 +639,7 @@ { memset(shp, 0, sizeof(pcb_pstk_shape_t)); if ((sn == NULL) || (sn->str == NULL)) { - rnd_message(PCB_MSG_ERROR, "Invalid padstack shape (at %ld:%ld)\n", (long)sn->line, (long)sn->col); + rnd_message(RND_MSG_ERROR, "Invalid padstack shape (at %ld:%ld)\n", (long)sn->line, (long)sn->col); return -1; } if (rnd_strcasecmp(sn->str, "circle") == 0) { @@ -659,11 +659,11 @@ return -1; } else if (rnd_strcasecmp(sn->str, "qarc") == 0) { - rnd_message(PCB_MSG_ERROR, "Unsupported padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); + rnd_message(RND_MSG_ERROR, "Unsupported padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); return -1; } else { - rnd_message(PCB_MSG_ERROR, "Invalid/unknown padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); + rnd_message(RND_MSG_ERROR, "Invalid/unknown padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); return -1; } return 0; @@ -681,7 +681,7 @@ ly = htsp_get(&ctx->name2layer, nname); \ if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", nname, (long)net->line, (long)net->col); + rnd_message(RND_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", nname, (long)net->line, (long)net->col); return -1; } @@ -712,7 +712,7 @@ if (pcb_pstk_shape_eq(existing, shp)) return; - rnd_message(PCB_MSG_WARNING, "Incompatible padstack: some shape details are lost (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_WARNING, "Incompatible padstack: some shape details are lost (at %ld:%ld)\n", (long)nd->line, (long)nd->col); } static void dsn_pstk_set_shape(pcb_pstk_proto_t *prt, pcb_layer_type_t lyt, pcb_pstk_shape_t *shp, gsxl_node_t *nd) @@ -736,7 +736,7 @@ int has_hole = 0; if ((wrr->children == NULL) || (wrr->children->str == NULL)) { - rnd_message(PCB_MSG_WARNING, "Empty padstack (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_WARNING, "Empty padstack (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -771,7 +771,7 @@ goto err; if (!pcb_pstk_shape_eq(&hole, &shp)) - rnd_message(PCB_MSG_WARNING, "Incompatible padstack: non-uniform hole geometry; keeping one hole shape randomly (at %ld:%ld)\n", (long)n->line, (long)n->col); + rnd_message(RND_MSG_WARNING, "Incompatible padstack: non-uniform hole geometry; keeping one hole shape randomly (at %ld:%ld)\n", (long)n->line, (long)n->col); pcb_pstk_shape_free(&shp); } @@ -790,7 +790,7 @@ } else if ((rnd_strcasecmp(n->str, "rotate") == 0) || (rnd_strcasecmp(n->str, "absolute") == 0)) { if (rnd_strcasecmp(STRE(n->children), "off") == 0) { - rnd_message(PCB_MSG_WARNING, "unhandled padstack flag %s (at %ld:%ld) - this property will be ignored\n", n->str, (long)n->line, (long)n->col); + rnd_message(RND_MSG_WARNING, "unhandled padstack flag %s (at %ld:%ld) - this property will be ignored\n", n->str, (long)n->line, (long)n->col); } } } @@ -831,13 +831,13 @@ pcb_pstk_proto_t *proto; if ((psname == NULL) || (*psname == '\0')) { - rnd_message(PCB_MSG_ERROR, "Invalid anonymous via (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Invalid anonymous via (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } proto = htsp_get(&ctx->protos, psname); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); return -1; } @@ -852,7 +852,7 @@ return 0; err_coord:; - rnd_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } @@ -867,18 +867,18 @@ double rotang = 0.0; if ((psname == NULL) || (*psname == '\0')) { - rnd_message(PCB_MSG_ERROR, "Invalid anonymous pin (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Invalid anonymous pin (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } proto = htsp_get(&ctx->protos, psname); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Unknown pin '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Unknown pin '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); return -1; } if (pn->children->next == NULL) { - rnd_message(PCB_MSG_ERROR, "Missing pin terminal ID (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Missing pin terminal ID (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } @@ -891,7 +891,7 @@ char *end; rotang = strtod(STRE(nrot->children), &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid pin rotation angle (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Invalid pin rotation angle (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } } @@ -906,11 +906,11 @@ rnd_attribute_put(&ps->Attributes, "term", term); } else - rnd_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return 0; err_coord:; - rnd_message(PCB_MSG_ERROR, "Invalid pin coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(RND_MSG_ERROR, "Invalid pin coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } @@ -930,7 +930,7 @@ } } if (!found) { - rnd_message(PCB_MSG_ERROR, "Internal error: subc doc outline layer (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(RND_MSG_ERROR, "Internal error: subc doc outline layer (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } return dsn_parse_wire(ctx, nd, subc, ly); @@ -962,7 +962,7 @@ id = STRE(imr->children); if ((id == NULL) || (*id == '\0')) { - rnd_message(PCB_MSG_WARNING, "invalid empty image name (at %ld:%ld) - this property will be ignored\n", (long)imr->line, (long)imr->col); + rnd_message(RND_MSG_WARNING, "invalid empty image name (at %ld:%ld) - this property will be ignored\n", (long)imr->line, (long)imr->col); return -1; } @@ -1069,7 +1069,7 @@ return -1; } else if ((rnd_strcasecmp(n->str, "jumper") == 0) || (rnd_strcasecmp(n->str, "via_array_template") == 0) || (rnd_strcasecmp(n->str, "directory") == 0)) { - rnd_message(PCB_MSG_WARNING, "unhandled library item %s (at %ld:%ld) - please send the dsn file as a bugreport\n", n->str, (long)n->line, (long)n->col); + rnd_message(RND_MSG_WARNING, "unhandled library item %s (at %ld:%ld) - please send the dsn file as a bugreport\n", n->str, (long)n->line, (long)n->col); } } @@ -1097,7 +1097,7 @@ else \ ly = htsp_get(&ctx->name2layer, __nname__); \ if (ly == NULL) { \ - rnd_message(PCB_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", __nname__, (long)__net__->line, (long)__net__->col); \ + rnd_message(RND_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", __nname__, (long)__net__->line, (long)__net__->col); \ { fail; } \ } \ } \ @@ -1117,7 +1117,7 @@ DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "Not enough wire polygon attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough wire polygon attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1128,7 +1128,7 @@ break; x = COORDX(ctx, n); if (n->next == NULL) { - rnd_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(RND_MSG_ERROR, "Not enough coordinate values (missing y)\n"); break; } n = n->next; @@ -1152,7 +1152,7 @@ } if (len < 3) { - rnd_message(PCB_MSG_ERROR, "Not enough coordinate pairs for a polygon (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough coordinate pairs for a polygon (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1216,7 +1216,7 @@ DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "Not enough wire circle attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough wire circle attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1239,7 +1239,7 @@ return 0; err_cent:; - rnd_message(PCB_MSG_ERROR, "Not enough circle center attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough circle center attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1254,7 +1254,7 @@ DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - rnd_message(PCB_MSG_ERROR, "Not enough wire path attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough wire path attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1263,7 +1263,7 @@ for(n = net->next->next; n != NULL;) { x = COORDX(ctx, n); if (n->next == NULL) { - rnd_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(RND_MSG_ERROR, "Not enough coordinate values (missing y)\n"); break; } n = n->next; @@ -1325,7 +1325,7 @@ if ((net->next == NULL) || ((coords = net->next->next) == NULL)) { not_enough:; - rnd_message(PCB_MSG_ERROR, "Not enough wire qarc attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "Not enough wire qarc attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1336,7 +1336,7 @@ sa = qarc_angle(crd[4], crd[5], crd[0], crd[1], &r1); ea = qarc_angle(crd[4], crd[5], crd[2], crd[3], &r2); if ((sa == -1) || (ea == -1) || (r1 != r2)) { - rnd_message(PCB_MSG_ERROR, "invalid qarcs coords (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_ERROR, "invalid qarcs coords (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1398,7 +1398,7 @@ rnd_coord_t crd[2] = {0, 0}; if ((vnd->children == NULL) || (vnd->children->str == NULL)) { - rnd_message(PCB_MSG_ERROR, "Not enough via arguments (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(RND_MSG_ERROR, "Not enough via arguments (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); return -1; } @@ -1405,7 +1405,7 @@ pname = vnd->children->str; proto = htsp_get(&ctx->protos, pname); if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", pname, (long)vnd->line, (long)vnd->col); + rnd_message(RND_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", pname, (long)vnd->line, (long)vnd->col); return -1; } @@ -1413,11 +1413,11 @@ pid = pcb_pstk_proto_insert_dup(ctx->pcb->Data, proto, 1, 0); if (pcb_pstk_new(ctx->pcb->Data, -1, pid, crd[0], crd[1], conf_core.design.clearance/2, pcb_flag_make(PCB_FLAG_CLEARLINE)) == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(RND_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); return 0; err_coord:; - rnd_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(RND_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); return -1; } @@ -1432,7 +1432,7 @@ side = tnd->children->next->next; if ((side == NULL) || (side->str == NULL)) { - rnd_message(PCB_MSG_ERROR, "Testpoint without side (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(RND_MSG_ERROR, "Testpoint without side (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); return -1; } if (rnd_strcasecmp(side->str, "front") == 0) { @@ -1442,7 +1442,7 @@ back = 1; } else { - rnd_message(PCB_MSG_ERROR, "Invalid testpoint side '%s' (at %ld:%ld)\n", side->str, (long)tnd->line, (long)tnd->col); + rnd_message(RND_MSG_ERROR, "Invalid testpoint side '%s' (at %ld:%ld)\n", side->str, (long)tnd->line, (long)tnd->col); return -1; } @@ -1476,7 +1476,7 @@ ps = pcb_pstk_new(ctx->pcb->Data, -1, ctx->testpoint, crd[0], crd[1], 0, pcb_no_flags()); if (ps == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to create testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(RND_MSG_ERROR, "Failed to create testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); return 0; } @@ -1486,7 +1486,7 @@ return 0; not_enough:; - rnd_message(PCB_MSG_ERROR, "Not enough coordinates for a testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(RND_MSG_ERROR, "Not enough coordinates for a testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); return -1; } @@ -1512,7 +1512,7 @@ return -1; } else if ((rnd_strcasecmp(wrr->str, "bond") == 0) || (rnd_strcasecmp(wrr->str, "supply_pin") == 0)) { - rnd_message(PCB_MSG_WARNING, "unhandled wiring: '%s' (at %ld:%ld) - please send the dsn file as a bugreport\n", wrr->str, (long)wrr->line, (long)wrr->col); + rnd_message(RND_MSG_WARNING, "unhandled wiring: '%s' (at %ld:%ld) - please send the dsn file as a bugreport\n", wrr->str, (long)wrr->line, (long)wrr->col); } } @@ -1530,7 +1530,7 @@ subc = htsp_get(&ctx->subcs, id); if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid image name '%s' in placement (at %ld:%ld) - please send the dsn file as a bugreport\n", id, (long)plr->line, (long)plr->col); + rnd_message(RND_MSG_ERROR, "Invalid image name '%s' in placement (at %ld:%ld) - please send the dsn file as a bugreport\n", id, (long)plr->line, (long)plr->col); return -1; } @@ -1546,7 +1546,7 @@ side = n->children->next->next->next; if ((side == NULL) || (side->str == NULL)) { - rnd_message(PCB_MSG_ERROR, "Invalid placement side (at %ld:%ld)\n", (long)n->line, (long)n->col); + rnd_message(RND_MSG_ERROR, "Invalid placement side (at %ld:%ld)\n", (long)n->line, (long)n->col); return -1; } if (rnd_strcasecmp(side->str, "front") == 0) @@ -1554,13 +1554,13 @@ else if (rnd_strcasecmp(side->str, "back") == 0) need_mirror = 1; else { - rnd_message(PCB_MSG_ERROR, "Invalid placement side '%s' (at %ld:%ld)\n", side->str, (long)n->line, (long)n->col); + rnd_message(RND_MSG_ERROR, "Invalid placement side '%s' (at %ld:%ld)\n", side->str, (long)n->line, (long)n->col); return -1; } rot = strtod(STRE(side->next), &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid placement rotation '%s' - must be a number (at %ld:%ld)\n", side->next->str, (long)n->line, (long)n->col); + rnd_message(RND_MSG_ERROR, "Invalid placement rotation '%s' - must be a number (at %ld:%ld)\n", side->next->str, (long)n->line, (long)n->col); return -1; } @@ -1583,7 +1583,7 @@ return 0; bad_coord:; - rnd_message(PCB_MSG_ERROR, "Invalid placement coords (at %ld:%ld) - please send the dsn file as a bugreport\n", (long)n->line, (long)n->col); + rnd_message(RND_MSG_ERROR, "Invalid placement coords (at %ld:%ld) - please send the dsn file as a bugreport\n", (long)n->line, (long)n->col); return -1; } @@ -1604,7 +1604,7 @@ else if (rnd_strcasecmp(STRE(plr->children->children), "mirror_first") == 0) mirror_first = 0; else - rnd_message(PCB_MSG_WARNING, "invalid flip_style: '%s' (at %ld:%ld) - subcircuits may be misplaced - please send the dsn file as a bugreport\n", STRE(plr->children->children), (long)plr->line, (long)plr->col); + rnd_message(RND_MSG_WARNING, "invalid flip_style: '%s' (at %ld:%ld) - subcircuits may be misplaced - please send the dsn file as a bugreport\n", STRE(plr->children->children), (long)plr->line, (long)plr->col); } } else if (rnd_strcasecmp(plr->str, "component") == 0) { @@ -1630,7 +1630,7 @@ net = pcb_net_get(ctx->pcb, &ctx->pcb->netlist[PCB_NETLIST_INPUT], netname, 1); if (net == NULL) { - rnd_message(PCB_MSG_ERROR, "can not create net: '%s' (at %ld:%ld) - subcircuits may be misplaced - please send the dsn file as a bugreport\n", netname, (long)nwr->children->line, (long)nwr->children->col); + rnd_message(RND_MSG_ERROR, "can not create net: '%s' (at %ld:%ld) - subcircuits may be misplaced - please send the dsn file as a bugreport\n", netname, (long)nwr->children->line, (long)nwr->children->col); return -1; } for(nwr = nwr->children->next; nwr != NULL; nwr = nwr->next) { @@ -1702,7 +1702,7 @@ ctx->unit = get_unit_struct(su); if (ctx->unit == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid resolution unit: '%s'\n", su); + rnd_message(RND_MSG_ERROR, "Invalid resolution unit: '%s'\n", su); return -1; } } @@ -1820,7 +1820,7 @@ fclose(f); if (res != GSX_RES_EOE) { - rnd_message(PCB_MSG_ERROR, "s-expression parse error at offset %ld\n", offs); + rnd_message(RND_MSG_ERROR, "s-expression parse error at offset %ld\n", offs); return -1; } @@ -1841,11 +1841,11 @@ gsxl_compact_tree(&rdctx.dom); rn = rdctx.dom.root; if ((rn == NULL) || (rn->str == NULL) || (rnd_strcasecmp(rn->str, "pcb") != 0)) { - rnd_message(PCB_MSG_ERROR, "Root node should be pcb, got %s instead\n", rn->str); + rnd_message(RND_MSG_ERROR, "Root node should be pcb, got %s instead\n", rn->str); goto error; } if (gsxl_next(rn) != NULL) { - rnd_message(PCB_MSG_ERROR, "Multiple root nodes?!\n"); + rnd_message(RND_MSG_ERROR, "Multiple root nodes?!\n"); goto error; } Index: trunk/src_plugins/io_dsn/write.c =================================================================== --- trunk/src_plugins/io_dsn/write.c (revision 30954) +++ trunk/src_plugins/io_dsn/write.c (revision 30955) @@ -127,7 +127,7 @@ int res = 0; if (pcb_netmap_init(&wctx->nmap, wctx->pcb) != 0) { - rnd_message(PCB_MSG_ERROR, "Can not set up net map\n"); + rnd_message(RND_MSG_ERROR, "Can not set up net map\n"); return -1; } Index: trunk/src_plugins/io_eagle/eagle_bin.c =================================================================== --- trunk/src_plugins/io_eagle/eagle_bin.c (revision 30954) +++ trunk/src_plugins/io_eagle/eagle_bin.c (revision 30955) @@ -1104,7 +1104,7 @@ egb_ctx->free_text_cursor = NULL; if (fread(block, 1, 8, f) != 8) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text section read. Text section not found.\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text section read. Text section not found.\n"); return -1; } @@ -1111,7 +1111,7 @@ if (load_long(block, 0, 1) == 0x13 && load_long(block, 1, 1) == 0x12) { } else { - rnd_message(PCB_MSG_ERROR, "Failed to find 0x1312 start of pre-DRC free text section.\n"); + rnd_message(RND_MSG_ERROR, "Failed to find 0x1312 start of pre-DRC free text section.\n"); return -1; } @@ -1121,13 +1121,13 @@ TODO("TODO instead of skipping the text, we need to load it completely with drc_ctx->free_text pointing to it") while (text_remaining > 400) { if (fread(free_text, 1, 400, f) != 400) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); return -1; } text_remaining -= 400; } if (fread(free_text, 1, text_remaining, f) != text_remaining) { - rnd_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(RND_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); return -1; } return 0; @@ -1150,7 +1150,7 @@ if (fread(block, 1, 4, f) != 4) { TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read; preamble not found. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read; preamble not found. Truncated file?\n"); return -1; } @@ -1160,11 +1160,11 @@ && load_long(block, 2, 1) == 0x00 && load_long(block, 3, 1) == 0x20)) { TODO(": convert this to proper error reporting") - pcb_trace("E: start of DRC preamble not found where it was expected.\n"); - pcb_trace("E: drc byte 0 : %d\n", (int)load_long(block, 0, 1) ); - pcb_trace("E: drc byte 1 : %d\n", (int)load_long(block, 1, 1) ); - pcb_trace("E: drc byte 2 : %d\n", (int)load_long(block, 2, 1) ); - pcb_trace("E: drc byte 3 : %d\n", (int)load_long(block, 3, 1) ); + rnd_trace("E: start of DRC preamble not found where it was expected.\n"); + rnd_trace("E: drc byte 0 : %d\n", (int)load_long(block, 0, 1) ); + rnd_trace("E: drc byte 1 : %d\n", (int)load_long(block, 1, 1) ); + rnd_trace("E: drc byte 2 : %d\n", (int)load_long(block, 2, 1) ); + rnd_trace("E: drc byte 3 : %d\n", (int)load_long(block, 3, 1) ); return -1; } @@ -1171,13 +1171,13 @@ while (!DRC_preamble_end_found) { if (fread(&c, 1, 1, f) != 1) { /* the text preamble is not necessarily n * 4 bytes */ TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } else { if (c == '\0') { /* so we step through, looking for each 0x00 */ if (fread(block, 1, 4, f) != 4) { /* the text preamble seems to n * 24 bytes */ TODO(": convert this to proper error reporting") - pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); + rnd_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } if (load_long(block, 0, 1) == 0x78 @@ -1192,7 +1192,7 @@ if (fread(DRC_block, 1, DRC_length_used, f) != DRC_length_used) { TODO(": convert this to proper error reporting") - pcb_trace("E: short DRC value block read. DRC section incomplete. Truncated file?\n"); + rnd_trace("E: short DRC value block read. DRC section incomplete. Truncated file?\n"); return -1; } @@ -1280,7 +1280,7 @@ /* load the current block */ if (fread(block, 1, 24, f) != 24) { TODO(": convert this to proper error reporting") - pcb_trace("E: short read\n"); + rnd_trace("E: short read\n"); return -1; } processed++; @@ -1311,7 +1311,7 @@ } TODO(": convert this to proper error reporting") - pcb_trace("E: unknown block ID 0x%02x%02x at offset %ld\n", block[0], block[1], ftell(f)); + rnd_trace("E: unknown block ID 0x%02x%02x at offset %ld\n", block[0], block[1], ftell(f)); return -1; found:; @@ -1607,10 +1607,10 @@ } if (!cxy_ok) { - rnd_message(PCB_MSG_ERROR, "cx and cy not set in arc/linetype: %d/%d\n", linetype, arctype); + rnd_message(RND_MSG_ERROR, "cx and cy not set in arc/linetype: %d/%d\n", linetype, arctype); cx = cy = 0; } else if (!(x1_ok && x2_ok && y1_ok && y2_ok)) { - rnd_message(PCB_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); + rnd_message(RND_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); } radius = (long)(rnd_distance((double)cx, (double)cy, (double)x2, (double)y2)); sprintf(itoa_buffer, "%ld", radius); @@ -1633,7 +1633,7 @@ /* count children of libraries */ for(n = libraries->first_child; (n != NULL) && (idx > 1); n = n->next, idx--) ; if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_library_ref_by_idx() can't find library index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_library_ref_by_idx() can't find library index %ld\n", idx); return n; } @@ -1645,11 +1645,11 @@ /* find library/0x1500->packages/0x1900 node */ for(pkgs = library->first_child; (pkgs != NULL) && ((pkgs->id & 0xFF00) != 0x1900); pkgs = pkgs->next); if (pkgs == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find packages node in library tree\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find packages node in library tree\n", idx); /* count children of library */ for(n = pkgs->first_child; (n != NULL) && (idx > 1); n = n->next, idx--); if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find package index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find package index %ld\n", idx); return n; } @@ -1661,7 +1661,7 @@ /* count children of elelements */ for(n = elements->first_child; (n != NULL) && (idx > 1); n = n->next, idx--) ; if (n == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_elem_ref_by_idx() can't find element placement index %ld\n", idx); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_elem_ref_by_idx() can't find element placement index %ld\n", idx); return n; } @@ -2014,7 +2014,7 @@ if (strcmp(e->key, "name") == 0) { if (e->value != NULL && e->value[0] == '-' && e->value[1] == '\0') { egb_node_prop_set(n, "name", "HYPHEN"); - rnd_message(PCB_MSG_WARNING, "Substituted invalid name %s in PCB_EKGW_SECT_ELEMENT with 'HYPHEN'\n", e->value); + rnd_message(RND_MSG_WARNING, "Substituted invalid name %s in PCB_EKGW_SECT_ELEMENT with 'HYPHEN'\n", e->value); } else { egb_node_prop_set(n, "name", e->value); } @@ -2139,7 +2139,7 @@ break; if (n->id != PCB_EGKW_SECT_PACKAGES) { - rnd_message(PCB_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); + rnd_message(RND_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); return -1; } @@ -2178,7 +2178,7 @@ eagle_bin_ctx.board = find_node(eagle_bin_ctx.drawing->first_child, PCB_EGKW_SECT_BOARD); if (eagle_bin_ctx.board == NULL) { TODO(": convert this to proper error reporting") - pcb_trace("No board node found, this may be a library file.\n"); + rnd_trace("No board node found, this may be a library file.\n"); } else { /* the following code relies on the board node being present, i.e. a layout */ /* create a drc node, since DRC block if present in binary file comes after the tree */ @@ -2186,7 +2186,7 @@ eagle_bin_ctx.libraries = find_node_name(eagle_bin_ctx.board->first_child, "libraries"); if (eagle_bin_ctx.libraries == NULL) { /* layouts have a libraries node it seems */ TODO(": convert this to proper error reporting") - pcb_trace("Eagle binary layout is missing a board/libraries node.\n"); + rnd_trace("Eagle binary layout is missing a board/libraries node.\n"); return -1; } @@ -2238,7 +2238,7 @@ egb_ctx_t eagle_bin_ctx; -/* pcb_trace("blocks remaining prior to function call = %ld\n", *numblocks);*/ +/* rnd_trace("blocks remaining prior to function call = %ld\n", *numblocks);*/ *root = egb_node_alloc(0, "eagle"); @@ -2245,10 +2245,10 @@ res = read_block(numblocks, 1, ctx, f, fn, *root); if (res < 0) { TODO(": convert this to proper error reporting") - pcb_trace("Problem with remaining blocks... is this a library file?\n"); + rnd_trace("Problem with remaining blocks... is this a library file?\n"); return res; } -/* pcb_trace("blocks remaining after outer function call = %ld (after reading %d blocks)\n\n", *numblocks, res);*/ +/* rnd_trace("blocks remaining after outer function call = %ld (after reading %d blocks)\n\n", *numblocks, res);*/ /* could test if < v4 as v3.xx seems to have no DRC or Netclass or Free Text end blocks */ read_notes(ctx, f, fn, &eagle_bin_ctx); @@ -2255,7 +2255,7 @@ /* read_drc will determine sane defaults if no DRC block found */ if (read_drc(ctx, f, fn, &eagle_bin_ctx) != 0) { TODO(": convert this to proper error reporting") - pcb_trace("No DRC section found, either a v3 binary file or a binary library file.\n"); + rnd_trace("No DRC section found, either a v3 binary file or a binary library file.\n"); } /* we now use the eagle_bin_ctx results for post_proc */ return postproc(ctx, *root, &eagle_bin_ctx); Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30954) +++ trunk/src_plugins/io_eagle/read.c (revision 30955) @@ -159,7 +159,7 @@ if (STRCMP(d->node_name, name) == 0) return d->parser(st, subtree, obj, type); - rnd_message(PCB_MSG_ERROR, "eagle: unknown node: '%s'\n", name); + rnd_message(RND_MSG_ERROR, "eagle: unknown node: '%s'\n", name); /* node name not found in the dispatcher table */ return -1; } @@ -315,7 +315,7 @@ ly->lid = -1; tmp_id = eagle_get_attrl(st, n, "number", -1); if (tmp_id < 1 || tmp_id > 254) { - rnd_message(PCB_MSG_ERROR, "invalid layer definition layer number found: '%d', skipping\n", tmp_id); + rnd_message(RND_MSG_ERROR, "invalid layer definition layer number found: '%d', skipping\n", tmp_id); return -1; } id = tmp_id; @@ -422,7 +422,7 @@ return &subc->data->Layer[lid]; if (ly->lid < 0) { - rnd_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); + rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); lyt = PCB_LYT_VIRTUAL; comb = 0; return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, pcb_true); @@ -451,18 +451,18 @@ /* count children of libs so n ends up at the libith library */ for(n = CHILDREN(libs); (n != NULL) && (libi > 1); n = NEXT(n), libi--) ; if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); return NULL; } if (STRCMP(NODENAME(n), "library") != 0) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); return NULL; } n = CHILDREN(n); if (STRCMP(NODENAME(n), "packages") != 0) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); return NULL; } @@ -469,13 +469,13 @@ /* count children of that library so n ends up at the pkgth package */ for(n = CHILDREN(n); (n != NULL) && (pkgi > 1); n = NEXT(n), pkgi--) ; if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find pkg by idx:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find pkg by idx:\n"); return NULL; } res = st->parser.calls->get_user_data(n); if (res == NULL) - rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() found the element node in the tree but there's no element instance associated with it:\n"); + rnd_message(RND_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() found the element node in the tree but there's no element instance associated with it:\n"); return res; } @@ -517,7 +517,7 @@ case 180: return 2; case 270: return 1; } - rnd_message(PCB_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); + rnd_message(RND_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); return -1; } @@ -534,15 +534,15 @@ pcb_layer_t *ly; ly = eagle_layer_get(st, ln, type, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate text layer 'ly' to 'ln:%d' in eagle_read_text()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate text layer 'ly' to 'ln:%d' in eagle_read_text()\n", ln); return 0; } if (!(text_val = eagle_get_attrs(st, subtree, "textfield", NULL)) && CHILDREN(subtree) == NULL) { - rnd_message(PCB_MSG_WARNING, "Ignoring empty text field\n"); + rnd_message(RND_MSG_WARNING, "Ignoring empty text field\n"); return 0; } if (text_val == NULL && !IS_TEXT(CHILDREN(subtree))) { - rnd_message(PCB_MSG_WARNING, "Ignoring text field (invalid child node)\n"); + rnd_message(RND_MSG_WARNING, "Ignoring text field (invalid child node)\n"); return 0; } @@ -560,7 +560,7 @@ char *end; rotdeg = strtol(rot+1, &end, 10); if (*end != '\0') - rnd_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); + rnd_message(RND_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); TODO("but: alignment changed, see {text_rot}"); /* @@ -569,7 +569,7 @@ */ } else - rnd_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (missing R prefix)\n", rot); + rnd_message(RND_MSG_WARNING, "Ignoring invalid text rotation '%s' (missing R prefix)\n", rot); } TODO("{text_size} calculate bounding box, requires size_bump(st, X, Y)") pcb_text_new(ly, pcb_font(st->pcb, 0, 1), X, Y, rotdeg, text_scaling, 0, text_val, text_flags); @@ -596,7 +596,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); return 0; } @@ -632,7 +632,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); return 0; } @@ -678,7 +678,7 @@ r = (sidelen / 2) / tan(curvang / PCB_RAD_TO_DEG / 2.0); cx = rnd_round(midx + nx * r); cy = rnd_round(midy + ny * r); -/* pcb_trace("curve mid: %mm;%mm center: %mm;%mm\n", midx, midy, cx, cy);*/ +/* rnd_trace("curve mid: %mm;%mm center: %mm;%mm\n", midx, midy, cx, cy);*/ dx = x1 - cx; dy = y1 - cy; @@ -686,7 +686,7 @@ sa = 180.0 - atan2(y1 - cy, x1 - cx) * PCB_RAD_TO_DEG; ea = 180.0 - atan2(y2 - cy, x2 - cx) * PCB_RAD_TO_DEG; da = ea - sa; -/* pcb_trace(" r=%mm %f %f -> %f\n", (rnd_coord_t)r, sa, ea, da);*/ +/* rnd_trace(" r=%mm %f %f -> %f\n", (rnd_coord_t)r, sa, ea, da);*/ arc = pcb_arc_new(ly, cx, cy, r, r, sa, da, th, st->md_wire_wire*2, pcb_flag_make(PCB_FLAG_CLEARLINE), 0); switch (loc) { @@ -739,7 +739,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); + rnd_message(RND_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); return 0; } @@ -911,10 +911,10 @@ if (ln != -1) { /* can't go by layer type because there's no layer stack yet (we are in lib) */ if (ln == 16) onbottom = 1; else if (ln== 1) onbottom = 0; - else rnd_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (invalid layer %d)\n", ln); + else rnd_message(RND_MSG_ERROR, "Failed to determine smd pad side, assuming top (invalid layer %d)\n", ln); } else - rnd_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); + rnd_message(RND_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); name = eagle_get_attrs(st, subtree, "name", NULL); x = eagle_get_attrc(st, subtree, "x", 0); @@ -933,7 +933,7 @@ ps = eagle_create_pstk(st, subc->data, x, y, EAGLE_PSH_SMD, dx, dy, clr, 0, roundness, rot, onbottom, 0); if (ps == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to load smd pad\n"); + rnd_message(RND_MSG_ERROR, "Failed to load smd pad\n"); if (name != NULL) rnd_attribute_put(&ps->Attributes, "term", name); @@ -994,7 +994,7 @@ diay *= 2; } else { - rnd_message(PCB_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); + rnd_message(RND_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); return -1; } } @@ -1097,7 +1097,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); + rnd_message(RND_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); return 0; } @@ -1159,7 +1159,7 @@ trnode_t *n; for(n = CHILDREN(subtree); n != NULL; n = NEXT(n)) { - pcb_trace("looking at child %s of packages node\n", NODENAME(n)); + rnd_trace("looking at child %s of packages node\n", NODENAME(n)); if (STRCMP(NODENAME(n), "package") == 0) { pcb_subc_t *subc; @@ -1170,7 +1170,7 @@ eagle_read_pkg(st, n, subc); if (pcb_data_is_empty(subc->data)) { pcb_subc_free(subc); - rnd_message(PCB_MSG_WARNING, "Ignoring empty package in library\n"); + rnd_message(RND_MSG_WARNING, "Ignoring empty package in library\n"); continue; } @@ -1215,7 +1215,7 @@ const char *name = eagle_get_attrs(st, n, "name", NULL); if ((st->elem_by_name) && (name == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring package with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring package with no name\n"); continue; } @@ -1222,7 +1222,7 @@ subc = pcb_subc_alloc(); eagle_read_pkg(st, n, subc); if (pcb_subc_is_empty(subc)) { - rnd_message(PCB_MSG_WARNING, "Ignoring empty package %s\n", name); + rnd_message(RND_MSG_WARNING, "Ignoring empty package %s\n", name); free(subc); continue; } @@ -1264,7 +1264,7 @@ const char *name = eagle_get_attrs(st, n, "name", NULL); eagle_library_t *lib; if ((st->elem_by_name) && (name == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring library with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring library with no name\n"); continue; } lib = calloc(sizeof(eagle_library_t), 1); @@ -1291,13 +1291,13 @@ if ((elem == NULL) || (pad == NULL)) { - rnd_message(PCB_MSG_WARNING, "Failed to parse contactref node: missing \"element\" or \"pad\" netlist attributes\n"); + rnd_message(RND_MSG_WARNING, "Failed to parse contactref node: missing \"element\" or \"pad\" netlist attributes\n"); return -1; } if (elem != NULL && elem[0] == '-' && elem[1] == '\0') { pcb_snprintf(conn, sizeof(conn), "%s-%s", "HYPHEN", pad); - rnd_message(PCB_MSG_WARNING, "Substituted invalid element name '-' with 'HYPHEN'\n"); + rnd_message(RND_MSG_WARNING, "Substituted invalid element name '-' with 'HYPHEN'\n"); } else { pcb_snprintf(conn, sizeof(conn), "%s-%s", elem, pad); } @@ -1306,7 +1306,7 @@ if (net != NULL && net[0] == '-' && net[1] == '\0') { /* pcb-rnd doesn't like it when Eagle uses '-' for GND*/ rnd_actionva(&st->pcb->hidlib, "Netlist", "Add", "GND", conn, NULL); - rnd_message(PCB_MSG_WARNING, "Substituted contactref net \"GND\" instead of original invalid '-'\n"); + rnd_message(RND_MSG_WARNING, "Substituted contactref net \"GND\" instead of original invalid '-'\n"); } else { rnd_actionva(&st->pcb->hidlib, "Netlist", "Add", net, conn, NULL); } @@ -1334,7 +1334,7 @@ if (STRCMP(NODENAME(n), "signal") == 0) { const char *name = eagle_get_attrs(st, n, "name", NULL); if (name == NULL) { - rnd_message(PCB_MSG_WARNING, "Ignoring signal with no name\n"); + rnd_message(RND_MSG_WARNING, "Ignoring signal with no name\n"); continue; } eagle_foreach_dispatch(st, CHILDREN(n), disp, (char *)name, ON_BOARD); @@ -1391,7 +1391,7 @@ val = eagle_get_attrs(st, n, "value", NULL); if (name == NULL) { - rnd_message(PCB_MSG_ERROR, "Element name not found in tree\n"); + rnd_message(RND_MSG_ERROR, "Element name not found in tree\n"); name = "refdes_not_found"; val = "parse_error"; } @@ -1402,7 +1402,7 @@ if (st->elem_by_name) { /* xml: library and package are named */ if ((lib == NULL) || (pkg == NULL)) { - rnd_message(PCB_MSG_WARNING, "Ignoring element with incomplete library reference\n"); + rnd_message(RND_MSG_WARNING, "Ignoring element with incomplete library reference\n"); continue; } subc = eagle_libelem_by_name(st, lib, pkg); @@ -1411,7 +1411,7 @@ long libi = eagle_get_attrl(st, n, "library", -1); long pkgi = eagle_get_attrl(st, n, "package", -1); if ((libi < 0) || (pkgi < 0)) { - rnd_message(PCB_MSG_WARNING, "Ignoring element with broken library reference: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_WARNING, "Ignoring element with broken library reference: %s/%s\n", lib, pkg); continue; } subc = eagle_libelem_by_idx(st, nlib, libi, pkgi); @@ -1419,11 +1419,11 @@ /* sanity checks: the element exists and is non-empty */ if (subc == NULL) { - rnd_message(PCB_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); continue; } if (pcb_subc_is_empty(subc)) { - rnd_message(PCB_MSG_ERROR, "Not placing empty element: %s/%s\n", lib, pkg); + rnd_message(RND_MSG_ERROR, "Not placing empty element: %s/%s\n", lib, pkg); continue; } @@ -1460,7 +1460,7 @@ if (steps > 0) pcb_subc_rotate90(new_subc, x, y, steps); else - rnd_message(PCB_MSG_WARNING, "0 degree element rotation/steps used for '%s'/'%d': %s/%s/%s\n", rot, steps, name, pkg, lib); + rnd_message(RND_MSG_WARNING, "0 degree element rotation/steps used for '%s'/'%d': %s/%s/%s\n", rot, steps, name, pkg, lib); } else { double sina, cosa; @@ -1471,7 +1471,7 @@ } } else - rnd_message(PCB_MSG_ERROR, "syntax error in element rotation '%s': %s/%s/%s\n", rot, name, pkg, lib); + rnd_message(RND_MSG_ERROR, "syntax error in element rotation '%s': %s/%s/%s\n", rot, name, pkg, lib); } if (back) @@ -1569,7 +1569,7 @@ dr = eagle_trpath(st, st->parser.root, "drawing", "board", "designrules", NULL); if (dr == NULL) { - rnd_message(PCB_MSG_WARNING, "can't find design rules, using sane defaults\n"); + rnd_message(RND_MSG_WARNING, "can't find design rules, using sane defaults\n"); } else { for(n = CHILDREN(dr); n != NULL; n = NEXT(n)) { if (STRCMP(NODENAME(n), "param") != 0) @@ -1582,7 +1582,7 @@ else if (strcmp(name, "rvPadBottom") == 0) st->rv_pad_bottom = eagle_get_attrd(st, n, "value", 0); } if ((st->rv_pad_top != st->rv_pad_inner) || (st->rv_pad_top != st->rv_pad_inner)) - rnd_message(PCB_MSG_WARNING, "top/inner/bottom default pad sizes differ - using top size only\n"); + rnd_message(RND_MSG_WARNING, "top/inner/bottom default pad sizes differ - using top size only\n"); } return 0; } @@ -1595,22 +1595,22 @@ v3 = 0; if (ver == NULL) { - rnd_message(PCB_MSG_ERROR, "no version attribute in \n"); + rnd_message(RND_MSG_ERROR, "no version attribute in \n"); return -1; } v1 = strtol(ver, &end, 10); if (*end != '.') { - rnd_message(PCB_MSG_ERROR, "malformed version string [1] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [1] in \n"); return -1; } v2 = strtol(end+1, &end, 10); if (*end != '.' && *end != '\0') { - rnd_message(PCB_MSG_ERROR, "malformed version string [2] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [2] in \n"); return -1; } else if (*end == '.') { v3 = strtol(end+1, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "malformed version string [3] in \n"); + rnd_message(RND_MSG_ERROR, "malformed version string [3] in \n"); return -1; } } @@ -1617,14 +1617,14 @@ /* version check */ if (v1 < 6) { - rnd_message(PCB_MSG_ERROR, "file version too old\n"); + rnd_message(RND_MSG_ERROR, "file version too old\n"); return -1; } if (v1 > 8) { - rnd_message(PCB_MSG_ERROR, "file version too new\n"); + rnd_message(RND_MSG_ERROR, "file version too new\n"); return -1; } - rnd_message(PCB_MSG_DEBUG, "Loading eagle board version %d.%d.%d\n", v1, v2, v3); + rnd_message(RND_MSG_DEBUG, "Loading eagle board version %d.%d.%d\n", v1, v2, v3); return 0; } @@ -1722,7 +1722,7 @@ st_init(&st); if (eagle_read_ver(GET_PROP_(&st, st.parser.root, "version")) < 0) { - rnd_message(PCB_MSG_ERROR, "Eagle XML version parse error\n"); + rnd_message(RND_MSG_ERROR, "Eagle XML version parse error\n"); goto err; } @@ -1755,7 +1755,7 @@ err:; st_uninit(&st); - rnd_message(PCB_MSG_ERROR, "Eagle XML parsing error.\n"); + rnd_message(RND_MSG_ERROR, "Eagle XML parsing error.\n"); return -1; } Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 30954) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 30955) @@ -150,7 +150,7 @@ d = pcb_get_value(val, NULL, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); + rnd_message(RND_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); return; } if (d > curr_val) Index: trunk/src_plugins/io_eagle/trparse_xml.c =================================================================== --- trunk/src_plugins/io_eagle/trparse_xml.c (revision 30954) +++ trunk/src_plugins/io_eagle/trparse_xml.c (revision 30955) @@ -47,7 +47,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open '%s'\n", fn); + rnd_message(RND_MSG_ERROR, "can't open '%s'\n", fn); return -1; } fclose(f); @@ -54,7 +54,7 @@ doc = xmlReadFile(efn, NULL, 0); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); + rnd_message(RND_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); free(efn); return -1; } @@ -62,7 +62,7 @@ root = xmlDocGetRootElement(doc); if (xmlStrcmp(root->name, (xmlChar *)"eagle") != 0) { - rnd_message(PCB_MSG_ERROR, "xml error: root is not \n"); + rnd_message(RND_MSG_ERROR, "xml error: root is not \n"); xmlFreeDoc(doc); return -1; } Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 30954) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 30955) @@ -104,7 +104,7 @@ #endif if (debug > 0) - rnd_message(PCB_MSG_INFO, "Importing Hyperlynx file '%s', debug level %d\n", fname, debug); + rnd_message(RND_MSG_INFO, "Importing Hyperlynx file '%s', debug level %d\n", fname, debug); pcb_hid_busy(PCB, 1); retval = hyp_parse(PCB->Data, fname, debug); Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 30954) +++ trunk/src_plugins/io_hyp/parser.c (revision 30955) @@ -356,12 +356,12 @@ /* print error message */ void hyp_error(const char *msg) { - enum pcb_message_level level; + rnd_message_level_t level; if (strstr(msg, "warning")) - level = PCB_MSG_WARNING; + level = RND_MSG_WARNING; else - level = PCB_MSG_ERROR; + level = RND_MSG_ERROR; rnd_message(level, "line %d: %s at '%s'\n", hyylineno, msg, hyytext); } @@ -397,7 +397,7 @@ char conn[MAX_STRING]; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "netlist net: '%s' device: '%s' pin: '%s'\n", net_name, device_name, pin_name); + rnd_message(RND_MSG_DEBUG, "netlist net: '%s' device: '%s' pin: '%s'\n", net_name, device_name, pin_name); if ((net_name != NULL) && (device_name != NULL) && (pin_name != NULL)) { pcb_snprintf(conn, sizeof(conn), "%s-%s", device_name, pin_name); @@ -444,7 +444,7 @@ dev = hyp_device_by_name(refdes); if (dev == NULL) { /* no device with this name exists, and no such device has been listed in a DEVICE record. Let's create the device anyhow so we can continue. Assume device is on component side. */ - rnd_message(PCB_MSG_WARNING, "device \"%s\" not specified in DEVICE record. Assuming device is on component side.\n", refdes); + rnd_message(RND_MSG_WARNING, "device \"%s\" not specified in DEVICE record. Assuming device is on component side.\n", refdes); dev = calloc(sizeof(device_t), 1); dev->next = device_head; @@ -459,7 +459,7 @@ /* create */ if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "creating device \"%s\".\n", dev->ref); + rnd_message(RND_MSG_DEBUG, "creating device \"%s\".\n", dev->ref); subc = pcb_subc_alloc(); pcb_subc_create_aux(subc, x, y, 0.0, on_bottom); @@ -502,12 +502,12 @@ /* get outline layer */ outline_id = pcb_layer_by_name(PCB->Data, "outline"); if (outline_id < 0) { - rnd_message(PCB_MSG_ERROR, "no outline layer.\n"); + rnd_message(RND_MSG_ERROR, "no outline layer.\n"); return; } outline_layer = pcb_get_layer(PCB->Data, outline_id); if (outline_layer == NULL) { - rnd_message(PCB_MSG_ERROR, "get outline layer failed.\n"); + rnd_message(RND_MSG_ERROR, "get outline layer failed.\n"); return; } @@ -517,10 +517,10 @@ /* debugging */ if (hyp_debug) { if (forward) - rnd_message(PCB_MSG_DEBUG, "outline: fwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x1, s->y1, + rnd_message(RND_MSG_DEBUG, "outline: fwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x1, s->y1, s->x2, s->y2); else - rnd_message(PCB_MSG_DEBUG, "outline: bwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x2, s->y2, s->x1, s->y1); /* add segment back to front */ + rnd_message(RND_MSG_DEBUG, "outline: bwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x2, s->y2, s->x1, s->y1); /* add segment back to front */ } if (s->is_arc) { @@ -721,10 +721,10 @@ #undef XXX #ifdef XXX - rnd_message(PCB_MSG_DEBUG, "perimeter: last_x = %ml last_y = %ml\n", last_x, last_y); + rnd_message(RND_MSG_DEBUG, "perimeter: last_x = %ml last_y = %ml\n", last_x, last_y); for (i = outline_head; i != NULL; i = i->next) if (!i->used) - rnd_message(PCB_MSG_DEBUG, "perimeter segments available: %s from (%ml, %ml) to (%ml, %ml)\n", + rnd_message(RND_MSG_DEBUG, "perimeter segments available: %s from (%ml, %ml) to (%ml, %ml)\n", i->is_arc ? "arc " : "line", i->x1, i->y1, i->x2, i->y2); #endif @@ -765,11 +765,11 @@ } if (polygon_closed) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "outline: closed\n"); + rnd_message(RND_MSG_DEBUG, "outline: closed\n"); } else { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "outline: open\n"); + rnd_message(RND_MSG_DEBUG, "outline: open\n"); warn_not_closed = pcb_true; } } @@ -782,7 +782,7 @@ outline_head = outline_tail = NULL; if (warn_not_closed) - rnd_message(PCB_MSG_WARNING, "warning: board outline not closed\n"); + rnd_message(RND_MSG_WARNING, "warning: board outline not closed\n"); return; } @@ -809,25 +809,25 @@ if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_TOP, &gid, 1) == 1) id = pcb_layer_create(PCB, gid, "top silk", 0); if (id < 0) - rnd_message(PCB_MSG_ERROR, "failed to create top silk\n"); + rnd_message(RND_MSG_ERROR, "failed to create top silk\n"); id = -1; if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_BOTTOM, &gid, 1) == 1) id = pcb_layer_create(PCB, gid, "bottom silk", 0); if (id < 0) - rnd_message(PCB_MSG_ERROR, "failed to create bottom silk\n"); + rnd_message(RND_MSG_ERROR, "failed to create bottom silk\n"); top_layer_id = -1; if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_TOP, &gid, 1) == 1) top_layer_id = pcb_layer_create(PCB, gid, "", 0); if (top_layer_id < 0) - rnd_message(PCB_MSG_ERROR, "failed to create top copper\n"); + rnd_message(RND_MSG_ERROR, "failed to create top copper\n"); bottom_layer_id = -1; if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, &gid, 1) == 1) bottom_layer_id = pcb_layer_create(PCB, gid, "", 0); if (bottom_layer_id < 0) - rnd_message(PCB_MSG_ERROR, "failed to create bottom copper\n"); + rnd_message(RND_MSG_ERROR, "failed to create bottom copper\n"); /* create outline layer */ @@ -838,7 +838,7 @@ pcb_layergrp_fix_turn_to_outline(grp); } if (id < 0) - rnd_message(PCB_MSG_ERROR, "failed to create outline\n"); + rnd_message(RND_MSG_ERROR, "failed to create outline\n"); pcb_layergrp_inhibit_dec(); @@ -905,7 +905,7 @@ if (layer_id < 0) { /* layer creation failed. return old bottom layer. */ if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "running out of layers\n"); + rnd_message(RND_MSG_DEBUG, "running out of layers\n"); return bottom_layer_id; } @@ -1026,7 +1026,7 @@ while (arc_error > arc_precision); } else if (arc_precision < 0) - rnd_message(PCB_MSG_ERROR, "error: negative arc precision\n"); + rnd_message(RND_MSG_ERROR, "error: negative arc precision\n"); /* A full circle is drawn using 'segments' segments; a 90 degree arc using segments/4. */ poly_points = rnd_round(segments * fabs(beta - alpha) / (2 * M_PI)); @@ -1066,15 +1066,15 @@ /* loop over all created polygons and draw them */ for (i = polygon_head; i != NULL; i = i->next) { - rnd_message(PCB_MSG_DEBUG, "%s id=%i.\n", (i->is_polygon ? "polygon" : "polyline"), i->hyp_poly_id); + rnd_message(RND_MSG_DEBUG, "%s id=%i.\n", (i->is_polygon ? "polygon" : "polyline"), i->hyp_poly_id); for (v = i->vertex; v != NULL; v = v->next) { if (v->is_first) - rnd_message(PCB_MSG_DEBUG, " contour\n"); + rnd_message(RND_MSG_DEBUG, " contour\n"); if (v->is_arc) - rnd_message(PCB_MSG_DEBUG, " arc x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", v->x1, v->y1, + rnd_message(RND_MSG_DEBUG, " arc x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", v->x1, v->y1, v->x2, v->y2, v->xc, v->yc, v->r); else - rnd_message(PCB_MSG_DEBUG, " line x1 = %ml y1 = %ml\n", v->x1, v->y1); + rnd_message(RND_MSG_DEBUG, " line x1 = %ml y1 = %ml\n", v->x1, v->y1); } } } @@ -1094,7 +1094,7 @@ return; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw polyline: drawing poly id=%i.\n", polyline->hyp_poly_id); + rnd_message(RND_MSG_DEBUG, "draw polyline: drawing poly id=%i.\n", polyline->hyp_poly_id); layer = pcb_get_layer(PCB->Data, hyp_create_layer(polyline->layer_name)); @@ -1150,7 +1150,7 @@ return; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw polygon: drawing poly id=%i.\n", polygon->hyp_poly_id); + rnd_message(RND_MSG_DEBUG, "draw polygon: drawing poly id=%i.\n", polygon->hyp_poly_id); layer = pcb_get_layer(PCB->Data, hyp_create_layer(polygon->layer_name)); @@ -1167,7 +1167,7 @@ /* check contour valid */ if (pcb_polyarea_contour_check(contour) && hyp_debug) - rnd_message(PCB_MSG_WARNING, "draw polygon: bad contour? continuing.\n"); + rnd_message(RND_MSG_WARNING, "draw polygon: bad contour? continuing.\n"); /* set orientation for outer contour, negative for holes */ if (contour->Flags.orient != (outer_contour ? PCB_PLF_DIR : PCB_PLF_INV)) @@ -1198,7 +1198,7 @@ if (pcb_poly_valid(polyarea)) pcb_poly_to_polygons_on_layer(hyp_dest, layer, polyarea, pcb_no_flags()); else if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw polygon: self-intersecting polygon id=%i dropped.\n", polygon->hyp_poly_id); + rnd_message(RND_MSG_DEBUG, "draw polygon: self-intersecting polygon id=%i dropped.\n", polygon->hyp_poly_id); return; } @@ -1230,7 +1230,7 @@ for (l = 0; l < layer_count; l++) { pcb_layer_id_t layer_id = layer_array[l]; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw polygons: layer %lx \"%s\"\n", layer_id, pcb_layer_name(PCB->Data, layer_id)); + rnd_message(RND_MSG_DEBUG, "draw polygons: layer %lx \"%s\"\n", layer_id, pcb_layer_name(PCB->Data, layer_id)); /* loop over all polygons of the layer and draw them */ for (i = polygon_head; i != NULL; i = i->next) { @@ -1291,7 +1291,7 @@ rnd_bool exec_board_file(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "board:\n"); + rnd_message(RND_MSG_DEBUG, "board:\n"); return 0; } @@ -1304,10 +1304,10 @@ rnd_bool exec_version(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "version: vers = %f\n", h->vers); + rnd_message(RND_MSG_DEBUG, "version: vers = %f\n", h->vers); if (h->vers < 1.0) - rnd_message(PCB_MSG_DEBUG, "info: version 1.x deprecated\n"); + rnd_message(RND_MSG_DEBUG, "info: version 1.x deprecated\n"); return 0; } @@ -1321,7 +1321,7 @@ rnd_bool exec_data_mode(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "data_mode: detailed = %i\n", h->detailed); + rnd_message(RND_MSG_DEBUG, "data_mode: detailed = %i\n", h->detailed); return 0; } @@ -1334,7 +1334,7 @@ rnd_bool exec_units(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "units: unit_system_english = %d metal_thickness_weight = %d\n", h->unit_system_english, + rnd_message(RND_MSG_DEBUG, "units: unit_system_english = %d metal_thickness_weight = %d\n", h->unit_system_english, h->metal_thickness_weight); /* convert everything to meter */ @@ -1355,7 +1355,7 @@ } if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit); + rnd_message(RND_MSG_DEBUG, "units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit); return 0; } @@ -1370,7 +1370,7 @@ board_clearance = xy2coord(h->default_plane_separation); if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "plane_sep: default_plane_separation = %ml\n", board_clearance); + rnd_message(RND_MSG_DEBUG, "plane_sep: default_plane_separation = %ml\n", board_clearance); return 0; } @@ -1399,7 +1399,7 @@ peri_seg->next = NULL; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "perimeter_segment: x1 = %ml y1 = %ml x2 = %ml y2 = %ml\n", peri_seg->x1, peri_seg->y1, + rnd_message(RND_MSG_DEBUG, "perimeter_segment: x1 = %ml y1 = %ml x2 = %ml y2 = %ml\n", peri_seg->x1, peri_seg->y1, peri_seg->x2, peri_seg->y2); /* append at end of doubly linked list */ @@ -1445,7 +1445,7 @@ peri_arc->next = NULL; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "perimeter_arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", peri_arc->x1, + rnd_message(RND_MSG_DEBUG, "perimeter_arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", peri_arc->x1, peri_arc->y1, peri_arc->x2, peri_arc->y2, peri_arc->xc, peri_arc->yc, peri_arc->r); /* append at end of doubly linked list */ @@ -1472,7 +1472,7 @@ rnd_bool exec_board_attribute(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "board_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(RND_MSG_DEBUG, "board_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); return 0; } @@ -1489,28 +1489,28 @@ { if (hyp_debug) { if (h->thickness_set) - rnd_message(PCB_MSG_DEBUG, " thickness = %ml", z2coord(h->thickness)); + rnd_message(RND_MSG_DEBUG, " thickness = %ml", z2coord(h->thickness)); if (h->plating_thickness_set) - rnd_message(PCB_MSG_DEBUG, " plating_thickness = %ml", z2coord(h->plating_thickness)); + rnd_message(RND_MSG_DEBUG, " plating_thickness = %ml", z2coord(h->plating_thickness)); if (h->bulk_resistivity_set) - rnd_message(PCB_MSG_DEBUG, " bulk_resistivity = %f", h->bulk_resistivity); + rnd_message(RND_MSG_DEBUG, " bulk_resistivity = %f", h->bulk_resistivity); if (h->temperature_coefficient_set) - rnd_message(PCB_MSG_DEBUG, " temperature_coefficient = %f", h->temperature_coefficient); + rnd_message(RND_MSG_DEBUG, " temperature_coefficient = %f", h->temperature_coefficient); if (h->epsilon_r_set) - rnd_message(PCB_MSG_DEBUG, " epsilon_r = %f", h->epsilon_r); + rnd_message(RND_MSG_DEBUG, " epsilon_r = %f", h->epsilon_r); if (h->loss_tangent_set) - rnd_message(PCB_MSG_DEBUG, " loss_tangent = %f", h->loss_tangent); + rnd_message(RND_MSG_DEBUG, " loss_tangent = %f", h->loss_tangent); if (h->conformal_set) - rnd_message(PCB_MSG_DEBUG, " conformal = %i", h->conformal); + rnd_message(RND_MSG_DEBUG, " conformal = %i", h->conformal); if (h->prepreg_set) - rnd_message(PCB_MSG_DEBUG, " prepreg = %i", h->prepreg); + rnd_message(RND_MSG_DEBUG, " prepreg = %i", h->prepreg); if (h->layer_name_set) - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->material_name_set) - rnd_message(PCB_MSG_DEBUG, " material_name = \"%s\"", h->material_name); + rnd_message(RND_MSG_DEBUG, " material_name = \"%s\"", h->material_name); if (h->plane_separation_set) - rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); + rnd_message(RND_MSG_DEBUG, "\n"); } return; @@ -1525,7 +1525,7 @@ { /* Use dielectric for metal? */ if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "options: use_die_for_metal = %f\n", h->use_die_for_metal); + rnd_message(RND_MSG_DEBUG, "options: use_die_for_metal = %f\n", h->use_die_for_metal); if (h->use_die_for_metal) use_die_for_metal = pcb_true; return 0; @@ -1541,7 +1541,7 @@ pcb_layer_id_t signal_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) - rnd_message(PCB_MSG_WARNING, "duplicate SIGNAL layer name \"%s\"\n", h->layer_name); + rnd_message(RND_MSG_WARNING, "duplicate SIGNAL layer name \"%s\"\n", h->layer_name); signal_layer_id = hyp_create_layer(h->layer_name); @@ -1550,7 +1550,7 @@ layer_clearance[signal_layer_id] = xy2coord(h->plane_separation); if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "signal layer: \"%s\"", pcb_layer_name(PCB->Data, signal_layer_id)); + rnd_message(RND_MSG_DEBUG, "signal layer: \"%s\"", pcb_layer_name(PCB->Data, signal_layer_id)); hyp_debug_layer(h); return 0; @@ -1564,7 +1564,7 @@ rnd_bool exec_dielectric(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "dielectric layer: "); + rnd_message(RND_MSG_DEBUG, "dielectric layer: "); hyp_debug_layer(h); return 0; @@ -1580,7 +1580,7 @@ pcb_layer_id_t plane_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) - rnd_message(PCB_MSG_WARNING, "duplicate PLANE layer name \"%s\"\n", h->layer_name); + rnd_message(RND_MSG_WARNING, "duplicate PLANE layer name \"%s\"\n", h->layer_name); plane_layer_id = hyp_create_layer(h->layer_name); @@ -1591,7 +1591,7 @@ /* XXX need to flood layer with copper */ if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "plane layer: \"%s\"", pcb_layer_name(PCB->Data, plane_layer_id)); + rnd_message(RND_MSG_DEBUG, "plane layer: \"%s\"", pcb_layer_name(PCB->Data, plane_layer_id)); hyp_debug_layer(h); return 0; @@ -1604,18 +1604,18 @@ char value[128]; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref); + rnd_message(RND_MSG_DEBUG, "device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref); if (h->name_set) - rnd_message(PCB_MSG_DEBUG, " name = \"%s\"", h->name); + rnd_message(RND_MSG_DEBUG, " name = \"%s\"", h->name); if (h->value_float_set) - rnd_message(PCB_MSG_DEBUG, " value_float = %f", h->value_float); + rnd_message(RND_MSG_DEBUG, " value_float = %f", h->value_float); if (h->value_string_set) - rnd_message(PCB_MSG_DEBUG, " value_string = \"%s\"", h->value_string); + rnd_message(RND_MSG_DEBUG, " value_string = \"%s\"", h->value_string); if (h->layer_name_set) - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->package_set) - rnd_message(PCB_MSG_DEBUG, " package = \"%s\"", h->package); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " package = \"%s\"", h->package); + rnd_message(RND_MSG_DEBUG, "\n"); } /* add device to list */ @@ -1655,7 +1655,7 @@ rnd_bool exec_supplies(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "supplies: name = \"%s\" value_float = %f voltage_specified = %i conversion = %i\n", h->name, + rnd_message(RND_MSG_DEBUG, "supplies: name = \"%s\" value_float = %f voltage_specified = %i conversion = %i\n", h->name, h->value_float, h->voltage_specified, h->conversion); return 0; @@ -1674,55 +1674,55 @@ */ if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "padstack_element:"); + rnd_message(RND_MSG_DEBUG, "padstack_element:"); if (h->padstack_name_set) - rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(RND_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); if (h->drill_size_set) - rnd_message(PCB_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); - rnd_message(PCB_MSG_DEBUG, " pad_shape = %f", h->pad_shape); + rnd_message(RND_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " pad_shape = %f", h->pad_shape); if (h->pad_shape == 0) - rnd_message(PCB_MSG_DEBUG, " oval"); + rnd_message(RND_MSG_DEBUG, " oval"); else if (h->pad_shape == 1) - rnd_message(PCB_MSG_DEBUG, " rectangular"); + rnd_message(RND_MSG_DEBUG, " rectangular"); else if (h->pad_shape == 2) - rnd_message(PCB_MSG_DEBUG, " oblong"); + rnd_message(RND_MSG_DEBUG, " oblong"); else - rnd_message(PCB_MSG_DEBUG, " ?"); - rnd_message(PCB_MSG_DEBUG, " pad_sx = %ml", xy2coord(h->pad_sx)); - rnd_message(PCB_MSG_DEBUG, " pad_sy = %ml", xy2coord(h->pad_sy)); - rnd_message(PCB_MSG_DEBUG, " pad_angle = %f", h->pad_angle); + rnd_message(RND_MSG_DEBUG, " ?"); + rnd_message(RND_MSG_DEBUG, " pad_sx = %ml", xy2coord(h->pad_sx)); + rnd_message(RND_MSG_DEBUG, " pad_sy = %ml", xy2coord(h->pad_sy)); + rnd_message(RND_MSG_DEBUG, " pad_angle = %f", h->pad_angle); if (h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) { - rnd_message(PCB_MSG_DEBUG, " thermal_clear_shape = %f", h->thermal_clear_shape); + rnd_message(RND_MSG_DEBUG, " thermal_clear_shape = %f", h->thermal_clear_shape); if (h->thermal_clear_shape == 0) - rnd_message(PCB_MSG_DEBUG, " oval"); + rnd_message(RND_MSG_DEBUG, " oval"); else if (h->thermal_clear_shape == 1) - rnd_message(PCB_MSG_DEBUG, " rectangular"); + rnd_message(RND_MSG_DEBUG, " rectangular"); else if (h->thermal_clear_shape == 2) - rnd_message(PCB_MSG_DEBUG, " oblong"); + rnd_message(RND_MSG_DEBUG, " oblong"); else - rnd_message(PCB_MSG_DEBUG, " ?"); - rnd_message(PCB_MSG_DEBUG, " thermal_clear_sx = %ml", xy2coord(h->thermal_clear_sx)); - rnd_message(PCB_MSG_DEBUG, " thermal_clear_sy = %ml", xy2coord(h->thermal_clear_sy)); - rnd_message(PCB_MSG_DEBUG, " thermal_clear_angle = %f", h->thermal_clear_angle); + rnd_message(RND_MSG_DEBUG, " ?"); + rnd_message(RND_MSG_DEBUG, " thermal_clear_sx = %ml", xy2coord(h->thermal_clear_sx)); + rnd_message(RND_MSG_DEBUG, " thermal_clear_sy = %ml", xy2coord(h->thermal_clear_sy)); + rnd_message(RND_MSG_DEBUG, " thermal_clear_angle = %f", h->thermal_clear_angle); } if (h->pad_type_set) { - rnd_message(PCB_MSG_DEBUG, " pad_type = "); + rnd_message(RND_MSG_DEBUG, " pad_type = "); switch (h->pad_type) { case PAD_TYPE_METAL: - rnd_message(PCB_MSG_DEBUG, "metal"); + rnd_message(RND_MSG_DEBUG, "metal"); break; case PAD_TYPE_ANTIPAD: - rnd_message(PCB_MSG_DEBUG, "antipad"); + rnd_message(RND_MSG_DEBUG, "antipad"); break; case PAD_TYPE_THERMAL_RELIEF: - rnd_message(PCB_MSG_DEBUG, "thermal_relief"); + rnd_message(RND_MSG_DEBUG, "thermal_relief"); break; default: - rnd_message(PCB_MSG_DEBUG, "error"); + rnd_message(RND_MSG_DEBUG, "error"); } } - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, "\n"); } if (h->padstack_name_set) { @@ -1766,7 +1766,7 @@ rnd_bool exec_pstk_end(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "padstack_end\n"); + rnd_message(RND_MSG_DEBUG, "padstack_end\n"); /* add current padstack to list of padstacks */ if (current_pstk != NULL) { @@ -1824,7 +1824,7 @@ continue; if (i->pad_angle != 0) - rnd_message(PCB_MSG_ERROR, "ignoring pad rotation of padstack at %$mm;%$mm.\n", x, y); + rnd_message(RND_MSG_ERROR, "ignoring pad rotation of padstack at %$mm;%$mm.\n", x, y); mdef = strcmp(i->layer_name, "MDEF") == 0; top_or_bottom = 0; @@ -1855,7 +1855,7 @@ ps = pcb_pstk_new_from_shape(data, x, y, padstk->drill_size, 1, 0, sh); if (ps == NULL) - rnd_message(PCB_MSG_ERROR, "Failed to convert padstack at %$mm;%$mm.\n", x, y); + rnd_message(RND_MSG_ERROR, "Failed to convert padstack at %$mm;%$mm.\n", x, y); return ps; } @@ -1880,7 +1880,7 @@ if (padstk == NULL) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw padstack: padstack not found.\n"); + rnd_message(RND_MSG_DEBUG, "draw padstack: padstack not found.\n"); return; } @@ -1921,7 +1921,7 @@ number = pin_name; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "draw padstack: device_name = \"%s\" pin_name = \"%s\"\n", name, number); + rnd_message(RND_MSG_DEBUG, "draw padstack: device_name = \"%s\" pin_name = \"%s\"\n", name, number); pstk = hyp_new_pstk(padstk, data, x, y, (subc != NULL), (subc != NULL)); if (pin_name != NULL) @@ -1941,7 +1941,7 @@ rnd_bool exec_net(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "net: net_name = \"%s\"\n", h->net_name); + rnd_message(RND_MSG_DEBUG, "net: net_name = \"%s\"\n", h->net_name); net_name = rnd_strdup(h->net_name); net_clearance = -1; @@ -1956,7 +1956,7 @@ rnd_bool exec_net_plane_separation(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation)); + rnd_message(RND_MSG_DEBUG, "net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation)); net_clearance = xy2coord(h->plane_separation); @@ -1970,7 +1970,7 @@ rnd_bool exec_net_attribute(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(RND_MSG_DEBUG, "net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); return 0; } @@ -1982,14 +1982,14 @@ rnd_bool exec_seg(parse_param * h) { if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), + rnd_message(RND_MSG_DEBUG, "seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2)); - rnd_message(PCB_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); + rnd_message(RND_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); if (h->plane_separation_set) - rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml ", xy2coord(h->plane_separation)); + rnd_message(RND_MSG_DEBUG, " plane_separation = %ml ", xy2coord(h->plane_separation)); if (h->left_plane_separation_set) - rnd_message(PCB_MSG_DEBUG, " left_plane_separation = %ml ", xy2coord(h->left_plane_separation)); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " left_plane_separation = %ml ", xy2coord(h->left_plane_separation)); + rnd_message(RND_MSG_DEBUG, "\n"); } pcb_line_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), xy2coord(h->width), @@ -2006,15 +2006,15 @@ { if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), + rnd_message(RND_MSG_DEBUG, "arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2)); - rnd_message(PCB_MSG_DEBUG, " xc = %ml yc = %ml r = %ml", x2coord(h->xc), y2coord(h->yc), xy2coord(h->r)); - rnd_message(PCB_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); + rnd_message(RND_MSG_DEBUG, " xc = %ml yc = %ml r = %ml", x2coord(h->xc), y2coord(h->yc), xy2coord(h->r)); + rnd_message(RND_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); if (h->plane_separation_set) - rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); + rnd_message(RND_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); if (h->left_plane_separation_set) - rnd_message(PCB_MSG_DEBUG, " left_plane_separation = %ml", xy2coord(h->left_plane_separation)); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " left_plane_separation = %ml", xy2coord(h->left_plane_separation)); + rnd_message(RND_MSG_DEBUG, "\n"); } hyp_arc_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), @@ -2053,15 +2053,15 @@ return exec_via_v1(h); if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, "via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->padstack_name_set) - rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(RND_MSG_DEBUG, "\n"); } if (!h->padstack_name_set) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); + rnd_message(RND_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); return 0; } @@ -2082,38 +2082,38 @@ padstack_element_t *pad2; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, "old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->drill_size_set) - rnd_message(PCB_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); + rnd_message(RND_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); if (h->layer1_name_set) - rnd_message(PCB_MSG_DEBUG, " layer1_name = \"%s\"", h->layer1_name); + rnd_message(RND_MSG_DEBUG, " layer1_name = \"%s\"", h->layer1_name); if (h->layer2_name_set) - rnd_message(PCB_MSG_DEBUG, " layer2_name = \"%s\"", h->layer2_name); + rnd_message(RND_MSG_DEBUG, " layer2_name = \"%s\"", h->layer2_name); if (h->via_pad_shape_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); + rnd_message(RND_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); if (h->via_pad_sx_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); + rnd_message(RND_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); if (h->via_pad_sy_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); + rnd_message(RND_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); if (h->via_pad_angle_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); + rnd_message(RND_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); if (h->via_pad1_shape_set) - rnd_message(PCB_MSG_DEBUG, " via_pad1_shape = \"%s\"", h->via_pad1_shape); + rnd_message(RND_MSG_DEBUG, " via_pad1_shape = \"%s\"", h->via_pad1_shape); if (h->via_pad1_sx_set) - rnd_message(PCB_MSG_DEBUG, " via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx)); + rnd_message(RND_MSG_DEBUG, " via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx)); if (h->via_pad1_sy_set) - rnd_message(PCB_MSG_DEBUG, " via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy)); + rnd_message(RND_MSG_DEBUG, " via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy)); if (h->via_pad1_angle_set) - rnd_message(PCB_MSG_DEBUG, " via_pad1_angle = \"%f\"", h->via_pad1_angle); + rnd_message(RND_MSG_DEBUG, " via_pad1_angle = \"%f\"", h->via_pad1_angle); if (h->via_pad2_shape_set) - rnd_message(PCB_MSG_DEBUG, " via_pad2_shape = \"%s\"", h->via_pad2_shape); + rnd_message(RND_MSG_DEBUG, " via_pad2_shape = \"%s\"", h->via_pad2_shape); if (h->via_pad2_sx_set) - rnd_message(PCB_MSG_DEBUG, " via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx)); + rnd_message(RND_MSG_DEBUG, " via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx)); if (h->via_pad2_sy_set) - rnd_message(PCB_MSG_DEBUG, " via_pad2_sy = \"%ml\"", xy2coord(h->via_pad2_sy)); + rnd_message(RND_MSG_DEBUG, " via_pad2_sy = \"%ml\"", xy2coord(h->via_pad2_sy)); if (h->via_pad2_angle_set) - rnd_message(PCB_MSG_DEBUG, " via_pad2_angle = \"%f\"", h->via_pad2_angle); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " via_pad2_angle = \"%f\"", h->via_pad2_angle); + rnd_message(RND_MSG_DEBUG, "\n"); } /* create padstack for this via */ @@ -2177,18 +2177,18 @@ rnd_bool exec_pin(parse_param * h) { if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "pin: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); - rnd_message(PCB_MSG_DEBUG, " pin_reference = \"%s\"", h->pin_reference); + rnd_message(RND_MSG_DEBUG, "pin: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, " pin_reference = \"%s\"", h->pin_reference); if (h->padstack_name_set) - rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(RND_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); if (h->pin_function_set) - rnd_message(PCB_MSG_DEBUG, " pin_function = %i", h->pin_function); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " pin_function = %i", h->pin_function); + rnd_message(RND_MSG_DEBUG, "\n"); } if (!h->padstack_name_set) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); + rnd_message(RND_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); return 0; } @@ -2208,23 +2208,23 @@ padstack_element_t *pad; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, "pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->layer_name_set) - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->via_pad_shape_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); + rnd_message(RND_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); if (h->via_pad_sx_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); + rnd_message(RND_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); if (h->via_pad_sy_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); + rnd_message(RND_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); if (h->via_pad_angle_set) - rnd_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); + rnd_message(RND_MSG_DEBUG, "\n"); } if (!h->layer_name_set) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "pad: layer name not set. skipping pad\n."); + rnd_message(RND_MSG_DEBUG, "pad: layer name not set. skipping pad\n."); return 0; } @@ -2272,16 +2272,16 @@ pcb_layergrp_id_t layer1_grp_id, layer2_grp_id; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name); - rnd_message(PCB_MSG_DEBUG, " x2 = %ml y2 = %ml layer2_name = \"%s\"", x2coord(h->x2), y2coord(h->y2), h->layer2_name); + rnd_message(RND_MSG_DEBUG, "useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name); + rnd_message(RND_MSG_DEBUG, " x2 = %ml y2 = %ml layer2_name = \"%s\"", x2coord(h->x2), y2coord(h->y2), h->layer2_name); if (h->zlayer_name_set) - rnd_message(PCB_MSG_DEBUG, " zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), + rnd_message(RND_MSG_DEBUG, " zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), xy2coord(h->length)); if (h->impedance_set) - rnd_message(PCB_MSG_DEBUG, " impedance = %f delay = %f ", h->impedance, h->delay); + rnd_message(RND_MSG_DEBUG, " impedance = %f delay = %f ", h->impedance, h->delay); if (h->resistance_set) - rnd_message(PCB_MSG_DEBUG, " resistance = %f ", h->resistance); - rnd_message(PCB_MSG_DEBUG, "\n"); + rnd_message(RND_MSG_DEBUG, " resistance = %f ", h->resistance); + rnd_message(RND_MSG_DEBUG, "\n"); } /* lookup layer group begin and end layer are on */ @@ -2290,7 +2290,7 @@ if ((layer1_grp_id == -1) || (layer2_grp_id == -1)) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "useg: skipping unrouted segment\n"); + rnd_message(RND_MSG_DEBUG, "useg: skipping unrouted segment\n"); return 0; } @@ -2312,31 +2312,31 @@ hyp_polygon_t *i; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "polygon begin:"); + rnd_message(RND_MSG_DEBUG, "polygon begin:"); if (h->layer_name_set) - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->width_set) - rnd_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); + rnd_message(RND_MSG_DEBUG, " width = %ml", xy2coord(h->width)); if (h->polygon_type_set) { - rnd_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); + rnd_message(RND_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); switch (h->polygon_type) { case POLYGON_TYPE_PLANE: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_PLANE"); break; case POLYGON_TYPE_POUR: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_POUR"); break; case POLYGON_TYPE_COPPER: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_COPPER"); break; default: - rnd_message(PCB_MSG_DEBUG, "Error"); + rnd_message(RND_MSG_DEBUG, "Error"); break; } } if (h->id_set) - rnd_message(PCB_MSG_DEBUG, " id = %i", h->id); - rnd_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, " id = %i", h->id); + rnd_message(RND_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); } if (!h->layer_name_set) { @@ -2356,7 +2356,7 @@ if (hyp_debug) for (i = polygon_head; i != NULL; i = i->next) if (h->id == i->hyp_poly_id) { - rnd_message(PCB_MSG_INFO, "info: duplicate polygon id %i.\n", h->id); + rnd_message(RND_MSG_INFO, "info: duplicate polygon id %i.\n", h->id); break; } @@ -2395,11 +2395,11 @@ rnd_bool exec_polygon_end(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "polygon end:\n"); + rnd_message(RND_MSG_DEBUG, "polygon end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - rnd_message(PCB_MSG_WARNING, "polygon: unexpected polygon end. continuing.\n"); + rnd_message(RND_MSG_WARNING, "polygon: unexpected polygon end. continuing.\n"); current_vertex = NULL; return 0; @@ -2416,10 +2416,10 @@ hyp_vertex_t *new_vertex; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "polyvoid begin:"); + rnd_message(RND_MSG_DEBUG, "polyvoid begin:"); if (h->id_set) - rnd_message(PCB_MSG_DEBUG, " id = %i", h->id); - rnd_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, " id = %i", h->id); + rnd_message(RND_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); } if (!h->id_set) { @@ -2434,7 +2434,7 @@ if (i == NULL) { current_vertex = NULL; - rnd_message(PCB_MSG_WARNING, "polyvoid: polygon id %i not found\n", h->id); + rnd_message(RND_MSG_WARNING, "polyvoid: polygon id %i not found\n", h->id); return 0; } @@ -2470,11 +2470,11 @@ rnd_bool exec_polyvoid_end(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "polyvoid end:\n"); + rnd_message(RND_MSG_DEBUG, "polyvoid end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - rnd_message(PCB_MSG_WARNING, "polyvoid: unexpected polyvoid end. continuing.\n"); + rnd_message(RND_MSG_WARNING, "polyvoid: unexpected polyvoid end. continuing.\n"); current_vertex = NULL; return 0; @@ -2491,31 +2491,31 @@ hyp_polygon_t *i; if (hyp_debug) { - rnd_message(PCB_MSG_DEBUG, "polyline begin:"); + rnd_message(RND_MSG_DEBUG, "polyline begin:"); if (h->layer_name_set) - rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(RND_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->width_set) - rnd_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); + rnd_message(RND_MSG_DEBUG, " width = %ml", xy2coord(h->width)); if (h->polygon_type_set) { - rnd_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); + rnd_message(RND_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); switch (h->polygon_type) { case POLYGON_TYPE_PLANE: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_PLANE"); break; case POLYGON_TYPE_POUR: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_POUR"); break; case POLYGON_TYPE_COPPER: - rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); + rnd_message(RND_MSG_DEBUG, "POLYGON_TYPE_COPPER"); break; default: - rnd_message(PCB_MSG_DEBUG, "Error"); + rnd_message(RND_MSG_DEBUG, "Error"); break; } } if (h->id_set) - rnd_message(PCB_MSG_DEBUG, " id = %i", h->id); - rnd_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, " id = %i", h->id); + rnd_message(RND_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); } if (!h->layer_name_set) { @@ -2540,7 +2540,7 @@ if (hyp_debug) for (i = polygon_head; i != NULL; i = i->next) if (h->id == i->hyp_poly_id) { - rnd_message(PCB_MSG_DEBUG, "info: duplicate polygon id %i.\n", h->id); + rnd_message(RND_MSG_DEBUG, "info: duplicate polygon id %i.\n", h->id); break; } @@ -2579,11 +2579,11 @@ rnd_bool exec_polyline_end(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "polyline end:\n"); + rnd_message(RND_MSG_DEBUG, "polyline end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - rnd_message(PCB_MSG_WARNING, "polyline: unexpected polyline end. continuing.\n"); + rnd_message(RND_MSG_WARNING, "polyline: unexpected polyline end. continuing.\n"); current_vertex = NULL; return 0; @@ -2598,10 +2598,10 @@ hyp_vertex_t *new_vertex; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + rnd_message(RND_MSG_DEBUG, "line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); if (current_vertex == NULL) { - rnd_message(PCB_MSG_DEBUG, "line: skipping."); + rnd_message(RND_MSG_DEBUG, "line: skipping."); return 0; } @@ -2635,11 +2635,11 @@ hyp_vertex_t *new_vertex; if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "curve: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", x2coord(h->x1), + rnd_message(RND_MSG_DEBUG, "curve: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), y2coord(h->yc), xy2coord(h->r)); if (current_vertex == NULL) { - rnd_message(PCB_MSG_DEBUG, "curve: skipping."); + rnd_message(RND_MSG_DEBUG, "curve: skipping."); return 0; } @@ -2670,7 +2670,7 @@ rnd_bool exec_net_class(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "net_class: net_class_name = \"%s\"\n", h->net_class_name); + rnd_message(RND_MSG_DEBUG, "net_class: net_class_name = \"%s\"\n", h->net_class_name); return 0; } @@ -2682,7 +2682,7 @@ rnd_bool exec_net_class_element(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "net_class_element: net_name = \"%s\"\n", h->net_name); + rnd_message(RND_MSG_DEBUG, "net_class_element: net_name = \"%s\"\n", h->net_name); return 0; } @@ -2695,7 +2695,7 @@ rnd_bool exec_net_class_attribute(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(RND_MSG_DEBUG, "netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); return 0; } @@ -2707,7 +2707,7 @@ rnd_bool exec_key(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "key: key = \"%s\"\n", h->key); + rnd_message(RND_MSG_DEBUG, "key: key = \"%s\"\n", h->key); return 0; } @@ -2719,7 +2719,7 @@ rnd_bool exec_end(parse_param * h) { if (hyp_debug) - rnd_message(PCB_MSG_DEBUG, "end:\n"); + rnd_message(RND_MSG_DEBUG, "end:\n"); return 0; } Index: trunk/src_plugins/io_hyp/write.c =================================================================== --- trunk/src_plugins/io_hyp/write.c (revision 30954) +++ trunk/src_plugins/io_hyp/write.c (revision 30955) @@ -231,7 +231,7 @@ htpi_set(&wr->pstk_cache, proto, id); } else - rnd_message(PCB_MSG_ERROR, "Internal error: unknown padstack prototype\n"); + rnd_message(RND_MSG_ERROR, "Internal error: unknown padstack prototype\n"); } sprintf(name, "proto_%ld", id); @@ -325,7 +325,7 @@ if (arc->Width != arc->Height) { if (!wr->warn.elliptic) { - rnd_message(PCB_MSG_WARNING, "Elliptic arcs are not supported - omitting all elliptic arcs\n"); + rnd_message(RND_MSG_WARNING, "Elliptic arcs are not supported - omitting all elliptic arcs\n"); wr->warn.elliptic = 1; } return; @@ -465,7 +465,7 @@ } if (cnt == 0) - rnd_message(PCB_MSG_WARNING, + rnd_message(RND_MSG_WARNING, "There is no element on the board - this limites the use of the resulting .hyp file, as it won't be able to connect to a simulation\n"); fprintf(wr->f, "}\n"); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30954) +++ trunk/src_plugins/io_kicad/read.c (revision 30955) @@ -148,7 +148,7 @@ gds_append(&str, '\n'); - rnd_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(RND_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -168,7 +168,7 @@ gds_append(&str, '\n'); - rnd_message(PCB_MSG_WARNING, "%s", str.array); + rnd_message(RND_MSG_WARNING, "%s", str.array); gds_uninit(&str); return 0; @@ -503,7 +503,7 @@ pcb_idx = kicad_get_layeridx(st, layer_name); lnm = layer_name; if (pcb_idx < 0) { - rnd_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", layer_name); + rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", layer_name); lyt = PCB_LYT_VIRTUAL; comb = 0; return pcb_subc_get_layer(subc, lyt, comb, 1, lnm, pcb_true); @@ -515,7 +515,7 @@ if (lid >= 0) return &subc->data->Layer[lid]; - rnd_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using module layer '%s' instead.\n", layer_name, default_layer_name); + rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using module layer '%s' instead.\n", layer_name, default_layer_name); pcb_idx = kicad_get_layeridx(st, default_layer_name); if (pcb_idx < 0) return NULL; @@ -1594,7 +1594,7 @@ case 3: (*th) |= PCB_THERMAL_ON | PCB_THERMAL_ROUND | PCB_THERMAL_DIAGONAL; break; } htpp_set(&poly_upd, p, p); - pcb_trace("CONN lid=%ld p=%p in %s style=%d\n", lid, p, pnet, zc->style); + rnd_trace("CONN lid=%ld p=%p in %s style=%d\n", lid, p, pnet, zc->style); } } } @@ -2777,7 +2777,7 @@ pcb_layer_auto_fixup(Ptr); if (pcb_board_normalize(Ptr) > 0) - rnd_message(PCB_MSG_WARNING, "Had to make changes to the coords so that the design fits the board.\n"); + rnd_message(RND_MSG_WARNING, "Had to make changes to the coords so that the design fits the board.\n"); pcb_layer_colors_from_conf(Ptr, 1); { /* free layer hack */ @@ -2822,13 +2822,13 @@ if (res != GSX_RES_EOE) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Error parsing s-expression '%s'\n", name); + rnd_message(RND_MSG_ERROR, "Error parsing s-expression '%s'\n", name); gsxl_uninit(&st.dom); return -1; } if ((st.dom.root->str == NULL) || (strcmp(st.dom.root->str, "module") != 0)) { - rnd_message(PCB_MSG_ERROR, "Wrong root node '%s', expected 'module'\n", st.dom.root->str); + rnd_message(RND_MSG_ERROR, "Wrong root node '%s', expected 'module'\n", st.dom.root->str); gsxl_uninit(&st.dom); return -1; } Index: trunk/src_plugins/io_kicad/read_net.c =================================================================== --- trunk/src_plugins/io_kicad/read_net.c (revision 30954) +++ trunk/src_plugins/io_kicad/read_net.c (revision 30955) @@ -49,7 +49,7 @@ #define if_strval(node, name) \ if (strcmp(node->str, #name) == 0) { \ if (name != NULL) { \ - rnd_message(PCB_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ + rnd_message(RND_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ return -1; \ } \ if (node->children != NULL) \ @@ -59,7 +59,7 @@ #define if_subtree(node, name) \ if (strcmp(node->str, #name) == 0) { \ if (name != NULL) { \ - rnd_message(PCB_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ + rnd_message(RND_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ return -1; \ } \ name = node; \ @@ -67,7 +67,7 @@ #define req_subtree(name) \ if (name == NULL) { \ - rnd_message(PCB_MSG_ERROR, "Invalid eeschema: missing %s subtree\n", #name); \ + rnd_message(RND_MSG_ERROR, "Invalid eeschema: missing %s subtree\n", #name); \ return -1; \ } \ @@ -78,7 +78,7 @@ /* check the header */ if (strcmp(dom->root->str, "export") != 0) { - rnd_message(PCB_MSG_ERROR, "Invalid eeschema netlist header: not an export\n"); + rnd_message(RND_MSG_ERROR, "Invalid eeschema netlist header: not an export\n"); return -1; } @@ -93,7 +93,7 @@ req_subtree(nets); if ((version->children == NULL) || (strcmp(version->children->str, "D") != 0)) { - rnd_message(PCB_MSG_ERROR, "Invalid eeschema version: expected 'D', got '%s'\n", version->children->str); + rnd_message(RND_MSG_ERROR, "Invalid eeschema version: expected 'D', got '%s'\n", version->children->str); return -1; } @@ -110,11 +110,11 @@ else if_strval(n, footprint) } if (ref == NULL) { - rnd_message(PCB_MSG_WARNING, "eeschema: ignoring component with no refdes\n"); + rnd_message(RND_MSG_WARNING, "eeschema: ignoring component with no refdes\n"); continue; } if (footprint == NULL) { - rnd_message(PCB_MSG_WARNING, "eeschema: ignoring component %s with no footprint\n", ref); + rnd_message(RND_MSG_WARNING, "eeschema: ignoring component %s with no footprint\n", ref); continue; } rnd_actionva(&PCB->hidlib, "ElementList", "Need", ref, footprint, value == NULL ? "" : value, NULL); @@ -154,13 +154,13 @@ netname = code; } if (netname == NULL) { - rnd_message(PCB_MSG_WARNING, "eeschema: ignoring pins of incomplete net\n"); + rnd_message(RND_MSG_WARNING, "eeschema: ignoring pins of incomplete net\n"); continue; } /* do the binding */ if ((ref == NULL) || (pin == NULL)) { - rnd_message(PCB_MSG_WARNING, "eeschema: ignoring incomplete connection to net %s: refdes=%s pin=%s \n", netname, ref, pin); + rnd_message(RND_MSG_WARNING, "eeschema: ignoring incomplete connection to net %s: refdes=%s pin=%s \n", netname, ref, pin); continue; } pcb_snprintf(refpin, sizeof(refpin), "%s-%s", ref, pin); @@ -186,7 +186,7 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -276,7 +276,7 @@ static int eeschema_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **fns, int numfns) { if (numfns != 1) { - rnd_message(PCB_MSG_ERROR, "import_eeschema: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_eeschema: requires exactly 1 input file name\n"); return -1; } return eeschema_load(fns[0]); Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 30954) +++ trunk/src_plugins/io_kicad/write.c (revision 30955) @@ -763,7 +763,7 @@ TODO(": why the heck do we hardwire timestamps?!!?!?!") fprintf(ctx->f, "%*s", ind, ""); -pcb_trace("copper layer=\n", copperLayer); +rnd_trace("copper layer=\n", copperLayer); pcb_fprintf(ctx->f, "(module %[4] (layer %s) (tedit 4E4C0E65) (tstamp 5127A136)\n", currentElementName, kicad_sexpr_layer_to_text(ctx, copperLayer)); fprintf(ctx->f, "%*s", ind + 2, ""); pcb_fprintf(ctx->f, "(at %.3mm %.3mm)\n", xPos, yPos); @@ -848,7 +848,7 @@ int io_kicad_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs) { if ((lib) || (num_subcs > 1)) { - rnd_message(PCB_MSG_ERROR, "Can't save a library and/or multiple modules (footprints) in a single s-experssion mod file\n"); + rnd_message(RND_MSG_ERROR, "Can't save a library and/or multiple modules (footprints) in a single s-experssion mod file\n"); return -1; } return 0; @@ -1000,7 +1000,7 @@ } } - rnd_message(PCB_MSG_ERROR, "io_kicad: internal error: can not find output outline layer for drawing the implicit outline\n"); + rnd_message(RND_MSG_ERROR, "io_kicad: internal error: can not find output outline layer for drawing the implicit outline\n"); } /* writes PCB to file in s-expression format */ Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 30954) +++ trunk/src_plugins/io_lihata/read.c (revision 30955) @@ -93,7 +93,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(RND_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -122,7 +122,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_WARNING, "%s", str.array); + rnd_message(RND_MSG_WARNING, "%s", str.array); gds_uninit(&str); } @@ -1000,7 +1000,7 @@ int grp_id; parse_int(&grp_id, hash_get(grp, "group", 0)); dt->Layer[layer_id].meta.real.grp = grp_id; - /* pcb_trace("parse_data_layer name: %d,%d '%s' grp=%d\n", layer_id, dt->LayerN-1, ly->name, grp_id);*/ + /* rnd_trace("parse_data_layer name: %d,%d '%s' grp=%d\n", layer_id, dt->LayerN-1, ly->name, grp_id);*/ } } @@ -1400,12 +1400,12 @@ pcb->Data->Layer[pcb->Data->LayerN-2].meta.real.grp = -1; pcb->Data->Layer[pcb->Data->LayerN-1].meta.real.grp = -1; -/* pcb_trace("NAME: '%s' '%s'\n", pcb->Data->Layer[pcb->Data->LayerN-1].Name,pcb->Data->Layer[pcb->Data->LayerN-2].Name);*/ +/* rnd_trace("NAME: '%s' '%s'\n", pcb->Data->Layer[pcb->Data->LayerN-1].Name,pcb->Data->Layer[pcb->Data->LayerN-2].Name);*/ for(n = 0; n < pcb->Data->LayerN - 2; n++) { pcb_layer_t *l = &pcb->Data->Layer[n]; pcb_layergrp_id_t grp = l->meta.real.grp; - /*pcb_trace("********* l=%d %s g=%ld (top=%ld bottom=%ld)\n", n, l->name, grp, top_silk, bottom_silk);*/ + /*rnd_trace("********* l=%d %s g=%ld (top=%ld bottom=%ld)\n", n, l->name, grp, top_silk, bottom_silk);*/ l->meta.real.grp = -1; if (grp == bottom_silk) @@ -1414,7 +1414,7 @@ g = pcb_get_grp(&pcb->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); else g = pcb_get_grp_new_intern(pcb, grp); -/* pcb_trace(" add %ld\n", g - pcb->LayerGroups.meta.real.grp);*/ +/* rnd_trace(" add %ld\n", g - pcb->LayerGroups.meta.real.grp);*/ if (g != NULL) { pcb_layer_add_in_group_(pcb, g, g - pcb->LayerGroups.grp, n); if (strcmp(l->name, "outline") == 0) @@ -1421,7 +1421,7 @@ pcb_layergrp_fix_turn_to_outline(g); } else - rnd_message(PCB_MSG_ERROR, "failed to create layer %s\n", l->name); + rnd_message(RND_MSG_ERROR, "failed to create layer %s\n", l->name); } pcb_layergrp_fix_old_outline(pcb); @@ -2218,7 +2218,7 @@ if (cfg_dest == RND_CFR_invalid) return; if (rnd_conf_insert_tree_as(cfg_dest, sub) != 0) - rnd_message(PCB_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); + rnd_message(RND_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); else rnd_conf_update(NULL, -1); } @@ -2354,7 +2354,7 @@ free(realfn); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); free(errmsg); return -1; } @@ -2402,7 +2402,7 @@ free(realfn); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", filename, errmsg); free(errmsg); return -1; } @@ -2499,7 +2499,7 @@ if (doc == NULL) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); free(errmsg); return -1; } @@ -2506,7 +2506,7 @@ if ((doc->root->type != LHT_LIST) || (strcmp(doc->root->name, "pcb-rnd-font-v1"))) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Not a font lihata.\n"); + rnd_message(RND_MSG_ERROR, "Not a font lihata.\n"); res = -1; } else @@ -2537,7 +2537,7 @@ if (doc == NULL) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", name, errmsg); + rnd_message(RND_MSG_ERROR, "Error loading '%s': %s\n", name, errmsg); free(errmsg); return -1; } @@ -2544,7 +2544,7 @@ if ((doc->root->type != LHT_LIST) || (strncmp(doc->root->name, "pcb-rnd-subcircuit-v", 20))) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "Not a subcircuit lihata.\n"); + rnd_message(RND_MSG_ERROR, "Not a subcircuit lihata.\n"); free(errmsg); lht_dom_uninit(doc); return -1; @@ -2555,7 +2555,7 @@ rdver = atoi(doc->root->name+20); if (rdver < 3) { if (!pcb_io_err_inhibit) - rnd_message(PCB_MSG_ERROR, "io_lihata: invalid subc file version: %s (expected 3 or higher)\n", doc->root->name+20); + rnd_message(RND_MSG_ERROR, "io_lihata: invalid subc file version: %s (expected 3 or higher)\n", doc->root->name+20); free(errmsg); lht_dom_uninit(doc); return -1; Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 30954) +++ trunk/src_plugins/io_lihata/write.c (revision 30955) @@ -264,18 +264,18 @@ if (wrver < 5) { if (rnd_attribute_get(&obj->Attributes, "intnoconn") != NULL) { warned = 1; - rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); + rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); } } if (wrver < 3) { if (rnd_attribute_get(&obj->Attributes, "intconn") != NULL) { warned = 1; - rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); + rnd_message(RND_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); } } if (warned) - rnd_message(PCB_MSG_WARNING, "^^^ in %s #%ld\n", pcb_obj_type_name(obj->type), obj->ID); + rnd_message(RND_MSG_WARNING, "^^^ in %s #%ld\n", pcb_obj_type_name(obj->type), obj->ID); } /* Write the thermal list of heavy terminals; put the resulting "thermal" @@ -809,7 +809,7 @@ nshapeo = build_text("ps_hshadow", ""); break; default: - rnd_message(PCB_MSG_ERROR, "Internal error: unimplemented pad stack shape %d\n", shape->shape); + rnd_message(RND_MSG_ERROR, "Internal error: unimplemented pad stack shape %d\n", shape->shape); abort(); } lht_dom_hash_put(nshape, nshapeo); @@ -954,10 +954,10 @@ lht_dom_hash_put(obj, dummy_node("purpose")); } else if (layer->meta.bound.purpose != NULL) - rnd_message(PCB_MSG_WARNING, "io_lihata: attempting to save bound layer with a purpose string - not supported in lihata board below v6. Layer binding might be broken after load.\n"); + rnd_message(RND_MSG_WARNING, "io_lihata: attempting to save bound layer with a purpose string - not supported in lihata board below v6. Layer binding might be broken after load.\n"); } else - rnd_message(PCB_MSG_WARNING, "io_lihata: attempting to save bound layers in lihata version lower than 3; feature not supported by the format.\n"); + rnd_message(RND_MSG_WARNING, "io_lihata: attempting to save bound layers in lihata version lower than 3; feature not supported by the format.\n"); } if (!layer->is_bound) @@ -1029,7 +1029,7 @@ if (gflg & PCB_LYT_BOTTOM) gbottom = gm; grp[n] = gm; -/* pcb_trace("build data layers: %d -> %ld {%ld %ld}\n", n, gm, gtop, gbottom); */ +/* rnd_trace("build data layers: %d -> %ld {%ld %ld}\n", n, gm, gtop, gbottom); */ gm++; } else @@ -1506,7 +1506,7 @@ brd = build_board(PCB); if (brd == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to build the board at that version - nothing is written\n"); + rnd_message(RND_MSG_ERROR, "Failed to build the board at that version - nothing is written\n"); return -1; } @@ -1575,8 +1575,8 @@ res = lht_dom_export(brd->root, fe, ""); fclose(fe); } - rnd_message(PCB_MSG_ERROR, "lhtpers_fsave_as() failed. Please include files %s and %s and %s in your bugreport\n", inf, old_filename, fe_name); - rnd_message(PCB_MSG_ERROR, "in case this broke your file %s, please use the emergency save %s instead.\n", old_filename, fe_name); + rnd_message(RND_MSG_ERROR, "lhtpers_fsave_as() failed. Please include files %s and %s and %s in your bugreport\n", inf, old_filename, fe_name); + rnd_message(RND_MSG_ERROR, "in case this broke your file %s, please use the emergency save %s instead.\n", old_filename, fe_name); } fflush(FP); if (inf != NULL) @@ -1626,7 +1626,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to open font file %s for write\n", Filename); + rnd_message(RND_MSG_ERROR, "Failed to open font file %s for write\n", Filename); return -1; } @@ -1674,7 +1674,7 @@ TODO("subc: for subc-in-subc this should be recursive") if (padstacklist_first(&sc->data->padstack) != NULL) { if (wrver < 4) { - rnd_message(PCB_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); + rnd_message(RND_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); wrver = 4; } } @@ -1686,7 +1686,7 @@ else if (wrver >= 6) doc->root = lht_dom_node_alloc(LHT_LIST, "pcb-rnd-subcircuit-v6"); else { - rnd_message(PCB_MSG_ERROR, "Invalid lihata subc version to write: %d\n", wrver); + rnd_message(RND_MSG_ERROR, "Invalid lihata subc version to write: %d\n", wrver); return -1; } @@ -1703,7 +1703,7 @@ int io_lihata_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs) { if ((lib) || (num_subcs != 1)) { - rnd_message(PCB_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); + rnd_message(RND_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); return -1; } return 0; Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30954) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30955) @@ -153,7 +153,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - rnd_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(RND_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -1408,7 +1408,7 @@ flay = pcb_fopen(&pcb->hidlib, fn, "r"); if (flay == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open layout hkp '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open layout hkp '%s' for read\n", fn); goto err; } Index: trunk/src_plugins/io_mentor_cell/read_net.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_net.c (revision 30954) +++ trunk/src_plugins/io_mentor_cell/read_net.c (revision 30955) @@ -60,7 +60,7 @@ fnc = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnc == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open netclass hkp '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open netclass hkp '%s' for read\n", fn); return -1; } @@ -91,7 +91,7 @@ if (ncrs == NULL) { tree_destroy(&nc_tree); - rnd_message(PCB_MSG_ERROR, "netclass hkp '%s' does not contain any NET_CLASS_SCHEME/CLEARANCE_RULE_SET section\n", fn); + rnd_message(RND_MSG_ERROR, "netclass hkp '%s' does not contain any NET_CLASS_SCHEME/CLEARANCE_RULE_SET section\n", fn); return -1; } @@ -144,7 +144,7 @@ fnet = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnet == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open netprops hkp '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open netprops hkp '%s' for read\n", fn); return -1; } Index: trunk/src_plugins/io_mentor_cell/read_pstk.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30954) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30955) @@ -397,7 +397,7 @@ fpstk = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fpstk == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open padstack hkp '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open padstack hkp '%s' for read\n", fn); return -1; } Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30954) +++ trunk/src_plugins/io_pcb/file.c (revision 30955) @@ -691,7 +691,7 @@ ts = pcb_layer_get_top_silk(); if ((bs < 0) || (ts < 0)) { - 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"); + rnd_message(RND_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; } @@ -1158,13 +1158,13 @@ if (PCB->Data->Layer[n].meta.real.grp == -1) { pcb_layergrp_t *grp = pcb_get_grp_new_intern(pcb, -1); - 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); + rnd_message(RND_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 - rnd_message(PCB_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); + rnd_message(RND_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); } } Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 30954) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 30955) @@ -2638,7 +2638,7 @@ command = pcb_build_argfn(Executable, &p); /* open pipe to stdout of command */ if (*command == '\0' || (yyin = pcb_popen(NULL, command, "r")) == NULL) { - pcb_popen_error_message(command); + rnd_popen_error_message(command); free(command); return (1); } @@ -2831,20 +2831,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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; } } @@ -2874,7 +2874,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - rnd_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(RND_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 30954) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 30955) @@ -255,7 +255,7 @@ command = pcb_build_argfn(Executable, &p); /* open pipe to stdout of command */ if (*command == '\0' || (yyin = pcb_popen(NULL, command, "r")) == NULL) { - pcb_popen_error_message(command); + rnd_popen_error_message(command); free(command); return (1); } @@ -448,20 +448,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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: - 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); + rnd_message(RND_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; } } @@ -491,7 +491,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - rnd_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(RND_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); #endif } return r; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 30954) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 30955) @@ -1821,7 +1821,7 @@ if (!yyPCB) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_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) { - rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(RND_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - rnd_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(RND_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)) { - rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(RND_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(RND_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -1921,7 +1921,7 @@ if (!yyData || !yyFont) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_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) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -2143,7 +2143,7 @@ { if (pcb_route_string_parse((yyvsp[-1].string), &yyPCB->RouteStyle, "mil")) { - rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(RND_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")) { - rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(RND_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2444,7 +2444,7 @@ if (bad_contour_found) { - rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(RND_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -2932,7 +2932,7 @@ char *old_val, *key = (yyvsp[-2].string), *val = (yyvsp[-1].string) ? (yyvsp[-1].string) : (char *)""; old_val = rnd_attribute_get(attr_list, key); if (old_val != NULL) - rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(RND_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else rnd_attribute_put(attr_list, key, val); free(key); @@ -3265,7 +3265,7 @@ */ int yyerror(const char * s) { - rnd_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(RND_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 ) { - rnd_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(RND_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" Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 30954) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 30955) @@ -160,7 +160,7 @@ if (!yyPCB) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_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) { - rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(RND_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - rnd_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(RND_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)) { - rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(RND_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(RND_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -259,7 +259,7 @@ if (!yyData || !yyFont) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_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) { - rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(RND_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -469,7 +469,7 @@ { if (pcb_route_string_parse($3, &yyPCB->RouteStyle, "mil")) { - rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(RND_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")) { - rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(RND_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -785,7 +785,7 @@ if (bad_contour_found) { - rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(RND_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -1323,7 +1323,7 @@ char *old_val, *key = $3, *val = $4 ? $4 : (char *)""; old_val = rnd_attribute_get(attr_list, key); if (old_val != NULL) - rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(RND_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else rnd_attribute_put(attr_list, key, val); free(key); @@ -1361,7 +1361,7 @@ */ int yyerror(const char * s) { - rnd_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(RND_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 ) { - rnd_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(RND_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" Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 30954) +++ trunk/src_plugins/io_tedax/footprint.c (revision 30955) @@ -117,7 +117,7 @@ int n, i; if (proto == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); return 1; } if (proto->hdia > 0) @@ -225,7 +225,7 @@ pcb_poly_iterate_polyarea(polygon->Clipped, &it); if (pcb_poly_contour(&it) == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no clipped contour\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no clipped contour\n"); continue; } @@ -234,10 +234,10 @@ numpt++; if (pcb_poly_hole_first(&it) != NULL) - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); if (numpt == 0) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no points\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no points\n"); continue; } @@ -316,7 +316,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); return -1; } res = tedax_fp_fsave(data, f, subc_idx); @@ -357,7 +357,7 @@ char *end; \ dst = strtol(src, &end, 10); \ if (*end != '\0') { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -367,7 +367,7 @@ char *end; \ dst = strtod(src, &end); \ if (*end != '\0') { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -377,7 +377,7 @@ rnd_bool succ; \ dst = pcb_get_value_ex(src, NULL, NULL, NULL, "mm", &succ); \ if (!succ) { \ - rnd_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(RND_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -390,7 +390,7 @@ load_int(termid, src, msg); \ term = htip_get(&terms, termid); \ if (term == NULL) { \ - rnd_message(PCB_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ + rnd_message(RND_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ return -1; \ } \ rnd_attribute_put(&obj->Attributes, "term", term->name); \ @@ -404,7 +404,7 @@ else if (strcmp(src, "primary") == 0) \ dst = 0; \ else { \ - rnd_message(PCB_MSG_ERROR, msg, lloc); \ + rnd_message(RND_MSG_ERROR, msg, lloc); \ return -1; \ } \ } while(0) @@ -417,7 +417,7 @@ argc--; argv++; if (max*2 != argc) { - rnd_message(PCB_MSG_ERROR, "invalid number of polygon points: expected %d coords got %d skipping footprint\n", max*2, argc); + rnd_message(RND_MSG_ERROR, "invalid number of polygon points: expected %d coords got %d skipping footprint\n", max*2, argc); return -1; } for(n = 0; n < max; n++) { @@ -442,7 +442,7 @@ else if (strcmp(ltyp, "mask") == 0) lyt |= PCB_LYT_MASK; else if (strcmp(ltyp, "paste") == 0) lyt |= PCB_LYT_PASTE; else { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer type %s\n", ltyp); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: invalid layer type %s\n", ltyp); return NULL; } @@ -462,7 +462,7 @@ else if (strcmp(lloc, "secondary") == 0) lyt |= PCB_LYT_BOTTOM; else if (strcmp(lloc, "inner") == 0) lyt |= PCB_LYT_INTERN; else { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); return NULL; } @@ -495,7 +495,7 @@ numpt = load_poly(px, py, (sizeof(px) / sizeof(px[0])), argc-5, argv+5); if (numpt < 0) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to load polygon\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: failed to load polygon\n"); return -1; } load_val(clr, argv[4], "invalid clearance"); @@ -504,7 +504,7 @@ int n; p = pcb_poly_new(*ly, clr, pcb_no_flags()); if (p == NULL) { - rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); + rnd_message(RND_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); return -1; } for(n = 0; n < numpt; n++) @@ -647,7 +647,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fn); return -1; } Index: trunk/src_plugins/io_tedax/parse.c =================================================================== --- trunk/src_plugins/io_tedax/parse.c (revision 30954) +++ trunk/src_plugins/io_tedax/parse.c (revision 30955) @@ -94,12 +94,12 @@ /* look for the header */ if ((argc = tedax_getline(f, buff, buff_size, argv, argv_size)) < 2) { - rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (no line)\n"); + rnd_message(RND_MSG_ERROR, "Can't find tEDAx header (no line)\n"); return -1; } if ((argv[1] == NULL) || (rnd_strcasecmp(argv[0], "tEDAx") != 0) || (rnd_strcasecmp(argv[1], "v1") != 0)) { - rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); + rnd_message(RND_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); return -1; } @@ -118,7 +118,7 @@ if (argc < 2) { if (!silent) - rnd_message(PCB_MSG_ERROR, "Can't find %s %s block in tEDAx\n", blk_ver, blk_name); + rnd_message(RND_MSG_ERROR, "Can't find %s %s block in tEDAx\n", blk_ver, blk_name); return -1; } Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 30954) +++ trunk/src_plugins/io_tedax/stackup.c (revision 30955) @@ -257,7 +257,7 @@ else if (strcmp(lloc, "virtual") == 0) grp->ltype |= PCB_LYT_VIRTUAL; else if (strcmp(lloc, "all") == 0) {} else - rnd_message(PCB_MSG_ERROR, "invalid layer location: %s\n", lloc); + rnd_message(RND_MSG_ERROR, "invalid layer location: %s\n", lloc); for(t = layertab; t->typename != NULL; t++) { if (strcmp(typename, t->typename) == 0) { @@ -269,7 +269,7 @@ } } - rnd_message(PCB_MSG_ERROR, "invalid layer type: %s\n", typename); + rnd_message(RND_MSG_ERROR, "invalid layer type: %s\n", typename); return -1; } @@ -335,7 +335,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); return -1; } tedax_stackup_init(&ctx); @@ -418,7 +418,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); return -1; } tedax_stackup_init(&ctx); Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 30954) +++ trunk/src_plugins/io_tedax/tboard.c (revision 30955) @@ -130,7 +130,7 @@ fputc('\n', f); if (tedax_stackup_fsave(&ctx, pcb, stackupid, f) != 0) { - rnd_message(PCB_MSG_ERROR, "internal error: failed to save the stackup\n"); + rnd_message(RND_MSG_ERROR, "internal error: failed to save the stackup\n"); goto error; } @@ -258,7 +258,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -270,7 +270,7 @@ #define errexit(msg) \ do { \ if (!silent) \ - rnd_message(PCB_MSG_ERROR, msg); \ + rnd_message(RND_MSG_ERROR, msg); \ res = -1; \ goto error; \ } while(0) @@ -378,7 +378,7 @@ y2 = pcb_get_value(argv[4], "mm", NULL, &succ); if (!succ) errexit("Invalid y2 coord in drawing_area\n"); if ((x1 >= x2) || (y1 >= y2)) errexit("Invalid (unordered, negative box) drawing area\n"); - if ((x1 < 0) || (y1 < 0)) rnd_message(PCB_MSG_WARNING, "drawing_area starts at negative coords; some objects may not display;\nyou may want to run autocrop()\n"); + if ((x1 < 0) || (y1 < 0)) rnd_message(RND_MSG_WARNING, "drawing_area starts at negative coords; some objects may not display;\nyou may want to run autocrop()\n"); PCB->hidlib.size_x = x2 - x1; PCB->hidlib.size_y = y2 - y1; } @@ -506,7 +506,7 @@ { /* placement */ htsp_entry_t *e; for(e = htsp_first(&plc); e != NULL; e = htsp_next(&plc, e)) { -pcb_trace("placing '%s'\n", e->key); +rnd_trace("placing '%s'\n", e->key); } } @@ -545,7 +545,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); return -1; } res = tedax_board_fload(pcb, f, blk_id, silent); Index: trunk/src_plugins/io_tedax/tdrc.c =================================================================== --- trunk/src_plugins/io_tedax/tdrc.c (revision 30954) +++ trunk/src_plugins/io_tedax/tdrc.c (revision 30955) @@ -79,7 +79,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -114,13 +114,13 @@ val[n] = d; } else - rnd_message(PCB_MSG_ERROR, "ignoring invalid numeric value '%s'\n", argv[4]); + rnd_message(RND_MSG_ERROR, "ignoring invalid numeric value '%s'\n", argv[4]); } } else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "drc") == 0)) break; else - rnd_message(PCB_MSG_ERROR, "ignoring invalid command in drc %s\n", argv[0]); + rnd_message(RND_MSG_ERROR, "ignoring invalid command in drc %s\n", argv[0]); } for(n = 0, r = rules; n < NUM_RULES; r++,n++) @@ -135,7 +135,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); return -1; } res = tedax_drc_fload(pcb, f, blk_id, silent); Index: trunk/src_plugins/io_tedax/tetest.c =================================================================== --- trunk/src_plugins/io_tedax/tetest.c (revision 30954) +++ trunk/src_plugins/io_tedax/tetest.c (revision 30955) @@ -161,7 +161,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); Index: trunk/src_plugins/io_tedax/tlayer.c =================================================================== --- trunk/src_plugins/io_tedax/tlayer.c (revision 30954) +++ trunk/src_plugins/io_tedax/tlayer.c (revision 30955) @@ -131,7 +131,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -159,7 +159,7 @@ while((argc = tedax_seek_block(f, "polyline", "v1", NULL, 1, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) > 1) { char *pname; if (htsp_has(&plines, argv[3])) { - rnd_message(PCB_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); + rnd_message(RND_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); res = -1; goto error; } @@ -174,7 +174,7 @@ vtc0_append(coords, pcb_get_value(argv[1], "mm", NULL, &s1)); vtc0_append(coords, pcb_get_value(argv[2], "mm", NULL, &s2)); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); + rnd_message(RND_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); res = -1; free(pname); goto error; @@ -184,7 +184,7 @@ break; } else { - rnd_message(PCB_MSG_ERROR, "invalid command in polyline %s: %s\n", pname, argv[0]); + rnd_message(RND_MSG_ERROR, "invalid command in polyline %s: %s\n", pname, argv[0]); res = -1; free(pname); goto error; @@ -199,7 +199,7 @@ while((argc = tedax_seek_block(f, "layer", "v1", blk_id, silent, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) > 1) { pcb_layer_t *ly; if (data->LayerN >= PCB_MAX_LAYER) { - rnd_message(PCB_MSG_ERROR, "too many layers\n"); + rnd_message(RND_MSG_ERROR, "too many layers\n"); res = -1; goto error; } @@ -226,7 +226,7 @@ x2 = pcb_get_value(argv[3], "mm", NULL, &s3); y2 = pcb_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { - rnd_message(PCB_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(RND_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); res = -1; goto error; } @@ -233,7 +233,7 @@ th = pcb_get_value(argv[5], "mm", NULL, &s1); cl = pcb_get_value(argv[6], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); + rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); res = -1; goto error; } @@ -248,19 +248,19 @@ cy = pcb_get_value(argv[2], "mm", NULL, &s2); r = pcb_get_value(argv[3], "mm", NULL, &s3); if (!s1 || !s2 || !s3) { - rnd_message(PCB_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); + rnd_message(RND_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); res = -1; goto error; } sa = strtod(argv[4], &end); if ((*end != '\0') || (sa < 0) || (sa >= 360.0)) { - rnd_message(PCB_MSG_ERROR, "invalid arc start angle %s\n", argv[4]); + rnd_message(RND_MSG_ERROR, "invalid arc start angle %s\n", argv[4]); res = -1; goto error; } da = strtod(argv[5], &end); if ((*end != '\0') || (da < -360.0) || (da > 360.0)) { - rnd_message(PCB_MSG_ERROR, "invalid arc delta angle %s\n", argv[5]); + rnd_message(RND_MSG_ERROR, "invalid arc delta angle %s\n", argv[5]); res = -1; goto error; } @@ -267,7 +267,7 @@ th = pcb_get_value(argv[6], "mm", NULL, &s1); cl = pcb_get_value(argv[7], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); + rnd_message(RND_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); res = -1; goto error; } @@ -284,13 +284,13 @@ bx2 = pcb_get_value(argv[3], "mm", NULL, &s3); by2 = pcb_get_value(argv[4], "mm", NULL, &s4); if (!s1 || !s2 || !s3 || !s4) { - rnd_message(PCB_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(RND_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); res = -1; goto error; } rot = strtod(argv[6], &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "invalid text rotation %s \n", argv[6]); + rnd_message(RND_MSG_ERROR, "invalid text rotation %s \n", argv[6]); res = -1; goto error; } @@ -323,17 +323,17 @@ ox = pcb_get_value(argv[2], "mm", NULL, &s1); oy = pcb_get_value(argv[3], "mm", NULL, &s2); if (!s1 || !s2) { - rnd_message(PCB_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); + rnd_message(RND_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); res = -1; goto error; } coords = htsp_get(&plines, argv[1]); if (coords == NULL) { - rnd_message(PCB_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); + rnd_message(RND_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); res = -1; goto error; } - pcb_trace("POLY: %mm %mm %s\n", ox, oy, argv[1]); + rnd_trace("POLY: %mm %mm %s\n", ox, oy, argv[1]); poly = pcb_poly_new(ly, 0, pcb_no_flags()); for(n = 0; n < coords->used; n+=2) pcb_poly_point_new(poly, ox+coords->array[n], oy+coords->array[n+1]); @@ -342,7 +342,7 @@ else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "layer") == 0)) break; else { - rnd_message(PCB_MSG_ERROR, "invalid layer object %s\n", argv[0]); + rnd_message(RND_MSG_ERROR, "invalid layer object %s\n", argv[0]); res = -1; goto error; } @@ -367,7 +367,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); return -1; } res = tedax_layers_fload(data, f, blk_id, silent); Index: trunk/src_plugins/io_tedax/tnetlist.c =================================================================== --- trunk/src_plugins/io_tedax/tnetlist.c (revision 30954) +++ trunk/src_plugins/io_tedax/tnetlist.c (revision 30955) @@ -118,9 +118,9 @@ for (e = htsp_first(&fps); e; e = htsp_next(&fps, e)) { fp_t *fp = e->value; -/* pcb_trace("tedax fp: refdes=%s val=%s fp=%s\n", e->key, fp->value, fp->footprint);*/ +/* rnd_trace("tedax fp: refdes=%s val=%s fp=%s\n", e->key, fp->value, fp->footprint);*/ if (fp->footprint == NULL) - rnd_message(PCB_MSG_ERROR, "tedax: not importing refdes=%s: no footprint specified\n", e->key); + rnd_message(RND_MSG_ERROR, "tedax: not importing refdes=%s: no footprint specified\n", e->key); else rnd_actionva(&PCB->hidlib, "ElementList", "Need", null_empty(e->key), null_empty(fp->footprint), null_empty(fp->value), NULL); @@ -158,7 +158,7 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -234,7 +234,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); + rnd_message(RND_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -268,7 +268,7 @@ static int tedaxnet_import(pcb_plug_import_t *ctx, unsigned int aspects, const char **args, int numargs) { if (numargs != 1) { - rnd_message(PCB_MSG_ERROR, "import_tedaxnet: requires exactly 1 input file name\n"); + rnd_message(RND_MSG_ERROR, "import_tedaxnet: requires exactly 1 input file name\n"); return -1; } return tedax_net_load(args[0], 1, NULL, 0); Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 30954) +++ trunk/src_plugins/jostle/jostle.c (revision 30955) @@ -216,7 +216,7 @@ minmax = 1; break; default: - rnd_message(PCB_MSG_ERROR, "jostle: aiee, what side?"); + rnd_message(RND_MSG_ERROR, "jostle: aiee, what side?"); return; } v = a->contours->head; Index: trunk/src_plugins/lib_compat_help/elem_rot.c =================================================================== --- trunk/src_plugins/lib_compat_help/elem_rot.c (revision 30954) +++ trunk/src_plugins/lib_compat_help/elem_rot.c (revision 30955) @@ -46,7 +46,7 @@ double d = atan2(-y, x) * 180.0 / M_PI; if (verbose_rot) - pcb_trace(" xyToAngle: %f %f %d ->%f\n", x, y, morethan2pins, d); + rnd_trace(" xyToAngle: %f %f %d ->%f\n", x, y, morethan2pins, d); /* IPC 7351 defines different rules for 2 pin elements */ if (morethan2pins) { @@ -104,10 +104,10 @@ if (!autodetect) { if (pcb_subc_get_origin(subc, &ox, &oy) != 0) - rnd_message(PCB_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc origin for %s\n", subc->refdes); + rnd_message(RND_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc origin for %s\n", subc->refdes); if (pcb_subc_get_side(subc, &bott) != 0) - rnd_message(PCB_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc side for %s\n", subc->refdes); + rnd_message(RND_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc side for %s\n", subc->refdes); } /* initialize our pin count and our totals for finding the @@ -186,7 +186,7 @@ pin1y = piny[rpindex] - *cy; if (verbose_rot) - pcb_trace("\npcb_subc_xy_rot: %s pin_cnt=%d pin1x=%d pin1y=%d\n", PCB_UNKNOWN(subc->refdes), pin_cnt, pin1x, pin1y); + rnd_trace("\npcb_subc_xy_rot: %s pin_cnt=%d pin1x=%d pin1y=%d\n", PCB_UNKNOWN(subc->refdes), pin_cnt, pin1x, pin1y); /* if only 1 pin, we are doomed */ if (pin_cnt == 1) { @@ -207,19 +207,19 @@ } } if (verbose_rot) - pcb_trace(" ->theta=%f\n", *theta); + rnd_trace(" ->theta=%f\n", *theta); } } if (!found_any) { rnd_message - (PCB_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle because I could\n" + (RND_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle because I could\n" " not find a suitable reference pin of element %s\n" " Setting to %g degrees\n", PCB_UNKNOWN(subc->refdes), *theta); } else if (!found_any_not_at_centroid) { rnd_message - (PCB_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle of element\n" + (RND_MSG_WARNING, "pcb_subc_xy_rot: unable to figure out angle of element\n" " %s because the reference pin(s) are at the centroid of the part.\n" " Setting to %g degrees\n", PCB_UNKNOWN(subc->refdes), *theta); } Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30954) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30955) @@ -85,7 +85,7 @@ } } - pcb_trace("Converting %d objects into a pstk\n", tmp.used); + rnd_trace("Converting %d objects into a pstk\n", tmp.used); memset(&proto, 0, sizeof(proto)); if (pcb_pstk_proto_conv(data, &proto, quiet, &tmp, cx, cy) == 0) { Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30955) @@ -183,7 +183,7 @@ } else { if ((update_on == NULL) || (*update_on != '\0')) - rnd_message(PCB_MSG_WARNING, "Checkbox menu item %s not updated on any conf change - try to use the update_on field\n", checked); + rnd_message(RND_MSG_WARNING, "Checkbox menu item %s not updated on any conf change - try to use the update_on field\n", checked); } } else if (label && strcmp(label, "false") == 0) { @@ -379,7 +379,7 @@ GtkAccelGroup *ghid_main_menu_get_accel_group(GHidMainMenu *menu) { if (menu == NULL) { - rnd_message(PCB_MSG_ERROR, "ghid: can't initialize the menu - is your menu .lht valid?\n"); + rnd_message(RND_MSG_ERROR, "ghid: can't initialize the menu - is your menu .lht valid?\n"); exit(1); } return menu->accel_group; @@ -471,7 +471,7 @@ *cfg_out = pcb_hid_cfg_load(menu->hidlib, "gtk", 0, NULL); if (*cfg_out == NULL) { - rnd_message(PCB_MSG_ERROR, "FATAL: can't load the gtk menu res either from file or from hardwired default."); + rnd_message(RND_MSG_ERROR, "FATAL: can't load the gtk menu res either from file or from hardwired default."); abort(); } @@ -496,7 +496,7 @@ mr = pcb_hid_cfg_get_menu(*cfg_out, "/mouse"); if (hid_cfg_mouse_init(*cfg_out, &ghid_mouse) != 0) - rnd_message(PCB_MSG_ERROR, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); + rnd_message(RND_MSG_ERROR, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); return menu_bar; } Index: trunk/src_plugins/lib_gtk_common/dlg_attr_box.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30955) @@ -58,7 +58,7 @@ case 1: gtk_paned_pack1(GTK_PANED(parent), page, TRUE, FALSE); break; case 2: gtk_paned_pack2(GTK_PANED(parent), page, TRUE, FALSE); break; default: - rnd_message(PCB_MSG_ERROR, "Wrong number of pages for a paned widget (%d): must be exactly 2\n", ts->val.pane.next); + rnd_message(RND_MSG_ERROR, "Wrong number of pages for a paned widget (%d): must be exactly 2\n", ts->val.pane.next); } ts->val.pane.next++; return page; Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30955) @@ -291,7 +291,7 @@ ghidgui->bg_pixmap.image = NULL; if (pcb_conf_hid_gtk.plugins.hid_gtk.bg_image != NULL) { if (pcb_pixmap_load(ghidgui->hidlib, &pxm, pcb_conf_hid_gtk.plugins.hid_gtk.bg_image) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to load pixmap %s for background image\n", pcb_conf_hid_gtk.plugins.hid_gtk.bg_image); + rnd_message(RND_MSG_ERROR, "Failed to load pixmap %s for background image\n", pcb_conf_hid_gtk.plugins.hid_gtk.bg_image); return; } ghidgui->bg_pixmap.pxm = &pxm; Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30955) @@ -500,7 +500,7 @@ menu = pcb_gtk_menu_widget(menu_node); if (!GTK_IS_MENU(menu)) { - rnd_message(PCB_MSG_ERROR, "The specified popup menu \"%s\" has not been defined.\n", menupath); + rnd_message(RND_MSG_ERROR, "The specified popup menu \"%s\" has not been defined.\n", menupath); return 1; } @@ -634,7 +634,7 @@ double rsx, rsy, ca = cos(pixmap->tr_rot / PCB_RAD_TO_DEG), sa = sin(pixmap->tr_rot / PCB_RAD_TO_DEG); rsx = (double)sx * ca + (double)sy * sa; rsy = (double)sy * ca + (double)sx * sa; -pcb_trace("GUI scale: %mm %mm -> %mm %mm\n", sx, sy, (rnd_coord_t)rsx, (rnd_coord_t)rsy); +rnd_trace("GUI scale: %mm %mm -> %mm %mm\n", sx, sy, (rnd_coord_t)rsx, (rnd_coord_t)rsy); gctx->impl.draw_pixmap(gctx->hidlib, pixmap->hid_data, cx - rsx/2.0, cy - rsy/2.0, rsx, rsy); } } Index: trunk/src_plugins/lib_gtk_common/in_keyboard.c =================================================================== --- trunk/src_plugins/lib_gtk_common/in_keyboard.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/in_keyboard.c (revision 30955) @@ -140,7 +140,7 @@ key = gdk_keyval_from_name(desc); if (key > 0xffff) { - rnd_message(PCB_MSG_WARNING, "Ignoring invalid/exotic key sym: '%s'\n", desc); + rnd_message(RND_MSG_WARNING, "Ignoring invalid/exotic key sym: '%s'\n", desc); return 0; } return key; Index: trunk/src_plugins/lib_gtk_common/in_mouse.c =================================================================== --- trunk/src_plugins/lib_gtk_common/in_mouse.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/in_mouse.c (revision 30955) @@ -385,7 +385,7 @@ return; } } - rnd_message(PCB_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); + rnd_message(RND_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); } mc->shape = GDK_LEFT_PTR; /* default */ mc->X_cursor = gdk_cursor_new(mc->shape); @@ -406,7 +406,7 @@ if (mc == NULL) { if (ctx->mouse.cursor.used > 0) - rnd_message(PCB_MSG_ERROR, "Failed to set mouse cursor for unregistered tool %d\n", idx); + rnd_message(RND_MSG_ERROR, "Failed to set mouse cursor for unregistered tool %d\n", idx); return; } Index: trunk/src_plugins/lib_gtk_common/lib_gtk_config.c =================================================================== --- trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30955) @@ -113,10 +113,10 @@ if ((nat == NULL) || (nat->prop->src == NULL)) continue; if (!warned) { - rnd_message(PCB_MSG_WARNING, "Some of your config sources contain old, gtk-only window placement nodes.\nThose settings got removed from pcb-rnd - your nodes just got converted\ninto the new config, but you will need to remove the\nold config nodes manually from the following places:\n"); + rnd_message(RND_MSG_WARNING, "Some of your config sources contain old, gtk-only window placement nodes.\nThose settings got removed from pcb-rnd - your nodes just got converted\ninto the new config, but you will need to remove the\nold config nodes manually from the following places:\n"); warned = 1; } - rnd_message(PCB_MSG_WARNING, "%s from %s:%d\n", nat->hash_path, nat->prop->src->file_name, nat->prop->src->line); + rnd_message(RND_MSG_WARNING, "%s from %s:%d\n", nat->hash_path, nat->prop->src->file_name, nat->prop->src->line); strcpy(dirname, p[1]); end = strrchr(dirname, '/'); Index: trunk/src_plugins/lib_gtk_common/util_listener.c =================================================================== --- trunk/src_plugins/lib_gtk_common/util_listener.c (revision 30954) +++ trunk/src_plugins/lib_gtk_common/util_listener.c (revision 30955) @@ -50,7 +50,7 @@ if (condition & G_IO_HUP) { - rnd_message(PCB_MSG_ERROR, "gtk listener: Read end of pipe died!\n"); + rnd_message(RND_MSG_ERROR, "gtk listener: Read end of pipe died!\n"); return FALSE; } @@ -63,22 +63,22 @@ break; case G_IO_STATUS_ERROR: - rnd_message(PCB_MSG_ERROR, "gtk listener: status from g_io_channel_read_line\n"); + rnd_message(RND_MSG_ERROR, "gtk listener: status from g_io_channel_read_line\n"); return FALSE; break; case G_IO_STATUS_EOF: - rnd_message(PCB_MSG_ERROR, "gtk listener: Input pipe returned EOF. The --listen option is \n" "probably not running anymore in this session.\n"); + rnd_message(RND_MSG_ERROR, "gtk listener: Input pipe returned EOF. The --listen option is \n" "probably not running anymore in this session.\n"); return FALSE; break; case G_IO_STATUS_AGAIN: - rnd_message(PCB_MSG_ERROR, "gtk listener: AGAIN status from g_io_channel_read_line\n"); + rnd_message(RND_MSG_ERROR, "gtk listener: AGAIN status from g_io_channel_read_line\n"); return FALSE; break; default: - rnd_message(PCB_MSG_ERROR, "gtk listener: unhandled error case\n"); + rnd_message(RND_MSG_ERROR, "gtk listener: unhandled error case\n"); return FALSE; break; } Index: trunk/src_plugins/lib_hid_common/act_dad.c =================================================================== --- trunk/src_plugins/lib_hid_common/act_dad.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 30955) @@ -78,7 +78,7 @@ dad_t *dad; if (htsp_get(&dads, name) != NULL) { - rnd_message(PCB_MSG_ERROR, "Can't create named DAD dialog %s: already exists\n", name); + rnd_message(RND_MSG_ERROR, "Can't create named DAD dialog %s: already exists\n", name); return -1; } @@ -155,7 +155,7 @@ for(len = 0; s != NULL; s = next) { if (len >= MAX_ENUM) { - rnd_message(PCB_MSG_ERROR, "Too many DAD %s values\n", cmd); + rnd_message(RND_MSG_ERROR, "Too many DAD %s values\n", cmd); return -1; } next = strchr(s, '\t'); @@ -222,7 +222,7 @@ } if (dad == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); + rnd_message(RND_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); RND_ACT_IRES(-1); return 0; } @@ -358,7 +358,7 @@ if (row != NULL) { if (!fgw_ptr_in_domain(&rnd_fgw, &argv[3], dad->row_domain)) { - rnd_message(PCB_MSG_ERROR, "Invalid DAD row pointer\n"); + rnd_message(RND_MSG_ERROR, "Invalid DAD row pointer\n"); RND_ACT_IRES(-1); return 0; } @@ -430,7 +430,7 @@ continue; tmp = pcb_hid_compflag_name2bit(txt); if (tmp == 0) - rnd_message(PCB_MSG_ERROR, "Invalid DAD flag: %s (ignored)\n", txt); + rnd_message(RND_MSG_ERROR, "Invalid DAD flag: %s (ignored)\n", txt); flg |= tmp; } PCB_DAD_COMPFLAG(dad->dlg, flg); @@ -450,7 +450,7 @@ RND_PCB_ACT_CONVARG(3, FGW_INT, dad, wid = argv[3].val.nat_int); if ((wid < 0) || (wid >= dad->dlg_len)) { - rnd_message(PCB_MSG_ERROR, "Invalid widget ID %d (set ignored)\n", wid); + rnd_message(RND_MSG_ERROR, "Invalid widget ID %d (set ignored)\n", wid); RND_ACT_IRES(-1); return 0; } @@ -481,7 +481,7 @@ PCB_DAD_SET_VALUE(dad->dlg_hid_ctx, wid, str, txt); break; default: - rnd_message(PCB_MSG_ERROR, "Invalid widget type %d - can not change value (set ignored)\n", wid); + rnd_message(RND_MSG_ERROR, "Invalid widget type %d - can not change value (set ignored)\n", wid); RND_ACT_IRES(-1); return 0; } @@ -493,7 +493,7 @@ RND_PCB_ACT_CONVARG(3, FGW_INT, dad, wid = argv[3].val.nat_int); if ((wid < 0) || (wid >= dad->dlg_len)) { - rnd_message(PCB_MSG_ERROR, "Invalid widget ID %d (get ignored)\n", wid); + rnd_message(RND_MSG_ERROR, "Invalid widget ID %d (get ignored)\n", wid); return FGW_ERR_NOT_FOUND; } @@ -508,7 +508,7 @@ if (txt != NULL) { const pcb_unit_t *u = get_unit_struct(txt); if (u == NULL) { - rnd_message(PCB_MSG_ERROR, "Invalid unit %s (get ignored)\n", txt); + rnd_message(RND_MSG_ERROR, "Invalid unit %s (get ignored)\n", txt); return FGW_ERR_NOT_FOUND; } res->type = FGW_DOUBLE; @@ -532,7 +532,7 @@ res->val.str = (char *)dad->dlg[wid].val.str; break; default: - rnd_message(PCB_MSG_ERROR, "Invalid widget type %d - can not retrieve value (get ignored)\n", wid); + rnd_message(RND_MSG_ERROR, "Invalid widget type %d - can not retrieve value (get ignored)\n", wid); return FGW_ERR_NOT_FOUND; } return 0; @@ -542,7 +542,7 @@ RND_PCB_ACT_CONVARG(3, FGW_STR, dad, txt = argv[3].val.str); if (dad->level != 0) { - rnd_message(PCB_MSG_ERROR, "Invalid DAD dialog structure: %d levels not closed (missing 'end' calls)\n", dad->level); + rnd_message(RND_MSG_ERROR, "Invalid DAD dialog structure: %d levels not closed (missing 'end' calls)\n", dad->level); rv = -1; } else { @@ -551,7 +551,7 @@ } } else { - rnd_message(PCB_MSG_ERROR, "Invalid DAD dialog command: '%s'\n", cmd); + rnd_message(RND_MSG_ERROR, "Invalid DAD dialog command: '%s'\n", cmd); rv = -1; } @@ -559,7 +559,7 @@ return 0; cant_chg:; - rnd_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); + rnd_message(RND_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/lib_hid_common/dlg_log.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30955) @@ -53,7 +53,7 @@ ctx->active = 0; } -static void log_append(log_ctx_t *ctx, pcb_hid_attribute_t *atxt, pcb_logline_t *line) +static void log_append(log_ctx_t *ctx, pcb_hid_attribute_t *atxt, rnd_logline_t *line) { pcb_hid_text_t *txt = atxt->wdata; const char *prefix = NULL; @@ -83,10 +83,10 @@ else { if ((line->prev == NULL) || (line->prev->str[line->prev->len-1] == '\n')) { switch(line->level) { - case PCB_MSG_DEBUG: prefix = "D: "; break; - case PCB_MSG_INFO: prefix = "I: "; break; - case PCB_MSG_WARNING: prefix = "W: "; break; - case PCB_MSG_ERROR: prefix = "E: "; break; + case RND_MSG_DEBUG: prefix = "D: "; break; + case RND_MSG_INFO: prefix = "I: "; break; + case RND_MSG_WARNING: prefix = "W: "; break; + case RND_MSG_ERROR: prefix = "E: "; break; } if (prefix != NULL) txt->hid_set_text(atxt, ctx->dlg_hid_ctx, PCB_HID_TEXT_APPEND | PCB_HID_TEXT_MARKUP, prefix); @@ -102,10 +102,10 @@ static void log_import(log_ctx_t *ctx) { - pcb_logline_t *n; + rnd_logline_t *n; pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; - for(n = pcb_log_find_min(ctx->last_added); n != NULL; n = n->next) + for(n = rnd_log_find_min(ctx->last_added); n != NULL; n = n->next) log_append(ctx, atxt, n); } @@ -195,7 +195,7 @@ static void log_append_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) { - pcb_logline_t *line = argv[1].d.p; + rnd_logline_t *line = argv[1].d.p; if (log_ctx.active) { pcb_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; @@ -226,12 +226,12 @@ static void log_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) { - pcb_logline_t *n; + rnd_logline_t *n; log_ctx.gui_inited = 1; /* if there's pending popup-message in the queue, pop up the dialog */ - for(n = pcb_log_first; n != NULL; n = n->next) { + for(n = rnd_log_first; n != NULL; n = n->next) { const char *prefix; int popup; Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30955) @@ -54,7 +54,7 @@ return; if (nat->type != RND_CFN_LIST) { - rnd_message(PCB_MSG_ERROR, "grid_install_menu(): conf node editor/grids should be a list\n"); + rnd_message(RND_MSG_ERROR, "grid_install_menu(): conf node editor/grids should be a list\n"); return; } Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30955) @@ -67,7 +67,7 @@ int len, multiarg; len = cp - name; if (len > sizeof(buff)-1) { - rnd_message(PCB_MSG_ERROR, "hid_get_flag: action name too long: %s()\n", name); + rnd_message(RND_MSG_ERROR, "hid_get_flag: action name too long: %s()\n", name); return -1; } memcpy(buff, name, len); @@ -74,7 +74,7 @@ buff[len] = '\0'; a = rnd_find_action(buff, &f); if (!a) { - rnd_message(PCB_MSG_ERROR, "hid_get_flag: no action %s\n", name); + rnd_message(RND_MSG_ERROR, "hid_get_flag: no action %s\n", name); return -1; } cp++; @@ -92,7 +92,7 @@ if (!multiarg) { /* faster but limited way for a single arg */ if ((len > sizeof(buff)-1) || (end == NULL)) { - rnd_message(PCB_MSG_ERROR, "hid_get_flag: action arg too long or unterminated: %s\n", name); + rnd_message(RND_MSG_ERROR, "hid_get_flag: action arg too long or unterminated: %s\n", name); return -1; } len = end - cp; Index: trunk/src_plugins/lib_hid_common/menu_helper.h =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.h (revision 30954) +++ trunk/src_plugins/lib_hid_common/menu_helper.h (revision 30955) @@ -43,7 +43,7 @@ On error, returns -1. */ int pcb_hid_get_flag(rnd_hidlib_t *hidlib, const char *name); -/* Return non-zero if submenu has further submenus; generate rnd_message(PCB_MSG_ERROR, ) if +/* Return non-zero if submenu has further submenus; generate rnd_message(RND_MSG_ERROR, ) if there is a submenu field with the wrong lihata type */ int pcb_hid_cfg_has_submenus(const lht_node_t *submenu); @@ -71,7 +71,7 @@ just a wrapper around lht_tree_path_ */ lht_node_t *pcb_hid_cfg_menu_field_path(const lht_node_t *parent, const char *path); -/* Return a text field of a submenu; return NULL and generate a rnd_message(PCB_MSG_ERROR, ) if +/* Return a text field of a submenu; return NULL and generate a rnd_message(RND_MSG_ERROR, ) if the given field is not text */ const char *pcb_hid_cfg_menu_field_str(const lht_node_t *submenu, pcb_hid_cfg_menufield_t field); Index: trunk/src_plugins/lib_hid_common/place.c =================================================================== --- trunk/src_plugins/lib_hid_common/place.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/place.c (revision 30955) @@ -59,7 +59,7 @@ htsw_entry_t *e; wingeo_t wg; -/* pcb_trace("dialog place set: '%s' %d;%d %d*%d\n", id, x, y, w, h);*/ +/* rnd_trace("dialog place set: '%s' %d;%d %d*%d\n", id, x, y, w, h);*/ e = htsw_getentry(&wingeo, (char *)id); if (e != NULL) { @@ -97,7 +97,7 @@ geo[2] = e->value.w; geo[3] = e->value.h; } -/* pcb_trace("dialog place: %p '%s'\n", hid_ctx, id);*/ +/* rnd_trace("dialog place: %p '%s'\n", hid_ctx, id);*/ } void pcb_dialog_resize(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) @@ -139,7 +139,7 @@ nat = rnd_conf_get_field(path); if ((nat == NULL) || (nat->prop->src == NULL) || (nat->prop->src->type != LHT_TEXT)) { - rnd_message(PCB_MSG_ERROR, "Can not load window geometry from invalid node for %s\n", path); + rnd_message(RND_MSG_ERROR, "Can not load window geometry from invalid node for %s\n", path); return; } @@ -228,7 +228,7 @@ if (role != RND_CFR_DESIGN) { int r = rnd_conf_save_file(hidlib, NULL, (hidlib == NULL ? NULL : hidlib->filename), role, NULL); if (r != 0) - rnd_message(PCB_MSG_ERROR, "Failed to save window geometry in %s\n", rnd_conf_role_name(role)); + rnd_message(RND_MSG_ERROR, "Failed to save window geometry in %s\n", rnd_conf_role_name(role)); } } Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30955) @@ -115,7 +115,7 @@ tool = (pcb_tool_t **)vtp0_get(&pcb_tools, tid, 0); if ((tid < 0) || (tool == NULL)) { - rnd_message(PCB_MSG_ERROR, "toolbar: tool '%s' not found (referenced from the menu file %s:%d)\n", t->name, t->file_name, t->line); + rnd_message(RND_MSG_ERROR, "toolbar: tool '%s' not found (referenced from the menu file %s:%d)\n", t->name, t->file_name, t->line); continue; } Index: trunk/src_plugins/lib_hid_common/zoompan.c =================================================================== --- trunk/src_plugins/lib_hid_common/zoompan.c (revision 30954) +++ trunk/src_plugins/lib_hid_common/zoompan.c (revision 30955) @@ -68,7 +68,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, Zoom, ovp = vp = argv[1].val.str); if (*vp == '?') { - rnd_message(PCB_MSG_INFO, "Current zoom level (coord-per-pix): %$mm\n", pcb_gui->coord_per_pix); + rnd_message(RND_MSG_INFO, "Current zoom level (coord-per-pix): %$mm\n", pcb_gui->coord_per_pix); return 0; } Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 30954) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 30955) @@ -64,7 +64,7 @@ if (pcb_get_selection_bbox(&sb, PCB->Data) > 0) pcb_gui->zoom_win(pcb_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else - rnd_message(PCB_MSG_ERROR, "Can't zoom to selection: nothing selected\n"); + rnd_message(RND_MSG_ERROR, "Can't zoom to selection: nothing selected\n"); return 0; } @@ -73,7 +73,7 @@ if (pcb_get_found_bbox(&sb, PCB->Data) > 0) pcb_gui->zoom_win(pcb_gui, sb.X1, sb.Y1, sb.X2, sb.Y2, 1); else - rnd_message(PCB_MSG_ERROR, "Can't zoom to 'found': nothing found\n"); + rnd_message(RND_MSG_ERROR, "Can't zoom to 'found': nothing found\n"); return 0; } } @@ -105,7 +105,7 @@ ycent = (double)(vb.Y1 + vb.Y2)/2.0; xoffs = xcent - x; yoffs = ycent - y; -/* pcb_trace("SwapSides: xy=%mm;%mm cent=%mm;%mm ofs=%mm;%mm\n", x, y, (rnd_coord_t)xcent, (rnd_coord_t)ycent, (rnd_coord_t)xoffs, (rnd_coord_t)yoffs);*/ +/* rnd_trace("SwapSides: xy=%mm;%mm cent=%mm;%mm ofs=%mm;%mm\n", x, y, (rnd_coord_t)xcent, (rnd_coord_t)ycent, (rnd_coord_t)xoffs, (rnd_coord_t)yoffs);*/ if (pcb_layergrp_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, &solder_group, 1) > 0) solder_on = pcb_get_layer(PCB->Data, PCB->LayerGroups.grp[solder_group].lid[0])->meta.real.vis; @@ -174,7 +174,7 @@ pcb_draw_inhibit_dec(); -/*pcb_trace("-jump-> %mm;%mm -> %mm;%mm\n", x, y, (rnd_coord_t)(x + xoffs), (rnd_coord_t)(y + yoffs));*/ +/*rnd_trace("-jump-> %mm;%mm -> %mm;%mm\n", x, y, (rnd_coord_t)(x + xoffs), (rnd_coord_t)(y + yoffs));*/ pcb_gui->pan(pcb_gui, rnd_round(x + xoffs), rnd_round(y + yoffs), 0); pcb_gui->set_crosshair(pcb_gui, x, y, HID_SC_PAN_VIEWPORT); Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30954) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30955) @@ -276,7 +276,7 @@ static void timed_layer_menu_key_update_cb(pcb_hidval_t user_data) { -/* pcb_trace("************ layer key update timer!\n");*/ +/* rnd_trace("************ layer key update timer!\n");*/ layer_install_menu_keys(); layer_menu_key_timer_active = 0; } @@ -286,7 +286,7 @@ { pcb_hidval_t timerdata; -/* pcb_trace("************ layer key update ev!\n");*/ +/* rnd_trace("************ layer key update ev!\n");*/ if ((pcb_gui == NULL) || (!pcb_gui->gui)) return; Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30954) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30955) @@ -44,7 +44,7 @@ { /* can be safely removed when route style switches over to padstacks */ pcb_route_style_t *rst = vtroutestyle_get(&PCB->RouteStyle, ctx->curr, 0); if (rst->Diameter <= rst->Hole) { - rnd_message(PCB_MSG_ERROR, "had to increase the via ring diameter - can not be smaller than the hole"); + rnd_message(RND_MSG_ERROR, "had to increase the via ring diameter - can not be smaller than the hole"); rst->Diameter = rst->Hole+PCB_MIL_TO_COORD(1); } } @@ -121,7 +121,7 @@ pcb_hid_attr_val_t hv; if (rst == NULL) { - rnd_message(PCB_MSG_ERROR, "route style does not exist"); + rnd_message(RND_MSG_ERROR, "route style does not exist"); return; } @@ -158,7 +158,7 @@ } else { - rnd_message(PCB_MSG_ERROR, "Internal error: route style field does not exist"); + rnd_message(RND_MSG_ERROR, "Internal error: route style field does not exist"); return; } @@ -342,7 +342,7 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_LONG, AdjustStyle, idx = argv[1].val.nat_long); if (idx >= (long)vtroutestyle_len(&PCB->RouteStyle)) { - rnd_message(PCB_MSG_ERROR, "Invalid route style %ld index; max value: %ld\n", idx, vtroutestyle_len(&PCB->RouteStyle)-1); + rnd_message(RND_MSG_ERROR, "Invalid route style %ld index; max value: %ld\n", idx, vtroutestyle_len(&PCB->RouteStyle)-1); RND_ACT_IRES(-1); return 0; } @@ -350,7 +350,7 @@ if (idx < 0) { idx = pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); if (idx < 0) { - rnd_message(PCB_MSG_ERROR, "No style selected\n"); + rnd_message(RND_MSG_ERROR, "No style selected\n"); RND_ACT_IRES(-1); } } Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30954) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30955) @@ -455,7 +455,7 @@ rnd_bool succ; period = pcb_get_value(op, NULL, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "Invalid spacing value - must be a coordinate\n"); + rnd_message(RND_MSG_ERROR, "Invalid spacing value - must be a coordinate\n"); return -1; } } Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 30954) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 30955) @@ -151,7 +151,7 @@ pcb_r_search(curr->parent.layer->arc_tree, ®ion, NULL, next_conn_found_arc, &ctx, &len); if (len > 1) { - rnd_message(PCB_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); + rnd_message(RND_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); return NULL; } if (ctx.result != NULL) @@ -159,7 +159,7 @@ pcb_r_search(curr->parent.layer->line_tree, ®ion, NULL, next_conn_found_line, &ctx, &len); if (len > 1) { - rnd_message(PCB_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); + rnd_message(RND_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); return NULL; } if (ctx.result != NULL) @@ -178,12 +178,12 @@ df = pcb_dynflag_alloc("topoly_map_contour"); pcb_data_dynflag_clear(data, df); -/*pcb_trace("loop start: %d\n", start->ID);*/ +/*rnd_trace("loop start: %d\n", start->ID);*/ vtp0_append(list, start); PCB_DFLAG_SET(&start->Flags, df); for(i = 0, n = next_conn(list, endlist, start, df); n != start; n = next_conn(list, endlist, n, df), i++) { if (n == NULL) { -/* pcb_trace(" broken trace\n");*/ +/* rnd_trace(" broken trace\n");*/ return -1; } if (i == 1) @@ -253,7 +253,7 @@ pcb_poly_t *poly; if (!VALID_TYPE(start)) { - rnd_message(PCB_MSG_ERROR, "pcb_topoly_conn(): starting object is not a line or arc\n"); + rnd_message(RND_MSG_ERROR, "pcb_topoly_conn(): starting object is not a line or arc\n"); return NULL; } @@ -261,7 +261,7 @@ vti0_init(&ends); res = map_contour(pcb->Data, &objs, &ends, start); if (res != 0) { - rnd_message(PCB_MSG_ERROR, "pcb_topoly_conn(): failed to find a closed loop of lines and arcs\n"); + rnd_message(RND_MSG_ERROR, "pcb_topoly_conn(): failed to find a closed loop of lines and arcs\n"); vtp0_uninit(&objs); vti0_uninit(&ends); return NULL; @@ -348,7 +348,7 @@ rnd_coord_t x, y; rnd_hid_get_coords("Click on a line or arc of the contour loop", &x, &y, 0); if (pcb_search_screen(x, y, CONT_TYPE, &r1, &r2, &r3) == 0) { - rnd_message(PCB_MSG_ERROR, "ToPoly(): failed to find a line or arc there\n"); + rnd_message(RND_MSG_ERROR, "ToPoly(): failed to find a line or arc there\n"); RND_ACT_IRES(1); return 0; } @@ -360,7 +360,7 @@ return 0; } else { - rnd_message(PCB_MSG_ERROR, "Invalid first argument\n"); + rnd_message(RND_MSG_ERROR, "Invalid first argument\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/lib_vfs/lib_vfs.c =================================================================== --- trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30954) +++ trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30955) @@ -60,13 +60,13 @@ char *s, *next; gds_append_str(path, append); -/*pcb_trace("---- mkdirp '%s'\n", path->array);*/ +/*rnd_trace("---- mkdirp '%s'\n", path->array);*/ for(s = path->array + ou;; s = next) { next = strchr(s, '/'); if (next == NULL) break; *next= '\0'; -/*pcb_trace(" dir '%s'\n", path->array);*/ +/*rnd_trace(" dir '%s'\n", path->array);*/ if (!htsp_has(seen, path->array)) { htsp_set(seen, rnd_strdup(path->array), ctx); cb(ctx, path->array, 1); Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 30954) +++ trunk/src_plugins/loghid/hid-logger.c (revision 30955) @@ -203,7 +203,7 @@ delegatee_ = delegatee; if (delegatee == NULL) { - rnd_message(PCB_MSG_ERROR, "loghid: Invalid target HID.\n"); + rnd_message(RND_MSG_ERROR, "loghid: Invalid target HID.\n"); exit(1); } Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30954) +++ trunk/src_plugins/millpath/toolpath.c (revision 30955) @@ -124,7 +124,7 @@ sub_layer_poly(ctx->pcb, ctx->result, ctx->layer, poly, ctx->centerline); pcb_polyarea_free(&poly->Clipped); break; - default: rnd_message(PCB_MSG_ERROR, "Internal error: toolpath sub_layer_text() invalid object type %ld\n", obj->type); + default: rnd_message(RND_MSG_ERROR, "Internal error: toolpath sub_layer_text() invalid object type %ld\n", obj->type); } } @@ -471,7 +471,7 @@ rem = fix_overcuts(pcb, result); if (rem != 0) - rnd_message(PCB_MSG_WARNING, "toolpath: had to remove %ld cuts, there might be short circuits;\ncheck your clearance vs. tool size!\n", rem); + rnd_message(RND_MSG_WARNING, "toolpath: had to remove %ld cuts, there might be short circuits;\ncheck your clearance vs. tool size!\n", rem); return 0; } @@ -479,9 +479,9 @@ #define req_setup(target) \ if (setup != target) { \ if (target) \ - rnd_message(PCB_MSG_ERROR, "millpath script: need to call a setup_* function before milling"); \ + rnd_message(RND_MSG_ERROR, "millpath script: need to call a setup_* function before milling"); \ else \ - rnd_message(PCB_MSG_ERROR, "millpath script: can not call multiple setup_* functions"); \ + rnd_message(RND_MSG_ERROR, "millpath script: can not call multiple setup_* functions"); \ continue; \ } @@ -532,7 +532,7 @@ long rem = fix_overcuts(pcb, result); req_setup(1); if (rem != 0) - rnd_message(PCB_MSG_WARNING, "toolpath: had to remove %ld cuts, there might be short circuits;\ncheck your clearance vs. tool size!\n", rem); + rnd_message(RND_MSG_WARNING, "toolpath: had to remove %ld cuts, there might be short circuits;\ncheck your clearance vs. tool size!\n", rem); } qparse_free(argc, &argv); Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 30954) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 30955) @@ -240,7 +240,7 @@ } } else - rnd_message(PCB_MSG_WARNING, "Ignoring subcircuit %ld connecting to a net because it has no refdes;\nplease use the nonetlist flag on the subcircuit to suppress this warning\n", sc->ID); + rnd_message(RND_MSG_WARNING, "Ignoring subcircuit %ld connecting to a net because it has no refdes;\nplease use the nonetlist flag on the subcircuit to suppress this warning\n", sc->ID); } } Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30954) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30955) @@ -49,11 +49,11 @@ { rnd_conf_native_t *n = rnd_conf_get_field(path); if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can't find config node %s to toggle\n", path); + rnd_message(RND_MSG_ERROR, "Error: can't find config node %s to toggle\n", path); return; } if (n->type != RND_CFN_BOOLEAN) { - rnd_message(PCB_MSG_ERROR, "Error: config node %s is not a boolean, can't toggle\n", path); + rnd_message(RND_MSG_ERROR, "Error: config node %s is not a boolean, can't toggle\n", path); return; } @@ -237,9 +237,9 @@ double rot; const char *refdes = PCB_UNKNOWN(subc->refdes); if (pcb_subc_get_rotation(subc, &rot) == 0) - rnd_message(PCB_MSG_INFO, "%f %s\n", rot, refdes); + rnd_message(RND_MSG_INFO, "%f %s\n", rot, refdes); else - rnd_message(PCB_MSG_INFO, " %s\n", refdes); + rnd_message(RND_MSG_INFO, " %s\n", refdes); } PCB_END_LOOP; RND_ACT_IRES(0); @@ -290,7 +290,7 @@ /* DOC: importgui.html */ static fgw_error_t pcb_act_ImportGUI(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "The ImportGUI() action is deprecated. Using ImportSch() instead.\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0002.html\n"); + rnd_message(RND_MSG_ERROR, "The ImportGUI() action is deprecated. Using ImportSch() instead.\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0002.html\n"); RND_ACT_IRES(rnd_actionva(RND_ACT_HIDLIB, "ImportSch", NULL)); return 0; } @@ -304,7 +304,7 @@ /* DOC: import.html */ static fgw_error_t pcb_act_Import(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "Import() is the old, deprecated import netlist/schematics action that got removed\nPlease switch over to using the new action, ImportSch().\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0002.html\n"); + rnd_message(RND_MSG_ERROR, "Import() is the old, deprecated import netlist/schematics action that got removed\nPlease switch over to using the new action, ImportSch().\nFor details see: http://repo.hu/projects/pcb-rnd/help/err0002.html\n"); RND_ACT_IRES(1); return 0; } @@ -313,61 +313,61 @@ static fgw_error_t pcb_act_ToggleHideName(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ToggleHideName: deprecated feature removed with subcircuits; just delete\nthe text object if it should not be on the silk of the final board.\n"); + rnd_message(RND_MSG_ERROR, "ToggleHideName: deprecated feature removed with subcircuits; just delete\nthe text object if it should not be on the silk of the final board.\n"); return 1; } static fgw_error_t pcb_act_MinMaskGap(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "MinMaskGap: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "MinMaskGap: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ChangeHole(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ChangeHole: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ChangeHole: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ChangePaste(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ChangePaste: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ChangePaste: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ChangeSquare(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ChangeSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ChangeSquare: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_SetSquare(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "SetSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "SetSquare: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ClearSquare(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ClearSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ClearSquare: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ChangeOctagon(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ChangeOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ChangeOctagon: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_SetOctagon(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "SetOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "SetOctagon: deprecated feature; use padstackedit() instead\n"); return 1; } static fgw_error_t pcb_act_ClearOctagon(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_ERROR, "ClearOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(RND_MSG_ERROR, "ClearOctagon: deprecated feature; use padstackedit() instead\n"); return 1; } Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 30954) +++ trunk/src_plugins/order/order.c (revision 30955) @@ -72,7 +72,7 @@ return 0; } - rnd_message(PCB_MSG_ERROR, "CLI version of OrderPCB() not yet implemented\n"); + rnd_message(RND_MSG_ERROR, "CLI version of OrderPCB() not yet implemented\n"); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/order/order_dlg.c =================================================================== --- trunk/src_plugins/order/order_dlg.c (revision 30954) +++ trunk/src_plugins/order/order_dlg.c (revision 30955) @@ -17,7 +17,7 @@ return -1; /* do not open another */ if (pcb_order_imps.used == 0) { - rnd_message(PCB_MSG_ERROR, "OrderPCB(): there are no ordering plugins compiled/loaded\n"); + rnd_message(RND_MSG_ERROR, "OrderPCB(): there are no ordering plugins compiled/loaded\n"); return -1; } Index: trunk/src_plugins/order_pcbway/pcbway.c =================================================================== --- trunk/src_plugins/order_pcbway/pcbway.c (revision 30954) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 30955) @@ -73,18 +73,18 @@ if (update || (mt < 0) || ((now - mt) > CFG.cache_update_sec)) { if (CFG.verbose) { if (update) - rnd_message(PCB_MSG_INFO, "pcbway: static '%s', updating it in the cache\n", path); + rnd_message(RND_MSG_INFO, "pcbway: static '%s', updating it in the cache\n", path); else - rnd_message(PCB_MSG_INFO, "pcbway: stale '%s', updating it in the cache\n", path); + rnd_message(RND_MSG_INFO, "pcbway: stale '%s', updating it in the cache\n", path); } if (pcb_wget_disk(url, path, update, wopts) != 0) { - rnd_message(PCB_MSG_ERROR, "pcbway: failed to download %s\n", url); + rnd_message(RND_MSG_ERROR, "pcbway: failed to download %s\n", url); return -1; } } else if (CFG.verbose) - rnd_message(PCB_MSG_INFO, "pcbway: '%s' from cache\n", path); + rnd_message(RND_MSG_INFO, "pcbway: '%s' from cache\n", path); return 0; } @@ -136,7 +136,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "pcbway: can't open '%s' (%s) for read\n", fn, efn); + rnd_message(RND_MSG_ERROR, "pcbway: can't open '%s' (%s) for read\n", fn, efn); free(efn); return NULL; } @@ -144,7 +144,7 @@ doc = xmlReadFile(efn, NULL, 0); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); + rnd_message(RND_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); free(efn); return NULL; } @@ -159,18 +159,18 @@ xmlNode *root, *n, *c; if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: failed to parse the country xml\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: failed to parse the country xml\n"); return -1; } root = xmlDocGetRootElement(doc); if ((root != NULL) && (xmlStrcmp(root->name, (xmlChar *)"Country") != 0)) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: wrong root node in the country xml\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: wrong root node in the country xml\n"); return -1; } for(root = root->children; (root != NULL) && (xmlStrcmp(root->name, (xmlChar *)"Countrys") != 0); root = root->next) ; if (root == NULL) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: failed to find a node\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: failed to find a node\n"); return -1; } @@ -205,7 +205,7 @@ dflt = (const char *)xmlGetProp(n, (const xmlChar *)"default"); if ((type != NULL && strlen(type) > 128) || (strlen((char *)n->name) > 128) || (note != NULL && strlen(note) > 256) || (dflt != NULL && strlen(dflt) > 128)) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: invalid field description: too long\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: invalid field description: too long\n"); return -1; } @@ -267,7 +267,7 @@ vtp0_append(&form->fields, f); if (form->fields.used > 128) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: too many fields for a form\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: too many fields for a form\n"); return -1; } } @@ -284,11 +284,11 @@ octx->odata = NULL; if ((CFG.api_key == NULL) || (*CFG.api_key == '\0')) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: no api_key available."); + rnd_message(RND_MSG_ERROR, "order_pcbway: no api_key available."); return -1; } if (pcbway_cache_update(&PCB->hidlib) != 0) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: failed to update the cache."); + rnd_message(RND_MSG_ERROR, "order_pcbway: failed to update the cache."); return -1; } @@ -303,16 +303,16 @@ if (pcbway_load_countries(octx->odata, country_fn) != 0) res = -1; else if (pcbway_load_fields_(&PCB->hidlib, imp, octx, root) != 0) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: xml error: invalid API xml\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: xml error: invalid API xml\n"); res = -1; } free(country_fn); } else - rnd_message(PCB_MSG_ERROR, "order_pcbway: xml error: root is not \n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: xml error: root is not \n"); } else - rnd_message(PCB_MSG_ERROR, "order_pcbway: xml error: failed to parse the xml\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: xml error: failed to parse the xml\n"); xmlFreeDoc(doc); free(cachedir); @@ -383,7 +383,7 @@ root = xmlDocGetRootElement(doc); if ((root != NULL) && (xmlStrcmp(root->name, (xmlChar *)"PcbQuotationResponse") != 0)) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: wrong root node on quote answer\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: wrong root node on quote answer\n"); xmlFreeDoc(doc); return -1; } @@ -396,14 +396,14 @@ } if ((status == NULL) || (status->children == NULL) || (status->children->type != XML_TEXT_NODE)) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: missing from the quote response\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: missing from the quote response\n"); xmlFreeDoc(doc); return -1; } if (xmlStrcmp(status->children->content, (xmlChar *)"ok") != 0) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: server error in quote\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: server error in quote\n"); if ((error != NULL) && (error->children != NULL) && (error->children->type == XML_TEXT_NODE)) - rnd_message(PCB_MSG_ERROR, " %s\n", error->children->content); + rnd_message(RND_MSG_ERROR, " %s\n", error->children->content); xmlFreeDoc(doc); return -1; } @@ -460,7 +460,7 @@ tmpfn = rnd_tempfile_name_new("pcbway_quote.xml"); if (tmpfn == NULL) { - rnd_message(PCB_MSG_ERROR, "order_pcbway: can't get temp file name\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: can't get temp file name\n"); return; } @@ -467,7 +467,7 @@ fx = pcb_fopen(&PCB->hidlib, tmpfn, "w"); if (fx == NULL) { rnd_tempfile_unlink(tmpfn); - rnd_message(PCB_MSG_ERROR, "order_pcbway: can't open temp file\n"); + rnd_message(RND_MSG_ERROR, "order_pcbway: can't open temp file\n"); return; } @@ -514,7 +514,7 @@ wopts.post_file = tmpfn; if (pcb_wget_disk(SERVER "/api/Pcb/PcbQuotation", respfn, 0, &wopts) != 0) { - rnd_message(PCB_MSG_ERROR, "pcbway: failed to get a quote from the server\n"); + rnd_message(RND_MSG_ERROR, "pcbway: failed to get a quote from the server\n"); goto err; } } Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 30954) +++ trunk/src_plugins/polystitch/polystitch.c (revision 30955) @@ -54,7 +54,7 @@ PCB_ENDALL_LOOP; if (res == NULL) - rnd_message(PCB_MSG_ERROR, "Cannot find any polygons"); + rnd_message(RND_MSG_ERROR, "Cannot find any polygons"); return res; } @@ -76,7 +76,7 @@ } PCB_END_LOOP; - rnd_message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); + rnd_message(RND_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); return NULL; } Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 30954) +++ trunk/src_plugins/propedit/propdlg.c (revision 30955) @@ -421,15 +421,15 @@ propdlg_t *ctx = caller_data; pcb_hid_row_t *r = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wtree]); if (r == NULL) { - rnd_message(PCB_MSG_ERROR, "can not delete: no attribute selected\n"); + rnd_message(RND_MSG_ERROR, "can not delete: no attribute selected\n"); return; } if (r->path[0] != 'a') { - rnd_message(PCB_MSG_ERROR, "Only atributes (a/ subtree) can be deleted.\n"); + rnd_message(RND_MSG_ERROR, "Only atributes (a/ subtree) can be deleted.\n"); return; } if (pcb_propsel_del(&ctx->pe, r->path) < 1) { - rnd_message(PCB_MSG_ERROR, "Failed to remove the attribute from any object.\n"); + rnd_message(RND_MSG_ERROR, "Failed to remove the attribute from any object.\n"); return; } prop_refresh(ctx); Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 30954) +++ trunk/src_plugins/propedit/propedit.c (revision 30955) @@ -56,7 +56,7 @@ pcb_objtype_t type = pcb_search_obj_by_location(PCB_OBJ_SUBC, &o1, &o2, &o3, pcb_crosshair.X, pcb_crosshair.Y, PCB_SLOP); if (type == 0) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "No object under the cursor\n"); + rnd_message(RND_MSG_ERROR, "No object under the cursor\n"); return FGW_ERR_ARG_CONV; } goto object_scope; @@ -66,7 +66,7 @@ idp = pcb_str2idpath(pe->pcb, cmd+7); if (idp == NULL) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Failed to convert object ID: '%s'\n", cmd+7); + rnd_message(RND_MSG_ERROR, "Failed to convert object ID: '%s'\n", cmd+7); return FGW_ERR_ARG_CONV; } pcb_idpath_list_append(&pe->objs, idp); @@ -80,7 +80,7 @@ type = pcb_search_obj_by_location(PCB_OBJ_CLASS_REAL, &o1, &o2, &o3, pcb_crosshair.X, pcb_crosshair.Y, PCB_SLOP); if (type == 0) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "No object under the cursor\n"); + rnd_message(RND_MSG_ERROR, "No object under the cursor\n"); return FGW_ERR_ARG_CONV; } object_scope:; @@ -87,7 +87,7 @@ idp = pcb_obj2idpath(o2); if (idp == NULL) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Object under the cursor has no idpath\n"); + rnd_message(RND_MSG_ERROR, "Object under the cursor has no idpath\n"); return FGW_ERR_ARG_CONV; } pcb_idpath_list_append(&pe->objs, idp); @@ -99,7 +99,7 @@ id = pcb_layergrp_str2id(pe->pcb, cmd+9); if (id < 0) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Invalid layergrp ID '%s'\n", cmd+9); + rnd_message(RND_MSG_ERROR, "Invalid layergrp ID '%s'\n", cmd+9); return FGW_ERR_ARG_CONV; } } @@ -116,7 +116,7 @@ id = pcb_layer_str2id(pe->data, cmd+6); if (id < 0) { if (!quiet) - rnd_message(PCB_MSG_ERROR, "Invalid layer ID '%s'\n", cmd+6); + rnd_message(RND_MSG_ERROR, "Invalid layer ID '%s'\n", cmd+6); return FGW_ERR_ARG_CONV; } vtl0_append(&pe->layers, id); @@ -147,7 +147,7 @@ return 0; } if (!quiet) - rnd_message(PCB_MSG_ERROR, "Invalid scope: %s\n", cmd); + rnd_message(RND_MSG_ERROR, "Invalid scope: %s\n", cmd); return FGW_ERR_ARG_CONV; } return 0; @@ -355,12 +355,12 @@ PCB_API_CHK_VER; if (sizeof(long) < sizeof(pcb_layer_id_t)) { - rnd_message(PCB_MSG_ERROR, "can't load propedig: layer id type wider than long\n"); + rnd_message(RND_MSG_ERROR, "can't load propedig: layer id type wider than long\n"); return -1; } if (sizeof(long) < sizeof(pcb_layergrp_id_t)) { - rnd_message(PCB_MSG_ERROR, "can't load propedig: layergrp id type wider than long\n"); + rnd_message(RND_MSG_ERROR, "can't load propedig: layergrp id type wider than long\n"); return -1; } Index: trunk/src_plugins/query/fnc_glue.c =================================================================== --- trunk/src_plugins/query/fnc_glue.c (revision 30954) +++ trunk/src_plugins/query/fnc_glue.c (revision 30955) @@ -34,7 +34,7 @@ fgw_arg_t tmp, resa, arga[PCB_QRY_MAX_FUNC_ARGS], *arg; if (argv[0].type != PCBQ_VT_STRING) { - rnd_message(PCB_MSG_ERROR, "query: action() first argument must be a string\n"); + rnd_message(RND_MSG_ERROR, "query: action() first argument must be a string\n"); return -1; } @@ -105,12 +105,12 @@ goto fin; \ } \ else if (fgw_ptr_in_domain(&rnd_fgw, val, RND_PTR_DOMAIN_IDPATH_LIST)) { \ - rnd_message(PCB_MSG_ERROR, "query action(): can not convert object list yet\n"); \ + rnd_message(RND_MSG_ERROR, "query action(): can not convert object list yet\n"); \ res->type = PCBQ_VT_VOID; \ goto fin; \ } \ else { \ - rnd_message(PCB_MSG_ERROR, "query action(): can not convert unknown pointer\n"); \ + rnd_message(RND_MSG_ERROR, "query action(): can not convert unknown pointer\n"); \ res->type = PCBQ_VT_VOID; \ goto fin; \ } Index: trunk/src_plugins/query/query.c =================================================================== --- trunk/src_plugins/query/query.c (revision 30954) +++ trunk/src_plugins/query/query.c (revision 30955) @@ -384,7 +384,7 @@ /******** parser helper ********/ void qry_error(void *prog, const char *err) { - pcb_trace("qry_error: %s\n", err); + rnd_trace("qry_error: %s\n", err); } int qry_wrap() Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 30954) +++ trunk/src_plugins/query/query_act.c (revision 30955) @@ -159,7 +159,7 @@ int res, bufno = -1; /* empty scope means board */ if (script == NULL) { - rnd_message(PCB_MSG_ERROR, "Compilation error: no script specified.\n"); + rnd_message(RND_MSG_ERROR, "Compilation error: no script specified.\n"); return -1; } @@ -168,7 +168,7 @@ qry_parse(&prg); if (prg == NULL) { - rnd_message(PCB_MSG_ERROR, "Compilation error.\n"); + rnd_message(RND_MSG_ERROR, "Compilation error.\n"); return -1; } @@ -181,13 +181,13 @@ char *end; bufno = strtol(scope, &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "Invalid buffer number: '%s': not an integer\n", scope); + rnd_message(RND_MSG_ERROR, "Invalid buffer number: '%s': not an integer\n", scope); pcb_qry_n_free(prg); return -1; } bufno--; if ((bufno < 0) || (bufno >= PCB_MAX_BUFFER)) { - rnd_message(PCB_MSG_ERROR, "Invalid buffer number: '%d' out of range 1..%d\n", bufno+1, PCB_MAX_BUFFER); + rnd_message(RND_MSG_ERROR, "Invalid buffer number: '%d' out of range 1..%d\n", bufno+1, PCB_MAX_BUFFER); pcb_qry_n_free(prg); return -1; } @@ -196,7 +196,7 @@ bufno = conf_core.editor.buffer_number; } else { - rnd_message(PCB_MSG_ERROR, "Invalid scope: '%s': must be board or buffer or bufferN\n", scope); + rnd_message(RND_MSG_ERROR, "Invalid scope: '%s': must be board or buffer or bufferN\n", scope); pcb_qry_n_free(prg); return -1; } @@ -263,7 +263,7 @@ pcb_flag_t flg = pcb_strflg_s2f(cmd + 8, NULL, NULL, 0); sel.what = flg.f; if (sel.what == 0) { - rnd_message(PCB_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); + rnd_message(RND_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); RND_ACT_IRES(0); return 0; } @@ -291,7 +291,7 @@ pcb_flag_t flg = pcb_strflg_s2f(cmd + 10, NULL, NULL, 0); sel.what = flg.f; if (sel.what == 0) { - rnd_message(PCB_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); + rnd_message(RND_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); RND_ACT_IRES(0); return 0; } @@ -384,7 +384,7 @@ res[idx-1].next = &res[idx]; res[idx].type = PCBQ_FIELD; res[idx].precomp.fld = query_fields_sphash(fname); -/*pcb_trace("[%d/%d] '%s' -> %d\n", idx, len, fname, res[idx].precomp.fld);*/ +/*rnd_trace("[%d/%d] '%s' -> %d\n", idx, len, fname, res[idx].precomp.fld);*/ if (res[idx].precomp.fld < 0) /* if compilation failed, this will need to be evaluated run-time, save as string */ res[idx].data.str = rnd_strdup(fname); fno = fname; Index: trunk/src_plugins/query/query_exec.c =================================================================== --- trunk/src_plugins/query/query_exec.c (revision 30954) +++ trunk/src_plugins/query/query_exec.c (revision 30955) @@ -689,7 +689,7 @@ return -1; if (farg != NULL) { - rnd_message(PCB_MSG_ERROR, "too many function arguments\n"); + rnd_message(RND_MSG_ERROR, "too many function arguments\n"); return -1; } return fname->data.fnc(ctx, n, args, res); Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 30954) +++ trunk/src_plugins/renumber/renumber.c (revision 30955) @@ -116,7 +116,7 @@ } if ((out = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL)) == NULL) { - rnd_message(PCB_MSG_ERROR, "Could not open %s\n", name); + rnd_message(RND_MSG_ERROR, "Could not open %s\n", name); if (free_name && name) free((char*)name); RND_ACT_IRES(1); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 30954) +++ trunk/src_plugins/report/report.c (revision 30955) @@ -394,7 +394,7 @@ case PCB_OBJ_LINE_POINT: case PCB_OBJ_POLY_POINT: report_point(&tmp, type, ptr1, ptr2); break; case PCB_OBJ_VOID: - rnd_message(PCB_MSG_INFO, "Nothing found to report on\n"); + rnd_message(RND_MSG_INFO, "Nothing found to report on\n"); RND_ACT_IRES(1); return 0; default: pcb_append_printf(&tmp, "Unknown\n"); break; @@ -413,7 +413,7 @@ /* create dialog box */ if ((how != NULL) && (strcmp(how, "log") == 0)) - rnd_message(PCB_MSG_INFO, "--- Report ---\n%s---\n", tmp.array); + rnd_message(RND_MSG_INFO, "--- Report ---\n%s---\n", tmp.array); else rdialog("Report", tmp.array); gds_uninit(&tmp); @@ -559,9 +559,9 @@ pcb_snprintf(buf, sizeof(buf), "%$m*", units_name, length); if (err.used != 0) - rnd_message(PCB_MSG_INFO, "Net %s length %s, BUT BEWARE:%s\n", net->name, buf, err.array); + rnd_message(RND_MSG_INFO, "Net %s length %s, BUT BEWARE:%s\n", net->name, buf, err.array); else - rnd_message(PCB_MSG_INFO, "Net %s length %s\n", net->name, buf); + rnd_message(RND_MSG_INFO, "Net %s length %s\n", net->name, buf); gds_uninit(&err); } } @@ -612,17 +612,17 @@ pcb_snprintf(buf, sizeof(buf), "%$m*", pcbhl_conf.editor.grid_unit->suffix, length); if (netname) - rnd_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); + rnd_message(RND_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); else - rnd_message(PCB_MSG_INFO, "Net length: %s\n", buf); + rnd_message(RND_MSG_INFO, "Net length: %s\n", buf); if (err.used != 0) - rnd_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); + rnd_message(RND_MSG_INFO, "BUT BEWARE: %s\n", err.array); ret = 0; } else { - rnd_message(PCB_MSG_ERROR, "No net under cursor.\n"); + rnd_message(RND_MSG_ERROR, "No net under cursor.\n"); ret = 1; } @@ -644,7 +644,7 @@ type = pcb_search_screen(x, y, PCB_OBJ_LINE, &r1, &r2, &r3); if (type != PCB_OBJ_LINE) { - rnd_message(PCB_MSG_ERROR, "can't find a line to split\n"); + rnd_message(RND_MSG_ERROR, "can't find a line to split\n"); return -1; } l = r2; @@ -651,18 +651,18 @@ assert(l->parent_type == PCB_PARENT_LAYER); ly = l->parent.layer; if (!(pcb_layer_flags_(ly) & PCB_LYT_COPPER)) { - rnd_message(PCB_MSG_ERROR, "not a copper line, can't split it\n"); + rnd_message(RND_MSG_ERROR, "not a copper line, can't split it\n"); return -1; } #define MINDIST PCB_MIL_TO_COORD(40) if ((rnd_distance(l->Point1.X, l->Point1.Y, x, y) < MINDIST) || (rnd_distance(l->Point2.X, l->Point2.Y, x, y) < MINDIST)) { - rnd_message(PCB_MSG_ERROR, "Can not split near the endpoint of a line\n"); + rnd_message(RND_MSG_ERROR, "Can not split near the endpoint of a line\n"); return -1; } #undef MINDIST2 - rnd_message(PCB_MSG_INFO, "The two arms of the net are:\n"); + rnd_message(RND_MSG_INFO, "The two arms of the net are:\n"); pcb_r_delete_entry(ly->line_tree, (rnd_box_t *)l); ox = l->Point1.X; oy = l->Point1.Y; l->Point1.X = x; l->Point1.Y = y; pcb_r_insert_entry(ly->line_tree, (rnd_box_t *)l); @@ -714,13 +714,13 @@ netname = net->name; term = pcb_termlist_first(&net->conns); if (term == NULL) { - rnd_message(PCB_MSG_INFO, "Net found, but it has not terminals.\n"); + rnd_message(RND_MSG_INFO, "Net found, but it has not terminals.\n"); return 1; } obj = pcb_term_find_name(PCB, PCB->Data, PCB_LYT_COPPER, term->refdes, term->term, NULL, NULL); if (obj == NULL) { - rnd_message(PCB_MSG_INFO, "Net found, but its terminal %s-%s is not on the board.\n", term->refdes, term->term); + rnd_message(RND_MSG_INFO, "Net found, but its terminal %s-%s is not on the board.\n", term->refdes, term->term); return 1; } pcb_obj_center(obj, &x, &y); @@ -728,7 +728,7 @@ } if (netname == NULL) { - rnd_message(PCB_MSG_ERROR, "No net named %s\n", tofind); + rnd_message(RND_MSG_ERROR, "No net named %s\n", tofind); return 1; } @@ -738,9 +738,9 @@ if (!found) { if (netname != NULL) - rnd_message(PCB_MSG_INFO, "Net found, but no lines or arcs were flagged.\n"); + rnd_message(RND_MSG_INFO, "Net found, but no lines or arcs were flagged.\n"); else - rnd_message(PCB_MSG_ERROR, "Net not found.\n"); + rnd_message(RND_MSG_ERROR, "Net not found.\n"); gds_uninit(&err); return 1; @@ -750,11 +750,11 @@ char buf[50]; pcb_snprintf(buf, sizeof(buf), "%$m*", pcbhl_conf.editor.grid_unit->suffix, length); if (netname) - rnd_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); + rnd_message(RND_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); else - rnd_message(PCB_MSG_INFO, "Net length: %s\n", buf); + rnd_message(RND_MSG_INFO, "Net length: %s\n", buf); if (err.used != 0) - rnd_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); + rnd_message(RND_MSG_INFO, "BUT BEWARE: %s\n", err.array); } gds_uninit(&err); Index: trunk/src_plugins/rubberband_orig/fgeometry.c =================================================================== --- trunk/src_plugins/rubberband_orig/fgeometry.c (revision 30954) +++ trunk/src_plugins/rubberband_orig/fgeometry.c (revision 30955) @@ -161,7 +161,7 @@ /* Can we remove this? */ { double s = (d2y * (p2x - p1x) + d2x * (p1y - p2y)) / (d2y * d1x - d2x * d1y); - pcb_trace("Intersection t=%f, s=%f\n", t, s); + rnd_trace("Intersection t=%f, s=%f\n", t, s); ret.x = p1x + s * d1x; ret.y = p1y + s * d1y; @@ -171,7 +171,7 @@ ret.x = p2x + t * d2x; ret.y = p2y + t * d2y; - /*pcb_trace("Intersection x=%f, y=%f\n", ret.x, ret.y); */ + /*rnd_trace("Intersection x=%f, y=%f\n", ret.x, ret.y); */ } return ret; } Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30954) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30955) @@ -381,7 +381,7 @@ pcb_rubber_band_create(rbnd, NULL, (pcb_line_t *) rat, 1, i->delta_index); break; default: - rnd_message(PCB_MSG_ERROR, "hace: bad rubber-rat lookup callback\n"); + rnd_message(RND_MSG_ERROR, "hace: bad rubber-rat lookup callback\n"); } return PCB_R_DIR_NOT_FOUND; } Index: trunk/src_plugins/script/c_script.c =================================================================== --- trunk/src_plugins/script/c_script.c (revision 30954) +++ trunk/src_plugins/script/c_script.c (revision 30955) @@ -54,7 +54,7 @@ if (pup_load_lib(&script_pup, library, filename) != 0) { - rnd_message(PCB_MSG_ERROR, "Can't dlopen() %s\n", filename); + rnd_message(RND_MSG_ERROR, "Can't dlopen() %s\n", filename); free(library); return -1; } @@ -61,13 +61,13 @@ init = (init_t)pcb_cast_d2f(pup_dlsym(library, "pcb_rnd_init")); if (init == NULL) { - rnd_message(PCB_MSG_ERROR, "Can't find pcb_rnd_init() in %s - not a pcb-rnd c \"script\".\n", filename); + rnd_message(RND_MSG_ERROR, "Can't find pcb_rnd_init() in %s - not a pcb-rnd c \"script\".\n", filename); free(library); return -1; } if (init(obj, opts) != 0) { - rnd_message(PCB_MSG_ERROR, "%s pcb_rnd_init() returned error\n", filename); + rnd_message(RND_MSG_ERROR, "%s pcb_rnd_init() returned error\n", filename); free(library); return -1; } Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30954) +++ trunk/src_plugins/script/live_script.c (revision 30955) @@ -189,7 +189,7 @@ else if (w == lvs->wload) arg = "load"; else if (w == lvs->wsave) arg = "save"; else { - rnd_message(PCB_MSG_ERROR, "lvs_button_cb(): internal error: unhandled switch case\n"); + rnd_message(RND_MSG_ERROR, "lvs_button_cb(): internal error: unhandled switch case\n"); return; } @@ -205,7 +205,7 @@ if (lvs_list_langs(NULL, lvs) < 1) { lvs_free_langs(lvs); free(lvs); - rnd_message(PCB_MSG_ERROR, "live_script: no scripting language engines found\nPlease compile and install fungw from source, then\nreconfigure and recompile pcb-rnd.\n"); + rnd_message(RND_MSG_ERROR, "live_script: no scripting language engines found\nPlease compile and install fungw from source, then\nreconfigure and recompile pcb-rnd.\n"); return NULL; } @@ -291,7 +291,7 @@ f = pcb_fopen(hl, fn, "w"); if (f == NULL) { rnd_tempfile_unlink(fn); - rnd_message(PCB_MSG_ERROR, "live_script: can't open temp file for write\n"); + rnd_message(RND_MSG_ERROR, "live_script: can't open temp file for write\n"); return -1; } @@ -308,7 +308,7 @@ numu = pcb_num_undo(); if (pcb_script_load(lvs->longname, fn, lang) != 0) { - rnd_message(PCB_MSG_ERROR, "live_script: can't load/parse the script\n"); + rnd_message(RND_MSG_ERROR, "live_script: can't load/parse the script\n"); res = -1; } lvs->loaded = 1; @@ -339,7 +339,7 @@ if (lvs->undo_pre == lvs->undo_post) return 0; /* the script did nothing */ if (lvs->undo_post < pcb_undo_serial()) { - rnd_message(PCB_MSG_WARNING, "Can not undo live script modifications:\nthere was user edit after script executaion.\n"); + rnd_message(RND_MSG_WARNING, "Can not undo live script modifications:\nthere was user edit after script executaion.\n"); return 1; } pcb_undo_above(lvs->undo_pre); @@ -366,7 +366,7 @@ f = pcb_fopen(hl, fn, "r"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "live_script: failed to open '%s' for read\n", fn); + rnd_message(RND_MSG_ERROR, "live_script: failed to open '%s' for read\n", fn); return -1; } @@ -412,13 +412,13 @@ f = pcb_fopen(hl, fn, "w"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "live_script: failed to open '%s' for write\n", fn); + rnd_message(RND_MSG_ERROR, "live_script: failed to open '%s' for write\n", fn); return -1; } src = txt->hid_get_text(atxt, lvs->dlg_hid_ctx); if (fwrite(src, strlen(src), 1, f) != 1) { - rnd_message(PCB_MSG_ERROR, "live_script: failed to write script source to '%s'\n", fn); + rnd_message(RND_MSG_ERROR, "live_script: failed to write script source to '%s'\n", fn); res = -1; } free(src); @@ -447,7 +447,7 @@ if (name == NULL) name = "default"; lvs = htsp_get(&pcb_live_scripts, name); if (lvs != NULL) { - rnd_message(PCB_MSG_ERROR, "live script '%s' is already open\n", name); + rnd_message(RND_MSG_ERROR, "live script '%s' is already open\n", name); RND_ACT_IRES(1); return 0; } @@ -462,7 +462,7 @@ } if (name == NULL) { - rnd_message(PCB_MSG_ERROR, "script name (second argument) required\n"); + rnd_message(RND_MSG_ERROR, "script name (second argument) required\n"); RND_ACT_IRES(1); return 0; } @@ -469,7 +469,7 @@ lvs = htsp_get(&pcb_live_scripts, name); if (lvs == NULL) { - rnd_message(PCB_MSG_ERROR, "script '%s' does not exist\n", name); + rnd_message(RND_MSG_ERROR, "script '%s' does not exist\n", name); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/script/perma.c =================================================================== --- trunk/src_plugins/script/perma.c (revision 30954) +++ trunk/src_plugins/script/perma.c (revision 30955) @@ -66,13 +66,13 @@ fclose(f); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Failed to parse script config '%s':\n'%s'\n", path, errmsg); + rnd_message(RND_MSG_ERROR, "Failed to parse script config '%s':\n'%s'\n", path, errmsg); goto end; } n = doc->root; if ((n->type != LHT_LIST) || (strcmp(n->name, "pcb-rnd-perma-script-v1") != 0)) { - rnd_message(PCB_MSG_ERROR, "Failed to load script config '%s':\nroot node is not li:pcb-rnd-perma-script-v1\n", path); + rnd_message(RND_MSG_ERROR, "Failed to load script config '%s':\nroot node is not li:pcb-rnd-perma-script-v1\n", path); goto end; } @@ -79,13 +79,13 @@ for(n = n->data.list.first; n != NULL; n = n->next) { const char *id = n->name, *path_in, *lang = NULL; if (n->type != LHT_HASH) { - rnd_message(PCB_MSG_ERROR, "ignoring non-hash child '%s' in '%s'\n", n->name, path); + rnd_message(RND_MSG_ERROR, "ignoring non-hash child '%s' in '%s'\n", n->name, path); continue; } npath = lht_dom_hash_get(n, "path"); if ((npath == NULL) || (npath->type != LHT_TEXT)) { - rnd_message(PCB_MSG_ERROR, "ignoring '%s' in '%s': no path\n", n->name, path); + rnd_message(RND_MSG_ERROR, "ignoring '%s' in '%s': no path\n", n->name, path); continue; } path_in = npath->data.text.value; @@ -93,7 +93,7 @@ nlang = lht_dom_hash_get(n, "lang"); if (nlang != NULL) { if (npath->type != LHT_TEXT) { - rnd_message(PCB_MSG_ERROR, "ignoring '%s' in '%s': invalid lang node type\n", n->name, path); + rnd_message(RND_MSG_ERROR, "ignoring '%s' in '%s': invalid lang node type\n", n->name, path); continue; } lang = nlang->data.text.value; @@ -101,7 +101,7 @@ else { /* guess from path */ const char *tmp = strrchr(path_in, '.'); if (tmp == NULL) { - rnd_message(PCB_MSG_ERROR, "ignoring '%s' in '%s': no lang specified and file name is not suitable for guessing\n", n->name, path); + rnd_message(RND_MSG_ERROR, "ignoring '%s' in '%s': no lang specified and file name is not suitable for guessing\n", n->name, path); continue; } lang = guess_lang(tmp+1); @@ -110,10 +110,10 @@ if (perma_load(dir, id, path_in, lang) == 0) succ++; else - rnd_message(PCB_MSG_ERROR, "failed to load script '%s' in '%s'\n", n->name, path); + rnd_message(RND_MSG_ERROR, "failed to load script '%s' in '%s'\n", n->name, path); } - rnd_message(PCB_MSG_INFO, "Loaded %ld scripts from '%s'\n", succ, path); + rnd_message(RND_MSG_INFO, "Loaded %ld scripts from '%s'\n", succ, path); end:; lht_dom_uninit(doc); Index: trunk/src_plugins/script/script.c =================================================================== --- trunk/src_plugins/script/script.c (revision 30954) +++ trunk/src_plugins/script/script.c (revision 30955) @@ -168,7 +168,7 @@ char *fn; if (script_persistency_id == NULL) { - rnd_message(PCB_MSG_ERROR, "ScriptPersistency may be called only from the init part of a script\n"); + rnd_message(RND_MSG_ERROR, "ScriptPersistency may be called only from the init part of a script\n"); goto err; } @@ -210,7 +210,7 @@ goto succ; } - rnd_message(PCB_MSG_ERROR, "Unknown command for ScriptPersistency\n"); + rnd_message(RND_MSG_ERROR, "Unknown command for ScriptPersistency\n"); err:; RND_ACT_IRES(-1); @@ -225,7 +225,7 @@ { if (force_id == NULL) { if (script_persistency_id == NULL) { - rnd_message(PCB_MSG_ERROR, "ScriptCookie called from outside of script init, can not generate the cookie\n"); + rnd_message(RND_MSG_ERROR, "ScriptCookie called from outside of script init, can not generate the cookie\n"); return NULL; } force_id = script_persistency_id; @@ -260,13 +260,13 @@ const char *old_id; if (htsp_has(&scripts, id)) { - rnd_message(PCB_MSG_ERROR, "Can not load script %s from file %s: ID already in use\n", id, fn); + rnd_message(RND_MSG_ERROR, "Can not load script %s from file %s: ID already in use\n", id, fn); return -1; } if (lang == NULL) { TODO(": guess") - rnd_message(PCB_MSG_ERROR, "Can not load script %s from file %s: failed to guess language from file name\n", id, fn); + rnd_message(RND_MSG_ERROR, "Can not load script %s from file %s: failed to guess language from file name\n", id, fn); return -1; } @@ -287,7 +287,7 @@ pup = pup_load(&script_pup, pcb_script_pup_paths, name, 0, &st); script_persistency_id = old_id; if (pup == NULL) { - rnd_message(PCB_MSG_ERROR, "Can not load script engine %s for language %s\n", name, lang); + rnd_message(RND_MSG_ERROR, "Can not load script engine %s for language %s\n", name, lang); return -1; } #endif @@ -310,7 +310,7 @@ if (s->obj == NULL) { script_free(s, NULL, NULL); - rnd_message(PCB_MSG_ERROR, "Failed to parse/execute %s script from file %s\n", id, fn); + rnd_message(RND_MSG_ERROR, "Failed to parse/execute %s script from file %s\n", id, fn); return -1; } @@ -353,7 +353,7 @@ for(e = htsp_first(&scripts); e; e = htsp_next(&scripts, e)) { script_t *s = (script_t *)e->value; if ((r == NULL) || (re_se_exec(r, s->id)) || (re_se_exec(r, s->fn)) || (re_se_exec(r, s->lang))) - rnd_message(PCB_MSG_INFO, "id=%s fn=%s lang=%s\n", s->id, s->fn, s->lang); + rnd_message(RND_MSG_INFO, "id=%s fn=%s lang=%s\n", s->id, s->fn, s->lang); } if (r != NULL) @@ -396,7 +396,7 @@ f = pcb_fopen(NULL, fn, "w"); if (f == NULL) { rnd_tempfile_unlink(fn); - rnd_message(PCB_MSG_ERROR, "script oneliner: can't open temp file for write\n"); + rnd_message(RND_MSG_ERROR, "script oneliner: can't open temp file for write\n"); return -1; } oneliner_boilerplate(f, lang, 1); @@ -406,7 +406,7 @@ fclose(f); if (pcb_script_load("__oneliner", fn, lang) != 0) { - rnd_message(PCB_MSG_ERROR, "script oneliner: can't load/parse the script\n"); + rnd_message(RND_MSG_ERROR, "script oneliner: can't load/parse the script\n"); res = -1; } pcb_script_unload("__oneliner", NULL); Index: trunk/src_plugins/script/script_act.c =================================================================== --- trunk/src_plugins/script/script_act.c (revision 30954) +++ trunk/src_plugins/script/script_act.c (revision 30955) @@ -297,7 +297,7 @@ #define ID_VALIDATE(id, act) \ do { \ if (script_id_invalid(id)) { \ - rnd_message(PCB_MSG_ERROR, #act ": Invalid script ID '%s' (must contain only alphanumeric characters and underscores)\n", id); \ + rnd_message(RND_MSG_ERROR, #act ": Invalid script ID '%s' (must contain only alphanumeric characters and underscores)\n", id); \ return FGW_ERR_ARG_CONV; \ } \ } while(0) Index: trunk/src_plugins/serpentine/serpentine.c =================================================================== --- trunk/src_plugins/serpentine/serpentine.c (revision 30954) +++ trunk/src_plugins/serpentine/serpentine.c (revision 30955) @@ -320,7 +320,7 @@ pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; } else - rnd_message(PCB_MSG_WARNING, "Serpentines can be only drawn onto a line\n"); + rnd_message(RND_MSG_WARNING, "Serpentines can be only drawn onto a line\n"); break; case PCB_CH_STATE_SECOND: Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 30954) +++ trunk/src_plugins/shand_cmd/command.c (revision 30955) @@ -51,7 +51,7 @@ static const char pcb_acth_Help[] = "Print a help message for commands."; static fgw_error_t pcb_act_Help(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_message(PCB_MSG_INFO, + rnd_message(RND_MSG_INFO, "following shorthand commands are supported:\n" " h display this help message\n" " l [file] load layout\n" @@ -170,7 +170,7 @@ pcb_board_set_changed_flag(pcb_false); } else - rnd_message(PCB_MSG_ERROR, "No filename to save to yet\n"); + rnd_message(RND_MSG_ERROR, "No filename to save to yet\n"); } else { if (pcb_save_pcb(filename, NULL) == 0) { Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 30954) +++ trunk/src_plugins/shape/shape.c (revision 30955) @@ -341,7 +341,7 @@ *y = pcb_get_value(sy, NULL, NULL, &succ); free(tmp); if (!succ) { - rnd_message(PCB_MSG_ERROR, "regpoly(): invalid center coords '%s'\n", dst); + rnd_message(RND_MSG_ERROR, "regpoly(): invalid center coords '%s'\n", dst); return -1; } } @@ -388,12 +388,12 @@ char *end; if (argc < 3) { - rnd_message(PCB_MSG_ERROR, "regpoly() needs at least two parameters\n"); + rnd_message(RND_MSG_ERROR, "regpoly() needs at least two parameters\n"); RND_ACT_IRES(-1); return 0; } if (argc > 5) { - rnd_message(PCB_MSG_ERROR, "regpoly(): too many arguments\n"); + rnd_message(RND_MSG_ERROR, "regpoly(): too many arguments\n"); RND_ACT_IRES(-1); return 0; } @@ -410,7 +410,7 @@ corners = strtol(args[a], &end, 10); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "regpoly(): invalid number of corners '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "regpoly(): invalid number of corners '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -419,7 +419,7 @@ /* convert radii */ succ = parse2coords(args[a], &rx, &ry); if (!succ) { - rnd_message(PCB_MSG_ERROR, "regpoly(): invalid radius '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "regpoly(): invalid radius '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -428,7 +428,7 @@ if (a < argc-1) { rot = strtod(args[a], &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "regpoly(): invalid rotation '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "regpoly(): invalid rotation '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -438,7 +438,7 @@ rnd_hid_get_coords("Click on the center of the polygon", &x, &y, 0); if (regpoly_place(data, PCB_CURRLAYER(PCB), corners, rx, ry, rot, x, y) == NULL) - rnd_message(PCB_MSG_ERROR, "regpoly(): failed to create the polygon\n"); + rnd_message(RND_MSG_ERROR, "regpoly(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; @@ -459,12 +459,12 @@ pcb_shape_corner_t corner[4] = { PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND}; if (argc < 2) { - rnd_message(PCB_MSG_ERROR, "roundrect() needs at least one parameters\n"); + rnd_message(RND_MSG_ERROR, "roundrect() needs at least one parameters\n"); RND_ACT_IRES(-1); return 0; } if (argc > 8) { - rnd_message(PCB_MSG_ERROR, "roundrect(): too many arguments\n"); + rnd_message(RND_MSG_ERROR, "roundrect(): too many arguments\n"); RND_ACT_IRES(-1); return 0; } @@ -490,7 +490,7 @@ /* convert width;height */ succ = parse2coords(args[a], &w, &h); if (!succ) { - rnd_message(PCB_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -500,7 +500,7 @@ if (a < argc-1) { succ = parse2coords(args[a], &rx, &ry); if (!succ) { - rnd_message(PCB_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -512,7 +512,7 @@ if (a < argc-1) { rot = strtod(args[a], &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "roundrect(): invalid rotation '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "roundrect(): invalid rotation '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -528,7 +528,7 @@ case 'q': case 'Q': corner[n] = PCB_CORN_SQUARE; break; case 'c': case 'C': corner[n] = PCB_CORN_CHAMF; break; default: - rnd_message(PCB_MSG_ERROR, "roundrect(): invalid corner style character '%c' - has to eb r for round, q for square or c for chamfed", *s); + rnd_message(RND_MSG_ERROR, "roundrect(): invalid corner style character '%c' - has to eb r for round, q for square or c for chamfed", *s); RND_ACT_IRES(-1); return 0; } @@ -539,7 +539,7 @@ if (a < argc-1) { roundres = strtod(args[a], &end); if (*end != '\0') { - rnd_message(PCB_MSG_ERROR, "roundrect(): roundness '%s'\n", args[a]); + rnd_message(RND_MSG_ERROR, "roundrect(): roundness '%s'\n", args[a]); RND_ACT_IRES(-1); return 0; } @@ -554,7 +554,7 @@ rnd_hid_get_coords("Click on the center of the polygon", &x, &y, 0); if (roundrect_place(data, PCB_CURRLAYER(PCB), w, h, rx, ry, rot, x, y, corner, roundres) == NULL) - rnd_message(PCB_MSG_ERROR, "roundrect(): failed to create the polygon\n"); + rnd_message(RND_MSG_ERROR, "roundrect(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; @@ -571,12 +571,12 @@ rnd_coord_t x = 0, y = 0, dia; if (argc < 2) { - rnd_message(PCB_MSG_ERROR, "circle() needs at least one parameters (diameter)\n"); + rnd_message(RND_MSG_ERROR, "circle() needs at least one parameters (diameter)\n"); RND_ACT_IRES(-1); return 0; } if (argc > 3) { - rnd_message(PCB_MSG_ERROR, "circle(): too many arguments\n"); + rnd_message(RND_MSG_ERROR, "circle(): too many arguments\n"); RND_ACT_IRES(-1); return 0; } @@ -593,13 +593,13 @@ dia = pcb_get_value(args[a], NULL, NULL, &succ); if (!succ) { - rnd_message(PCB_MSG_ERROR, "circle(): failed to convert dia: invalid coord (%s)\n", args[a]); + rnd_message(RND_MSG_ERROR, "circle(): failed to convert dia: invalid coord (%s)\n", args[a]); RND_ACT_IRES(1); return 0; } if ((dia < 1) || (dia > (PCB->hidlib.size_x + PCB->hidlib.size_y)/4)) { - rnd_message(PCB_MSG_ERROR, "circle(): invalid diameter\n"); + rnd_message(RND_MSG_ERROR, "circle(): invalid diameter\n"); RND_ACT_IRES(1); return 0; } @@ -608,7 +608,7 @@ rnd_hid_get_coords("Click on the center of the circle", &x, &y, 0); if (circle_place(PCB->Data, PCB_CURRLAYER(PCB), dia, x, y) == NULL) - rnd_message(PCB_MSG_ERROR, "circle(): failed to create the polygon\n"); + rnd_message(RND_MSG_ERROR, "circle(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; Index: trunk/src_plugins/shape/shape_dialog.c =================================================================== --- trunk/src_plugins/shape/shape_dialog.c (revision 30954) +++ trunk/src_plugins/shape/shape_dialog.c (revision 30955) @@ -104,7 +104,7 @@ rnd_coord_t dia = shp->dlg[shp->dia].val.crd; if ((dia < 1) || (dia > (PCB->hidlib.size_x + PCB->hidlib.size_y)/4)) { - rnd_message(PCB_MSG_ERROR, "Invalid diameter.\n"); + rnd_message(RND_MSG_ERROR, "Invalid diameter.\n"); return; } Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 30954) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 30955) @@ -1037,7 +1037,7 @@ pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; } else - rnd_message(PCB_MSG_WARNING, "Sketch lines can be only drawn from a terminal\n"); + rnd_message(RND_MSG_WARNING, "Sketch lines can be only drawn from a terminal\n"); } break; @@ -1054,14 +1054,14 @@ pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; } else { - rnd_message(PCB_MSG_WARNING, "Cannot finish placing wire at this terminal\n"); - rnd_message(PCB_MSG_WARNING, "(the terminal does not belong to the routed net or is the starting terminal)\n"); + rnd_message(RND_MSG_WARNING, "Cannot finish placing wire at this terminal\n"); + rnd_message(RND_MSG_WARNING, "(the terminal does not belong to the routed net or is the starting terminal)\n"); } break; } } if (attached_path_next_point(NULL) == pcb_false) - rnd_message(PCB_MSG_WARNING, "Cannot route the wire this way\n"); + rnd_message(RND_MSG_WARNING, "Cannot route the wire this way\n"); break; } Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 30954) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 30955) @@ -120,7 +120,7 @@ } if (nl->used == 0) { - rnd_message(PCB_MSG_ERROR, "Can't use SmartDisperse because no netlist is loaded.\n"); + rnd_message(RND_MSG_ERROR, "Can't use SmartDisperse because no netlist is loaded.\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 30954) +++ trunk/src_plugins/stroke/stroke.c (revision 30955) @@ -66,7 +66,7 @@ return 1; } if (conf_stroke.plugins.stroke.warn4unknown) - rnd_message(PCB_MSG_WARNING, "Stroke: sequence '%s' is not configured.\n", seq); + rnd_message(RND_MSG_WARNING, "Stroke: sequence '%s' is not configured.\n", seq); return 0; } @@ -127,7 +127,7 @@ fgw_func_t *f = fgw_func_lookup(&rnd_fgw, "zoomto"); if (f == NULL) { - rnd_message(PCB_MSG_ERROR, "zoomto action is not available"); + rnd_message(RND_MSG_ERROR, "zoomto action is not available"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/tool_std/tool_arc.c =================================================================== --- trunk/src_plugins/tool_std/tool_arc.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_arc.c (revision 30955) @@ -93,7 +93,7 @@ pcb_angle_t sa, dir; wx = hl->tool_x - pcb_crosshair.AttachedBox.Point1.X; wy = hl->tool_y - pcb_crosshair.AttachedBox.Point1.Y; -pcb_trace("arc: %mm %mm wh %mm %mm\n", hl->tool_x, hl->tool_y, wx, wy); +rnd_trace("arc: %mm %mm wh %mm %mm\n", hl->tool_x, hl->tool_y, wx, wy); if (PCB_XOR(pcb_crosshair.AttachedBox.otherway, coord_abs(wy) > coord_abs(wx))) { pcb_crosshair.AttachedBox.Point2.X = pcb_crosshair.AttachedBox.Point1.X + coord_abs(wy) * PCB_SGNZ(wx); sa = (wx >= 0) ? 0 : 180; Index: trunk/src_plugins/tool_std/tool_copy.c =================================================================== --- trunk/src_plugins/tool_std/tool_copy.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_copy.c (revision 30955) @@ -73,7 +73,7 @@ case PCB_CH_STATE_SECOND: if ((pcb->is_footprint) && (pcb_crosshair.AttachedObject.Type == PCB_OBJ_SUBC)) { - rnd_message(PCB_MSG_WARNING, "Can not copy subcircuit in the footprint edit mode\n"); + rnd_message(RND_MSG_WARNING, "Can not copy subcircuit in the footprint edit mode\n"); } else { pcb_copy_obj(pcb_crosshair.AttachedObject.Type, Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 30955) @@ -73,7 +73,7 @@ if (pcb_crosshair.AttachedObject.Type != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)pcb_crosshair.AttachedObject.Ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) { - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.extobj_edit = NULL; break; Index: trunk/src_plugins/tool_std/tool_move.c =================================================================== --- trunk/src_plugins/tool_std/tool_move.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_move.c (revision 30955) @@ -68,7 +68,7 @@ if (pcb_crosshair.AttachedObject.Type != PCB_OBJ_VOID) { pcb_any_obj_t *obj = (pcb_any_obj_t *)pcb_crosshair.AttachedObject.Ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) { - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.extobj_edit = NULL; } Index: trunk/src_plugins/tool_std/tool_polyhole.c =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_polyhole.c (revision 30955) @@ -65,12 +65,12 @@ &pcb_crosshair.AttachedObject.Ptr1, &pcb_crosshair.AttachedObject.Ptr2, &pcb_crosshair.AttachedObject.Ptr3); if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_VOID) { - rnd_message(PCB_MSG_WARNING, "The first point of a polygon hole must be on a polygon.\n"); + rnd_message(RND_MSG_WARNING, "The first point of a polygon hole must be on a polygon.\n"); break; /* don't start doing anything if clicket out of polys */ } if (PCB_FLAG_TEST(PCB_FLAG_LOCK, (pcb_poly_t *)pcb_crosshair.AttachedObject.Ptr2)) { - rnd_message(PCB_MSG_WARNING, "Sorry, poly object is locked\n"); + rnd_message(RND_MSG_WARNING, "Sorry, poly object is locked\n"); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.extobj_edit = NULL; break; Index: trunk/src_plugins/tool_std/tool_remove.c =================================================================== --- trunk/src_plugins/tool_std/tool_remove.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_remove.c (revision 30955) @@ -56,13 +56,13 @@ if ((type = pcb_search_screen(hl->tool_x, hl->tool_y, PCB_REMOVE_TYPES | PCB_LOOSE_SUBC(PCB) | PCB_OBJ_FLOATER, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) { obj = (pcb_any_obj_t *)ptr2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, obj)) { - rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } if (type == PCB_OBJ_SUBC) { if(pcb->is_footprint) { - rnd_message(PCB_MSG_WARNING, "Can not remove the subcircuit being edited in the footprint edit mode\n"); + rnd_message(RND_MSG_WARNING, "Can not remove the subcircuit being edited in the footprint edit mode\n"); return; } } Index: trunk/src_plugins/tool_std/tool_via.c =================================================================== --- trunk/src_plugins/tool_std/tool_via.c (revision 30954) +++ trunk/src_plugins/tool_std/tool_via.c (revision 30955) @@ -56,12 +56,12 @@ pcb_board_t *pcb = (pcb_board_t *)hl; if (!pcb->pstk_on) { - rnd_message(PCB_MSG_WARNING, "You must turn via visibility on before\nyou can place vias\n"); + rnd_message(RND_MSG_WARNING, "You must turn via visibility on before\nyou can place vias\n"); return; } if (conf_core.design.via_drilling_hole >= conf_core.design.via_thickness) { - rnd_message(PCB_MSG_ERROR, "Can't place via: invalid via geometry (hole too large for via size)\n"); + rnd_message(RND_MSG_ERROR, "Can't place via: invalid via geometry (hole too large for via size)\n"); return; } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 30954) +++ trunk/src_plugins/vendordrill/vendor.c (revision 30955) @@ -168,7 +168,7 @@ /* load the resource file */ doc = pcb_hid_cfg_load_lht(&PCB->hidlib, fname); if (doc == NULL) { - rnd_message(PCB_MSG_ERROR, "Could not load vendor resource file \"%s\"\n", fname); + rnd_message(RND_MSG_ERROR, "Could not load vendor resource file \"%s\"\n", fname); RND_ACT_IRES(1); return 0; } @@ -191,7 +191,7 @@ sf = PCB_MM_TO_COORD(1); } else { - rnd_message(PCB_MSG_ERROR, "\"%s\" is not a supported units. Defaulting to inch\n", sval); + rnd_message(RND_MSG_ERROR, "\"%s\" is not a supported units. Defaulting to inch\n", sval); sf = PCB_INCH_TO_COORD(1); } @@ -206,7 +206,7 @@ rounding_method = CLOSEST; } else { - rnd_message(PCB_MSG_ERROR, "\"%s\" is not a valid rounding type. Defaulting to up\n", sval); + rnd_message(RND_MSG_ERROR, "\"%s\" is not a valid rounding type. Defaulting to up\n", sval); rounding_method = ROUND_UP; } } @@ -226,49 +226,49 @@ } } else - rnd_message(PCB_MSG_ERROR, "Broken drillmap: /drillmap should be a list\n"); + rnd_message(RND_MSG_ERROR, "Broken drillmap: /drillmap should be a list\n"); } else - rnd_message(PCB_MSG_ERROR, "No drillmap resource found\n"); + rnd_message(RND_MSG_ERROR, "No drillmap resource found\n"); sval = pcb_hid_cfg_text_value(doc, "/drc/copper_space"); if (sval != NULL) { load_meta_coord("design/bloat", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.bloat); + rnd_message(RND_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.bloat); } sval = pcb_hid_cfg_text_value(doc, "/drc/copper_overlap"); if (sval != NULL) { load_meta_coord("design/shrink", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum copper overlap to %ml mils\n", conf_core.design.shrink); + rnd_message(RND_MSG_INFO, "Set DRC minimum copper overlap to %ml mils\n", conf_core.design.shrink); } sval = pcb_hid_cfg_text_value(doc, "/drc/copper_width"); if (sval != NULL) { load_meta_coord("design/min_wid", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.min_wid); + rnd_message(RND_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.min_wid); } sval = pcb_hid_cfg_text_value(doc, "/drc/silk_width"); if (sval != NULL) { load_meta_coord("design/min_slk", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum silk width to %ml mils\n", conf_core.design.min_slk); + rnd_message(RND_MSG_INFO, "Set DRC minimum silk width to %ml mils\n", conf_core.design.min_slk); } sval = pcb_hid_cfg_text_value(doc, "/drc/min_drill"); if (sval != NULL) { load_meta_coord("design/min_drill", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum drill diameter to %ml mils\n", conf_core.design.min_drill); + rnd_message(RND_MSG_INFO, "Set DRC minimum drill diameter to %ml mils\n", conf_core.design.min_drill); } sval = pcb_hid_cfg_text_value(doc, "/drc/min_ring"); if (sval != NULL) { load_meta_coord("design/min_ring", floor(sf * atof(sval) + 0.5)); - rnd_message(PCB_MSG_INFO, "Set DRC minimum annular ring to %ml mils\n", conf_core.design.min_ring); + rnd_message(RND_MSG_INFO, "Set DRC minimum annular ring to %ml mils\n", conf_core.design.min_ring); } - rnd_message(PCB_MSG_INFO, "Loaded %d vendor drills from %s\n", n_vendor_drills, fname); - rnd_message(PCB_MSG_INFO, "Loaded %d RefDes skips, %d Value skips, %d Descr skips\n", n_refdes, n_value, n_descr); + rnd_message(RND_MSG_INFO, "Loaded %d vendor drills from %s\n", n_vendor_drills, fname); + rnd_message(RND_MSG_INFO, "Loaded %d RefDes skips, %d Value skips, %d Descr skips\n", n_refdes, n_value, n_descr); rnd_conf_set(RND_CFR_DESIGN, "plugins/vendor/enable", -1, "0", RND_POL_OVERWRITE); @@ -295,7 +295,7 @@ if (pcb_chg_obj_2nd_size(PCB_OBJ_PSTK, pstk, pstk, pstk, target, pcb_true, pcb_false)) res = 1; else { - rnd_message(PCB_MSG_WARNING, + rnd_message(RND_MSG_WARNING, "Padstack at %ml, %ml not changed. Possible reasons:\n" "\t- pad size too small\n" "\t- new size would be too large or too small\n", pstk->x, pstk->y); @@ -340,13 +340,13 @@ } PCB_END_LOOP; - rnd_message(PCB_MSG_INFO, "Updated %ld drill sizes out of %ld total\n", (long)changed, (long)tot); + rnd_message(RND_MSG_INFO, "Updated %ld drill sizes out of %ld total\n", (long)changed, (long)tot); /* Update the current Via */ if (conf_core.design.via_drilling_hole != vendorDrillMap(conf_core.design.via_drilling_hole)) { changed++; rnd_conf_setf(RND_CFR_DESIGN, "design/via_drilling_hole", -1, "%$mm", vendorDrillMap(conf_core.design.via_drilling_hole)); - rnd_message(PCB_MSG_INFO, "Adjusted active via hole size to be %ml mils\n", conf_core.design.via_drilling_hole); + rnd_message(RND_MSG_INFO, "Adjusted active via hole size to be %ml mils\n", conf_core.design.via_drilling_hole); } /* and update the vias for the various routing styles */ @@ -354,12 +354,12 @@ if (PCB->RouteStyle.array[i].Hole != vendorDrillMap(PCB->RouteStyle.array[i].Hole)) { changed++; PCB->RouteStyle.array[i].Hole = vendorDrillMap(PCB->RouteStyle.array[i].Hole); - rnd_message(PCB_MSG_INFO, + rnd_message(RND_MSG_INFO, "Adjusted %s routing style hole size to be %ml mils\n", PCB->RouteStyle.array[i].name, PCB->RouteStyle.array[i].Hole); if (PCB->RouteStyle.array[i].Diameter < PCB->RouteStyle.array[i].Hole + PCB_MIN_PINORVIACOPPER) { PCB->RouteStyle.array[i].Diameter = PCB->RouteStyle.array[i].Hole + PCB_MIN_PINORVIACOPPER; - rnd_message(PCB_MSG_INFO, + rnd_message(RND_MSG_INFO, "Increased %s routing style via diameter to %ml mils\n", PCB->RouteStyle.array[i].name, PCB->RouteStyle.array[i].Diameter); } @@ -405,7 +405,7 @@ /* are we larger than the largest drill? */ if (in > vendor_drills[n_vendor_drills - 1]) { - rnd_message(PCB_MSG_ERROR, "Vendor drill list does not contain a drill >= %ml mil\n" + rnd_message(RND_MSG_ERROR, "Vendor drill list does not contain a drill >= %ml mil\n" "Using %ml mil instead.\n", in, vendor_drills[n_vendor_drills - 1]); cached_map = vendor_drills[n_vendor_drills - 1]; return vendor_drills[n_vendor_drills - 1]; @@ -544,7 +544,7 @@ for (i = 0; i < n_refdes; i++) { if ((PCB_NSTRCMP(PCB_UNKNOWN(subc->refdes), ignore_refdes[i]) == 0) || rematch(ignore_refdes[i], PCB_UNKNOWN(subc->refdes))) { - rnd_message(PCB_MSG_INFO, "Vendor mapping skipped because refdes = %s matches %s\n", PCB_UNKNOWN(subc->refdes), ignore_refdes[i]); + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because refdes = %s matches %s\n", PCB_UNKNOWN(subc->refdes), ignore_refdes[i]); noskip = 0; } } @@ -553,7 +553,7 @@ for (i = 0; i < n_value; i++) { if ((PCB_NSTRCMP(PCB_UNKNOWN(vl), ignore_value[i]) == 0) || rematch(ignore_value[i], PCB_UNKNOWN(vl))) { - rnd_message(PCB_MSG_INFO, "Vendor mapping skipped because value = %s matches %s\n", PCB_UNKNOWN(vl), ignore_value[i]); + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because value = %s matches %s\n", PCB_UNKNOWN(vl), ignore_value[i]); noskip = 0; } } @@ -564,7 +564,7 @@ for (i = 0; i < n_descr; i++) { if ((PCB_NSTRCMP(PCB_UNKNOWN(fp), ignore_descr[i]) == 0) || rematch(ignore_descr[i], PCB_UNKNOWN(fp))) { - rnd_message(PCB_MSG_INFO, + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because descr = %s matches %s\n", PCB_UNKNOWN(fp), ignore_descr[i]); noskip = 0; @@ -573,7 +573,7 @@ } if (noskip && PCB_FLAG_TEST(PCB_FLAG_LOCK, subc)) { - rnd_message(PCB_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", PCB_UNKNOWN(subc->refdes)); + rnd_message(RND_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", PCB_UNKNOWN(subc->refdes)); noskip = 0; } @@ -591,7 +591,7 @@ /* compile the regular expression */ regex = re_sei_comp(re); if (re_sei_errno(regex) != 0) { - rnd_message(PCB_MSG_ERROR, "regexp error: %s\n", re_error_str(re_sei_errno(regex))); + rnd_message(RND_MSG_ERROR, "regexp error: %s\n", re_error_str(re_sei_errno(regex))); re_sei_free(regex); return pcb_false; } Index: trunk/tests/conf/conftest.c =================================================================== --- trunk/tests/conf/conftest.c (revision 30954) +++ trunk/tests/conf/conftest.c (revision 30955) @@ -80,7 +80,7 @@ void cmd_dump(char *arg) { if (arg == NULL) { - rnd_message(PCB_MSG_ERROR, "Need an arg: native or lihata"); + rnd_message(RND_MSG_ERROR, "Need an arg: native or lihata"); return; } if (strncmp(arg, "native", 6) == 0) { @@ -94,7 +94,7 @@ while(isspace(*arg)) arg++; role = rnd_conf_role_parse(arg); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", arg); return; } if (pcb_conf_main_root[role] != NULL) @@ -103,7 +103,7 @@ printf("\n"); } else - rnd_message(PCB_MSG_ERROR, "Invalid dump mode: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid dump mode: '%s'", arg); } void cmd_print(char *arg) @@ -112,12 +112,12 @@ gds_t s; if (arg == NULL) { - rnd_message(PCB_MSG_ERROR, "Need an arg: a native path"); + rnd_message(RND_MSG_ERROR, "Need an arg: a native path"); return; } node = rnd_conf_get_field(arg); if (node == NULL) { - rnd_message(PCB_MSG_ERROR, "No such path: '%s'", arg); + rnd_message(RND_MSG_ERROR, "No such path: '%s'", arg); return; } gds_init(&s); @@ -133,7 +133,7 @@ if (arg == NULL) { help:; - rnd_message(PCB_MSG_ERROR, "Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); + rnd_message(RND_MSG_ERROR, "Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); return; } @@ -151,7 +151,7 @@ role = rnd_conf_role_parse(arg); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", arg); return; } printf("Result: %d\n", rnd_conf_load_as(role, fn, is_text)); @@ -165,7 +165,7 @@ { rnd_conf_policy_t np = rnd_conf_policy_parse(arg); if (np == RND_POL_invalid) - rnd_message(PCB_MSG_ERROR, "Invalid/unknown policy: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid/unknown policy: '%s'", arg); else current_policy = np; } @@ -174,7 +174,7 @@ { rnd_conf_role_t nr = rnd_conf_role_parse(arg); if (nr == RND_CFR_invalid) - rnd_message(PCB_MSG_ERROR, "Invalid/unknown role: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid/unknown role: '%s'", arg); else current_role = nr; } @@ -186,7 +186,7 @@ lht_node_t *first; if ((*end != '\0') || (np < 0)) { - rnd_message(PCB_MSG_ERROR, "Invalid integer prio: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid integer prio: '%s'", arg); return; } first = rnd_conf_lht_get_first(current_role, 0); @@ -209,12 +209,12 @@ lht_node_t *first; if (arg == NULL) { - rnd_message(PCB_MSG_ERROR, "need a policy", arg); + rnd_message(RND_MSG_ERROR, "need a policy", arg); return; } np = rnd_conf_policy_parse(arg); if (np == RND_POL_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid integer policy: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid integer policy: '%s'", arg); return; } @@ -244,7 +244,7 @@ path = arg; val = strpbrk(path, " \t="); if (val == NULL) { - rnd_message(PCB_MSG_ERROR, "set needs a value"); + rnd_message(RND_MSG_ERROR, "set needs a value"); return; } *val = '\0'; @@ -260,7 +260,7 @@ { rnd_conf_native_t *n = rnd_conf_get_field(arg); if (n == NULL) { - rnd_message(PCB_MSG_ERROR, "unknown path"); + rnd_message(RND_MSG_ERROR, "unknown path"); return; } rnd_conf_hid_set_cb(n, hid_id, (add ? &watch_cbs : NULL)); @@ -296,7 +296,7 @@ else { rnd_conf_role_t role = rnd_conf_role_parse(arg); if (role == RND_CFR_invalid) { - rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(RND_MSG_ERROR, "Invalid role: '%s'", arg); return; } rnd_conf_reset(role, ""); @@ -399,7 +399,7 @@ else if (strcmp(cmd, "help") == 0) cmd_help(arg); else - rnd_message(PCB_MSG_ERROR, "unknown command '%s'", cmd); + rnd_message(RND_MSG_ERROR, "unknown command '%s'", cmd); } conf_core_uninit_pre(); Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30954) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30955) @@ -184,7 +184,7 @@ else if (!strcmp(config, "elements-dir") || !strcmp(config, "d")) { static int warned = 0; if (!warned) { - rnd_message(PCB_MSG_WARNING, "WARNING: using elements-dir from %s - this overrides the normal pcb-rnd configured library search paths\n", config); + rnd_message(RND_MSG_WARNING, "WARNING: using elements-dir from %s - this overrides the normal pcb-rnd configured library search paths\n", config); warned = 1; } rnd_conf_set(RND_CFR_CLI, "rc/library_search_paths", -1, arg, RND_POL_PREPEND); @@ -253,7 +253,7 @@ lihata_prj:; fclose(f); if (rnd_conf_load_as(RND_CFR_PROJECT, path, 0) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to parse project file %s.\n", path); + rnd_message(RND_MSG_ERROR, "Failed to parse project file %s.\n", path); exit(1); } rnd_conf_update(NULL, -1); /* because of our new project file */ @@ -303,7 +303,7 @@ } else if (!strcmp(opt, "m") || !strcmp(opt, "method")) { if (method_find(arg) == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can't use unknown method '%s'; try --help\n", arg); + rnd_message(RND_MSG_ERROR, "Error: can't use unknown method '%s'; try --help\n", arg); exit(1); } rnd_conf_set(RND_CFR_CLI, "utils/gsch2pcb_rnd/method", -1, arg, RND_POL_OVERWRITE); @@ -345,7 +345,7 @@ else { if (loc_str_has_suffix(argv[i], ".sch", 4) == NULL) { if (have_cli_project_file) { - rnd_message(PCB_MSG_ERROR, "ERROR: multiple project files specified on the command line (last one: %s). Either use multiple schematics or a single project file. Try %s --help\n", argv[i], argv[0]); + rnd_message(RND_MSG_ERROR, "ERROR: multiple project files specified on the command line (last one: %s). Either use multiple schematics or a single project file. Try %s --help\n", argv[i], argv[0]); exit(1); } load_extra_project_files(); @@ -375,7 +375,7 @@ { char *path = pcb_strdup_printf("%s/gnet-%s.scm", dir, backend); if (!rnd_file_readable(path)) - rnd_message(PCB_MSG_WARNING, "WARNING: %s is not found, gnetlist will probably fail; please check your pcb-rnd installation!\n", path); + rnd_message(RND_MSG_WARNING, "WARNING: %s is not found, gnetlist will probably fail; please check your pcb-rnd installation!\n", path); free(path); } @@ -421,11 +421,11 @@ if (!have_cli_project_file && !have_cli_schematics) { if (!rnd_file_readable(LOCAL_PROJECT_FILE)) { - rnd_message(PCB_MSG_ERROR, "Don't know what to do: no project or schematics given, no local project file %s found. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); + rnd_message(RND_MSG_ERROR, "Don't know what to do: no project or schematics given, no local project file %s found. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); exit(1); } if (rnd_conf_load_as(RND_CFR_PROJECT, LOCAL_PROJECT_FILE, 0) != 0) { - rnd_message(PCB_MSG_ERROR, "Failed to load project file %s. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); + rnd_message(RND_MSG_ERROR, "Failed to load project file %s. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); exit(1); } rnd_conf_update(NULL, -1); /* because of our new project file */ @@ -445,13 +445,13 @@ } } else { - rnd_message(PCB_MSG_ERROR, "No schematics specified on the cli or in project files. Try %s --help\n", argv[0]); + rnd_message(RND_MSG_ERROR, "No schematics specified on the cli or in project files. Try %s --help\n", argv[0]); exit(1); } } if (gadl_length(&schematics) == 0) { - rnd_message(PCB_MSG_ERROR, "No schematics specified on the cli; can't find any in the project files/configs either. Try %s --help\n", argv[0]); + rnd_message(RND_MSG_ERROR, "No schematics specified on the cli; can't find any in the project files/configs either. Try %s --help\n", argv[0]); exit(1); } @@ -471,7 +471,7 @@ if (current_method == NULL) { want_method = want_method_default; if (!conf_g2pr.utils.gsch2pcb_rnd.quiet_mode) - rnd_message(PCB_MSG_WARNING, "Warning: method not specified for a project (that has no board or project file yet); defaulting to -m %s. This warning is harmless if you are running gsch2pcb-rnd for the first time on this project and you are fine with this method.", want_method); + rnd_message(RND_MSG_WARNING, "Warning: method not specified for a project (that has no board or project file yet); defaulting to -m %s. This warning is harmless if you are running gsch2pcb-rnd for the first time on this project and you are fine with this method.", want_method); } } @@ -478,7 +478,7 @@ if (current_method == NULL) { current_method = method_find(want_method); if (current_method == NULL) { - rnd_message(PCB_MSG_ERROR, "Error: can't find method %s\n", want_method); + rnd_message(RND_MSG_ERROR, "Error: can't find method %s\n", want_method); exit(1); } }