Index: trunk/doc/developer/plugin/template_pup/ext_foo.c =================================================================== --- trunk/doc/developer/plugin/template_pup/ext_foo.c (revision 30902) +++ trunk/doc/developer/plugin/template_pup/ext_foo.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "PLEASE CONSIDER DEVELOPING A CORE PLUGIN INSTEAD!\n"); + rnd_message(PCB_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 30902) +++ trunk/src/board.c (revision 30903) @@ -74,7 +74,7 @@ } /* creates a new PCB */ -pcb_board_t *pcb_board_new_(pcb_bool SetDefaultNames) +pcb_board_t *pcb_board_new_(rnd_bool SetDefaultNames) { pcb_board_t *ptr; int i; @@ -130,9 +130,9 @@ fclose(f); dpcb = pcb_load_pcb(efn, NULL, pcb_false, 1 | 0x10); if (dpcb == 0) - pcb_message(PCB_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); + rnd_message(PCB_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); else - pcb_message(PCB_MSG_ERROR, "Couldn't find default.pcb and failed to load the embedded fallback\n"); + rnd_message(PCB_MSG_ERROR, "Couldn't find default.pcb and failed to load the embedded fallback\n"); pcb_remove(NULL, efn); free(efn); } @@ -253,7 +253,7 @@ return PCB->hidlib.name; } -pcb_bool pcb_board_change_name(char *Name) +rnd_bool pcb_board_change_name(char *Name) { free(PCB->hidlib.name); PCB->hidlib.name = Name; @@ -261,7 +261,7 @@ return pcb_true; } -static void pcb_board_resize_(pcb_board_t *pcb, pcb_coord_t Width, pcb_coord_t Height) +static void pcb_board_resize_(pcb_board_t *pcb, rnd_coord_t Width, rnd_coord_t Height) { pcb->hidlib.size_x = Width; pcb->hidlib.size_y = Height; @@ -274,13 +274,13 @@ typedef struct { pcb_board_t *pcb; - pcb_coord_t w, h; + rnd_coord_t w, h; } undo_board_size_t; static int undo_board_size_swap(void *udata) { undo_board_size_t *s = udata; - pcb_coord_t oldw = s->pcb->hidlib.size_x, oldh = s->pcb->hidlib.size_y; + rnd_coord_t oldw = s->pcb->hidlib.size_x, oldh = s->pcb->hidlib.size_y; pcb_board_resize_(s->pcb, s->w, s->h); s->w = oldw; s->h = oldh; @@ -301,7 +301,7 @@ undo_board_size_print }; -void pcb_board_resize(pcb_coord_t width, pcb_coord_t height, int undoable) +void pcb_board_resize(rnd_coord_t width, rnd_coord_t height, int undoable) { undo_board_size_t *s; @@ -326,7 +326,7 @@ } /* sets a new line thickness */ -void pcb_board_set_line_width(pcb_coord_t Size) +void pcb_board_set_line_width(rnd_coord_t Size) { if (Size >= PCB_MIN_THICKNESS && Size <= PCB_MAX_THICKNESS) { conf_set_design("design/line_thickness", "%$mS", Size); @@ -336,7 +336,7 @@ } /* sets a new via thickness */ -void pcb_board_set_via_size(pcb_coord_t Size, pcb_bool Force) +void pcb_board_set_via_size(rnd_coord_t Size, rnd_bool Force) { if (Force || (Size <= PCB_MAX_PINORVIASIZE && Size >= PCB_MIN_PINORVIASIZE && Size >= conf_core.design.via_drilling_hole + PCB_MIN_PINORVIACOPPER)) { conf_set_design("design/via_thickness", "%$mS", Size); @@ -344,7 +344,7 @@ } /* sets a new via drilling hole */ -void pcb_board_set_via_drilling_hole(pcb_coord_t Size, pcb_bool Force) +void pcb_board_set_via_drilling_hole(rnd_coord_t Size, rnd_bool Force) { if (Force || (Size <= PCB_MAX_PINORVIASIZE && Size >= PCB_MIN_PINORVIAHOLE && Size <= conf_core.design.via_thickness - PCB_MIN_PINORVIACOPPER)) { conf_set_design("design/via_drilling_hole", "%$mS", Size); @@ -352,7 +352,7 @@ } /* sets a clearance width */ -void pcb_board_set_clearance(pcb_coord_t Width) +void pcb_board_set_clearance(rnd_coord_t Width) { if (Width <= PCB_MAX_THICKNESS) { conf_set_design("design/clearance", "%$mS", Width); @@ -368,9 +368,9 @@ } /* sets or resets changed flag and redraws status */ -void pcb_board_set_changed_flag(pcb_bool New) +void pcb_board_set_changed_flag(rnd_bool New) { - pcb_bool old = PCB->Changed; + rnd_bool old = PCB->Changed; PCB->Changed = New; @@ -409,11 +409,11 @@ return chg; } -pcb_coord_t pcb_board_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags) +rnd_coord_t pcb_board_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags) { pcb_layergrp_id_t gid; pcb_layergrp_t *grp; - pcb_coord_t curr, total = 0; + rnd_coord_t curr, total = 0; for(gid = 0, grp = pcb->LayerGroups.grp; gid < pcb->LayerGroups.len; gid++,grp++) { const char *s; @@ -432,8 +432,8 @@ if (grp->ltype & PCB_LYT_SUBSTRATE) { if (flags & PCB_BRDTHICK_PRINT_ERROR) { if (namespace != NULL) - pcb_message(PCB_MSG_ERROR, "%s: ", namespace); - pcb_message(PCB_MSG_ERROR, "can not determine substrate thickness on layer group %ld - total board thickness is probably wrong\n", (long)gid); + 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); } if (flags & PCB_BRDTHICK_TOLERANT) continue; Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 30902) +++ trunk/src/board.h (revision 30903) @@ -67,14 +67,14 @@ char *PrintFilename; /* from print dialog */ char *Netlistname; /* name of netlist file */ - pcb_bool Changed; /* layout has been changed */ + rnd_bool Changed; /* layout has been changed */ - pcb_bool pstk_on, RatOn, InvisibleObjectsOn, + rnd_bool pstk_on, RatOn, InvisibleObjectsOn, SubcOn, SubcPartsOn, padstack_mark_on, hole_on; /* visibility flags */ - pcb_bool RatDraw; /* we're drawing rats */ + rnd_bool RatDraw; /* we're drawing rats */ - pcb_bool loose_subc; /* when set, subc parts are not locked into the subc */ + rnd_bool loose_subc; /* when set, subc parts are not locked into the subc */ double ThermScale; /* scale factor used with thermals */ @@ -87,7 +87,7 @@ pcb_attribute_list_t Attributes; pcb_data_t *Data; /* entire database */ - pcb_bool is_footprint; /* If set, the user has loaded a footprint, not a pcb. */ + rnd_bool is_footprint; /* If set, the user has loaded a footprint, not a pcb. */ const pcb_attribute_list_t *pen_attr; @@ -102,7 +102,7 @@ void pcb_board_free(pcb_board_t *pcb); /* creates a new PCB - low level */ -pcb_board_t *pcb_board_new_(pcb_bool SetDefaultNames); +pcb_board_t *pcb_board_new_(rnd_bool SetDefaultNames); /* creates a new PCB - high level (uses a template board); does not generate new board event if inhibit_events is set */ @@ -132,11 +132,11 @@ /* changes the name of a layout; Name is allocated by the caller (no strdup() is made) */ -pcb_bool pcb_board_change_name(char *Name); +rnd_bool pcb_board_change_name(char *Name); /* changes the maximum size of a layout, notifies the GUI * and adjusts the cursor confinement box */ -void pcb_board_resize(pcb_coord_t Width, pcb_coord_t Height, int undoable); +void pcb_board_resize(rnd_coord_t Width, rnd_coord_t Height, int undoable); /* free the board and remove its undo list */ @@ -143,16 +143,16 @@ void pcb_board_remove(pcb_board_t *Ptr); /* sets a new line thickness */ -void pcb_board_set_line_width(pcb_coord_t Size); +void pcb_board_set_line_width(rnd_coord_t Size); /* sets a new via thickness */ -void pcb_board_set_via_size(pcb_coord_t Size, pcb_bool Force); +void pcb_board_set_via_size(rnd_coord_t Size, rnd_bool Force); /* sets a new via drilling hole */ -void pcb_board_set_via_drilling_hole(pcb_coord_t Size, pcb_bool Force); +void pcb_board_set_via_drilling_hole(rnd_coord_t Size, rnd_bool Force); /* sets a clearance width */ -void pcb_board_set_clearance(pcb_coord_t Width); +void pcb_board_set_clearance(rnd_coord_t Width); /* sets a text scaling */ void pcb_board_set_text_scale(int Scale); @@ -162,7 +162,7 @@ int pcb_board_normalize(pcb_board_t *pcb); /* sets or resets changed flag and redraws status */ -void pcb_board_set_changed_flag(pcb_bool New); +void pcb_board_set_changed_flag(rnd_bool New); /* Shorthand for emitting a board changed event (PCB_EVENT_BOARD_CHANGED) */ void pcb_board_changed(int reverted); @@ -183,7 +183,7 @@ } pcb_board_thickness_flags_t; /* Return the board thickness or -1 on error */ -pcb_coord_t pcb_board_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags); +rnd_coord_t pcb_board_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags); #define PCB_ACT_BOARD ((pcb_board_t *)argv[0].val.argv0.user_call_ctx) Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 30902) +++ trunk/src/brave.c (revision 30903) @@ -263,13 +263,13 @@ RND_PCB_ACT_CONVARG(2, FGW_STR, Brave, op = argv[2].val.str); d = find_by_name(name); if (d == NULL) { - pcb_message(PCB_MSG_ERROR, "Unknown brave setting: %s\n", name); + rnd_message(PCB_MSG_ERROR, "Unknown brave setting: %s\n", name); RND_ACT_IRES(-1); return 0; } brave_set(d->bit, (pcb_strcasecmp(op, "on") == 0)); - pcb_message(PCB_MSG_INFO, "Brave setting: %s in %s\n", name, (pcb_brave & d->bit) ? "on" : "off"); + rnd_message(PCB_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 30902) +++ trunk/src/buffer.c (revision 30903) @@ -167,7 +167,7 @@ return res; } -static void pcb_buffer_clear_(pcb_board_t *pcb, pcb_buffer_t *Buffer, pcb_bool bind) +static void pcb_buffer_clear_(pcb_board_t *pcb, pcb_buffer_t *Buffer, rnd_bool bind) { if (Buffer && Buffer->Data) { void *old_parent = Buffer->Data->parent.any; @@ -191,7 +191,7 @@ } /* add (or move) selected */ -static void pcb_buffer_toss_selected(pcb_opfunc_t *fnc, pcb_board_t *pcb, pcb_buffer_t *Buffer, pcb_coord_t X, pcb_coord_t Y, pcb_bool LeaveSelected, pcb_bool on_locked_too, pcb_bool keep_id) +static void pcb_buffer_toss_selected(pcb_opfunc_t *fnc, pcb_board_t *pcb, pcb_buffer_t *Buffer, rnd_coord_t X, rnd_coord_t Y, rnd_bool LeaveSelected, rnd_bool on_locked_too, rnd_bool keep_id) { rnd_hidlib_t *hidlib = (rnd_hidlib_t *)pcb; pcb_opctx_t ctx; @@ -227,13 +227,13 @@ pcb_hid_notify_crosshair_change(hidlib, pcb_true); } -void pcb_buffer_add_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, pcb_coord_t X, pcb_coord_t Y, pcb_bool LeaveSelected, pcb_bool keep_id) +void pcb_buffer_add_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, rnd_coord_t X, rnd_coord_t Y, rnd_bool LeaveSelected, rnd_bool keep_id) { pcb_buffer_toss_selected(&AddBufferFunctions, pcb, Buffer, X, Y, LeaveSelected, pcb_false, keep_id); } extern pcb_opfunc_t pcb_RemoveFunctions; -void pcb_buffer_move_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, pcb_coord_t X, pcb_coord_t Y, pcb_bool LeaveSelected, pcb_bool keep_id) +void pcb_buffer_move_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, rnd_coord_t X, rnd_coord_t Y, rnd_bool LeaveSelected, rnd_bool keep_id) { pcb_buffer_toss_selected(&AddBufferFunctions, pcb, Buffer, X, Y, LeaveSelected, pcb_false, keep_id); pcb_buffer_toss_selected(&pcb_RemoveFunctions, pcb, Buffer, X, Y, LeaveSelected, pcb_false, keep_id); @@ -262,12 +262,12 @@ len = pcb_subclist_length(&PCB_PASTEBUFFER->Data->subc); if (len == 0) { - pcb_message(PCB_MSG_ERROR, "Footprint %s contains no subcircuits", name); + rnd_message(PCB_MSG_ERROR, "Footprint %s contains no subcircuits", name); RND_ACT_IRES(1); return 0; } if (len > 1) { - pcb_message(PCB_MSG_ERROR, "Footprint %s contains multiple subcircuits", name); + rnd_message(PCB_MSG_ERROR, "Footprint %s contains multiple subcircuits", name); RND_ACT_IRES(1); return 0; } @@ -281,7 +281,7 @@ return 0; } -pcb_bool pcb_buffer_load_layout(pcb_board_t *pcb, pcb_buffer_t *Buffer, const char *Filename, const char *fmt) +rnd_bool pcb_buffer_load_layout(pcb_board_t *pcb, pcb_buffer_t *Buffer, const char *Filename, const char *fmt) { pcb_board_t *orig, *newPCB = pcb_board_new_(pcb_false); @@ -473,7 +473,7 @@ } if ((ang < -360000) || (ang > +360000)) { - pcb_message(PCB_MSG_ERROR, "Angle too large\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "You can't mirror a buffer that has text!\n"); + rnd_message(PCB_MSG_ERROR, "You can't mirror a buffer that has text!\n"); return; } } @@ -762,10 +762,10 @@ return (pcb_object_operation(&AddBufferFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); } -pcb_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, pcb_bool keep_id) +rnd_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_bool keep_id) { pcb_cardinal_t i; - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; pcb_opctx_t ctx; int num_layers; @@ -794,7 +794,7 @@ const char *src_name = sourcelayer->name; if ((src_name == NULL) || (*src_name == '\0')) src_name = ""; - pcb_message(PCB_MSG_WARNING, "Couldn't resolve buffer layer #%d (%s) on the current board\n", i, src_name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Can not paste subcircuit in the footprint edit mode\n"); + rnd_message(PCB_MSG_WARNING, "Can not paste subcircuit in the footprint edit mode\n"); break; } nsubc = pcb_subcop_copy(&ctx, subc); @@ -926,7 +926,7 @@ /* loads footprint data from file/library into buffer (as subcircuit) * returns pcb_false on error * if successful, update some other stuff and reposition the pastebuffer */ -pcb_bool pcb_buffer_load_footprint(pcb_buffer_t *Buffer, const char *Name, const char *fmt) +rnd_bool pcb_buffer_load_footprint(pcb_buffer_t *Buffer, const char *Name, const char *fmt) { pcb_buffer_clear(PCB, Buffer); if (!pcb_parse_footprint(Buffer->Data, Name, fmt)) { @@ -976,7 +976,7 @@ int op, force; const char *sbufnum = "", *fmt = NULL, *forces = NULL, *name, *tmp; static char *default_file = NULL; - pcb_bool free_name = pcb_false; + rnd_bool free_name = pcb_false; static int stack[32]; static int sp = 0; int number, rv; @@ -1001,7 +1001,7 @@ if (sp < sizeof(stack) / sizeof(stack[0])) stack[sp++] = conf_core.editor.buffer_number; else - pcb_message(PCB_MSG_ERROR, "Paste buffer stack overflow on push.\n"); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Paste buffer stack underflow on pop.\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Nothing buffer-movable is selected, nothing copied to the paste buffer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Nothing buffer-movable is selected, nothing moved to the paste buffer\n"); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_ERROR, "Error breaking up subcircuits - only one can be broken up at a time\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to load buffer from %s\n", name); + rnd_message(PCB_MSG_ERROR, "Failed to load buffer from %s\n", name); RND_ACT_IRES(-1); } else @@ -1123,9 +1123,9 @@ case F_ToLayout: { - static pcb_coord_t oldx = 0, oldy = 0; - pcb_coord_t x, y; - pcb_bool absolute; + static rnd_coord_t oldx = 0, oldy = 0; + rnd_coord_t x, y; + rnd_bool absolute; if (argc == 2) { x = y = 0; } @@ -1165,13 +1165,13 @@ char *end; number = strtol(sbufnum, &end, 10); if (*end != 0) { - pcb_message(PCB_MSG_ERROR, "invalid buffer number '%s': should be an integer\n", sbufnum); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "invalid buffer number '%d': out of range 1..%d\n", number+1, PCB_MAX_BUFFER); + rnd_message(PCB_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/buffer.h =================================================================== --- trunk/src/buffer.h (revision 30902) +++ trunk/src/buffer.h (revision 30903) @@ -35,7 +35,7 @@ #include struct pcb_buffer_s { /* information about the paste buffer */ - pcb_coord_t X, Y; /* offset */ + rnd_coord_t X, Y; /* offset */ pcb_box_t BoundingBox; pcb_box_t bbox_naked; pcb_data_t *Data; /* data; not all members of pcb_board_t */ @@ -50,10 +50,10 @@ void pcb_buffer_clear(pcb_board_t *pcb, pcb_buffer_t *Buffer); /* adds (copies) all selected and visible objects to the paste buffer */ -void pcb_buffer_add_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, pcb_coord_t X, pcb_coord_t Y, pcb_bool LeaveSelected, pcb_bool keep_id); +void pcb_buffer_add_selected(pcb_board_t *pcb, pcb_buffer_t *Buffer, rnd_coord_t X, rnd_coord_t Y, rnd_bool LeaveSelected, rnd_bool keep_id); /* load a board into buffer parse the file with enabled 'PCB mode' */ -pcb_bool pcb_buffer_load_layout(pcb_board_t *pcb, pcb_buffer_t *Buffer, const char *Filename, const char *fmt); +rnd_bool pcb_buffer_load_layout(pcb_board_t *pcb, pcb_buffer_t *Buffer, const char *Filename, const char *fmt); /* rotates the contents of the pastebuffer by Number * 90 degrees or free angle*/ void pcb_buffer_rotate90(pcb_buffer_t *Buffer, unsigned int Number); @@ -94,13 +94,13 @@ If keep_id is true, do not change object IDs - this should be used only in one specific case, when selected objects are moved using the buffer (which means exactly 1 copy is made and the original version is removed). */ -pcb_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, pcb_bool keep_id); +rnd_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_bool keep_id); /* change the side of all objects in the buffer */ void pcb_buffer_flip_side(pcb_board_t *pcb, pcb_buffer_t *Buffer); /* Load a footprint by name into a buffer; fmt is optional (may be NULL). */ -pcb_bool pcb_buffer_load_footprint(pcb_buffer_t *Buffer, const char *Name, const char *fmt); +rnd_bool pcb_buffer_load_footprint(pcb_buffer_t *Buffer, const char *Name, const char *fmt); /* sets currently active buffer */ void pcb_buffer_set_number(int Number); Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 30902) +++ trunk/src/build_run.c (revision 30903) @@ -252,6 +252,6 @@ s = "unknown"; break; } - pcb_message(PCB_MSG_ERROR, "aborted by %s signal\n", s); + rnd_message(PCB_MSG_ERROR, "aborted by %s signal\n", s); exit(1); } Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 30902) +++ trunk/src/change.c (revision 30903) @@ -315,9 +315,9 @@ * changes the thermals on all selected and visible padstacks. * Returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_thermals(int types, int therm_style, unsigned long lid) +rnd_bool pcb_chg_selected_thermals(int types, int therm_style, unsigned long lid) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgtherm.pcb = PCB; @@ -336,9 +336,9 @@ * changes the size of all selected and visible object types * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_size(int types, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -358,9 +358,9 @@ * changes the clearance size of all selected and visible objects * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_clear_size(int types, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_clear_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -380,9 +380,9 @@ * changes the 2nd size (drilling hole) of all selected and visible objects * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_2nd_size(int types, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_2nd_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -402,9 +402,9 @@ * changes the internal/self rotation all selected and visible objects * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_rot(int types, double Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_rot(int types, double Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -424,9 +424,9 @@ * changes the clearance flag (join) of all selected and visible lines * and/or arcs. Returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_join(int types) +rnd_bool pcb_chg_selected_join(int types) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -443,9 +443,9 @@ * changes the clearance flag (join) of all selected and visible lines * and/or arcs. Returns pcb_true if anything has changed */ -pcb_bool pcb_set_selected_join(int types) +rnd_bool pcb_set_selected_join(int types) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -462,9 +462,9 @@ * changes the clearance flag (join) of all selected and visible lines * and/or arcs. Returns pcb_true if anything has changed */ -pcb_bool pcb_clr_selected_join(int types) +rnd_bool pcb_clr_selected_join(int types) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -481,9 +481,9 @@ * changes the nonetlist-flag of all selected and visible subcircuits * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_nonetlist(int types) +rnd_bool pcb_chg_selected_nonetlist(int types) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -500,9 +500,9 @@ * changes the angle of all selected and visible object types * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgangle.pcb = PCB; @@ -522,9 +522,9 @@ * changes the radius of all selected and visible object types * returns pcb_true if anything has changed */ -pcb_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -545,9 +545,9 @@ * changes the size of the passed object; subc size is silk size (TODO: check if it is true) * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_obj_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -568,9 +568,9 @@ * changes the size of the passed object; element size is pin ring sizes * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_1st_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_obj_1st_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -590,9 +590,9 @@ * changes the radius of the passed object (e.g. arc width/height) * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, pcb_coord_t r, pcb_bool fixIt) +rnd_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, rnd_coord_t r, rnd_bool fixIt) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -612,9 +612,9 @@ * changes the angles of the passed object (e.g. arc start/ctx->chgsize.value) * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, pcb_bool fixIt) +rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, rnd_bool fixIt) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgangle.pcb = PCB; @@ -635,9 +635,9 @@ * changes the clearance size of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_clear_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t Difference, pcb_bool fixIt) +rnd_bool pcb_chg_obj_clear_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -658,9 +658,9 @@ * Returns pcb_true if anything is changed * */ -pcb_bool pcb_chg_obj_thermal(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int therm_type, unsigned long lid) +rnd_bool pcb_chg_obj_thermal(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int therm_type, unsigned long lid) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgtherm.pcb = PCB; @@ -679,9 +679,9 @@ * changes the 2nd size of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_2nd_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t Difference, pcb_bool fixIt, pcb_bool incundo) +rnd_bool pcb_chg_obj_2nd_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt, rnd_bool incundo) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -702,9 +702,9 @@ * changes the internal/self rotation of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_rot(int Type, void *Ptr1, void *Ptr2, void *Ptr3, double Difference, pcb_bool fixIt, pcb_bool incundo) +rnd_bool pcb_chg_obj_rot(int Type, void *Ptr1, void *Ptr2, void *Ptr3, double Difference, rnd_bool fixIt, rnd_bool incundo) { - pcb_bool change; + rnd_bool change; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -745,7 +745,7 @@ * changes the clearance-flag of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) +rnd_bool pcb_chg_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { pcb_opctx_t ctx; @@ -763,7 +763,7 @@ * sets the clearance-flag of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_set_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) +rnd_bool pcb_set_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { pcb_opctx_t ctx; @@ -781,7 +781,7 @@ * clears the clearance-flag of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_clr_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) +rnd_bool pcb_clr_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { pcb_opctx_t ctx; @@ -799,7 +799,7 @@ * changes the square-flag of the passed object * Returns pcb_true if anything is changed */ -pcb_bool pcb_chg_obj_nonetlist(int Type, void *Ptr1, void *Ptr2, void *Ptr3) +rnd_bool pcb_chg_obj_nonetlist(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { pcb_opctx_t ctx; Index: trunk/src/change.h =================================================================== --- trunk/src/change.h (revision 30902) +++ trunk/src/change.h (revision 30903) @@ -73,34 +73,34 @@ #define PCB_CHANGETHERMAL_TYPES \ (PCB_OBJ_SUBC_PART) -pcb_bool pcb_chg_selected_size(int, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_selected_clear_size(int, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_selected_2nd_size(int, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_selected_rot(int, double, pcb_bool); -pcb_bool pcb_chg_selected_join(int); -pcb_bool pcb_set_selected_join(int); -pcb_bool pcb_clr_selected_join(int); -pcb_bool pcb_chg_selected_nonetlist(int); -pcb_bool pcb_chg_selected_thermals(int types, int therm_style, unsigned long lid); -pcb_bool pcb_chg_obj_size(int, void *, void *, void *, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_obj_1st_size(int, void *, void *, void *, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_obj_thermal(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int therm_type, unsigned long lid); -pcb_bool pcb_chg_obj_clear_size(int, void *, void *, void *, pcb_coord_t, pcb_bool); -pcb_bool pcb_chg_obj_2nd_size(int, void *, void *, void *, pcb_coord_t, pcb_bool, pcb_bool); -pcb_bool pcb_chg_obj_rot(int, void *, void *, void *, double, pcb_bool, pcb_bool); -pcb_bool pcb_chg_obj_join(int, void *, void *, void *); -pcb_bool pcb_set_obj_join(int, void *, void *, void *); -pcb_bool pcb_clr_obj_join(int, void *, void *, void *); -pcb_bool pcb_chg_obj_nonetlist(int Type, void *Ptr1, void *Ptr2, void *Ptr3); +rnd_bool pcb_chg_selected_size(int, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_selected_clear_size(int, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_selected_2nd_size(int, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_selected_rot(int, double, rnd_bool); +rnd_bool pcb_chg_selected_join(int); +rnd_bool pcb_set_selected_join(int); +rnd_bool pcb_clr_selected_join(int); +rnd_bool pcb_chg_selected_nonetlist(int); +rnd_bool pcb_chg_selected_thermals(int types, int therm_style, unsigned long lid); +rnd_bool pcb_chg_obj_size(int, void *, void *, void *, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_obj_1st_size(int, void *, void *, void *, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_obj_thermal(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int therm_type, unsigned long lid); +rnd_bool pcb_chg_obj_clear_size(int, void *, void *, void *, rnd_coord_t, rnd_bool); +rnd_bool pcb_chg_obj_2nd_size(int, void *, void *, void *, rnd_coord_t, rnd_bool, rnd_bool); +rnd_bool pcb_chg_obj_rot(int, void *, void *, void *, double, rnd_bool, rnd_bool); +rnd_bool pcb_chg_obj_join(int, void *, void *, void *); +rnd_bool pcb_set_obj_join(int, void *, void *, void *); +rnd_bool pcb_clr_obj_join(int, void *, void *, void *); +rnd_bool pcb_chg_obj_nonetlist(int Type, void *Ptr1, void *Ptr2, void *Ptr3); void *pcb_chg_obj_name(int, void *, void *, void *, char *); /* queries the user for a new object name and changes it */ void *pcb_chg_obj_name_query(pcb_any_obj_t *obj); -pcb_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, pcb_coord_t r, pcb_bool absolute); -pcb_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, pcb_bool absolute); -pcb_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, pcb_bool fixIt); -pcb_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, pcb_bool fixIt); +rnd_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, rnd_coord_t r, rnd_bool absolute); +rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, rnd_bool absolute); +rnd_bool pcb_chg_selected_angle(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt); +rnd_bool pcb_chg_selected_radius(int types, int is_start, pcb_angle_t Difference, rnd_bool fixIt); /* Change flag flg of an object in a way dictated by 'how' */ void pcb_flag_change(pcb_board_t *pcb, pcb_change_flag_t how, pcb_flag_values_t flg, int Type, void *Ptr1, void *Ptr2, void *Ptr3); Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 30902) +++ trunk/src/change_act.c (revision 30903) @@ -73,11 +73,11 @@ const char *function; const char *delta = NULL; const char *units = NULL; - pcb_bool absolute; - pcb_coord_t value; + rnd_bool absolute; + rnd_coord_t value; int type = PCB_OBJ_VOID; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; int got_coords = 0; RND_PCB_ACT_CONVARG(1, FGW_STR, ChangeClearSize, function = argv[1].val.str); @@ -174,8 +174,8 @@ static void ChangeFlag(const char *what, const char *flag_name, int value, const char *cmd_name) { - pcb_bool(*set_object) (int, void *, void *, void *); - pcb_bool(*set_selected) (int); + rnd_bool(*set_object) (int, void *, void *, void *); + rnd_bool(*set_selected) (int); if (PCB_NSTRCMP(flag_name, "join") == 0) { /* Note: these are backwards, because the flag is "clear" but @@ -184,7 +184,7 @@ set_selected = value ? pcb_clr_selected_join : pcb_set_selected_join; } else { - pcb_message(PCB_MSG_ERROR, "%s(): Flag \"%s\" is not valid\n", cmd_name, flag_name); + rnd_message(PCB_MSG_ERROR, "%s(): Flag \"%s\" is not valid\n", cmd_name, flag_name); return; } @@ -193,7 +193,7 @@ { int type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to change", &x, &y, 0); @@ -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)) - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Feature not supported\n"); + rnd_message(PCB_MSG_ERROR, "Feature not supported\n"); break; case F_Selected: @@ -275,8 +275,8 @@ const char *function; const char *delta; const char *units = NULL; - pcb_bool absolute; /* indicates if absolute size is given */ - pcb_coord_t value; + rnd_bool absolute; /* indicates if absolute size is given */ + rnd_coord_t value; int type = PCB_OBJ_VOID, tostyle = 0; void *ptr1, *ptr2, *ptr3; @@ -289,7 +289,7 @@ int funcid = pcb_funchash_get(function, NULL); if (funcid == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to change size of", &x, &y, 0); type = pcb_search_screen(x, y, PCB_CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3); } @@ -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)) - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Feature not supported.\n"); + rnd_message(PCB_MSG_ERROR, "Feature not supported.\n"); break; case F_Selected: @@ -373,8 +373,8 @@ const char *units = NULL; int type = PCB_OBJ_VOID; void *ptr1, *ptr2, *ptr3; - pcb_bool absolute; - pcb_coord_t value; + rnd_bool absolute; + rnd_coord_t value; RND_PCB_ACT_CONVARG(1, FGW_STR, Change2ndSize, function = argv[1].val.str); RND_PCB_ACT_CONVARG(2, FGW_STR, Change2ndSize, delta = argv[2].val.str); @@ -384,7 +384,7 @@ int funcid = pcb_funchash_get(function, NULL); if (funcid == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Select an Object", &x, &y, 0); type = pcb_search_screen(x, y, PCB_CHANGE2NDSIZE_TYPES, &ptr1, &ptr2, &ptr3); } @@ -489,7 +489,7 @@ /* change the refdes of a subcircuit */ case F_Subc: { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Select a subcircuit", &x, &y, 0); type = op = PCB_OBJ_SUBC; goto do_chg_name; @@ -498,7 +498,7 @@ case F_Object: case F_Refdes: { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2, *ptr3; rnd_hid_get_coords("Select an Object", &x, &y, 0); type = op == F_Refdes ? PCB_OBJ_SUBC : PCB_CHANGENAME_TYPES; @@ -569,7 +569,7 @@ case F_ToggleObject: case F_Object: { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; @@ -618,7 +618,7 @@ case F_Object: case F_Element: { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; rnd_hid_get_coords("Select an Element", &x, &y, 0); @@ -662,13 +662,13 @@ void *ptr1, *ptr2, *ptr3; int type, kind; int err = 0; - pcb_coord_t gx, gy; + rnd_coord_t gx, gy; RND_PCB_ACT_CONVARG(1, FGW_STR, SetThermal, function = argv[1].val.str); RND_PCB_ACT_CONVARG(2, FGW_STR, SetThermal, style = argv[2].val.str); if (function && *function && style && *style) { - pcb_bool absolute; + rnd_bool absolute; kind = pcb_get_value_ex(style, NULL, &absolute, NULL, NULL, NULL); if (absolute && (kind <= 5)) @@ -758,7 +758,7 @@ { int fnc_id; const char *val, *units = NULL; - pcb_bool absolute; /* flag for 'absolute' value */ + rnd_bool absolute; /* flag for 'absolute' value */ double value; int err = 0; @@ -807,7 +807,7 @@ { const char *prim; const char *delta; - pcb_bool absolute; /* indicates if absolute size is given */ + rnd_bool absolute; /* indicates if absolute size is given */ double value; int funcid, type = PCB_OBJ_VOID, which; void *ptr1, *ptr2, *ptr3; @@ -821,12 +821,12 @@ else if (pcb_strcasecmp(prim, "delta") == 0) which = 1; else if (pcb_strcasecmp(prim, "both") == 0) which = 2; else { - pcb_message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); + rnd_message(PCB_MSG_ERROR, "Second argument of ChangeAngle must be start, delta or both\n"); return -1; } if (funcid == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to change angle of", &x, &y, 0); type = pcb_search_screen(x, y, PCB_CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3); } @@ -836,7 +836,7 @@ while(isspace(*delta)) delta++; value = strtod(delta, &end); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Invalid numeric (in angle)\n"); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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); @@ -885,7 +885,7 @@ const char *prim; const char *delta; const char *units; - pcb_bool absolute; /* indicates if absolute size is given */ + rnd_bool absolute; /* indicates if absolute size is given */ double value; int funcid, type = PCB_OBJ_VOID, which; void *ptr1, *ptr2, *ptr3; @@ -899,12 +899,12 @@ else if ((pcb_strcasecmp(prim, "height") == 0) || (pcb_strcasecmp(prim, "y") == 0)) which = 1; else if (pcb_strcasecmp(prim, "both") == 0) which = 2; else { - pcb_message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); + rnd_message(PCB_MSG_ERROR, "Second argument of ChangeRadius must be width, x, height, y or both\n"); return -1; } if (funcid == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to change radius of", &x, &y, 0); type = pcb_search_screen(x, y, PCB_CHANGESIZE_TYPES, &ptr1, &ptr2, &ptr3); } @@ -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)) - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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 30902) +++ trunk/src/conf_core.c (revision 30903) @@ -46,11 +46,11 @@ conf_native_t *nlegacy = pcb_conf_get_field(legacy_path); conf_native_t *ndst = pcb_conf_get_field(dst_path); if (nlegacy == NULL) { - pcb_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid legacy path '%s' for %s\n", legacy_path, dst_path); + rnd_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid legacy path '%s' for %s\n", legacy_path, dst_path); return; } if (ndst == NULL) { - pcb_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid new path %s\n", dst_path); + rnd_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid new path %s\n", dst_path); return; } pcb_conf_legacy_(ndst, nlegacy); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 30902) +++ trunk/src/crosshair.c (revision 30903) @@ -71,7 +71,7 @@ pcb_crosshair_note_t pcb_crosshair_note; -static void thindraw_moved_ps(pcb_pstk_t *ps, pcb_coord_t x, pcb_coord_t y) +static void thindraw_moved_ps(pcb_pstk_t *ps, rnd_coord_t x, rnd_coord_t y) { /* Make a copy of the pin structure, moved to the correct position */ pcb_pstk_t moved_ps = *ps; @@ -84,7 +84,7 @@ /* --------------------------------------------------------------------------- * creates a tmp polygon with coordinates converted to screen system */ -void pcb_xordraw_poly(pcb_poly_t *polygon, pcb_coord_t dx, pcb_coord_t dy, int dash_last) +void pcb_xordraw_poly(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, int dash_last) { pcb_cardinal_t i; for (i = 0; i < polygon->PointN; i++) { @@ -113,7 +113,7 @@ * creates a tmp polygon with coordinates converted to screen system, designed * for subc paste xor-draw */ -void pcb_xordraw_poly_subc(pcb_poly_t *polygon, pcb_coord_t dx, pcb_coord_t dy, pcb_coord_t w, pcb_coord_t h, int mirr) +void pcb_xordraw_poly_subc(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, rnd_coord_t w, rnd_coord_t h, int mirr) { pcb_cardinal_t i; for (i = 0; i < polygon->PointN; i++) { @@ -133,10 +133,10 @@ } } -void pcb_xordraw_attached_arc(pcb_coord_t thick) +void pcb_xordraw_attached_arc(rnd_coord_t thick) { pcb_arc_t arc; - pcb_coord_t wx, wy; + rnd_coord_t wx, wy; pcb_angle_t sa, dir; wx = pcb_crosshair.X - pcb_crosshair.AttachedBox.Point1.X; @@ -171,7 +171,7 @@ void pcb_xordraw_buffer(pcb_buffer_t *Buffer) { pcb_cardinal_t i; - pcb_coord_t x, y; + rnd_coord_t x, y; /* set offset */ x = pcb_crosshair.AttachedObject.tx - Buffer->X; @@ -253,8 +253,8 @@ */ void pcb_xordraw_movecopy(void) { - pcb_coord_t dx = pcb_crosshair.AttachedObject.tx - pcb_crosshair.AttachedObject.X; - pcb_coord_t dy = pcb_crosshair.AttachedObject.ty - pcb_crosshair.AttachedObject.Y; + rnd_coord_t dx = pcb_crosshair.AttachedObject.tx - pcb_crosshair.AttachedObject.X; + rnd_coord_t dy = pcb_crosshair.AttachedObject.ty - pcb_crosshair.AttachedObject.Y; int event_sent = 0; switch (pcb_crosshair.AttachedObject.Type) { @@ -274,8 +274,8 @@ int constrained = 0; pcb_line_t line; - pcb_coord_t dx1 = dx, dx2 = dx; - pcb_coord_t dy1 = dy, dy2 = dy; + rnd_coord_t dx1 = dx, dx2 = dx; + rnd_coord_t dy1 = dy, dy2 = dy; memcpy(&line, (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2, sizeof(line)); @@ -402,8 +402,8 @@ case PCB_OBJ_ARC_POINT: { pcb_arc_t arc = *((pcb_arc_t *)pcb_crosshair.AttachedObject.Ptr2); - pcb_coord_t ox1,ox2,oy1,oy2; - pcb_coord_t nx1,nx2,ny1,ny2; + rnd_coord_t ox1,ox2,oy1,oy2; + rnd_coord_t nx1,nx2,ny1,ny2; /* Get the initial position of the arc point */ pcb_arc_get_end(&arc,0, &ox1, &oy1); @@ -475,7 +475,7 @@ pcb_data_t *data = obj->parent.layer->parent.data; if ((data != NULL) && (data->parent_type == PCB_PARENT_SUBC)) { pcb_subc_t *sc = data->parent.subc; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if (pcb_subc_get_origin(sc, &ox, &oy) == 0) pcb_render->draw_line(pcb_crosshair.GC, ox, oy, pcb_crosshair.X, pcb_crosshair.Y); } @@ -486,7 +486,7 @@ pcb_event(&PCB->hidlib, PCB_EVENT_RUBBER_MOVE_DRAW, "icc", 0, dx, dy ); } -void pcbhl_draw_attached(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode) +void pcbhl_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) { if (!inhibit_drawing_mode) { pcb_render->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, 1, NULL); @@ -498,7 +498,7 @@ /* an attached box does not depend on a special mode */ if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_SECOND || pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; x1 = pcb_crosshair.AttachedBox.Point1.X; y1 = pcb_crosshair.AttachedBox.Point1.Y; @@ -512,9 +512,9 @@ } -void pcbhl_draw_marks(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode) +void pcbhl_draw_marks(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) { - pcb_coord_t ms = conf_core.appearance.mark_size, ms2 = ms / 2; + rnd_coord_t ms = conf_core.appearance.mark_size, ms2 = ms / 2; if ((pcb_marked.status) || (hidlib->tool_grabbed.status)) { if (!inhibit_drawing_mode) { @@ -554,7 +554,7 @@ * They should initiate a redraw of the mark - which may (if necessary) mean * repainting the whole screen if the GUI hasn't tracked the mark's location. */ -void pcb_notify_mark_change(pcb_bool changes_complete) +void pcb_notify_mark_change(rnd_bool changes_complete) { if (pcb_gui->notify_mark_change) pcb_gui->notify_mark_change(pcb_gui, changes_complete); @@ -568,8 +568,8 @@ */ struct onpoint_search_info { pcb_crosshair_t *crosshair; - pcb_coord_t X; - pcb_coord_t Y; + rnd_coord_t X; + rnd_coord_t Y; }; static pcb_r_dir_t onpoint_line_callback(const pcb_box_t * box, void *cl) @@ -603,7 +603,7 @@ struct onpoint_search_info *info = (struct onpoint_search_info *) cl; pcb_crosshair_t *crosshair = info->crosshair; pcb_arc_t *arc = (pcb_arc_t *) box; - pcb_coord_t p1x, p1y, p2x, p2y; + rnd_coord_t p1x, p1y, p2x, p2y; p1x = arc->X - arc->Width * cos(PCB_TO_RADIANS(arc->StartAngle)); p1y = arc->Y + arc->Height * sin(PCB_TO_RADIANS(arc->StartAngle)); @@ -669,12 +669,12 @@ * at the given coordinates and adds them to the crosshair's * object list along with their respective type. */ -static void onpoint_work(pcb_crosshair_t * crosshair, pcb_coord_t X, pcb_coord_t Y) +static void onpoint_work(pcb_crosshair_t * crosshair, rnd_coord_t X, rnd_coord_t Y) { pcb_box_t SearchBox = pcb_point_box(X, Y); struct onpoint_search_info info; int i; - pcb_bool redraw = pcb_false; + rnd_bool redraw = pcb_false; op_swap(crosshair); @@ -730,7 +730,7 @@ return x * x; } -static double crosshair_sq_dist(pcb_crosshair_t * crosshair, pcb_coord_t x, pcb_coord_t y) +static double crosshair_sq_dist(pcb_crosshair_t * crosshair, rnd_coord_t x, rnd_coord_t y) { return square(x - crosshair->X) + square(y - crosshair->Y); } @@ -738,8 +738,8 @@ struct snap_data { pcb_crosshair_t *crosshair; double nearest_sq_dist; - pcb_bool nearest_is_grid; - pcb_coord_t x, y; + rnd_bool nearest_is_grid; + rnd_coord_t x, y; }; /* Snap to a given location if it is the closest thing we found so far. @@ -748,7 +748,7 @@ * pressing the SHIFT key. If the SHIFT key is pressed, the closest object * (including grid points), is always preferred. */ -static void check_snap_object(struct snap_data *snap_data, pcb_coord_t x, pcb_coord_t y, pcb_bool prefer_to_grid, pcb_any_obj_t *snapo) +static void check_snap_object(struct snap_data *snap_data, rnd_coord_t x, rnd_coord_t y, rnd_bool prefer_to_grid, pcb_any_obj_t *snapo) { double sq_dist; @@ -774,7 +774,7 @@ } } -static pcb_bool should_snap_offgrid_line(pcb_board_t *pcb, pcb_layer_t *layer, pcb_line_t *line) +static rnd_bool should_snap_offgrid_line(pcb_board_t *pcb, pcb_layer_t *layer, pcb_line_t *line) { /* Allow snapping to off-grid lines when drawing new lines (on * the same layer), and when moving a line end-point @@ -790,12 +790,12 @@ return pcb_false; } -static void check_snap_offgrid_line(pcb_board_t *pcb, struct snap_data *snap_data, pcb_coord_t nearest_grid_x, pcb_coord_t nearest_grid_y) +static void check_snap_offgrid_line(pcb_board_t *pcb, struct snap_data *snap_data, rnd_coord_t nearest_grid_x, rnd_coord_t nearest_grid_y) { void *ptr1, *ptr2, *ptr3; int ans; pcb_line_t *line; - pcb_coord_t try_x, try_y; + rnd_coord_t try_x, try_y; double dx, dy; double dist; @@ -866,10 +866,10 @@ /* --------------------------------------------------------------------------- * recalculates the passed coordinates to fit the current grid setting */ -void pcb_crosshair_grid_fit(pcb_coord_t X, pcb_coord_t Y) +void pcb_crosshair_grid_fit(rnd_coord_t X, rnd_coord_t Y) { rnd_hidlib_t *hidlib = &PCB->hidlib; - pcb_coord_t nearest_grid_x, nearest_grid_y; + rnd_coord_t nearest_grid_x, nearest_grid_y; void *ptr1, *ptr2, *ptr3; struct snap_data snap_data; int ans; @@ -881,8 +881,8 @@ nearest_grid_y = pcb_grid_fit(pcb_crosshair.Y, PCB->hidlib.grid, PCB->hidlib.grid_oy); if (pcb_marked.status && conf_core.editor.orthogonal_moves) { - pcb_coord_t dx = pcb_crosshair.X - hidlib->tool_grabbed.X; - pcb_coord_t dy = pcb_crosshair.Y - hidlib->tool_grabbed.Y; + rnd_coord_t dx = pcb_crosshair.X - hidlib->tool_grabbed.X; + rnd_coord_t dy = pcb_crosshair.Y - hidlib->tool_grabbed.Y; if (PCB_ABS(dx) > PCB_ABS(dy)) nearest_grid_y = hidlib->tool_grabbed.Y; else @@ -901,7 +901,7 @@ if (ans & PCB_OBJ_SUBC) { pcb_subc_t *sc = (pcb_subc_t *) ptr1; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if (pcb_subc_get_origin(sc, &ox, &oy) == 0) check_snap_object(&snap_data, ox, oy, pcb_false, (pcb_any_obj_t *)sc); } @@ -930,7 +930,7 @@ if (ans == PCB_OBJ_ARC_POINT) { /* Arc point needs special handling as it's not a real point but has to be calculated */ - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; pcb_arc_get_end((pcb_arc_t *)ptr2, (ptr3 != pcb_arc_start_ptr), &ex, &ey); check_snap_object(&snap_data, ex, ey, pcb_true, (pcb_any_obj_t *)ptr2); } @@ -947,7 +947,7 @@ if (ans == PCB_OBJ_POLY) { pcb_poly_t *p = ptr2; if (p->term != NULL) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; cx = (p->BoundingBox.X1 + p->BoundingBox.X2)/2; cy = (p->BoundingBox.Y1 + p->BoundingBox.Y2)/2; if (pcb_poly_is_point_in_p(cx, cy, 1, p)) @@ -1004,7 +1004,7 @@ /* --------------------------------------------------------------------------- * move crosshair relative (has to be switched off) */ -void pcb_crosshair_move_relative(pcb_coord_t DeltaX, pcb_coord_t DeltaY) +void pcb_crosshair_move_relative(rnd_coord_t DeltaX, rnd_coord_t DeltaY) { pcb_crosshair_grid_fit(pcb_crosshair.X + DeltaX, pcb_crosshair.Y + DeltaY); } @@ -1013,9 +1013,9 @@ * move crosshair absolute * return pcb_true if the crosshair was moved from its existing position */ -pcb_bool pcb_crosshair_move_absolute(pcb_coord_t X, pcb_coord_t Y) +rnd_bool pcb_crosshair_move_absolute(rnd_coord_t X, rnd_coord_t Y) { - pcb_coord_t x, y, z; + rnd_coord_t x, y, z; pcb_crosshair.ptr_x = X; pcb_crosshair.ptr_y = Y; x = pcb_crosshair.X; @@ -1041,9 +1041,9 @@ /* --------------------------------------------------------------------------- * centers the displayed PCB around the specified point (X,Y) */ -void pcb_center_display(pcb_coord_t X, pcb_coord_t Y) +void pcb_center_display(rnd_coord_t X, rnd_coord_t Y) { - pcb_coord_t save_grid = PCB->hidlib.grid; + rnd_coord_t save_grid = PCB->hidlib.grid; PCB->hidlib.grid = 1; if (pcb_crosshair_move_absolute(X, Y)) pcb_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); @@ -1097,7 +1097,7 @@ pcb_event_unbind_allcookie(crosshair_cookie); } -void pcb_crosshair_set_local_ref(pcb_coord_t X, pcb_coord_t Y, pcb_bool Showing) +void pcb_crosshair_set_local_ref(rnd_coord_t X, rnd_coord_t Y, rnd_bool Showing) { static pcb_mark_t old; static int count = 0; @@ -1120,7 +1120,7 @@ } } -static void pcb_event_move_crosshair(pcb_coord_t ev_x, pcb_coord_t ev_y) +static void pcb_event_move_crosshair(rnd_coord_t ev_x, rnd_coord_t ev_y) { if (pcb_crosshair_move_absolute(ev_x, ev_y)) { /* update object position and cursor location */ @@ -1164,7 +1164,7 @@ } -void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot) +void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { if (!mouse_mot) { pcb_hid_notify_crosshair_change(hl, pcb_false); Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 30902) +++ trunk/src/crosshair.h (revision 30903) @@ -41,25 +41,25 @@ typedef struct { /* currently marked block */ pcb_point_t Point1, Point2; /* start- and end-position */ long int State; - pcb_bool otherway; + rnd_bool otherway; } pcb_attached_box_t; typedef struct { /* currently attached object */ - pcb_coord_t X, Y; /* saved position when tool is move */ - pcb_coord_t tx, ty; /* target position when tool is move */ + rnd_coord_t X, Y; /* saved position when tool is move */ + rnd_coord_t tx, ty; /* target position when tool is move */ pcb_box_t BoundingBox; long int Type; /* object type */ long int State; void *Ptr1, *Ptr2, *Ptr3; /* three pointers to data, see search.c */ pcb_angle_t start_angle, delta_angle; - pcb_coord_t radius; + rnd_coord_t radius; } pcb_attached_object_t; typedef struct { /* holds crosshair, cursor and crosshair-attachment information */ pcb_hid_gc_t GC; /* GC for cursor drawing */ pcb_hid_gc_t AttachGC; /* and for displaying buffer contents */ - pcb_coord_t ptr_x, ptr_y; /* last seen raw mouse pointer x;y coords */ - pcb_coord_t X, Y; /* (snapped) crosshair position */ + rnd_coord_t ptr_x, ptr_y; /* last seen raw mouse pointer x;y coords */ + rnd_coord_t X, Y; /* (snapped) crosshair position */ pcb_attached_line_t AttachedLine; /* data of new lines... */ pcb_attached_box_t AttachedBox; pcb_poly_t AttachedPolygon; @@ -73,7 +73,7 @@ /* list of object IDs that could have been dragged so that they can be cycled */ long int *drags; int drags_len, drags_current; - pcb_coord_t dragx, dragy; /* the point where drag started */ + rnd_coord_t dragx, dragy; /* the point where drag started */ /* cached tool IDs */ int tool_arrow, tool_line, tool_move, tool_arc, tool_poly, tool_poly_hole; @@ -81,7 +81,7 @@ typedef struct { pcb_cardinal_t Buffer; /* buffer number */ - pcb_bool Moving; /* true if clicked on an object of PCB_SELECT_TYPES */ + rnd_bool Moving; /* true if clicked on an object of PCB_SELECT_TYPES */ void *ptr1, *ptr2, *ptr3; } pcb_crosshair_note_t; @@ -96,22 +96,22 @@ extern pcb_crosshair_t pcb_crosshair; extern pcb_mark_t pcb_marked; /* the point the user explicitly marked, or in some operations where the operation originally started */ -void pcb_notify_mark_change(pcb_bool changes_complete); -void pcb_crosshair_move_relative(pcb_coord_t, pcb_coord_t); -pcb_bool pcb_crosshair_move_absolute(pcb_coord_t, pcb_coord_t); +void pcb_notify_mark_change(rnd_bool changes_complete); +void pcb_crosshair_move_relative(rnd_coord_t, rnd_coord_t); +rnd_bool pcb_crosshair_move_absolute(rnd_coord_t, rnd_coord_t); void pcb_crosshair_init(void); void pcb_crosshair_pre_init(void); void pcb_crosshair_uninit(void); -void pcb_crosshair_grid_fit(pcb_coord_t, pcb_coord_t); -void pcb_center_display(pcb_coord_t X, pcb_coord_t Y); +void pcb_crosshair_grid_fit(rnd_coord_t, rnd_coord_t); +void pcb_center_display(rnd_coord_t X, rnd_coord_t Y); -void pcb_crosshair_set_local_ref(pcb_coord_t X, pcb_coord_t Y, pcb_bool Showing); +void pcb_crosshair_set_local_ref(rnd_coord_t X, rnd_coord_t Y, rnd_bool Showing); /*** utility for plugins ***/ -void pcb_xordraw_attached_line(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t); -void pcb_xordraw_poly(pcb_poly_t *polygon, pcb_coord_t dx, pcb_coord_t dy, int dash_last); -void pcb_xordraw_poly_subc(pcb_poly_t *polygon, pcb_coord_t dx, pcb_coord_t dy, pcb_coord_t w, pcb_coord_t h, int mirr); -void pcb_xordraw_attached_arc(pcb_coord_t thick); +void pcb_xordraw_attached_line(rnd_coord_t, rnd_coord_t, rnd_coord_t, rnd_coord_t, rnd_coord_t); +void pcb_xordraw_poly(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, int dash_last); +void pcb_xordraw_poly_subc(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, rnd_coord_t w, rnd_coord_t h, int mirr); +void pcb_xordraw_attached_arc(rnd_coord_t thick); void pcb_xordraw_buffer(pcb_buffer_t *Buffer); void pcb_xordraw_movecopy(void); void pcb_xordraw_insert_pt_obj(void); Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30902) +++ trunk/src/data.c (revision 30903) @@ -53,7 +53,7 @@ int pcb_layer_stack[PCB_MAX_LAYER]; /* determines the layer draw order */ pcb_buffer_t pcb_buffers[PCB_MAX_BUFFER]; /* my buffers */ -pcb_bool pcb_bumped; /* if the undo serial number has changed */ +rnd_bool pcb_bumped; /* if the undo serial number has changed */ int pcb_added_lines; @@ -216,7 +216,7 @@ free(data); } -pcb_bool pcb_data_is_empty(pcb_data_t *Data) +rnd_bool pcb_data_is_empty(pcb_data_t *Data) { pcb_cardinal_t i; @@ -229,7 +229,7 @@ return pcb_true; } -pcb_box_t *pcb_data_bbox(pcb_box_t *out, pcb_data_t *Data, pcb_bool ignore_floaters) +pcb_box_t *pcb_data_bbox(pcb_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = PCB_MAX_COORD; @@ -281,7 +281,7 @@ return (pcb_data_is_empty(Data) ? NULL : out); } -pcb_box_t *pcb_data_bbox_naked(pcb_box_t *out, pcb_data_t *Data, pcb_bool ignore_floaters) +pcb_box_t *pcb_data_bbox_naked(pcb_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) { /* preset identifiers with highest and lowest possible values */ out->X1 = out->Y1 = PCB_MAX_COORD; @@ -414,7 +414,7 @@ return NULL; } -void pcb_data_mirror(pcb_data_t *data, pcb_coord_t y_offs, pcb_data_mirror_text_t mtxt, pcb_bool pstk_smirror, pcb_bool undoable) +void pcb_data_mirror(pcb_data_t *data, rnd_coord_t y_offs, pcb_data_mirror_text_t mtxt, rnd_bool pstk_smirror, rnd_bool undoable) { pcb_undo_freeze_serial(); pcb_data_clip_inhibit_inc(data); @@ -490,7 +490,7 @@ /* when not scaled recursively, position still needs to be scaled */ PCB_SUBC_LOOP(data); { - pcb_coord_t ox, oy, nx, ny; + rnd_coord_t ox, oy, nx, ny; if (pcb_subc_get_origin(subc, &ox, &oy) == 0) { nx = pcb_round((double)ox * sx); ny = pcb_round((double)oy * sy); @@ -525,7 +525,7 @@ int pcb_data_normalize_(pcb_data_t *data, pcb_box_t *data_bbox) { pcb_box_t tmp; - pcb_coord_t dx = 0, dy = 0; + rnd_coord_t dx = 0, dy = 0; if (data_bbox == NULL) { data_bbox = &tmp; @@ -569,7 +569,7 @@ extern pcb_opfunc_t MoveFunctions; -void pcb_data_move(pcb_data_t *data, pcb_coord_t dx, pcb_coord_t dy, int undoable) +void pcb_data_move(pcb_data_t *data, rnd_coord_t dx, rnd_coord_t dy, int undoable) { pcb_opctx_t ctx; @@ -685,7 +685,7 @@ pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const pcb_box_t *starting_region, pcb_r_dir_t (*region_in_search) (const pcb_box_t *region, void *cl), pcb_r_dir_t (*rectangle_in_region) (const pcb_box_t *box, void *cl), - void *closure, int *num_found, pcb_bool vis_only) + void *closure, int *num_found, rnd_bool vis_only) { pcb_layer_id_t lid; pcb_r_dir_t res = 0; @@ -722,15 +722,15 @@ data->clip_inhibit++; if (old > data->clip_inhibit) { - pcb_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); abort(); } } -void pcb_data_clip_inhibit_dec(pcb_data_t *data, pcb_bool enable_progbar) +void pcb_data_clip_inhibit_dec(pcb_data_t *data, rnd_bool enable_progbar) { if (data->clip_inhibit == 0) { - pcb_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: overflow on poly clip inhibit\n"); assert(!"clip_inhibit underflow"); return; } @@ -778,7 +778,7 @@ } } -void pcb_data_clip_all_poly(pcb_data_t *data, pcb_bool enable_progbar, pcb_bool force_all) +void pcb_data_clip_all_poly(pcb_data_t *data, rnd_bool enable_progbar, rnd_bool force_all) { data_clip_all_t ctx; @@ -813,12 +813,12 @@ pcb_hid_progress(0, 0, NULL); } -void pcb_data_clip_dirty(pcb_data_t *data, pcb_bool enable_progbar) +void pcb_data_clip_dirty(pcb_data_t *data, rnd_bool enable_progbar) { pcb_data_clip_all_poly(data, enable_progbar, pcb_false); } -void pcb_data_clip_all(pcb_data_t *data, pcb_bool enable_progbar) +void pcb_data_clip_all(pcb_data_t *data, rnd_bool enable_progbar) { pcb_data_clip_all_poly(data, enable_progbar, pcb_true); } Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 30902) +++ trunk/src/data.h (revision 30903) @@ -77,7 +77,7 @@ extern int pcb_added_lines; extern int pcb_layer_stack[PCB_MAX_LAYER]; -extern pcb_bool pcb_bumped; +extern rnd_bool pcb_bumped; /****** callback based loops *****/ @@ -129,12 +129,12 @@ /* Calls pcb_data_uninit() and free data */ void pcb_data_free(pcb_data_t *data); -pcb_bool pcb_data_is_empty(pcb_data_t *); +rnd_bool pcb_data_is_empty(pcb_data_t *); /* gets minimum and maximum coordinates * returns NULL if layout is empty */ -pcb_box_t *pcb_data_bbox(pcb_box_t *out, pcb_data_t *Data, pcb_bool ignore_floaters); -pcb_box_t *pcb_data_bbox_naked(pcb_box_t *out, pcb_data_t *Data, pcb_bool ignore_floaters); +pcb_box_t *pcb_data_bbox(pcb_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); +pcb_box_t *pcb_data_bbox_naked(pcb_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters); /* Make sure all layers of data has their .parent field pointing to the data */ void pcb_data_set_layer_parents(pcb_data_t *data); @@ -171,9 +171,9 @@ PCB_TXM_SIDE = 1, /* mirror text, changing side */ PCB_TXM_COORD /* mirror text base coords only */ } pcb_data_mirror_text_t; -void pcb_data_mirror(pcb_data_t *data, pcb_coord_t y_offs, pcb_data_mirror_text_t mtxt, pcb_bool pstk_smirror, pcb_bool undoable); +void pcb_data_mirror(pcb_data_t *data, rnd_coord_t y_offs, pcb_data_mirror_text_t mtxt, rnd_bool pstk_smirror, rnd_bool undoable); -void pcb_data_move(pcb_data_t *data, pcb_coord_t dx, pcb_coord_t dy, int undoable); +void pcb_data_move(pcb_data_t *data, rnd_coord_t dx, rnd_coord_t dy, int undoable); /* Multiply x and y coords by sx and sy and thickness by sth (where applicable). If recurse is non-zero, also modify subcircuits */ @@ -187,7 +187,7 @@ pcb_r_dir_t pcb_data_r_search(pcb_data_t *data, pcb_objtype_t types, const pcb_box_t *starting_region, pcb_r_dir_t (*region_in_search) (const pcb_box_t *region, void *cl), pcb_r_dir_t (*rectangle_in_region) (const pcb_box_t *box, void *cl), - void *closure, int *num_found, pcb_bool vis_only); + void *closure, int *num_found, rnd_bool vis_only); /* Either pcb->data or the subcircuit's data if PCB is a subc (footprint edit mode) */ #define PCB_REAL_DATA(pcb) \ @@ -202,15 +202,15 @@ /* decrease the inhibit counter - if it's zero, reclip all dirty polygons; enable_progbar controls whether a progress bar is drawn for reclips that take longer than a few seconds. */ -void pcb_data_clip_inhibit_dec(pcb_data_t *data, pcb_bool enable_progbar); +void pcb_data_clip_inhibit_dec(pcb_data_t *data, rnd_bool enable_progbar); /* attempt to reclip all dirty polygons; normally called by pcb_data_clip_inhibit_dec(). */ -void pcb_data_clip_dirty(pcb_data_t *data, pcb_bool enable_progbar); +void pcb_data_clip_dirty(pcb_data_t *data, rnd_bool enable_progbar); /* Force reclip all polygons; useful after a move-everything kind of operation (e.g. autocrop()) */ -void pcb_data_clip_all(pcb_data_t *data, pcb_bool enable_progbar); +void pcb_data_clip_all(pcb_data_t *data, rnd_bool enable_progbar); /* Recursively change flags of data; how is one of pcb_change_flag_t */ Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 30902) +++ trunk/src/draw.c (revision 30903) @@ -60,10 +60,10 @@ pcb_box_t pcb_draw_invalidated = { COORD_MAX, COORD_MAX, -COORD_MAX, -COORD_MAX }; int pcb_draw_force_termlab = 0; -pcb_bool pcb_draw_doing_assy = pcb_false; +rnd_bool pcb_draw_doing_assy = pcb_false; static vtp0_t delayed_labels, delayed_objs, annot_objs; -pcb_bool delayed_labels_enabled = pcb_false; -pcb_bool delayed_terms_enabled = pcb_false; +rnd_bool delayed_labels_enabled = pcb_false; +rnd_bool delayed_terms_enabled = pcb_false; static void draw_everything(pcb_draw_info_t *info); static void pcb_draw_layer_grp(pcb_draw_info_t *info, int, int); @@ -106,13 +106,13 @@ pcb_color_load_int(dst, MIN(255, orig->r * factor), MIN(255, orig->g * factor), MIN(255, orig->b * factor), 255); } -void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, unsigned int segs, pcb_bool_t cheap) +void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap) { /* TODO: we need a real geo lib... using double here is plain wrong */ double dx = x2-x1, dy = y2-y1; double len_mnt = PCB_ABS(dx) + PCB_ABS(dy); int n; - pcb_coord_t minlen = pcb_render->coord_per_pix * 8; + rnd_coord_t minlen = pcb_render->coord_per_pix * 8; /* Ignore info->xform->bloat because a dashed line is always thin */ @@ -348,7 +348,7 @@ char do_group[PCB_MAX_LAYERGRP]; /* This is the reverse of the order in which we draw them. */ pcb_layergrp_id_t drawn_groups[PCB_MAX_LAYERGRP]; - pcb_bool paste_empty; + rnd_bool paste_empty; legacy_vlayer_t lvly; pcb_xform_t tmp; @@ -990,7 +990,7 @@ pcb_gfx_invalidate_erase((pcb_gfx_t *)ptr); break; default: - pcb_message(PCB_MSG_ERROR, "hace: Internal ERROR, trying to erase an unknown type\n"); + rnd_message(PCB_MSG_ERROR, "hace: Internal ERROR, trying to erase an unknown type\n"); } } @@ -1212,10 +1212,10 @@ /* vert flip magic: make sure the offset is in-line with the flip and our sick y coords for vertical */ #define PCB_TERM_LABEL_SETUP(label) \ - pcb_bool flip_x = pcbhl_conf.editor.view.flip_x; \ - pcb_bool flip_y = pcbhl_conf.editor.view.flip_y; \ + rnd_bool flip_x = pcbhl_conf.editor.view.flip_x; \ + rnd_bool flip_y = pcbhl_conf.editor.view.flip_y; \ pcb_font_t *font = pcb_font(PCB, 0, 0); \ - pcb_coord_t w, h, dx, dy; \ + rnd_coord_t w, h, dx, dy; \ if (vert) { \ h = pcb_text_width(font, scale, label); \ w = pcb_text_height(font, scale, label); \ @@ -1238,7 +1238,7 @@ } -void pcb_label_draw(pcb_draw_info_t *info, pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const char *label) +void pcb_label_draw(pcb_draw_info_t *info, rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label) { int mirror, direction; PCB_TERM_LABEL_SETUP((const unsigned char *)label); @@ -1255,9 +1255,9 @@ pcb_draw_force_termlab--; } -void pcb_label_invalidate(pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const char *label) +void pcb_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label) { - pcb_coord_t ox = x, oy = y, margin = 0; + rnd_coord_t ox = x, oy = y, margin = 0; pcb_box_t b; PCB_TERM_LABEL_SETUP((const unsigned char *)label); @@ -1271,7 +1271,7 @@ pcb_draw_invalidate(&b); } -void pcb_term_label_draw(pcb_draw_info_t *info, pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const pcb_any_obj_t *obj) +void pcb_term_label_draw(pcb_draw_info_t *info, rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const pcb_any_obj_t *obj) { char buff[128]; const char *label = lab_with_intconn(obj, obj->intconn, obj->term, buff, sizeof(buff)); @@ -1278,7 +1278,7 @@ pcb_label_draw(info, x, y, scale, vert, centered, label); } -void pcb_term_label_invalidate(pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const pcb_any_obj_t *obj) +void pcb_term_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const pcb_any_obj_t *obj) { char buff[128]; const char *label = lab_with_intconn(obj, obj->intconn, obj->term, buff, sizeof(buff)); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 30902) +++ trunk/src/draw.h (revision 30903) @@ -94,7 +94,7 @@ /* When true, do not draw terminals but put them on the obj delay list using pcb_draw_delay_obj_add() - used to delay heavy terminal drawing to get proper overlaps */ -extern pcb_bool delayed_terms_enabled; +extern rnd_bool delayed_terms_enabled; void pcb_draw_delay_obj_add(pcb_any_obj_t *obj); /* Append an object to the annotatation list; annotations are drawn at the @@ -116,7 +116,7 @@ } while(0) extern int pcb_draw_force_termlab; /* force drawing terminal lables - useful for pinout previews */ -extern pcb_bool pcb_draw_doing_assy; +extern rnd_bool pcb_draw_doing_assy; void pcb_lighten_color(const pcb_color_t *orig, pcb_color_t *dst, double factor); @@ -124,7 +124,7 @@ the number of on/off segment pairs. It is guaranteed that the line starts and ends with an "on" line segment. If cheap is true, allow drawing less segments if the line is short */ -void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, unsigned int segs, pcb_bool_t cheap); +void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap); void pcb_draw(void); @@ -164,10 +164,10 @@ int pcb_draw_layergrp_is_comp(const pcb_layergrp_t *g); /* Draw (render) or invalidate a terminal label */ -void pcb_term_label_draw(pcb_draw_info_t *info, pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const pcb_any_obj_t *obj); -void pcb_term_label_invalidate(pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const pcb_any_obj_t *obj); -void pcb_label_draw(pcb_draw_info_t *info, pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const char *label); -void pcb_label_invalidate(pcb_coord_t x, pcb_coord_t y, double scale, pcb_bool vert, pcb_bool centered, const char *label); +void pcb_term_label_draw(pcb_draw_info_t *info, rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const pcb_any_obj_t *obj); +void pcb_term_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const pcb_any_obj_t *obj); +void pcb_label_draw(pcb_draw_info_t *info, rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label); +void pcb_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label); void pcb_draw_setup_default_xform_info(pcb_hid_t *hid, pcb_draw_info_t *info); Index: trunk/src/draw_wireframe.h =================================================================== --- trunk/src/draw_wireframe.h (revision 30902) +++ trunk/src/draw_wireframe.h (revision 30903) @@ -34,10 +34,10 @@ /*----------------------------------------------------------- * Draws the outline of an arc */ -PCB_INLINE void pcb_draw_wireframe_arc(pcb_hid_gc_t gc, pcb_arc_t *arc, pcb_coord_t thick) +PCB_INLINE void pcb_draw_wireframe_arc(pcb_hid_gc_t gc, pcb_arc_t *arc, rnd_coord_t thick) { - pcb_coord_t wid = thick / 2; - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t wid = thick / 2; + rnd_coord_t x1, y1, x2, y2; if ((arc->Width == 0) && (arc->Height == 0)) { pcb_render->draw_arc(gc, arc->X, arc->Y, wid, wid, 0, 360); @@ -58,14 +58,14 @@ /*----------------------------------------------------------- * Draws the outline of a line */ -PCB_INLINE void pcb_draw_wireframe_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick, int square) +PCB_INLINE void pcb_draw_wireframe_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, int square) { if((x1 != x2) || (y1 != y2)) { double dx = x2 - x1; double dy = y2 - y1; double h = 0.5 * thick / sqrt(PCB_SQUARE(dx) + PCB_SQUARE(dy)); - pcb_coord_t ox = dy * h + 0.5 * SGN(dy); - pcb_coord_t oy = -(dx * h + 0.5 * SGN(dx)); + rnd_coord_t ox = dy * h + 0.5 * SGN(dy); + rnd_coord_t oy = -(dx * h + 0.5 * SGN(dx)); if (square) { /* make the line longer by cap */ x1 -= dx * h; @@ -94,7 +94,7 @@ else { if (square) { /* square cap 0 long line does not have an angle -> always draw it axis aligned */ - pcb_coord_t cx1 = x1 - thick/2, cx2 = x1 + thick/2, cy1 = y1 - thick/2, cy2 = y1 + thick/2; + rnd_coord_t cx1 = x1 - thick/2, cx2 = x1 + thick/2, cy1 = y1 - thick/2, cy2 = y1 + thick/2; pcb_render->draw_line(gc, cx1, cy1, cx2, cy1); pcb_render->draw_line(gc, cx2, cy1, cx2, cy2); pcb_render->draw_line(gc, cx2, cy2, cx1, cy2); Index: trunk/src/drc.c =================================================================== --- trunk/src/drc.c (revision 30902) +++ trunk/src/drc.c (revision 30903) @@ -51,7 +51,7 @@ -void pcb_drc_set_data(pcb_view_t *violation, const pcb_coord_t *measured_value, pcb_coord_t required_value) +void pcb_drc_set_data(pcb_view_t *violation, const rnd_coord_t *measured_value, rnd_coord_t required_value) { violation->data_type = PCB_VIEW_DRC; violation->data.drc.required_value = required_value; @@ -108,15 +108,15 @@ else if (pcb_strcasecmp(dlg_type, "log") == 0) { pcb_view_t *v; for(v = pcb_view_list_first(lst); v != NULL; v = pcb_view_list_next(v)) { - pcb_message(PCB_MSG_INFO, "%ld: %s: %s\n", v->uid, v->type, v->title); + rnd_message(PCB_MSG_INFO, "%ld: %s: %s\n", v->uid, v->type, v->title); if (v->have_bbox) - pcb_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(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); if (v->have_xy) - pcb_message(PCB_MSG_INFO, "%m+at %$m2\n", pcbhl_conf.editor.grid_unit->allow, v->x, v->y); + rnd_message(PCB_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) - pcb_message(PCB_MSG_INFO, "%m+measured value %$mS\n", pcbhl_conf.editor.grid_unit->allow, v->data.drc.measured_value); - pcb_message(PCB_MSG_INFO, "%s\n\n", v->description); + 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); } } if (pcb_strcasecmp(dlg_type, "dump") == 0) { Index: trunk/src/drc.h =================================================================== --- trunk/src/drc.h (revision 30902) +++ trunk/src/drc.h (revision 30903) @@ -44,7 +44,7 @@ } pcb_drc_impl_t; /* Load drc-specific fields of a view; if measured_value is NULL, it is not available */ -void pcb_drc_set_data(pcb_view_t *violation, const pcb_coord_t *measured_value, pcb_coord_t required_value); +void pcb_drc_set_data(pcb_view_t *violation, const rnd_coord_t *measured_value, rnd_coord_t required_value); extern pcb_view_list_t pcb_drc_lst; Index: trunk/src/extobj.c =================================================================== --- trunk/src/extobj.c (revision 30902) +++ trunk/src/extobj.c (revision 30903) @@ -132,7 +132,7 @@ eo->del_pre(sc); } -static pcb_subc_t *pcb_extobj_conv_list(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, vtp0_t *list, pcb_bool remove, pcb_subc_t *copy_from) +static pcb_subc_t *pcb_extobj_conv_list(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, vtp0_t *list, rnd_bool remove, pcb_subc_t *copy_from) { pcb_subc_t *res; @@ -152,7 +152,7 @@ return res; } -static pcb_subc_t *pcb_extobj_conv_flag_objs_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, pcb_bool remove, pcb_flag_values_t flg, pcb_subc_t *copy_from) +static pcb_subc_t *pcb_extobj_conv_flag_objs_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, rnd_bool remove, pcb_flag_values_t flg, pcb_subc_t *copy_from) { vtp0_t list; pcb_subc_t *res; @@ -165,18 +165,18 @@ return res; } -pcb_subc_t *pcb_extobj_conv_selected_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, pcb_bool remove) +pcb_subc_t *pcb_extobj_conv_selected_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, rnd_bool remove) { return pcb_extobj_conv_flag_objs_using(pcb, eo, dst, src, remove, PCB_FLAG_SELECTED, NULL); } -pcb_subc_t *pcb_extobj_conv_all_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, pcb_bool remove) +pcb_subc_t *pcb_extobj_conv_all_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, rnd_bool remove) { return pcb_extobj_conv_flag_objs_using(pcb, eo, dst, src, remove, 0, NULL); } -pcb_subc_t *pcb_extobj_conv_obj_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, pcb_bool remove, pcb_subc_t *copy_from) +pcb_subc_t *pcb_extobj_conv_obj_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, rnd_bool remove, pcb_subc_t *copy_from) { vtp0_t list; pcb_subc_t *res; @@ -190,7 +190,7 @@ } -pcb_subc_t *pcb_extobj_conv_obj(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, pcb_bool remove) +pcb_subc_t *pcb_extobj_conv_obj(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, rnd_bool remove) { return pcb_extobj_conv_obj_using(pcb, eo, dst, src, remove, NULL); } Index: trunk/src/extobj.h =================================================================== --- trunk/src/extobj.h (revision 30902) +++ trunk/src/extobj.h (revision 30903) @@ -88,10 +88,10 @@ object(s) of src. If the operation was successful and remove is true, remove selected objects. The "using" variant carries an existing extobj of the same type that is used as a source of metadata */ -pcb_subc_t *pcb_extobj_conv_selected_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, pcb_bool remove); -pcb_subc_t *pcb_extobj_conv_all_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, pcb_bool remove); -pcb_subc_t *pcb_extobj_conv_obj(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, pcb_bool remove); -pcb_subc_t *pcb_extobj_conv_obj_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, pcb_bool remove, pcb_subc_t *copy_from); +pcb_subc_t *pcb_extobj_conv_selected_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, rnd_bool remove); +pcb_subc_t *pcb_extobj_conv_all_objs(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_data_t *src, rnd_bool remove); +pcb_subc_t *pcb_extobj_conv_obj(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, rnd_bool remove); +pcb_subc_t *pcb_extobj_conv_obj_using(pcb_board_t *pcb, const pcb_extobj_t *eo, pcb_data_t *dst, pcb_any_obj_t *src, rnd_bool remove, pcb_subc_t *copy_from); /* for internal use: when an extobj needs to be cloned becase a new floater is added */ Index: trunk/src/extobj_act.c =================================================================== --- trunk/src/extobj_act.c (revision 30902) +++ trunk/src/extobj_act.c (revision 30903) @@ -86,7 +86,7 @@ if (strcmp(eoname, "@gui") != 0) { eo = pcb_extobj_lookup(eoname); if (eo == NULL) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: extended object '%s' is not available\n", eoname); + rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: extended object '%s' is not available\n", eoname); RND_ACT_IRES(-1); return 0; } @@ -111,17 +111,17 @@ } else { /* interactive convert */ void *p1, *p3; - pcb_coord_t x, y; + rnd_coord_t x, y; 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) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found\n"); + rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found\n"); RND_ACT_IRES(-1); return 0; } @@ -141,7 +141,7 @@ } if (sc == NULL) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: failed to create the extended object\n"); + rnd_message(PCB_MSG_ERROR, "ExtobjConvFrom: failed to create the extended object\n"); RND_ACT_IRES(-1); return 0; } @@ -172,17 +172,17 @@ } else { /* interactive convert */ void *p1, *p3; - pcb_coord_t x, y; + rnd_coord_t x, y; 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) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found (no object under the cursor)\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ExtobjConvFrom: object not found\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Object is not an extended object"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Extended object '%s' is not available", obj->extobj); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Extended object '%s' does not implement GUI property editor", obj->extobj); + rnd_message(PCB_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 30902) +++ trunk/src/extobj_helper.h (revision 30903) @@ -34,7 +34,7 @@ /*** API ***/ /* Convert an attribute to coord, return 0 on success */ -PCB_INLINE int pcb_extobj_unpack_coord(const pcb_subc_t *obj, pcb_coord_t *res, const char *name); +PCB_INLINE int pcb_extobj_unpack_coord(const pcb_subc_t *obj, rnd_coord_t *res, const char *name); PCB_INLINE int pcb_extobj_unpack_int(const pcb_subc_t *obj, int *res, const char *name); /* Wrap the update/re-generation of an extobject-subc in this begin/end to @@ -44,10 +44,10 @@ PCB_INLINE int pcb_exto_regen_end(pcb_subc_t *subc); /*** implementation ***/ -PCB_INLINE int pcb_extobj_unpack_coord(const pcb_subc_t *obj, pcb_coord_t *res, const char *name) +PCB_INLINE int pcb_extobj_unpack_coord(const pcb_subc_t *obj, rnd_coord_t *res, const char *name) { double v; - pcb_bool succ; + rnd_bool succ; const char *s = pcb_attribute_get(&obj->Attributes, name); if (s != NULL) { v = pcb_get_value(s, NULL, NULL, &succ); @@ -94,7 +94,7 @@ return 0; } -PCB_INLINE pcb_subc_t *pcb_exto_create(pcb_data_t *dst, const char *eoname, const pcb_dflgmap_t *layers, pcb_coord_t ox, pcb_coord_t oy, pcb_bool on_bottom, pcb_subc_t *copy_from) +PCB_INLINE pcb_subc_t *pcb_exto_create(pcb_data_t *dst, const char *eoname, const pcb_dflgmap_t *layers, rnd_coord_t ox, rnd_coord_t oy, rnd_bool on_bottom, pcb_subc_t *copy_from) { pcb_subc_t *subc = pcb_subc_alloc(); pcb_board_t *pcb = NULL; @@ -130,7 +130,7 @@ PCB_INLINE void pcb_exto_draw_mark(pcb_draw_info_t *info, pcb_subc_t *subc) { - pcb_coord_t x, y, unit = PCB_SUBC_AUX_UNIT; + rnd_coord_t x, y, unit = PCB_SUBC_AUX_UNIT; if (pcb_subc_get_origin(subc, &x, &y) != 0) return; @@ -175,7 +175,7 @@ do { \ pcb_hid_dad_spin_t *spin; \ double d; \ - pcb_coord_t currval = 0; \ + rnd_coord_t currval = 0; \ const pcb_unit_t *unit_out = NULL; \ int wid; \ char *sval = pcb_attribute_get(&subc->Attributes, attr_name); \ @@ -233,7 +233,7 @@ #define pcb_exto_dlg_int(dlg, subc, vis_name, attr_name, help) \ do { \ - pcb_coord_t currval = 0; \ + rnd_coord_t currval = 0; \ int wid; \ char *sval = pcb_attribute_get(&subc->Attributes, attr_name); \ if (sval != NULL) \ Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 30902) +++ trunk/src/file_act.c (revision 30903) @@ -108,7 +108,7 @@ if (!pcb_import_netlist(RND_ACT_HIDLIB, PCB->Netlistname)) pcb_netlist_changed(1); else - pcb_message(PCB_MSG_ERROR, "None of the netlist import plugins could handle that file (unknown or broken file format?)\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "LoadFrom(): invalid command (first arg)\n"); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "Expected buffer number, got '%s'\n", target); + rnd_message(PCB_MSG_ERROR, "Expected buffer number, got '%s'\n", target); RND_ACT_IRES(-1); } bn--; if ((bn < 0) || (bn >= PCB_MAX_BUFFER)) { - pcb_message(PCB_MSG_ERROR, "Buffer number out of range\n"); + rnd_message(PCB_MSG_ERROR, "Buffer number out of range\n"); RND_ACT_IRES(-1); } } @@ -251,7 +251,7 @@ switch(op) { case F_Layout: if (argc != 2) { - pcb_message(PCB_MSG_ERROR, "SaveTo(Layout) doesn't take file name or format - did you mean SaveTo(LayoutAs)?\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not save subcircuit: there is no subcircuit in the paste buffer.\n"); + rnd_message(PCB_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) { - pcb_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(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_ACT_IRES(-1); } else @@ -284,14 +284,14 @@ /* shorthand kept only for compatibility reasons - do not use */ case F_AllConnections: - pcb_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_WARNING, "Please use action ExportOldConn() instead of SaveTo() for connections.\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Internal error: Save(DialogByPattern) did not return a dynamic string\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to open %s for write\n", name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Failed to find a plugin that can write subcircuits", fmt); + rnd_message(PCB_MSG_ERROR, "Failed to find a plugin that can write subcircuits", fmt); else - pcb_message(PCB_MSG_ERROR, "Failed to find a plugin for format %s", fmt); + rnd_message(PCB_MSG_ERROR, "Failed to find a plugin for format %s", fmt); RND_ACT_IRES(-1); return 0; } @@ -452,7 +452,7 @@ } if (ares != 0) - pcb_message(PCB_MSG_ERROR, "Some of the subcircuits failed to export\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Export() needs at least one argument, the name of the export plugin\n"); + rnd_message(PCB_MSG_ERROR, "Export() needs at least one argument, the name of the export plugin\n"); return 1; } if (argc > sizeof(args)/sizeof(args[0])) { - pcb_message(PCB_MSG_ERROR, "Export(): too many arguments\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Export plugin %s not found. Was it enabled in ./configure?\n", args[0]); + rnd_message(PCB_MSG_ERROR, "Export plugin %s not found. Was it enabled in ./configure?\n", args[0]); return 1; } Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 30902) +++ trunk/src/find.c (revision 30903) @@ -136,7 +136,7 @@ } /* return whether a and b are in the same internal-no-connection group */ -static pcb_bool int_noconn(pcb_any_obj_t *a, pcb_any_obj_t *b) +static rnd_bool int_noconn(pcb_any_obj_t *a, pcb_any_obj_t *b) { pcb_subc_t *pa, *pb; @@ -360,7 +360,7 @@ } -unsigned long pcb_find_from_xy(pcb_find_t *ctx, pcb_data_t *data, pcb_coord_t x, pcb_coord_t y) +unsigned long pcb_find_from_xy(pcb_find_t *ctx, pcb_data_t *data, rnd_coord_t x, rnd_coord_t y) { void *ptr1, *ptr2, *ptr3; pcb_any_obj_t *obj; Index: trunk/src/find.h =================================================================== --- trunk/src/find.h (revision 30902) +++ trunk/src/find.h (revision 30903) @@ -44,7 +44,7 @@ struct pcb_find_s { /* public config - all-zero uses the original method, except for flag set */ /* low level (will work with isc calls): */ - pcb_coord_t bloat; /* perform intersection tests with one object bloated up by this amount (can be negative for shrinking) */ + rnd_coord_t bloat; /* perform intersection tests with one object bloated up by this amount (can be negative for shrinking) */ unsigned ignore_clearance:1; /* a flag dictated clearance is no excuse for intersection - useful for overlap calculation between objects on different layers */ unsigned allow_noncopper_pstk:1;/* when 1, even non-copper shapes of padstacks will "conduct" in a pstk-pstk check (useful for the drc) */ @@ -85,7 +85,7 @@ extern const pcb_find_t *pcb_find0; /* nop-configuration for calling isc functions */ -unsigned long pcb_find_from_xy(pcb_find_t *ctx, pcb_data_t *data, pcb_coord_t x, pcb_coord_t y); +unsigned long pcb_find_from_xy(pcb_find_t *ctx, pcb_data_t *data, rnd_coord_t x, rnd_coord_t y); /* Find connections starting from an object. The obj() variant initializes the search; if from is NULL, don't do the initial search. The obj_next() variant @@ -96,15 +96,15 @@ void pcb_find_free(pcb_find_t *ctx); /* High level intersection function: returns if a and b intersect (overlap) */ -pcb_bool pcb_intersect_obj_obj(const pcb_find_t *ctx, pcb_any_obj_t *a, pcb_any_obj_t *b); +rnd_bool pcb_intersect_obj_obj(const pcb_find_t *ctx, pcb_any_obj_t *a, pcb_any_obj_t *b); /* Low level intersection functions: */ -pcb_bool pcb_isc_line_line(const pcb_find_t *ctx, pcb_line_t *Line1, pcb_line_t *Line2); -pcb_bool pcb_isc_line_arc(const pcb_find_t *ctx, pcb_line_t *Line, pcb_arc_t *Arc); -pcb_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon); -pcb_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa); -pcb_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon); -pcb_bool pcb_isc_poly_poly(const pcb_find_t *ctx, pcb_poly_t *P1, pcb_poly_t *P2); +rnd_bool pcb_isc_line_line(const pcb_find_t *ctx, pcb_line_t *Line1, pcb_line_t *Line2); +rnd_bool pcb_isc_line_arc(const pcb_find_t *ctx, pcb_line_t *Line, pcb_arc_t *Arc); +rnd_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon); +rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa); +rnd_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon); +rnd_bool pcb_isc_poly_poly(const pcb_find_t *ctx, pcb_poly_t *P1, pcb_poly_t *P2); pcb_bool_t pcb_isc_pstk_line(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line); /* Return whether obj is marked as already visited by the current search context */ Index: trunk/src/find_any_isect.c =================================================================== --- trunk/src/find_any_isect.c (revision 30902) +++ trunk/src/find_any_isect.c (revision 30903) @@ -29,13 +29,13 @@ TODO(": implement text intersections") -pcb_bool pcb_isc_text_line(const pcb_find_t *ctx, pcb_text_t *a, pcb_line_t *b) { return pcb_false; } -pcb_bool pcb_isc_text_text(const pcb_find_t *ctx, pcb_text_t *a, pcb_text_t *b) { return pcb_false; } -pcb_bool pcb_isc_text_poly(const pcb_find_t *ctx, pcb_text_t *a, pcb_poly_t *b) { return pcb_false; } -pcb_bool pcb_isc_text_arc(const pcb_find_t *ctx, pcb_text_t *a, pcb_arc_t *b) { return pcb_false; } -pcb_bool pcb_isc_text_pstk(const pcb_find_t *ctx, pcb_text_t *a, pcb_pstk_t *b) { return pcb_false; } +rnd_bool pcb_isc_text_line(const pcb_find_t *ctx, pcb_text_t *a, pcb_line_t *b) { return pcb_false; } +rnd_bool pcb_isc_text_text(const pcb_find_t *ctx, pcb_text_t *a, pcb_text_t *b) { return pcb_false; } +rnd_bool pcb_isc_text_poly(const pcb_find_t *ctx, pcb_text_t *a, pcb_poly_t *b) { return pcb_false; } +rnd_bool pcb_isc_text_arc(const pcb_find_t *ctx, pcb_text_t *a, pcb_arc_t *b) { return pcb_false; } +rnd_bool pcb_isc_text_pstk(const pcb_find_t *ctx, pcb_text_t *a, pcb_pstk_t *b) { return pcb_false; } -pcb_bool pcb_intersect_obj_obj(const pcb_find_t *ctx, pcb_any_obj_t *a, pcb_any_obj_t *b) +rnd_bool pcb_intersect_obj_obj(const pcb_find_t *ctx, pcb_any_obj_t *a, pcb_any_obj_t *b) { /* produce the clopped version for polygons to compare */ if ((a->type == PCB_OBJ_POLY) && (((pcb_poly_t *)a)->Clipped == NULL)) Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 30902) +++ trunk/src/find_geo.c (revision 30903) @@ -118,7 +118,7 @@ return (sa + d - 360) >= alpha; } -static void get_arc_ends(pcb_coord_t * box, pcb_arc_t *arc) +static void get_arc_ends(rnd_coord_t * box, pcb_arc_t *arc) { box[0] = arc->X - arc->Width * cos(PCB_M180 * arc->StartAngle); box[1] = arc->Y + arc->Height * sin(PCB_M180 * arc->StartAngle); @@ -151,11 +151,11 @@ * * */ -static pcb_bool pcb_isc_arc_arc(const pcb_find_t *ctx, pcb_arc_t *Arc1, pcb_arc_t *Arc2) +static rnd_bool pcb_isc_arc_arc(const pcb_find_t *ctx, pcb_arc_t *Arc1, pcb_arc_t *Arc2) { double x, y, dx, dy, r1, r2, a, d, l, t, t1, t2, dl; - pcb_coord_t pdx, pdy; - pcb_coord_t box[8]; + rnd_coord_t pdx, pdy; + rnd_coord_t box[8]; t = 0.5 * Arc1->Thickness + Bloat; t2 = 0.5 * Arc2->Thickness; @@ -262,9 +262,9 @@ /* --------------------------------------------------------------------------- * Tests if point is same as line end point or center point */ -static pcb_bool pcb_isc_ratp_line(const pcb_find_t *ctx, pcb_point_t *Point, pcb_line_t *Line) +static rnd_bool pcb_isc_ratp_line(const pcb_find_t *ctx, pcb_point_t *Point, pcb_line_t *Line) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; /* either end */ if ((Point->X == Line->Point1.X && Point->Y == Line->Point1.Y) @@ -280,7 +280,7 @@ } /* Tests any end of a rat line is on the line */ -static pcb_bool pcb_isc_rat_line(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_line_t *line) +static rnd_bool pcb_isc_rat_line(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_line_t *line) { pcb_layergrp_id_t gid = pcb_layer_get_group_(line->parent.layer); @@ -295,9 +295,9 @@ /* --------------------------------------------------------------------------- * Tests if point is same as arc end point or center point */ -static pcb_bool pcb_isc_ratp_arc(const pcb_find_t *ctx, pcb_point_t *Point, pcb_arc_t *arc) +static rnd_bool pcb_isc_ratp_arc(const pcb_find_t *ctx, pcb_point_t *Point, pcb_arc_t *arc) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; /* either end */ pcb_arc_get_end(arc, 0, &cx, &cy); @@ -317,7 +317,7 @@ } /* Tests any end of a rat line is on the arc */ -static pcb_bool pcb_isc_rat_arc(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_arc_t *arc) +static rnd_bool pcb_isc_rat_arc(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_arc_t *arc) { pcb_layergrp_id_t gid = pcb_layer_get_group_(arc->parent.layer); @@ -332,9 +332,9 @@ /* --------------------------------------------------------------------------- * Tests if rat line point is connected to a polygon */ -static pcb_bool pcb_isc_ratp_poly(const pcb_find_t *ctx, pcb_point_t *Point, pcb_poly_t *polygon, int donut) +static rnd_bool pcb_isc_ratp_poly(const pcb_find_t *ctx, pcb_point_t *Point, pcb_poly_t *polygon, int donut) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; pcb_poly_it_t it; pcb_polyarea_t *pa; @@ -359,7 +359,7 @@ /* expensive test: the rat can end on any contour point */ for(pa = pcb_poly_island_first(polygon, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_pline_t *pl; int go; @@ -384,7 +384,7 @@ } /* Tests any end of a rat line is on the poly */ -static pcb_bool pcb_isc_rat_poly(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_poly_t *poly) +static rnd_bool pcb_isc_rat_poly(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_poly_t *poly) { pcb_layergrp_id_t gid = pcb_layer_get_group_(poly->parent.layer); int donut = PCB_FLAG_TEST(PCB_FLAG_VIA, rat); @@ -398,7 +398,7 @@ } /* Tests any end of a rat line is on the other rat */ -static pcb_bool pcb_isc_rat_rat(const pcb_find_t *ctx, pcb_rat_t *r1, pcb_rat_t *r2) +static rnd_bool pcb_isc_rat_rat(const pcb_find_t *ctx, pcb_rat_t *r1, pcb_rat_t *r2) { if ((r1->group1 == r2->group1) && (r1->Point1.X == r2->Point1.X) && (r1->Point1.Y == r2->Point1.Y)) return pcb_true; @@ -420,8 +420,8 @@ else if (l->Point1.X == l->Point2.X) dwy = l->Thickness / 2.0; else { - pcb_coord_t dX = l->Point2.X - l->Point1.X; - pcb_coord_t dY = l->Point2.Y - l->Point1.Y; + rnd_coord_t dX = l->Point2.X - l->Point1.X; + rnd_coord_t dY = l->Point2.Y - l->Point1.Y; double r = pcb_distance(l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y); dwx = l->Thickness / 2.0 / r * dX; dwy = l->Thickness / 2.0 / r * dY; @@ -491,7 +491,7 @@ * Also note that the denominators of eqn 1 & 2 are identical. * */ -pcb_bool pcb_isc_line_line(const pcb_find_t *ctx, pcb_line_t *Line1, pcb_line_t *Line2) +rnd_bool pcb_isc_line_line(const pcb_find_t *ctx, pcb_line_t *Line1, pcb_line_t *Line2) { double s, r; double line1_dx, line1_dy, line2_dx, line2_dy, point1_dx, point1_dy; @@ -588,10 +588,10 @@ * * The end points are hell so they are checked individually */ -pcb_bool pcb_isc_line_arc(const pcb_find_t *ctx, pcb_line_t *Line, pcb_arc_t *Arc) +rnd_bool pcb_isc_line_arc(const pcb_find_t *ctx, pcb_line_t *Line, pcb_arc_t *Arc) { double dx, dy, dx1, dy1, l, d, r, r2, Radius; - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; dx = Line->Point2.X - Line->Point1.X; dy = Line->Point2.Y - Line->Point1.Y; @@ -646,7 +646,7 @@ * - check the two end points of the arc. If none of them matches * - check all segments of the polygon against the arc. */ -pcb_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon) +rnd_bool pcb_isc_arc_poly(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_poly_t *Polygon) { pcb_box_t *Box = (pcb_box_t *) Arc; @@ -665,10 +665,10 @@ return pcb_false; } -pcb_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa) +rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, pcb_polyarea_t *pa) { pcb_box_t *Box = (pcb_box_t *) Arc; - pcb_bool res = pcb_false; + rnd_bool res = pcb_false; /* arcs with clearance never touch polys */ if ((Box->X1 <= pa->contours->xmax + Bloat) && (Box->X2 >= pa->contours->xmin - Bloat) @@ -692,7 +692,7 @@ * - check the two end points of the line. If none of them matches * - check all segments of the polygon against the line. */ -pcb_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon) +rnd_bool pcb_isc_line_poly(const pcb_find_t *ctx, pcb_line_t *Line, pcb_poly_t *Polygon) { pcb_box_t *Box = (pcb_box_t *) Line; pcb_polyarea_t *lp; @@ -703,8 +703,8 @@ if (!Polygon->Clipped) return pcb_false; if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line) && (Line->Point1.X == Line->Point2.X || Line->Point1.Y == Line->Point2.Y)) { - pcb_coord_t wid = (Line->Thickness + Bloat + 1) / 2; - pcb_coord_t x1, x2, y1, y2; + rnd_coord_t wid = (Line->Thickness + Bloat + 1) / 2; + rnd_coord_t x1, x2, y1, y2; x1 = MIN(Line->Point1.X, Line->Point2.X) - wid; y1 = MIN(Line->Point1.Y, Line->Point2.Y) - wid; @@ -726,10 +726,10 @@ * First check all points out of P1 against P2 and vice versa. * If both fail check all lines of P1 against the ones of P2 */ -pcb_bool pcb_isc_poly_poly(const pcb_find_t *ctx, pcb_poly_t *P1, pcb_poly_t *P2) +rnd_bool pcb_isc_poly_poly(const pcb_find_t *ctx, pcb_poly_t *P1, pcb_poly_t *P2) { int pcp_cnt = 0; - pcb_coord_t pcp_gap; + rnd_coord_t pcp_gap; pcb_poly_it_t it1, it2; pcb_polyarea_t *pa1, *pa2; @@ -829,9 +829,9 @@ /* returns whether a round-cap pcb line touches a polygon; assumes bounding boxes do touch */ -PCB_INLINE pcb_bool_t pcb_isc_line_polyline(const pcb_find_t *ctx, pcb_pline_t *pl, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick) +PCB_INLINE pcb_bool_t pcb_isc_line_polyline(const pcb_find_t *ctx, pcb_pline_t *pl, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick) { - pcb_coord_t ox, oy, vx, vy; + rnd_coord_t ox, oy, vx, vy; double dx, dy, h, l; thick += Bloat*2; @@ -1051,7 +1051,7 @@ case PCB_PSSH_POLY: { /* convert the shape poly to a new poly so that it can be intersected */ - pcb_bool res; + rnd_bool res; pcb_polyarea_t *shp = pcb_pstk_shp_poly2area(ps, shape); res = pcb_polyarea_touching(shp, poly->Clipped); pcb_polyarea_free(&shp); @@ -1117,8 +1117,8 @@ PCB_INLINE pcb_bool_t pstk_shape_isc_circ_poly(const pcb_find_t *ctx, pcb_pstk_t *p, pcb_pstk_shape_t *sp, pcb_pstk_t *c, pcb_pstk_shape_t *sc) { - pcb_coord_t px = sc->data.circ.x + c->x - p->x; - pcb_coord_t py = sc->data.circ.y + c->y - p->y; + rnd_coord_t px = sc->data.circ.x + c->x - p->x; + rnd_coord_t py = sc->data.circ.y + c->y - p->y; return pcb_isc_line_polyline(ctx, sp->data.poly.pa->contours, px, py, px, py, sc->data.circ.dia); } @@ -1146,7 +1146,7 @@ switch(shape2->shape) { case PCB_PSSH_POLY: { - pcb_bool res; + rnd_bool res; pcb_polyarea_t *shp1 = pcb_pstk_shp_poly2area(ps1, shape1); pcb_polyarea_t *shp2 = pcb_pstk_shp_poly2area(ps2, shape2); res = pcb_polyarea_touching(shp1, shp2); Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 30902) +++ trunk/src/font.c (revision 30903) @@ -70,11 +70,11 @@ embf_line_t *lines = embf_font[n].lines; for(l = 0; l < embf_font[n].num_lines; l++) { - pcb_coord_t x1 = PCB_MIL_TO_COORD(lines[l].x1); - pcb_coord_t y1 = PCB_MIL_TO_COORD(lines[l].y1); - pcb_coord_t x2 = PCB_MIL_TO_COORD(lines[l].x2); - pcb_coord_t y2 = PCB_MIL_TO_COORD(lines[l].y2); - pcb_coord_t th = PCB_MIL_TO_COORD(lines[l].th); + rnd_coord_t x1 = PCB_MIL_TO_COORD(lines[l].x1); + rnd_coord_t y1 = PCB_MIL_TO_COORD(lines[l].y1); + rnd_coord_t x2 = PCB_MIL_TO_COORD(lines[l].x2); + rnd_coord_t y2 = PCB_MIL_TO_COORD(lines[l].y2); + rnd_coord_t th = PCB_MIL_TO_COORD(lines[l].th); pcb_font_new_line_in_sym(s, x1, y1, x2, y2, th); } @@ -107,7 +107,7 @@ const char *s; gds_t buff; s = pcb_conf_concat_strlist(&conf_core.rc.default_font_file, &buff, NULL, ':'); - pcb_message(PCB_MSG_WARNING, "Can't find font-symbol-file. Searched: '%s'; falling back to the embedded default font\n", s); + rnd_message(PCB_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); @@ -123,7 +123,7 @@ pcb_line_t *line; pcb_arc_t *arc; pcb_poly_t *poly; - pcb_coord_t totalminy = PCB_MAX_COORD; + rnd_coord_t totalminy = PCB_MAX_COORD; /* calculate cell with and height (is at least PCB_DEFAULT_CELLSIZE) maximum cell width and height @@ -131,7 +131,7 @@ Ptr->MaxWidth = PCB_DEFAULT_CELLSIZE; Ptr->MaxHeight = PCB_DEFAULT_CELLSIZE; for (i = 0, symbol = Ptr->Symbol; i <= PCB_MAX_FONTPOSITION; i++, symbol++) { - pcb_coord_t minx, miny, maxx, maxy; + rnd_coord_t minx, miny, maxx, maxy; /* next one if the index isn't used or symbol is empty (SPACE) */ if (!symbol->Valid || !symbol->LineN) @@ -209,7 +209,7 @@ } /* creates a new line in a symbol */ -pcb_line_t *pcb_font_new_line_in_sym(pcb_symbol_t *Symbol, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness) +pcb_line_t *pcb_font_new_line_in_sym(pcb_symbol_t *Symbol, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness) { pcb_line_t *line = Symbol->Line; @@ -242,7 +242,7 @@ return p; } -pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r, pcb_angle_t start, pcb_angle_t delta, pcb_coord_t thickness) +pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, pcb_angle_t start, pcb_angle_t delta, rnd_coord_t thickness) { pcb_arc_t *a = calloc(sizeof(pcb_arc_t), 1); a->X = cx; Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 30902) +++ trunk/src/font.h (revision 30903) @@ -43,10 +43,10 @@ */ typedef struct symbol_s { /* a single symbol */ pcb_line_t *Line; - pcb_bool Valid; + rnd_bool Valid; pcb_cardinal_t LineN; /* number of lines */ pcb_cardinal_t LineMax; /* lines allocated */ - pcb_coord_t Width, Height, Delta; /* size of cell, distance to next symbol */ + rnd_coord_t Width, Height, Delta; /* size of cell, distance to next symbol */ polylist_t polys; /* simple (non-clipped) polygons */ arclist_t arcs; } pcb_symbol_t; @@ -54,7 +54,7 @@ typedef long int pcb_font_id_t; /* a font is referenced by a pcb_board_t:pcb_font_id_t pair */ struct pcb_font_s { /* complete set of symbols */ - pcb_coord_t MaxHeight, MaxWidth; /* maximum cell width and height */ + rnd_coord_t MaxHeight, MaxWidth; /* maximum cell width and height */ pcb_box_t DefaultSymbol; /* the default symbol is a filled box */ pcb_symbol_t Symbol[PCB_MAX_FONTPOSITION + 1]; char *name; @@ -64,7 +64,7 @@ struct pcb_fontkit_s { /* a set of unrelated fonts */ pcb_font_t dflt; /* default, fallback font, also the sysfont */ htip_t fonts; - pcb_bool valid, hash_inited; + rnd_bool valid, hash_inited; pcb_font_id_t last_id; /* highest font id ever seen in this kit */ }; @@ -75,8 +75,8 @@ void pcb_font_create_default(pcb_board_t *pcb); void pcb_font_set_info(pcb_font_t *Ptr); -pcb_line_t *pcb_font_new_line_in_sym(pcb_symbol_t *Symbol, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness); -pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r, pcb_angle_t start, pcb_angle_t delta, pcb_coord_t thickness); +pcb_line_t *pcb_font_new_line_in_sym(pcb_symbol_t *Symbol, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness); +pcb_arc_t *pcb_font_new_arc_in_sym(pcb_symbol_t *Symbol, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, pcb_angle_t start, pcb_angle_t delta, rnd_coord_t thickness); pcb_poly_t *pcb_font_new_poly_in_sym(pcb_symbol_t *Symbol, int num_points); void pcb_font_free(pcb_font_t *f); Index: trunk/src/font_act.c =================================================================== --- trunk/src/font_act.c (revision 30902) +++ trunk/src/font_act.c (revision 30903) @@ -53,7 +53,7 @@ char *end; fid = strtol(sid, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "LoadFontFrom(): when second argument is present, it must be an integer\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "LoadFontFrom(): unable to allocate font\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "LoadFontFrom(): failed to load font from %s\n", fname); + rnd_message(PCB_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; - pcb_message(PCB_MSG_INFO, "LoadFontFrom(): new font (ID %d) successfully loaded from file %s\n", fid, fname); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "SaveFontTo(): when second argument is present, it must be an integer\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "SaveFontTo(): can not fetch font ID %d\n", fid); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "SaveFontTo(): failed to fetch font %d\n", fid); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "SaveFontTo(): failed to save font to %s\n", fname); + rnd_message(PCB_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 30902) +++ trunk/src/gui_act.c (revision 30903) @@ -181,7 +181,7 @@ break; case F_ToggleUniqueNames: - pcb_message(PCB_MSG_ERROR, "Unique names/refdes is not supported any more - please use the renumber plugin\n"); + rnd_message(PCB_MSG_ERROR, "Unique names/refdes is not supported any more - please use the renumber plugin\n"); break; case F_ToggleSnapPin: @@ -288,7 +288,7 @@ /* shift grid alignment */ case F_ToggleGrid: { - pcb_coord_t oldGrid = RND_ACT_HIDLIB->grid; + rnd_coord_t oldGrid = RND_ACT_HIDLIB->grid; RND_ACT_HIDLIB->grid = 1; if (pcb_crosshair_move_absolute(pcb_crosshair.X, pcb_crosshair.Y)) @@ -313,7 +313,7 @@ { int type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on a subcircuit", &x, &y, 0); /* toggle terminal ID print for subcircuit parts */ @@ -423,7 +423,7 @@ } } else if (pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, pcb_crosshair.drags[pcb_crosshair.drags_current], PCB_OBJ_ARC_POINT) != PCB_OBJ_VOID) { - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; pcb_arc_get_end((pcb_arc_t *)ptr2, 0, &ex, &ey); if (close_enough(hidlib->tool_x, ex) && close_enough(hidlib->tool_y, ey)) { pcb_crosshair.AttachedObject.Type = PCB_OBJ_ARC_POINT; @@ -549,7 +549,7 @@ } else { RND_ACT_IRES(-1); - pcb_message(PCB_MSG_ERROR, "Error: invalid route style name or index\n"); + rnd_message(PCB_MSG_ERROR, "Error: invalid route style name or index\n"); } return 0; } @@ -559,7 +559,7 @@ static const char pcb_acts_SetSame[] = "SetSame()"; static const char pcb_acth_SetSame[] = "Sets current layer and sizes to match indicated item."; /* DOC: setsame.html */ -static void set_same_(pcb_coord_t Thick, pcb_coord_t Diameter, pcb_coord_t Hole, pcb_coord_t Clearance, char *Name) +static void set_same_(rnd_coord_t Thick, rnd_coord_t Diameter, rnd_coord_t Hole, rnd_coord_t Clearance, char *Name) { int known; known = pcb_route_style_lookup(&PCB->RouteStyle, Thick, Diameter, Hole, Clearance, Name); @@ -577,7 +577,7 @@ static fgw_error_t pcb_act_SetSame(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2, *ptr3; int type; pcb_layer_t *layer = PCB_CURRLAYER(PCB_ACT_BOARD); @@ -638,7 +638,7 @@ if (!explicit && (*arg == '@')) { pcb_layer_id_t lid = pcb_layer_by_name(PCB->Data, arg+1); if (lid < 0) { - pcb_message(PCB_MSG_ERROR, "Can't find layer named %s\n", arg+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); + rnd_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); return 1; } key = pcb_strdup(arg); @@ -689,7 +689,7 @@ pcb_board_set_changed_flag(pcb_true); } else { - pcb_message(PCB_MSG_ERROR, "Invalid EditLayer() command: %s\n", arg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't edit bound layers yet\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", arg+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unknown type bit %s\n", sbit+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); + rnd_message(PCB_MSG_ERROR, "Need an attribute name=value\n", arg+1); RND_ACT_IRES(1); return 0; } @@ -798,7 +798,7 @@ free(key); } else { - pcb_message(PCB_MSG_ERROR, "Invalid EditGroup() command: %s\n", arg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", name+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find layer group\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid type: '%s'\n", sloc); + rnd_message(PCB_MSG_ERROR, "Invalid type: '%s'\n", sloc); RND_ACT_IRES(-1); return 0; } if ((ltype == PCB_LYT_COPPER) || (ltype == PCB_LYT_SUBSTRATE)) { - pcb_message(PCB_MSG_ERROR, "Can not create this type of layer group: '%s'\n", sloc); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid location: '%s'\n", sloc); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find layer group named %s\n", name+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find layer group\n"); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); + rnd_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); RND_ACT_IRES(-1); } return 0; @@ -1054,10 +1054,10 @@ ml = pcb_menu_layer_find(name); if (ml != NULL) { - pcb_bool *v = (pcb_bool *)((char *)PCB + ml->vis_offs); - pcb_bool *s = (pcb_bool *)((char *)PCB + ml->sel_offs); + 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) { - pcb_message(PCB_MSG_ERROR, "Virtual layer '%s' (%s) can not be selected\n", ml->name, ml->abbrev); + rnd_message(PCB_MSG_ERROR, "Virtual layer '%s' (%s) can not be selected\n", ml->name, ml->abbrev); RND_ACT_IRES(-1); return 0; } @@ -1091,7 +1091,7 @@ ml = pcb_menu_layer_find(name); if (ml != NULL) { if (ml->sel_offs != 0) { - pcb_bool *s = (pcb_bool *)((char *)PCB + ml->sel_offs); + rnd_bool *s = (rnd_bool *)((char *)PCB + ml->sel_offs); RND_ACT_IRES(*s); } else @@ -1098,7 +1098,7 @@ RND_ACT_IRES(-1); return 0; } - pcb_message(PCB_MSG_ERROR, "pcb_act_ChkLayer: '%s' is not a valid layer ID - check your menu file!\n", argv[0]); + rnd_message(PCB_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; } @@ -1105,7 +1105,7 @@ /* if any virtual is selected, do not accept PCB_CURRLAYER(PCB_ACT_BOARD) as selected */ for(ml = pcb_menu_layers; ml->name != NULL; ml++) { - pcb_bool *s = (pcb_bool *)((char *)PCB + ml->sel_offs); + rnd_bool *s = (rnd_bool *)((char *)PCB + ml->sel_offs); if ((ml->sel_offs != 0) && (*s)) { RND_ACT_IRES(0); 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 - pcb_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); + rnd_message(PCB_MSG_ERROR, "Can't find this-side silk layer\n"); } else if ((pcb_strcasecmp(name, "padstacks") == 0) || (pcb_strcasecmp(name, "vias") == 0) || (pcb_strcasecmp(name, "pins") == 0) || (pcb_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) { - pcb_message(PCB_MSG_ERROR, "Invalid ui layer id: '%s'\n", name); + rnd_message(PCB_MSG_ERROR, "Invalid ui layer id: '%s'\n", name); RND_ACT_IRES(-1); return 0; } @@ -1192,13 +1192,13 @@ else { /* virtual menu layer */ const pcb_menu_layers_t *ml = pcb_menu_layer_find(name); if (ml != NULL) { - pcb_bool *v = (pcb_bool *)((char *)PCB + ml->vis_offs); + rnd_bool *v = (rnd_bool *)((char *)PCB + ml->vis_offs); *v = !(*v); pcb_gui->invalidate_all(pcb_gui); pcb_event(RND_ACT_HIDLIB, PCB_EVENT_LAYERVIS_CHANGED, NULL); return 0; } - pcb_message(PCB_MSG_ERROR, "Invalid layer id: '%s'\n", name); + rnd_message(PCB_MSG_ERROR, "Invalid layer id: '%s'\n", name); } } @@ -1234,12 +1234,12 @@ const pcb_menu_layers_t *ml = pcb_menu_layer_find(name); if (ml != NULL) { - pcb_bool *v = (pcb_bool *)((char *)PCB + ml->vis_offs); + rnd_bool *v = (rnd_bool *)((char *)PCB + ml->vis_offs); RND_ACT_IRES(*v); return 0; } - pcb_message(PCB_MSG_ERROR, "pcb_act_ChkView: '%s' is not a valid layer ID - check your menu file!\n", name); + rnd_message(PCB_MSG_ERROR, "pcb_act_ChkView: '%s' is not a valid layer ID - check your menu file!\n", name); return FGW_ERR_ARGV_TYPE; } @@ -1381,7 +1381,7 @@ static fgw_error_t pcb_act_boardflip(fgw_arg_t *res, int argc, fgw_arg_t *argv) { int op = -2; - pcb_bool smirror; + rnd_bool smirror; rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, boardflip, op = fgw_keyword(&argv[1])); Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 30902) +++ trunk/src/hid_cam.c (revision 30903) @@ -250,7 +250,7 @@ else if (strcmp(curr, "okempty-content") == 0) dst->okempty_content = 1; else - pcb_message(PCB_MSG_ERROR, "CAM: ignoring unknown global parameter [%s]\n", curr); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "CAM rule missing '='\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "CAM rule: invalid layer transformation\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "global exporter --cam doesn't take layers, only a file name and optionally global supplements\n"); + rnd_message(PCB_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 = pcb_strdup(start); end = pcb_parse_layergrp_address(start, spk, spv, &spc); if ((end != NULL) && (*end != '\0')) - pcb_message(PCB_MSG_ERROR, "global exporter --cam takes only one set of global supplements\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "global exporter --cam ignores layer purpose\n"); + rnd_message(PCB_MSG_ERROR, "global exporter --cam ignores layer purpose\n"); free(tmp); } } @@ -478,7 +478,7 @@ gds_append_str(s, val); } else - pcb_message(PCB_MSG_ERROR, "cam job error: %%%% variable name too long at: '%%%s' - did not substitute\n", *input); + rnd_message(PCB_MSG_ERROR, "cam job error: %%%% variable name too long at: '%%%s' - did not substitute\n", *input); } *input = end+1; Index: trunk/src/hid_cam.h =================================================================== --- trunk/src/hid_cam.h (revision 30902) +++ trunk/src/hid_cam.h (revision 30903) @@ -9,8 +9,8 @@ typedef struct pcb_cam_s { /* public */ char *fn; - pcb_bool fn_changed; /* true if last call changed the ->fn field */ - pcb_bool active; + rnd_bool fn_changed; /* true if last call changed the ->fn field */ + rnd_bool active; int grp_vis[PCB_MAX_LAYERGRP]; /* whether a real layer group should be rendered */ int vgrp_vis[PCB_VLY_end]; /* whether a virtual layer group should be rendered */ Index: trunk/src/idpath.c =================================================================== --- trunk/src/idpath.c (revision 30902) +++ trunk/src/idpath.c (revision 30903) @@ -160,7 +160,7 @@ } -void pcb_append_idpath(gds_t *dst, const pcb_idpath_t *idp, pcb_bool relative) +void pcb_append_idpath(gds_t *dst, const pcb_idpath_t *idp, rnd_bool relative) { int n; @@ -176,7 +176,7 @@ pcb_append_printf(dst, "/%ld", idp->id[n]); } -char *pcb_idpath2str(const pcb_idpath_t *idp, pcb_bool relative) +char *pcb_idpath2str(const pcb_idpath_t *idp, rnd_bool relative) { gds_t tmp; Index: trunk/src/idpath.h =================================================================== --- trunk/src/idpath.h (revision 30902) +++ trunk/src/idpath.h (revision 30903) @@ -60,8 +60,8 @@ pcb_idpath_t *pcb_obj2idpath(pcb_any_obj_t *obj); pcb_idpath_t *pcb_str2idpath(pcb_board_t *pcb, const char *str); /* slash separated list of ids */ -char *pcb_idpath2str(const pcb_idpath_t *idp, pcb_bool relative); -void pcb_append_idpath(gds_t *dst, const pcb_idpath_t *idp, pcb_bool relative); +char *pcb_idpath2str(const pcb_idpath_t *idp, rnd_bool relative); +void pcb_append_idpath(gds_t *dst, const pcb_idpath_t *idp, rnd_bool relative); pcb_any_obj_t *pcb_idpath2obj_in(pcb_data_t *data, const pcb_idpath_t *path); pcb_idpath_t *pcb_idpath_dup(const pcb_idpath_t *path); void pcb_idpath_destroy(pcb_idpath_t *path); Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 30902) +++ trunk/src/insert.c (revision 30903) @@ -59,7 +59,7 @@ 0 /* extobj_inhibit_regen */ }; -void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t *Ptr3, pcb_coord_t DX, pcb_coord_t DY, pcb_bool Force, pcb_bool insert_last) +void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t *Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last) { void *ptr; pcb_opctx_t ctx; @@ -82,7 +82,7 @@ { static pcb_point_t InsertedPoint; double m; - pcb_coord_t x, y, m1, m2; + rnd_coord_t x, y, m1, m2; pcb_line_t *line = (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2; if (pcb_crosshair.AttachedObject.State == PCB_CH_STATE_FIRST) Index: trunk/src/insert.h =================================================================== --- trunk/src/insert.h (revision 30902) +++ trunk/src/insert.h (revision 30903) @@ -35,7 +35,7 @@ #define PCB_INSERT_TYPES (PCB_OBJ_POLY | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_RAT) -void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t * Ptr3, pcb_coord_t DX, pcb_coord_t DY, pcb_bool Force, pcb_bool insert_last); +void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t * Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last); /* adjusts the insert point to make 45 degree lines as necessary */ pcb_point_t *pcb_adjust_insert_point(void); Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 30902) +++ trunk/src/intersect.c (revision 30903) @@ -51,9 +51,9 @@ static int nextpwrof2(int i); typedef struct { - pcb_coord_t left, right; + rnd_coord_t left, right; int covered; - pcb_coord_t area; + rnd_coord_t area; } SegmentTreeNode; typedef struct { @@ -62,7 +62,7 @@ } SegmentTree; typedef struct { - pcb_coord_t *p; + rnd_coord_t *p; int size; } LocationList; @@ -72,11 +72,11 @@ static LocationList createSortedYList(pcb_box_list_t *boxlist) { LocationList yCoords; - pcb_coord_t last; + rnd_coord_t last; int i, n; /* create sorted list of Y coordinates */ yCoords.size = 2 * boxlist->BoxN; - yCoords.p = (pcb_coord_t *) calloc(yCoords.size, sizeof(*yCoords.p)); + yCoords.p = (rnd_coord_t *) calloc(yCoords.size, sizeof(*yCoords.p)); for (i = 0; i < boxlist->BoxN; i++) { yCoords.p[2 * i] = boxlist->Box[i].Y1; yCoords.p[2 * i + 1] = boxlist->Box[i].Y2; @@ -94,7 +94,7 @@ /* --------------------------------------------------------------------------- * Create an empty segment tree from the given sorted list of uniq y coords. */ -static SegmentTree createSegmentTree(pcb_coord_t * yCoords, int N) +static SegmentTree createSegmentTree(rnd_coord_t * yCoords, int N) { SegmentTree st; int i; @@ -118,9 +118,9 @@ return st; } -void insertSegment(SegmentTree * st, int n, pcb_coord_t Y1, pcb_coord_t Y2) +void insertSegment(SegmentTree * st, int n, rnd_coord_t Y1, rnd_coord_t Y2) { - pcb_coord_t discriminant; + rnd_coord_t discriminant; if (st->nodes[n].left >= Y1 && st->nodes[n].right <= Y2) { st->nodes[n].covered++; } @@ -137,9 +137,9 @@ (st->nodes[n].right - st->nodes[n].left) : (n >= st->size / 2) ? 0 : st->nodes[n * 2].area + st->nodes[n * 2 + 1].area; } -void deleteSegment(SegmentTree * st, int n, pcb_coord_t Y1, pcb_coord_t Y2) +void deleteSegment(SegmentTree * st, int n, rnd_coord_t Y1, rnd_coord_t Y2) { - pcb_coord_t discriminant; + rnd_coord_t discriminant; if (st->nodes[n].left >= Y1 && st->nodes[n].right <= Y2) { assert(st->nodes[n].covered); --st->nodes[n].covered; @@ -185,7 +185,7 @@ pcb_cardinal_t i, j; LocationList yCoords; SegmentTree segtree; - pcb_coord_t lastX; + rnd_coord_t lastX; double area = 0.0; if (boxlist->BoxN == 0) @@ -256,7 +256,7 @@ static int comparepos(const void *ptr1, const void *ptr2) { - return *((pcb_coord_t *) ptr1) - *((pcb_coord_t *) ptr2); + return *((rnd_coord_t *) ptr1) - *((rnd_coord_t *) ptr2); } static int nextpwrof2(int n) Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 30902) +++ trunk/src/layer.c (revision 30903) @@ -114,7 +114,7 @@ #define layer_if_too_many(pcb, fail_cmd) \ do { \ if (pcb->Data->LayerN >= PCB_MAX_LAYER) { \ - pcb_message(PCB_MSG_ERROR, "Too many layers - can't have more than %d\n", PCB_MAX_LAYER); \ + rnd_message(PCB_MSG_ERROR, "Too many layers - can't have more than %d\n", PCB_MAX_LAYER); \ fail_cmd; \ } \ } while(0) @@ -135,7 +135,7 @@ #define UFC(f) ((void (*)(void *))(f)) -void pcb_layer_free_fields(pcb_layer_t *layer, pcb_bool undoable) +void pcb_layer_free_fields(pcb_layer_t *layer, rnd_bool undoable) { if (!layer->is_bound) pcb_attribute_free(&layer->Attributes); @@ -168,7 +168,7 @@ layer->Attributes.post_change = layer_post_change; } -pcb_bool pcb_layer_is_pure_empty(pcb_layer_t *layer) +rnd_bool pcb_layer_is_pure_empty(pcb_layer_t *layer) { /* if any local list is non-empty, the layer is non-empty */ if (layer->Line.lst.length > 0) return pcb_false; @@ -186,7 +186,7 @@ PCB_RTREE_EMPTY(layer->text_tree); } -static pcb_bool pcb_layer_is_empty_glob(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer) +static rnd_bool pcb_layer_is_empty_glob(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer) { /* if any padstack has a shape on this layer, it is not empty */ PCB_PADSTACK_LOOP(data); @@ -218,7 +218,7 @@ return 1; } -pcb_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *layer) +rnd_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *layer) { pcb_layer_type_t flags = pcb_layer_flags_(layer); if (flags == 0) @@ -235,7 +235,7 @@ return 1; } -pcb_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t num) +rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t num) { if ((num >= 0) && (num < pcb->Data->LayerN)) return pcb_layer_is_empty_(pcb, pcb->Data->Layer + num); @@ -519,7 +519,7 @@ } static void pcb_layer_undoable_created(pcb_board_t *pcb, pcb_layer_t *l); -pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, pcb_bool undoable) +pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, rnd_bool undoable) { pcb_layer_id_t id; @@ -602,7 +602,7 @@ -int pcb_layer_rename_(pcb_layer_t *Layer, char *Name, pcb_bool undoable) +int pcb_layer_rename_(pcb_layer_t *Layer, char *Name, rnd_bool undoable) { undo_layer_rename_t rtmp, *r = &rtmp; @@ -624,7 +624,7 @@ return 0; } -int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, pcb_bool undoable) +int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, rnd_bool undoable) { return pcb_layer_rename_(&data->Layer[layer], pcb_strdup(lname), undoable); } @@ -666,7 +666,7 @@ }; -int pcb_layer_recolor_(pcb_layer_t *Layer, const pcb_color_t *color, pcb_bool undoable) +int pcb_layer_recolor_(pcb_layer_t *Layer, const pcb_color_t *color, rnd_bool undoable) { undo_layer_recolor_t rtmp, *r = &rtmp; @@ -689,7 +689,7 @@ return 0; } -int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *color, pcb_bool undoable) +int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *color, rnd_bool undoable) { pcb_color_t clr; pcb_color_load_str(&clr, color); @@ -866,7 +866,7 @@ return lp; } -static int pcb_layer_move_delete_(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_bool undoable) +static int pcb_layer_move_delete_(pcb_board_t *pcb, pcb_layer_id_t old_index, rnd_bool undoable) { pcb_layer_id_t l; pcb_layergrp_id_t gid; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Internal error; layer not in group\n"); + rnd_message(PCB_MSG_ERROR, "Internal error; layer not in group\n"); return -1; } @@ -1057,16 +1057,16 @@ } -int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, pcb_bool undoable) +int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, rnd_bool undoable) { /* sanity checks */ if (old_index < -1 || old_index >= pcb->Data->LayerN) { - pcb_message(PCB_MSG_ERROR, "Invalid old layer %d for move: must be -1..%d\n", old_index, pcb->Data->LayerN - 1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid new layer %d for move: must be -1..%d\n", new_index, pcb->Data->LayerN); + rnd_message(PCB_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); - pcb_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(PCB_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 - pcb_message(PCB_MSG_ERROR, "Internal error: can't figure the inter copper\nlayer offset for %s\n", src->name); + rnd_message(PCB_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; - pcb_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(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); } for(gid = 0, grp = pcb->LayerGroups.grp; gid < pcb->LayerGroups.len; gid++,grp++) if ((grp->ltype & lyt) == lyt) @@ -1281,7 +1281,7 @@ return lay; } -unsigned int pcb_layer_hash_bound(pcb_layer_t *ly, pcb_bool smirror) +unsigned int pcb_layer_hash_bound(pcb_layer_t *ly, rnd_bool smirror) { unsigned int hash; pcb_layer_type_t lyt; @@ -1382,7 +1382,7 @@ } -int pcb_layer_typecomb_str2bits(const char *str, pcb_layer_type_t *lyt, pcb_layer_combining_t *lyc, pcb_bool allow_implicit_lyc) +int pcb_layer_typecomb_str2bits(const char *str, pcb_layer_type_t *lyt, pcb_layer_combining_t *lyc, rnd_bool allow_implicit_lyc) { const char *curr, *next; int res = 0, got_lyc = 0; Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 30902) +++ trunk/src/layer.h (revision 30903) @@ -137,7 +137,7 @@ union { struct { /* A real board layer */ pcb_layergrp_id_t grp; /* the group this layer is in (cross-reference) */ - pcb_bool vis; /* visible flag */ + rnd_bool vis; /* visible flag */ pcb_color_t color; /* copied */ int no_drc; /* whether to ignore the layer when checking the design rules */ const char *cookie; /* for UI layers: registration cookie; NULL for unused UI layers */ @@ -201,7 +201,7 @@ #define PCB_CURRLID(pcb) (pcb_layer_stack[0]) /* Free all metadata and objects of a layer; does not free(layer) */ -void pcb_layer_free_fields(pcb_layer_t *layer, pcb_bool undoable); +void pcb_layer_free_fields(pcb_layer_t *layer, rnd_bool undoable); /* Return the layer pointer (or NULL on invalid or virtual layers) for an id */ pcb_layer_t *pcb_get_layer(pcb_data_t *data, pcb_layer_id_t id); @@ -212,11 +212,11 @@ pcb_layer_id_t pcb_layer_by_name(pcb_data_t *data, const char *name); /* Returns pcb_true if the given layer is empty (there are no objects on the layer) */ -pcb_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *ly); -pcb_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t ly); +rnd_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *ly); +rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t ly); /* Returns pcb_true if the given layer is empty - non-recursive variant (doesn't deal with side effects) */ -pcb_bool pcb_layer_is_pure_empty(pcb_layer_t *layer); +rnd_bool pcb_layer_is_pure_empty(pcb_layer_t *layer); /* call the gui to set a virtual layer or the UI layer group */ @@ -248,7 +248,7 @@ The string is separated by any non-alpha character and is case insensitive. If allow_implicit_lyc is true, improvise the value of *lyc using *lyt if no comb flag was explicitly specified in the string. */ -int pcb_layer_typecomb_str2bits(const char *str, pcb_layer_type_t *lyt, pcb_layer_combining_t *lyc, pcb_bool allow_implicit_lyc); +int pcb_layer_typecomb_str2bits(const char *str, pcb_layer_type_t *lyt, pcb_layer_combining_t *lyc, rnd_bool allow_implicit_lyc); /* return the name of a type bit; type should have only one bit set */ const char *pcb_layer_type_bit2str(pcb_layer_type_t type); @@ -279,7 +279,7 @@ void pcb_layers_reset(pcb_board_t *pcb); /* Create a new layer and put it in an existing group (if grp is not -1). */ -pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, pcb_bool undoable); +pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, rnd_bool undoable); /* Return the name of a layer (resolving the true name of virtual layers too) */ const char *pcb_layer_name(pcb_data_t *data, pcb_layer_id_t id); @@ -288,19 +288,19 @@ const pcb_color_t *pcb_layer_default_color(int idx, pcb_layer_type_t lyt); /* Rename/recolor an existing layer by idx */ -int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, pcb_bool undoable); -int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *lcolor, pcb_bool undoable); +int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, rnd_bool undoable); +int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *lcolor, rnd_bool undoable); /* changes the color of a layer; string has to be allocated by the caller (pcb_strdup) */ -int pcb_layer_rename_(pcb_layer_t *Layer, char *Name, pcb_bool undoable); +int pcb_layer_rename_(pcb_layer_t *Layer, char *Name, rnd_bool undoable); /* Low level layer color change, parsed color must be available */ -int pcb_layer_recolor_(pcb_layer_t *Layer, const pcb_color_t *color, pcb_bool undoable); +int pcb_layer_recolor_(pcb_layer_t *Layer, const pcb_color_t *color, rnd_bool undoable); /* index is 0..PCB_MAX_LAYER-1. If old_index is -1, a new layer is inserted at that index. If new_index is -1, the specified layer is deleted. Returns non-zero on error, zero if OK. */ -int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, pcb_bool undoable); +int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, rnd_bool undoable); /* set up dst to be a bound layer with the right offset in the stack; src_pcb @@ -318,7 +318,7 @@ pcb_layer_t *pcb_layer_new_bound(pcb_data_t *data, pcb_layer_type_t type, const char *name, const char *purpose); /* Calculate a hash of a bound layer (ingoring its name) */ -unsigned int pcb_layer_hash_bound(pcb_layer_t *ly, pcb_bool smirror); +unsigned int pcb_layer_hash_bound(pcb_layer_t *ly, rnd_bool smirror); /* Calculate mirrored version of some (bound) layer properties */ pcb_layer_type_t pcb_layer_mirror_type(pcb_layer_type_t lyt); Index: trunk/src/layer_addr.c =================================================================== --- trunk/src/layer_addr.c (revision 30902) +++ trunk/src/layer_addr.c (revision 30903) @@ -106,7 +106,7 @@ if (soffs != NULL) { *offs = strtol(soffs+1, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "CAM rule: invalid offset '%s'\n", soffs); + rnd_message(PCB_MSG_ERROR, "CAM rule: invalid offset '%s'\n", soffs); return 1; } *has_offs = 1; @@ -125,7 +125,7 @@ nxt++; } if (l == 0) { - pcb_message(PCB_MSG_ERROR, "CAM rule: invalid layer type '%s'\n", cur); + rnd_message(PCB_MSG_ERROR, "CAM rule: invalid layer type '%s'\n", cur); return 1; } (*lyt) |= l; @@ -147,7 +147,7 @@ if (strcmp(key, "purpose") == 0) *purpose = val; else if (strcmp(key, "bloat") == 0) { - pcb_bool succ; + rnd_bool succ; double v = pcb_get_value(val, NULL, NULL, &succ); if (succ) { if (xf_ != NULL) @@ -156,7 +156,7 @@ *xf = xf_; } else - pcb_message(PCB_MSG_ERROR, "CAM: ignoring invalid layer supplement value '%s' for bloat\n", val); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "CAM: ignoring unknown layer supplement key '%s'\n", key); + rnd_message(PCB_MSG_ERROR, "CAM: ignoring unknown layer supplement key '%s'\n", key); } } @@ -213,7 +213,7 @@ return 1; } if (err_prefix != NULL) - pcb_message(PCB_MSG_ERROR, "%sinvalid layer group number\n", err_prefix); + rnd_message(PCB_MSG_ERROR, "%sinvalid layer group number\n", err_prefix); return -1; } @@ -237,7 +237,7 @@ } if (gid < 0) { if (err_prefix != NULL) - pcb_message(PCB_MSG_ERROR, "%sno such layer group '%s'\n", curr, err_prefix); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "%sno virtual layer with purpose '%s'\n", err_prefix, purpose); + rnd_message(PCB_MSG_ERROR, "%sno virtual layer with purpose '%s'\n", err_prefix, purpose); return -1; } if (vl == NULL) { Index: trunk/src/layer_addr.h =================================================================== --- trunk/src/layer_addr.h (revision 30902) +++ trunk/src/layer_addr.h (revision 30903) @@ -37,7 +37,7 @@ - in case of a virtual group is addressed, return 0 and load vid if *vid is non-NULL - load xf_in fields if there are transformations requested (if xf_in is not NULL) - load *xf with xf_in if there are transformations requested (if xf is not NULL) - - if err_prefix is not NULL, use pcb_message() with this prefix to priont detailed error + - if err_prefix is not NULL, use rnd_message() with this prefix to priont detailed error Input: - the address, without supplements or other suffixes, in addr - parsed supplement key/value pairs are expected in spk/spv (at most spc items) Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 30902) +++ trunk/src/layer_grp.c (revision 30903) @@ -154,7 +154,7 @@ pcb_layergrp_setup(g, pcb); } -pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, pcb_bool undoable) +pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, rnd_bool undoable) { pcb_layergrp_t *ng, *og = pcb_get_layergrp(pcb, gid); pcb_layergrp_id_t after; @@ -217,7 +217,7 @@ return pcb->LayerGroups.grp[gid].name; } -pcb_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) +rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) { int i; pcb_layergrp_t *g = &pcb->LayerGroups.grp[num]; @@ -235,7 +235,7 @@ return pcb_true; } -pcb_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) +rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) { int i; pcb_layergrp_t *g = &pcb->LayerGroups.grp[num]; @@ -354,7 +354,7 @@ if ((pcb_strcasecmp(value, "true") == 0) || (pcb_strcasecmp(value, "yes") == 0) || (pcb_strcasecmp(value, "on") == 0) || (strcmp(value, "1") == 0)) newv = 1; else if ((pcb_strcasecmp(value, "false") == 0) || (pcb_strcasecmp(value, "no") == 0) || (pcb_strcasecmp(value, "off") == 0) || (strcmp(value, "0") == 0)) newv = 0; else { - pcb_message(PCB_MSG_ERROR, "unrecognized value '%s' of layer group %s's init-invis attribute", value, g->name == NULL ? "" : g->name); + rnd_message(PCB_MSG_ERROR, "unrecognized value '%s' of layer group %s's init-invis attribute", value, g->name == NULL ? "" : g->name); return; } g->init_invis = newv; @@ -578,7 +578,7 @@ memset(src, 0, sizeof(pcb_layergrp_t)); } -static void pcb_layergrp_del_1(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, pcb_bool undoable) +static void pcb_layergrp_del_1(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable) { int n; pcb_layer_stack_t *stk = &pcb->LayerGroups; @@ -665,7 +665,7 @@ }; -int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, pcb_bool undoable) +int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable) { undo_layergrp_del_t *r; pcb_layer_stack_t *stk = &pcb->LayerGroups; @@ -832,7 +832,7 @@ pcb->Data->Layer[lids[n]].comb |= PCB_LYC_AUTO; } else - pcb_message(PCB_MSG_ERROR, "outline layer can not be on the solder or component side - converting it into a copper layer\n"); + rnd_message(PCB_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]); } @@ -1037,7 +1037,7 @@ }; -int pcb_layergrp_rename_(pcb_layergrp_t *grp, char *name, pcb_bool undoable) +int pcb_layergrp_rename_(pcb_layergrp_t *grp, char *name, rnd_bool undoable) { undo_layergrp_rename_t rtmp, *r = &rtmp; @@ -1058,7 +1058,7 @@ return 0; } -int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *name, pcb_bool undoable) +int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *name, rnd_bool undoable) { pcb_layergrp_t *grp = pcb_get_layergrp(pcb, gid); if (grp == NULL) return -1; @@ -1111,7 +1111,7 @@ }; -int pcb_layergrp_set_purpose__(pcb_layergrp_t *grp, char *purpose, pcb_bool undoable) +int pcb_layergrp_set_purpose__(pcb_layergrp_t *grp, char *purpose, rnd_bool undoable) { undo_layergrp_repurp_t rtmp, *r = &rtmp; @@ -1139,7 +1139,7 @@ return 0; } -int pcb_layergrp_set_purpose_(pcb_layergrp_t *lg, char *purpose, pcb_bool undoable) +int pcb_layergrp_set_purpose_(pcb_layergrp_t *lg, char *purpose, rnd_bool undoable) { int ret = pcb_layergrp_set_purpose__(lg, purpose, undoable); assert(lg->parent_type == PCB_PARENT_BOARD); @@ -1147,7 +1147,7 @@ return ret; } -int pcb_layergrp_set_purpose(pcb_layergrp_t *lg, const char *purpose, pcb_bool undoable) +int pcb_layergrp_set_purpose(pcb_layergrp_t *lg, const char *purpose, rnd_bool undoable) { return pcb_layergrp_set_purpose_(lg, pcb_strdup(purpose), undoable); } @@ -1187,7 +1187,7 @@ -int pcb_layergrp_set_ltype(pcb_layergrp_t *grp, pcb_layer_type_t lyt, pcb_bool undoable) +int pcb_layergrp_set_ltype(pcb_layergrp_t *grp, pcb_layer_type_t lyt, rnd_bool undoable) { undo_layergrp_ltype_t rtmp, *r = &rtmp; @@ -1341,7 +1341,7 @@ } if (!((ly->meta.bound.type & PCB_LYT_DOC) || (ly->meta.bound.type & PCB_LYT_MECH))) /* doc layers are created later */ - pcb_message(PCB_MSG_ERROR, "Failed to create layer from recipe %s\n", ly->name); + rnd_message(PCB_MSG_ERROR, "Failed to create layer from recipe %s\n", ly->name); } if (want_intern > existing_intern) { @@ -1668,7 +1668,7 @@ st->cache.copper_valid = 1; } -pcb_bool pcb_has_explicit_outline(pcb_board_t *pcb) +rnd_bool pcb_has_explicit_outline(pcb_board_t *pcb) { int i; pcb_layergrp_t *g; Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 30902) +++ trunk/src/layer_grp.h (revision 30903) @@ -90,8 +90,8 @@ pcb_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, pcb_layer_id_t layer, pcb_layergrp_id_t group); /* Returns pcb_true if all layers in a group are empty */ -pcb_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t lgrp); -pcb_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num); +rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t lgrp); +rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num); /* call the gui to set a layer group */ int pcb_layer_gui_set_layer(pcb_layergrp_id_t gid, const pcb_layergrp_t *grp, int is_empty, pcb_xform_t **xform); @@ -114,7 +114,7 @@ /* Remove a layer group; if del_layers is zero, layers are kept but detached (.grp = -1), else layers are deleted too */ -int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, pcb_bool undoable); +int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable); /* Remove a layer from a group */ int pcb_layergrp_del_layer(pcb_board_t *pcb, pcb_layergrp_id_t gid, pcb_layer_id_t lid); @@ -121,7 +121,7 @@ /* Duplicate a layer group (with no layers); if auto_substrate is set, insert a substrate layer automatically if needed */ -pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, pcb_bool undoable); +pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, rnd_bool undoable); /* Move gfrom to to_before and shift the stack as necessary. Return -1 on range error */ int pcb_layergrp_move(pcb_board_t *pcb, pcb_layergrp_id_t gfrom, pcb_layergrp_id_t to_before); @@ -169,18 +169,18 @@ void pcb_layergrp_notify(pcb_board_t *pcb); /* Rename an existing layer by idx */ -int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *lname, pcb_bool undoable); +int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *lname, rnd_bool undoable); /* changes the name of a layer; memory has to be already allocated */ -int pcb_layergrp_rename_(pcb_layergrp_t *grp, char *name, pcb_bool undoable); +int pcb_layergrp_rename_(pcb_layergrp_t *grp, char *name, rnd_bool undoable); /* Change the purpose field and recalc purpi (not undoable) */ -int pcb_layergrp_set_purpose__(pcb_layergrp_t *lg, char *purpose, pcb_bool undoable); /* no strdup, no event */ -int pcb_layergrp_set_purpose_(pcb_layergrp_t *lg, char *purpose, pcb_bool undoable); /* no strdup, send layer change event */ -int pcb_layergrp_set_purpose(pcb_layergrp_t *lg, const char *purpose, pcb_bool undoable); /* strdup, send event */ +int pcb_layergrp_set_purpose__(pcb_layergrp_t *lg, char *purpose, rnd_bool undoable); /* no strdup, no event */ +int pcb_layergrp_set_purpose_(pcb_layergrp_t *lg, char *purpose, rnd_bool undoable); /* no strdup, send layer change event */ +int pcb_layergrp_set_purpose(pcb_layergrp_t *lg, const char *purpose, rnd_bool undoable); /* strdup, send event */ /* Change layer group flags (layer-type) */ -int pcb_layergrp_set_ltype(pcb_layergrp_t *g, pcb_layer_type_t lyt, pcb_bool undoable); +int pcb_layergrp_set_ltype(pcb_layergrp_t *g, pcb_layer_type_t lyt, rnd_bool undoable); /* Slow linear search for a layer group by name */ pcb_layergrp_id_t pcb_layergrp_by_name(pcb_board_t *pcb, const char *name); @@ -307,6 +307,6 @@ void pcb_layergrp_set_dflgly(pcb_board_t *pcb, pcb_layergrp_t *grp, const pcb_dflgmap_t *src, const char *grname, const char *lyname); /* Return true if the board has an outline layer with at least one object on it */ -pcb_bool pcb_has_explicit_outline(pcb_board_t *pcb); +rnd_bool pcb_has_explicit_outline(pcb_board_t *pcb); #endif Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30902) +++ trunk/src/layer_vis.c (revision 30903) @@ -45,9 +45,9 @@ * pcb_layervis_restore_stack() */ static struct { - pcb_bool ElementOn, InvisibleObjectsOn, pstk_on, RatOn; + rnd_bool ElementOn, InvisibleObjectsOn, pstk_on, RatOn; int pcb_layer_stack[PCB_MAX_LAYER]; - pcb_bool LayerOn[PCB_MAX_LAYER]; + rnd_bool LayerOn[PCB_MAX_LAYER]; int cnt; } SavedStack; @@ -73,7 +73,7 @@ } } -int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, pcb_bool ChangeStackOrder) +int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, rnd_bool ChangeStackOrder) { pcb_layergrp_id_t group; int i, changed = 1; /* at least the current layer changes */ @@ -159,7 +159,7 @@ void pcb_layervis_save_stack(void) { pcb_cardinal_t i; - static pcb_bool run = pcb_false; + static rnd_bool run = pcb_false; if (run == pcb_false) { SavedStack.cnt = 0; @@ -167,7 +167,7 @@ } if (SavedStack.cnt != 0) - pcb_message(PCB_MSG_ERROR, "pcb_layervis_save_stack() layerstack was already saved and not yet restored. cnt = %d\n", SavedStack.cnt); + rnd_message(PCB_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 @@ pcb_cardinal_t i; if (SavedStack.cnt == 0) { - pcb_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); + rnd_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); return; } else if (SavedStack.cnt != 1) { - pcb_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack save count is" " wrong. cnt = %d\n", SavedStack.cnt); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "broken layer groups; layer group references to non-existing layer\n"); + rnd_message(PCB_MSG_ERROR, "broken layer groups; layer group references to non-existing layer\n"); else l->meta.real.vis = 0; } Index: trunk/src/layer_vis.h =================================================================== --- trunk/src/layer_vis.h (revision 30902) +++ trunk/src/layer_vis.h (revision 30903) @@ -36,7 +36,7 @@ /* changes the visibility of all layers in a group; returns the number of changed layers; on should be 0 or 1 for setting the state or -1 for toggling it */ -int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, pcb_bool ChangeStackOrder); +int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, rnd_bool ChangeStackOrder); /* resets the layer visibility stack setting */ void pcb_layervis_reset_stack(rnd_hidlib_t *hl); Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 30902) +++ trunk/src/librnd/core/actions.c (revision 30903) @@ -90,12 +90,12 @@ int len; if (check_action_name(a[i].name)) { - pcb_message(PCB_MSG_ERROR, "ERROR! Invalid action name, " "action \"%s\" not registered.\n", a[i].name); + rnd_message(PCB_MSG_ERROR, "ERROR! Invalid action name, " "action \"%s\" not registered.\n", a[i].name); continue; } len = strlen(a[i].name); if (len >= sizeof(fn)) { - pcb_message(PCB_MSG_ERROR, "Invalid action name: \"%s\" (too long).\n", a[i].name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to register action \"%s\" (already registered?)\n", a[i].name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Failed to remove action \"%s\" (is it registered?)\n", a[i].name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "unknown action `%s'\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can not call action %s with this many arguments (%d >= %d)\n", name, 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); return 1; } @@ -344,10 +344,10 @@ f = rnd_act_lookup(name); if (f == NULL) { int i; - pcb_message(PCB_MSG_ERROR, "no action %s(", name); + rnd_message(PCB_MSG_ERROR, "no action %s(", name); for (i = 0; i < argc; i++) - pcb_message(PCB_MSG_ERROR, "%s%s", i ? ", " : "", argsv[i]); - pcb_message(PCB_MSG_ERROR, ")\n"); + rnd_message(PCB_MSG_ERROR, "%s%s", i ? ", " : "", argsv[i]); + rnd_message(PCB_MSG_ERROR, ")\n"); return 1; } argv[0].type = FGW_FUNC; @@ -365,7 +365,7 @@ return res.val.nat_int; } -void rnd_hid_get_coords(const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +void rnd_hid_get_coords(const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { if (pcb_gui == NULL) { fprintf(stderr, "pcb_hid_get_coords: can not get coordinates (no gui) for '%s'\n", msg); @@ -434,8 +434,8 @@ sp++; } else if (require_parens) { - pcb_message(PCB_MSG_ERROR, "Syntax error: %s\n", rstr); - pcb_message(PCB_MSG_ERROR, " expected: Action(arg1, arg2)"); + rnd_message(PCB_MSG_ERROR, "Syntax error: %s\n", rstr); + rnd_message(PCB_MSG_ERROR, " expected: Action(arg1, arg2)"); retcode = 1; goto cleanup; } @@ -648,7 +648,7 @@ return res.val.nat_int; } -int rnd_cli_mouse(rnd_hidlib_t *hl, pcb_bool notify) +int rnd_cli_mouse(rnd_hidlib_t *hl, rnd_bool notify) { fgw_arg_t res, args[3]; @@ -673,7 +673,7 @@ free(cli_pop()); } -int rnd_parse_command(rnd_hidlib_t *hl, const char *str_, pcb_bool force_action_mode) +int rnd_parse_command(rnd_hidlib_t *hl, const char *str_, rnd_bool force_action_mode) { fgw_arg_t res, args[2]; fgw_func_t *f; @@ -689,7 +689,7 @@ /* backend: let the backend action handle it */ a = rnd_find_action(pcbhl_conf.rc.cli_backend, &f); if (!a) { - pcb_message(PCB_MSG_ERROR, "cli: no action %s; leaving mode\n", pcbhl_conf.rc.cli_backend); + rnd_message(PCB_MSG_ERROR, "cli: no action %s; leaving mode\n", pcbhl_conf.rc.cli_backend); rnd_cli_leave(); return -1; } @@ -770,7 +770,7 @@ char *fgw_str2coord_unit = NULL; #define conv_str2coord(dst, src) \ do { \ - pcb_bool succ; \ + rnd_bool succ; \ dst = pcb_get_value_ex(src, NULL, NULL, NULL, fgw_str2coord_unit, &succ); \ if (!succ) \ return -1; \ @@ -779,7 +779,7 @@ static int coord_arg_conv(fgw_ctx_t *ctx, fgw_arg_t *arg, fgw_type_t target) { if (target == FGW_COORD) { /* convert to coord */ - pcb_coord_t tmp; + rnd_coord_t tmp; switch(FGW_BASE_TYPE(arg->type)) { ARG_CONV_CASE_LONG(tmp, conv_assign) ARG_CONV_CASE_LLONG(tmp, conv_assign) @@ -795,7 +795,7 @@ return 0; } if (arg->type == FGW_COORD) { /* convert from coord */ - pcb_coord_t tmp = fgw_coord(arg); + rnd_coord_t tmp = fgw_coord(arg); switch(target) { ARG_CONV_CASE_LONG(tmp, conv_rev_assign) ARG_CONV_CASE_LLONG(tmp, conv_rev_assign) @@ -819,7 +819,7 @@ #define conv_str2coords(dst, src) \ do { \ - pcb_bool succ, abso; \ + rnd_bool succ, abso; \ dst.c[0] = pcb_get_value_ex(src, NULL, &abso, NULL, fgw_str2coord_unit, &succ); \ if (!succ) \ return -1; \ @@ -887,7 +887,7 @@ static void pcb_action_err(fgw_obj_t *obj, const char *msg) { - pcb_message(PCB_MSG_ERROR, "fungw(%s): %s", obj->name, msg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "rnd_act_execute_file(): Could not open actions file \"%s\".\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src/librnd/core/actions.h (revision 30903) @@ -18,7 +18,7 @@ typedef struct fgw_coords_s { int len; - pcb_coord_t c[4]; + rnd_coord_t c[4]; char absolute[4]; } fgw_coords_t; @@ -34,7 +34,7 @@ FGW_IDPATH_ } rnd_fgw_types_e; #define fgw_keyword(arg) ((arg)->val.nat_int) -#define fgw_coord(arg) (*(pcb_coord_t *)(&((arg)->val.custom.c))) +#define fgw_coord(arg) (*(rnd_coord_t *)(&((arg)->val.custom.c))) #define fgw_coords(arg) ((arg)->val.ptr_void) #define fgw_layerid(arg) ((arg)->val.nat_long) #define fgw_layer(arg) ((arg)->val.ptr_void) @@ -97,7 +97,7 @@ action in the later case. If force_action_mode is true, str is interpreted as pcb-rnd action despite of the cli mode. Returns nonzero if the action handler(s) return nonzero. */ -int rnd_parse_command(rnd_hidlib_t *hl, const char *str_, pcb_bool force_action_mode); +int rnd_parse_command(rnd_hidlib_t *hl, const char *str_, rnd_bool force_action_mode); /* Parse the given string into action calls, and call hid_actionv for each action found. Accepts only @@ -125,7 +125,7 @@ /* Mouse event while the command line is open; returns zero if normal event processing shall be inhibited; notify is true if called in notify mode, false if called in release mode */ -int rnd_cli_mouse(rnd_hidlib_t *hl, pcb_bool notify); +int rnd_cli_mouse(rnd_hidlib_t *hl, rnd_bool notify); /* Discard the cli mode stack */ void rnd_cli_uninit(void); @@ -135,7 +135,7 @@ non-zero and msg is non-NULL, discard the cache and force querying a new coord. This mode must NOT be used unless action arguments explictly requested it. */ -void rnd_hid_get_coords(const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force); +void rnd_hid_get_coords(const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); #define RND_ACTION_MAX_ARGS 16 @@ -211,7 +211,7 @@ res->val.nat_double = v; \ } while(0) -#define RND_ACT_FAIL(x) { pcb_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(PCB_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/box.c =================================================================== --- trunk/src/librnd/core/box.c (revision 30902) +++ trunk/src/librnd/core/box.c (revision 30903) @@ -33,9 +33,9 @@ #include #include -void pcb_box_rotate90(pcb_box_t *Box, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { - pcb_coord_t x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; + rnd_coord_t x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; PCB_COORD_ROTATE90(x1, y1, X, Y, Number); PCB_COORD_ROTATE90(x2, y2, X, Y, Number); Index: trunk/src/librnd/core/box.h =================================================================== --- trunk/src/librnd/core/box.h (revision 30902) +++ trunk/src/librnd/core/box.h (revision 30903) @@ -65,11 +65,11 @@ /* rotates box 90-degrees cw */ /* that's a strange rotation! */ -#define PCB_BOX_ROTATE_CW(box) { pcb_coord_t t;\ +#define PCB_BOX_ROTATE_CW(box) { rnd_coord_t t;\ t = (box).X1; (box).X1 = -(box).Y2; (box).Y2 = (box).X2;\ (box).X2 = -(box).Y1; (box).Y1 = t;\ } -#define PCB_BOX_ROTATE_TO_NORTH(box, dir) do { pcb_coord_t t;\ +#define PCB_BOX_ROTATE_TO_NORTH(box, dir) do { rnd_coord_t t;\ switch(dir) {\ case PCB_EAST: \ t = (box).X1; (box).X1 = (box).Y1; (box).Y1 = -(box).X2;\ @@ -84,7 +84,7 @@ default: assert(0);\ }\ } while (0) -#define PCB_BOX_ROTATE_FROM_NORTH(box, dir) do { pcb_coord_t t;\ +#define PCB_BOX_ROTATE_FROM_NORTH(box, dir) do { rnd_coord_t t;\ switch(dir) {\ case PCB_WEST: \ t = (box).X1; (box).X1 = (box).Y1; (box).Y1 = -(box).X2;\ @@ -118,7 +118,7 @@ typedef struct pcb_cheap_point_s { - pcb_coord_t X, Y; + rnd_coord_t X, Y; } pcb_cheap_point_t; @@ -125,22 +125,22 @@ /* note that boxes are closed on top and left and open on bottom and right. */ /* this means that top-left corner is in box, *but bottom-right corner is * not*. */ -PCB_INLINE pcb_bool pcb_point_in_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE rnd_bool pcb_point_in_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X < box->X2) && (Y < box->Y2); } -PCB_INLINE pcb_bool pcb_point_in_closed_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE rnd_bool pcb_point_in_closed_box(const pcb_box_t * box, rnd_coord_t X, rnd_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X <= box->X2) && (Y <= box->Y2); } -PCB_INLINE pcb_bool pcb_box_is_good(const pcb_box_t * b) +PCB_INLINE rnd_bool pcb_box_is_good(const pcb_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -PCB_INLINE pcb_bool pcb_box_intersect(const pcb_box_t * a, const pcb_box_t * b) +PCB_INLINE rnd_bool pcb_box_intersect(const pcb_box_t * a, const pcb_box_t * b) { return (a->X1 < b->X2) && (b->X1 < a->X2) && (a->Y1 < b->Y2) && (b->Y1 < a->Y2); } @@ -155,7 +155,7 @@ return r; } -PCB_INLINE pcb_bool pcb_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) +PCB_INLINE rnd_bool pcb_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } @@ -172,7 +172,7 @@ return r; } -PCB_INLINE pcb_box_t pcb_shrink_box(const pcb_box_t * box, pcb_coord_t amount) +PCB_INLINE pcb_box_t pcb_shrink_box(const pcb_box_t * box, rnd_coord_t amount) { pcb_box_t r = *box; r.X1 += amount; @@ -182,7 +182,7 @@ return r; } -PCB_INLINE pcb_box_t pcb_bloat_box(const pcb_box_t * box, pcb_coord_t amount) +PCB_INLINE pcb_box_t pcb_bloat_box(const pcb_box_t * box, rnd_coord_t amount) { return pcb_shrink_box(box, -amount); } @@ -210,7 +210,7 @@ } /* construct a box that holds a single point */ -PCB_INLINE pcb_box_t pcb_point_box(pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE pcb_box_t pcb_point_box(rnd_coord_t X, rnd_coord_t Y) { pcb_box_t r; r.X1 = X; @@ -247,7 +247,7 @@ } /* Modify dst to include src */ -PCB_INLINE void pcb_box_bump_point(pcb_box_t *dst, pcb_coord_t x, pcb_coord_t y) +PCB_INLINE void pcb_box_bump_point(pcb_box_t *dst, rnd_coord_t x, rnd_coord_t y) { if (x < dst->X1) dst->X1 = x; if (y < dst->Y1) dst->Y1 = y; @@ -256,7 +256,7 @@ } /* rotates a box in 90 degree steps */ -void pcb_box_rotate90(pcb_box_t *Box, pcb_coord_t X, pcb_coord_t Y, unsigned Number); +void pcb_box_rotate90(pcb_box_t *Box, rnd_coord_t X, rnd_coord_t Y, unsigned Number); /* Enlarge a box by adding current width,height multiplied by xfactor,yfactor */ void pcb_box_enlarge(pcb_box_t *box, double xfactor, double yfactor); Index: trunk/src/librnd/core/compat_fs.c =================================================================== --- trunk/src/librnd/core/compat_fs.c (revision 30902) +++ trunk/src/librnd/core/compat_fs.c (revision 30903) @@ -111,7 +111,7 @@ pid = fork(); if (pid < 0) { /* error */ - pcb_message(PCB_MSG_ERROR, "Cannot fork!"); + rnd_message(PCB_MSG_ERROR, "Cannot fork!"); return 1; } else if (pid == 0) { Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30902) +++ trunk/src/librnd/core/conf.c (revision 30903) @@ -142,18 +142,18 @@ } if (d == NULL) { - pcb_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (can't open the file or syntax error)\n", ifn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (no root)\n", ifn); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (not a pcb-rnd-conf-v1)\n", ifn); + rnd_message(PCB_MSG_ERROR, "error: failed to load lht plugin config: %s (not a pcb-rnd-conf-v1)\n", ifn); lht_dom_uninit(d); return NULL; } @@ -189,7 +189,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f != NULL) { /* warn only if the file is there - missing file is normal */ - pcb_message(PCB_MSG_ERROR, "error: failed to load lht config: %s (%s)\n", fn, efn); + rnd_message(PCB_MSG_ERROR, "error: failed to load lht config: %s (%s)\n", fn, efn); fclose(f); } free(efn); @@ -256,7 +256,7 @@ err = lht_tree_merge(pcb_conf_plug_root[role]->root, d->root); lht_dom_uninit(d); if (err != 0) { - pcb_message(PCB_MSG_ERROR, "Failed to lihata-merge plugin config %s: %s\n", path, lht_err_str(err)); + rnd_message(PCB_MSG_ERROR, "Failed to lihata-merge plugin config %s: %s\n", path, lht_err_str(err)); return 0; } return 1; @@ -554,7 +554,7 @@ return -1; case CFN_COORD: { - pcb_bool succ; + rnd_bool succ; dst->coord[idx] = pcb_get_value(text, NULL, NULL, &succ); if (!succ) pcb_hid_cfg_error(err_node, "Invalid numeric value (coordinate): %s\n", text); @@ -898,7 +898,7 @@ int nl, ppl = strlen(path_prefix), res = 0; if (ppl >= sizeof(path)) { - pcb_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", path_prefix); + rnd_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", path_prefix); return -1; } @@ -909,7 +909,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))) { - pcb_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", n->name); + rnd_message(PCB_MSG_ERROR, "Can not merge conf patch: name too long: '%s'\n", n->name); return -1; } memcpy(pathe, n->name, nl); @@ -1454,7 +1454,7 @@ } if (idx >= nat->array_size) { - pcb_message(PCB_MSG_ERROR, "Error: can't pcb_conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); + rnd_message(PCB_MSG_ERROR, "Error: can't pcb_conf_set() %s[%d]: %d is beyond the end of the array (%d)\n", path, idx, idx, nat->array_size); free(path); return -1; } @@ -1481,7 +1481,7 @@ return 0; } if (pcb_conf_main_root_lock[target]) { - pcb_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(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_); free(path); return -1; } @@ -1512,7 +1512,7 @@ } nn = lht_dom_node_alloc(ty, basename); if (cwd->type != LHT_HASH) { - pcb_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(PCB_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; @@ -1895,7 +1895,7 @@ case CFR_PROJECT: fn = pcb_conf_get_project_conf_name(project_fn, pcb_fn, &try); if (fn == NULL) { - pcb_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(PCB_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; @@ -1917,7 +1917,7 @@ path = pcb_build_fn(hidlib, fn); if (path == NULL) { - pcb_message(PCB_MSG_ERROR, "Error: failed to calculate the project file name (board file name or allocation error)\n"); + rnd_message(PCB_MSG_ERROR, "Error: failed to calculate the project file name (board file name or allocation error)\n"); fclose(f); return -1; } @@ -1926,12 +1926,12 @@ if (end != NULL) { *end = '\0'; if (pcb_mkdir(NULL, path, 0755) == 0) { - pcb_message(PCB_MSG_INFO, "Created directory %s for saving %s\n", path, fn); + rnd_message(PCB_MSG_INFO, "Created directory %s for saving %s\n", path, fn); *end = '/'; f = pcb_fopen(hidlib, path, "w"); } else - pcb_message(PCB_MSG_ERROR, "Error: failed to create directory %s for saving %s\n", path, efn); + rnd_message(PCB_MSG_ERROR, "Error: failed to create directory %s for saving %s\n", path, efn); } free(path); } @@ -1944,7 +1944,7 @@ fclose(f); } else - pcb_message(PCB_MSG_ERROR, "Error: can't save config to %s - can't open the file for write\n", fn); + rnd_message(PCB_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.h =================================================================== --- trunk/src/librnd/core/conf.h (revision 30902) +++ trunk/src/librnd/core/conf.h (revision 30903) @@ -58,7 +58,7 @@ typedef int CFT_BOOLEAN; typedef long CFT_INTEGER; typedef double CFT_REAL; -typedef pcb_coord_t CFT_COORD; +typedef rnd_coord_t CFT_COORD; typedef pcb_unit_t * CFT_UNIT; typedef pcb_color_t CFT_COLOR; typedef pcb_conflist_t CFT_LIST; @@ -82,7 +82,7 @@ int *boolean; long *integer; double *real; - pcb_coord_t *coord; + rnd_coord_t *coord; const pcb_unit_t **unit; pcb_color_t *color; pcb_conflist_t *list; Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 30902) +++ trunk/src/librnd/core/conf_act.c (revision 30903) @@ -73,13 +73,13 @@ int rs; if (argc < 4) { - pcb_message(PCB_MSG_ERROR, "conf(set) needs at least two arguments"); + rnd_message(PCB_MSG_ERROR, "conf(set) needs at least two arguments"); return FGW_ERR_ARGC; } if (argc > 4) { role = pcb_conf_role_parse(a3); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", a3); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a3); return FGW_ERR_ARG_CONV; } } @@ -86,7 +86,7 @@ if (argc > 5) { pol = pcb_conf_policy_parse(a4); if (pol == POL_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid policy: '%s'", a4); + rnd_message(PCB_MSG_ERROR, "Invalid policy: '%s'", a4); return FGW_ERR_ARG_CONV; } } @@ -99,7 +99,7 @@ conf_native_t *n = pcb_conf_get_field(a1); if (n == 0) { - pcb_message(PCB_MSG_ERROR, "Can't delta-set '%s': no such path\n", argv[1]); + rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': no such path\n", argv[1]); return FGW_ERR_ARG_CONV; } @@ -107,7 +107,7 @@ case CFN_REAL: d = strtod(val, &end); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Can't delta-set '%s': invalid delta value\n", a1); + rnd_message(PCB_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 CFN_COORD: case CFN_INTEGER: default: - pcb_message(PCB_MSG_ERROR, "Can't delta-set '%s': not a numeric item\n", a1); + rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': not a numeric item\n", a1); return FGW_ERR_ARG_CONV; } } @@ -125,7 +125,7 @@ if (role == CFR_invalid) { conf_native_t *n = pcb_conf_get_field(a1); if (n == NULL) { - pcb_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); + rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_ARG_CONV; } rs = pcb_conf_set_native(n, 0, val); @@ -135,7 +135,7 @@ rs = pcb_conf_set(role, path, -1, val, pol); if (rs != 0) { - pcb_message(PCB_MSG_ERROR, "conf(set) failed.\n"); + rnd_message(PCB_MSG_ERROR, "conf(set) failed.\n"); return FGW_ERR_UNKNOWN; } } @@ -147,7 +147,7 @@ conf_native_t *n; if (argc != 4) { - pcb_message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); + rnd_message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); return FGW_ERR_ARGC; } path = a1; @@ -156,7 +156,7 @@ n = pcb_conf_get_field(a1); if (n == NULL) { if (pcbhl_conf.rc.verbose) - pcb_message(PCB_MSG_ERROR, "Invalid conf field '%s' in iseq: no such path\n", path); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); + rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_UNKNOWN; } if (n->type != CFN_BOOLEAN) { - pcb_message(PCB_MSG_ERROR, "Can not toggle '%s': not a boolean\n", a1); + rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': not a boolean\n", a1); return FGW_ERR_UNKNOWN; } if (n->used != 1) { - pcb_message(PCB_MSG_ERROR, "Can not toggle '%s': array size should be 1, not %d\n", a1, n->used); + rnd_message(PCB_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 = pcb_conf_role_parse(a2); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", a2); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a2); return FGW_ERR_ARG_CONV; } } @@ -205,7 +205,7 @@ res = pcb_conf_set(role, a1, -1, new_value, POL_OVERWRITE); if (res != 0) { - pcb_message(PCB_MSG_ERROR, "Can not toggle '%s': failed to set new value\n", a1); + rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': failed to set new value\n", a1); return FGW_ERR_UNKNOWN; } pcb_conf_update(a1, -1); @@ -215,7 +215,7 @@ conf_role_t role; role = pcb_conf_role_parse(a1); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", a1); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a1); return FGW_ERR_ARG_CONV; } pcb_conf_reset(role, ""); @@ -223,7 +223,7 @@ } else { - pcb_message(PCB_MSG_ERROR, "Invalid conf command\n"); + rnd_message(PCB_MSG_ERROR, "Invalid conf command\n"); return FGW_ERR_ARG_CONV; } @@ -287,7 +287,7 @@ static fgw_error_t pcb_act_SetGrid(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *val, *units = NULL; - pcb_bool absolute; + rnd_bool absolute; double value; RND_PCB_ACT_CONVARG(1, FGW_STR, SetGrid, val = argv[1].val.str); @@ -302,7 +302,7 @@ d = strtod(val+1, &end); if ((*end != '\0') || (d <= 0)) { - pcb_message(PCB_MSG_ERROR, "SetGrid: Invalid multiplier/divider for grid set: needs to be a positive number\n"); + rnd_message(PCB_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/error.c =================================================================== --- trunk/src/librnd/core/error.c (revision 30902) +++ trunk/src/librnd/core/error.c (revision 30903) @@ -50,7 +50,7 @@ unsigned long pcb_log_next_ID = 0; pcb_logline_t *pcb_log_first, *pcb_log_last; -void pcb_message(enum pcb_message_level level, const char *Format, ...) +void rnd_message(enum pcb_message_level level, const char *Format, ...) { va_list args; pcb_message_level_t min_level = PCB_MSG_INFO; @@ -230,7 +230,7 @@ if (fn != NULL) { ret = pcb_log_export(NULL, fn, (fmtsub.dlg[wfmt].val.lng == 1)); if (ret != 0) - pcb_message(PCB_MSG_ERROR, "Failed to export log to '%s'\n", fn); + rnd_message(PCB_MSG_ERROR, "Failed to export log to '%s'\n", fn); free(fn); } else @@ -270,8 +270,8 @@ char *s = NULL; rnd_PCB_ACT_MAY_CONVARG(i, FGW_STR, Message, s = argv[i].val.str); if ((s != NULL) && (*s != '\0')) - pcb_message(how, s); - pcb_message(how, "\n"); + rnd_message(how, s); + rnd_message(how, "\n"); } return 0; Index: trunk/src/librnd/core/error.h =================================================================== --- trunk/src/librnd/core/error.h (revision 30902) +++ trunk/src/librnd/core/error.h (revision 30903) @@ -46,10 +46,10 @@ /*** central log write API ***/ /* printf-like logger to the log dialog and stderr */ -void pcb_message(enum pcb_message_level level, const char *Format, ...); +void rnd_message(enum pcb_message_level level, const char *Format, ...); -/* shorthands for indicating common errors using pcb_message() */ -#define pcb_FS_error_message(filename, func) pcb_message(PCB_MSG_ERROR, "Can't open file\n '%s'\n" func "() returned: '%s'\n", filename, strerror(errno)) +/* 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 pcb_open_error_message(filename) pcb_FS_error_message(filename, "open") #define pcb_popen_error_message(filename) pcb_FS_error_message(filename, "popen") Index: trunk/src/librnd/core/event.c =================================================================== --- trunk/src/librnd/core/event.c (revision 30902) +++ trunk/src/librnd/core/event.c (revision 30903) @@ -198,7 +198,7 @@ va_start(ap, fmt); for (a++, fa++; *fmt != '\0'; fmt++, a++, fa++, argc++) { if (argc >= EVENT_MAX_ARG) { - pcb_message(PCB_MSG_ERROR, "pcb_event(): too many arguments\n"); + rnd_message(PCB_MSG_ERROR, "pcb_event(): too many arguments\n"); break; } switch (*fmt) { @@ -225,7 +225,7 @@ break; case 'c': a->type = PCB_EVARG_COORD; - a->d.c = va_arg(ap, pcb_coord_t); + a->d.c = va_arg(ap, rnd_coord_t); fa->type = FGW_LONG; fa->val.nat_long = a->d.c; fgw_arg_conv(&rnd_fgw, fa, FGW_COORD_); @@ -239,7 +239,7 @@ a->type = PCB_EVARG_INT; a->d.i = 0; fa->type = FGW_INVALID; - pcb_message(PCB_MSG_ERROR, "pcb_event(): invalid argument type '%c'\n", *fmt); + rnd_message(PCB_MSG_ERROR, "pcb_event(): invalid argument type '%c'\n", *fmt); break; } } Index: trunk/src/librnd/core/event.h =================================================================== --- trunk/src/librnd/core/event.h (revision 30902) +++ trunk/src/librnd/core/event.h (revision 30903) @@ -57,8 +57,8 @@ PCB_EVENT_EXPORT_SESSION_BEGIN, /* called before an export session (e.g. CAM script execution) starts; should not be nested; there's no guarantee that options are parsed before or after this event */ PCB_EVENT_EXPORT_SESSION_END, /* called after an export session (e.g. CAM script execution) ends */ - PCB_EVENT_STROKE_START, /* parameters: pcb_coord_t x, pcb_coord_t y */ - PCB_EVENT_STROKE_RECORD, /* parameters: pcb_coord_t x, pcb_coord_t y */ + PCB_EVENT_STROKE_START, /* parameters: rnd_coord_t x, rnd_coord_t y */ + PCB_EVENT_STROKE_RECORD, /* parameters: rnd_coord_t x, rnd_coord_t y */ PCB_EVENT_STROKE_FINISH, /* parameters: int *handled; if it is non-zero, stroke has handled the request and Tool() should return 1, breaking action script execution */ PCB_EVENT_BOARD_CHANGED, /* called after the board being edited got _replaced_ (used to be the PCBChanged action) */ @@ -94,7 +94,7 @@ double d; const char *s; void *p; - pcb_coord_t c; + rnd_coord_t c; pcb_angle_t a; } d; }; Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30902) +++ trunk/src/librnd/core/global_typedefs.h (revision 30903) @@ -30,14 +30,14 @@ #include struct pcb_box_s { /* a bounding box */ - pcb_coord_t X1, Y1; /* upper left */ - pcb_coord_t X2, Y2; /* and lower right corner */ + rnd_coord_t X1, Y1; /* upper left */ + rnd_coord_t X2, Y2; /* and lower right corner */ }; typedef struct pcb_hidlib_s rnd_hidlib_t; -/* typedef ... pcb_coord_t; pcb base unit, typedef'd in config.h */ +/* typedef ... rnd_coord_t; pcb base unit, typedef'd in config.h */ typedef double pcb_angle_t; /* degrees */ typedef struct pcb_unit_s pcb_unit_t; Index: trunk/src/librnd/core/globalconst.h =================================================================== --- trunk/src/librnd/core/globalconst.h (revision 30902) +++ trunk/src/librnd/core/globalconst.h (revision 30903) @@ -33,7 +33,7 @@ #define PCB_LARGE_VALUE (COORD_MAX / 2 - 1) /* maximum extent of board and elements */ -#define PCB_MAX_COORD ((pcb_coord_t)PCB_LARGE_VALUE) /* coordinate limits */ +#define PCB_MAX_COORD ((rnd_coord_t)PCB_LARGE_VALUE) /* coordinate limits */ #define PCB_MIN_SIZE 0 #define PCB_MAX_LAYER 38 /* max number of layer, check source code for more changes, a *lot* more changes */ @@ -47,7 +47,7 @@ #define PCB_MAX_TEXTSCALE 10000 #define PCB_MIN_PINORVIASIZE PCB_MIL_TO_COORD(20) /* size of a pin or via */ #define PCB_MIN_PINORVIAHOLE PCB_MIL_TO_COORD(4) /* size of a pins or vias drilling hole */ -#define PCB_MAX_PINORVIASIZE ((pcb_coord_t)PCB_LARGE_VALUE) +#define PCB_MAX_PINORVIASIZE ((rnd_coord_t)PCB_LARGE_VALUE) #define PCB_MIN_PINORVIACOPPER PCB_MIL_TO_COORD(4) /* min difference outer-inner diameter */ #define PCB_MIN_GRID 1 #define PCB_MAX_FONTPOSITION 255 /* upper limit of characters in my font */ Index: trunk/src/librnd/core/grid.c =================================================================== --- trunk/src/librnd/core/grid.c (revision 30902) +++ trunk/src/librnd/core/grid.c (revision 30903) @@ -45,7 +45,7 @@ #include #include -pcb_coord_t pcb_grid_fit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset) +rnd_coord_t pcb_grid_fit(rnd_coord_t x, rnd_coord_t grid_spacing, rnd_coord_t grid_offset) { x -= grid_offset; x = grid_spacing * pcb_round((double) x / grid_spacing); @@ -57,7 +57,7 @@ { const char *nsep; char *sep3, *sep2, *sep, *tmp, *size, *ox = NULL, *oy = NULL, *unit = NULL; - pcb_bool succ; + rnd_bool succ; nsep = strchr(src, ':'); if (nsep != NULL) Index: trunk/src/librnd/core/grid.h =================================================================== --- trunk/src/librnd/core/grid.h (revision 30902) +++ trunk/src/librnd/core/grid.h (revision 30903) @@ -42,13 +42,13 @@ "!" means to switch the UI to the unit specified. */ typedef struct { char *name; - pcb_coord_t size; - pcb_coord_t ox, oy; + rnd_coord_t size; + rnd_coord_t ox, oy; const pcb_unit_t *unit; /* force switching to unit if not NULL */ } pcb_grid_t; /* Returns the nearest grid-point to the given coord x */ -pcb_coord_t pcb_grid_fit(pcb_coord_t x, pcb_coord_t grid_spacing, pcb_coord_t grid_offset); +rnd_coord_t pcb_grid_fit(rnd_coord_t x, rnd_coord_t grid_spacing, rnd_coord_t grid_offset); /* Parse packed string format src into dst; allocat dst->name on success */ pcb_bool_t pcb_grid_parse(pcb_grid_t *dst, const char *src); Index: trunk/src/librnd/core/gui_act.c =================================================================== --- trunk/src/librnd/core/gui_act.c (revision 30902) +++ trunk/src/librnd/core/gui_act.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "Error: can't create menu, there's no GUI hid loaded\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't remove menu, there's no GUI hid loaded\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't remove menu, the GUI doesn't support it\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "failed to remove some of the menu items\n"); + rnd_message(PCB_MSG_ERROR, "failed to remove some of the menu items\n"); RND_ACT_IRES(-1); } else @@ -147,7 +147,7 @@ }; int pan_warp = HID_SC_DO_NOTHING; double dx, dy; - pcb_coord_t view_width, view_height; + rnd_coord_t view_width, view_height; const char *a1, *a2, *a3, *op; pcb_box_t vbx; @@ -208,7 +208,7 @@ /* Allow leaving snapped pin/pad/padstack */ if (hidlib->tool_snapped_obj_bbox) { pcb_box_t *bbx = hidlib->tool_snapped_obj_bbox; - pcb_coord_t radius = ((bbx->X2 - bbx->X1) + (bbx->Y2 - bbx->Y1))/6; + rnd_coord_t radius = ((bbx->X2 - bbx->X1) + (bbx->Y2 - bbx->Y1))/6; if (dx < 0) dx -= radius; else if (dx > 0) @@ -231,7 +231,7 @@ static fgw_error_t pcb_act_MoveCursorTo(fgw_arg_t *res, int argc, fgw_arg_t *argv) { rnd_hidlib_t *hidlib = RND_ACT_HIDLIB; - pcb_coord_t x, y; + rnd_coord_t x, y; RND_PCB_ACT_CONVARG(1, FGW_COORD, Cursor, x = fgw_coord(&argv[1])); RND_PCB_ACT_CONVARG(2, FGW_COORD, Cursor, y = fgw_coord(&argv[2])); @@ -285,7 +285,7 @@ /* DOC: getxy.html */ static fgw_error_t pcb_act_GetXY(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; const char *op = NULL, *msg = "Click to enter a coordinate."; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, GetXY, msg = argv[1].val.str); @@ -319,10 +319,10 @@ if ((pcb_gui != NULL) && (pcb_gui->benchmark != NULL)) { fps = pcb_gui->benchmark(pcb_gui); - pcb_message(PCB_MSG_INFO, "%f redraws per second\n", fps); + rnd_message(PCB_MSG_INFO, "%f redraws per second\n", fps); } else - pcb_message(PCB_MSG_ERROR, "benchmark is not available in the current HID\n"); + rnd_message(PCB_MSG_ERROR, "benchmark is not available in the current HID\n"); RND_ACT_DRES(fps); return 0; Index: trunk/src/librnd/core/hid.c =================================================================== --- trunk/src/librnd/core/hid.c (revision 30902) +++ trunk/src/librnd/core/hid.c (revision 30903) @@ -31,7 +31,7 @@ #include #include -void pcb_hid_notify_crosshair_change(rnd_hidlib_t *hl, pcb_bool changes_complete) +void pcb_hid_notify_crosshair_change(rnd_hidlib_t *hl, rnd_bool changes_complete) { if (pcb_gui->notify_crosshair_change) pcb_gui->notify_crosshair_change(pcb_gui, changes_complete); Index: trunk/src/librnd/core/hid.h =================================================================== --- trunk/src/librnd/core/hid.h (revision 30902) +++ trunk/src/librnd/core/hid.h (revision 30903) @@ -36,7 +36,7 @@ in pcb-rnd core (because other, non-pcb-rnd applications are using the HID API as well). -Coordinates are ALWAYS in pcb's internal units pcb_coord_t. Positive X is +Coordinates are ALWAYS in pcb's internal units rnd_coord_t. Positive X is right, positive Y is down, unless flip is activated. Angles are degrees, with 0 being right (positive X) and 90 being up (negative Y) - unless flip is activated. All zoom, scaling, panning, and conversions are hidden @@ -62,7 +62,7 @@ } pcb_hidval_t; typedef struct { - pcb_coord_t width; /* as set by set_line_width */ + rnd_coord_t width; /* as set by set_line_width */ pcb_cap_style_t cap; /* as set by set_line_cap */ int xor; /* as set by set_draw_xor */ int faded; /* as set by set_draw_faded */ @@ -249,10 +249,10 @@ int (*parse_arguments)(pcb_hid_t *hid, int *argc, char ***argv); /* This may be called to ask the GUI to force a redraw of a given area */ - void (*invalidate_lr)(pcb_hid_t *hid, pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom); + void (*invalidate_lr)(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom); void (*invalidate_all)(pcb_hid_t *hid); - void (*notify_crosshair_change)(pcb_hid_t *hid, pcb_bool changes_complete); - void (*notify_mark_change)(pcb_hid_t *hid, pcb_bool changes_complete); + void (*notify_crosshair_change)(pcb_hid_t *hid, rnd_bool changes_complete); + void (*notify_mark_change)(pcb_hid_t *hid, rnd_bool changes_complete); /* During redraw or print/export cycles, this is called once per layer group (physical layer); pusrpose/purpi are the extracted purpose field and its @@ -277,7 +277,7 @@ /* Composite layer drawing: manipulate the sketch canvas and set positive or negative drawing mode. The canvas covers the screen box. */ - void (*set_drawing_mode)(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen); + void (*set_drawing_mode)(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen); /* Announce start/end of a render burst for a specific screen screen box; A GUI hid should set the coord_per_pix value here for proper optimization. */ @@ -296,7 +296,7 @@ different values each time may be expensive, so grouping items by line style is helpful. */ void (*set_line_cap)(pcb_hid_gc_t gc, pcb_cap_style_t style); - void (*set_line_width)(pcb_hid_gc_t gc, pcb_coord_t width); + void (*set_line_width)(pcb_hid_gc_t gc, rnd_coord_t width); void (*set_draw_xor)(pcb_hid_gc_t gc, int xor); /* Blends 20% or so color with 80% background. Only used for assembly drawings so far. */ @@ -305,15 +305,15 @@ /* The usual drawing functions. "draw" means to use segments of the given width, whereas "fill" means to fill to a zero-width outline. */ - void (*draw_line)(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); - void (*draw_arc)(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t xradius, pcb_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle); - void (*draw_rect)(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); - void (*fill_circle)(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); - void (*fill_polygon)(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y); - void (*fill_polygon_offs)(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy); - void (*fill_rect)(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); + void (*draw_line)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + void (*draw_arc)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle); + void (*draw_rect)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + void (*fill_circle)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); + void (*fill_polygon)(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y); + void (*fill_polygon_offs)(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); + void (*fill_rect)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); - void (*draw_pixmap)(pcb_hid_t *hid, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, const pcb_pixmap_t *pixmap); + void (*draw_pixmap)(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const pcb_pixmap_t *pixmap); void (*uninit_pixmap)(pcb_hid_t *hid, const pcb_pixmap_t *pixmap); /* This is for the printer. If xval_ and yval_ are @@ -331,7 +331,7 @@ int (*control_is_pressed)(pcb_hid_t *hid); int (*mod1_is_pressed)(pcb_hid_t *hid); - void (*get_coords)(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force); + void (*get_coords)(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); /* Sets the crosshair, which may differ from the pointer depending on grid and pad snap. Note that the HID is responsible for @@ -341,7 +341,7 @@ or mils accordingly. If cursor_action_ is set, the cursor or screen may be adjusted so that the cursor and the crosshair are at the same point on the screen. */ - void (*set_crosshair)(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int cursor_action); + void (*set_crosshair)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int cursor_action); #define HID_SC_DO_NOTHING 0 #define HID_SC_WARP_POINTER 1 #define HID_SC_PAN_VIEWPORT 2 @@ -360,7 +360,7 @@ hangup, and errors. user_data_ can be anything, it's just passed to func. If the watch function returns pcb_true, the watch is kept, else it is removed. */ - pcb_hidval_t (*watch_file)(pcb_hid_t *hid, int fd, unsigned int condition, pcb_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data); + pcb_hidval_t (*watch_file)(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data); /* Use this to stop a file watch; must not be called from within a GUI callback! */ void (*unwatch_file)(pcb_hid_t *hid, pcb_hidval_t watch); @@ -404,7 +404,7 @@ by window placement. Returns opaque hid_ctx. (Hid_ctx shall save pcb_hid_t so subsequent attr_dlg_*() calls don't have it as an argument) */ - void *(*attr_dlg_new)(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); + void *(*attr_dlg_new)(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int (*attr_dlg_run)(void *hid_ctx); void (*attr_dlg_raise)(void *hid_ctx); /* raise the window to top */ void (*attr_dlg_close)(void *hid_ctx); /* close the GUI but do not yet free hid_ctx (results should be available) */ @@ -420,7 +420,7 @@ int (*attr_dlg_widget_state)(void *hid_ctx, int idx, int enabled); /* hide or show a widget of an active attribute dialog */ - int (*attr_dlg_widget_hide)(void *hid_ctx, int idx, pcb_bool hide); + int (*attr_dlg_widget_hide)(void *hid_ctx, int idx, rnd_bool hide); /* Change the current value of a widget; same as if the user chaged it, except the value-changed callback is inhibited */ @@ -479,12 +479,12 @@ /* Optional: change cursor to indicate if an object is grabbed (or not) */ - void (*point_cursor)(pcb_hid_t *hid, pcb_bool grabbed); + void (*point_cursor)(pcb_hid_t *hid, rnd_bool grabbed); /* Optional: when non-zero, the core renderer may decide to draw cheaper (simplified) approximation of some objects that would end up being too small. For a GUI, this should depend on the zoom level */ - pcb_coord_t coord_per_pix; + rnd_coord_t coord_per_pix; /* If ovr is not NULL: - overwrite the command etry with ovr @@ -516,18 +516,18 @@ /* side-correct zoom to show a window of the board. If set_crosshair is true, also update the crosshair to be on the center of the window */ - void (*zoom_win)(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool set_crosshair); + void (*zoom_win)(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair); /* Zoom relative or absolute by factor; relative means current zoom is multiplied by factor */ - void (*zoom)(pcb_hid_t *hid, pcb_coord_t center_x, pcb_coord_t center_y, double factor, int relative); + void (*zoom)(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative); /* Pan relative/absolute by x and y; relative means x and y are added to the current pan */ - void (*pan)(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int relative); + void (*pan)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative); /* Start or stop panning at x;y - stop is mode=0, start is mode=1 */ - void (*pan_mode)(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, pcb_bool mode); + void (*pan_mode)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode); /* Load viewbox with the extents of visible pixels translated to board coords */ void (*view_get)(pcb_hid_t *hid, pcb_box_t *viewbox); @@ -550,7 +550,7 @@ void (*set_top_title)(pcb_hid_t *hid, const char *title); /* OPTIONAL: override the mouse cursor to indicate busy state */ - void (*busy)(pcb_hid_t *hid, pcb_bool busy); + void (*busy)(pcb_hid_t *hid, rnd_bool busy); /* this field is used by that HID implementation to store its data */ void *hid_data; @@ -615,7 +615,7 @@ /* non-zero if DAD dialogs are available currently */ #define PCB_HAVE_GUI_ATTR_DLG \ ((pcb_gui != NULL) && (pcb_gui->gui) && (pcb_gui->attr_dlg_new != NULL) && (pcb_gui->attr_dlg_new != pcb_nogui_attr_dlg_new)) -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int pcb_hid_dock_enter(pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); void pcb_hid_dock_leave(pcb_hid_dad_subdialog_t *sub); @@ -643,7 +643,7 @@ * They should initiate a redraw of the crosshair attached objects - which may * (if necessary) mean repainting the whole screen if the GUI hasn't tracked the * location of existing attached drawing. */ -void pcb_hid_notify_crosshair_change(rnd_hidlib_t *hl, pcb_bool changes_complete); +void pcb_hid_notify_crosshair_change(rnd_hidlib_t *hl, rnd_bool changes_complete); #endif Index: trunk/src/librnd/core/hid_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 30902) +++ trunk/src/librnd/core/hid_attrib.c (revision 30903) @@ -95,7 +95,7 @@ break; case PCB_HATT_COORD: if (a->value) - *(pcb_coord_t *) a->value = a->default_val.crd; + *(rnd_coord_t *) a->value = a->default_val.crd; break; case PCB_HATT_BOOL: if (a->value) @@ -120,7 +120,7 @@ default: if (PCB_HATT_IS_COMPOSITE(a->type)) /* function callback */ break; - pcb_message(PCB_MSG_ERROR, "Invalid attribute type %d for attribute %s\n", a->type, a->name); + rnd_message(PCB_MSG_ERROR, "Invalid attribute type %d for attribute %s\n", a->type, a->name); abort(); } } @@ -152,7 +152,7 @@ break; case PCB_HATT_COORD: if (a->value) - *(pcb_coord_t *) a->value = pcb_get_value((*argv)[1], NULL, NULL, NULL); + *(rnd_coord_t *) a->value = pcb_get_value((*argv)[1], NULL, NULL, NULL); else a->default_val.crd = pcb_get_value((*argv)[1], NULL, NULL, NULL); (*argc)--; @@ -234,7 +234,7 @@ (*argv)++; } else { - pcb_message(PCB_MSG_ERROR, "Multiple filenames not supported. First filename was: %s; offending second filename: %s\n", filename, (*argv)[0]); + rnd_message(PCB_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_attrib.h =================================================================== --- trunk/src/librnd/core/hid_attrib.h (revision 30902) +++ trunk/src/librnd/core/hid_attrib.h (revision 30903) @@ -13,7 +13,7 @@ long lng; const char *str; double dbl; - pcb_coord_t crd; + rnd_coord_t crd; pcb_color_t clr; void (*func)(); }; Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 30902) +++ trunk/src/librnd/core/hid_cfg.c (revision 30903) @@ -49,7 +49,7 @@ const char *fn; int line, col; lht_dom_loc_active(doc, &fn, &line, &col); - pcb_message(PCB_MSG_ERROR, "Resource error: %s (%s:%d.%d)*\n", lht_err_str(err), filename, line+1, col+1); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, hid_cfg_error_shared); + rnd_message(PCB_MSG_ERROR, hid_cfg_error_shared); } /*** minimal menu support for feature plugins - needs to stay in core ***/ Index: trunk/src/librnd/core/hid_cfg_input.c =================================================================== --- trunk/src/librnd/core/hid_cfg_input.c (revision 30902) +++ trunk/src/librnd/core/hid_cfg_input.c (revision 30903) @@ -59,7 +59,7 @@ else if ((vlen >= 7) && (pcb_strncasecmp(value, "release", 7) == 0)) m |= PCB_M_Release; else if ((vlen >= 5) && (pcb_strncasecmp(value, "press", 5) == 0)) press = 1; else - pcb_message(PCB_MSG_ERROR, "Unknown modifier: %s\n", value); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_ERROR, "Bogus modifier: both press and release\n"); + rnd_message(PCB_MSG_ERROR, "Bogus modifier: both press and release\n"); return m; } @@ -95,7 +95,7 @@ else if (pcb_strcasecmp(name, "scroll-left") == 0) return PCB_MB_SCROLL_UP; else if (pcb_strcasecmp(name, "scroll-right") == 0) return PCB_MB_SCROLL_DOWN; else { - pcb_message(PCB_MSG_ERROR, "Error: unknown mouse button: %s\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Warning: no /mouse section in the resource file - mouse is disabled\n"); + rnd_message(PCB_MSG_ERROR, "Warning: no /mouse section in the resource file - mouse is disabled\n"); return -1; } @@ -181,7 +181,7 @@ return NULL; } -void hid_cfg_mouse_action(rnd_hidlib_t *hl, pcb_hid_cfg_mouse_t *mouse, pcb_hid_cfg_mod_t button_and_mask, pcb_bool cmd_entry_active) +void hid_cfg_mouse_action(rnd_hidlib_t *hl, pcb_hid_cfg_mouse_t *mouse, pcb_hid_cfg_mod_t button_and_mask, rnd_bool cmd_entry_active) { pcbhl_conf.temp.click_cmd_entry_active = cmd_entry_active; pcb_hid_cfg_action(hl, find_best_action(mouse, button_and_mask)); @@ -258,7 +258,7 @@ return *desc; if (len > sizeof(tmp)-1) { - pcb_message(PCB_MSG_ERROR, "key sym name too long\n"); + rnd_message(PCB_MSG_ERROR, "key sym name too long\n"); return 0; } strncpy(tmp, desc, len); @@ -304,7 +304,7 @@ k = strchr(last, '<'); if (k == NULL) { - pcb_message(PCB_MSG_ERROR, "Missing in the key description: '%s' at %s:%ld\n", keydesc, loc->file_name, loc->line+1); + rnd_message(PCB_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 { - pcb_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(PCB_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'; - pcb_message(PCB_MSG_ERROR, "Unrecognised key symbol in key description: %s at %s:%ld\n", s, loc->file_name, loc->line+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to add hotkey binding: %s: %s\n", keydesc, errmsg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Keyboard translation error: probably the US layout is not enabled. Some hotkeys may not work properly\n"); + rnd_message(PCB_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_cfg_input.h =================================================================== --- trunk/src/librnd/core/hid_cfg_input.h (revision 30902) +++ trunk/src/librnd/core/hid_cfg_input.h (revision 30903) @@ -39,7 +39,7 @@ } pcb_hid_cfg_mouse_t; int hid_cfg_mouse_init(pcb_hid_cfg_t *hr, pcb_hid_cfg_mouse_t *mouse); -void hid_cfg_mouse_action(rnd_hidlib_t *hl, pcb_hid_cfg_mouse_t *mouse, pcb_hid_cfg_mod_t button_and_mask, pcb_bool cmd_entry_active); +void hid_cfg_mouse_action(rnd_hidlib_t *hl, pcb_hid_cfg_mouse_t *mouse, pcb_hid_cfg_mod_t button_and_mask, rnd_bool cmd_entry_active); /************************** KEYBOARD ***************************/ Index: trunk/src/librnd/core/hid_dad.h =================================================================== --- trunk/src/librnd/core/hid_dad.h (revision 30902) +++ trunk/src/librnd/core/hid_dad.h (revision 30903) @@ -54,7 +54,7 @@ void (*hid_scroll_to_bottom)(pcb_hid_attribute_t *attrib, void *hid_ctx); void (*hid_set_text)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *txt); char *(*hid_get_text)(pcb_hid_attribute_t *attrib, void *hid_ctx); /* caller needs to free the result */ - void (*hid_set_readonly)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_bool readonly); /* by default text views are not read-only */ + void (*hid_set_readonly)(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly); /* by default text views are not read-only */ /* optional callbacks the user set after widget creation */ void *user_ctx; @@ -122,7 +122,7 @@ void *user_ctx; void (*user_free_cb)(pcb_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx); void (*user_expose_cb)(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); - pcb_bool (*user_mouse_cb)(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y); /* returns true if redraw is needed */ + rnd_bool (*user_mouse_cb)(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); /* returns true if redraw is needed */ /* optional callbacks HIDs may set after widget creation */ void *hid_wdata; @@ -134,13 +134,13 @@ int wbegin, wend; /* widget index to the correspoding PCB_HATT_BEGIN_COMPOUND and PCB_HATT_END */ /* compound implementation callbacks */ - int (*widget_state)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool enabled); - int (*widget_hide)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool hide); + int (*widget_state)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); + int (*widget_hide)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); int (*set_value)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); /* set value runtime */ - void (*set_val_num)(pcb_hid_attribute_t *attr, long l, double d, pcb_coord_t c); /* set value during creation; attr is the END */ + void (*set_val_num)(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ void (*set_val_ptr)(pcb_hid_attribute_t *attr, void *ptr); /* set value during creation; attr is the END */ void (*set_help)(pcb_hid_attribute_t *attr, const char *text); /* set the tooltip help; attr is the END */ - void (*set_field_num)(pcb_hid_attribute_t *attr, const char *fieldname, long l, double d, pcb_coord_t c); /* set value during creation; attr is the END */ + void (*set_field_num)(pcb_hid_attribute_t *attr, const char *fieldname, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ void (*set_field_ptr)(pcb_hid_attribute_t *attr, const char *fieldname, void *ptr); /* set value during creation; attr is the END */ void (*set_geo)(pcb_hid_attribute_t *attr, pcb_hatt_compflags_t flg, int geo); /* set geometry during creation; attr is the END */ void (*free)(pcb_hid_attribute_t *attrib); /* called by DAD on free'ing the PCB_HATT_BEGIN_COMPOUND and PCB_HATT_END_COMPOUND widget */ @@ -510,7 +510,7 @@ { \ pcb_hid_compound_t *cmp = table[table ## _len - 1].wdata; \ if ((cmp != NULL) && (cmp->set_val_num != NULL)) \ - cmp->set_val_num(&table[table ## _len - 1], (long)(val_), (double)(val_), (pcb_coord_t)(val_)); \ + cmp->set_val_num(&table[table ## _len - 1], (long)(val_), (double)(val_), (rnd_coord_t)(val_)); \ else \ assert(0); \ } \ @@ -588,7 +588,7 @@ table[table ## _len - 1].field.lng = (int)val; \ break; \ case PCB_HATT_COORD: \ - table[table ## _len - 1].field.crd = (pcb_coord_t)val; \ + table[table ## _len - 1].field.crd = (rnd_coord_t)val; \ break; \ case PCB_HATT_REAL: \ case PCB_HATT_PROGRESS: \ @@ -630,7 +630,7 @@ table[table ## _len - 1].field.lng = (int)val_; \ break; \ case PCB_HATT_COORD: \ - table[table ## _len - 1].field.crd = (pcb_coord_t)val_; \ + table[table ## _len - 1].field.crd = (rnd_coord_t)val_; \ break; \ case PCB_HATT_REAL: \ case PCB_HATT_PROGRESS: \ @@ -658,7 +658,7 @@ { \ pcb_hid_compound_t *cmp = table[table ## _len - 1].wdata; \ if ((cmp != NULL) && (cmp->set_field_num != NULL)) \ - cmp->set_field_num(&table[table ## _len - 1], #field, (long)(val_), (double)(val_), (pcb_coord_t)(val_)); \ + cmp->set_field_num(&table[table ## _len - 1], #field, (long)(val_), (double)(val_), (rnd_coord_t)(val_)); \ else \ assert(0); \ } \ @@ -832,7 +832,7 @@ /* OPTIONAL: filled in by the sub-dialog's creator: called by the sub-dialog's parent while the parent dialog is being closed. If ok is false, the dialog was cancelled */ - void (*on_close)(pcb_hid_dad_subdialog_t *sub, pcb_bool ok); + void (*on_close)(pcb_hid_dad_subdialog_t *sub, rnd_bool ok); void *parent_ctx; /* used by the parent dialog code */ void *sub_ctx; /* used by the sub-dialog's creator */ Index: trunk/src/librnd/core/hid_dad_spin.c =================================================================== --- trunk/src/librnd/core/hid_dad_spin.c (revision 30902) +++ trunk/src/librnd/core/hid_dad_spin.c (revision 30903) @@ -108,7 +108,7 @@ pcb_gui->attr_dlg_set_help(hid_ctx, spin->wwarn, msg); } -static char *gen_str_coord(pcb_hid_dad_spin_t *spin, pcb_coord_t c, char *buf, int buflen) +static char *gen_str_coord(pcb_hid_dad_spin_t *spin, rnd_coord_t c, char *buf, int buflen) { const pcb_unit_t *unit; if (spin->unit != NULL) @@ -271,7 +271,7 @@ break; case PCB_DAD_SPIN_COORD: if (spin->unit == NULL) { - pcb_bool succ = 0; + rnd_bool succ = 0; if (str->val.str != NULL) succ = pcb_get_value_unit(str->val.str, NULL, 0, &v, &unit); if (!succ) { @@ -370,7 +370,7 @@ char *ends, *warn = NULL; long l; double d; - pcb_bool succ, absolute; + rnd_bool succ, absolute; const pcb_unit_t *unit; if (spin->set_writeback_lock) @@ -421,7 +421,7 @@ char *ends, *warn = NULL; int changed = 0; double d; - pcb_bool succ, absolute; + rnd_bool succ, absolute; const pcb_unit_t *unit; if (spin->set_writeback_lock) @@ -494,7 +494,7 @@ spin_unit_dialog(hid_ctx, spin, end, str); } -void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, pcb_coord_t c) +void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c) { pcb_hid_dad_spin_t *spin = attr->wdata; pcb_hid_attribute_t *str = attr - spin->cmp.wend + spin->wstr; @@ -531,13 +531,13 @@ } } -int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool enabled) +int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) { pcb_hid_dad_spin_t *spin = end->wdata; return pcb_gui->attr_dlg_widget_state(hid_ctx, spin->wall, enabled); } -int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool hide) +int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) { pcb_hid_dad_spin_t *spin = end->wdata; return pcb_gui->attr_dlg_widget_hide(hid_ctx, spin->wall, hide); Index: trunk/src/librnd/core/hid_dad_spin.h =================================================================== --- trunk/src/librnd/core/hid_dad_spin.h (revision 30902) +++ trunk/src/librnd/core/hid_dad_spin.h (revision 30903) @@ -44,7 +44,7 @@ pcb_hid_attribute_t **attrs; void **hid_ctx; int set_writeback_lock; - pcb_coord_t last_good_crd; + rnd_coord_t last_good_crd; enum { PCB_DAD_SPIN_INT, PCB_DAD_SPIN_DOUBLE, @@ -143,9 +143,9 @@ void pcb_dad_spin_unit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); void pcb_dad_spin_free(pcb_hid_attribute_t *attrib); -void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, pcb_coord_t c); -int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool enabled); -int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool hide); +void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c); +int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); +int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); int pcb_dad_spin_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); void pcb_dad_spin_set_help(pcb_hid_attribute_t *end, const char *help); void pcb_dad_spin_set_geo(pcb_hid_attribute_t *end, pcb_hatt_compflags_t flg, int geo); Index: trunk/src/librnd/core/hid_dad_tree.h =================================================================== --- trunk/src/librnd/core/hid_dad_tree.h (revision 30902) +++ trunk/src/librnd/core/hid_dad_tree.h (revision 30903) @@ -292,7 +292,7 @@ tree->hid_jumpto_cb(tree->attrib, tree->hid_wdata, row); } -PCB_INLINE void pcb_dad_tree_expcoll_(pcb_hid_tree_t *tree, pcb_hid_row_t *row, pcb_bool expanded, pcb_bool recursive) +PCB_INLINE void pcb_dad_tree_expcoll_(pcb_hid_tree_t *tree, pcb_hid_row_t *row, rnd_bool expanded, rnd_bool recursive) { if (recursive) { pcb_hid_row_t *r; @@ -303,7 +303,7 @@ tree->hid_expcoll_cb(tree->attrib, tree->hid_wdata, row, expanded); } -PCB_INLINE void pcb_dad_tree_expcoll(pcb_hid_attribute_t *attr, pcb_hid_row_t *row, pcb_bool expanded, pcb_bool recursive) +PCB_INLINE void pcb_dad_tree_expcoll(pcb_hid_attribute_t *attr, pcb_hid_row_t *row, rnd_bool expanded, rnd_bool recursive) { pcb_hid_tree_t *tree = attr->wdata; Index: trunk/src/librnd/core/hid_dad_unit.c =================================================================== --- trunk/src/librnd/core/hid_dad_unit.c (revision 30902) +++ trunk/src/librnd/core/hid_dad_unit.c (revision 30903) @@ -48,7 +48,7 @@ end->change_cb(hid_ctx, caller_data, end); } -void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long unit_id, double unused1, pcb_coord_t unused2) +void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long unit_id, double unused1, rnd_coord_t unused2) { int l; pcb_hid_dad_unit_t *unit = attr->wdata; @@ -78,13 +78,13 @@ } } -int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool enabled) +int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) { pcb_hid_dad_unit_t *unit = end->wdata; return pcb_gui->attr_dlg_widget_state(hid_ctx, unit->wenum, enabled); } -int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool hide) +int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) { pcb_hid_dad_unit_t *unit = end->wdata; return pcb_gui->attr_dlg_widget_hide(hid_ctx, unit->wenum, hide); Index: trunk/src/librnd/core/hid_dad_unit.h =================================================================== --- trunk/src/librnd/core/hid_dad_unit.h (revision 30902) +++ trunk/src/librnd/core/hid_dad_unit.h (revision 30903) @@ -69,9 +69,9 @@ extern const char **pcb_dad_unit_enum; -void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long l, double unused1, pcb_coord_t unused2); -int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool enabled); -int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, pcb_bool hide); +void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long l, double unused1, rnd_coord_t unused2); +int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); +int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); int pcb_dad_unit_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); void pcb_dad_unit_set_val_ptr(pcb_hid_attribute_t *end, void *val); void pcb_dad_unit_set_help(pcb_hid_attribute_t *end, const char *help); Index: trunk/src/librnd/core/hid_dlg.c =================================================================== --- trunk/src/librnd/core/hid_dlg.c (revision 30902) +++ trunk/src/librnd/core/hid_dlg.c (revision 30903) @@ -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); - pcb_message(PCB_MSG_ERROR, "action Print() is available only under a GUI HID. Please use the lpr exporter instead.\n"); + rnd_message(PCB_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 30902) +++ trunk/src/librnd/core/hid_init.c (revision 30903) @@ -417,7 +417,7 @@ if (res == 0) break; /* HID accepted, don't try anything else */ if (res < 0) { - pcb_message(PCB_MSG_ERROR, "Failed to initialize HID %s (unrecoverable, have to give up)\n", pcb_gui->name); + rnd_message(PCB_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:; - pcb_message(PCB_MSG_ERROR, "Tried all available HIDs, all failed, giving up.\n"); + rnd_message(PCB_MSG_ERROR, "Tried all available HIDs, all failed, giving up.\n"); } else - pcb_message(PCB_MSG_ERROR, "Not trying any other hid as fallback because rc/hid_fallback is disabled.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find the gui (%s) requested.\n", ga->hid_name); + rnd_message(PCB_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) { - pcb_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(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"); 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)) - pcb_message(PCB_MSG_ERROR, "\nHint: %s\n", ga->main_action_hint); + rnd_message(PCB_MSG_ERROR, "\nHint: %s\n", ga->main_action_hint); pcbhl_log_print_uninit_errs("main_action parse error"); *exitval = res; return 1; @@ -680,13 +680,13 @@ return 0; } -int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, pcb_bool is_empty) +int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty) { if (!pcbhl_main_exporting) return 0; if (is_empty) - pcb_message(PCB_MSG_WARNING, "Exporting empty board (nothing loaded or drawn).\n"); + rnd_message(PCB_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_init.h =================================================================== --- trunk/src/librnd/core/hid_init.h (revision 30902) +++ trunk/src/librnd/core/hid_init.h (revision 30903) @@ -139,7 +139,7 @@ /* if -x was specified, do the export and return 1 (the caller should exit); else return 0 */ -int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, pcb_bool is_empty); +int pcbhl_main_exported(pcbhl_main_args_t *ga, rnd_hidlib_t *hidlib, rnd_bool is_empty); /* launches the GUI or CLI; after it returns, if pcb_gui is not NULL, the user has selected another GUI to switch to. */ Index: trunk/src/librnd/core/hid_inlines.h =================================================================== --- trunk/src/librnd/core/hid_inlines.h (revision 30902) +++ trunk/src/librnd/core/hid_inlines.h (revision 30903) @@ -58,7 +58,7 @@ } } -PCB_INLINE void pcb_hid_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +PCB_INLINE void pcb_hid_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { pcb_core_gc_t *hc = (pcb_core_gc_t *)gc; if (hc->width != width) { Index: trunk/src/librnd/core/hid_nogui.c =================================================================== --- trunk/src/librnd/core/hid_nogui.c (revision 30902) +++ trunk/src/librnd/core/hid_nogui.c (revision 30903) @@ -71,7 +71,7 @@ CRASH("parse_arguments"); } -static void nogui_invalidate_lr(pcb_hid_t *hid, pcb_coord_t l, pcb_coord_t r, pcb_coord_t t, pcb_coord_t b) +static void nogui_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { CRASH("invalidate_lr"); } @@ -100,7 +100,7 @@ { } -static void nogui_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void nogui_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { CRASH("set_drawing_mode"); } @@ -120,7 +120,7 @@ CRASH("set_line_cap"); } -static void nogui_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void nogui_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { CRASH("set_line_width"); } @@ -134,32 +134,32 @@ { } -static void nogui_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void nogui_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("draw_line"); } -static void nogui_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) +static void nogui_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) { CRASH("draw_arc"); } -static void nogui_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void nogui_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("draw_rect"); } -static void nogui_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void nogui_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { CRASH("fill_circle"); } -static void nogui_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y) +static void nogui_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { CRASH("fill_polygon"); } -static void nogui_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void nogui_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("fill_rect"); } @@ -187,12 +187,12 @@ return 0; } -static void nogui_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +static void nogui_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { CRASH("get_coords"); } -static void nogui_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void nogui_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } @@ -209,7 +209,7 @@ CRASH("stop_timer"); } -static pcb_hidval_t nogui_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, pcb_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) +static pcb_hidval_t nogui_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t rv; CRASH("watch_file"); @@ -350,7 +350,7 @@ return pcb_strdup(answer); } -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { CRASH("attr_dlg_new"); } @@ -420,7 +420,7 @@ { static int warned = 0; if (!warned) { - pcb_message(PCB_MSG_ERROR, "The current GUI HID does not support clipboard.\nClipboard is emulated, not shared withother programs\n"); + rnd_message(PCB_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/hid_nogui.h =================================================================== --- trunk/src/librnd/core/hid_nogui.h (revision 30902) +++ trunk/src/librnd/core/hid_nogui.h (revision 30903) @@ -5,7 +5,7 @@ pcb_hid_t *pcb_hid_nogui_get_hid(void); /* For checking if attr dialogs are not available: */ -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int pcb_nogui_progress(long so_far, long total, const char *message); Index: trunk/src/librnd/core/hidlib.c =================================================================== --- trunk/src/librnd/core/hidlib.c (revision 30902) +++ trunk/src/librnd/core/hidlib.c (revision 30903) @@ -33,7 +33,7 @@ static const char *hidlib_cookie = "hidlib"; -void pcb_hidcore_crosshair_move_to(rnd_hidlib_t *hidlib, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot) +void pcb_hidcore_crosshair_move_to(rnd_hidlib_t *hidlib, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { if (mouse_mot) pcb_event(hidlib, PCB_EVENT_STROKE_RECORD, "cc", abs_x, abs_y); Index: trunk/src/librnd/core/hidlib.h =================================================================== --- trunk/src/librnd/core/hidlib.h (revision 30902) +++ trunk/src/librnd/core/hidlib.h (revision 30903) @@ -30,20 +30,20 @@ #include "global_typedefs.h" typedef struct pcb_mark_s { - pcb_bool status; - pcb_coord_t X, Y; + rnd_bool status; + rnd_coord_t X, Y; unsigned user_placed:1; /* if 1, the user has explicitly placed the mark - do not move it */ } pcb_mark_t; struct pcb_hidlib_s { - pcb_coord_t grid; /* grid resolution */ - pcb_coord_t grid_ox, grid_oy; /* grid offset */ - pcb_coord_t size_x, size_y; /* drawing area extents (or board dimensions) */ + rnd_coord_t grid; /* grid resolution */ + rnd_coord_t grid_ox, grid_oy; /* grid offset */ + rnd_coord_t size_x, size_y; /* drawing area extents (or board dimensions) */ char *name; /* name of the design */ char *filename; /* name of the file (from load) */ /* tool state */ - pcb_coord_t ch_x, ch_y, tool_x, tool_y; /* ch is crosshair */ + rnd_coord_t ch_x, ch_y, tool_x, tool_y; /* ch is crosshair */ unsigned int tool_hit; /* optional: type of a hit object of PCB_MOVE_TYPES; 0 if there was no PCB_MOVE_TYPES object under the crosshair */ unsigned int tool_click:1; /* optional: true if clicked somewhere with the arrow tool */ pcb_mark_t tool_grabbed; /* point where a drag&drop operation started */ @@ -55,7 +55,7 @@ /* spare - sacrifice these when increasing struct size without breaking API binary compatibility */ int ispare[8]; double dspare[8]; - pcb_coord_t cspare[8]; + rnd_coord_t cspare[8]; void *pspare[8]; }; @@ -84,16 +84,16 @@ /* Move the crosshair to an absolute x;y coord on the board and update the GUI; if mouse_mot is non-zero, the request is a direct result of a mouse motion event */ -void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot); +void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot); /* The whole default menu file embedded in the executable; NULL if not present */ extern const char *pcb_hidlib_default_embedded_menu; /* Draw any fixed mark on XOR overlay; if inhibit_drawing_mode is true, do not call ->set_drawing_mode */ -void pcbhl_draw_marks(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode); +void pcbhl_draw_marks(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode); /* Draw any mark following the crosshair on XOR overlay; if inhibit_drawing_mode is true, do not call ->set_drawing_mode */ -void pcbhl_draw_attached(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode); +void pcbhl_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode); /*** One of these two functions will be called whenever (parts of) the screen needs redrawing (on screen, print or export, board or preview). The expose @@ -134,6 +134,6 @@ extern const char *pcbhl_app_url; /*** API wrappers provided for plugins (these are translated into calls to the app within the hidlib) ***/ -void pcb_hidcore_crosshair_move_to(rnd_hidlib_t *hidlib, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot); +void pcb_hidcore_crosshair_move_to(rnd_hidlib_t *hidlib, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot); #endif Index: trunk/src/librnd/core/hidlib_conf.c =================================================================== --- trunk/src/librnd/core/hidlib_conf.c (revision 30902) +++ trunk/src/librnd/core/hidlib_conf.c (revision 30903) @@ -50,7 +50,7 @@ } /* sets cursor grid with respect to grid offset values */ -void pcb_hidlib_set_grid(rnd_hidlib_t *hidlib, pcb_coord_t Grid, pcb_bool align, pcb_coord_t ox, pcb_coord_t oy) +void pcb_hidlib_set_grid(rnd_hidlib_t *hidlib, rnd_coord_t Grid, rnd_bool align, rnd_coord_t ox, rnd_coord_t oy) { if (Grid >= 1 && Grid <= PCB_MAX_GRID) { if (align) { Index: trunk/src/librnd/core/hidlib_conf.h =================================================================== --- trunk/src/librnd/core/hidlib_conf.h (revision 30902) +++ trunk/src/librnd/core/hidlib_conf.h (revision 30903) @@ -112,7 +112,7 @@ int pcb_hidlib_conf_init(); /* sets cursor grid with respect to grid spacing, offset and unit values */ -void pcb_hidlib_set_grid(rnd_hidlib_t *hidlib, pcb_coord_t Grid, pcb_bool align, pcb_coord_t ox, pcb_coord_t oy); +void pcb_hidlib_set_grid(rnd_hidlib_t *hidlib, rnd_coord_t Grid, rnd_bool align, rnd_coord_t ox, rnd_coord_t oy); void pcb_hidlib_set_unit(rnd_hidlib_t *hidlib, const pcb_unit_t *new_unit); Index: trunk/src/librnd/core/misc_util.c =================================================================== --- trunk/src/librnd/core/misc_util.c (revision 30902) +++ trunk/src/librnd/core/misc_util.c (revision 30903) @@ -60,12 +60,12 @@ return delta_x * delta_x + delta_y * delta_y; } -double pcb_get_value(const char *val, const char *units, pcb_bool * absolute, pcb_bool *success) +double pcb_get_value(const char *val, const char *units, rnd_bool * absolute, rnd_bool *success) { return pcb_get_value_ex(val, units, absolute, NULL, "cmil", success); } -pcb_bool pcb_get_value_unit(const char *val, pcb_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out) +rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out) { int ul, ulo = 0; const char *start; @@ -99,7 +99,7 @@ u = get_unit_struct_(unit, unit_strict); if (u != NULL) { - pcb_bool succ; + rnd_bool succ; double crd; crd = pcb_get_value(val, unit, NULL, &succ); @@ -118,12 +118,12 @@ } -double pcb_get_value_ex(const char *val, const char *units, pcb_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, pcb_bool *success) +double pcb_get_value_ex(const char *val, const char *units, rnd_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, rnd_bool *success) { double value; int n = -1; - pcb_bool scaled = 0; - pcb_bool dummy; + rnd_bool scaled = 0; + rnd_bool dummy; /* Allow NULL to be passed for absolute */ if (absolute == NULL) Index: trunk/src/librnd/core/misc_util.h =================================================================== --- trunk/src/librnd/core/misc_util.h (revision 30902) +++ trunk/src/librnd/core/misc_util.h (revision 30903) @@ -48,13 +48,13 @@ /* Convert string to coords; if units is not NULL, it's the caller supplied unit string; absolute is set to false if non-NULL and val starts with + or -. success indicates whether the conversion was successful. */ -double pcb_get_value(const char *val, const char *units, pcb_bool *absolute, pcb_bool *success); -double pcb_get_value_ex(const char *val, const char *units, pcb_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, pcb_bool *success); +double pcb_get_value(const char *val, const char *units, rnd_bool *absolute, rnd_bool *success); +double pcb_get_value_ex(const char *val, const char *units, rnd_bool * absolute, pcb_unit_list_t extra_units, const char *default_unit, rnd_bool *success); /* Convert a string of value+unit to coords and unit struct. Absolute is the same as above; if unit_strict is non-zero, require full unit name. Returns whether the conversion is succesful. */ -pcb_bool pcb_get_value_unit(const char *val, pcb_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out); +rnd_bool pcb_get_value_unit(const char *val, rnd_bool *absolute, int unit_strict, double *val_out, const pcb_unit_t **unit_out); char *pcb_concat(const char *first, ...); /* end with NULL */ int pcb_mem_any_set(unsigned char *ptr, int bytes); Index: trunk/src/librnd/core/paths.c =================================================================== --- trunk/src/librnd/core/paths.c (revision 30902) +++ trunk/src/librnd/core/paths.c (revision 30903) @@ -152,7 +152,7 @@ if ((*template == '~') && (flags & PCB_SUBST_HOME)) { if (pcbhl_conf.rc.path.home == NULL) { - pcb_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve home dir required for path %s\n", template); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $() conf var, name too long: %s\n", start); + rnd_message(PCB_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 = pcb_conf_get_field(path); if (cn == NULL) { if (!(flags & PCB_SUBST_QUIET)) - pcb_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: not found in the conf tree\n", path); + rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: not found in the conf tree\n", path); goto error; } if (cn->type != CFN_STRING) { if (!(flags & PCB_SUBST_QUIET)) - pcb_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: value type is not string\n", path); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_ERROR, "pcb_strdup_subst(): unterminated $(%s)\n", start); + rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): unterminated $(%s)\n", start); goto error; } break; Index: trunk/src/librnd/core/pcb-printf.c =================================================================== --- trunk/src/librnd/core/pcb-printf.c (revision 30902) +++ trunk/src/librnd/core/pcb-printf.c (revision 30903) @@ -141,7 +141,7 @@ * * return 0 on success, -1 on error */ -static int CoordsToString(gds_t *dest, pcb_coord_t coord[], int n_coords, const gds_t *printf_spec_, enum pcb_allow_e allow, +static int CoordsToString(gds_t *dest, rnd_coord_t coord[], int n_coords, const gds_t *printf_spec_, enum pcb_allow_e allow, enum pcb_suffix_e suffix_type) { char filemode_buff[128]; /* G_ASCII_DTOSTR_BUF_SIZE */ @@ -285,7 +285,7 @@ }; #define NUM_HUMAN_COORD (sizeof(human_coord) / sizeof(human_coord[0])) -static inline int try_human_coord(pcb_coord_t coord, const pcb_unit_t *unit, double down_limit, double up_limit, int score_factor, double *value, unsigned int *best, const char **suffix) +static inline int try_human_coord(rnd_coord_t coord, const pcb_unit_t *unit, double down_limit, double up_limit, int score_factor, double *value, unsigned int *best, const char **suffix) { double v, frac, save; long int digs, zeros; @@ -329,7 +329,7 @@ } /* Same as CoordsToString but take only one coord and print it in human readable format */ -static int CoordsToHumanString(gds_t *dest, pcb_coord_t coord, const gds_t *printf_spec_, enum pcb_suffix_e suffix_type) +static int CoordsToHumanString(gds_t *dest, rnd_coord_t coord, const gds_t *printf_spec_, enum pcb_suffix_e suffix_type) { char filemode_buff[128]; /* G_ASCII_DTOSTR_BUF_SIZE */ char printf_spec_new_local[256]; @@ -443,7 +443,7 @@ if (*fmt == '%') { const char *ext_unit = ""; - pcb_coord_t value[10]; + rnd_coord_t value[10]; int count, i; gds_truncate(&spec, 0); @@ -611,7 +611,7 @@ if (*fmt == '*') ext_unit = va_arg(args, const char *); if (*fmt != '+' && *fmt != 'a' && *fmt != 'A' && *fmt != 'f' && *fmt != 'q') - value[0] = va_arg(args, pcb_coord_t); + value[0] = va_arg(args, rnd_coord_t); count = 1; switch (*fmt) { case 'q': @@ -653,30 +653,30 @@ break; /* All these fallthroughs are deliberate */ case '9': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '8': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '7': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '6': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '5': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '4': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '3': - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); case '2': case 'D': if (safe & PCB_SAFEPRINT_COORD_ONLY) return -1; - value[count++] = va_arg(args, pcb_coord_t); + value[count++] = va_arg(args, rnd_coord_t); if (CoordsToString(string, value, count, &spec, mask & PCB_UNIT_ALLOW_ALL_SANE, suffix) != 0) goto err; break; case 'd': if (safe & PCB_SAFEPRINT_COORD_ONLY) return -1; - value[1] = va_arg(args, pcb_coord_t); + value[1] = va_arg(args, rnd_coord_t); if (CoordsToString(string, value, 2, &spec, PCB_UNIT_ALLOW_MM | PCB_UNIT_ALLOW_MIL, suffix) != 0) goto err; break; case '*': Index: trunk/src/librnd/core/pcb-printf.h =================================================================== --- trunk/src/librnd/core/pcb-printf.h (revision 30902) +++ trunk/src/librnd/core/pcb-printf.h (revision 30903) @@ -33,7 +33,7 @@ */ /* This file defines a wrapper around sprintf, that - * defines new specifiers that take pcb_coord_t objects + * defines new specifiers that take rnd_coord_t objects * as input. * * There is a fair bit of nasty (repetitious) code in Index: trunk/src/librnd/core/pcb_bool.h =================================================================== --- trunk/src/librnd/core/pcb_bool.h (revision 30902) +++ trunk/src/librnd/core/pcb_bool.h (revision 30903) @@ -27,7 +27,7 @@ #ifndef PCB_BOOL_H #define PCB_BOOL_H /* Because stdbool is not c89 */ -typedef int pcb_bool; +typedef int rnd_bool; typedef enum pcb_bool_e { pcb_false = 0, pcb_true = 1 @@ -43,7 +43,7 @@ PCB_BOOL_INVALID = -8 } pcb_bool_op_t; -/* changes the value of pcb_bool dst as requested by pcb_bool_op_t op +/* changes the value of rnd_bool dst as requested by pcb_bool_op_t op WARNING: evaluates dst multiple times */ #define pcb_bool_op(dst, op) \ do { \ Index: trunk/src/librnd/core/pixmap.c =================================================================== --- trunk/src/librnd/core/pixmap.c (revision 30902) +++ trunk/src/librnd/core/pixmap.c (revision 30903) @@ -135,7 +135,7 @@ { pcb_pixmap_import_t *i; for(i = pcb_pixmap_chain; i != NULL; i = i->next) - pcb_message(PCB_MSG_ERROR, "pcb_pixmap_chain is not empty: %s. Fix your plugins!\n", i->cookie); + rnd_message(PCB_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/rotate.h =================================================================== --- trunk/src/librnd/core/rotate.h (revision 30902) +++ trunk/src/librnd/core/rotate.h (revision 30903) @@ -36,7 +36,7 @@ /*** Transformation macros ***/ #define PCB_COORD_ROTATE90(x,y,x0,y0,n) \ do { \ - pcb_coord_t dx = (x)-(x0), \ + rnd_coord_t dx = (x)-(x0), \ dy = (y)-(y0); \ \ switch(n & 0x03) \ @@ -51,11 +51,11 @@ } \ } while(0) -PCB_INLINE void pcb_rotate(pcb_coord_t * x, pcb_coord_t * y, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina) +PCB_INLINE void pcb_rotate(rnd_coord_t * x, rnd_coord_t * y, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina) { double nx, ny; - pcb_coord_t px = *x - cx; - pcb_coord_t py = *y - cy; + rnd_coord_t px = *x - cx; + rnd_coord_t py = *y - cy; nx = pcb_round(px * cosa + py * sina + cx); ny = pcb_round(py * cosa - px * sina + cy); Index: trunk/src/librnd/core/safe_fs.c =================================================================== --- trunk/src/librnd/core/safe_fs.c (revision 30902) +++ trunk/src/librnd/core/safe_fs.c (revision 30903) @@ -57,7 +57,7 @@ #define CHECK(func, op, arg1, arg2, err_inst) \ do { \ if (pcb_safe_fs_check(op, arg1, arg2) != 0) { \ - pcb_message(PCB_MSG_ERROR, "File system operation %s(): access denied on %s(%s,%s)\n", func, op, arg1, arg2); \ + rnd_message(PCB_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 30902) +++ trunk/src/librnd/core/tool.c (revision 30903) @@ -38,7 +38,7 @@ #define PCB_MAX_MODESTACK_DEPTH 16 /* maximum depth of mode stack */ -pcb_bool pcb_tool_is_saved = pcb_false; +rnd_bool pcb_tool_is_saved = pcb_false; vtp0_t pcb_tools; @@ -61,7 +61,7 @@ { while(vtp0_len(&pcb_tools) != 0) { const pcb_tool_t *tool = pcb_tool_get(0); - pcb_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(PCB_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); @@ -121,7 +121,7 @@ int pcb_tool_select_by_id(rnd_hidlib_t *hidlib, pcb_toolid_t id) { char id_s[32]; - static pcb_bool recursing = pcb_false; + static rnd_bool recursing = pcb_false; int ok = 1; if ((id < 0) || (id > vtp0_len(&pcb_tools))) @@ -186,7 +186,7 @@ int pcb_tool_restore(rnd_hidlib_t *hidlib) { if (save_position == 0) { - pcb_message(PCB_MSG_ERROR, "hace: underflow of restore mode\n"); + rnd_message(PCB_MSG_ERROR, "hace: underflow of restore mode\n"); return -1; } return pcb_tool_select_by_id(hidlib, save_stack[--save_position]); @@ -250,12 +250,12 @@ wrap_void(draw_attached, (hl)); } -pcb_bool pcb_tool_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_undo_act(rnd_hidlib_t *hl) { wrap_retv(undo_act, return pcb_true, (hl)); } -pcb_bool pcb_tool_redo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_redo_act(rnd_hidlib_t *hl) { wrap_retv(redo_act, return pcb_true, (hl)); } @@ -351,7 +351,7 @@ } else { if (pcb_tool_select_by_name(RND_ACT_HIDLIB, cmd) != 0) - pcb_message(PCB_MSG_ERROR, "No such tool: '%s'\n", cmd); + rnd_message(PCB_MSG_ERROR, "No such tool: '%s'\n", cmd); } pcb_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); return 0; Index: trunk/src/librnd/core/tool.h =================================================================== --- trunk/src/librnd/core/tool.h (revision 30902) +++ trunk/src/librnd/core/tool.h (revision 30903) @@ -64,8 +64,8 @@ void (*release)(rnd_hidlib_t *hl); void (*adjust_attached)(rnd_hidlib_t *hl); void (*draw_attached)(rnd_hidlib_t *hl); - pcb_bool (*undo_act)(rnd_hidlib_t *hl); - pcb_bool (*redo_act)(rnd_hidlib_t *hl); + rnd_bool (*undo_act)(rnd_hidlib_t *hl); + rnd_bool (*redo_act)(rnd_hidlib_t *hl); void (*escape)(rnd_hidlib_t *hl); unsigned long user_flags; @@ -74,7 +74,7 @@ extern vtp0_t pcb_tools; extern pcb_toolid_t pcb_tool_prev_id; extern pcb_toolid_t pcb_tool_next_id; -extern pcb_bool pcb_tool_is_saved; +extern rnd_bool pcb_tool_is_saved; /* (un)initialize the tool subsystem */ void pcb_tool_init(void); @@ -112,8 +112,8 @@ void pcb_tool_release(rnd_hidlib_t *hidlib); void pcb_tool_adjust_attached(rnd_hidlib_t *hl); void pcb_tool_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_undo_act(rnd_hidlib_t *hl); -pcb_bool pcb_tool_redo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_redo_act(rnd_hidlib_t *hl); /* fake a click */ Index: trunk/src/librnd/core/unit.c =================================================================== --- trunk/src/librnd/core/unit.c (revision 30902) +++ trunk/src/librnd/core/unit.c (revision 30903) @@ -152,7 +152,7 @@ return num_base; } -double pcb_coord_to_unit(const pcb_unit_t *unit, pcb_coord_t x) +double pcb_coord_to_unit(const pcb_unit_t *unit, rnd_coord_t x) { double base; if (unit == NULL) @@ -165,7 +165,7 @@ return x * unit->scale_factor * base; } -pcb_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x) +rnd_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x) { double base, res; Index: trunk/src/librnd/core/unit.h =================================================================== --- trunk/src/librnd/core/unit.h (revision 30902) +++ trunk/src/librnd/core/unit.h (revision 30903) @@ -117,13 +117,13 @@ const pcb_unit_t *get_unit_by_suffix(const char *suffix); /* Convert x to the given unit */ -double pcb_coord_to_unit(const pcb_unit_t *unit, pcb_coord_t x); +double pcb_coord_to_unit(const pcb_unit_t *unit, rnd_coord_t x); /* Return how many PCB-internal-Coord-unit a unit translates to */ double pcb_unit_to_factor(const pcb_unit_t *unit); /* Convert a given unit to pcb coords; clamp at the end of the ranges */ -pcb_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x); +rnd_coord_t pcb_unit_to_coord(const pcb_unit_t *unit, double x); /* Bring an angle into [0, 360) range */ pcb_angle_t pcb_normalize_angle(pcb_angle_t a); @@ -145,7 +145,7 @@ #define PCB_SWAP_ANGLE(a) (-(a)) #define PCB_SWAP_DELTA(d) (-(d)) -PCB_INLINE pcb_coord_t pcb_coord_abs(pcb_coord_t c) +PCB_INLINE rnd_coord_t pcb_coord_abs(rnd_coord_t c) { if (c < 0) return -c; return c; Index: trunk/src/librnd/core/vtc0.h =================================================================== --- trunk/src/librnd/core/vtc0.h (revision 30902) +++ trunk/src/librnd/core/vtc0.h (revision 30903) @@ -6,7 +6,7 @@ #include #define GVT(x) vtc0_ ## x -#define GVT_ELEM_TYPE pcb_coord_t +#define GVT_ELEM_TYPE rnd_coord_t #define GVT_SIZE_TYPE size_t #define GVT_DOUBLING_THRS 4096 #define GVT_START_SIZE 32 Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30902) +++ trunk/src/librnd/pcb_compat.h (revision 30903) @@ -52,3 +52,6 @@ #define PCB_ACT_FAIL RND_ACT_FAIL #define pcb_fgw_types_e rnd_fgw_types_e #define pcb_hidlib_t rnd_hidlib_t +#define pcb_coord_t rnd_coord_t +#define pcb_bool rnd_bool +#define pcb_message rnd_message Index: trunk/src/librnd/poly/offset.c =================================================================== --- trunk/src/librnd/poly/offset.c (revision 30902) +++ trunk/src/librnd/poly/offset.c (revision 30903) @@ -38,7 +38,7 @@ static void pcbo_trace(char *fmt, ...) {} #endif -void pcb_polo_norm(double *nx, double *ny, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void pcb_polo_norm(double *nx, double *ny, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double dx = x2 - x1, dy = y2 - y1, len = sqrt(dx*dx + dy*dy); *nx = -dy / len; @@ -136,7 +136,7 @@ return a; } -void pcb_pline_dup_offsets(vtp0_t *dst, const pcb_pline_t *src, pcb_coord_t offs) +void pcb_pline_dup_offsets(vtp0_t *dst, const pcb_pline_t *src, rnd_coord_t offs) { const pcb_vnode_t *v; pcb_vector_t tmp; @@ -192,7 +192,7 @@ } } -pcb_pline_t *pcb_pline_dup_offset(const pcb_pline_t *src, pcb_coord_t offs) +pcb_pline_t *pcb_pline_dup_offset(const pcb_pline_t *src, rnd_coord_t offs) { vtp0_t selfi; pcb_pline_t *res = NULL; @@ -257,7 +257,7 @@ /* Modify v, pulling it back toward vp so that the distance to line ldx;ldy is increased by tune */ PCB_INLINE int pull_back(pcb_vnode_t *v, const pcb_vnode_t *vp, double tune, double ldx, double ldy, double prjx, double prjy, int inside) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; double c, vx, vy, vlen, prx, pry, prlen; vx = v->point[0] - vp->point[0]; @@ -285,8 +285,8 @@ c = tune * ((-pry * ldx + prx * ldy) / c); pcbo_trace(" vect: vp=%mm;%mm v=%mm;%mm\n", vp->point[0], vp->point[1], v->point[0], v->point[1]); - pcbo_trace(" vect: vx=%f;%f prx=%f;%f tune=%.012mm\n", vx, vy, prx, pry, (pcb_coord_t)tune); - pcbo_trace(" MOVE: c=%.012mm (%f) %mm;%mm\n", (pcb_coord_t)c, c, (pcb_coord_t)(v->point[0] + c * vx), (pcb_coord_t)(v->point[1] + c * vy)); + pcbo_trace(" vect: vx=%f;%f prx=%f;%f tune=%.012mm\n", vx, vy, prx, pry, (rnd_coord_t)tune); + pcbo_trace(" MOVE: c=%.012mm (%f) %mm;%mm\n", (rnd_coord_t)c, c, (rnd_coord_t)(v->point[0] + c * vx), (rnd_coord_t)(v->point[1] + c * vy)); if (c < 0) { v->point[0] = vp->point[0]; @@ -306,7 +306,7 @@ return 0; } -void pcb_pline_keepout_offs(pcb_pline_t *dst, const pcb_pline_t *src, pcb_coord_t offs) +void pcb_pline_keepout_offs(pcb_pline_t *dst, const pcb_pline_t *src, rnd_coord_t offs) { pcb_vnode_t *v; double offs2 = (double)offs * (double)offs; @@ -336,7 +336,7 @@ inside = pcb_poly_contour_inside(src, v->point); for(seg = pcb_rtree_first(&it, src->tree, &pb); seg != NULL; seg = pcb_rtree_next(&it)) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; double dist, tune, prjx, prjy, dx, dy, ax, ay, dotp, prevx, prevy, prevl; pcb_polyarea_get_tree_seg(seg, &x1, &y1, &x2, &y2); @@ -351,7 +351,7 @@ dotp = ax * dx + ay * dy; prjx = x1 + dx * dotp; prjy = y1 + dy * dotp; - pcbo_trace("dotp=%f dx=%f dy=%f res: %mm %mm inside=%d\n", dotp, dx, dy, (pcb_coord_t)prjx, (pcb_coord_t)prjy, inside); + pcbo_trace("dotp=%f dx=%f dy=%f res: %mm %mm inside=%d\n", dotp, dx, dy, (rnd_coord_t)prjx, (rnd_coord_t)prjy, inside); /* this is how much the point needs to be moved away from the line */ if (inside) @@ -361,8 +361,8 @@ if (tune < 5) continue; - pcbo_trace("close: %mm;%mm to %mm;%mm %mm;%mm: tune=%.012mm prj: %mm;%mm\n", v->point[0], v->point[1], x1, y1, x2, y2, (pcb_coord_t)tune, (pcb_coord_t)prjx, (pcb_coord_t)prjy); - pcbo_trace(" tune=%.012mm dist=%.012mm\n", (pcb_coord_t)tune, (pcb_coord_t)sqrt(dist)); + pcbo_trace("close: %mm;%mm to %mm;%mm %mm;%mm: tune=%.012mm prj: %mm;%mm\n", v->point[0], v->point[1], x1, y1, x2, y2, (rnd_coord_t)tune, (rnd_coord_t)prjx, (rnd_coord_t)prjy); + pcbo_trace(" tune=%.012mm dist=%.012mm\n", (rnd_coord_t)tune, (rnd_coord_t)sqrt(dist)); /* corner case: if next segment is parallel to what we are compesing to Index: trunk/src/librnd/poly/offset.h =================================================================== --- trunk/src/librnd/poly/offset.h (revision 30902) +++ trunk/src/librnd/poly/offset.h (revision 30903) @@ -31,10 +31,10 @@ /* Calculate the offset plines of src and append the resulting plines to dst. Yields multiple islands in some corner cases. */ -void pcb_pline_dup_offsets(vtp0_t *dst, const pcb_pline_t *src, pcb_coord_t offs); +void pcb_pline_dup_offsets(vtp0_t *dst, const pcb_pline_t *src, rnd_coord_t offs); /* Same, but returns the largest island only */ -pcb_pline_t *pcb_pline_dup_offset(const pcb_pline_t *src, pcb_coord_t offs); +pcb_pline_t *pcb_pline_dup_offset(const pcb_pline_t *src, rnd_coord_t offs); /* low level */ @@ -53,7 +53,7 @@ void pcb_polo_offs(double offs, pcb_polo_t *pcsh, long num_pts); /* modify dst so it is at least offs far from any point or line of src */ -void pcb_pline_keepout_offs(pcb_pline_t *dst, const pcb_pline_t *src, pcb_coord_t offs); +void pcb_pline_keepout_offs(pcb_pline_t *dst, const pcb_pline_t *src, rnd_coord_t offs); /* Orhto-shift an edge specified by x0;y0 and x1;y1. Calculate the new edge points by extending/shrinking the previous and next line segment. Index: trunk/src/librnd/poly/polyarea.c =================================================================== --- trunk/src/librnd/poly/polyarea.c (revision 30902) +++ trunk/src/librnd/poly/polyarea.c (revision 30903) @@ -602,7 +602,7 @@ i->s->p->Flags.status = ISECTED; s->p->Flags.status = ISECTED; for (; cnt; cnt--) { - pcb_bool done_insert_on_i = pcb_false; + rnd_bool done_insert_on_i = pcb_false; new_node = node_add_single_point(i->v, cnt > 1 ? s2 : s1); if (new_node != NULL) { #ifdef DEBUG_INTERSECT @@ -906,7 +906,7 @@ /* cntr_in_M_pcb_polyarea_t returns poly is inside outfst ? pcb_true : pcb_false */ -static int cntr_in_M_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * outfst, pcb_bool test) +static int cntr_in_M_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * outfst, rnd_bool test) { pcb_polyarea_t *outer = outfst; pcb_heap_t *heap; @@ -995,7 +995,7 @@ (C) 1997 Alexey Nikitin, Michael Leonov */ -static pcb_bool label_contour(pcb_pline_t * a) +static rnd_bool label_contour(pcb_pline_t * a) { pcb_vnode_t *cur = a->head; pcb_vnode_t *first_labelled = NULL; @@ -1024,11 +1024,11 @@ return pcb_false; } /* label_contour */ -static pcb_bool cntr_label_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * ppl, pcb_bool test) +static rnd_bool cntr_label_pcb_polyarea_t(pcb_pline_t * poly, pcb_polyarea_t * ppl, rnd_bool test) { assert(ppl != NULL && ppl->contours != NULL); if (poly->Flags.status == ISECTED) { - label_contour(poly); /* should never get here when pcb_bool is pcb_true */ + label_contour(poly); /* should never get here when rnd_bool is pcb_true */ } else if (cntr_in_M_pcb_polyarea_t(poly, ppl, test)) { if (test) @@ -1043,7 +1043,7 @@ return pcb_false; } /* cntr_label_pcb_polyarea_t */ -static pcb_bool M_pcb_polyarea_t_label_separated(pcb_pline_t * afst, pcb_polyarea_t * b, pcb_bool touch) +static rnd_bool M_pcb_polyarea_t_label_separated(pcb_pline_t * afst, pcb_polyarea_t * b, rnd_bool touch) { pcb_pline_t *curc = afst; @@ -1054,7 +1054,7 @@ return pcb_false; } -static pcb_bool M_pcb_polyarea_t_label(pcb_polyarea_t * afst, pcb_polyarea_t * b, pcb_bool touch) +static rnd_bool M_pcb_polyarea_t_label(pcb_polyarea_t * afst, pcb_polyarea_t * b, rnd_bool touch) { pcb_polyarea_t *a = afst; pcb_pline_t *curc; @@ -1978,7 +1978,7 @@ } static void -M_pcb_polyarea_t_Collect_separated(jmp_buf * e, pcb_pline_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, pcb_bool maybe) +M_pcb_polyarea_t_Collect_separated(jmp_buf * e, pcb_pline_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) { pcb_pline_t **cur, **next; @@ -1990,7 +1990,7 @@ } } -static void M_pcb_polyarea_t_Collect(jmp_buf * e, pcb_polyarea_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, pcb_bool maybe) +static void M_pcb_polyarea_t_Collect(jmp_buf * e, pcb_polyarea_t * afst, pcb_polyarea_t ** contours, pcb_pline_t ** holes, int action, rnd_bool maybe) { pcb_polyarea_t *a = afst; pcb_polyarea_t *parent = NULL; /* Quiet compiler warning */ @@ -2031,7 +2031,7 @@ } /* determine if two polygons touch or overlap */ -pcb_bool pcb_polyarea_touching(pcb_polyarea_t * a, pcb_polyarea_t * b) +rnd_bool pcb_polyarea_touching(pcb_polyarea_t * a, pcb_polyarea_t * b) { jmp_buf e; int code; @@ -2238,7 +2238,7 @@ pcb_vnode_t *pcb_poly_node_create(pcb_vector_t v) { pcb_vnode_t *res; - pcb_coord_t *c; + rnd_coord_t *c; assert(v); res = (pcb_vnode_t *) calloc(1, sizeof(pcb_vnode_t)); @@ -2329,7 +2329,7 @@ free(*c), *c = NULL; } -void pcb_poly_contour_pre(pcb_pline_t * C, pcb_bool optimize) +void pcb_poly_contour_pre(pcb_pline_t * C, rnd_bool optimize) { double area = 0; pcb_vnode_t *p, *c; @@ -2459,7 +2459,7 @@ } } -pcb_bool pcb_poly_contour_copy(pcb_pline_t **dst, const pcb_pline_t *src) +rnd_bool pcb_poly_contour_copy(pcb_pline_t **dst, const pcb_pline_t *src) { pcb_vnode_t *cur, *newnode; @@ -2488,7 +2488,7 @@ /**********************************************************************/ /* polygon routines */ -pcb_bool pcb_polyarea_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * src) +rnd_bool pcb_polyarea_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * src) { *dst = NULL; if (src != NULL) @@ -2500,7 +2500,7 @@ return pcb_polyarea_copy1(*dst, src); } -pcb_bool pcb_polyarea_copy1(pcb_polyarea_t * dst, const pcb_polyarea_t * src) +rnd_bool pcb_polyarea_copy1(pcb_polyarea_t * dst, const pcb_polyarea_t * src) { pcb_pline_t *cur, **last = &dst->contours; @@ -2527,7 +2527,7 @@ } } -pcb_bool pcb_polyarea_m_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * srcfst) +rnd_bool pcb_polyarea_m_copy0(pcb_polyarea_t ** dst, const pcb_polyarea_t * srcfst) { const pcb_polyarea_t *src = srcfst; pcb_polyarea_t *di; @@ -2544,7 +2544,7 @@ return pcb_true; } -pcb_bool pcb_polyarea_contour_include(pcb_polyarea_t * p, pcb_pline_t * c) +rnd_bool pcb_polyarea_contour_include(pcb_polyarea_t * p, pcb_pline_t * c) { pcb_pline_t *tmp; @@ -2629,7 +2629,7 @@ return info.f; } -pcb_bool pcb_polyarea_contour_inside(pcb_polyarea_t * p, pcb_vector_t v0) +rnd_bool pcb_polyarea_contour_inside(pcb_polyarea_t * p, pcb_vector_t v0) { pcb_pline_t *cur; @@ -2645,7 +2645,7 @@ return pcb_false; } -pcb_bool poly_M_CheckInside(pcb_polyarea_t * p, pcb_vector_t v0) +rnd_bool poly_M_CheckInside(pcb_polyarea_t * p, pcb_vector_t v0) { pcb_polyarea_t *cur; @@ -2862,7 +2862,7 @@ free(*p), *p = NULL; } -static pcb_bool inside_sector(pcb_vnode_t * pn, pcb_vector_t p2) +static rnd_bool inside_sector(pcb_vnode_t * pn, pcb_vector_t p2) { pcb_vector_t cdir, ndir, pdir; int p_c, n_c, p_n; @@ -2886,8 +2886,8 @@ typedef struct { int marks, lines; #ifndef NDEBUG - pcb_coord_t x[8], y[8]; - pcb_coord_t x1[8], y1[8], x2[8], y2[8]; + rnd_coord_t x[8], y[8]; + rnd_coord_t x1[8], y1[8], x2[8], y2[8]; char msg[256]; #endif } pa_chk_res_t; @@ -2918,7 +2918,7 @@ #endif -PCB_INLINE pcb_bool PA_CHK_ERROR(pa_chk_res_t *res, const char *fmt, ...) +PCB_INLINE rnd_bool PA_CHK_ERROR(pa_chk_res_t *res, const char *fmt, ...) { #ifndef NDEBUG va_list ap; @@ -2929,7 +2929,7 @@ return pcb_true; } -pcb_bool pcb_polyarea_contour_check_(pcb_pline_t *a, pa_chk_res_t *res) +rnd_bool pcb_polyarea_contour_check_(pcb_pline_t *a, pa_chk_res_t *res) { pcb_vnode_t *a1, *a2, *hit1, *hit2; pcb_vector_t i1, i2; @@ -3009,7 +3009,7 @@ return pcb_false; } -pcb_bool pcb_polyarea_contour_check(pcb_pline_t *a) +rnd_bool pcb_polyarea_contour_check(pcb_pline_t *a) { pa_chk_res_t res; return pcb_polyarea_contour_check_(a, &res); @@ -3042,7 +3042,7 @@ static void pcb_poly_valid_report(pcb_pline_t *c, pcb_vnode_t *pl, pa_chk_res_t *chk) { pcb_vnode_t *v, *n; - pcb_coord_t minx = COORD_MAX, miny = COORD_MAX, maxx = -COORD_MAX, maxy = -COORD_MAX; + rnd_coord_t minx = COORD_MAX, miny = COORD_MAX, maxx = -COORD_MAX, maxy = -COORD_MAX; #define update_minmax(min, max, val) \ if (val < min) min = val; \ @@ -3093,7 +3093,7 @@ #endif -pcb_bool pcb_poly_valid(pcb_polyarea_t * p) +rnd_bool pcb_poly_valid(pcb_polyarea_t * p) { pcb_pline_t *c; pa_chk_res_t chk; @@ -3360,7 +3360,7 @@ typedef struct { pcb_vector_t l1, l2; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; } pline_isect_line_t; static pcb_r_dir_t pline_isect_line_cb(const pcb_box_t * b, void *cl) @@ -3378,7 +3378,7 @@ return PCB_R_DIR_NOT_FOUND; } -pcb_bool pcb_pline_isect_line(pcb_pline_t *pl, pcb_coord_t lx1, pcb_coord_t ly1, pcb_coord_t lx2, pcb_coord_t ly2, pcb_coord_t *cx, pcb_coord_t *cy) +rnd_bool pcb_pline_isect_line(pcb_pline_t *pl, rnd_coord_t lx1, rnd_coord_t ly1, rnd_coord_t lx2, rnd_coord_t ly2, rnd_coord_t *cx, rnd_coord_t *cy) { pline_isect_line_t ctx; pcb_box_t lbx; @@ -3406,7 +3406,7 @@ */ typedef struct { - pcb_coord_t cx, cy, r; + rnd_coord_t cx, cy, r; double r2; } pline_isect_circ_t; @@ -3439,7 +3439,7 @@ return PCB_R_DIR_NOT_FOUND; } -pcb_bool pcb_pline_isect_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r) +rnd_bool pcb_pline_isect_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { pline_isect_circ_t ctx; pcb_box_t cbx; @@ -3471,7 +3471,7 @@ return PCB_R_DIR_NOT_FOUND; } -pcb_bool pcb_pline_embraces_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r) +rnd_bool pcb_pline_embraces_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { pcb_box_t bx; int cnt; @@ -3503,7 +3503,7 @@ * pcb_pline_isect_circle() * (C) 2017 Tibor 'Igor2' Palinkas */ -pcb_bool pcb_pline_overlaps_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r) +rnd_bool pcb_pline_overlaps_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { pcb_box_t cbx, pbx; cbx.X1 = cx - r; cbx.Y1 = cy - r; @@ -3539,7 +3539,7 @@ * pcb_polyarea_move() * (C) 2017 Tibor 'Igor2' Palinkas */ -void pcb_polyarea_move(pcb_polyarea_t *pa1, pcb_coord_t dx, pcb_coord_t dy) +void pcb_polyarea_move(pcb_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy) { int cnt; pcb_polyarea_t *pa; @@ -3581,7 +3581,7 @@ } } -void pcb_polyarea_get_tree_seg(void *obj, pcb_coord_t *x1, pcb_coord_t *y1, pcb_coord_t *x2, pcb_coord_t *y2) +void pcb_polyarea_get_tree_seg(void *obj, rnd_coord_t *x1, rnd_coord_t *y1, rnd_coord_t *x2, rnd_coord_t *y2) { struct seg *s = obj; *x1 = s->v->point[0]; Index: trunk/src/librnd/poly/polyarea.h =================================================================== --- trunk/src/librnd/poly/polyarea.h (revision 30902) +++ trunk/src/librnd/poly/polyarea.h (revision 30903) @@ -29,7 +29,7 @@ #define PCB_PLF_INV 0 #define PCB_PLF_MARK 1 -typedef pcb_coord_t pcb_vertex_t[2]; /* longing point representation of coordinates */ +typedef rnd_coord_t pcb_vertex_t[2]; /* longing point representation of coordinates */ typedef pcb_vertex_t pcb_vector_t; #define pcb_vertex_equ(a,b) (memcmp((a),(b),sizeof(pcb_vector_t))==0) @@ -67,15 +67,15 @@ typedef struct pcb_pline_s pcb_pline_t; struct pcb_pline_s { - pcb_coord_t xmin, ymin, xmax, ymax; + rnd_coord_t xmin, ymin, xmax, ymax; pcb_pline_t *next; pcb_vnode_t *head; unsigned int Count; double area; pcb_rtree_t *tree; - pcb_bool is_round; - pcb_coord_t cx, cy; - pcb_coord_t radius; + rnd_bool is_round; + rnd_coord_t cx, cy; + rnd_coord_t radius; struct { unsigned int status:3; unsigned int orient:1; @@ -88,9 +88,9 @@ void pcb_poly_contour_clear(pcb_pline_t *c); /* clears list of vertices */ void pcb_poly_contour_del(pcb_pline_t **c); -pcb_bool pcb_poly_contour_copy(pcb_pline_t **dst, const pcb_pline_t *src); +rnd_bool pcb_poly_contour_copy(pcb_pline_t **dst, const pcb_pline_t *src); -void pcb_poly_contour_pre(pcb_pline_t *c, pcb_bool optimize); /* prepare contour */ +void pcb_poly_contour_pre(pcb_pline_t *c, rnd_bool optimize); /* prepare contour */ void pcb_poly_contour_inv(pcb_pline_t *c); /* invert contour */ pcb_vnode_t *pcb_poly_node_create(pcb_vector_t v); @@ -109,20 +109,20 @@ pcb_rtree_t *contour_tree; }; -pcb_bool pcb_polyarea_m_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *srcfst); +rnd_bool pcb_polyarea_m_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *srcfst); void pcb_polyarea_m_include(pcb_polyarea_t **list, pcb_polyarea_t *a); -pcb_bool pcb_polyarea_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *src); -pcb_bool pcb_polyarea_copy1(pcb_polyarea_t *dst, const pcb_polyarea_t *src); +rnd_bool pcb_polyarea_copy0(pcb_polyarea_t **dst, const pcb_polyarea_t *src); +rnd_bool pcb_polyarea_copy1(pcb_polyarea_t *dst, const pcb_polyarea_t *src); -pcb_bool pcb_polyarea_contour_include(pcb_polyarea_t *p, pcb_pline_t *c); -pcb_bool pcb_polyarea_contour_exclude(pcb_polyarea_t *p, pcb_pline_t *c); +rnd_bool pcb_polyarea_contour_include(pcb_polyarea_t *p, pcb_pline_t *c); +rnd_bool pcb_polyarea_contour_exclude(pcb_polyarea_t *p, pcb_pline_t *c); -pcb_bool pcb_polyarea_contour_check(pcb_pline_t *a); +rnd_bool pcb_polyarea_contour_check(pcb_pline_t *a); -pcb_bool pcb_polyarea_contour_inside(pcb_polyarea_t *c, pcb_vector_t v0); -pcb_bool pcb_polyarea_touching(pcb_polyarea_t *p1, pcb_polyarea_t *p2); +rnd_bool pcb_polyarea_contour_inside(pcb_polyarea_t *c, pcb_vector_t v0); +rnd_bool pcb_polyarea_touching(pcb_polyarea_t *p1, pcb_polyarea_t *p2); /*** tools for clipping ***/ @@ -135,7 +135,7 @@ void pcb_polyarea_free(pcb_polyarea_t **p); void pcb_polyarea_init(pcb_polyarea_t *p); void pcb_poly_contours_free(pcb_pline_t **pl); -pcb_bool pcb_poly_valid(pcb_polyarea_t *p); +rnd_bool pcb_poly_valid(pcb_polyarea_t *p); enum pcb_poly_bool_op_e { PCB_PBO_UNITE, @@ -159,7 +159,7 @@ void pcb_polyarea_bbox(pcb_polyarea_t *p, pcb_box_t *b); /* Move each point of pa1 by dx and dy */ -void pcb_polyarea_move(pcb_polyarea_t *pa1, pcb_coord_t dx, pcb_coord_t dy); +void pcb_polyarea_move(pcb_polyarea_t *pa1, rnd_coord_t dx, rnd_coord_t dy); /*** Tools for building polygons for common object shapes ***/ @@ -170,7 +170,7 @@ double pcb_round(double x); /* from math_helper.h */ /* Calculate an endpoint of an arc and return the result in *x;*y */ -PCB_INLINE void pcb_arc_get_endpt(pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, int which, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE void pcb_arc_get_endpt(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, int which, rnd_coord_t *x, rnd_coord_t *y) { if (which == 0) { *x = pcb_round((double)cx - (double)width * cos(astart * (M_PI/180.0))); @@ -197,7 +197,7 @@ /*** special purpose, internal tools ***/ /* Convert a struct seg *obj extracted from a pline->tree into coords */ -void pcb_polyarea_get_tree_seg(void *obj, pcb_coord_t *x1, pcb_coord_t *y1, pcb_coord_t *x2, pcb_coord_t *y2); +void pcb_polyarea_get_tree_seg(void *obj, rnd_coord_t *x1, rnd_coord_t *y1, rnd_coord_t *x2, rnd_coord_t *y2); /* create a (pcb_rtree_t *) of each seg derived from src */ void *pcb_poly_make_edge_tree(pcb_pline_t *src); Index: trunk/src/librnd/poly/polygon1_gen.c =================================================================== --- trunk/src/librnd/poly/polygon1_gen.c (revision 30902) +++ trunk/src/librnd/poly/polygon1_gen.c (revision 30903) @@ -86,7 +86,7 @@ #define ARC_ANGLE 5 -static pcb_polyarea_t *ArcPolyNoIntersect(pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, pcb_coord_t thick, int end_caps) +static pcb_polyarea_t *ArcPolyNoIntersect(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick, int end_caps) { pcb_pline_t *contour = NULL; pcb_polyarea_t *np = NULL; @@ -95,7 +95,7 @@ double ang, da, rx, ry; long half; double radius_adj; - pcb_coord_t edx, edy, endx1, endx2, endy1, endy2; + rnd_coord_t edx, edy, endx1, endx2, endy1, endy2; if (thick <= 0) return NULL; @@ -172,7 +172,7 @@ return np; } -pcb_polyarea_t *pcb_poly_from_rect(pcb_coord_t x1, pcb_coord_t x2, pcb_coord_t y1, pcb_coord_t y2) +pcb_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -197,7 +197,7 @@ return pcb_poly_from_contour(contour); } -pcb_polyarea_t *pcb_poly_from_octagon(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, int style) +pcb_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -242,7 +242,7 @@ return pcb_poly_from_contour(contour); } -static void pcb_poly_frac_circle_(pcb_pline_t * c, pcb_coord_t X, pcb_coord_t Y, pcb_vector_t v, int range, int add_last) +static void pcb_poly_frac_circle_(pcb_pline_t * c, rnd_coord_t X, rnd_coord_t Y, pcb_vector_t v, int range, int add_last) { double oe1, oe2, e1, e2, t1; int i, orange = range; @@ -285,13 +285,13 @@ * 2 for a half circle * or 4 for a quarter circle */ -void pcb_poly_frac_circle(pcb_pline_t * c, pcb_coord_t X, pcb_coord_t Y, pcb_vector_t v, int range) +void pcb_poly_frac_circle(pcb_pline_t * c, rnd_coord_t X, rnd_coord_t Y, pcb_vector_t v, int range) { pcb_poly_frac_circle_(c, X, Y, v, range, 0); } /* same but adds the last vertex */ -void pcb_poly_frac_circle_end(pcb_pline_t * c, pcb_coord_t X, pcb_coord_t Y, pcb_vector_t v, int range) +void pcb_poly_frac_circle_end(pcb_pline_t * c, rnd_coord_t X, rnd_coord_t Y, pcb_vector_t v, int range) { pcb_poly_frac_circle_(c, X, Y, v, range, 1); } @@ -298,7 +298,7 @@ /* create a circle approximation from lines */ -pcb_polyarea_t *pcb_poly_from_circle(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius) +pcb_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius) { pcb_pline_t *contour; pcb_vector_t v; @@ -318,7 +318,7 @@ } /* make a rounded-corner rectangle with radius t beyond x1,x2,y1,y2 rectangle */ -pcb_polyarea_t *RoundRect(pcb_coord_t x1, pcb_coord_t x2, pcb_coord_t y1, pcb_coord_t y2, pcb_coord_t t) +pcb_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t) { pcb_pline_t *contour = NULL; pcb_vector_t v; @@ -346,7 +346,7 @@ } -pcb_polyarea_t *pcb_poly_from_line(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick, pcb_bool square) +pcb_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square) { pcb_pline_t *contour = NULL; pcb_polyarea_t *np = NULL; @@ -402,10 +402,10 @@ } #define MIN_CLEARANCE_BEFORE_BISECT 10. -pcb_polyarea_t *pcb_poly_from_arc(pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, pcb_coord_t thick) +pcb_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick) { double delta; - pcb_coord_t half; + rnd_coord_t half; delta = (adelta < 0) ? -adelta : adelta; @@ -414,7 +414,7 @@ /* corner case: can't even calculate the end cap properly because radius is so small that there's no inner arc of the clearance */ if ((width - half <= 0) || (height - half <= 0)) { - pcb_coord_t lx1, ly1; + rnd_coord_t lx1, ly1; pcb_polyarea_t *tmp_arc, *tmp1, *tmp2, *res, *ends; tmp_arc = ArcPolyNoIntersect(cx, cy, width, height, astart, adelta, thick, 0); @@ -515,7 +515,7 @@ } } -void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, pcb_coord_t clipX1, pcb_coord_t clipY1, pcb_coord_t clipX2, pcb_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data) +void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data) { pcb_polyarea_t *cur, *next; Index: trunk/src/librnd/poly/polygon1_gen.h =================================================================== --- trunk/src/librnd/poly/polygon1_gen.h (revision 30902) +++ trunk/src/librnd/poly/polygon1_gen.h (revision 30903) @@ -9,22 +9,22 @@ pcb_polyarea_t *pcb_poly_from_contour(pcb_pline_t *pl); pcb_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *pl); -pcb_polyarea_t *pcb_poly_from_circle(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius); -pcb_polyarea_t *pcb_poly_from_octagon(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, int style); -pcb_polyarea_t *pcb_poly_from_rect(pcb_coord_t x1, pcb_coord_t x2, pcb_coord_t y1, pcb_coord_t y2); -pcb_polyarea_t *RoundRect(pcb_coord_t x1, pcb_coord_t x2, pcb_coord_t y1, pcb_coord_t y2, pcb_coord_t t); +pcb_polyarea_t *pcb_poly_from_circle(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius); +pcb_polyarea_t *pcb_poly_from_octagon(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, int style); +pcb_polyarea_t *pcb_poly_from_rect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2); +pcb_polyarea_t *RoundRect(rnd_coord_t x1, rnd_coord_t x2, rnd_coord_t y1, rnd_coord_t y2, rnd_coord_t t); /* generate a polygon of a round or square cap line of a given thickness */ -pcb_polyarea_t *pcb_poly_from_line(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick, pcb_bool square); +pcb_polyarea_t *pcb_poly_from_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, rnd_bool square); /* generate a polygon of a round cap arc of a given thickness */ -pcb_polyarea_t *pcb_poly_from_arc(pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, pcb_coord_t thick); +pcb_polyarea_t *pcb_poly_from_arc(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t astart, pcb_angle_t adelta, rnd_coord_t thick); /* Slice up a polyarea-with-holes into a set of polygon islands with no holes, within the clip area. If the clip area is all-zero, do not clip. Free's main_contour. */ -void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, pcb_coord_t clipX1, pcb_coord_t clipY1, pcb_coord_t clipX2, pcb_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data); +void pcb_polyarea_no_holes_dicer(pcb_polyarea_t *main_contour, rnd_coord_t clipX1, rnd_coord_t clipY1, rnd_coord_t clipX2, rnd_coord_t clipY2, void (*emit)(pcb_pline_t *, void *), void *user_data); /* Add vertices in a fractional-circle starting from v centered at X, Y and going counter-clockwise. Does not include the first point. Last argument is: @@ -31,9 +31,9 @@ 1 for a full circle 2 for a half circle 4 for a quarter circle */ -void pcb_poly_frac_circle(pcb_pline_t * c, pcb_coord_t X, pcb_coord_t Y, pcb_vector_t v, int range); +void pcb_poly_frac_circle(pcb_pline_t * c, rnd_coord_t X, rnd_coord_t Y, pcb_vector_t v, int range); /* same but adds the last vertex */ -void pcb_poly_frac_circle_end(pcb_pline_t * c, pcb_coord_t X, pcb_coord_t Y, pcb_vector_t v, int range); +void pcb_poly_frac_circle_end(pcb_pline_t * c, rnd_coord_t X, rnd_coord_t Y, pcb_vector_t v, int range); #endif Index: trunk/src/librnd/poly/rtree.c =================================================================== --- trunk/src/librnd/poly/rtree.c (revision 30902) +++ trunk/src/librnd/poly/rtree.c (revision 30903) @@ -73,13 +73,13 @@ pcb_r_insert_entry(rtree, boxlist[n]); } -pcb_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const pcb_box_t *which) +rnd_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const pcb_box_t *which) { assert(which != NULL); return pcb_rtree_delete(rtree, (void *)which, (pcb_rtree_box_t *)which) == 0; /* assumes first field is the bounding box */ } -pcb_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, pcb_box_t *box, void (*free_data)(void *d)) +rnd_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, pcb_box_t *box, void (*free_data)(void *d)) { void *obj = box; /* assumes first field is the bounding box */ assert(obj != NULL); Index: trunk/src/librnd/poly/rtree.h =================================================================== --- trunk/src/librnd/poly/rtree.h (revision 30902) +++ trunk/src/librnd/poly/rtree.h (revision 30903) @@ -30,7 +30,7 @@ #include typedef long int pcb_rtree_cardinal_t; -typedef pcb_coord_t pcb_rtree_coord_t; +typedef rnd_coord_t pcb_rtree_coord_t; /* Instantiate an rtree */ #define RTR(n) pcb_rtree_ ## n Index: trunk/src/librnd/poly/rtree2_compat.h =================================================================== --- trunk/src/librnd/poly/rtree2_compat.h (revision 30902) +++ trunk/src/librnd/poly/rtree2_compat.h (revision 30903) @@ -57,8 +57,8 @@ void pcb_r_insert_entry(pcb_rtree_t *rtree, const pcb_box_t *which); void pcb_r_insert_array(pcb_rtree_t *rtree, const pcb_box_t *boxlist[], pcb_cardinal_t len); -pcb_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const pcb_box_t *which); -pcb_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, pcb_box_t *box, void (*free_data)(void *d)); +rnd_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const pcb_box_t *which); +rnd_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, pcb_box_t *box, void (*free_data)(void *d)); /* generic search routine */ /* region_in_search should return pcb_true if "what you're looking for" is Index: trunk/src/librnd/poly/self_isc.c =================================================================== --- trunk/src/librnd/poly/self_isc.c (revision 30902) +++ trunk/src/librnd/poly/self_isc.c (revision 30903) @@ -75,7 +75,7 @@ return NULL; } -static vhub_t *hub_find(vtp0_t *hubs, pcb_vnode_t *v, pcb_bool insert) +static vhub_t *hub_find(vtp0_t *hubs, pcb_vnode_t *v, rnd_bool insert) { int n, m; @@ -211,7 +211,7 @@ return pline_split_off_loop_new(pl, out, h, start, cnt); } -pcb_bool pcb_pline_is_selfint(pcb_pline_t *pl) +rnd_bool pcb_pline_is_selfint(pcb_pline_t *pl) { pcb_vnode_t *va, *vb; Index: trunk/src/librnd/poly/self_isc.h =================================================================== --- trunk/src/librnd/poly/self_isc.h (revision 30902) +++ trunk/src/librnd/poly/self_isc.h (revision 30903) @@ -30,7 +30,7 @@ #include /* Returns whether a polyline is self-intersecting. O(n^2) */ -pcb_bool pcb_pline_is_selfint(pcb_pline_t *pl); +rnd_bool pcb_pline_is_selfint(pcb_pline_t *pl); /* Assume pl is self-intersecting split it up into a list of freshly allocated plines in out. O(n^2) */ Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 30902) +++ trunk/src/main.c (revision 30903) @@ -255,10 +255,10 @@ static const char *plugin_name = "dialogs"; int state = 0; loaded = 1; - pcb_message(PCB_MSG_DEBUG, "Loading GUI support plugin: '%s'\n", plugin_name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Error: failed to load GUI support plugin '%s'\n-> expect missing widgets and dialog boxes\n", plugin_name); + rnd_message(PCB_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); @@ -386,7 +386,7 @@ void print_pup_err(pup_err_stack_t *entry, char *string) { - pcb_message(PCB_MSG_ERROR, "puplug: %s\n", string); + rnd_message(PCB_MSG_ERROR, "puplug: %s\n", string); } #include "funchash_core.h" @@ -463,16 +463,16 @@ pcb_text_init(); if (pcb_pup.err_stack != NULL) { - pcb_message(PCB_MSG_ERROR, "Some of the static linked buildins could not be loaded:\n"); + rnd_message(PCB_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++) { - pcb_message(PCB_MSG_DEBUG, "Loading plugins from '%s'\n", *sp); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Some of the dynamic linked plugins could not be loaded:\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't create an empty layout, exiting\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_pcb); + rnd_message(PCB_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]) - pcb_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(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"); /* 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) { - pcb_message(PCB_MSG_INFO, "Executing startup script file %s\n", conf_core.rc.script_filename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_INFO, "Executing startup action %s\n", conf_core.rc.action_string); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); - pcb_message(PCB_MSG_ERROR, "This revision of pcb-rnd is experimental, unstable, do NOT attempt to use\n"); - pcb_message(PCB_MSG_ERROR, "it for production. The reason for this state is:\n"); - pcb_message(PCB_MSG_ERROR, "%s\n", EXPERIMENTAL); - pcb_message(PCB_MSG_ERROR, "******************************** IMPORTANT ********************************\n"); + 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"); } pcb_tool_select_by_name(&PCB->hidlib, "arrow"); pcb_event(&PCB->hidlib, PCB_EVENT_LIBRARY_CHANGED, NULL); Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 30902) +++ trunk/src/move.c (revision 30903) @@ -136,7 +136,7 @@ }; -void *pcb_move_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY) +void *pcb_move_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY) { void *result; pcb_opctx_t ctx; @@ -149,7 +149,7 @@ return result; } -void *pcb_move_obj_and_rubberband(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY) +void *pcb_move_obj_and_rubberband(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY) { pcb_opctx_t ctx; void *ptr2; @@ -169,8 +169,8 @@ { /* Get the initial arc point positions */ pcb_arc_t * p_arc = ((pcb_arc_t *)pcb_crosshair.AttachedObject.Ptr2); - pcb_coord_t ox1,ox2,oy1,oy2; - pcb_coord_t nx1,nx2,ny1,ny2; + rnd_coord_t ox1,ox2,oy1,oy2; + rnd_coord_t nx1,nx2,ny1,ny2; pcb_arc_get_end(p_arc,0, &ox1, &oy1); pcb_arc_get_end(p_arc,1, &ox2, &oy2); @@ -207,10 +207,10 @@ case PCB_OBJ_LINE: { - pcb_coord_t dx1 = DX; - pcb_coord_t dy1 = DY; - pcb_coord_t dx2 = DX; - pcb_coord_t dy2 = DY; + rnd_coord_t dx1 = DX; + rnd_coord_t dy1 = DY; + rnd_coord_t dx2 = DX; + rnd_coord_t dy2 = DY; pcb_line_t *line = (pcb_line_t*) Ptr2; int constrained = 0; @@ -261,7 +261,7 @@ return ptr2; } -void *pcb_move_obj_to_layer(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_layer_t *Target, pcb_bool enmasse) +void *pcb_move_obj_to_layer(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_layer_t *Target, rnd_bool enmasse) { void *result; pcb_opctx_t ctx; @@ -275,9 +275,9 @@ return result; } -pcb_bool pcb_move_selected_objs_to_layer(pcb_layer_t *Target) +rnd_bool pcb_move_selected_objs_to_layer(pcb_layer_t *Target) { - pcb_bool changed; + rnd_bool changed; pcb_opctx_t ctx; ctx.move.pcb = PCB; @@ -289,7 +289,7 @@ return changed; } -void *pcb_copy_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY) +void *pcb_copy_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY) { void *ptr; pcb_opctx_t ctx; Index: trunk/src/move.h =================================================================== --- trunk/src/move.h (revision 30902) +++ trunk/src/move.h (revision 30903) @@ -42,13 +42,13 @@ /* undoably moves an object by relative DX and DY. Doesn't bump the undo serial. Operation wrapper. The rubberband version also moves or modifies connected objects. */ -void *pcb_move_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY); -void *pcb_move_obj_and_rubberband(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY); +void *pcb_move_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY); +void *pcb_move_obj_and_rubberband(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY); /* undoably moves objects to a different layer. Doesn't bump the undo serial. Operation wrapper. */ -void *pcb_move_obj_to_layer(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_layer_t *Target, pcb_bool enmasse); -pcb_bool pcb_move_selected_objs_to_layer(pcb_layer_t *Target); +void *pcb_move_obj_to_layer(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_layer_t *Target, rnd_bool enmasse); +rnd_bool pcb_move_selected_objs_to_layer(pcb_layer_t *Target); /*** copy ***/ @@ -58,6 +58,6 @@ /* Undoably copies (duplicates) an object; the new objects is moved by DX,DY (operation wrapper) */ -void *pcb_copy_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY); +void *pcb_copy_obj(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY); #endif Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 30902) +++ trunk/src/netlist.c (revision 30903) @@ -108,13 +108,13 @@ int res; if (net == NULL) { - pcb_message(PCB_MSG_ERROR, "undo_term_alloc_undo failed: net is NULL\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "undo_term_alloc_undo failed: term is NULL\n"); + rnd_message(PCB_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 - pcb_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(PCB_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); @@ -256,7 +256,7 @@ return -1; } -pcb_bool pcb_net_name_valid(const char *netname) +rnd_bool pcb_net_name_valid(const char *netname) { for(;*netname != '\0'; netname++) { if (isalnum(*netname)) continue; @@ -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) { - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "netlist internal error: short_ctx_is_dup() net %s shorted with itself?!\n", net1->name); + rnd_message(PCB_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) - pcb_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(PCB_MSG_WARNING, "SHORT: net \"%s\" is shorted to \"%s\" at terminal %s-%s\n", sctx->current_net->name, offnn, sc->refdes, offender->term); else - pcb_message(PCB_MSG_WARNING, "SHORT: net \"%s\" is shorted to terminal %s-%s\n", sctx->current_net->name, sc->refdes, offender->term); + rnd_message(PCB_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++; - pcb_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#1)\n"); + rnd_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#1)\n"); break; } @@ -792,7 +792,7 @@ } else { sctx->missing++; - pcb_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#2)\n"); + rnd_message(PCB_MSG_WARNING, "Netlist problem: could not find the best rat line, rat missing (#2)\n"); } done[bestu] = 1; } @@ -844,7 +844,7 @@ vtp0_init(&subnets); if (acc & PCB_RATACC_INFO) - pcb_message(PCB_MSG_INFO, "\n--- netlist check ---\n"); + rnd_message(PCB_MSG_INFO, "\n--- netlist check ---\n"); pcb_net_short_ctx_init(&sctx, pcb, NULL); @@ -875,13 +875,13 @@ if (acc & PCB_RATACC_INFO) { long rem = ratlist_length(&pcb->Data->Rat); if (rem > 0) - pcb_message(PCB_MSG_INFO, "%d rat line%s remaining\n", rem, rem > 1 ? "s" : ""); + rnd_message(PCB_MSG_INFO, "%d rat line%s remaining\n", rem, rem > 1 ? "s" : ""); else if (acc & PCB_RATACC_ONLY_SELECTED) - pcb_message(PCB_MSG_WARNING, "No rat for any network that has selected terminal\n"); + rnd_message(PCB_MSG_WARNING, "No rat for any network that has selected terminal\n"); else if (sctx.missing > 0) - pcb_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(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"); else if (sctx.num_shorts == 0) - pcb_message(PCB_MSG_INFO, "Congratulations!!\n" "The layout is complete and has no shorted nets.\n"); + rnd_message(PCB_MSG_INFO, "Congratulations!!\n" "The layout is complete and has no shorted nets.\n"); } vtp0_uninit(&subnets); @@ -958,7 +958,7 @@ } } -static pcb_rat_t *pcb_net_create_by_rat_(pcb_board_t *pcb, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_any_obj_t *o1, pcb_any_obj_t *o2, pcb_bool interactive) +static pcb_rat_t *pcb_net_create_by_rat_(pcb_board_t *pcb, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, pcb_any_obj_t *o1, pcb_any_obj_t *o2, rnd_bool interactive) { pcb_subc_t *sc1, *sc2, *sctmp; pcb_net_t *net1 = NULL, *net2 = NULL, *ntmp, *target_net = NULL; @@ -969,7 +969,7 @@ long old_len, new_len; if ((o1 == o2) || (o1 == NULL) || (o2 == NULL)) { - pcb_message(PCB_MSG_ERROR, "Missing start or end terminal\n"); + rnd_message(PCB_MSG_ERROR, "Missing start or end terminal\n"); return NULL; } @@ -979,7 +979,7 @@ sc1 = pcb_obj_parent_subc(o1); sc2 = pcb_obj_parent_subc(o2); if ((sc1 == NULL) || (sc2 == NULL) || (sc1->refdes == NULL) || (sc2->refdes == NULL)) { - pcb_message(PCB_MSG_ERROR, "Both start or end terminal must be in a subcircuit with refdes\n"); + rnd_message(PCB_MSG_ERROR, "Both start or end terminal must be in a subcircuit with refdes\n"); return NULL; } @@ -989,11 +989,11 @@ if (term2 != NULL) net1 = term2->parent.net; if ((net1 == net2) && (net1 != NULL)) { - pcb_message(PCB_MSG_ERROR, "Those terminals are already on the same net (%s)\n", net1->name); + rnd_message(PCB_MSG_ERROR, "Those terminals are already on the same net (%s)\n", net1->name); return NULL; } if ((net1 != NULL) && (net2 != NULL)) { - pcb_message(PCB_MSG_ERROR, "Can not connect two existing nets with a rat (%s and %s)\n", net1->name, net2->name); + rnd_message(PCB_MSG_ERROR, "Can not connect two existing nets with a rat (%s and %s)\n", net1->name, net2->name); return NULL; } } @@ -1009,7 +1009,7 @@ group1 = get_side_group(pcb, o1); group2 = get_side_group(pcb, o2); if ((group1 == -1) && (group2 == -1)) { - pcb_message(PCB_MSG_ERROR, "Can not determine copper layer group of that terminal\n"); + rnd_message(PCB_MSG_ERROR, "Can not determine copper layer group of that terminal\n"); return NULL; } @@ -1059,7 +1059,7 @@ return res; } -static pcb_any_obj_t *find_rat_end(pcb_board_t *pcb, pcb_coord_t x, pcb_coord_t y, const char *loc) +static pcb_any_obj_t *find_rat_end(pcb_board_t *pcb, rnd_coord_t x, rnd_coord_t y, const char *loc) { void *ptr1, *ptr2, *ptr3; pcb_any_obj_t *o; @@ -1068,13 +1068,13 @@ o = ptr2; if ((type == PCB_OBJ_VOID) || (o->term == NULL)) { - pcb_message(PCB_MSG_ERROR, "Can't find a terminal at %s\n", loc); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "The terminal terminal found at %s is not part of a subc with refdes\n", loc); + rnd_message(PCB_MSG_ERROR, "The terminal terminal found at %s is not part of a subc with refdes\n", loc); return NULL; } @@ -1081,7 +1081,7 @@ return o; } -pcb_rat_t *pcb_net_create_by_rat_coords(pcb_board_t *pcb, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool interactive) +pcb_rat_t *pcb_net_create_by_rat_coords(pcb_board_t *pcb, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool interactive) { pcb_any_obj_t *os, *oe; if ((x1 == x2) && (y1 == y2)) Index: trunk/src/netlist.h =================================================================== --- trunk/src/netlist.h (revision 30902) +++ trunk/src/netlist.h (revision 30903) @@ -132,7 +132,7 @@ pcb_cardinal_t pcb_net_add_all_rats(const pcb_board_t *pcb, pcb_rat_accuracy_t acc); /* Create a new network or a new net connection by drawing a rat line between two terminals */ -pcb_rat_t *pcb_net_create_by_rat_coords(pcb_board_t *pcb, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool interactive); +pcb_rat_t *pcb_net_create_by_rat_coords(pcb_board_t *pcb, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool interactive); /* Undoably remove all non-subc-part copper objects that are connected to net. Return the number of removals. */ @@ -140,7 +140,7 @@ void pcb_netlist_changed(int force_unfreeze); -pcb_bool pcb_net_name_valid(const char *netname); +rnd_bool pcb_net_name_valid(const char *netname); /*** subnet mapping ***/ Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 30902) +++ trunk/src/netlist_act.c (revision 30903) @@ -69,7 +69,7 @@ int le, lp; if (next > 2) { - pcb_message(PCB_MSG_ERROR, "Exactly two terminals should be selected for swap (more than 2 selected at the moment)\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Exactly two terminals should be selected for swap (less than 2 selected at the moment)\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "That terminal is not on a net.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Those two terminals are on the same net, can't swap them.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "No such net: '%s'\n", from); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "No such net: '%s'\n", to); + rnd_message(PCB_MSG_ERROR, "No such net: '%s'\n", to); return 1; } } else { if (nto != NULL) { - pcb_message(PCB_MSG_ERROR, "Net name '%s' already in use\n", to); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Net %s has no pin %s\n", a1, a2); + rnd_message(PCB_MSG_ERROR, "Net %s has no pin %s\n", a1, a2); return 1; } else if (!net_found) { - pcb_message(PCB_MSG_ERROR, "No net named %s\n", a1); + rnd_message(PCB_MSG_ERROR, "No net named %s\n", a1); } @@ -551,7 +551,7 @@ switch(op) { case F_Object: { - pcb_coord_t x, y; + rnd_coord_t x, y; void *r1, *r2, *r3; rnd_hid_get_coords("Select a an object to claim network from", &x, &y, 0); @@ -578,7 +578,7 @@ if (termlist.used < 1) { vtp0_uninit(&termlist); - pcb_message(PCB_MSG_ERROR, "Can not claim network: no terminal found.\nPlease pick objects that have terminals with refdes-termID.\n"); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Can not claim network: '%s' is an existing network\n", netname); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Can not claim network: failed to create net '%s'\n", netname); + rnd_message(PCB_MSG_ERROR, "Can not claim network: failed to create net '%s'\n", netname); RND_ACT_IRES(1); return 0; } Index: trunk/src/netlist_geo.c =================================================================== --- trunk/src/netlist_geo.c (revision 30902) +++ trunk/src/netlist_geo.c (revision 30903) @@ -29,7 +29,7 @@ typedef struct { pcb_any_obj_t *o1, *o2; - pcb_coord_t o1x, o1y, o2x, o2y; + rnd_coord_t o1x, o1y, o2x, o2y; pcb_layergrp_id_t o1g, o2g; double dist2; } pcb_subnet_dist_t; @@ -69,7 +69,7 @@ static pcb_subnet_dist_t pcb_dist_arc_arc(pcb_arc_t *o1, pcb_arc_t *o2, pcb_rat_accuracy_t acc) { pcb_subnet_dist_t best, curr; - pcb_coord_t o1x1, o1y1, o1x2, o1y2, o2x1, o2y1, o2x2, o2y2; + rnd_coord_t o1x1, o1y1, o1x2, o1y2, o2x1, o2y1, o2x2, o2y2; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; @@ -105,7 +105,7 @@ static pcb_subnet_dist_t pcb_dist_line_arc(pcb_line_t *o1, pcb_arc_t *o2, pcb_rat_accuracy_t acc) { pcb_subnet_dist_t best, curr; - pcb_coord_t o2x1, o2y1, o2x2, o2y2; + rnd_coord_t o2x1, o2y1, o2x2, o2y2; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; @@ -133,7 +133,7 @@ } \ } while(0) -static pcb_subnet_dist_t dist_poly(pcb_poly_t *o1, pcb_any_obj_t *o2, pcb_coord_t o2x, pcb_coord_t o2y, pcb_coord_t radius) +static pcb_subnet_dist_t dist_poly(pcb_poly_t *o1, pcb_any_obj_t *o2, rnd_coord_t o2x, rnd_coord_t o2y, rnd_coord_t radius) { pcb_subnet_dist_t best; pcb_poly_it_t it; @@ -158,7 +158,7 @@ } for(pa = pcb_poly_island_first(o1, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_pline_t *pl; int go; @@ -180,7 +180,7 @@ static pcb_subnet_dist_t pcb_dist_poly_arc(pcb_poly_t *o1, pcb_arc_t *o2, pcb_rat_accuracy_t acc) { pcb_subnet_dist_t best, curr; - pcb_coord_t o2x1, o2y1, o2x2, o2y2, radius; + rnd_coord_t o2x1, o2y1, o2x2, o2y2, radius; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; @@ -200,7 +200,7 @@ static pcb_subnet_dist_t pcb_dist_poly_line(pcb_poly_t *o1, pcb_line_t *o2, pcb_rat_accuracy_t acc) { pcb_subnet_dist_t best, curr; - pcb_coord_t radius; + rnd_coord_t radius; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; @@ -236,7 +236,7 @@ best.dist2 = HUGE_VAL; for(pa = pcb_poly_island_first(o2, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_pline_t *pl; int go; @@ -259,7 +259,7 @@ static pcb_subnet_dist_t pcb_dist_pstk_arc(pcb_pstk_t *o1, pcb_arc_t *o2, pcb_rat_accuracy_t acc) { pcb_subnet_dist_t best, curr; - pcb_coord_t o2x1, o2y1, o2x2, o2y2; + rnd_coord_t o2x1, o2y1, o2x2, o2y2; if (acc & PCB_RATACC_ONLY_MANHATTAN) return sdist_invalid; @@ -402,7 +402,7 @@ if (curr.dist2 < HUGE_VAL) { pcb_any_obj_t *o_in_poly = NULL, *poly; - pcb_coord_t x, y, farx, fary; + rnd_coord_t x, y, farx, fary; /* if object needs to connect to sorrunding polygon, use a special rat to indicate "in-place" connection */ Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 30902) +++ trunk/src/obj_arc.c (revision 30903) @@ -105,7 +105,7 @@ double ca1, ca2, sa1, sa2; double minx, maxx, miny, maxy, delta; pcb_angle_t ang1, ang2; - pcb_coord_t width; + rnd_coord_t width; pcb_box_t res; /* first put angles into standard form: @@ -176,7 +176,7 @@ Arc->bbox_naked = pcb_arc_bbox_(Arc, 1); } -void pcb_arc_get_end(pcb_arc_t *arc, int which, pcb_coord_t *x, pcb_coord_t *y) +void pcb_arc_get_end(pcb_arc_t *arc, int which, rnd_coord_t *x, rnd_coord_t *y) { pcb_arc_get_endpt(arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, which, x, y); } @@ -199,7 +199,7 @@ } -void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, pcb_coord_t new_width, pcb_coord_t new_height) +void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, rnd_coord_t new_width, rnd_coord_t new_height) { pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, a); pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) a); @@ -213,7 +213,7 @@ /* creates a new arc on a layer */ -pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t width, pcb_coord_t height, pcb_angle_t sa, pcb_angle_t dir, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags, pcb_bool prevent_dups) +pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t width, rnd_coord_t height, pcb_angle_t sa, pcb_angle_t dir, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups) { pcb_arc_t *Arc; @@ -268,7 +268,7 @@ return a; } -pcb_arc_t *pcb_arc_dup_at(pcb_layer_t *dst, pcb_arc_t *src, pcb_coord_t dx, pcb_coord_t dy) +pcb_arc_t *pcb_arc_dup_at(pcb_layer_t *dst, pcb_arc_t *src, rnd_coord_t dx, rnd_coord_t dy) { pcb_arc_t *a = pcb_arc_new(dst, src->X+dx, src->Y+dy, src->Width, src->Height, src->StartAngle, src->Delta, src->Thickness, src->Clearance, src->Flags, pcb_false); pcb_arc_copy_meta(a, src); @@ -321,7 +321,7 @@ double sgn = tr->on_bottom ? -1 : +1; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, a)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_hash_tr_coords(tr, &x, &y, a->X, a->Y); crd = pcb_hash_coord(x) ^ pcb_hash_coord(y) ^ pcb_hash_coord(pcb_normalize_angle(pcb_round(a->StartAngle*sgn + tr->rot*sgn))) ^ pcb_hash_coord(pcb_round(a->Delta * sgn)); @@ -332,7 +332,7 @@ pcb_hash_coord(a->Width) ^ pcb_hash_coord(a->Height) ^ crd; } -pcb_coord_t pcb_arc_length(const pcb_arc_t *arc) +rnd_coord_t pcb_arc_length(const pcb_arc_t *arc) { double da = arc->Delta; double r = ((double)arc->Width + (double)arc->Height) / 2.0; /* TODO: lame approximation */ @@ -382,9 +382,9 @@ typedef struct { pcb_arc_t *arc; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t Thickness, Clearance; - pcb_coord_t Width, Height; - pcb_coord_t X, Y; + rnd_coord_t Thickness, Clearance; + rnd_coord_t Width, Height; + rnd_coord_t X, Y; pcb_angle_t StartAngle, Delta; } undo_arc_geo_t; @@ -398,12 +398,12 @@ pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *)g->arc); pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_ARC, layer, g->arc); - rnd_swap(pcb_coord_t, g->Thickness, g->arc->Thickness); - rnd_swap(pcb_coord_t, g->Clearance, g->arc->Clearance); - rnd_swap(pcb_coord_t, g->Width, g->arc->Width); - rnd_swap(pcb_coord_t, g->Height, g->arc->Height); - rnd_swap(pcb_coord_t, g->X, g->arc->X); - rnd_swap(pcb_coord_t, g->Y, g->arc->Y); + rnd_swap(rnd_coord_t, g->Thickness, g->arc->Thickness); + rnd_swap(rnd_coord_t, g->Clearance, g->arc->Clearance); + rnd_swap(rnd_coord_t, g->Width, g->arc->Width); + rnd_swap(rnd_coord_t, g->Height, g->arc->Height); + rnd_swap(rnd_coord_t, g->X, g->arc->X); + rnd_swap(rnd_coord_t, g->Y, g->arc->Y); rnd_swap(pcb_angle_t, g->StartAngle, g->arc->StartAngle); rnd_swap(pcb_angle_t, g->Delta, g->arc->Delta); @@ -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) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_arcop_move_buffer\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_arcop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -483,7 +483,7 @@ /* changes the size of an arc */ void *pcb_arcop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Thickness + ctx->chgsize.value; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) return NULL; @@ -505,7 +505,7 @@ /* changes the clearance size of an arc */ void *pcb_arcop_change_clear_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Clearance + ctx->chgsize.value; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc) || !PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Arc)) return NULL; @@ -532,7 +532,7 @@ /* changes the radius of an arc (is_primary 0=width or 1=height or 2=both) */ void *pcb_arcop_change_radius(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_coord_t value, *dst; + rnd_coord_t value, *dst; void *a0, *a1; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) @@ -719,7 +719,7 @@ pcb_arc_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) { - pcb_message(PCB_MSG_WARNING, "Sorry, arc object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, arc object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) @@ -775,9 +775,9 @@ } /* rotates an arc */ -void pcb_arc_rotate90(pcb_arc_t *Arc, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_arc_rotate90(pcb_arc_t *Arc, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { - pcb_coord_t save; + rnd_coord_t save; /* add Number*90 degrees (i.e., Number quarter-turns) */ Arc->StartAngle = pcb_normalize_angle(Arc->StartAngle + Number * 90); @@ -794,7 +794,7 @@ pcb_arc_bbox(Arc); } -void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, pcb_angle_t angle) +void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle) { if (layer->arc_tree != NULL) pcb_r_delete_entry(layer->arc_tree, (pcb_box_t *) arc); @@ -804,7 +804,7 @@ pcb_r_insert_entry(layer->arc_tree, (pcb_box_t *) arc); } -void pcb_arc_mirror(pcb_arc_t *arc, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_arc_mirror(pcb_arc_t *arc, rnd_coord_t y_offs, rnd_bool undoable) { undo_arc_geo_t gtmp, *g = >mp; @@ -888,7 +888,7 @@ void *pcb_arc_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *arc) { pcb_angle_t end_ang = arc->StartAngle + arc->Delta; - pcb_coord_t x = pcb_crosshair.X, y = pcb_crosshair.Y; + rnd_coord_t x = pcb_crosshair.X, y = pcb_crosshair.Y; pcb_angle_t angle = atan2(-(y - arc->Y), (x - arc->X)) * 180.0 / M_PI + 180.0; pcb_arc_t *new_arc; @@ -945,7 +945,7 @@ /*** draw ***/ -static void arc_label_pos(const pcb_arc_t *arc, pcb_coord_t *x0, pcb_coord_t *y0, pcb_bool_t *vert) +static void arc_label_pos(const pcb_arc_t *arc, rnd_coord_t *x0, rnd_coord_t *y0, pcb_bool_t *vert) { double da, ea, la; @@ -961,13 +961,13 @@ *vert = (((la < 45) && (la > -45)) || ((la > 135) && (la < 225))); } -void pcb_arc_middle(const pcb_arc_t *arc, pcb_coord_t *x, pcb_coord_t *y) +void pcb_arc_middle(const pcb_arc_t *arc, rnd_coord_t *x, rnd_coord_t *y) { pcb_bool_t waste; arc_label_pos(arc, x, y, &waste); } -void pcb_arc_approx(const pcb_arc_t *arc, double res, int reverse, void *uctx, int (*cb)(void *uctx, pcb_coord_t x, pcb_coord_t y)) +void pcb_arc_approx(const pcb_arc_t *arc, double res, int reverse, void *uctx, int (*cb)(void *uctx, rnd_coord_t x, rnd_coord_t y)) { double a, da = arc->Delta, sa, ea, ea2, step; @@ -1018,7 +1018,7 @@ void pcb_arc_name_invalidate_draw(pcb_arc_t *arc) { if (arc->term != NULL) { - pcb_coord_t x0, y0; + rnd_coord_t x0, y0; pcb_bool_t vert; arc_label_pos(arc, &x0, &y0, &vert); @@ -1029,7 +1029,7 @@ void pcb_arc_draw_label(pcb_draw_info_t *info, pcb_arc_t *arc) { if (arc->term != NULL) { - pcb_coord_t x0, y0; + rnd_coord_t x0, y0; pcb_bool_t vert; arc_label_pos(arc, &x0, &y0, &vert); @@ -1036,7 +1036,7 @@ pcb_term_label_draw(info, x0, y0, conf_core.appearance.term_label_size, vert, pcb_true, (pcb_any_obj_t *)arc); } if (arc->noexport) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; pcb_arc_middle(arc, &cx, &cy); pcb_obj_noexport_mark(arc, cx, cy); } @@ -1044,7 +1044,7 @@ void pcb_arc_draw_(pcb_draw_info_t *info, pcb_arc_t *arc, int allow_term_gfx) { - pcb_coord_t thickness = arc->Thickness; + rnd_coord_t thickness = arc->Thickness; if (arc->Thickness < 0) return; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 30902) +++ trunk/src/obj_arc.h (revision 30903) @@ -36,9 +36,9 @@ struct pcb_arc_s { /* holds information about arcs */ PCB_ANY_PRIMITIVE_FIELDS; - pcb_coord_t Thickness, Clearance; - pcb_coord_t Width, Height; /* length of axis */ - pcb_coord_t X, Y; /* center coordinates */ + rnd_coord_t Thickness, Clearance; + rnd_coord_t Width, Height; /* length of axis */ + rnd_coord_t X, Y; /* center coordinates */ pcb_angle_t StartAngle, Delta; /* the two limiting angles in degrees */ gdl_elem_t link; /* an arc is in a list: either on a layer or in an element or in a font */ }; @@ -48,9 +48,9 @@ pcb_arc_t *pcb_arc_alloc_id(pcb_layer_t *layer, long int id); void pcb_arc_free(pcb_arc_t *data); -pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, pcb_coord_t center_x, pcb_coord_t center_y, pcb_coord_t width_r, pcb_coord_t height_r, pcb_angle_t start_angle, pcb_angle_t delta_angle, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags, pcb_bool prevent_dups); +pcb_arc_t *pcb_arc_new(pcb_layer_t *Layer, rnd_coord_t center_x, rnd_coord_t center_y, rnd_coord_t width_r, rnd_coord_t height_r, pcb_angle_t start_angle, pcb_angle_t delta_angle, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags, rnd_bool prevent_dups); pcb_arc_t *pcb_arc_dup(pcb_layer_t *dst, pcb_arc_t *src); -pcb_arc_t *pcb_arc_dup_at(pcb_layer_t *dst, pcb_arc_t *src, pcb_coord_t dx, pcb_coord_t dy); +pcb_arc_t *pcb_arc_dup_at(pcb_layer_t *dst, pcb_arc_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_arc_destroy(pcb_layer_t *Layer, pcb_arc_t *Arc); void pcb_arc_reg(pcb_layer_t *layer, pcb_arc_t *arc); @@ -62,9 +62,9 @@ /*** Utility ***/ void pcb_arc_bbox(pcb_arc_t *Arc); -void pcb_arc_rotate90(pcb_arc_t *Arc, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, pcb_angle_t angle); -void pcb_arc_mirror(pcb_arc_t *arc, pcb_coord_t y_offs, pcb_bool undoable); +void pcb_arc_rotate90(pcb_arc_t *Arc, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_arc_rotate(pcb_layer_t *layer, pcb_arc_t *arc, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle); +void pcb_arc_mirror(pcb_arc_t *arc, rnd_coord_t y_offs, rnd_bool undoable); void pcb_arc_flip_side(pcb_layer_t *layer, pcb_arc_t *arc); void pcb_arc_scale(pcb_arc_t *arc, double sx, double sy, double sth); pcb_box_t pcb_arc_mini_bbox(const pcb_arc_t *arc); @@ -77,22 +77,22 @@ /* Return the x;y coordinate of the endpoint of an arc; if which is 0, return the endpoint that corresponds to StartAngle, else return the end angle's. */ -void pcb_arc_get_end(pcb_arc_t *Arc, int which, pcb_coord_t *x, pcb_coord_t *y); -void pcb_arc_middle(const pcb_arc_t *arc, pcb_coord_t *x, pcb_coord_t *y); +void pcb_arc_get_end(pcb_arc_t *Arc, int which, rnd_coord_t *x, rnd_coord_t *y); +void pcb_arc_middle(const pcb_arc_t *arc, rnd_coord_t *x, rnd_coord_t *y); /* Call cb() with coords of approximation for an arc from start to end, or end to start (if reverse is true). Resolution is set by res: if it is positive, - it is an angle in degrees; if negative, it's an edge length in pcb_coord_t; if + it is an angle in degrees; if negative, it's an edge length in rnd_coord_t; if zero, the default 1 mm resolution is used. If cb returns non-zero, the loop quits immediately. Even stepping is not guaranteed, but visiting the exact arc start and end point is. */ -void pcb_arc_approx(const pcb_arc_t *arc, double res, int reverse, void *uctx, int (*cb)(void *uctx, pcb_coord_t x, pcb_coord_t y)); +void pcb_arc_approx(const pcb_arc_t *arc, double res, int reverse, void *uctx, int (*cb)(void *uctx, rnd_coord_t x, rnd_coord_t y)); void pcb_arc_set_angles(pcb_layer_t *Layer, pcb_arc_t *a, pcb_angle_t new_sa, pcb_angle_t new_da); -void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, pcb_coord_t new_width, pcb_coord_t new_height); +void pcb_arc_set_radii(pcb_layer_t *Layer, pcb_arc_t *a, rnd_coord_t new_width, rnd_coord_t new_height); -pcb_coord_t pcb_arc_length(const pcb_arc_t *arc); +rnd_coord_t pcb_arc_length(const pcb_arc_t *arc); double pcb_arc_area(const pcb_arc_t *arc); /* ptr3 values for start and end point */ @@ -106,7 +106,7 @@ #define pcb_arc_move(a,dx,dy) \ do { \ - pcb_coord_t __dx__ = (dx), __dy__ = (dy); \ + rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_arc_t *__a__ = (a); \ PCB_MOVE_POINT((__a__)->X,(__a__)->Y,__dx__,__dy__); \ PCB_BOX_MOVE_LOWLEVEL(&((__a__)->BoundingBox),__dx__,__dy__); \ Index: trunk/src/obj_arc_ui.c =================================================================== --- trunk/src/obj_arc_ui.c (revision 30902) +++ trunk/src/obj_arc_ui.c (revision 30903) @@ -37,7 +37,7 @@ static void draw_mark(pcb_hid_gc_t gc, const pcb_arc_t *arc) { - const pcb_coord_t mark = PCB_MM_TO_COORD(0.2); + const rnd_coord_t mark = PCB_MM_TO_COORD(0.2); pcb_render->draw_line(gc, arc->X-mark, arc->Y, arc->X+mark, arc->Y); pcb_render->draw_line(gc, arc->X, arc->Y-mark, arc->X, arc->Y+mark); } @@ -107,7 +107,7 @@ { int *end_pt = ch->AttachedObject.Ptr3; pcb_arc_t arc2, *arc = (pcb_arc_t *) pcb_crosshair.AttachedObject.Ptr2; - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; double dx, dy, d; pcb_arc_get_end(arc, (end_pt != NULL), &ex, &ey); @@ -137,7 +137,7 @@ { pcb_arc_t *arc = Ptr2; int *end_pt = Ptr3; - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; pcb_arc_get_end(arc, (end_pt != pcb_arc_start_ptr), &ex, &ey); *res = pcb_point_box(ex, ey); return 0; Index: trunk/src/obj_arc_ui.h =================================================================== --- trunk/src/obj_arc_ui.h (revision 30902) +++ trunk/src/obj_arc_ui.h (revision 30903) @@ -29,5 +29,5 @@ void pcb_arc_ui_move_or_copy(pcb_crosshair_t *ch); int pcb_obj_ui_arc_point_bbox(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_box_t *res); -void pcb_arc_middle(const pcb_arc_t *arc, pcb_coord_t *x, pcb_coord_t *y); +void pcb_arc_middle(const pcb_arc_t *arc, rnd_coord_t *x, rnd_coord_t *y); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 30902) +++ trunk/src/obj_common.c (revision 30903) @@ -93,7 +93,7 @@ case PCB_OBJ_ARC_POINT: return pcb_obj_ui_arc_point_bbox(Type, Ptr1, Ptr2, Ptr3, res); default: - pcb_message(PCB_MSG_ERROR, "Request for bounding box of unsupported type %d\n", Type); + rnd_message(PCB_MSG_ERROR, "Request for bounding box of unsupported type %d\n", Type); *res = *(pcb_box_t *)Ptr2; return -1; } @@ -104,9 +104,9 @@ /* current object ID; incremented after each creation of an object */ long int ID = 1; -pcb_bool pcb_create_being_lenient = pcb_false; +rnd_bool pcb_create_being_lenient = pcb_false; -void pcb_create_be_lenient(pcb_bool v) +void pcb_create_be_lenient(rnd_bool v) { pcb_create_being_lenient = v; } @@ -145,7 +145,7 @@ pcb_attribute_copy_all(&o->Attributes, src); } -void pcb_obj_center(const pcb_any_obj_t *obj, pcb_coord_t *x, pcb_coord_t *y) +void pcb_obj_center(const pcb_any_obj_t *obj, rnd_coord_t *x, rnd_coord_t *y) { switch (obj->type) { case PCB_OBJ_PSTK: @@ -175,7 +175,7 @@ pcb_term_add(&subc->terminals, obj); inv = pcb_obj_id_invalid(obj->term); if (inv != NULL) - pcb_message(PCB_MSG_ERROR, "Invalid character '%c' in terminal name (term attribute) '%s'\n", *inv, obj->term); + rnd_message(PCB_MSG_ERROR, "Invalid character '%c' in terminal name (term attribute) '%s'\n", *inv, obj->term); } else if (strcmp(name, "intconn") == 0) { long cid = 0; @@ -254,7 +254,7 @@ return res; } -pcb_coord_t pcb_obj_clearance_at(pcb_board_t *pcb, const pcb_any_obj_t *o, pcb_layer_t *at) +rnd_coord_t pcb_obj_clearance_at(pcb_board_t *pcb, const pcb_any_obj_t *o, pcb_layer_t *at) { switch(o->type) { case PCB_OBJ_POLY: Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 30902) +++ trunk/src/obj_common.h (revision 30903) @@ -84,7 +84,7 @@ /* point and box type - they are so common everything depends on them */ struct pcb_point_s { /* a line/polygon point */ - pcb_coord_t X, Y, X2, Y2; /* so Point type can be cast as pcb_box_t */ + rnd_coord_t X, Y, X2, Y2; /* so Point type can be cast as pcb_box_t */ long int ID; }; @@ -92,7 +92,7 @@ #define PCB_XFORM_MX_IDENT {1,0,0, 0,1,0, 0,0,1} struct pcb_xform_s { /* generic object transformation; all-zero means no transformation */ - pcb_coord_t bloat; /* if non-zero, bloat (positive) or shrink (negative) by this value */ + rnd_coord_t bloat; /* if non-zero, bloat (positive) or shrink (negative) by this value */ unsigned layer_faded:1; /* draw layer colors faded */ unsigned omit_overlay:1; /* do not draw overlays (which are useful on screen but normally omitted on exports, except if --as-shown is specified */ @@ -173,7 +173,7 @@ /* Host transformations: typically the transformations an object of a subc inherits from the subc */ typedef struct pcb_host_trans_s { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; int on_bottom; double rot; double cosa, sina; /* rot angle cache */ @@ -191,8 +191,8 @@ /* pcb_true during file loads, for example to allow overlapping vias. pcb_false otherwise, to stop the user from doing normally dangerous things. */ -void pcb_create_be_lenient(pcb_bool); -extern pcb_bool pcb_create_being_lenient; +void pcb_create_be_lenient(rnd_bool); +extern rnd_bool pcb_create_being_lenient; void pcb_create_ID_bump(int min_id); void pcb_create_ID_reset(void); @@ -236,7 +236,7 @@ /* Lines, pads, and rats all use this so they can be cross-cast. */ #define PCB_ANYLINEFIELDS \ PCB_ANY_PRIMITIVE_FIELDS; \ - pcb_coord_t Thickness, Clearance; \ + rnd_coord_t Thickness, Clearance; \ pcb_point_t Point1, Point2 /* All on-pcb objects (elements, lines, pads, vias, rats, etc) are @@ -252,11 +252,11 @@ /* Return the geometric center of an object, as shown (center of bbox usually, but not for an arc) */ -void pcb_obj_center(const pcb_any_obj_t *obj, pcb_coord_t *x, pcb_coord_t *y); +void pcb_obj_center(const pcb_any_obj_t *obj, rnd_coord_t *x, rnd_coord_t *y); /* Return the clearance value of object on the specified layer (in case of padstack - in case of other objects layer is ignored) */ -pcb_coord_t pcb_obj_clearance_at(pcb_board_t *pcb, const pcb_any_obj_t *o, pcb_layer_t *at); +rnd_coord_t pcb_obj_clearance_at(pcb_board_t *pcb, const pcb_any_obj_t *o, pcb_layer_t *at); /* Update cached attributes (->term) */ @@ -316,7 +316,7 @@ #define pcb_obj_noexport_mark(obj, cx, cy) \ do { \ - pcb_coord_t radius = PCB_MM_TO_COORD(0.2); \ + rnd_coord_t radius = PCB_MM_TO_COORD(0.2); \ int selected = PCB_FLAG_TEST(PCB_FLAG_SELECTED, obj); \ pcb_render->set_color(pcb_draw_out.fgGC, selected ? &conf_core.appearance.color.selected : &conf_core.appearance.color.subc); \ pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_round); \ Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 30902) +++ trunk/src/obj_gfx.c (revision 30903) @@ -135,7 +135,7 @@ } /* creates a new gfx on a layer */ -pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags) +pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags) { pcb_gfx_t *gfx; @@ -171,7 +171,7 @@ return a; } -pcb_gfx_t *pcb_gfx_dup_at(pcb_layer_t *dst, pcb_gfx_t *src, pcb_coord_t dx, pcb_coord_t dy) +pcb_gfx_t *pcb_gfx_dup_at(pcb_layer_t *dst, pcb_gfx_t *src, rnd_coord_t dx, rnd_coord_t dy) { pcb_gfx_t *a = pcb_gfx_new(dst, src->cx+dx, src->cy+dy, src->sx, src->sy, src->rot, src->Flags); TODO("copy the pixmap too"); @@ -221,7 +221,7 @@ double sgn = tr->on_bottom ? -1 : +1; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, a)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_hash_tr_coords(tr, &x, &y, a->cx, a->cy); crd = pcb_hash_coord(x) ^ pcb_hash_coord(y) ^ pcb_hash_coord(a->sx) ^ pcb_hash_coord(a->sy) ^ pcb_hash_coord(pcb_normalize_angle(pcb_round(a->rot*sgn + tr->rot*sgn))); @@ -257,7 +257,7 @@ typedef struct { pcb_gfx_t *gfx; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t cx, cy, sx, sy; + rnd_coord_t cx, cy, sx, sy; pcb_angle_t rot; } undo_gfx_geo_t; @@ -269,10 +269,10 @@ if (layer->gfx_tree != NULL) pcb_r_delete_entry(layer->gfx_tree, (pcb_box_t *)g->gfx); - rnd_swap(pcb_coord_t, g->cx, g->gfx->cx); - rnd_swap(pcb_coord_t, g->cy, g->gfx->cy); - rnd_swap(pcb_coord_t, g->sx, g->gfx->sx); - rnd_swap(pcb_coord_t, g->sy, g->gfx->sy); + rnd_swap(rnd_coord_t, g->cx, g->gfx->cx); + rnd_swap(rnd_coord_t, g->cy, g->gfx->cy); + rnd_swap(rnd_coord_t, g->sx, g->gfx->sx); + rnd_swap(rnd_coord_t, g->sy, g->gfx->sy); rnd_swap(pcb_angle_t, g->rot, g->gfx->rot); if (g->rot != g->gfx->rot) @@ -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) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_gfxop_move_buffer\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_gfxop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -368,7 +368,7 @@ #define pcb_gfx_move(g,dx,dy) \ do { \ - pcb_coord_t __dx__ = (dx), __dy__ = (dy); \ + rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_gfx_t *__g__ = (g); \ PCB_MOVE_POINT((__g__)->cx, (__g__)->cy,__dx__,__dy__); \ PCB_BOX_MOVE_LOWLEVEL(&((__g__)->BoundingBox),__dx__,__dy__); \ @@ -419,7 +419,7 @@ pcb_gfx_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, gfx)) { - pcb_message(PCB_MSG_WARNING, "Sorry, gfx object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, gfx object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) @@ -468,7 +468,7 @@ } /* rotates a gfx */ -void pcb_gfx_rotate90(pcb_gfx_t *gfx, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_gfx_rotate90(pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { gfx->rot = pcb_normalize_angle(gfx->rot + Number * 90); TODO("rotate content") @@ -476,7 +476,7 @@ pcb_gfx_bbox(gfx); } -void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, pcb_angle_t angle) +void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle) { if (layer->gfx_tree != NULL) pcb_r_delete_entry(layer->gfx_tree, (pcb_box_t *) gfx); @@ -490,7 +490,7 @@ pcb_r_insert_entry(layer->gfx_tree, (pcb_box_t *) gfx); } -void pcb_gfx_mirror(pcb_gfx_t *gfx, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_gfx_mirror(pcb_gfx_t *gfx, rnd_coord_t y_offs, rnd_bool undoable) { undo_gfx_geo_t gtmp, *g = >mp; @@ -519,7 +519,7 @@ pcb_r_insert_entry(layer->gfx_tree, (pcb_box_t *)gfx); } -void pcb_gfx_chg_geo(pcb_gfx_t *gfx, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_angle_t rot, pcb_bool undoable) +void pcb_gfx_chg_geo(pcb_gfx_t *gfx, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, rnd_bool undoable) { undo_gfx_geo_t gtmp, *g = >mp; @@ -598,7 +598,7 @@ return gfx; } -void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, pcb_bool undoable) +void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, rnd_bool undoable) { TODO("gfx: undoable pixmap assign"); gfx->pxm_neutral = pcb_pixmap_insert_neutral_or_free(&pcb_pixmaps, pxm); @@ -694,7 +694,7 @@ pcb_draw_invalidate(gfx); } -void pcb_gfx_draw_xor(pcb_gfx_t *gfx, pcb_coord_t dx, pcb_coord_t dy) +void pcb_gfx_draw_xor(pcb_gfx_t *gfx, rnd_coord_t dx, rnd_coord_t dy) { pcb_render->draw_line(pcb_crosshair.GC, gfx->cox[0]+dx, gfx->coy[0]+dy, gfx->cox[1]+dx, gfx->coy[1]+dy); pcb_render->draw_line(pcb_crosshair.GC, gfx->cox[1]+dx, gfx->coy[1]+dy, gfx->cox[2]+dx, gfx->coy[2]+dy); Index: trunk/src/obj_gfx.h =================================================================== --- trunk/src/obj_gfx.h (revision 30902) +++ trunk/src/obj_gfx.h (revision 30903) @@ -36,8 +36,8 @@ struct pcb_gfx_s { /* holds information about gfxs */ PCB_ANY_PRIMITIVE_FIELDS; - pcb_coord_t cx, cy; /* center coordinates */ - pcb_coord_t sx, sy; /* size x and y on board (net box size before rotation) */ + rnd_coord_t cx, cy; /* center coordinates */ + rnd_coord_t sx, sy; /* size x and y on board (net box size before rotation) */ pcb_angle_t rot; unsigned int xmirror:1, ymirror:1; @@ -45,7 +45,7 @@ pcb_pixmap_t *pxm_xformed; /* transformed version from the cache */ /* calculated/cached fields */ - pcb_coord_t cox[4], coy[4]; /* the 4 corners */ + rnd_coord_t cox[4], coy[4]; /* the 4 corners */ gdl_elem_t link; /* an gfx is in a list on a layer */ }; @@ -54,9 +54,9 @@ pcb_gfx_t *pcb_gfx_alloc_id(pcb_layer_t *layer, long int id); void pcb_gfx_free(pcb_gfx_t *data); -pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags); +pcb_gfx_t *pcb_gfx_new(pcb_layer_t *layer, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, pcb_flag_t Flags); pcb_gfx_t *pcb_gfx_dup(pcb_layer_t *dst, pcb_gfx_t *src); -pcb_gfx_t *pcb_gfx_dup_at(pcb_layer_t *dst, pcb_gfx_t *src, pcb_coord_t dx, pcb_coord_t dy); +pcb_gfx_t *pcb_gfx_dup_at(pcb_layer_t *dst, pcb_gfx_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_gfx_destroy(pcb_layer_t *Layer, pcb_gfx_t *gfx); void pcb_gfx_reg(pcb_layer_t *layer, pcb_gfx_t *gfx); @@ -69,15 +69,15 @@ /*** Utility ***/ void pcb_gfx_update(pcb_gfx_t *gfx); /* update corner cache: call this after any geometry change */ void pcb_gfx_bbox(pcb_gfx_t *gfx); -void pcb_gfx_rotate90(pcb_gfx_t *gfx, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, pcb_angle_t angle); -void pcb_gfx_mirror(pcb_gfx_t *gfx, pcb_coord_t y_offs, pcb_bool undoable); +void pcb_gfx_rotate90(pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_gfx_rotate(pcb_layer_t *layer, pcb_gfx_t *gfx, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, pcb_angle_t angle); +void pcb_gfx_mirror(pcb_gfx_t *gfx, rnd_coord_t y_offs, rnd_bool undoable); void pcb_gfx_flip_side(pcb_layer_t *layer, pcb_gfx_t *gfx); void pcb_gfx_scale(pcb_gfx_t *gfx, double sx, double sy, double sth); -void pcb_gfx_chg_geo(pcb_gfx_t *gfx, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_angle_t rot, pcb_bool undoable); +void pcb_gfx_chg_geo(pcb_gfx_t *gfx, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_angle_t rot, rnd_bool undoable); /* assings pxm to gfx and free pxm (if needed) */ -void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, pcb_bool undoable); +void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, rnd_bool undoable); /*** hash and eq ***/ int pcb_gfx_eq(const pcb_host_trans_t *tr1, const pcb_gfx_t *g1, const pcb_host_trans_t *tr2, const pcb_gfx_t *g2); Index: trunk/src/obj_gfx_draw.h =================================================================== --- trunk/src/obj_gfx_draw.h (revision 30902) +++ trunk/src/obj_gfx_draw.h (revision 30903) @@ -41,4 +41,4 @@ void pcb_gfx_name_invalidate_draw(pcb_gfx_t *gfx); void pcb_gfx_draw_label(pcb_draw_info_t *info, pcb_gfx_t *gfx); -void pcb_gfx_draw_xor(pcb_gfx_t *gfx, pcb_coord_t x, pcb_coord_t y); +void pcb_gfx_draw_xor(pcb_gfx_t *gfx, rnd_coord_t x, rnd_coord_t y); Index: trunk/src/obj_hash.h =================================================================== --- trunk/src/obj_hash.h (revision 30902) +++ trunk/src/obj_hash.h (revision 30903) @@ -36,21 +36,21 @@ return strcmp(s1, s2) != 0; } -PCB_INLINE unsigned pcb_hash_coord(pcb_coord_t c) +PCB_INLINE unsigned pcb_hash_coord(rnd_coord_t c) { - return murmurhash(&(c), sizeof(pcb_coord_t)); + return murmurhash(&(c), sizeof(rnd_coord_t)); } /* cheat: round with a tolerance of a few nanometers to overcome the usual +-1 nanometer rounding error */ -PCB_INLINE pcb_coord_t pcb_round_tol(double v, int tol) +PCB_INLINE rnd_coord_t pcb_round_tol(double v, int tol) { return pcb_round(v/(double)tol)*tol; } -PCB_INLINE void pcb_hash_tr_coords(const pcb_host_trans_t *tr, pcb_coord_t *dstx, pcb_coord_t *dsty, pcb_coord_t srcx, pcb_coord_t srcy) +PCB_INLINE void pcb_hash_tr_coords(const pcb_host_trans_t *tr, rnd_coord_t *dstx, rnd_coord_t *dsty, rnd_coord_t srcx, rnd_coord_t srcy) { - pcb_coord_t px, py; + rnd_coord_t px, py; px = srcx + tr->ox; py = srcy + tr->oy; @@ -86,7 +86,7 @@ #define pcb_field_neq(s1, s2, f) ((s1)->f != (s2)->f) /* retruns if two sets of tr;x;y mismatches */ -PCB_INLINE pcb_bool pcb_neq_tr_coords(const pcb_host_trans_t *tr1, pcb_coord_t x1, pcb_coord_t y1, const pcb_host_trans_t *tr2, pcb_coord_t x2, pcb_coord_t y2) +PCB_INLINE rnd_bool pcb_neq_tr_coords(const pcb_host_trans_t *tr1, rnd_coord_t x1, rnd_coord_t y1, const pcb_host_trans_t *tr2, rnd_coord_t x2, rnd_coord_t y2) { pcb_hash_tr_coords(tr1, &x1, &y1, x1, y1); pcb_hash_tr_coords(tr2, &x2, &y2, x2, y2); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 30902) +++ trunk/src/obj_line.c (revision 30903) @@ -122,7 +122,7 @@ typedef struct { pcb_line_t *line; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t Thickness, Clearance; + rnd_coord_t Thickness, Clearance; pcb_point_t Point1, Point2; } undo_line_geo_t; @@ -137,8 +137,8 @@ rnd_swap(pcb_point_t, g->Point1, g->line->Point1); rnd_swap(pcb_point_t, g->Point2, g->line->Point2); - rnd_swap(pcb_coord_t, g->Thickness, g->line->Thickness); - rnd_swap(pcb_coord_t, g->Clearance, g->line->Clearance); + rnd_swap(rnd_coord_t, g->Thickness, g->line->Thickness); + rnd_swap(rnd_coord_t, g->Clearance, g->line->Clearance); pcb_line_bbox(g->line); if (layer->line_tree != NULL) @@ -164,8 +164,8 @@ struct line_info { - pcb_coord_t X1, X2, Y1, Y2; - pcb_coord_t Thickness, Clearance; + rnd_coord_t X1, X2, Y1, Y2; + rnd_coord_t Thickness, Clearance; pcb_flag_t Flags; pcb_line_t test, *ans; jmp_buf env; @@ -244,7 +244,7 @@ /* creates a new line on a layer and checks for overlap and extension */ -pcb_line_t *pcb_line_new_merge(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_line_t *pcb_line_new_merge(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags) { struct line_info info; pcb_box_t search; @@ -290,7 +290,7 @@ return pcb_line_new(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); } -pcb_line_t *pcb_line_new(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_line_t *pcb_line_new(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags) { pcb_line_t *Line; @@ -326,7 +326,7 @@ return pcb_line_copy_meta(l, src); } -pcb_line_t *pcb_line_dup_at(pcb_layer_t *dst, pcb_line_t *src, pcb_coord_t dx, pcb_coord_t dy) +pcb_line_t *pcb_line_dup_at(pcb_layer_t *dst, pcb_line_t *src, rnd_coord_t dx, rnd_coord_t dy) { pcb_line_t *l = pcb_line_new(dst, src->Point1.X + dx, src->Point1.Y + dy, src->Point2.X + dx, src->Point2.Y + dy, src->Thickness, src->Clearance, src->Flags); return pcb_line_copy_meta(l, src); @@ -344,7 +344,7 @@ static void pcb_line_bbox_(const pcb_line_t *Line, pcb_box_t *dst, int mini) { - pcb_coord_t width = mini ? (Line->Thickness + 1) / 2 : (Line->Thickness + Line->Clearance + 1) / 2; + rnd_coord_t width = mini ? (Line->Thickness + 1) / 2 : (Line->Thickness + Line->Clearance + 1) / 2; /* Adjust for our discrete polygon approximation */ width = (double) width *PCB_POLY_CIRC_RADIUS_ADJ + 0.5; @@ -387,7 +387,7 @@ unsigned int crd = 0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, l)) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; pcb_hash_tr_coords(tr, &x1, &y1, l->Point1.X, l->Point1.Y); pcb_hash_tr_coords(tr, &x2, &y2, l->Point2.X, l->Point2.Y); crd = pcb_hash_coord(x1) ^ pcb_hash_coord(y1) ^ pcb_hash_coord(x2) ^ pcb_hash_coord(y2); @@ -398,10 +398,10 @@ } -pcb_coord_t pcb_line_length(const pcb_line_t *line) +rnd_coord_t pcb_line_length(const pcb_line_t *line) { - pcb_coord_t dx = line->Point1.X - line->Point2.X; - pcb_coord_t dy = line->Point1.Y - line->Point2.Y; + rnd_coord_t dx = line->Point1.X - line->Point2.X; + rnd_coord_t dy = line->Point1.Y - line->Point2.Y; TODO(": use the distance func instead") return pcb_round(sqrt((double)dx*(double)dx + (double)dy*(double)dy)); } @@ -413,7 +413,7 @@ + (double)line->Thickness * (double)line->Thickness * M_PI; /* cap circles */ } -void pcb_sqline_to_rect(const pcb_line_t *line, pcb_coord_t *x, pcb_coord_t *y) +void pcb_sqline_to_rect(const pcb_line_t *line, rnd_coord_t *x, rnd_coord_t *y) { double l, vx, vy, nx, ny, width, x1, y1, x2, y2, dx, dy; @@ -436,14 +436,14 @@ nx = -vy; ny = vx; - x[0] = (pcb_coord_t)pcb_round(x1 - vx * width + nx * width); - y[0] = (pcb_coord_t)pcb_round(y1 - vy * width + ny * width); - x[1] = (pcb_coord_t)pcb_round(x1 - vx * width - nx * width); - y[1] = (pcb_coord_t)pcb_round(y1 - vy * width - ny * width); - x[2] = (pcb_coord_t)pcb_round(x2 + vx * width - nx * width); - y[2] = (pcb_coord_t)pcb_round(y2 + vy * width - ny * width); - x[3] = (pcb_coord_t)pcb_round(x2 + vx * width + nx * width); - y[3] = (pcb_coord_t)pcb_round(y2 + vy * width + ny * width); + x[0] = (rnd_coord_t)pcb_round(x1 - vx * width + nx * width); + y[0] = (rnd_coord_t)pcb_round(y1 - vy * width + ny * width); + x[1] = (rnd_coord_t)pcb_round(x1 - vx * width - nx * width); + y[1] = (rnd_coord_t)pcb_round(y1 - vy * width - ny * width); + x[2] = (rnd_coord_t)pcb_round(x2 + vx * width - nx * width); + y[2] = (rnd_coord_t)pcb_round(y2 + vy * width - ny * width); + x[3] = (rnd_coord_t)pcb_round(x2 + vx * width + nx * width); + y[3] = (rnd_coord_t)pcb_round(y2 + vy * width + ny * width); } void pcb_line_pre(pcb_line_t *line) @@ -496,7 +496,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) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_lineop_move_buffer\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_lineop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -521,7 +521,7 @@ /* changes the size of a line */ void *pcb_lineop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Thickness + ctx->chgsize.value; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line)) return NULL; @@ -543,7 +543,7 @@ /*changes the clearance size of a line */ void *pcb_lineop_change_clear_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Clearance + ctx->chgsize.value; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line) || !PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Line)) return NULL; @@ -756,7 +756,7 @@ * moves a line between layers */ struct via_info { - pcb_coord_t X, Y; + rnd_coord_t X, Y; jmp_buf env; }; @@ -781,7 +781,7 @@ void *ptr1, *ptr2, *ptr3; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line)) { - pcb_message(PCB_MSG_WARNING, "Sorry, line object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, line object is locked\n"); return NULL; } if (ctx->move.dst_layer == Layer && Layer->meta.real.vis) @@ -908,7 +908,7 @@ } /* rotates a line in 90 degree steps */ -void pcb_line_rotate90(pcb_line_t *Line, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_line_rotate90(pcb_line_t *Line, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { PCB_COORD_ROTATE90(Line->Point1.X, Line->Point1.Y, X, Y, Number); PCB_COORD_ROTATE90(Line->Point2.X, Line->Point2.Y, X, Y, Number); @@ -915,7 +915,7 @@ /* keep horizontal, vertical Point2 > Point1 */ if (Line->Point1.X == Line->Point2.X) { if (Line->Point1.Y > Line->Point2.Y) { - pcb_coord_t t; + rnd_coord_t t; t = Line->Point1.Y; Line->Point1.Y = Line->Point2.Y; Line->Point2.Y = t; @@ -923,7 +923,7 @@ } else if (Line->Point1.Y == Line->Point2.Y) { if (Line->Point1.X > Line->Point2.X) { - pcb_coord_t t; + rnd_coord_t t; t = Line->Point1.X; Line->Point1.X = Line->Point2.X; Line->Point2.X = t; @@ -933,7 +933,7 @@ pcb_line_bbox(Line); } -void pcb_line_rotate(pcb_layer_t *layer, pcb_line_t *line, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina) +void pcb_line_rotate(pcb_layer_t *layer, pcb_line_t *line, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina) { if (layer->line_tree != NULL) pcb_r_delete_entry(layer->line_tree, (pcb_box_t *) line); @@ -944,7 +944,7 @@ pcb_r_insert_entry(layer->line_tree, (pcb_box_t *) line); } -void pcb_line_mirror(pcb_line_t *line, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_line_mirror(pcb_line_t *line, rnd_coord_t y_offs, rnd_bool undoable) { undo_line_geo_t gtmp, *g = >mp; @@ -1059,7 +1059,7 @@ void *pcb_lineop_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { pcb_line_t *line; - pcb_coord_t X, Y; + rnd_coord_t X, Y; if (((Line->Point1.X == ctx->insert.x) && (Line->Point1.Y == ctx->insert.y)) || ((Line->Point2.X == ctx->insert.x) && (Line->Point2.Y == ctx->insert.y))) @@ -1121,9 +1121,9 @@ /*** draw ***/ -static pcb_bool is_line_term_vert(const pcb_line_t *line) +static rnd_bool is_line_term_vert(const pcb_line_t *line) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; dx = line->Point1.X - line->Point2.X; if (dx < 0) @@ -1156,7 +1156,7 @@ void pcb_line_draw_(pcb_draw_info_t *info, pcb_line_t *line, int allow_term_gfx) { - pcb_coord_t thickness = line->Thickness; + rnd_coord_t thickness = line->Thickness; if (delayed_terms_enabled && (line->term != NULL)) { pcb_draw_delay_obj_add((pcb_any_obj_t *)line); Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 30902) +++ trunk/src/obj_line.h (revision 30903) @@ -43,7 +43,7 @@ typedef struct { /* current marked line */ pcb_point_t Point1, Point2; /* start- and end-position */ long int State; - pcb_bool draw; + rnd_bool draw; } pcb_attached_line_t; @@ -51,10 +51,10 @@ pcb_line_t *pcb_line_alloc_id(pcb_layer_t *layer, long int id); void pcb_line_free(pcb_line_t * data); -pcb_line_t *pcb_line_new_merge(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); -pcb_line_t *pcb_line_new(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); +pcb_line_t *pcb_line_new_merge(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags); +pcb_line_t *pcb_line_new(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags); pcb_line_t *pcb_line_dup(pcb_layer_t *Layer, pcb_line_t *src); -pcb_line_t *pcb_line_dup_at(pcb_layer_t *dst, pcb_line_t *src, pcb_coord_t dx, pcb_coord_t dy); +pcb_line_t *pcb_line_dup_at(pcb_layer_t *dst, pcb_line_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_line_destroy(pcb_layer_t *dst, pcb_line_t *src); void pcb_line_reg(pcb_layer_t *layer, pcb_line_t *line); @@ -64,17 +64,17 @@ void pcb_add_line_on_layer(pcb_layer_t *Layer, pcb_line_t *Line); void pcb_line_bbox(pcb_line_t *Line); -void pcb_line_rotate90(pcb_line_t *Line, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -void pcb_line_rotate(pcb_layer_t *layer, pcb_line_t *line, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina); -void pcb_line_mirror(pcb_line_t *line, pcb_coord_t y_offs, pcb_bool undoable); +void pcb_line_rotate90(pcb_line_t *Line, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_line_rotate(pcb_layer_t *layer, pcb_line_t *line, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina); +void pcb_line_mirror(pcb_line_t *line, rnd_coord_t y_offs, rnd_bool undoable); void pcb_line_flip_side(pcb_layer_t *layer, pcb_line_t *line); void pcb_line_scale(pcb_line_t *line, double sx, double sy, double sth); -pcb_coord_t pcb_line_length(const pcb_line_t *line); +rnd_coord_t pcb_line_length(const pcb_line_t *line); double pcb_line_area(const pcb_line_t *line); /* Convert a square cap line (e.g. a gEDA/pcb pad) to 4 corner points of a rectangle */ -void pcb_sqline_to_rect(const pcb_line_t *line, pcb_coord_t *x, pcb_coord_t *y); +void pcb_sqline_to_rect(const pcb_line_t *line, rnd_coord_t *x, rnd_coord_t *y); /* hash and eq */ int pcb_line_eq(const pcb_host_trans_t *tr1, const pcb_line_t *l1, const pcb_host_trans_t *tr2, const pcb_line_t *l2); @@ -92,7 +92,7 @@ void pcb_line_adjust_attached(void); /* adjusts the insert lines to make them 45 degrees as necessary */ -void pcb_line_adjust_attached_2lines(pcb_bool); +void pcb_line_adjust_attached_2lines(rnd_bool); /* makes the attached line fit into a 45 degree direction */ void pcb_line_45(pcb_attached_line_t *); @@ -114,7 +114,7 @@ the fields of 'end' needed to find the closest point to the original target that still won't hit any object. Returns the straigh-line distance between start and the new end. */ -double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, pcb_bool way, pcb_bool optimize); +double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, rnd_bool way, rnd_bool optimize); /* Rather than mode the line bounding box, we set it so the point bounding @@ -122,7 +122,7 @@ */ #define pcb_line_move(l,dx,dy) \ do { \ - pcb_coord_t __dx__ = (dx), __dy__ = (dy); \ + rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_line_t *__l__ = (l); \ PCB_MOVE_POINT((__l__)->Point1.X,(__l__)->Point1.Y,(__dx__),(__dy__)); \ PCB_MOVE_POINT((__l__)->Point2.X,(__l__)->Point2.Y,(__dx__),(__dy__)); \ Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 30902) +++ trunk/src/obj_line_drcenf.c (revision 30903) @@ -72,7 +72,7 @@ */ void pcb_line_45(pcb_attached_line_t *Line) { - pcb_coord_t dx, dy, min; + rnd_coord_t dx, dy, min; unsigned direction = 0; double m; @@ -138,9 +138,9 @@ } } -void pcb_line_adjust_attached_2lines(pcb_bool way) +void pcb_line_adjust_attached_2lines(rnd_bool way) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; pcb_attached_line_t *line = &pcb_crosshair.AttachedLine; if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_FIRST) @@ -191,7 +191,7 @@ struct drc_info { pcb_line_t *line; - pcb_bool solder; + rnd_bool solder; jmp_buf env; }; @@ -225,15 +225,15 @@ return PCB_R_DIR_FOUND_CONTINUE; } -double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, pcb_bool way, pcb_bool optimize) +double pcb_drc_lines(pcb_board_t *pcb, const pcb_point_t *start, pcb_point_t *end, pcb_point_t *mid_out, rnd_bool way, rnd_bool optimize) { double f, s, f2, s2, len, best; - pcb_coord_t dx, dy, temp, last, length; - pcb_coord_t temp2, last2, length2; + rnd_coord_t dx, dy, temp, last, length; + rnd_coord_t temp2, last2, length2; pcb_line_t line1, line2; pcb_layergrp_id_t group, comp; struct drc_info info; - pcb_bool two_lines, x_is_long, blocker; + rnd_bool two_lines, x_is_long, blocker; pcb_point_t ans; f = 1.0; @@ -461,7 +461,7 @@ void pcb_line_enforce_drc(pcb_board_t *pcb) { pcb_point_t r45, rs, start; - pcb_bool shift; + rnd_bool shift; double r1, r2; /* Silence a bogus compiler warning by storing this in a variable */ Index: trunk/src/obj_pinvia_therm.c =================================================================== --- trunk/src/obj_pinvia_therm.c (revision 30902) +++ trunk/src/obj_pinvia_therm.c (revision 30903) @@ -41,11 +41,11 @@ #include #include "obj_pinvia_therm.h" -static pcb_polyarea_t *pcb_pa_diag_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t l, pcb_coord_t w, pcb_bool rt) +static pcb_polyarea_t *pcb_pa_diag_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t l, rnd_coord_t w, rnd_bool rt) { pcb_pline_t *c; pcb_vector_t v; - pcb_coord_t x1, x2, y1, y2; + rnd_coord_t x1, x2, y1, y2; if (rt) { x1 = (l - w) * M_SQRT1_2; @@ -81,7 +81,7 @@ * Usually this is 4 disjoint regions. * */ -pcb_polyarea_t *ThermPoly_(pcb_board_t *pcb, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t thickness, pcb_coord_t clearance, pcb_cardinal_t style) +pcb_polyarea_t *ThermPoly_(pcb_board_t *pcb, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, pcb_cardinal_t style) { pcb_arc_t a; pcb_polyarea_t *pa, *arc; @@ -92,8 +92,8 @@ case 2: { pcb_polyarea_t *m; - pcb_coord_t t = (thickness + clearance) / 2; - pcb_coord_t w = 0.5 * pcb->ThermScale * clearance; + rnd_coord_t t = (thickness + clearance) / 2; + rnd_coord_t w = 0.5 * pcb->ThermScale * clearance; pa = pcb_poly_from_circle(cx, cy, t); arc = pcb_poly_from_circle(cx, cy, thickness / 2); /* create a thin ring */ Index: trunk/src/obj_pinvia_therm.h =================================================================== --- trunk/src/obj_pinvia_therm.h (revision 30902) +++ trunk/src/obj_pinvia_therm.h (revision 30903) @@ -34,6 +34,6 @@ #include #include "config.h" -pcb_polyarea_t *ThermPoly_(pcb_board_t *p, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t thickness, pcb_coord_t clearance, pcb_cardinal_t style); +pcb_polyarea_t *ThermPoly_(pcb_board_t *p, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, pcb_cardinal_t style); #endif Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30902) +++ trunk/src/obj_poly.c (revision 30903) @@ -172,7 +172,7 @@ /*** utility ***/ /* rotates a polygon in 90 degree steps */ -void pcb_poly_rotate90(pcb_poly_t *Polygon, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_poly_rotate90(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { pcb_layer_t *layer = Polygon->parent.layer; assert(Polygon->parent_type = PCB_PARENT_LAYER); @@ -188,7 +188,7 @@ pcb_poly_bbox(Polygon); } -void pcb_poly_rotate(pcb_layer_t *layer, pcb_poly_t *polygon, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina) +void pcb_poly_rotate(pcb_layer_t *layer, pcb_poly_t *polygon, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina) { if (layer->polygon_tree != NULL) pcb_r_delete_entry(layer->polygon_tree, (pcb_box_t *) polygon); @@ -282,7 +282,7 @@ typedef struct { pcb_poly_t *poly; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t y_offs; + rnd_coord_t y_offs; } undo_poly_mirror_t; static int undo_poly_mirror_swap(void *udata) @@ -322,7 +322,7 @@ }; -void pcb_poly_mirror(pcb_poly_t *poly, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_poly_mirror(pcb_poly_t *poly, rnd_coord_t y_offs, rnd_bool undoable) { undo_poly_mirror_t gtmp, *g = >mp; @@ -386,7 +386,7 @@ /* clearance is generally considered to be part of the bbox for all objects */ { - pcb_coord_t clr = PCB_POLY_HAS_CLEARANCE(Polygon) ? Polygon->Clearance/2 : 0; + rnd_coord_t clr = PCB_POLY_HAS_CLEARANCE(Polygon) ? Polygon->Clearance/2 : 0; Polygon->BoundingBox.X1 = Polygon->bbox_naked.X1 - clr; Polygon->BoundingBox.Y1 = Polygon->bbox_naked.Y1 - clr; Polygon->BoundingBox.X2 = Polygon->bbox_naked.X2 + clr; @@ -407,7 +407,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p1) && !PCB_FLAG_TEST(PCB_FLAG_FLOATER, p2)) { pcb_cardinal_t n; for(n = 0; n < p1->PointN; n++) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; pcb_hash_tr_coords(tr1, &x1, &y1, p1->Points[n].X, p1->Points[n].Y); pcb_hash_tr_coords(tr2, &x2, &y2, p2->Points[n].X, p2->Points[n].Y); if ((x1 != x2) || (y1 != y2)) return 0; @@ -423,7 +423,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p)) for(n = 0; n < p->PointN; n++) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_hash_tr_coords(tr, &x, &y, p->Points[n].X, p->Points[n].Y); crd ^= pcb_hash_coord(x) ^ pcb_hash_coord(y); @@ -434,7 +434,7 @@ /* creates a new polygon from the old formats rectangle data */ -pcb_poly_t *pcb_poly_new_from_rectangle(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_poly_t *pcb_poly_new_from_rectangle(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Clearance, pcb_flag_t Flags) { pcb_poly_t *polygon = pcb_poly_new(Layer, Clearance, Flags); if (!polygon) @@ -449,9 +449,9 @@ return polygon; } -pcb_poly_t *pcb_poly_new_from_poly(pcb_layer_t *Layer, pcb_poly_t *src, pcb_coord_t offs, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_poly_t *pcb_poly_new_from_poly(pcb_layer_t *Layer, pcb_poly_t *src, rnd_coord_t offs, rnd_coord_t Clearance, pcb_flag_t Flags) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_poly_it_t it; pcb_pline_t *pl; int go; @@ -486,7 +486,7 @@ } /* creates a new polygon on a layer */ -pcb_poly_t *pcb_poly_new(pcb_layer_t *Layer, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_poly_t *pcb_poly_new(pcb_layer_t *Layer, rnd_coord_t Clearance, pcb_flag_t Flags) { pcb_poly_t *polygon = pcb_poly_alloc(Layer); @@ -522,7 +522,7 @@ return p; } -pcb_poly_t *pcb_poly_dup_at(pcb_layer_t *dst, pcb_poly_t *src, pcb_coord_t dx, pcb_coord_t dy) +pcb_poly_t *pcb_poly_dup_at(pcb_layer_t *dst, pcb_poly_t *src, rnd_coord_t dx, rnd_coord_t dy) { pcb_board_t *pcb; pcb_poly_t *p = pcb_poly_new(dst, src->Clearance, src->Flags); @@ -537,7 +537,7 @@ } /* creates a new point in a polygon */ -pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, pcb_coord_t X, pcb_coord_t Y) +pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) { pcb_point_t *point = pcb_poly_point_alloc(Polygon); @@ -558,7 +558,7 @@ } /* copies data from one polygon to another; 'Dest' has to exist */ -pcb_poly_t *pcb_poly_copy(pcb_poly_t *Dest, pcb_poly_t *Src, pcb_coord_t dx, pcb_coord_t dy) +pcb_poly_t *pcb_poly_copy(pcb_poly_t *Dest, pcb_poly_t *Src, rnd_coord_t dx, rnd_coord_t dy) { pcb_cardinal_t hole = 0; pcb_cardinal_t n; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_polyop_move_buffer\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_polyop_move_buffer\n"); return NULL; } dstly = &ctx->buffer.dst->Layer[lid]; @@ -681,7 +681,7 @@ void *pcb_polyop_change_clear_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *poly) { if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, poly)) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : poly->Clearance + ctx->chgsize.value; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : poly->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, poly)) return NULL; @@ -706,7 +706,7 @@ } /* poly does not clear other polys */ - pcb_message(PCB_MSG_WARNING, + rnd_message(PCB_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", @@ -797,7 +797,7 @@ } /* low level routine to move a polygon */ -void pcb_poly_move(pcb_poly_t *Polygon, pcb_coord_t DX, pcb_coord_t DY) +void pcb_poly_move(pcb_poly_t *Polygon, rnd_coord_t DX, rnd_coord_t DY) { PCB_POLY_POINT_LOOP(Polygon); { @@ -885,7 +885,7 @@ pcb_poly_t *newone; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Polygon)) { - pcb_message(PCB_MSG_WARNING, "Sorry, polygon object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, polygon object is locked\n"); return NULL; } if (Layer == ctx->move.dst_layer) @@ -1196,9 +1196,9 @@ /*** draw ***/ -static pcb_bool is_poly_term_vert(const pcb_poly_t *poly) +static rnd_bool is_poly_term_vert(const pcb_poly_t *poly) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; dx = poly->BoundingBox.X2 - poly->BoundingBox.X1; if (dx < 0) @@ -1255,11 +1255,11 @@ pcb_render->draw_line(pcb_draw_out.fgGC, poly->Points[n-1].X, poly->Points[n-1].Y, poly->Points[0].X, poly->Points[0].Y); } -static void pcb_poly_draw_tr_offs(pcb_poly_it_t *it, pcb_coord_t offs) +static void pcb_poly_draw_tr_offs(pcb_poly_it_t *it, rnd_coord_t offs) { int go; long len, n; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_polo_t *p, p_st[256]; /* calculate length of the polyline */ @@ -1294,7 +1294,7 @@ pcb_poly_t *np = pcb_poly_alloc(polygon->parent.layer); pcb_poly_it_t it; pcb_polyarea_t *pa; - pcb_coord_t offs = info->xform->bloat / 2; + rnd_coord_t offs = info->xform->bloat / 2; pcb_poly_copy(np, polygon, 0, 0); pcb_polyarea_copy0(&np->Clipped, polygon->Clipped); @@ -1349,7 +1349,7 @@ head = polygon->Clipped->contours->head; pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_square); for(n = head, i = 0; (n != head) || (i == 0); n = n->next, i++) { - pcb_coord_t x, y, r; + rnd_coord_t x, y, r; x = (n->prev->point[0] + n->point[0] + n->next->point[0]) / 3; y = (n->prev->point[1] + n->point[1] + n->next->point[1]) / 3; Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 30902) +++ trunk/src/obj_poly.h (revision 30903) @@ -38,7 +38,7 @@ struct pcb_poly_s { /* holds information about a polygon */ PCB_ANY_PRIMITIVE_FIELDS; - pcb_coord_t Clearance; + rnd_coord_t Clearance; pcb_cardinal_t PointN; /* number of points in polygon */ pcb_cardinal_t PointMax; /* max number from malloc() */ pcb_polyarea_t *Clipped; /* the clipped region of this polygon */ @@ -65,23 +65,23 @@ void pcb_poly_unreg(pcb_poly_t *poly); void pcb_poly_bbox(pcb_poly_t *Polygon); -pcb_poly_t *pcb_poly_new_from_rectangle(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Clearance, pcb_flag_t Flags); -pcb_poly_t *pcb_poly_new_from_poly(pcb_layer_t *Layer, pcb_poly_t *src, pcb_coord_t offs, pcb_coord_t Clearance, pcb_flag_t Flags); -pcb_poly_t *pcb_poly_new(pcb_layer_t *Layer, pcb_coord_t Clearance, pcb_flag_t Flags); +pcb_poly_t *pcb_poly_new_from_rectangle(pcb_layer_t *Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Clearance, pcb_flag_t Flags); +pcb_poly_t *pcb_poly_new_from_poly(pcb_layer_t *Layer, pcb_poly_t *src, rnd_coord_t offs, rnd_coord_t Clearance, pcb_flag_t Flags); +pcb_poly_t *pcb_poly_new(pcb_layer_t *Layer, rnd_coord_t Clearance, pcb_flag_t Flags); pcb_poly_t *pcb_poly_dup(pcb_layer_t *dst, pcb_poly_t *src); -pcb_poly_t *pcb_poly_dup_at(pcb_layer_t *dst, pcb_poly_t *src, pcb_coord_t dx, pcb_coord_t dy); -pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, pcb_coord_t X, pcb_coord_t Y); +pcb_poly_t *pcb_poly_dup_at(pcb_layer_t *dst, pcb_poly_t *src, rnd_coord_t dx, rnd_coord_t dy); +pcb_point_t *pcb_poly_point_new(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y); pcb_poly_t *pcb_poly_hole_new(pcb_poly_t * Polygon); void *pcb_poly_remove(pcb_layer_t *Layer, pcb_poly_t *Polygon); -void pcb_poly_rotate90(pcb_poly_t *Polygon, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -void pcb_poly_rotate(pcb_layer_t *layer, pcb_poly_t *poly, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina); -void pcb_poly_mirror(pcb_poly_t *polygon, pcb_coord_t y_offs, pcb_bool undoable); +void pcb_poly_rotate90(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_poly_rotate(pcb_layer_t *layer, pcb_poly_t *poly, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina); +void pcb_poly_mirror(pcb_poly_t *polygon, rnd_coord_t y_offs, rnd_bool undoable); void pcb_poly_flip_side(pcb_layer_t *layer, pcb_poly_t *polygon); void pcb_poly_scale(pcb_poly_t *poly, double sx, double sy); -void pcb_poly_move(pcb_poly_t *Polygon, pcb_coord_t DX, pcb_coord_t DY); -pcb_poly_t *pcb_poly_copy(pcb_poly_t *Dest, pcb_poly_t *Src, pcb_coord_t dx, pcb_coord_t dy); +void pcb_poly_move(pcb_poly_t *Polygon, rnd_coord_t DX, rnd_coord_t DY); +pcb_poly_t *pcb_poly_copy(pcb_poly_t *Dest, pcb_poly_t *Src, rnd_coord_t dx, rnd_coord_t dy); void pcb_poly_pre(pcb_poly_t *poly); void pcb_poly_post(pcb_poly_t *poly); @@ -116,7 +116,7 @@ } pcb_poly_event_t; /* return non-zero to quit mapping immediatley */ -typedef int pcb_poly_map_cb_t(pcb_poly_t *p, void *ctx, pcb_poly_event_t ev, pcb_coord_t x, pcb_coord_t y); +typedef int pcb_poly_map_cb_t(pcb_poly_t *p, void *ctx, pcb_poly_event_t ev, rnd_coord_t x, rnd_coord_t y); /* call cb for each point of each island and cutout */ void pcb_poly_map_contours(pcb_poly_t *p, void *ctx, pcb_poly_map_cb_t *cb); @@ -172,7 +172,7 @@ /* Set the iterator to the first point of the last selected contour or hole; read the coords into x,y; returns 1 on success, 0 if there are no points */ -PCB_INLINE int pcb_poly_vect_first(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE int pcb_poly_vect_first(pcb_poly_it_t *it, rnd_coord_t *x, rnd_coord_t *y) { it->v = it->cntr->head->next; if (it->v == NULL) @@ -185,7 +185,7 @@ /* Set the iterator to the next point of the last selected contour or hole; read the coords into x,y; returns 1 on success, 0 if there are were more points */ -PCB_INLINE int pcb_poly_vect_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE int pcb_poly_vect_next(pcb_poly_it_t *it, rnd_coord_t *x, rnd_coord_t *y) { it->v = it->v->next; if (it->v == it->cntr->head->next) @@ -196,7 +196,7 @@ } /* read the previous contour/hole coords into x,y, without bumping the iterator */ -PCB_INLINE void pcb_poly_vect_peek_prev(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE void pcb_poly_vect_peek_prev(pcb_poly_it_t *it, rnd_coord_t *x, rnd_coord_t *y) { *x = it->v->prev->point[0]; *y = it->v->prev->point[1]; @@ -203,7 +203,7 @@ } /* read the next contour/hole coords into x,y, without bumping the iterator */ -PCB_INLINE void pcb_poly_vect_peek_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE void pcb_poly_vect_peek_next(pcb_poly_it_t *it, rnd_coord_t *x, rnd_coord_t *y) { *x = it->v->next->point[0]; *y = it->v->next->point[1]; @@ -221,7 +221,7 @@ /* construct the full poly clearance cutout for the pa in the iterator and add it to dst - implemented in polygon.c */ -void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, pcb_coord_t clearance); +void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance); #define pcb_poly_ppclear_at(poly, layer) \ Index: trunk/src/obj_poly_draw_helper.c =================================================================== --- trunk/src/obj_poly_draw_helper.c (revision 30902) +++ trunk/src/obj_poly_draw_helper.c (revision 30903) @@ -34,7 +34,7 @@ #include "obj_poly.h" #include -static pcb_coord_t *fc_x = NULL, *fc_y = NULL; +static rnd_coord_t *fc_x = NULL, *fc_y = NULL; static size_t fc_alloced = 0; @@ -41,7 +41,7 @@ /* call this before the loop */ #define vert_opt_begin() \ { \ - pcb_coord_t last_x, last_y, this_x, this_y, next_x, next_y, mindist; \ + rnd_coord_t last_x, last_y, this_x, this_y, next_x, next_y, mindist; \ last_x = pl->head->point[0]; \ last_y = pl->head->point[1]; \ v = pl->head->next; \ @@ -80,8 +80,8 @@ if (n > fc_alloced) { free(fc_x); free(fc_y); - fc_x = (pcb_coord_t *) malloc(n * sizeof(pcb_coord_t)); - fc_y = (pcb_coord_t *) malloc(n * sizeof(pcb_coord_t)); + fc_x = (rnd_coord_t *) malloc(n * sizeof(rnd_coord_t)); + fc_y = (rnd_coord_t *) malloc(n * sizeof(rnd_coord_t)); fc_alloced = n; } @@ -184,7 +184,7 @@ #define BOUNDS_INSIDE_CLIP_THRESHOLD 0.5 static int should_compute_no_holes(pcb_poly_t * poly, const pcb_box_t * clip_box) { - pcb_coord_t x1, x2, y1, y2; + rnd_coord_t x1, x2, y1, y2; double poly_bounding_area; double clipped_poly_area; Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30902) +++ trunk/src/obj_pstk.c (revision 30903) @@ -113,7 +113,7 @@ free(ps); } -pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror) +pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror) { pcb_pstk_t *ps; @@ -140,7 +140,7 @@ return ps; } -pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags) +pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags) { return pcb_pstk_new_tr(data, id, proto, x, y, clearance, Flags, 0, 0, 0); } @@ -155,7 +155,7 @@ PCB_SET_PARENT(ps, data, data); } -static void pcb_pstk_bbox_(pcb_box_t *dst, pcb_pstk_t *ps, pcb_bool copper_only) +static void pcb_pstk_bbox_(pcb_box_t *dst, pcb_pstk_t *ps, rnd_bool copper_only) { int n, sn; pcb_line_t line; @@ -233,7 +233,7 @@ if (floor(fmod((p1->rot * rotdir1) + tr1->rot, 360.0)*10000) != floor(fmod((p2->rot * rotdir2) + tr2->rot, 360.0)*10000)) return 0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p1) && !PCB_FLAG_TEST(PCB_FLAG_FLOATER, p2)) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; pcb_hash_tr_coords(tr1, &x1, &y1, p1->x, p1->y); pcb_hash_tr_coords(tr2, &x2, &y2, p2->x, p2->y); @@ -250,7 +250,7 @@ double rotdir = tr->on_bottom ? -1.0 : 1.0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_hash_tr_coords(tr, &x, &y, p->x, p->y); crd = pcb_hash_coord(x) ^ pcb_hash_coord(y); @@ -291,7 +291,7 @@ return dst; } -void pcb_pstk_move_(pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy) +void pcb_pstk_move_(pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy) { ps->x += dx; ps->y += dy; @@ -305,7 +305,7 @@ ps->bbox_naked.Y2 += dy; } -void pcb_pstk_move(pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy, pcb_bool more_to_come) +void pcb_pstk_move(pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy, rnd_bool more_to_come) { pcb_opctx_t ctx; ctx.move.pcb = NULL; @@ -416,7 +416,7 @@ &conf_core.appearance.color.selected : &conf_core.appearance.color.padstackmark); } -static void pcb_pstk_draw_poly(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape, int fill, pcb_coord_t dthick) +static void pcb_pstk_draw_poly(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape, int fill, rnd_coord_t dthick) { long n; @@ -426,7 +426,7 @@ if (dthick != 0) { /* slow - but would be used on export mostly, not on-screen drawing */ pcb_polo_t *p, p_st[32]; - pcb_coord_t *x, *y, xy_st[64]; + rnd_coord_t *x, *y, xy_st[64]; double vl = pcb_round(-dthick/2); long n; @@ -436,7 +436,7 @@ if (shape->data.poly.len >= sizeof(p_st) / sizeof(p_st[0])) { p = malloc(sizeof(pcb_polo_t) * shape->data.poly.len); - x = malloc(sizeof(pcb_coord_t) * shape->data.poly.len); + x = malloc(sizeof(rnd_coord_t) * shape->data.poly.len); } else { p = p_st; @@ -481,7 +481,7 @@ static void pcb_pstk_draw_shape_solid(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) { - pcb_coord_t r, dthick = 0; + rnd_coord_t r, dthick = 0; if ((info != NULL) && (info->xform != NULL) && (info->xform->bloat != 0)) dthick = info->xform->bloat; @@ -506,7 +506,7 @@ static void pcb_pstk_draw_shape_thin(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) { - pcb_coord_t r, dthick = 0; + rnd_coord_t r, dthick = 0; pcb_hid_set_line_cap(gc, pcb_cap_round); if ((info != NULL) && (info->xform != NULL) && (info->xform->bloat != 0)) @@ -581,7 +581,7 @@ { pcb_pstk_t *ps = (pcb_pstk_t *)b; pcb_pstk_proto_t *proto; - pcb_coord_t mark, mark2; + rnd_coord_t mark, mark2; /* mark is a cross in the middle, right on the hole; cross size should extend beyond the hole */ @@ -672,7 +672,7 @@ /* indicate unplated holes with an arc; unplated holes are more rare than plated holes, thus unplated holes are indicated */ if (!proto->hplated && !pcb_xform_omit_overlay(info)) { - pcb_coord_t r = proto->hdia / 2; + rnd_coord_t r = proto->hdia / 2; r -= r/8; /* +12.5% */ pcb_render->set_color(pcb_draw_out.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? &conf_core.appearance.color.selected : &conf_core.appearance.color.subc); pcb_hid_set_line_width(pcb_draw_out.fgGC, 0); @@ -760,8 +760,8 @@ void pcb_pstk_draw_label(pcb_draw_info_t *info, pcb_pstk_t *ps) { - pcb_bool vert; - pcb_coord_t dx, dy; + rnd_bool vert; + rnd_coord_t dx, dy; if (ps->term == NULL) return; @@ -776,7 +776,7 @@ vert = dx < dy; #ifdef PCB_PSTK_LABEL_OFFCENTER - pcb_coord_t offs = 0; + rnd_coord_t offs = 0; pcb_pstk_proto_t *proto; proto = pcb_pstk_get_proto(ps); if ((proto != NULL) && (proto->hdia > 0)) @@ -787,7 +787,7 @@ } static pcb_xform_t dummy_xform; -void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, pcb_bool mark, pcb_bool label, const pcb_box_t *drawn_area) +void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const pcb_box_t *drawn_area) { pcb_draw_info_t info; int n, draw_hole = 0; @@ -1006,7 +1006,7 @@ return pcb_pstk_near_box_(ps, box, shp); } -static int pcb_is_point_in_pstk_(pcb_pstk_t *ps, pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, pcb_pstk_shape_t *shape) +static int pcb_is_point_in_pstk_(pcb_pstk_t *ps, rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, pcb_pstk_shape_t *shape) { pcb_any_line_t pad; pcb_vector_t v; @@ -1036,7 +1036,7 @@ return 0; } -int pcb_is_point_in_pstk(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, pcb_pstk_t *ps, pcb_layer_t *layer) +int pcb_is_point_in_pstk(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, pcb_pstk_t *ps, pcb_layer_t *layer) { pcb_pstk_shape_t *shp; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); @@ -1069,7 +1069,7 @@ return pcb_is_point_in_pstk_(ps, x, y, radius, shp); } -int pcb_pstk_drc_check_clearance(pcb_pstk_t *ps, pcb_poly_t *polygon, pcb_coord_t min_clr) +int pcb_pstk_drc_check_clearance(pcb_pstk_t *ps, pcb_poly_t *polygon, rnd_coord_t min_clr) { int n; pcb_pstk_tshape_t *ts; @@ -1090,7 +1090,7 @@ /* Check the minimum distance between a hole's edge and a shape's edge and indicate error if it's smaller than min */ -static pcb_bool pcb_pstk_shape_hole_break(pcb_pstk_shape_t *shp, pcb_coord_t hdia, pcb_coord_t min) +static rnd_bool pcb_pstk_shape_hole_break(pcb_pstk_shape_t *shp, rnd_coord_t hdia, rnd_coord_t min) { double dist, neck, mindist2, dist2; pcb_line_t line; @@ -1147,7 +1147,7 @@ return neck < min; } -void pcb_pstk_drc_check_and_warn(pcb_pstk_t *ps, pcb_coord_t *err_minring, pcb_coord_t *err_minhole, pcb_coord_t minring, pcb_coord_t mindrill) +void pcb_pstk_drc_check_and_warn(pcb_pstk_t *ps, rnd_coord_t *err_minring, rnd_coord_t *err_minhole, rnd_coord_t minring, rnd_coord_t mindrill) { pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); @@ -1175,7 +1175,7 @@ typedef struct { pcb_pstk_t *pstk; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t y_offs; + rnd_coord_t y_offs; int swap_side; int disable_xmirror; } undo_pstk_mirror_t; @@ -1230,7 +1230,7 @@ -void pcb_pstk_mirror(pcb_pstk_t *ps, pcb_coord_t y_offs, int swap_side, int disable_xmirror, pcb_bool undoable) +void pcb_pstk_mirror(pcb_pstk_t *ps, rnd_coord_t y_offs, int swap_side, int disable_xmirror, rnd_bool undoable) { undo_pstk_mirror_t gtmp, *g = >mp; @@ -1365,7 +1365,7 @@ long int ID; /* ID of the padstack */ pcb_cardinal_t proto; - pcb_coord_t clearance; + rnd_coord_t clearance; double rot; int xmirror, smirror; } padstack_change_instance_t; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack change: padstack ID #%ld is not available\n", u->ID); + rnd_message(PCB_MSG_ERROR, "Can't undo padstack change: padstack ID #%ld is not available\n", u->ID); return -1; } @@ -1417,7 +1417,7 @@ pcb_r_delete_entry(ps->parent.data->padstack_tree, (pcb_box_t *)ps); swap(ps->proto, u->proto, pcb_cardinal_t); - swap(ps->Clearance, u->clearance, pcb_coord_t); + swap(ps->Clearance, u->clearance, rnd_coord_t); swap(ps->rot, u->rot, double); swap(ps->xmirror, u->xmirror, int); swap(ps->smirror, u->smirror, int); @@ -1449,7 +1449,7 @@ undo_change_instance_print }; -int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const pcb_coord_t *clearance, double *rot, int *xmirror, int *smirror) +int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror) { padstack_change_instance_t *u; long int parent_ID; @@ -1508,7 +1508,7 @@ return 0; } -pcb_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid) +rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid) { pcb_layergrp_t *g = &pcb->LayerGroups.grp[gid]; @@ -1525,7 +1525,7 @@ #include "obj_pstk_op.c" -void pcb_pstk_rotate90(pcb_pstk_t *pstk, pcb_coord_t cx, pcb_coord_t cy, int steps) +void pcb_pstk_rotate90(pcb_pstk_t *pstk, rnd_coord_t cx, rnd_coord_t cy, int steps) { pcb_opctx_t ctx; @@ -1535,7 +1535,7 @@ pcb_pstkop_rotate90(&ctx, pstk); } -void pcb_pstk_rotate(pcb_pstk_t *pstk, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina, double angle) +void pcb_pstk_rotate(pcb_pstk_t *pstk, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina, double angle) { pcb_opctx_t ctx; @@ -1547,7 +1547,7 @@ pcb_pstkop_rotate(&ctx, pstk); } -pcb_coord_t obj_pstk_get_clearance(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer) +rnd_coord_t obj_pstk_get_clearance(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer) { pcb_pstk_shape_t *shp; Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 30902) +++ trunk/src/obj_pstk.h (revision 30903) @@ -38,8 +38,8 @@ #undef thermal pcb_cardinal_t proto; /* reference to a pcb_pstk_proto_t within pcb_data_t */ int protoi; /* index of the transformed proto; -1 means invalid; local cache, not saved */ - pcb_coord_t x, y; - pcb_coord_t Clearance; + rnd_coord_t x, y; + rnd_coord_t Clearance; double rot; /* rotation angle */ char xmirror, smirror; struct { @@ -68,7 +68,7 @@ unsigned hplated:1; /* if > 0, whether the hole is plated */ char *name; /* optional user assigned name (or NULL) */ - pcb_coord_t hdia; /* if > 0, diameter of the hole (else there's no hole) */ + rnd_coord_t hdia; /* if > 0, diameter of the hole (else there's no hole) */ int htop, hbottom; /* if hdia > 0, determine the hole's span, counted in copper layer groups from the top or bottom copper layer group */ pcb_vtpadstack_tshape_t tr; /* [0] is the canonical prototype with rot=0, xmirror=0 and smirror=0; the rest is an unordered list of transformed entries */ @@ -90,8 +90,8 @@ pcb_pstk_t *pcb_pstk_alloc(pcb_data_t *data); pcb_pstk_t *pcb_pstk_alloc_id(pcb_data_t *data, long int id); void pcb_pstk_free(pcb_pstk_t *ps); -pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags); -pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror); +pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags); +pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror); void pcb_pstk_add(pcb_data_t *data, pcb_pstk_t *ps); void pcb_pstk_bbox(pcb_pstk_t *ps); void pcb_pstk_copper_bbox(pcb_box_t *dst, pcb_pstk_t *ps); @@ -114,10 +114,10 @@ pcb_pstk_t *pcb_pstk_by_id(pcb_data_t *base, long int ID); /* Undoably change the instance parameters of a padstack ref */ -int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const pcb_coord_t *clearance, double *rot, int *xmirror, int *smirror); +int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror); /* Return whether a group is empty (free of padstack shapes) */ -pcb_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid); +rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid); /* Copy all metadata (attributes, thermals, etc.) */ pcb_pstk_t *pcb_pstk_copy_meta(pcb_pstk_t *dst, pcb_pstk_t *src); @@ -126,7 +126,7 @@ pcb_pstk_t *pcb_pstk_copy_orient(pcb_pstk_t *dst, pcb_pstk_t *src); /* Clearance of the padstack on a given layer */ -pcb_coord_t obj_pstk_get_clearance(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer); +rnd_coord_t obj_pstk_get_clearance(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer); /*** proto ***/ @@ -133,17 +133,17 @@ /* Convert selection or current buffer to padstack; returns PCB_PADSTACK_INVALID on error; looks for existing matching protos to avoid adding redundant entries */ -pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, pcb_coord_t ox, pcb_coord_t oy); +pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy); pcb_cardinal_t pcb_pstk_conv_buffer(int quiet); /* Low level converter: take an array of (pcb_any_obj_t *) objs and convert them into shapes of the dst proto. Does not remove input objects. */ -int pcb_pstk_proto_conv(pcb_data_t *data, pcb_pstk_proto_t *dst, int quiet, vtp0_t *objs, pcb_coord_t ox, pcb_coord_t oy); +int pcb_pstk_proto_conv(pcb_data_t *data, pcb_pstk_proto_t *dst, int quiet, vtp0_t *objs, rnd_coord_t ox, rnd_coord_t oy); /* Break up src into discrete non-pstk objects placed in dst, one object per layer type. The hole is ignored. If remove_src is true, also remove src padstack. */ -int pcb_pstk_proto_breakup(pcb_data_t *dst, pcb_pstk_t *src, pcb_bool remove_src); +int pcb_pstk_proto_breakup(pcb_data_t *dst, pcb_pstk_t *src, rnd_bool remove_src); /* free fields of a proto (not freeing the proto itself, not removing it from lists */ void pcb_pstk_proto_free_fields(pcb_pstk_proto_t *dst); @@ -158,16 +158,16 @@ /* geometry for select.c and search.c; if layer is NULL, consider all shapes */ int pcb_pstk_near_box(pcb_pstk_t *ps, pcb_box_t *box, pcb_layer_t *layer); -int pcb_is_point_in_pstk(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, pcb_pstk_t *ps, pcb_layer_t *layer); +int pcb_is_point_in_pstk(rnd_coord_t x, rnd_coord_t y, rnd_coord_t radius, pcb_pstk_t *ps, pcb_layer_t *layer); /* Check if padstack has the proper clearance against polygon; returns 0 if everything's fine */ -int pcb_pstk_drc_check_clearance(pcb_pstk_t *ps, pcb_poly_t *polygon, pcb_coord_t min_clr); +int pcb_pstk_drc_check_clearance(pcb_pstk_t *ps, pcb_poly_t *polygon, rnd_coord_t min_clr); /* Check all possible local drc errors regarding to pad stacks - errors that depend only on the padstack, not on other objects. load err_minring and err_minhole with the relevant data for the report when ring or hole rules are violated */ -void pcb_pstk_drc_check_and_warn(pcb_pstk_t *ps, pcb_coord_t *err_minring, pcb_coord_t *err_minhole, pcb_coord_t minring, pcb_coord_t mindrill); +void pcb_pstk_drc_check_and_warn(pcb_pstk_t *ps, rnd_coord_t *err_minring, rnd_coord_t *err_minhole, rnd_coord_t minring, rnd_coord_t mindrill); /* Generate poly->pa (which should be NULL at the time of call) */ void pcb_pstk_shape_update_pa(pcb_pstk_poly_t *poly); @@ -181,7 +181,7 @@ /* Change the non-NULL hole properties of a padstack proto; undoable. Returns 0 on success. */ -int pcb_pstk_proto_change_hole(pcb_pstk_proto_t *proto, const int *hplated, const pcb_coord_t *hdia, const int *htop, const int *hbottom); +int pcb_pstk_proto_change_hole(pcb_pstk_proto_t *proto, const int *hplated, const rnd_coord_t *hdia, const int *htop, const int *hbottom); /* Change the name of a padstack proto; not yet undoable. Returns 0 on success. */ @@ -198,16 +198,16 @@ void pcb_pstk_shape_free(pcb_pstk_shape_t *s); /* grow (or shrink) a prototype to or by val - change the proto in place */ -void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, pcb_bool is_absolute, pcb_coord_t val); -void pcb_pstk_shape_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val); -void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable); -void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val); -void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable); +void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, rnd_bool is_absolute, rnd_coord_t val); +void pcb_pstk_shape_grow_(pcb_pstk_shape_t *shp, rnd_bool is_absolute, rnd_coord_t val); +void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, rnd_bool is_absolute, rnd_coord_t val, int undoable); +void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, rnd_bool is_absolute, rnd_coord_t val); +void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, rnd_bool is_absolute, rnd_coord_t val, int undoable); void pcb_pstk_shape_scale(pcb_pstk_proto_t *proto, int tridx, int shpidx, double sx, double sy, int undoable); /* Derive (copy and bloat) the shape at dst_idx from src_idx; set the mask and comb for the new shape. If dst_idx is -1, allocate the new shape */ -void pcb_pstk_shape_derive(pcb_pstk_proto_t *proto, int dst_idx, int src_idx, pcb_coord_t bloat, pcb_layer_type_t mask, pcb_layer_combining_t comb); +void pcb_pstk_shape_derive(pcb_pstk_proto_t *proto, int dst_idx, int src_idx, rnd_coord_t bloat, pcb_layer_type_t mask, pcb_layer_combining_t comb); /* Swap the layer definition of two shapes within a prototype; returns 0 on success */ int pcb_pstk_shape_swap_layer(pcb_pstk_proto_t *proto, int idx1, int idx2); @@ -229,7 +229,7 @@ are already mirrored so they represent the other-side geometry (e.g. when importing from old pcb formats). If y_offs is PCB_PSTK_DONT_MIRROR_COORDS, do not change the y coord */ -void pcb_pstk_mirror(pcb_pstk_t *ps, pcb_coord_t y_offs, int swap_side, int disable_xmirror, pcb_bool undoable); +void pcb_pstk_mirror(pcb_pstk_t *ps, rnd_coord_t y_offs, int swap_side, int disable_xmirror, rnd_bool undoable); /* Create a new proto and scale it for the padstack; center x and y are scaled too */ void pcb_pstk_scale(pcb_pstk_t *ps, double sx, double sy, int undoable); @@ -236,14 +236,14 @@ /* Rotate in place (op wrapper) */ -void pcb_pstk_rotate90(pcb_pstk_t *pstk, pcb_coord_t cx, pcb_coord_t cy, int steps); -void pcb_pstk_rotate(pcb_pstk_t *pstk, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina, double angle); +void pcb_pstk_rotate90(pcb_pstk_t *pstk, rnd_coord_t cx, rnd_coord_t cy, int steps); +void pcb_pstk_rotate(pcb_pstk_t *pstk, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina, double angle); /* High level move (op wrapper; no undo) */ -void pcb_pstk_move(pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy, pcb_bool more_to_come); +void pcb_pstk_move(pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy, rnd_bool more_to_come); /* Low level move - updates only the coordinates and the bbox */ -void pcb_pstk_move_(pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy); +void pcb_pstk_move_(pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy); /* Temporary hack until we have a refcounted objects and ID->pcb_any_obj_t hash */ extern pcb_data_t *pcb_pstk_data_hack; @@ -280,7 +280,7 @@ pcb_layer_combining_t comb; int auto_from[2]; - pcb_coord_t auto_bloat; + rnd_coord_t auto_bloat; } pcb_proto_layer_t; #define PCB_PROTO_MASK_BLOAT PCB_MIL_TO_COORD(2*3) Index: trunk/src/obj_pstk_act.c =================================================================== --- trunk/src/obj_pstk_act.c (revision 30902) +++ trunk/src/obj_pstk_act.c (revision 30903) @@ -42,7 +42,7 @@ fgw_error_t pcb_act_padstackconvert(fgw_arg_t *res, int argc, fgw_arg_t *argv) { int op; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_cardinal_t pid; pcb_pstk_proto_t tmp, *p; @@ -89,7 +89,7 @@ } if (pid != PCB_PADSTACK_INVALID) { - pcb_message(PCB_MSG_INFO, "Pad stack registered with ID %d\n", pid); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "(failed to convert to padstack)\n", pid); + rnd_message(PCB_MSG_ERROR, "(failed to convert to padstack)\n", pid); RND_ACT_IRES(1); } @@ -117,16 +117,16 @@ void *ptr1, *ptr2, *ptr3; pcb_pstk_t *ps; pcb_objtype_t type; - pcb_coord_t x, y; + rnd_coord_t x, y; 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) { - pcb_message(PCB_MSG_ERROR, "Need a padstack under the cursor\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Sorry, that padstack is locked\n"); + rnd_message(PCB_MSG_ERROR, "Sorry, that padstack is locked\n"); break; } RND_ACT_IRES(pcb_pstk_proto_breakup(PCB->Data, ps, 1)); @@ -169,7 +169,7 @@ const char *pids = NULL; pcb_cardinal_t pid; pcb_pstk_t *ps; - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, padstackplace, pids = argv[1].val.str); @@ -192,19 +192,19 @@ char *end; pid = strtol(pids, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Error in proto ID format: need an integer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid padstack proto %ld\n", (long)pid); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to place padstack\n"); + rnd_message(PCB_MSG_ERROR, "Failed to place padstack\n"); return -1; } Index: trunk/src/obj_pstk_draw.h =================================================================== --- trunk/src/obj_pstk_draw.h (revision 30902) +++ trunk/src/obj_pstk_draw.h (revision 30903) @@ -51,7 +51,7 @@ /* Draw a padstack for perview; if layers is NULL, draw all layers, else draw the layers where it is not zero (layers are defined in pcb_proto_layers[]) */ -void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, pcb_bool mark, pcb_bool label, const pcb_box_t *drawn_area); +void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const pcb_box_t *drawn_area); #endif Index: trunk/src/obj_pstk_op.c =================================================================== --- trunk/src/obj_pstk_op.c (revision 30902) +++ trunk/src/obj_pstk_op.c (revision 30903) @@ -194,7 +194,7 @@ rot = 0; if (pcb_pstk_change_instance(ps, NULL, NULL, &rot, NULL, NULL) == 0) { - pcb_coord_t nx = ps->x, ny = ps->y; + rnd_coord_t nx = ps->x, ny = ps->y; pcb_poly_restore_to_poly(ps->parent.data, PCB_OBJ_PSTK, NULL, ps); @@ -273,7 +273,7 @@ void *pcb_pstkop_change_clear_size(pcb_opctx_t *ctx, pcb_pstk_t *ps) { - pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value / 2 : ps->Clearance + ctx->chgsize.value / 2; + rnd_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value / 2 : ps->Clearance + ctx->chgsize.value / 2; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, ps)) return NULL; Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 30902) +++ trunk/src/obj_pstk_proto.c (revision 30903) @@ -121,7 +121,7 @@ return &ts->shape[idx]; } -static void append_circle(pcb_pstk_tshape_t *ts, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_coord_t dia) +static void append_circle(pcb_pstk_tshape_t *ts, pcb_layer_type_t lyt, pcb_layer_combining_t comb, rnd_coord_t dia) { int idx = ts->len; @@ -154,7 +154,7 @@ } } -int pcb_pstk_proto_conv(pcb_data_t *data, pcb_pstk_proto_t *dst, int quiet, vtp0_t *objs, pcb_coord_t ox, pcb_coord_t oy) +int pcb_pstk_proto_conv(pcb_data_t *data, pcb_pstk_proto_t *dst, int quiet, vtp0_t *objs, rnd_coord_t ox, rnd_coord_t oy) { int ret = -1, n, m, i, extra_obj = 0, has_slot = 0, has_hole = 0; pcb_any_obj_t **o; @@ -182,7 +182,7 @@ int purpi; if (has_slot) { if (!quiet) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: multiple mechanical objects (slots) are not allowed\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: multiple vias/padstacks\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: invalid input padstacks proto\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_INFO, "Padstack conversion: adjusting origin to padstack hole\n"); + rnd_message(PCB_MSG_INFO, "Padstack conversion: adjusting origin to padstack hole\n"); ox = pstk->x; oy = pstk->y; } @@ -221,7 +221,7 @@ break; default:; if (!quiet) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: invalid object type (%x) selected; must be via, padstack, line or polygon\n", (*o)->type); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: too many objects selected\n"); + rnd_message(PCB_MSG_ERROR, "Padstack conversion: too many objects selected\n"); goto quit; } if ((ts->len == 0) && (pstk == NULL)) { if (!quiet) - pcb_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(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"); goto quit; } @@ -276,12 +276,12 @@ n++; if (poly->HoleIndexN != 0) { if (!quiet) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: can not convert polygon with holes\n"); + rnd_message(PCB_MSG_ERROR, "Padstack conversion: can not convert polygon with holes\n"); goto quit; } if (len >= maxlen) { if (!quiet) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: polygon has too many points (%ld >= %ld)\n", (long)len, (long)maxlen); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: multiple objects on the same layer\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: can not have internal copper shape if there is no hole\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Padstack conversion: can not have both hole (padstack) and slot \n"); + rnd_message(PCB_MSG_ERROR, "Padstack conversion: can not have both hole (padstack) and slot \n"); goto quit; } @@ -358,7 +358,7 @@ return ret; } -int pcb_pstk_proto_breakup(pcb_data_t *dst, pcb_pstk_t *src, pcb_bool remove_src) +int pcb_pstk_proto_breakup(pcb_data_t *dst, pcb_pstk_t *src, rnd_bool remove_src) { pcb_pstk_tshape_t *ts = pcb_pstk_get_tshape(src); int n, i; @@ -373,11 +373,11 @@ pcb_pstk_shape_t *shp = &ts->shape[n]; pcb_layer_id_t lid; pcb_layer_t *ly, *ly1 = NULL, *ly2 = NULL, *ly3 = NULL; - pcb_coord_t clr; + rnd_coord_t clr; pcb_poly_t *p; if ((shp->layer_mask & PCB_LYT_ANYTHING) == 0) - pcb_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(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"); /* 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 = ""; - pcb_message(PCB_MSG_WARNING, "Can not create shape on %s %s\n", locs, mats); + rnd_message(PCB_MSG_WARNING, "Can not create shape on %s %s\n", locs, mats); continue; } @@ -463,7 +463,7 @@ return -1; } -int pcb_pstk_proto_conv_selection(pcb_board_t *pcb, pcb_pstk_proto_t *dst, int quiet, pcb_coord_t ox, pcb_coord_t oy) +int pcb_pstk_proto_conv_selection(pcb_board_t *pcb, pcb_pstk_proto_t *dst, int quiet, rnd_coord_t ox, rnd_coord_t oy) { int ret; vtp0_t objs; @@ -481,7 +481,7 @@ { int ret; vtp0_t objs; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; pcb_box_t bb; pcb_data_bbox(&bb, PCB_PASTEBUFFER->Data, 0); @@ -607,7 +607,7 @@ /* reverse order of data to keep normals pointing out */ for(i = 0; i < sh->data.poly.len/2; i++) { - pcb_coord_t tx, ty; + rnd_coord_t tx, ty; int other = sh->data.poly.len-1-i; tx = sh->data.poly.x[i]; ty = sh->data.poly.y[i]; @@ -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) { - pcb_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(PCB_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]; @@ -837,7 +837,7 @@ } -pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, pcb_coord_t ox, pcb_coord_t oy) +pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy) { pcb_pstk_proto_t proto; @@ -895,7 +895,7 @@ pcb_cardinal_t proto; int hplated; - pcb_coord_t hdia; + rnd_coord_t hdia; int htop, hbottom; } padstack_proto_change_hole_t; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(PCB_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,12 +925,12 @@ proto = pcb_pstk_get_proto_(data, u->proto); if (proto == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); + rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); return -1; } swap(proto->hplated, u->hplated, int); - swap(proto->hdia, u->hdia, pcb_coord_t); + swap(proto->hdia, u->hdia, rnd_coord_t); swap(proto->htop, u->htop, int); swap(proto->hbottom, u->hbottom, int); return 0; @@ -950,7 +950,7 @@ undo_change_hole_print }; -int pcb_pstk_proto_change_hole(pcb_pstk_proto_t *proto, const int *hplated, const pcb_coord_t *hdia, const int *htop, const int *hbottom) +int pcb_pstk_proto_change_hole(pcb_pstk_proto_t *proto, const int *hplated, const rnd_coord_t *hdia, const int *htop, const int *hbottom) { padstack_proto_change_hole_t *u; long int parent_ID; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: parent subc #%ld is not found\n", u->parent_ID); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); + rnd_message(PCB_MSG_ERROR, "Can't undo padstack prototype hole change: proto ID #%ld is not available\n", u->parent_ID); return -1; } @@ -1105,7 +1105,7 @@ return ts; } -static void pcb_pstk_poly_center(const pcb_pstk_poly_t *poly, pcb_coord_t *cx, pcb_coord_t *cy) +static void pcb_pstk_poly_center(const pcb_pstk_poly_t *poly, rnd_coord_t *cx, rnd_coord_t *cy) { double x = 0.0, y = 0.0; int n; @@ -1120,9 +1120,9 @@ *cy = pcb_round(y); } -void pcb_pstk_shape_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val) +void pcb_pstk_shape_grow_(pcb_pstk_shape_t *shp, rnd_bool is_absolute, rnd_coord_t val) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; int n; switch(shp->shape) { @@ -1184,7 +1184,7 @@ static void pcb_pstk_shape_scale_(pcb_pstk_shape_t *shp, double sx, double sy) { - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; int n; switch(shp->shape) { @@ -1219,7 +1219,7 @@ } } -void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val) +void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, rnd_bool is_absolute, rnd_coord_t val) { if (is_absolute) shp->clearance = val; @@ -1233,7 +1233,7 @@ int proto_id, tridx, shpidx; pcb_pstk_shape_t shp; - pcb_coord_t clr; + rnd_coord_t clr; unsigned shp_valid:1; unsigned clr_valid:1; @@ -1286,7 +1286,7 @@ return g; } -void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable) +void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, rnd_bool is_absolute, rnd_coord_t val, int undoable) { pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; pcb_pstk_shape_t *shp = &tshp->shape[shpidx]; @@ -1296,7 +1296,7 @@ pcb_pstk_shape_clr_grow_(shp, is_absolute, val); } -void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable) +void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, rnd_bool is_absolute, rnd_coord_t val, int undoable) { pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; pcb_pstk_shape_t *shp = &tshp->shape[shpidx]; @@ -1316,7 +1316,7 @@ } -void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, pcb_bool is_absolute, pcb_coord_t val) +void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, rnd_bool is_absolute, rnd_coord_t val) { int n, i, undoable = 0;; @@ -1335,7 +1335,7 @@ return d; } -void pcb_pstk_shape_derive(pcb_pstk_proto_t *proto, int dst_idx, int src_idx, pcb_coord_t bloat, pcb_layer_type_t mask, pcb_layer_combining_t comb) +void pcb_pstk_shape_derive(pcb_pstk_proto_t *proto, int dst_idx, int src_idx, rnd_coord_t bloat, pcb_layer_type_t mask, pcb_layer_combining_t comb) { int n, undoable = 0; Index: trunk/src/obj_pstk_shape.h =================================================================== --- trunk/src/obj_pstk_shape.h (revision 30902) +++ trunk/src/obj_pstk_shape.h (revision 30903) @@ -33,20 +33,20 @@ typedef struct pcb_pstk_poly_s { unsigned int len; /* number of points in polygon */ - pcb_coord_t *x; /* ordered list of points, X coord */ - pcb_coord_t *y; /* ordered list of points, Y coord */ + rnd_coord_t *x; /* ordered list of points, X coord */ + rnd_coord_t *y; /* ordered list of points, Y coord */ pcb_polyarea_t *pa; /* cache for the poly code */ char inverted; /* 1 if x;y has the opposite direction as pa */ } pcb_pstk_poly_t; typedef struct pcb_pstk_line_s { - pcb_coord_t x1, y1, x2, y2, thickness; + rnd_coord_t x1, y1, x2, y2, thickness; unsigned square:1; } pcb_pstk_line_t; typedef struct pcb_pstk_circ_s { - pcb_coord_t dia; /* diameter of the filled circle */ - pcb_coord_t x, y; /* assymetric pads */ + rnd_coord_t dia; /* diameter of the filled circle */ + rnd_coord_t x, y; /* assymetric pads */ } pcb_pstk_circ_t; typedef struct pcb_pstk_shape_s { @@ -63,7 +63,7 @@ PCB_PSSH_CIRC, /* filled circle */ PCB_PSSH_HSHADOW /* for clearance: pretend the shape is the same as the drill's or slot's; but do not add anything positive to the target layer */ } shape; - pcb_coord_t clearance; /* per layer clearance: internal layer clearance is sometimes different for production or insulation reasons (IPC2221A) */ + rnd_coord_t clearance; /* per layer clearance: internal layer clearance is sometimes different for production or insulation reasons (IPC2221A) */ } pcb_pstk_shape_t; /* transformed prototype */ Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 30902) +++ trunk/src/obj_rat.c (revision 30903) @@ -92,7 +92,7 @@ /*** utility ***/ /* creates a new rat-line */ -pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, pcb_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2) +pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2) { pcb_rat_t *Line; @@ -129,10 +129,10 @@ /* DeleteRats - deletes rat lines only * can delete all rat lines, or only selected one */ -pcb_bool pcb_rats_destroy(pcb_bool selected) +rnd_bool pcb_rats_destroy(rnd_bool selected) { pcb_opctx_t ctx; - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; ctx.remove.pcb = PCB; ctx.remove.destroy_target = NULL; @@ -152,7 +152,7 @@ /*** utility ***/ -static pcb_bool rat_meets_line(pcb_line_t *line, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_line(pcb_line_t *line, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(line->parent.layer); @@ -165,7 +165,7 @@ } -static pcb_bool rat_meets_arc(pcb_arc_t *arc, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_arc(pcb_arc_t *arc, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(arc->parent.layer); @@ -176,7 +176,7 @@ } -static pcb_bool rat_meets_poly(pcb_poly_t *poly, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_poly(pcb_poly_t *poly, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(poly->parent.layer); @@ -188,7 +188,7 @@ return pcb_poly_is_point_in_p(x, y, 1, poly); } -static pcb_bool rat_meets_pstk(pcb_data_t *data, pcb_pstk_t *pstk, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_pstk(pcb_data_t *data, pcb_pstk_t *pstk, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { pcb_layergrp_t *g = pcb_get_layergrp(PCB, gid); pcb_layer_t *ly; @@ -210,7 +210,7 @@ /* return the first object (the type that is most likely an endpoint of a rat) on a point on a layer */ -static pcb_any_obj_t *find_obj_on_layer(pcb_coord_t x, pcb_coord_t y, pcb_layer_t *l) +static pcb_any_obj_t *find_obj_on_layer(rnd_coord_t x, rnd_coord_t y, pcb_layer_t *l) { pcb_rtree_it_t it; pcb_box_t *n; @@ -267,7 +267,7 @@ /* return the first object (the type that is most likely an endpoint of a rat) on a point on a layer group */ -static pcb_any_obj_t *find_obj_on_grp(pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static pcb_any_obj_t *find_obj_on_grp(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { int i; pcb_rtree_box_t sb; @@ -299,12 +299,12 @@ return NULL; } -pcb_any_obj_t *pcb_rat_anchor_guess(pcb_rat_t *rat, int end, pcb_bool update) +pcb_any_obj_t *pcb_rat_anchor_guess(pcb_rat_t *rat, int end, rnd_bool update) { pcb_data_t *data = rat->parent.data; pcb_idpath_t **path = &rat->anchor[!!end]; - pcb_coord_t x = (end == 0) ? rat->Point1.X : rat->Point2.X; - pcb_coord_t y = (end == 0) ? rat->Point1.Y : rat->Point2.Y; + rnd_coord_t x = (end == 0) ? rat->Point1.X : rat->Point2.X; + rnd_coord_t y = (end == 0) ? rat->Point1.Y : rat->Point2.Y; pcb_layergrp_id_t gid = (end == 0) ? rat->group1 : rat->group2; pcb_any_obj_t *ao; @@ -478,7 +478,7 @@ void pcb_rat_invalidate_erase(pcb_rat_t *Rat) { if (PCB_FLAG_TEST(PCB_FLAG_VIA, Rat)) { - pcb_coord_t w = Rat->Thickness; + rnd_coord_t w = Rat->Thickness; pcb_box_t b; @@ -499,7 +499,7 @@ Rat->Thickness = pcb_pixel_slop * conf_core.appearance.rat_thickness; /* rats.c set PCB_FLAG_VIA if this rat goes to a containing poly: draw a donut */ if (PCB_FLAG_TEST(PCB_FLAG_VIA, Rat)) { - pcb_coord_t w = Rat->Thickness; + rnd_coord_t w = Rat->Thickness; pcb_box_t b; Index: trunk/src/obj_rat.h =================================================================== --- trunk/src/obj_rat.h (revision 30902) +++ trunk/src/obj_rat.h (revision 30903) @@ -51,12 +51,12 @@ void pcb_rat_unreg(pcb_rat_t *rat); /* if id is <= 0, allocate a new id */ -pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, pcb_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2); -pcb_bool pcb_rats_destroy(pcb_bool selected); +pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2); +rnd_bool pcb_rats_destroy(rnd_bool selected); /* Look up the anchor object (object the rat is connected to) for end 0 or end 1. If update is true, also update rat's field */ -pcb_any_obj_t *pcb_rat_anchor_guess(pcb_rat_t *rat, int end, pcb_bool update); +pcb_any_obj_t *pcb_rat_anchor_guess(pcb_rat_t *rat, int end, rnd_bool update); /* Call pcb_rat_anchor_guess() on all rats of data, with update=true */ void pcb_rat_all_anchor_guess(pcb_data_t *data); Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 30902) +++ trunk/src/obj_subc.c (revision 30903) @@ -98,7 +98,7 @@ sc->refdes = value; inv = pcb_obj_id_invalid(sc->refdes); if (inv != NULL) - pcb_message(PCB_MSG_ERROR, "Invalid character '%c' in subc refdes '%s'\n", *inv, sc->refdes); + rnd_message(PCB_MSG_ERROR, "Invalid character '%c' in subc refdes '%s'\n", *inv, sc->refdes); } else if (strcmp(name, "extobj") == 0) sc->extobj = value; @@ -181,7 +181,7 @@ return dst; } -static pcb_line_t *add_aux_line(pcb_layer_t *aux, const char *key, const char *val, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static pcb_line_t *add_aux_line(pcb_layer_t *aux, const char *key, const char *val, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_line_t *l = pcb_line_new(aux, x1, y1, x2, y2, PCB_MM_TO_COORD(0.1), 0, pcb_no_flags()); pcb_attribute_put(&l->Attributes, key, val); @@ -228,7 +228,7 @@ return 0; if (sc->aux_layer == NULL) { - pcb_message(PCB_MSG_WARNING, "Can't find subc aux layer\n"); + rnd_message(PCB_MSG_WARNING, "Can't find subc aux layer\n"); return -1; } @@ -239,7 +239,7 @@ return 0; } -pcb_bool pcb_subc_find_aux_point(pcb_subc_t *sc, const char *role, pcb_coord_t *x, pcb_coord_t *y) +rnd_bool pcb_subc_find_aux_point(pcb_subc_t *sc, const char *role, rnd_coord_t *x, rnd_coord_t *y) { pcb_line_t *l; @@ -258,7 +258,7 @@ return pcb_true; } -int pcb_subc_get_origin(pcb_subc_t *sc, pcb_coord_t *x, pcb_coord_t *y) +int pcb_subc_get_origin(pcb_subc_t *sc, rnd_coord_t *x, rnd_coord_t *y) { if ((pcb_subc_cache_update(sc) != 0) || (sc->aux_cache[PCB_SUBCH_ORIGIN] == NULL)) return -1; @@ -342,7 +342,7 @@ return res; } -static int pcb_subc_move_origin_(pcb_subc_t *sc, pcb_coord_t dx, pcb_coord_t dy, pcb_bool and_undo) +static int pcb_subc_move_origin_(pcb_subc_t *sc, rnd_coord_t dx, rnd_coord_t dy, rnd_bool and_undo) { int n; @@ -359,7 +359,7 @@ return 0; } -int pcb_subc_move_origin(pcb_subc_t *sc, pcb_coord_t dx, pcb_coord_t dy, pcb_bool and_undo) +int pcb_subc_move_origin(pcb_subc_t *sc, rnd_coord_t dx, rnd_coord_t dy, rnd_bool and_undo) { if ((pcb_subc_cache_update(sc) != 0) || (sc->aux_cache[PCB_SUBCH_ORIGIN] == NULL)) return -1; @@ -366,9 +366,9 @@ return pcb_subc_move_origin_(sc, dx, dy, and_undo); } -int pcb_subc_move_origin_to(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, pcb_bool and_undo) +int pcb_subc_move_origin_to(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, rnd_bool and_undo) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if ((pcb_subc_cache_update(sc) != 0) || (sc->aux_cache[PCB_SUBCH_ORIGIN] == NULL)) return -1; @@ -389,7 +389,7 @@ static pcb_poly_t *sqline2term(pcb_layer_t *dst, pcb_line_t *line) { pcb_poly_t *poly; - pcb_coord_t x[4], y[4]; + rnd_coord_t x[4], y[4]; int n; pcb_sqline_to_rect(line, x, y); @@ -406,7 +406,7 @@ return poly; } -pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *layer, pcb_bool alloc) +pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *layer, rnd_bool alloc) { pcb_subc_t *sc; int n; @@ -450,13 +450,13 @@ pcb_subc_bbox(sc); } -static pcb_coord_t read_mask(pcb_any_obj_t *obj) +static rnd_coord_t read_mask(pcb_any_obj_t *obj) { const char *smask = pcb_attribute_get(&obj->Attributes, "elem_smash_pad_mask"); - pcb_coord_t mask = 0; + rnd_coord_t mask = 0; if (smask != NULL) { - pcb_bool success; + rnd_bool success; mask = pcb_get_value_ex(smask, NULL, NULL, NULL, "mm", &success); if (!success) mask = 0; @@ -471,7 +471,7 @@ pcb_subc_cache_update(sc); } -void pcb_subc_create_aux(pcb_subc_t *sc, pcb_coord_t ox, pcb_coord_t oy, double rot, pcb_bool bottom) +void pcb_subc_create_aux(pcb_subc_t *sc, rnd_coord_t ox, rnd_coord_t oy, double rot, rnd_bool bottom) { double unit = PCB_SUBC_AUX_UNIT; double cs, sn; @@ -499,7 +499,7 @@ add_aux_line(sc->aux_layer, "subc-role", "y", ox, oy, pcb_round((double)ox + sn*unit), pcb_round((double)oy + cs*unit)); } -void pcb_subc_create_aux_point(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, const char *role) +void pcb_subc_create_aux_point(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, const char *role) { get_aux_layer(sc, 1); add_aux_line(sc->aux_layer, "subc-role", role, x, y, x, y); @@ -551,7 +551,7 @@ } while((line = linelist_first(&src->Line)) != NULL) { - pcb_coord_t mask = 0; + rnd_coord_t mask = 0; char *np, *sq, *termpad; const char *term; @@ -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 - pcb_message(PCB_MSG_ERROR, "Error: can't create top silk layer in subc for placing the refdes\n"); + rnd_message(PCB_MSG_ERROR, "Error: can't create top silk layer in subc for placing the refdes\n"); } } @@ -683,7 +683,7 @@ return 0; } -static void pcb_subc_draw_origin(pcb_hid_gc_t GC, pcb_subc_t *sc, pcb_coord_t DX, pcb_coord_t DY) +static void pcb_subc_draw_origin(pcb_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY) { pcb_line_t *origin; pcb_subc_cache_update(sc); @@ -710,9 +710,9 @@ } /* Draw a small lock on the bottom right corner at lx;ly */ -static void pcb_subc_draw_locked(pcb_hid_gc_t GC, pcb_subc_t *sc, pcb_coord_t lx, pcb_coord_t ly, int on_bottom) +static void pcb_subc_draw_locked(pcb_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t lx, rnd_coord_t ly, int on_bottom) { - pcb_coord_t s = on_bottom ? -PCB_EMARK_SIZE : PCB_EMARK_SIZE; + rnd_coord_t s = on_bottom ? -PCB_EMARK_SIZE : PCB_EMARK_SIZE; if (pcbhl_conf.editor.view.flip_x) lx += PCB_EMARK_SIZE*1.5; @@ -733,10 +733,10 @@ pcb_render->draw_arc(GC, lx, ly-s, PCB_EMARK_SIZE*2/3, PCB_EMARK_SIZE*2/3, 180, on_bottom ? -180 : 180); } -void pcb_xordraw_subc(pcb_subc_t *sc, pcb_coord_t DX, pcb_coord_t DY, int use_curr_side) +void pcb_xordraw_subc(pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY, int use_curr_side) { int n, mirr; - pcb_coord_t w = 0, h = 0; + rnd_coord_t w = 0, h = 0; mirr = use_curr_side && conf_core.editor.show_solder_side; @@ -812,7 +812,7 @@ gdl_iterator_t it; padstacklist_foreach(&sc->data->padstack, &it, ps) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; int oxm, pri; ox = ps->x; oy = ps->y; @@ -852,7 +852,7 @@ } -pcb_subc_t *pcb_subc_dup_at(pcb_board_t *pcb, pcb_data_t *dst, pcb_subc_t *src, pcb_coord_t dx, pcb_coord_t dy, pcb_bool keep_ids) +pcb_subc_t *pcb_subc_dup_at(pcb_board_t *pcb, pcb_data_t *dst, pcb_subc_t *src, rnd_coord_t dx, rnd_coord_t dy, rnd_bool keep_ids) { pcb_board_t *src_pcb; int n; @@ -909,7 +909,7 @@ if (!(dl->meta.bound.type & PCB_LYT_VIRTUAL)) { const char *name = dl->name; if (name == NULL) name = ""; - pcb_message(PCB_MSG_WARNING, "Couldn't bind layer %s of subcircuit while placing it\n", name); + rnd_message(PCB_MSG_WARNING, "Couldn't bind layer %s of subcircuit while placing it\n", name); } } else @@ -1187,7 +1187,7 @@ if (ctx->copy.from_outside && conf_core.editor.show_solder_side) { uundo_serial_t last; - pcb_coord_t w, h; + rnd_coord_t w, h; /* move-to-the-other-side is not undoable: it's part of the placement */ pcb_undo_inc_serial(); @@ -1243,7 +1243,7 @@ return pcb_subc_op(data, sc, &RotateFunctions, ctx, PCB_SUBCOP_UNDO_SUBC); } -void pcb_subc_rotate90(pcb_subc_t *subc, pcb_coord_t cx, pcb_coord_t cy, int steps) +void pcb_subc_rotate90(pcb_subc_t *subc, rnd_coord_t cx, rnd_coord_t cy, int steps) { pcb_opctx_t ctx; @@ -1253,7 +1253,7 @@ pcb_subcop_rotate90(&ctx, subc); } -void pcb_subc_rotate(pcb_subc_t *subc, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina, double angle) +void pcb_subc_rotate(pcb_subc_t *subc, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina, double angle) { pcb_opctx_t ctx; @@ -1265,7 +1265,7 @@ pcb_subcop_rotate(&ctx, subc); } -void pcb_subc_move(pcb_subc_t *sc, pcb_coord_t dx, pcb_coord_t dy, pcb_bool more_to_come) +void pcb_subc_move(pcb_subc_t *sc, rnd_coord_t dx, rnd_coord_t dy, rnd_bool more_to_come) { pcb_opctx_t ctx; ctx.move.pcb = NULL; @@ -1275,9 +1275,9 @@ pcb_subcop_move(&ctx, sc); } -pcb_bool pcb_selected_subc_change_side(void) +rnd_bool pcb_selected_subc_change_side(void) { - pcb_bool change = pcb_false; + rnd_bool change = pcb_false; if (PCB->pstk_on) { PCB_SUBC_LOOP(PCB->Data); @@ -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)) - pcb_message(PCB_MSG_ERROR, "Couldn't bind subc layer %s on buffer move\n", sl->name == NULL ? "" : sl->name); + rnd_message(PCB_MSG_ERROR, "Couldn't bind subc layer %s on buffer move\n", sl->name == NULL ? "" : sl->name); } } else @@ -1546,7 +1546,7 @@ } /* break buffer subc into pieces */ -pcb_bool pcb_subc_smash_buffer(pcb_buffer_t *buff) +rnd_bool pcb_subc_smash_buffer(pcb_buffer_t *buff) { pcb_subc_t *subc, *next; int n, bn; @@ -1581,7 +1581,7 @@ pcb_subc_free(subc); } if (warn) - pcb_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(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); return pcb_true; } @@ -1834,8 +1834,8 @@ typedef struct { pcb_subc_t *subc; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ - pcb_coord_t y_offs; - pcb_bool smirror; + rnd_coord_t y_offs; + rnd_bool smirror; } undo_subc_mirror_t; static int undo_subc_mirror_swap(void *udata) @@ -1873,7 +1873,7 @@ /* mirrors the coordinates of a subcircuit; an additional offset is passed */ -void pcb_subc_mirror(pcb_data_t *data, pcb_subc_t *subc, pcb_coord_t y_offs, pcb_bool smirror, pcb_bool undoable) +void pcb_subc_mirror(pcb_data_t *data, pcb_subc_t *subc, rnd_coord_t y_offs, rnd_bool smirror, rnd_bool undoable) { undo_subc_mirror_t gtmp, *g = >mp; @@ -1900,7 +1900,7 @@ } -pcb_bool pcb_subc_change_side(pcb_subc_t *subc, pcb_coord_t yoff) +rnd_bool pcb_subc_change_side(pcb_subc_t *subc, rnd_coord_t yoff) { int n; pcb_board_t *pcb; @@ -2023,7 +2023,7 @@ pcb_draw_info_t *info = cl; pcb_subc_t *subc = (pcb_subc_t *) b; pcb_box_t *bb = &subc->BoundingBox; - pcb_coord_t x0, y0, dx, dy; + rnd_coord_t x0, y0, dx, dy; pcb_font_t *font = &PCB->fontkit.dflt; /* do not display anyting from the other-side subcs */ @@ -2054,7 +2054,7 @@ s.used = 0; if (pcb_append_dyntext(&s, (pcb_any_obj_t *)subc, conf_core.editor.subc_id) == 0) { char *curr, *next; - pcb_coord_t x = x0, y = y0; + rnd_coord_t x = x0, y = y0; for(curr = s.array; curr != NULL; curr = next) { int ctrl = 0; @@ -2167,12 +2167,12 @@ return NULL; } -pcb_bool pcb_subc_is_empty(pcb_subc_t *subc) +rnd_bool pcb_subc_is_empty(pcb_subc_t *subc) { return pcb_data_is_empty(subc->data); } -pcb_layer_t *pcb_subc_get_layer(pcb_subc_t *sc, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_bool_t alloc, const char *name, pcb_bool req_name_match) +pcb_layer_t *pcb_subc_get_layer(pcb_subc_t *sc, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_bool_t alloc, const char *name, rnd_bool req_name_match) { int n; @@ -2251,7 +2251,7 @@ pcb_subc_part_changed__(sc, 0); } else - pcb_message(PCB_MSG_ERROR, "Internal error: pcb_subc_part_changed_inhibit_dec(): underflow; please reprot this bug\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: pcb_subc_part_changed_inhibit_dec(): underflow; please reprot this bug\n"); } @@ -2272,11 +2272,11 @@ } -pcb_subc_t *pcb_subc_replace(pcb_board_t *pcb, pcb_subc_t *dst, pcb_subc_t *src, pcb_bool add_undo, pcb_bool dumb) +pcb_subc_t *pcb_subc_replace(pcb_board_t *pcb, pcb_subc_t *dst, pcb_subc_t *src, rnd_bool add_undo, rnd_bool dumb) { pcb_data_t *data = dst->parent.data; pcb_subc_t *placed; - pcb_coord_t ox, oy, osx, osy; + rnd_coord_t ox, oy, osx, osy; double rot = 0; long int target_id; int dst_on_bottom = 0, src_on_bottom = 0; Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 30902) +++ trunk/src/obj_subc.h (revision 30903) @@ -76,9 +76,9 @@ /* convert buffer contents into a subcircuit, in-place; returns 0 on success */ int pcb_subc_convert_from_buffer(pcb_buffer_t *buffer); -pcb_bool pcb_subc_smash_buffer(pcb_buffer_t *buff); +rnd_bool pcb_subc_smash_buffer(pcb_buffer_t *buff); -void pcb_subc_mirror(pcb_data_t *data, pcb_subc_t *subc, pcb_coord_t y_offs, pcb_bool smirror, pcb_bool undoable); +void pcb_subc_mirror(pcb_data_t *data, pcb_subc_t *subc, rnd_coord_t y_offs, rnd_bool smirror, rnd_bool undoable); /* Scale coords/pos of a subc by sx,sy with thickness factor sth; if recurse is non-zero, descend in subc-in-subc */ @@ -85,21 +85,21 @@ void pcb_subc_scale(pcb_data_t *data, pcb_subc_t *subc, double sx, double sy, double sth, int recurse); /* changes the side of the board a subc is on; returns pcb_true if done */ -pcb_bool pcb_subc_change_side(pcb_subc_t *subc, pcb_coord_t yoff); +rnd_bool pcb_subc_change_side(pcb_subc_t *subc, rnd_coord_t yoff); -void pcb_subc_rotate(pcb_subc_t *subc, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina, double angle); -void pcb_subc_rotate90(pcb_subc_t *subc, pcb_coord_t cx, pcb_coord_t cy, int steps); +void pcb_subc_rotate(pcb_subc_t *subc, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina, double angle); +void pcb_subc_rotate90(pcb_subc_t *subc, rnd_coord_t cx, rnd_coord_t cy, int steps); /* High level move (op wrapper; no undo) */ -void pcb_subc_move(pcb_subc_t *sc, pcb_coord_t dx, pcb_coord_t dy, pcb_bool more_to_come); +void pcb_subc_move(pcb_subc_t *sc, rnd_coord_t dx, rnd_coord_t dy, rnd_bool more_to_come); /* changes the side of all selected and visible subcs; returns pcb_true if anything has changed */ -pcb_bool pcb_selected_subc_change_side(void); +rnd_bool pcb_selected_subc_change_side(void); /* Draw a subcircuit for a preview (silk, copper and outline only) */ void pcb_subc_draw_preview(const pcb_subc_t *sc, const pcb_box_t *drawn_area); -void pcb_xordraw_subc(pcb_subc_t *sc, pcb_coord_t DX, pcb_coord_t DY, int use_curr_side); +void pcb_xordraw_subc(pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY, int use_curr_side); /* Redo the layer binding after the layer binding recipe changed in sc */ int pcb_subc_rebind(pcb_board_t *pcb, pcb_subc_t *sc); @@ -116,7 +116,7 @@ /* Look up a layer by lyt and comb (and name, if req_name_match is true); if not found and alloc is true, allocate a new layer with the given name. Return NULL on error. */ -pcb_layer_t *pcb_subc_get_layer(pcb_subc_t *sc, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_bool_t alloc, const char *name, pcb_bool req_name_match); +pcb_layer_t *pcb_subc_get_layer(pcb_subc_t *sc, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_bool_t alloc, const char *name, rnd_bool req_name_match); #include pcb_r_dir_t pcb_draw_subc_mark(const pcb_box_t *b, void *cl); /* low level version, does not do extobj */ @@ -126,7 +126,7 @@ void EraseSubc(pcb_subc_t *sc); /* calculate geometrical properties using the aux layer; return 0 on success */ -int pcb_subc_get_origin(pcb_subc_t *sc, pcb_coord_t *x, pcb_coord_t *y); +int pcb_subc_get_origin(pcb_subc_t *sc, rnd_coord_t *x, rnd_coord_t *y); int pcb_subc_get_rotation(pcb_subc_t *sc, double *rot); int pcb_subc_get_side(pcb_subc_t *sc, int *on_bottom); @@ -136,8 +136,8 @@ int pcb_subc_get_host_trans(pcb_subc_t *sc, pcb_host_trans_t *tr, int neg); /* Move the origin, without moving the subcircuit itself */ -int pcb_subc_move_origin(pcb_subc_t *sc, pcb_coord_t dx, pcb_coord_t dy, pcb_bool and_undo); -int pcb_subc_move_origin_to(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, pcb_bool and_undo); +int pcb_subc_move_origin(pcb_subc_t *sc, rnd_coord_t dx, rnd_coord_t dy, rnd_bool and_undo); +int pcb_subc_move_origin_to(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, rnd_bool and_undo); /* Search for the named subc; name is relative path in hierarchy. Returns @@ -153,10 +153,10 @@ /* In board mode return brd_layer; in footprint edit mode, return the subcircuit layer that matches brd_layer. If not found, either allocate it within the subc (if alloc is true) or return the brd_layer. */ -pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *brd_layer, pcb_bool alloc); +pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *brd_layer, rnd_bool alloc); /* Returns whether there's no object in the subc */ -pcb_bool pcb_subc_is_empty(pcb_subc_t *subc); +rnd_bool pcb_subc_is_empty(pcb_subc_t *subc); /* Return the footprint name; if local_name is not NULL, that attribute is queried first; if that doesn't exist, "visible_footprint" and then @@ -174,14 +174,14 @@ /*** subc creation helpers ***/ /* Create the aux layer for a subc, set origin to ox;oy and rotation to rot */ -void pcb_subc_create_aux(pcb_subc_t *sc, pcb_coord_t ox, pcb_coord_t oy, double rot, pcb_bool bottom); +void pcb_subc_create_aux(pcb_subc_t *sc, rnd_coord_t ox, rnd_coord_t oy, double rot, rnd_bool bottom); /* Create a new point on the aux layer using a given role string in attribute */ -void pcb_subc_create_aux_point(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, const char *role); +void pcb_subc_create_aux_point(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, const char *role); /* Look up an aux point and return pcb_true if found; when found, load x and y with the coords of the point. */ -pcb_bool pcb_subc_find_aux_point(pcb_subc_t *sc, const char *role, pcb_coord_t *x, pcb_coord_t *y); +rnd_bool pcb_subc_find_aux_point(pcb_subc_t *sc, const char *role, rnd_coord_t *x, rnd_coord_t *y); /* Find and save the aux layer in the cache, of it exists */ void pcb_subc_cache_find_aux(pcb_subc_t *sc); @@ -193,13 +193,13 @@ /* Copy non-layer, non-geometrical metadata (e.g. attributes) */ pcb_subc_t *pcb_subc_copy_meta(pcb_subc_t *dst, pcb_subc_t *src); -pcb_subc_t *pcb_subc_dup_at(pcb_board_t *pcb, pcb_data_t *dst, pcb_subc_t *src, pcb_coord_t dx, pcb_coord_t dy, pcb_bool keep_ids); +pcb_subc_t *pcb_subc_dup_at(pcb_board_t *pcb, pcb_data_t *dst, pcb_subc_t *src, rnd_coord_t dx, rnd_coord_t dy, rnd_bool keep_ids); /* Replace dst with a copy of src in place (preserving location and orientation and attributes. If add_undo is true, add the old subc del and the new subc creation to the undo list. If dub is true, do not try to match rotation or pick up coords, just use crosshair and current loc. */ -pcb_subc_t *pcb_subc_replace(pcb_board_t *pcb, pcb_subc_t *dst, pcb_subc_t *src, pcb_bool add_undo, pcb_bool dumb); +pcb_subc_t *pcb_subc_replace(pcb_board_t *pcb, pcb_subc_t *dst, pcb_subc_t *src, rnd_bool add_undo, rnd_bool dumb); /*** loops ***/ Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30902) +++ trunk/src/obj_text.c (revision 30903) @@ -119,9 +119,9 @@ typedef struct { pcb_text_t *text; /* it is safe to save the object pointer because it is persistent (through the removed object list) */ int Scale; - pcb_coord_t X, Y; - pcb_coord_t thickness; - pcb_coord_t clearance; + rnd_coord_t X, Y; + rnd_coord_t thickness; + rnd_coord_t clearance; double rot; } undo_text_geo_t; @@ -136,10 +136,10 @@ pcb_poly_restore_to_poly(layer->parent.data, PCB_OBJ_TEXT, layer, g->text); rnd_swap(int, g->Scale, g->text->Scale); - rnd_swap(pcb_coord_t, g->X, g->text->X); - rnd_swap(pcb_coord_t, g->Y, g->text->Y); - rnd_swap(pcb_coord_t, g->thickness, g->text->thickness); - rnd_swap(pcb_coord_t, g->clearance, g->text->clearance); + rnd_swap(rnd_coord_t, g->X, g->text->X); + rnd_swap(rnd_coord_t, g->Y, g->text->Y); + rnd_swap(rnd_coord_t, g->thickness, g->text->thickness); + rnd_swap(rnd_coord_t, g->clearance, g->text->clearance); rnd_swap(double, g->rot, g->text->rot); pcb_text_bbox(pcb_font(pcb, g->text->fid, 1), g->text); @@ -165,7 +165,7 @@ /* creates a new text on a layer */ -pcb_text_t *pcb_text_new(pcb_layer_t *Layer, pcb_font_t *PCBFont, pcb_coord_t X, pcb_coord_t Y, double rot, int Scale, pcb_coord_t thickness, const char *TextString, pcb_flag_t Flags) +pcb_text_t *pcb_text_new(pcb_layer_t *Layer, pcb_font_t *PCBFont, rnd_coord_t X, rnd_coord_t Y, double rot, int Scale, rnd_coord_t thickness, const char *TextString, pcb_flag_t Flags) { pcb_text_t *text; @@ -208,7 +208,7 @@ return t; } -pcb_text_t *pcb_text_dup_at(pcb_layer_t *dst, pcb_text_t *src, pcb_coord_t dx, pcb_coord_t dy) +pcb_text_t *pcb_text_dup_at(pcb_layer_t *dst, pcb_text_t *src, rnd_coord_t dx, rnd_coord_t dy) { pcb_text_t *t = pcb_text_new(dst, pcb_font(PCB, src->fid, 1), src->X+dx, src->Y+dy, src->rot, src->Scale, src->thickness, src->TextString, src->Flags); pcb_text_copy_meta(t, src); @@ -304,14 +304,14 @@ unsigned char *s, *rendered = pcb_text_render_str(Text); int i; int space; - pcb_coord_t minx, miny, maxx, maxy, tx; - pcb_coord_t min_final_radius; - pcb_coord_t min_unscaled_radius; - pcb_bool first_time = pcb_true; + rnd_coord_t minx, miny, maxx, maxy, tx; + rnd_coord_t min_final_radius; + rnd_coord_t min_unscaled_radius; + rnd_bool first_time = pcb_true; pcb_poly_t *poly; double sc = (double)Text->Scale / 100.0; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; - pcb_coord_t cx[4], cy[4]; + rnd_coord_t cx[4], cy[4]; s = rendered; @@ -345,7 +345,7 @@ * of 1/2 because some stupid reason we render our glyphs * at half their defined stroke-width. */ - pcb_coord_t unscaled_radius = MAX(min_unscaled_radius, line->Thickness / 4); + rnd_coord_t unscaled_radius = MAX(min_unscaled_radius, line->Thickness / 4); if (first_time) { minx = maxx = line->Point1.X; @@ -382,7 +382,7 @@ } else { pcb_box_t *ds = &FontPtr->DefaultSymbol; - pcb_coord_t w = ds->X2 - ds->X1; + rnd_coord_t w = ds->X2 - ds->X1; minx = MIN(minx, ds->X1 + tx); miny = MIN(miny, ds->Y1); @@ -458,7 +458,7 @@ unsigned int crd = 0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, t)) { - pcb_coord_t x, y; + rnd_coord_t x, y; double rotdir = tr->on_bottom ? -1.0 : 1.0; pcb_hash_tr_coords(tr, &x, &y, t->X, t->Y); @@ -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) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_textop_move_buffer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, text object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, text object is locked\n"); return NULL; } if (ctx->move.dst_layer != layer) { @@ -763,7 +763,7 @@ /* rotates a text in 90 degree steps; only the bounding box is rotated, text rotation itself is done by the drawing routines */ -void pcb_text_rotate90(pcb_text_t *Text, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_text_rotate90(pcb_text_t *Text, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { int number = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, Text) ? (4 - Number) & 3 : Number; PCB_COORD_ROTATE90(Text->X, Text->Y, X, Y, Number); @@ -780,7 +780,7 @@ /* rotates a text; only the bounding box is rotated, text rotation itself is done by the drawing routines */ -void pcb_text_rotate(pcb_text_t *Text, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, double rotdeg) +void pcb_text_rotate(pcb_text_t *Text, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, double rotdeg) { pcb_rotate(&Text->X, &Text->Y, X, Y, cosa, sina); Text->rot += rotdeg; @@ -832,7 +832,7 @@ return Text; } -void pcb_text_flip_side(pcb_layer_t *layer, pcb_text_t *text, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_text_flip_side(pcb_layer_t *layer, pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable) { if (layer->text_tree != NULL) pcb_r_delete_entry(layer->text_tree, (pcb_box_t *) text); @@ -844,7 +844,7 @@ pcb_r_insert_entry(layer->text_tree, (pcb_box_t *) text); } -void pcb_text_mirror_coords(pcb_text_t *text, pcb_coord_t y_offs, pcb_bool undoable) +void pcb_text_mirror_coords(pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable) { undo_text_geo_t gtmp, *g = >mp; @@ -1007,9 +1007,9 @@ /*** draw ***/ #define MAX_SIMPLE_POLY_POINTS 256 -static void draw_text_poly(pcb_draw_info_t *info, pcb_poly_t *poly, pcb_xform_mx_t mx, pcb_coord_t xo, int xordraw, int thindraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_draw_text_cb cb, void *cb_ctx) +static void draw_text_poly(pcb_draw_info_t *info, pcb_poly_t *poly, pcb_xform_mx_t mx, rnd_coord_t xo, int xordraw, int thindraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_draw_text_cb cb, void *cb_ctx) { - pcb_coord_t x[MAX_SIMPLE_POLY_POINTS], y[MAX_SIMPLE_POLY_POINTS]; + rnd_coord_t x[MAX_SIMPLE_POLY_POINTS], y[MAX_SIMPLE_POLY_POINTS]; int max, n; pcb_point_t *p; @@ -1073,9 +1073,9 @@ } /* Very rough estimation on the full width of the text */ -pcb_coord_t pcb_text_width(pcb_font_t *font, int scale, const unsigned char *string) +rnd_coord_t pcb_text_width(pcb_font_t *font, int scale, const unsigned char *string) { - pcb_coord_t w = 0; + rnd_coord_t w = 0; const pcb_box_t *defaultsymbol; if (string == NULL) return 0; @@ -1091,9 +1091,9 @@ return PCB_SCALE_TEXT(w, scale); } -pcb_coord_t pcb_text_height(pcb_font_t *font, int scale, const unsigned char *string) +rnd_coord_t pcb_text_height(pcb_font_t *font, int scale, const unsigned char *string) { - pcb_coord_t h; + rnd_coord_t h; if (string == NULL) return 0; h = font->MaxHeight; @@ -1106,9 +1106,9 @@ } -PCB_INLINE void cheap_text_line(pcb_hid_gc_t gc, pcb_xform_mx_t mx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t xordx, pcb_coord_t xordy) +PCB_INLINE void cheap_text_line(pcb_hid_gc_t gc, pcb_xform_mx_t mx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t xordx, rnd_coord_t xordy) { - pcb_coord_t tx1, ty1, tx2, ty2; + rnd_coord_t tx1, ty1, tx2, ty2; tx1 = pcb_round(pcb_xform_x(mx, x1, y1)); ty1 = pcb_round(pcb_xform_y(mx, x1, y1)); @@ -1125,9 +1125,9 @@ /* Decreased level-of-detail: draw only a few lines for the whole text */ -PCB_INLINE int draw_text_cheap(pcb_font_t *font, pcb_xform_mx_t mx, const unsigned char *string, int scale, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_text_tiny_t tiny) +PCB_INLINE int draw_text_cheap(pcb_font_t *font, pcb_xform_mx_t mx, const unsigned char *string, int scale, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny) { - pcb_coord_t w, h = PCB_SCALE_TEXT(font->MaxHeight, scale); + rnd_coord_t w, h = PCB_SCALE_TEXT(font->MaxHeight, scale); if (tiny == PCB_TXT_TINY_HIDE) { if (h <= pcb_render->coord_per_pix*6) /* <= 6 pixel high: unreadable */ return 1; @@ -1167,9 +1167,9 @@ return 0; } -PCB_INLINE void pcb_text_draw_string_(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, pcb_coord_t min_line_width, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_text_tiny_t tiny, pcb_draw_text_cb cb, void *cb_ctx) +PCB_INLINE void pcb_text_draw_string_(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, rnd_coord_t min_line_width, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny, pcb_draw_text_cb cb, void *cb_ctx) { - pcb_coord_t x = 0; + rnd_coord_t x = 0; pcb_cardinal_t n; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; double sc = (double)scale / 100.0; @@ -1256,8 +1256,8 @@ } else { /* the default symbol is a filled box */ - pcb_coord_t size = (font->DefaultSymbol.X2 - font->DefaultSymbol.X1) * 6 / 5; - pcb_coord_t px[4], py[4]; + rnd_coord_t size = (font->DefaultSymbol.X2 - font->DefaultSymbol.X1) * 6 / 5; + rnd_coord_t px[4], py[4]; px[0] = pcb_round(pcb_xform_x(mx, font->DefaultSymbol.X1 + x, font->DefaultSymbol.Y1)); py[0] = pcb_round(pcb_xform_y(mx, font->DefaultSymbol.X1 + x, font->DefaultSymbol.Y1)); @@ -1307,12 +1307,12 @@ } } -void pcb_text_draw_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, pcb_coord_t min_line_width, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_text_tiny_t tiny) +void pcb_text_draw_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, rnd_coord_t min_line_width, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny) { pcb_text_draw_string_(info, font, string, x0, y0, scale, rotdeg, mirror, thickness, min_line_width, xordraw, xordx, xordy, tiny, NULL, NULL); } -void pcb_text_draw_string_simple(pcb_font_t *font, const char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy) +void pcb_text_draw_string_simple(pcb_font_t *font, const char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy) { if (font == NULL) font = pcb_font(PCB, 0, 0); @@ -1321,7 +1321,7 @@ } -void pcb_text_decompose_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, pcb_draw_text_cb cb, void *cb_ctx) +void pcb_text_decompose_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, pcb_draw_text_cb cb, void *cb_ctx) { pcb_text_draw_string_(info, font, string, x0, y0, scale, rotdeg, mirror, thickness, 0, 0, 0, 0, PCB_TXT_TINY_ACCURATE, cb, cb_ctx); } @@ -1335,7 +1335,7 @@ /* lowlevel drawing routine for text objects */ -static void DrawTextLowLevel_(pcb_draw_info_t *info, pcb_text_t *Text, pcb_coord_t min_line_width, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_text_tiny_t tiny) +static void DrawTextLowLevel_(pcb_draw_info_t *info, pcb_text_t *Text, rnd_coord_t min_line_width, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny) { unsigned char *rendered = pcb_text_render_str(Text); pcb_text_draw_string_(info, pcb_font(PCB, Text->fid, 1), rendered, Text->X, Text->Y, Text->Scale, Text->rot, PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, Text), Text->thickness, min_line_width, xordraw, xordx, xordy, tiny, NULL, NULL); @@ -1342,9 +1342,9 @@ pcb_text_free_str(Text, rendered); } -static pcb_bool is_text_term_vert(const pcb_text_t *text) +static rnd_bool is_text_term_vert(const pcb_text_t *text) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; dx = text->BoundingBox.X2 - text->BoundingBox.X1; if (dx < 0) @@ -1375,7 +1375,7 @@ } -void pcb_text_draw_(pcb_draw_info_t *info, pcb_text_t *text, pcb_coord_t min_line_width, int allow_term_gfx, pcb_text_tiny_t tiny) +void pcb_text_draw_(pcb_draw_info_t *info, pcb_text_t *text, rnd_coord_t min_line_width, int allow_term_gfx, pcb_text_tiny_t tiny) { if (delayed_terms_enabled && (text->term != NULL)) { pcb_draw_delay_obj_add((pcb_any_obj_t *)text); @@ -1476,7 +1476,7 @@ static pcb_draw_info_t txor_info; static pcb_xform_t txor_xform; -void pcb_text_draw_xor(pcb_text_t *text, pcb_coord_t x, pcb_coord_t y) +void pcb_text_draw_xor(pcb_text_t *text, rnd_coord_t x, rnd_coord_t y) { txor_info.xform = &txor_xform; DrawTextLowLevel_(&txor_info, text, 0, 1, x, y, PCB_TXT_TINY_CHEAP); @@ -1531,7 +1531,7 @@ pcb_trace("font change %d\n", argv[1].d.i); } -pcb_bool pcb_text_old_direction(int *dir_out, double rot) +rnd_bool pcb_text_old_direction(int *dir_out, double rot) { double r; Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 30902) +++ trunk/src/obj_text.h (revision 30903) @@ -38,11 +38,11 @@ struct pcb_text_s { PCB_ANY_PRIMITIVE_FIELDS; int Scale; /* text scaling in percent */ - pcb_coord_t X, Y; /* origin */ + rnd_coord_t X, Y; /* origin */ pcb_font_id_t fid; char *TextString; /* string */ - pcb_coord_t thickness; /* if non-zero, thickness of line/arc within the font */ - pcb_coord_t clearance; /* clearance around the object in polygon if flags have PCB_FLAG_CLEARLINE */ + rnd_coord_t thickness; /* if non-zero, thickness of line/arc within the font */ + rnd_coord_t clearance; /* clearance around the object in polygon if flags have PCB_FLAG_CLEARLINE */ double rot; /* used when Direction is PCB_TEXT_FREEROT */ gdl_elem_t link; /* a text is in a list of a layer */ }; @@ -49,15 +49,15 @@ /* These need to be carefully written to avoid overflows, and return a Coord type. */ -#define PCB_SCALE_TEXT(COORD,TEXTSCALE) ((pcb_coord_t)pcb_round((COORD) * ((double)(TEXTSCALE) / 100.0))) -#define PCB_UNPCB_SCALE_TEXT(COORD,TEXTSCALE) ((pcb_coord_t)pcb_round((COORD) * (100.0 / (double)(TEXTSCALE)))) +#define PCB_SCALE_TEXT(COORD,TEXTSCALE) ((rnd_coord_t)pcb_round((COORD) * ((double)(TEXTSCALE) / 100.0))) +#define PCB_UNPCB_SCALE_TEXT(COORD,TEXTSCALE) ((rnd_coord_t)pcb_round((COORD) * (100.0 / (double)(TEXTSCALE)))) pcb_text_t *pcb_text_alloc(pcb_layer_t * layer); pcb_text_t *pcb_text_alloc_id(pcb_layer_t *layer, long int id); void pcb_text_free(pcb_text_t * data); -pcb_text_t *pcb_text_new(pcb_layer_t *Layer, pcb_font_t *PCBFont, pcb_coord_t X, pcb_coord_t Y, double rot, int Scale, pcb_coord_t thickness, const char *TextString, pcb_flag_t Flags); +pcb_text_t *pcb_text_new(pcb_layer_t *Layer, pcb_font_t *PCBFont, rnd_coord_t X, rnd_coord_t Y, double rot, int Scale, rnd_coord_t thickness, const char *TextString, pcb_flag_t Flags); pcb_text_t *pcb_text_dup(pcb_layer_t *dst, pcb_text_t *src); -pcb_text_t *pcb_text_dup_at(pcb_layer_t *dst, pcb_text_t *src, pcb_coord_t dx, pcb_coord_t dy); +pcb_text_t *pcb_text_dup_at(pcb_layer_t *dst, pcb_text_t *src, rnd_coord_t dx, rnd_coord_t dy); void *pcb_text_destroy(pcb_layer_t *Layer, pcb_text_t *Text); @@ -65,11 +65,11 @@ void pcb_add_text_on_layer(pcb_layer_t *Layer, pcb_text_t *text, pcb_font_t *PCBFont); void pcb_text_bbox(pcb_font_t *FontPtr, pcb_text_t *Text); -void pcb_text_rotate90(pcb_text_t *Text, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -void pcb_text_rotate(pcb_text_t *Text, pcb_coord_t X, pcb_coord_t Y, double cosa, double sina, double rotdeg); +void pcb_text_rotate90(pcb_text_t *Text, rnd_coord_t X, rnd_coord_t Y, unsigned Number); +void pcb_text_rotate(pcb_text_t *Text, rnd_coord_t X, rnd_coord_t Y, double cosa, double sina, double rotdeg); void pcb_text_scale(pcb_text_t *text, double sx, double sy, double sth); -void pcb_text_flip_side(pcb_layer_t *layer, pcb_text_t *text, pcb_coord_t y_offs, pcb_bool undoable); -void pcb_text_mirror_coords(pcb_text_t *text, pcb_coord_t y_offs, pcb_bool undoable); /* mirror the coords but do not mirror the text itself (no on-solder) */ +void pcb_text_flip_side(pcb_layer_t *layer, pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable); +void pcb_text_mirror_coords(pcb_text_t *text, rnd_coord_t y_offs, rnd_bool undoable); /* mirror the coords but do not mirror the text itself (no on-solder) */ void pcb_text_set_font(pcb_text_t *text, pcb_font_id_t fid); void pcb_text_update(pcb_layer_t *layer, pcb_text_t *text); @@ -87,7 +87,7 @@ void pcb_text_flagchg_post(pcb_text_t *Text, unsigned long oldflagbits, void **save); /* Low level draw call for direct rendering on preview */ -void pcb_text_draw_string_simple(pcb_font_t *font, const char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy); +void pcb_text_draw_string_simple(pcb_font_t *font, const char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy); /* Recalculate the bounding box of all dynamic text objects that are directly under data - useful e.g. on parent attr change */ @@ -95,7 +95,7 @@ /* Return the old direction value (n*90 deg rotation) for text rotation value. Returns false if has a rounding error greater than 0.5 deg */ -pcb_bool pcb_text_old_direction(int *dir_out, double rot); +rnd_bool pcb_text_old_direction(int *dir_out, double rot); /* hash and eq */ int pcb_text_eq(const pcb_host_trans_t *tr1, const pcb_text_t *t1, const pcb_host_trans_t *tr2, const pcb_text_t *t2); @@ -109,7 +109,7 @@ #define pcb_text_move(t,dx,dy) \ do { \ - pcb_coord_t __dx__ = (dx), __dy__ = (dy); \ + rnd_coord_t __dx__ = (dx), __dy__ = (dy); \ pcb_text_t *__t__ = (t); \ PCB_BOX_MOVE_LOWLEVEL(&((__t__)->BoundingBox), __dx__, __dy__); \ PCB_BOX_MOVE_LOWLEVEL(&((__t__)->bbox_naked), __dx__, __dy__); \ Index: trunk/src/obj_text_draw.h =================================================================== --- trunk/src/obj_text_draw.h (revision 30902) +++ trunk/src/obj_text_draw.h (revision 30903) @@ -43,23 +43,23 @@ PCB_TXT_TINY_ACCURATE /* always draw text accurately, even if it will end up unreadable */ } pcb_text_tiny_t; -void pcb_text_draw_(pcb_draw_info_t *info, pcb_text_t *Text, pcb_coord_t min_line_width, int allow_term_gfx, pcb_text_tiny_t tiny); +void pcb_text_draw_(pcb_draw_info_t *info, pcb_text_t *Text, rnd_coord_t min_line_width, int allow_term_gfx, pcb_text_tiny_t tiny); void pcb_text_invalidate_erase(pcb_layer_t *Layer, pcb_text_t *Text); void pcb_text_invalidate_draw(pcb_layer_t *Layer, pcb_text_t *Text); -void pcb_text_draw_xor(pcb_text_t *text, pcb_coord_t x, pcb_coord_t y); +void pcb_text_draw_xor(pcb_text_t *text, rnd_coord_t x, rnd_coord_t y); void pcb_text_name_invalidate_draw(pcb_text_t *txt); void pcb_text_draw_label(pcb_draw_info_t *info, pcb_text_t *text); /* lowlevel drawing routine for text strings */ -void pcb_text_draw_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, pcb_coord_t min_line_width, int xordraw, pcb_coord_t xordx, pcb_coord_t xordy, pcb_text_tiny_t tiny); +void pcb_text_draw_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, rnd_coord_t min_line_width, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny); /* lowlevel text bounding box calculation */ -pcb_coord_t pcb_text_width(pcb_font_t *font, int scale, const unsigned char *string); -pcb_coord_t pcb_text_height(pcb_font_t *font, int scale, const unsigned char *string); +rnd_coord_t pcb_text_width(pcb_font_t *font, int scale, const unsigned char *string); +rnd_coord_t pcb_text_height(pcb_font_t *font, int scale, const unsigned char *string); /* Call cb(ctx, ...) for every object in a rendered string or text; obj will be disacrded after the call, can be modified by the callback */ typedef void (*pcb_draw_text_cb)(void *ctx, pcb_any_obj_t *obj); -void pcb_text_decompose_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, pcb_coord_t x0, pcb_coord_t y0, int scale, double rotdeg, int mirror, pcb_coord_t thickness, pcb_draw_text_cb cb, void *cb_ctx); +void pcb_text_decompose_string(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, pcb_draw_text_cb cb, void *cb_ctx); void pcb_text_decompose_text(pcb_draw_info_t *info, pcb_text_t *text, pcb_draw_text_cb cb, void *cb_ctx); Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 30902) +++ trunk/src/object_act.c (revision 30903) @@ -77,7 +77,7 @@ RND_ACT_IRES(0); if (!pcb_gui->edit_attributes) { - pcb_message(PCB_MSG_ERROR, "This GUI doesn't support Attribute Editing\n"); + rnd_message(PCB_MSG_ERROR, "This GUI doesn't support Attribute Editing\n"); return FGW_ERR_UNKNOWN; } @@ -100,7 +100,7 @@ break; } if (layer == NULL) { - pcb_message(PCB_MSG_ERROR, "No layer named %s\n", layername); + rnd_message(PCB_MSG_ERROR, "No layer named %s\n", layername); return 1; } } @@ -122,17 +122,17 @@ } PCB_END_LOOP; if (n_found > 1) { - pcb_message(PCB_MSG_ERROR, "Too many subcircuits selected\n"); + rnd_message(PCB_MSG_ERROR, "Too many subcircuits selected\n"); return 1; } if (n_found == 0) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptrtmp; rnd_hid_get_coords("Click on a subcircuit", &x, &y, 0); if ((pcb_search_screen(x, y, PCB_OBJ_SUBC, &ptrtmp, &ptrtmp, &ptrtmp)) != PCB_OBJ_VOID) s = (pcb_subc_t *)ptrtmp; else { - pcb_message(PCB_MSG_ERROR, "No subcircuit found there\n"); + rnd_message(PCB_MSG_ERROR, "No subcircuit found there\n"); RND_ACT_IRES(-1); return 0; } @@ -162,9 +162,9 @@ /* DOC: disperseelements.html */ -static void disperse_obj(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t *dx, pcb_coord_t *dy, pcb_coord_t *minx, pcb_coord_t *miny, pcb_coord_t *maxy) +static void disperse_obj(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t *dx, rnd_coord_t *dy, rnd_coord_t *minx, rnd_coord_t *miny, rnd_coord_t *maxy) { - pcb_coord_t newx2, newy2; + rnd_coord_t newx2, newy2; /* If we want to disperse selected objects, maybe we need smarter code here to avoid putting components on top of others which @@ -207,7 +207,7 @@ *maxy = newy2; if (*maxy > pcb->hidlib.size_y - GAP) { *maxy = GAP; - pcb_message(PCB_MSG_WARNING, "The board is too small for hosting all subcircuits,\ndiesperse restarted from the top.\nExpect overlapping subcircuits\n"); + rnd_message(PCB_MSG_WARNING, "The board is too small for hosting all subcircuits,\ndiesperse restarted from the top.\nExpect overlapping subcircuits\n"); } } } @@ -215,7 +215,7 @@ static fgw_error_t pcb_act_DisperseElements(fgw_arg_t *res, int argc, fgw_arg_t *argv) { pcb_board_t *pcb = PCB_ACT_BOARD; - pcb_coord_t minx = GAP, miny = GAP, maxy = GAP, dx, dy; + rnd_coord_t minx = GAP, miny = GAP, maxy = GAP, dx, dy; int all = 0, id; RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, DisperseElements, id = fgw_keyword(&argv[1])); @@ -231,7 +231,7 @@ PCB_SUBC_LOOP(pcb->Data); { if (!PCB_FLAG_TEST(PCB_FLAG_LOCK, subc) && (all || PCB_FLAG_TEST(PCB_FLAG_SELECTED, subc))) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if (pcb_subc_get_origin(subc, &ox, &oy) != 0) { ox = (subc->BoundingBox.X1 + subc->BoundingBox.X2)/2; oy = (subc->BoundingBox.Y1 + subc->BoundingBox.Y2)/2; @@ -259,7 +259,7 @@ /* DOC: flip.html */ static fgw_error_t pcb_act_Flip(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; int id; void *ptrtmp; @@ -300,7 +300,7 @@ { char *units = NULL, *saved; fgw_coords_t *nx, *ny; - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2, *ptr3; int type; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Nothing found under crosshair\n"); + rnd_message(PCB_MSG_ERROR, "Nothing found under crosshair\n"); return 1; } @@ -350,7 +350,7 @@ switch(id) { case F_Object: { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Failed to find or allocate the matching subc layer\n"); + rnd_message(PCB_MSG_ERROR, "Failed to find or allocate the matching subc layer\n"); break; } if (old_len != subc->data->LayerN) @@ -423,11 +423,11 @@ typedef struct { enum { PLC_DISPERSE, PLC_FRAME, PLC_FIT } plc_method; enum { PLC_AT, PLC_MARK, PLC_CENTER } location; - pcb_coord_t lx, ly, dd; + rnd_coord_t lx, ly, dd; pcb_board_t *pcb; /* cursor for some placement methods */ - pcb_coord_t c, cx, cy; + rnd_coord_t c, cx, cy; int side; /* removal */ @@ -461,13 +461,13 @@ if (pcb_strcasecmp(conf_plc_met, "disperse") == 0) plc->plc_method = PLC_DISPERSE; else if (pcb_strcasecmp(conf_plc_met, "frame") == 0) plc->plc_method = PLC_FRAME; else if (pcb_strcasecmp(conf_plc_met, "fit") == 0) plc->plc_method = PLC_FIT; - else pcb_message(PCB_MSG_ERROR, "Invalid import/footprint_placement/method '%s', falling back to disperse\n", conf_plc_met); + else rnd_message(PCB_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 (pcb_strcasecmp(s, "mark") == 0) plc->location = PLC_MARK; else if (pcb_strcasecmp(s, "center") == 0) plc->location = PLC_CENTER; - else pcb_message(PCB_MSG_ERROR, "Invalid import/footprint_placement/location '%s', falling back to coordinates\n", s); + else rnd_message(PCB_MSG_ERROR, "Invalid import/footprint_placement/location '%s', falling back to coordinates\n", s); } else { @@ -481,7 +481,7 @@ if (pcb_strcasecmp(conf_rem_met, "select") == 0) plc->rem_method = PLC_SELECT; else if (pcb_strcasecmp(conf_rem_met, "remove") == 0) plc->rem_method = PLC_REMOVE; else if (pcb_strcasecmp(conf_rem_met, "list") == 0) plc->rem_method = PLC_LIST; - else pcb_message(PCB_MSG_ERROR, "Invalid import/footprint_removal/method '%s', falling back to select\n", conf_plc_met); + else rnd_message(PCB_MSG_ERROR, "Invalid import/footprint_removal/method '%s', falling back to select\n", conf_plc_met); } switch(plc->location) { @@ -502,9 +502,9 @@ plc->remlst = calloc(sizeof(pcb_view_list_t), 1); } -static void plc_place(placer_t *plc, pcb_coord_t *ox, pcb_coord_t *oy) +static void plc_place(placer_t *plc, rnd_coord_t *ox, rnd_coord_t *oy) { - pcb_coord_t px = plc->lx, py = plc->ly; + rnd_coord_t px = plc->lx, py = plc->ly; pcb_box_t bbx; switch(plc->plc_method) { @@ -519,11 +519,11 @@ case PLC_FRAME: pcb_data_bbox(&bbx, PCB_PASTEBUFFER->Data, 0); { - pcb_coord_t bx = bbx.X2 - bbx.X1, by = bbx.Y2 - bbx.Y1; - pcb_coord_t xo = PCB_PASTEBUFFER->X/2, yo = PCB_PASTEBUFFER->Y/2; - pcb_coord_t max = (plc->side % 2) ? plc->pcb->hidlib.size_y : plc->pcb->hidlib.size_x; - pcb_coord_t mdim = (plc->side % 2) ? by : bx; - pcb_coord_t adim = (plc->side % 2) ? bx : by; + rnd_coord_t bx = bbx.X2 - bbx.X1, by = bbx.Y2 - bbx.Y1; + rnd_coord_t xo = PCB_PASTEBUFFER->X/2, yo = PCB_PASTEBUFFER->Y/2; + rnd_coord_t max = (plc->side % 2) ? plc->pcb->hidlib.size_y : plc->pcb->hidlib.size_x; + rnd_coord_t mdim = (plc->side % 2) ? by : bx; + rnd_coord_t adim = (plc->side % 2) ? bx : by; plc->c += (double)mdim * 0.6; switch(plc->side) { @@ -580,7 +580,7 @@ plc->remlst = NULL; } if ((number_of_footprints_not_found > 0) && (!pcbhl_conf.rc.quiet)) - pcb_message(PCB_MSG_ERROR, "Footprint import: not all requested footprints were found.\nSee the message log above for details\n"); + rnd_message(PCB_MSG_ERROR, "Footprint import: not all requested footprints were found.\nSee the message log above for details\n"); } @@ -659,7 +659,7 @@ sc = pcb_subc_by_refdes(pcb->Data, refdes); if (sc == NULL) { - pcb_coord_t px, py; + rnd_coord_t px, py; #ifdef DEBUG printf(" ... Footprint not on board, need to add it.\n"); @@ -683,7 +683,7 @@ printf(" ... Footprint on board, but different from footprint loaded.\n"); #endif int orig_on_top, paste_ok = 0; - pcb_coord_t orig_cx, orig_cy; + rnd_coord_t orig_cx, orig_cy; double orig_rot; /* Different footprint, we need to swap them out. */ @@ -709,7 +709,7 @@ pcb_subc_t *psc; psc = pcb_subclist_first(&(PCB_PASTEBUFFER->Data->subc)); if (psc != NULL) { - pcb_coord_t pcx = 0, pcy = 0; + rnd_coord_t pcx = 0, pcy = 0; pcb_subc_get_origin(psc, &pcx, &pcy); if (!orig_on_top) pcb_subc_change_side(psc, pcy * 2 - RND_ACT_HIDLIB->size_y); @@ -776,7 +776,7 @@ sc = pcb_subc_by_refdes(pcb->Data, refdes); if (sc == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't find subcircuit with refdes '%s'\n", refdes); + rnd_message(PCB_MSG_ERROR, "Can't find subcircuit with refdes '%s'\n", refdes); RND_ACT_IRES(1); return 0; } @@ -797,7 +797,7 @@ { pcb_board_t *pcb = PCB_ACT_BOARD; int op; - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, RipUp, op = fgw_keyword(&argv[1])); @@ -867,7 +867,7 @@ static const char pcb_acts_MinClearGap[] = "MinClearGap(delta)\n" "MinClearGap(Selected, delta)"; static const char pcb_acth_MinClearGap[] = "Ensures that polygons are a minimum distance from objects."; /* DOC: mincleargap.html */ -static void minclr(pcb_data_t *data, pcb_coord_t value, int flags) +static void minclr(pcb_data_t *data, rnd_coord_t value, int flags) { PCB_SUBC_LOOP(data); { @@ -926,8 +926,8 @@ const char *function; const char *delta = NULL; const char *units = NULL; - pcb_bool absolute; - pcb_coord_t value; + rnd_bool absolute; + rnd_coord_t value; int flags; RND_PCB_ACT_CONVARG(1, FGW_STR, MinClearGap, function = argv[1].val.str); @@ -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) { - pcb_message(PCB_MSG_ERROR, "Invalid layer group\n"); + rnd_message(PCB_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: pcb_message(PCB_MSG_ERROR, "Invalid step direction\n"); + default: rnd_message(PCB_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) { - pcb_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(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_ACT_IRES(1); return 0; } @@ -1045,7 +1045,7 @@ { pcb_board_t *pcb = PCB_ACT_BOARD; const char *txt; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_layer_t *ly; int fid, dir, scale; pcb_text_t *t; @@ -1059,12 +1059,12 @@ RND_PCB_ACT_CONVARG(7, FGW_STR, CreateText, txt = argv[7].val.str); if (scale < 1) { - pcb_message(PCB_MSG_ERROR, "Invalid scale (must be larger than zero)\n"); + rnd_message(PCB_MSG_ERROR, "Invalid scale (must be larger than zero)\n"); return 1; } if ((dir < 0) || (dir > 3)) { - pcb_message(PCB_MSG_ERROR, "Invalid direction (must be 0, 1, 2 or 3)\n"); + rnd_message(PCB_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; - pcb_message(PCB_MSG_INFO, "subc #%ld (%s): %u\n", sc->ID, (sc->refdes == NULL ? "" : sc->refdes), pcb_subc_hash(sc)); + rnd_message(PCB_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])); } - pcb_message(PCB_MSG_INFO, "%s\n", str.array); + rnd_message(PCB_MSG_INFO, "%s\n", str.array); vtp0_uninit(vt); free(vt); } @@ -1181,7 +1181,7 @@ static fgw_error_t pcb_act_Rotate90(fgw_arg_t *res, int argc, fgw_arg_t *argv) { int steps; - pcb_coord_t x, y; + rnd_coord_t x, y; RND_PCB_ACT_CONVARG(1, FGW_INT, Rotate90, steps = argv[1].val.nat_int); RND_ACT_IRES(0); Index: trunk/src/operation.c =================================================================== --- trunk/src/operation.c (revision 30902) +++ trunk/src/operation.c (revision 30903) @@ -124,9 +124,9 @@ * resets the selected flag if requested * returns pcb_true if anything has changed */ -pcb_bool pcb_selected_operation(pcb_board_t *pcb, pcb_data_t *data, pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type, pcb_bool on_locked_too) +rnd_bool pcb_selected_operation(pcb_board_t *pcb, pcb_data_t *data, pcb_opfunc_t *F, pcb_opctx_t *ctx, rnd_bool Reset, int type, rnd_bool on_locked_too) { - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; pcb_any_obj_t *exto; if (!(pcb_brave & PCB_BRAVE_NOCLIPBATCH) && (data != NULL)) Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 30902) +++ trunk/src/operation.h (revision 30903) @@ -50,14 +50,14 @@ typedef struct { pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ - pcb_bool is_absolute; - pcb_coord_t value; /* delta or absolute (depending on is_absoulute) */ + rnd_bool is_absolute; + rnd_coord_t value; /* delta or absolute (depending on is_absoulute) */ } pcb_opctx_chgsize_t; typedef struct { pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ - pcb_bool is_absolute; + rnd_bool is_absolute; pcb_angle_t value; /* same as above, but for angles */ } pcb_opctx_chgangle_t; @@ -74,7 +74,7 @@ typedef struct { pcb_board_t *pcb; - pcb_coord_t DeltaX, DeltaY; /* movement vector */ + rnd_coord_t DeltaX, DeltaY; /* movement vector */ int from_outside; int keep_id; } pcb_opctx_copy_t; @@ -81,17 +81,17 @@ typedef struct { pcb_board_t *pcb; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_cardinal_t idx; /* poly point idx */ - pcb_bool last; - pcb_bool forcible; + rnd_bool last; + rnd_bool forcible; } pcb_opctx_insert_t; typedef struct { pcb_board_t *pcb; - pcb_coord_t dx, dy; /* used by local routines as offset */ + rnd_coord_t dx, dy; /* used by local routines as offset */ pcb_layer_t *dst_layer; - pcb_bool more_to_come; + rnd_bool more_to_come; } pcb_opctx_move_t; typedef struct { @@ -101,7 +101,7 @@ typedef struct { pcb_board_t *pcb; - pcb_coord_t center_x, center_y; /* center of rotation */ + rnd_coord_t center_x, center_y; /* center of rotation */ unsigned number; /* number of rotations, for 90 deg rotation */ double cosa, sina, angle; /* for arbitrary angle rotation */ } pcb_opctx_rotate_t; @@ -160,6 +160,6 @@ } pcb_opfunc_t; void *pcb_object_operation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3); -pcb_bool pcb_selected_operation(pcb_board_t *pcb, pcb_data_t *data, pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type, pcb_bool on_locked_too); +rnd_bool pcb_selected_operation(pcb_board_t *pcb, pcb_data_t *data, pcb_opfunc_t *F, pcb_opctx_t *ctx, rnd_bool Reset, int type, rnd_bool on_locked_too); #endif Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 30902) +++ trunk/src/plug_footprint.c (revision 30903) @@ -96,7 +96,7 @@ htsp_entry_t *e; if (pcb_plug_fp_chain != NULL) - pcb_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(PCB_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) - pcb_message(PCB_MSG_WARNING, "Warning: footprint library list error on %s\n", toppath); + rnd_message(PCB_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 30902) +++ trunk/src/plug_footprint_act.c (revision 30903) @@ -49,25 +49,25 @@ l = pcb_fp_lib_search(&pcb_library, name); if (l == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't find library path %s\n", name); + rnd_message(PCB_MSG_ERROR, "Can't find library path %s\n", name); RND_ACT_IRES(1); return 0; } if (l->type != PCB_LIB_DIR) { - pcb_message(PCB_MSG_ERROR, "Library path %s is not a directory\n", name); + rnd_message(PCB_MSG_ERROR, "Library path %s is not a directory\n", name); RND_ACT_IRES(1); return 0; } if (l->data.dir.backend == NULL) { - pcb_message(PCB_MSG_ERROR, "Library path %s is not a top level directory of a fp_ plugin\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to rehash %s\n", name); + rnd_message(PCB_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 30902) +++ trunk/src/plug_import.c (revision 30903) @@ -106,18 +106,18 @@ pcb_plug_import_t *plug; if (!pcb_file_readable(filename)) { - pcb_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(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); return 1; } if (!filename) { - pcb_message(PCB_MSG_ERROR, "Error: need a file name for pcb_import_netlist()\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Error: can't find a suitable netlist parser for %s\n", filename); + rnd_message(PCB_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) - pcb_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(PCB_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 30902) +++ trunk/src/plug_io.c (revision 30903) @@ -75,7 +75,7 @@ pcb_plug_io_t *pcb_plug_io_chain = NULL; int pcb_io_err_inhibit = 0; pcb_view_list_t pcb_io_incompat_lst; -static pcb_bool pcb_io_incompat_lst_enable = pcb_false; +static rnd_bool pcb_io_incompat_lst_enable = pcb_false; void pcb_plug_io_err(rnd_hidlib_t *hidlib, int res, const char *what, const char *filename) { @@ -105,7 +105,7 @@ if (filename == NULL) filename = ""; } - pcb_message(PCB_MSG_ERROR, "IO error during %s: %s %s %s\n", what, reason, filename, comment); + rnd_message(PCB_MSG_ERROR, "IO error during %s: %s %s %s\n", what, reason, filename, comment); } } @@ -141,7 +141,7 @@ if (ft == NULL) { if (!ignore_missing) - pcb_message(PCB_MSG_ERROR, "Error: can't open %s for reading (format is %s)\n", Filename, fmt); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't find a IO_ plugin to load a PCB using format %s\n", fmt); + rnd_message(PCB_MSG_ERROR, "can't find a IO_ plugin to load a PCB using format %s\n", fmt); return -1; } if (*accept_total > 1) { - pcb_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(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); for(n = 0; n < len; n++) - pcb_message(PCB_MSG_INFO, " %s\n", available[n].plug->description); + rnd_message(PCB_MSG_INFO, " %s\n", available[n].plug->description); } } else { @@ -191,7 +191,7 @@ } if (*accept_total == 0) { - pcb_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(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); return -1; } return len; @@ -361,12 +361,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) { - pcb_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(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"); return NULL; } else { if (PCB->hidlib.filename != NULL) - pcb_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(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); } } @@ -385,7 +385,7 @@ int res; if ((subc_idx >= 0) && (subc_idx >= avail)) { - pcb_message(PCB_MSG_ERROR, "pcb_write_buffer: subc index out of range"); + rnd_message(PCB_MSG_ERROR, "pcb_write_buffer: subc index out of range"); return -1; } if (subc_idx < 0) { @@ -393,7 +393,7 @@ gdl_iterator_t sit; if (p->write_subcs_head(p, &udata, f, (avail > 1), avail) != 0) { - pcb_message(PCB_MSG_ERROR, "pcb_write_buffer: failed to write head"); + rnd_message(PCB_MSG_ERROR, "pcb_write_buffer: failed to write head"); return -1; } res = 0; @@ -404,7 +404,7 @@ } else { if (p->write_subcs_head(p, &udata, f, 0, 1) != 0) { - pcb_message(PCB_MSG_ERROR, "pcb_write_buffer: failed to write head"); + rnd_message(PCB_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)); @@ -413,7 +413,7 @@ } } -static int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, pcb_bool subc_only, long subc_idx) +static int pcb_write_buffer(FILE *f, pcb_buffer_t *buff, const char *fmt, rnd_bool subc_only, long subc_idx) { int res/*, newfmt = 0*/; pcb_plug_io_t *p = pcb_io_find_writer(subc_only ? PCB_IOT_FOOTPRINT : PCB_IOT_BUFFER, fmt); @@ -473,7 +473,7 @@ } -static int pcb_write_pcb(FILE *f, const char *old_filename, const char *new_filename, const char *fmt, pcb_bool emergency) +static int pcb_write_pcb(FILE *f, const char *old_filename, const char *new_filename, const char *fmt, rnd_bool emergency) { int res, newfmt = 0; pcb_plug_io_t *p = PCB->Data->loader; @@ -490,7 +490,7 @@ pcb_event(&PCB->hidlib, PCB_EVENT_SAVE_POST, "si", fmt, res); } else { - pcb_message(PCB_MSG_ERROR, "Can't write PCB: internal error: io plugin %s doesn't implement write_pcb()\n", p->description); + rnd_message(PCB_MSG_ERROR, "Can't write PCB: internal error: io plugin %s doesn't implement write_pcb()\n", p->description); res = -1; } } @@ -508,7 +508,7 @@ /* load PCB: parse the file with enabled 'PCB mode' (see parser); if successful, update some other stuff. If revert is pcb_true, we pass "revert" as a parameter to the pcb changed event. */ -static int real_load_pcb(const char *Filename, const char *fmt, pcb_bool revert, pcb_bool require_font, int how) +static int real_load_pcb(const char *Filename, const char *fmt, rnd_bool revert, rnd_bool require_font, int how) { const char *unit_suffix; char *new_filename; @@ -558,7 +558,7 @@ /* enable default font if necessary */ if (!PCB->fontkit.valid) { if ((require_font) && (!PCB->is_footprint)) - pcb_message(PCB_MSG_WARNING, "File '%s' has no font information, using default font\n", new_filename); + rnd_message(PCB_MSG_WARNING, "File '%s' has no font information, using default font\n", new_filename); PCB->fontkit.valid = pcb_true; } @@ -598,7 +598,7 @@ #ifdef DEBUG end = clock(); elapsed = ((double) (end - start)) / CLOCKS_PER_SEC; - pcb_message(PCB_MSG_INFO, "Loading file %s took %f seconds of CPU time\n", new_filename, elapsed); + rnd_message(PCB_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 */ @@ -613,7 +613,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) { - pcb_message(PCB_MSG_ERROR, "FATAL: can't create a new empty pcb!"); + rnd_message(PCB_MSG_ERROR, "FATAL: can't create a new empty pcb!"); exit(1); } } @@ -628,7 +628,7 @@ } /* Write the pcb file, a footprint or a buffer */ -static int pcb_write_file(FILE *fp, pcb_bool thePcb, const char *old_path, const char *new_path, const char *fmt, pcb_bool emergency, pcb_bool subc_only, long subc_idx) +static int pcb_write_file(FILE *fp, rnd_bool thePcb, const char *old_path, const char *new_path, const char *fmt, rnd_bool emergency, rnd_bool subc_only, long subc_idx) { if (thePcb) { if (PCB->is_footprint) @@ -640,7 +640,7 @@ /* writes to pipe using the command defined by conf_core.rc.save_command %f are replaced by the passed filename */ -static int pcb_write_pipe(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool subc_only, long subc_idx, int askovr) +static int pcb_write_pipe(const char *Filename, rnd_bool thePcb, const char *fmt, rnd_bool subc_only, long subc_idx, int askovr) { FILE *fp; int result; @@ -713,7 +713,7 @@ if (conf_core.editor.io_incomp_popup) { long int len = pcb_view_list_length(&pcb_io_incompat_lst); if (len > 0) { - pcb_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(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_actionva(&PCB->hidlib, "IOincompatList", conf_core.editor.io_incomp_style, "auto", NULL); } } @@ -721,7 +721,7 @@ return retcode; } -int pcb_load_pcb(const char *file, const char *fmt, pcb_bool require_font, int how) +int pcb_load_pcb(const char *file, const char *fmt, rnd_bool require_font, int how) { int res = real_load_pcb(file, fmt, pcb_false, require_font, how); if (res == 0) { @@ -731,7 +731,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)) { - pcb_message(PCB_MSG_ERROR, "Invalid footprint file: can not determine bounding box\n"); + rnd_message(PCB_MSG_ERROR, "Invalid footprint file: can not determine bounding box\n"); res = -1; } else @@ -811,13 +811,13 @@ 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)pcb_getpid()); - pcb_message(PCB_MSG_INFO, "Trying to save your layout in '%s'\n", filename); + rnd_message(PCB_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); } } /* front-end for pcb_save_in_tmp() to makes sure it is only called once */ -static pcb_bool dont_save_any_more = pcb_false; +static rnd_bool dont_save_any_more = pcb_false; void pcb_emergency_save(void) { @@ -889,7 +889,7 @@ free(filename); } -int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool subc_only, long subc_idx, int askovr) +int pcb_write_pcb_file(const char *Filename, rnd_bool thePcb, const char *fmt, rnd_bool emergency, rnd_bool subc_only, long subc_idx, int askovr) { FILE *fp; int result, overwrite = 0; @@ -911,7 +911,7 @@ Filename = fn_tmp; } else { - pcb_message(PCB_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); + rnd_message(PCB_MSG_ERROR, "Can't rename %s to %s before save\n", Filename, fn_tmp); return -1; } } @@ -992,14 +992,14 @@ pcb_view_list_append(&pcb_io_incompat_lst, violation); } else { - pcb_message(PCB_MSG_ERROR, "save error: %s\n", title); + rnd_message(PCB_MSG_ERROR, "save error: %s\n", title); if (obj != NULL) { - pcb_coord_t x = (obj->BoundingBox.X1 + obj->BoundingBox.X2)/2; - pcb_coord_t y = (obj->BoundingBox.Y1 + obj->BoundingBox.Y2)/2; - pcb_message(PCB_MSG_ERROR, " near %$mm %$mm\n", x, y); + 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); } if (description != NULL) - pcb_message(PCB_MSG_ERROR, " (%s)\n", description); + rnd_message(PCB_MSG_ERROR, " (%s)\n", description); } return 0; } @@ -1080,8 +1080,8 @@ { pcb_view_list_free_fields(&pcb_io_incompat_lst); if (pcb_plug_io_chain != NULL) { - pcb_message(PCB_MSG_ERROR, "pcb_plug_io_chain is not empty; a plugin did not remove itself from the chain. Fix your plugins!\n"); - pcb_message(PCB_MSG_ERROR, "head: desc='%s'\n", pcb_plug_io_chain->description); + 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); } free(last_design_dir); last_design_dir = NULL; Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 30902) +++ trunk/src/plug_io.h (revision 30903) @@ -116,7 +116,7 @@ into a pipe. If emergency is true, do the safest save possible, don't mind formatting and extras. Return 0 on success. */ - int (*write_pcb)(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, pcb_bool emergency); + int (*write_pcb)(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency); /* Attempt to write the font to file. Return 0 on success. */ int (*write_font)(pcb_plug_io_t *ctx, pcb_font_t *font, const char *Filename); @@ -128,7 +128,7 @@ only one, shared format-setting-tab is created for them. If apply is true, the dialog box was closed with okay on this format selected. */ void *(*save_as_subd_init)(const pcb_plug_io_t *ctx, pcb_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); - void (*save_as_subd_uninit)(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, pcb_bool apply); + void (*save_as_subd_uninit)(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply); void (*save_as_fmt_changed)(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub); const char *default_fmt; @@ -161,7 +161,7 @@ /********** common function used to be part of file.[ch] and friends **********/ int pcb_save_pcb(const char *, const char *fmt); #define PCB_INHIBIT_BOARD_CHANGED 0x20 -int pcb_load_pcb(const char *name, const char *fmt, pcb_bool, int how); /* how: 0=normal pcb; 1=default.pcb, 2=misc (do not load settings) | 0x10: ignore missing file, | PCB_INHIBIT_BOARD_CHANGED: do not send a board changed event */ +int pcb_load_pcb(const char *name, const char *fmt, rnd_bool, int how); /* how: 0=normal pcb; 1=default.pcb, 2=misc (do not load settings) | 0x10: ignore missing file, | PCB_INHIBIT_BOARD_CHANGED: do not send a board changed event */ void pcb_enable_autosave(void); void pcb_backup(void); void pcb_save_in_tmp(void); @@ -172,7 +172,7 @@ int pcb_save_buffer(const char *Filename, const char *fmt); void pcb_print_quoted_string_(FILE *, const char *); /* without wrapping in "" */ void pcb_print_quoted_string(FILE *, const char *); /* with wrapping in "" */ -int pcb_write_pcb_file(const char *Filename, pcb_bool thePcb, const char *fmt, pcb_bool emergency, pcb_bool subc_only, long subc_idx, int askovr); +int pcb_write_pcb_file(const char *Filename, rnd_bool thePcb, const char *fmt, rnd_bool emergency, rnd_bool subc_only, long subc_idx, int askovr); void pcb_set_design_dir(const char *fn); int pcb_load_buffer(rnd_hidlib_t *hidlib, pcb_buffer_t *buff, const char *fn, const char *fmt); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30902) +++ trunk/src/polygon.c (revision 30903) @@ -222,7 +222,7 @@ return p; } -pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, pcb_bool *need_full) +pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full) { pcb_pline_t *contour = NULL; pcb_polyarea_t *np1 = NULL, *np = NULL; @@ -267,7 +267,7 @@ #if 0 if (!pcb_poly_valid(np)) { pcb_cardinal_t cnt = pcb_polyarea_split_selfint(np); - pcb_message(PCB_MSG_ERROR, "Had to split up self-intersecting polygon into %ld parts\n", (long)cnt); + rnd_message(PCB_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)); @@ -284,17 +284,17 @@ pcb_polyarea_t *pcb_poly_from_poly(pcb_poly_t * p) { - pcb_bool tmp; + rnd_bool tmp; return pcb_poly_to_polyarea(p, &tmp); } -pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t *L, pcb_coord_t thick) +pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t *L, rnd_coord_t thick) { return pcb_poly_from_line(L->Point1.X, L->Point1.Y, L->Point2.X, L->Point2.Y, thick, PCB_FLAG_TEST(PCB_FLAG_SQUARE, L)); } -pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t *a, pcb_coord_t thick) +pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t *a, rnd_coord_t thick) { return pcb_poly_from_arc(a->X, a->Y, a->Width, a->Height, a->StartAngle, a->Delta, thick); } @@ -301,7 +301,7 @@ /* clear np1 from the polygon - should be inline with -O3 */ -static int Subtract(pcb_polyarea_t * np1, pcb_poly_t * p, pcb_bool fnp) +static int Subtract(pcb_polyarea_t * np1, pcb_poly_t * p, rnd_bool fnp) { pcb_polyarea_t *merged = NULL, *np = np1; int x; @@ -333,17 +333,17 @@ p->Clipped = biggest(merged); assert(!p->Clipped || pcb_poly_valid(p->Clipped)); if (!p->Clipped) - pcb_message(PCB_MSG_WARNING, "Polygon #%ld cleared out of existence near (%$mm, %$mm)\n", + rnd_message(PCB_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; } -int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, pcb_bool fnp) +int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp) { return Subtract(np1, p, fnp); } -pcb_polyarea_t *pcb_poly_from_box_bloated(pcb_box_t * box, pcb_coord_t bloat) +pcb_polyarea_t *pcb_poly_from_box_bloated(pcb_box_t * box, rnd_coord_t bloat) { return pcb_poly_from_rect(box->X1 - bloat, box->X2 + bloat, box->Y1 - bloat, box->Y2 + bloat); } @@ -397,7 +397,7 @@ typedef struct { pcb_poly_t *poly; - pcb_coord_t clearance; + rnd_coord_t clearance; } poly_sub_text_t; static void poly_sub_text_cb(void *ctx_, pcb_any_obj_t *obj) @@ -407,7 +407,7 @@ pcb_poly_t *poly = (pcb_poly_t *)obj; pcb_arc_t *arc = (pcb_arc_t *)obj; pcb_polyarea_t *np = NULL; - pcb_bool need_full; + rnd_bool need_full; switch(obj->type) { case PCB_OBJ_LINE: np = pcb_poly_from_pcb_line(line, line->Thickness + ctx->clearance); break; @@ -455,7 +455,7 @@ pcb_data_t *data; pcb_layer_t *layer; pcb_poly_t *polygon; - pcb_bool solder; + rnd_bool solder; pcb_polyarea_t *accumulate; int batch_size; jmp_buf env; @@ -541,7 +541,7 @@ } /* quick create a polygon area from a line, knowing the coords and width */ -static pcb_polyarea_t *poly_sub_callback_line(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t width) +static pcb_polyarea_t *poly_sub_callback_line(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t width) { static pcb_line_t lin; static int inited = 0; @@ -570,10 +570,10 @@ *dst = tmp; \ } while(0) -void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, pcb_coord_t clearance) +void pcb_poly_pa_clearance_construct(pcb_polyarea_t **dst, pcb_poly_it_t *it, rnd_coord_t clearance) { pcb_polyarea_t *tmp, *lin; - pcb_coord_t x, y, px, py, x0, y0; + rnd_coord_t x, y, px, py, x0, y0; pcb_pline_t *pl; int go; pcb_cardinal_t cnt; @@ -614,11 +614,11 @@ /* Construct a poly area that represents the enlarged subpoly - so it can be subtracted from the parent poly to form the clearance for subpoly. If clr_override is not NULL, use that clearance value instead of the subpoly's */ -pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, pcb_coord_t *clr_override) +pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override) { pcb_polyarea_t *ret = NULL, *pa; pcb_poly_it_t it; - pcb_coord_t clr; + rnd_coord_t clr; if (clr_override != NULL) clr = *clr_override; @@ -752,7 +752,7 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const pcb_box_t *here, pcb_coord_t expand, int noop) +static pcb_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const pcb_box_t *here, rnd_coord_t expand, int noop) { pcb_cardinal_t r = 0; int seen; @@ -821,7 +821,7 @@ pcb_polyarea_t *merged = NULL, *np = np1; pcb_polyarea_t *orig_poly, *clipped_np; int x; - pcb_bool need_full; + rnd_bool need_full; assert(np); assert(p); /* NOTE: p->clipped might be NULL if a poly is "cleared out of existence" and is now coming back */ @@ -924,12 +924,12 @@ return 1; } -static pcb_bool inhibit = pcb_false; +static rnd_bool inhibit = pcb_false; int pcb_poly_init_clip_prog(pcb_data_t *Data, pcb_layer_t *layer, pcb_poly_t *p, void (*cb)(void *ctx), void *ctx, int force) { pcb_board_t *pcb; - pcb_bool need_full; + rnd_bool need_full; void (*old_cb)(void *ctx); void *old_ctx; @@ -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)) { - pcb_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(PCB_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); @@ -1014,12 +1014,12 @@ * line between the points on either side of it is redundant. * returns pcb_true if any points are removed */ -pcb_bool pcb_poly_remove_excess_points(pcb_layer_t *Layer, pcb_poly_t *Polygon) +rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *Layer, pcb_poly_t *Polygon) { pcb_point_t *p; pcb_cardinal_t n, prev, next; pcb_line_t line; - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; if (pcb_undoing()) return pcb_false; @@ -1045,7 +1045,7 @@ * point of the segment with the lowest distance to the passed * coordinates */ -pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *Polygon, pcb_coord_t X, pcb_coord_t Y) +pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) { double mindistance = (double) PCB_MAX_COORD * PCB_MAX_COORD; pcb_point_t *ptr1, *ptr2; @@ -1145,12 +1145,12 @@ * if closing the polygon makes sense */ if (!conf_core.editor.all_direction_lines) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; 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)) { - pcb_message(PCB_MSG_ERROR, "Cannot close polygon because 45 degree lines are requested.\n"); + rnd_message(PCB_MSG_ERROR, "Cannot close polygon because 45 degree lines are requested.\n"); return; } } @@ -1158,7 +1158,7 @@ pcb_draw(); } else - pcb_message(PCB_MSG_ERROR, "A polygon has to have at least 3 points\n"); + rnd_message(PCB_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) @@ -1223,12 +1223,12 @@ * if closing the polygon makes sense */ if (!conf_core.editor.all_direction_lines) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; 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)) { - pcb_message(PCB_MSG_ERROR, "Cannot close polygon hole because 45 degree lines are requested.\n"); + rnd_message(PCB_MSG_ERROR, "Cannot close polygon hole because 45 degree lines are requested.\n"); return; } } @@ -1236,7 +1236,7 @@ pcb_draw(); } else - pcb_message(PCB_MSG_ERROR, "A polygon hole has to have at least 3 points\n"); + rnd_message(PCB_MSG_ERROR, "A polygon hole has to have at least 3 points\n"); } /* --------------------------------------------------------------------------- @@ -1489,10 +1489,10 @@ pcb_poly_plows(dt, type, ptr1, ptr2, subtract_plow, NULL); } -pcb_bool pcb_poly_isects_poly(pcb_polyarea_t * a, pcb_poly_t *p, pcb_bool fr) +rnd_bool pcb_poly_isects_poly(pcb_polyarea_t * a, pcb_poly_t *p, rnd_bool fr) { pcb_polyarea_t *x; - pcb_bool ans; + rnd_bool ans; ans = pcb_polyarea_touching(a, p->Clipped); /* argument may be register, so we must copy it */ x = a; @@ -1502,7 +1502,7 @@ } -pcb_bool pcb_poly_is_point_in_p(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t r, pcb_poly_t *p) +rnd_bool pcb_poly_is_point_in_p(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t r, pcb_poly_t *p) { pcb_polyarea_t *c; pcb_vector_t v; @@ -1528,7 +1528,7 @@ } -pcb_bool pcb_poly_is_point_in_p_ignore_holes(pcb_coord_t X, pcb_coord_t Y, pcb_poly_t *p) +rnd_bool pcb_poly_is_point_in_p_ignore_holes(rnd_coord_t X, rnd_coord_t Y, pcb_poly_t *p) { pcb_vector_t v; v[0] = X; @@ -1536,7 +1536,7 @@ return pcb_poly_contour_inside(p->Clipped->contours, v); } -pcb_bool pcb_poly_is_rect_in_p(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_poly_t *p) +rnd_bool pcb_poly_is_rect_in_p(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_poly_t *p) { pcb_polyarea_t *s; if (!(s = pcb_poly_from_rect(min(X1, X2), max(X1, X2), min(Y1, Y2), max(Y1, Y2)))) @@ -1559,10 +1559,10 @@ } /* make a polygon split into multiple parts into multiple polygons */ -pcb_bool pcb_poly_morph(pcb_layer_t *layer, pcb_poly_t *poly) +rnd_bool pcb_poly_morph(pcb_layer_t *layer, pcb_poly_t *poly) { pcb_polyarea_t *p, *start; - pcb_bool many = pcb_false; + rnd_bool many = pcb_false; pcb_flag_t flags; if (!poly->Clipped || PCB_FLAG_TEST(PCB_FLAG_LOCK, poly)) @@ -1678,7 +1678,7 @@ pcb_polyarea_t *pa; pcb_pline_t *pline; pcb_vnode_t *node; - pcb_bool outer; + rnd_bool outer; if (Input == NULL) return; @@ -1719,10 +1719,10 @@ pcb_board_set_changed_flag(pcb_true); } -pcb_bool pcb_pline_is_rectangle(pcb_pline_t *pl) +rnd_bool pcb_pline_is_rectangle(pcb_pline_t *pl) { int n; - pcb_coord_t x[4], y[4]; + rnd_coord_t x[4], y[4]; pcb_vnode_t *v; v = pl->head->next; Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 30902) +++ trunk/src/polygon.h (revision 30903) @@ -49,8 +49,8 @@ pcb_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, pcb_cardinal_t point); pcb_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, pcb_cardinal_t point); pcb_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, pcb_cardinal_t point); -pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *, pcb_coord_t, pcb_coord_t); -pcb_bool pcb_poly_remove_excess_points(pcb_layer_t *, pcb_poly_t *); +pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *, rnd_coord_t, rnd_coord_t); +rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *, pcb_poly_t *); void pcb_polygon_go_to_prev_point(void); /* undo */ void pcb_polygon_go_to_next_point(void); /* redo */ void pcb_polygon_close_poly(void); @@ -65,10 +65,10 @@ /* helpers: create complex shaped polygons */ pcb_polyarea_t *pcb_poly_from_poly(pcb_poly_t *); -pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t * l, pcb_coord_t thick); -pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t * l, pcb_coord_t thick); -pcb_polyarea_t *pcb_poly_from_box_bloated(pcb_box_t * box, pcb_coord_t radius); -pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, pcb_coord_t *clr_override); /* clearance shape for when clearpolypoly is set */ +pcb_polyarea_t *pcb_poly_from_pcb_line(pcb_line_t * l, rnd_coord_t thick); +pcb_polyarea_t *pcb_poly_from_pcb_arc(pcb_arc_t * l, rnd_coord_t thick); +pcb_polyarea_t *pcb_poly_from_box_bloated(pcb_box_t * box, rnd_coord_t radius); +pcb_polyarea_t *pcb_poly_clearance_construct(pcb_poly_t *subpoly, rnd_coord_t *clr_override); /* clearance shape for when clearpolypoly is set */ int pcb_poly_init_clip(pcb_data_t * d, pcb_layer_t * l, pcb_poly_t * p); int pcb_poly_init_clip_force(pcb_data_t *Data, pcb_layer_t *layer, pcb_poly_t *p); /* bypasses clip inhibit */ @@ -76,7 +76,7 @@ void pcb_poly_clear_from_poly(pcb_data_t *, int, void *, void *); /* Convert a polygon to an unclipped polyarea */ -pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, pcb_bool *need_full); +pcb_polyarea_t *pcb_poly_to_polyarea(pcb_poly_t *p, rnd_bool *need_full); /* Same as pcb_poly_init_clip() but also call cb before each operation, giving the caller a chance to draw a progress bar */ @@ -87,24 +87,24 @@ pcb_cardinal_t pcb_poly_num_clears(pcb_data_t *data, pcb_layer_t *layer, pcb_poly_t *polygon); -pcb_bool pcb_poly_is_point_in_p(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_poly_t *); -pcb_bool pcb_poly_is_point_in_p_ignore_holes(pcb_coord_t, pcb_coord_t, pcb_poly_t *); +rnd_bool pcb_poly_is_point_in_p(rnd_coord_t, rnd_coord_t, rnd_coord_t, pcb_poly_t *); +rnd_bool pcb_poly_is_point_in_p_ignore_holes(rnd_coord_t, rnd_coord_t, pcb_poly_t *); pcb_bool_t pcb_is_point_in_convex_quad(pcb_vector_t p, pcb_vector_t *q); -pcb_bool pcb_poly_is_rect_in_p(pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_coord_t, pcb_poly_t *); -pcb_bool pcb_poly_isects_poly(pcb_polyarea_t *, pcb_poly_t *, pcb_bool); -pcb_bool pcb_pline_isect_line(pcb_pline_t *pl, pcb_coord_t lx1, pcb_coord_t ly1, pcb_coord_t lx2, pcb_coord_t ly2, pcb_coord_t *cx, pcb_coord_t *cy); -pcb_bool pcb_pline_isect_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r); /* cirlce contour crosses polyline contour */ -pcb_bool pcb_pline_embraces_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r); /* circle is within the polyline; caller must make sure they do not cross! */ -pcb_bool pcb_pline_overlaps_circ(pcb_pline_t *pl, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r); /* circle is within or is crossing the polyline */ -pcb_bool pcb_poly_morph(pcb_layer_t *, pcb_poly_t *); +rnd_bool pcb_poly_is_rect_in_p(rnd_coord_t, rnd_coord_t, rnd_coord_t, rnd_coord_t, pcb_poly_t *); +rnd_bool pcb_poly_isects_poly(pcb_polyarea_t *, pcb_poly_t *, rnd_bool); +rnd_bool pcb_pline_isect_line(pcb_pline_t *pl, rnd_coord_t lx1, rnd_coord_t ly1, rnd_coord_t lx2, rnd_coord_t ly2, rnd_coord_t *cx, rnd_coord_t *cy); +rnd_bool pcb_pline_isect_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* cirlce contour crosses polyline contour */ +rnd_bool pcb_pline_embraces_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* circle is within the polyline; caller must make sure they do not cross! */ +rnd_bool pcb_pline_overlaps_circ(pcb_pline_t *pl, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r); /* circle is within or is crossing the polyline */ +rnd_bool pcb_poly_morph(pcb_layer_t *, pcb_poly_t *); void pcb_poly_no_holes_dicer(pcb_poly_t * p, const pcb_box_t * clip, void (*emit) (pcb_pline_t *, void *), void *user_data); void pcb_poly_to_polygons_on_layer(pcb_data_t *, pcb_layer_t *, pcb_polyarea_t *, pcb_flag_t); -pcb_bool pcb_pline_is_rectangle(pcb_pline_t *pl); +rnd_bool pcb_pline_is_rectangle(pcb_pline_t *pl); /* clear np1 from the polygon; also free np1 if fnp is true. Returns 1 on success. */ -int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, pcb_bool fnp); +int pcb_poly_subtract(pcb_polyarea_t *np1, pcb_poly_t *p, rnd_bool fnp); /* Subtract or unsubtract obj from poly; Layer is used for looking up thermals */ int pcb_poly_sub_obj(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *Polygon, int type, void *obj); Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 30902) +++ trunk/src/polygon_act.c (revision 30903) @@ -61,7 +61,7 @@ switch(op) { case F_Object: { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 30902) +++ trunk/src/rats_act.c (revision 30903) @@ -117,7 +117,7 @@ switch(op) { case F_Find: { - pcb_coord_t x, y; + rnd_coord_t x, y; unsigned long res; pcb_find_t fctx; rnd_hid_get_coords("Click on a connection", &x, &y, 0); @@ -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); - pcb_message(PCB_MSG_INFO, "found %ld objects\n", res); + rnd_message(PCB_MSG_INFO, "found %ld objects\n", res); pcb_find_free(&fctx); break; } Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 30902) +++ trunk/src/rats_patch.c (revision 30903) @@ -327,7 +327,7 @@ pcb_ratspatch_apply(pcb, n); } -int pcb_rats_patch_export(pcb_board_t *pcb, pcb_ratspatch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx) +int pcb_rats_patch_export(pcb_board_t *pcb, pcb_ratspatch_line_t *pat, rnd_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx) { pcb_ratspatch_line_t *n; @@ -445,7 +445,7 @@ PCB_END_LOOP; if (!(found)) { - pcb_message(PCB_MSG_ERROR, "ReplaceFootprint(Selected) called with no selection\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ReplaceFootprint(Object): no subc under cursor\n"); + rnd_message(PCB_MSG_ERROR, "ReplaceFootprint(Object): no subc under cursor\n"); return 1; } *olds = ptr1; @@ -462,7 +462,7 @@ break; default: - pcb_message(PCB_MSG_ERROR, "ReplaceFootprint(): invalid first argument\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "No footprint name supplied\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "%s%s contains no subcircuits\n", what, what2); + rnd_message(PCB_MSG_ERROR, "%s%s contains no subcircuits\n", what, what2); return 1; } if (len > 1) { - pcb_message(PCB_MSG_ERROR, "%s%s contains multiple subcircuits\n", what, what2); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't open netlist patch file %s for writing\n", fn); + rnd_message(PCB_MSG_ERROR, "Can't open netlist patch file %s for writing\n", fn); RND_ACT_IRES(-1); return 0; } Index: trunk/src/rats_patch.h =================================================================== --- trunk/src/rats_patch.h (revision 30902) +++ trunk/src/rats_patch.h (revision 30903) @@ -93,6 +93,6 @@ /* Call cb() for each item to output; PCB_PTRE_INFO* is calculated/called only if need_info_lines is true; the pcb pointer is used for looking up connections */ -int pcb_rats_patch_export(pcb_board_t *pcb, pcb_ratspatch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx); +int pcb_rats_patch_export(pcb_board_t *pcb, pcb_ratspatch_line_t *pat, rnd_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx); #endif Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 30902) +++ trunk/src/remove.c (revision 30903) @@ -90,7 +90,7 @@ * removes all selected and visible objects * returns pcb_true if any objects have been removed */ -pcb_bool pcb_remove_selected(pcb_bool locked_too) +rnd_bool pcb_remove_selected(rnd_bool locked_too) { pcb_opctx_t ctx; Index: trunk/src/remove.h =================================================================== --- trunk/src/remove.h (revision 30902) +++ trunk/src/remove.h (revision 30903) @@ -38,7 +38,7 @@ PCB_OBJ_POLY_POINT | PCB_OBJ_POLY | PCB_OBJ_RAT | PCB_OBJ_ARC | PCB_OBJ_GFX \ | PCB_OBJ_ARC_POINT) -pcb_bool pcb_remove_selected(pcb_bool locked_too); +rnd_bool pcb_remove_selected(rnd_bool locked_too); /* Undoable delete (operation wrapper) */ void *pcb_remove_object(int Type, void *Ptr1, void *Ptr2, void *Ptr3); Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 30902) +++ trunk/src/rotate.c (revision 30903) @@ -89,12 +89,12 @@ /* --------------------------------------------------------------------------- * rotates a point in 90 degree steps */ -void pcb_point_rotate90(pcb_point_t *Point, pcb_coord_t X, pcb_coord_t Y, unsigned Number) +void pcb_point_rotate90(pcb_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number) { PCB_COORD_ROTATE90(Point->X, Point->Y, X, Y, Number); } -pcb_any_obj_t *pcb_obj_rotate90(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_coord_t X, pcb_coord_t Y, unsigned Steps) +pcb_any_obj_t *pcb_obj_rotate90(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, unsigned Steps) { int changed = 0; pcb_opctx_t ctx; @@ -121,7 +121,7 @@ return obj; } -pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_coord_t X, pcb_coord_t Y, pcb_angle_t angle) +pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle) { int changed = 0; pcb_opctx_t ctx; @@ -148,7 +148,7 @@ return obj; } -void pcb_screen_obj_rotate90(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, unsigned Steps) +void pcb_screen_obj_rotate90(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, unsigned Steps) { int type; void *ptr1, *ptr2, *ptr3; @@ -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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } pcb_event(&pcb->hidlib, PCB_EVENT_RUBBER_RESET, NULL); @@ -168,7 +168,7 @@ } } -void pcb_screen_obj_rotate(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, pcb_angle_t angle) +void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle) { int type; void *ptr1, *ptr2, *ptr3; @@ -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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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/rotate.h =================================================================== --- trunk/src/rotate.h (revision 30902) +++ trunk/src/rotate.h (revision 30903) @@ -36,13 +36,13 @@ /* rotates an object passed; pcb is the parent board or associated board (in case of buffer) */ -pcb_any_obj_t *pcb_obj_rotate90(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_coord_t X, pcb_coord_t Y, unsigned Steps); +pcb_any_obj_t *pcb_obj_rotate90(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, unsigned Steps); /* rotates obj by angle around X;Y. pcb is the current board if obj is on buffer */ -pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_coord_t X, pcb_coord_t Y, pcb_angle_t angle); +pcb_any_obj_t *pcb_obj_rotate(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle); -void pcb_screen_obj_rotate90(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, unsigned steps); -void pcb_screen_obj_rotate(pcb_board_t *pcb, pcb_coord_t X, pcb_coord_t Y, pcb_angle_t angle); -void pcb_point_rotate90(pcb_point_t *Point, pcb_coord_t X, pcb_coord_t Y, unsigned Number); +void pcb_screen_obj_rotate90(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, unsigned steps); +void pcb_screen_obj_rotate(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, pcb_angle_t angle); +void pcb_point_rotate90(pcb_point_t *Point, rnd_coord_t X, rnd_coord_t Y, unsigned Number); #endif Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 30902) +++ trunk/src/route.c (revision 30903) @@ -120,7 +120,7 @@ p_route->end_point = *point2; } -void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, pcb_coord_t radius, pcb_layer_id_t layer) +void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer) { pcb_route_object_t *p_object = pcb_route_alloc_object(p_route); if (p_object == NULL) @@ -138,7 +138,7 @@ } -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags) +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { pcb_route_reset(route); route->start_point = *point1; @@ -160,10 +160,10 @@ { const double r_min = 10.0; - const pcb_coord_t dx1 = point1->X - point2->X; - const pcb_coord_t dy1 = point1->Y - point2->Y; - const pcb_coord_t dx2 = point3->X - point2->X; - const pcb_coord_t dy2 = point3->Y - point2->Y; + const rnd_coord_t dx1 = point1->X - point2->X; + const rnd_coord_t dy1 = point1->Y - point2->Y; + const rnd_coord_t dx2 = point3->X - point2->X; + const rnd_coord_t dy2 = point3->Y - point2->Y; const double angle1 = atan2(dy1, dx1); const double angle2 = atan2(dy2, dx2); @@ -191,8 +191,8 @@ if (r >= r_min) { /* Calculate arc center coordinates. */ const double sh = sin(hangle); - const pcb_coord_t xc = point2->X + (pcb_coord_t) ((cos(angle3) * r) / sh); - const pcb_coord_t yc = point2->Y + (pcb_coord_t) ((sin(angle3) * r) / sh); + const rnd_coord_t xc = point2->X + (rnd_coord_t) ((cos(angle3) * r) / sh); + const rnd_coord_t yc = point2->Y + (rnd_coord_t) ((sin(angle3) * r) / sh); /* Calculate arc start and delta angles. */ const double delta = d < 0 ? -(M_PI + d) : M_PI - d; @@ -205,13 +205,13 @@ p_out_obj->radius = r; if (p_endpoint1) { - p_endpoint1->X = xc - (pcb_coord_t) (r * cos(start)); - p_endpoint1->Y = yc + (pcb_coord_t) (r * sin(start)); + p_endpoint1->X = xc - (rnd_coord_t) (r * cos(start)); + p_endpoint1->Y = yc + (rnd_coord_t) (r * sin(start)); } if (p_endpoint1) { - p_endpoint2->X = xc - (pcb_coord_t) (r * cos(start + delta)); - p_endpoint2->Y = yc + (pcb_coord_t) (r * sin(start + delta)); + p_endpoint2->X = xc - (rnd_coord_t) (r * cos(start + delta)); + p_endpoint2->Y = yc + (rnd_coord_t) (r * sin(start + delta)); } } else { @@ -226,7 +226,7 @@ void pcb_route_calculate_45(pcb_point_t *start_point, pcb_point_t *target_point) { - pcb_coord_t dx, dy, min; + rnd_coord_t dx, dy, min; unsigned direction = 0; double m; @@ -291,7 +291,7 @@ } } -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags) +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { /* Restart the route */ pcb_route_reset(route); @@ -315,7 +315,7 @@ pcb_layer_id_t layer_id = route->end_layer; /* Set radius to 0 for standard 45/90 operation */ - const pcb_coord_t radius = route->thickness * conf_core.editor.route_radius; + const rnd_coord_t radius = route->thickness * conf_core.editor.route_radius; /* If the start point is the same as the end point then add a single 0-length line. * If a 0-length line is not added then some operations such as moving a line point @@ -336,9 +336,9 @@ } else { /* Refraction is non-zero so add multiple lines (horizontal, vertical and/or 45 degrees). */ - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; pcb_point_t target; - pcb_bool way = (conf_core.editor.line_refraction == 1 ? pcb_false : pcb_true); + rnd_bool way = (conf_core.editor.line_refraction == 1 ? pcb_false : pcb_true); /* swap the 'way' if mod1 is set (typically the shift key) */ if (mod1) @@ -398,10 +398,10 @@ } TODO("Pass in other required information such as object flags") -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) { /* Set radius to 0 for standard 45/90 operation */ -/* const pcb_coord_t radius = thickness * conf_core.editor.route_radius; - TODO: remove this if not needed */ +/* const rnd_coord_t radius = thickness * conf_core.editor.route_radius; - TODO: remove this if not needed */ pcb_route_start(PCB, route, point1, layer_id, thickness, clearance, flags); @@ -698,7 +698,7 @@ /*----------------------------------------------------------- * Draws the outline of an arc *---------------------------------------------------------*/ -void pcb_route_draw_arc(pcb_hid_gc_t GC, pcb_coord_t x, pcb_coord_t y, pcb_angle_t start_angle, pcb_angle_t delta, pcb_coord_t radius, pcb_coord_t thickness) +void pcb_route_draw_arc(pcb_hid_gc_t GC, rnd_coord_t x, rnd_coord_t y, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, rnd_coord_t thickness) { double x1, y1, x2, y2, wid = thickness / 2; @@ -754,7 +754,7 @@ *---------------------------------------------------------*/ void pcb_route_draw_drc(pcb_route_t *p_route, pcb_hid_gc_t GC) { - pcb_coord_t thickness = p_route->thickness + 2 * conf_core.design.bloat; + rnd_coord_t thickness = p_route->thickness + 2 * conf_core.design.bloat; int i; pcb_render->set_color(GC, &conf_core.appearance.color.drc); Index: trunk/src/route.h =================================================================== --- trunk/src/route.h (revision 30902) +++ trunk/src/route.h (revision 30903) @@ -39,7 +39,7 @@ pcb_objtype_t type; pcb_point_t point1; /* Line: Start Point, Arc: Center Point */ pcb_point_t point2; /* Line: End Point */ - pcb_coord_t radius; /* Arc */ + rnd_coord_t radius; /* Arc */ pcb_angle_t start_angle; /* Arc */ pcb_angle_t delta_angle; /* Arc */ pcb_layer_id_t layer; @@ -48,8 +48,8 @@ typedef struct { pcb_point_t start_point; pcb_point_t end_point; - pcb_coord_t thickness; - pcb_coord_t clearance; + rnd_coord_t thickness; + rnd_coord_t clearance; pcb_layer_id_t start_layer; /* The ID of the layer that the route started on */ pcb_layer_id_t end_layer; /* The ID of the layer that the route ended on, usually the same as the start for simple routes */ pcb_board_t *PCB; @@ -66,14 +66,14 @@ void pcb_route_reset(pcb_route_t *p_route); void pcb_route_reserve(pcb_route_t *p_route, int size); void pcb_route_resize(pcb_route_t *p_route, int size); -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags); +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); void pcb_route_add_line(pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer); -void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, pcb_coord_t radius, pcb_layer_id_t layer); +void pcb_route_add_arc(pcb_route_t *p_route, pcb_point_t *center, pcb_angle_t start_angle, pcb_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer); -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); void pcb_route_calculate_to(pcb_route_t *route, pcb_point_t *point, int mod1, int mod2); -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags); +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, pcb_point_t *point1, pcb_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); int pcb_route_apply(const pcb_route_t *p_route); int pcb_route_apply_to_line(const pcb_route_t *p_route, pcb_layer_t *Layer, pcb_line_t *apply_to_line); Index: trunk/src/route_style.c =================================================================== --- trunk/src/route_style.c (revision 30902) +++ trunk/src/route_style.c (revision 30903) @@ -41,10 +41,10 @@ pcb_route_style_t pcb_custom_route_style; -static pcb_coord_t pcb_get_num(char **s, const char *default_unit) +static rnd_coord_t pcb_get_num(char **s, const char *default_unit) { /* Read value */ - pcb_coord_t ret_val = pcb_get_value_ex(*s, NULL, NULL, NULL, default_unit, NULL); + rnd_coord_t ret_val = pcb_get_value_ex(*s, NULL, NULL, NULL, default_unit, NULL); /* Advance pointer */ while (isalnum(**s) || **s == '.') (*s)++; @@ -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'; - pcb_message(PCB_MSG_WARNING, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); + rnd_message(PCB_MSG_WARNING, "Route style name '%s' too long, truncated to '%s'\n", Name, routeStyle->name); } else strcpy(routeStyle->name, Name); @@ -181,7 +181,7 @@ #define cmp(a,b) (((a) != -1) && (coord_abs((a)-(b)) > 32)) #define cmps(a,b) (((a) != NULL) && (strcmp((a), (b)) != 0)) -int pcb_route_style_match(pcb_route_style_t *rst, pcb_coord_t Thick, pcb_coord_t Diameter, pcb_coord_t Hole, pcb_coord_t Clearance, char *Name) +int pcb_route_style_match(pcb_route_style_t *rst, rnd_coord_t Thick, rnd_coord_t Diameter, rnd_coord_t Hole, rnd_coord_t Clearance, char *Name) { if (cmp(Thick, rst->Thick)) return 0; if (cmp(Diameter, rst->Diameter)) return 0; @@ -193,7 +193,7 @@ #undef cmp #undef cmps -int pcb_route_style_lookup(vtroutestyle_t *styles, pcb_coord_t Thick, pcb_coord_t Diameter, pcb_coord_t Hole, pcb_coord_t Clearance, char *Name) +int pcb_route_style_lookup(vtroutestyle_t *styles, rnd_coord_t Thick, rnd_coord_t Diameter, rnd_coord_t Hole, rnd_coord_t Clearance, char *Name) { int n; for (n = 0; n < vtroutestyle_len(styles); n++) @@ -203,7 +203,7 @@ } -int pcb_get_style_size(int funcid, pcb_coord_t * out, int type, int size_id) +int pcb_get_style_size(int funcid, rnd_coord_t * out, int type, int size_id) { switch (funcid) { case F_Object: @@ -213,7 +213,7 @@ case PCB_OBJ_ARC: return pcb_get_style_size(F_SelectedArcs, out, 0, size_id); } - pcb_message(PCB_MSG_ERROR, "Sorry, can't fetch the style of that object type (%x)\n", type); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Sorry, can't change style of every selected object\n"); + rnd_message(PCB_MSG_ERROR, "Sorry, can't change style of every selected object\n"); return -1; } return 0; Index: trunk/src/route_style.h =================================================================== --- trunk/src/route_style.h (revision 30902) +++ trunk/src/route_style.h (revision 30903) @@ -49,14 +49,14 @@ /* Compare supplied parameters to each style in the vector and return the index of the first matching style. All non-(-1) parameters need to match to accept a style. Return -1 on no match. */ -int pcb_route_style_lookup(vtroutestyle_t *styles, pcb_coord_t Thick, pcb_coord_t Diameter, pcb_coord_t Hole, pcb_coord_t Clearance, char *Name); +int pcb_route_style_lookup(vtroutestyle_t *styles, rnd_coord_t Thick, rnd_coord_t Diameter, rnd_coord_t Hole, rnd_coord_t Clearance, char *Name); /* Return 1 if rst matches the style in supplied args. Same matching rules as in pcb_route_style_lookup(). */ -int pcb_route_style_match(pcb_route_style_t *rst, pcb_coord_t Thick, pcb_coord_t Diameter, pcb_coord_t Hole, pcb_coord_t Clearance, char *Name); +int pcb_route_style_match(pcb_route_style_t *rst, rnd_coord_t Thick, rnd_coord_t Diameter, rnd_coord_t Hole, rnd_coord_t Clearance, char *Name); extern pcb_route_style_t pcb_custom_route_style; /* helper: get route style size for a function and selected object type. size_id: 0=main size; 1=2nd size (drill); 2=clearance */ -int pcb_get_style_size(int funcid, pcb_coord_t * out, int type, int size_id); +int pcb_get_style_size(int funcid, rnd_coord_t * out, int type, int size_id); Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30902) +++ trunk/src/search.c (revision 30903) @@ -47,7 +47,7 @@ #include "obj_pstk_inlines.h" static double PosX, PosY; /* search position for subroutines */ -static pcb_coord_t SearchRadius; +static rnd_coord_t SearchRadius; static pcb_box_t SearchBox; static pcb_layer_t *SearchLayer; @@ -56,16 +56,16 @@ * want to include locked object in the search and PCB_OBJ_SUBC_PART if * objects that are part of a subcircuit should be found. */ -static pcb_bool SearchLineByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, pcb_line_t **); -static pcb_bool SearchArcByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_arc_t **, pcb_arc_t **); -static pcb_bool SearchGfxByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_gfx_t **, pcb_gfx_t **); -static pcb_bool SearchRatLineByLocation(unsigned long, unsigned long, pcb_rat_t **, pcb_rat_t **, pcb_rat_t **); -static pcb_bool SearchTextByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_text_t **, pcb_text_t **); -static pcb_bool SearchPolygonByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_poly_t **); -static pcb_bool SearchLinePointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, pcb_point_t **); -static pcb_bool SearchArcPointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_arc_t **, int **); -static pcb_bool SearchPointByLocation(unsigned long, unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_point_t **); -static pcb_bool SearchSubcByLocation(unsigned long, unsigned long, pcb_subc_t **, pcb_subc_t **, pcb_subc_t **, pcb_bool); +static rnd_bool SearchLineByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, pcb_line_t **); +static rnd_bool SearchArcByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_arc_t **, pcb_arc_t **); +static rnd_bool SearchGfxByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_gfx_t **, pcb_gfx_t **); +static rnd_bool SearchRatLineByLocation(unsigned long, unsigned long, pcb_rat_t **, pcb_rat_t **, pcb_rat_t **); +static rnd_bool SearchTextByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_text_t **, pcb_text_t **); +static rnd_bool SearchPolygonByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_poly_t **); +static rnd_bool SearchLinePointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_line_t **, pcb_point_t **); +static rnd_bool SearchArcPointByLocation(unsigned long, unsigned long, pcb_layer_t **, pcb_arc_t **, int **); +static rnd_bool SearchPointByLocation(unsigned long, unsigned long, unsigned long, pcb_layer_t **, pcb_poly_t **, pcb_point_t **); +static rnd_bool SearchSubcByLocation(unsigned long, unsigned long, pcb_subc_t **, pcb_subc_t **, pcb_subc_t **, rnd_bool); /* Return not-found for subc parts and locked items unless objst says otherwise obj is the object to be checked if part of subc; check lock on locked_obj @@ -85,7 +85,7 @@ struct ans_info { void **ptr1, **ptr2, **ptr3; - pcb_bool BackToo; + rnd_bool BackToo; double area; unsigned long objst, req_flag; int on_current; @@ -119,7 +119,7 @@ return PCB_R_DIR_CANCEL; /* found, stop searching */ } -static pcb_bool SearchPadstackByLocation(unsigned long objst, unsigned long req_flag, pcb_pstk_t **ps, pcb_pstk_t **Dummy1, pcb_pstk_t **Dummy2, int on_current, pcb_layer_type_t on_lyt) +static rnd_bool SearchPadstackByLocation(unsigned long objst, unsigned long req_flag, pcb_pstk_t **ps, pcb_pstk_t **Dummy1, pcb_pstk_t **Dummy2, int on_current, pcb_layer_type_t on_lyt) { struct ans_info info; @@ -168,7 +168,7 @@ } -static pcb_bool SearchLineByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_line_t ** Dummy) +static rnd_bool SearchLineByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_line_t ** Dummy) { struct line_info info; @@ -203,7 +203,7 @@ /* --------------------------------------------------------------------------- * searches rat lines if they are visible */ -static pcb_bool SearchRatLineByLocation(unsigned long objst, unsigned long req_flag, pcb_rat_t ** Line, pcb_rat_t ** Dummy1, pcb_rat_t ** Dummy2) +static rnd_bool SearchRatLineByLocation(unsigned long objst, unsigned long req_flag, pcb_rat_t ** Line, pcb_rat_t ** Dummy1, pcb_rat_t ** Dummy2) { struct ans_info info; @@ -243,7 +243,7 @@ } -static pcb_bool SearchArcByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_arc_t ** Arc, pcb_arc_t ** Dummy) +static rnd_bool SearchArcByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_arc_t ** Arc, pcb_arc_t ** Dummy) { struct arc_info info; @@ -281,7 +281,7 @@ return PCB_R_DIR_CANCEL; /* found */ } -static pcb_bool SearchGfxByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t **Layer, pcb_gfx_t **gfx, pcb_gfx_t **Dummy) +static rnd_bool SearchGfxByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t **Layer, pcb_gfx_t **gfx, pcb_gfx_t **Dummy) { struct gfx_info info; @@ -313,7 +313,7 @@ /* --------------------------------------------------------------------------- * searches text on the SearchLayer */ -static pcb_bool SearchTextByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_text_t ** Text, pcb_text_t ** Dummy) +static rnd_bool SearchTextByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_text_t ** Text, pcb_text_t ** Dummy) { struct ans_info info; @@ -349,7 +349,7 @@ /* --------------------------------------------------------------------------- * searches a polygon on the SearchLayer */ -static pcb_bool SearchPolygonByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, pcb_poly_t ** Dummy) +static rnd_bool SearchPolygonByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, pcb_poly_t ** Dummy) { struct ans_info info; @@ -427,7 +427,7 @@ /* --------------------------------------------------------------------------- * searches a line-point on all the search layer */ -static pcb_bool SearchLinePointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_point_t ** Point) +static rnd_bool SearchLinePointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_line_t ** Line, pcb_point_t ** Point) { struct line_info info; *Layer = SearchLayer; @@ -446,7 +446,7 @@ /* --------------------------------------------------------------------------- * searches a line-point on all the search layer */ -static pcb_bool SearchArcPointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_arc_t ** Arc, int **Point) +static rnd_bool SearchArcPointByLocation(unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_arc_t ** Arc, int **Point) { struct arc_info info; *Layer = SearchLayer; @@ -468,7 +468,7 @@ */ typedef struct { double least; - pcb_bool found; + rnd_bool found; unsigned long Type; /* result */ @@ -509,7 +509,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_bool SearchPointByLocation(unsigned long Type, unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, pcb_point_t ** Point) +static rnd_bool SearchPointByLocation(unsigned long Type, unsigned long objst, unsigned long req_flag, pcb_layer_t ** Layer, pcb_poly_t ** Polygon, pcb_point_t ** Point) { ptcb_t ctx; @@ -541,7 +541,7 @@ TEST_OBJST(i->objst, i->req_flag, g, subc, subc); if ((front || i->BackToo) && PCB_POINT_IN_BOX(PosX, PosY, &subc->BoundingBox)) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if ((subc->extobj != NULL) && (pcb_subc_get_origin(subc, &ox, &oy) == 0)) { /* extended objects are special case: only the origin should be clickable to avoid problems with large extended objects that cover the board */ @@ -564,8 +564,8 @@ * searches a subcircuit * if more than one subc matches, the smallest one is taken */ -static pcb_bool -SearchSubcByLocation(unsigned long objst, unsigned long req_flag, pcb_subc_t **subc, pcb_subc_t ** Dummy1, pcb_subc_t ** Dummy2, pcb_bool BackToo) +static rnd_bool +SearchSubcByLocation(unsigned long objst, unsigned long req_flag, pcb_subc_t **subc, pcb_subc_t ** Dummy1, pcb_subc_t ** Dummy2, rnd_bool BackToo) { struct ans_info info; @@ -584,7 +584,7 @@ } /* find the first floater on any layer */ -static pcb_bool SearchSubcFloaterByLocation(unsigned long objst, unsigned long req_flag, pcb_subc_t **out_subc, pcb_text_t **out_txt, void **dummy, pcb_bool other_side) +static rnd_bool SearchSubcFloaterByLocation(unsigned long objst, unsigned long req_flag, pcb_subc_t **out_subc, pcb_text_t **out_txt, void **dummy, rnd_bool other_side) { pcb_rtree_it_t it; void *obj; @@ -631,7 +631,7 @@ } /* for checking if a rat-line end is on a PV */ -pcb_bool pcb_is_point_on_line_end(pcb_coord_t X, pcb_coord_t Y, pcb_rat_t *Line) +rnd_bool pcb_is_point_on_line_end(rnd_coord_t X, rnd_coord_t Y, pcb_rat_t *Line) { if (((X == Line->Point1.X) && (Y == Line->Point1.Y)) || ((X == Line->Point2.X) && (Y == Line->Point2.Y))) return pcb_true; @@ -661,7 +661,7 @@ * distance^2 = (X-QX)^2 + (Y-QY)^2 */ -double pcb_point_line_dist2(pcb_coord_t X, pcb_coord_t Y, pcb_line_t *Line) +double pcb_point_line_dist2(rnd_coord_t X, rnd_coord_t Y, pcb_line_t *Line) { const double abx = Line->Point2.X - Line->Point1.X; const double aby = Line->Point2.Y - Line->Point1.Y; @@ -690,7 +690,7 @@ return (dx * dx) + (dy * dy); } -pcb_bool pcb_is_point_on_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_line_t *Line) +rnd_bool pcb_is_point_on_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_line_t *Line) { double max = Radius + Line->Thickness / 2; @@ -697,7 +697,7 @@ return pcb_point_line_dist2(X, Y, Line) < (max * max); } -static int is_point_on_line(pcb_coord_t px, pcb_coord_t py, pcb_coord_t lx1, pcb_coord_t ly1, pcb_coord_t lx2, pcb_coord_t ly2) +static int is_point_on_line(rnd_coord_t px, rnd_coord_t py, rnd_coord_t lx1, rnd_coord_t ly1, rnd_coord_t lx2, rnd_coord_t ly2) { /* ohh well... let's hope the optimizer does something clever with inlining... */ pcb_line_t l; @@ -709,15 +709,15 @@ return pcb_is_point_on_line(px, py, 1, &l); } -pcb_bool pcb_is_point_on_thinline( pcb_coord_t X, pcb_coord_t Y, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2,pcb_coord_t Y2 ) +rnd_bool pcb_is_point_on_thinline( rnd_coord_t X, rnd_coord_t Y, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2,rnd_coord_t Y2 ) { /* Calculate the cross product of the vector from the first line point to the test point * and the vector from the first line point to the second line point. If the result is * not 0 then the point does not lie on the line. */ - const pcb_coord_t lx = X2 - X1; - const pcb_coord_t ly = Y2 - Y1; - const pcb_coord_t cross = ((X-X1) * ly) - ((Y-Y1) * lx); + const rnd_coord_t lx = X2 - X1; + const rnd_coord_t ly = Y2 - Y1; + const rnd_coord_t cross = ((X-X1) * ly) - ((Y-Y1) * lx); if(cross != 0) return pcb_false; @@ -732,7 +732,7 @@ } /* checks if a line crosses a rectangle or is within the rectangle */ -pcb_bool pcb_is_line_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_line_t *Line) +rnd_bool pcb_is_line_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_line_t *Line) { pcb_line_t line; @@ -778,7 +778,7 @@ /*checks if a point (of null radius) is in a slanted rectangle */ static int IsPointInQuadrangle(pcb_point_t p[4], pcb_point_t *l) { - pcb_coord_t dx, dy, x, y; + rnd_coord_t dx, dy, x, y; double prod0, prod1; dx = p[1].X - p[0].X; @@ -807,7 +807,7 @@ * copied from pcb_is_line_in_rectangle() * Note: actually this quadrangle is a slanted rectangle */ -pcb_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line) +rnd_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line) { pcb_line_t line; @@ -853,10 +853,10 @@ /* --------------------------------------------------------------------------- * checks if an arc crosses a rectangle (or arc is within the rectangle) */ -pcb_bool pcb_is_arc_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_arc_t *Arc) +rnd_bool pcb_is_arc_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_arc_t *Arc) { pcb_line_t line; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_box_t box; /* check if any of arc endpoints is inside the rectangle */ @@ -907,7 +907,7 @@ /* --------------------------------------------------------------------------- * checks if an gfx crosses a rectangle (or gfx is within the rectangle) */ -pcb_bool pcb_is_gfx_in_rectangle(const pcb_box_t *b, const pcb_gfx_t *gfx) +rnd_bool pcb_is_gfx_in_rectangle(const pcb_box_t *b, const pcb_gfx_t *gfx) { pcb_line_t l; int n, m; @@ -930,14 +930,14 @@ * Check if a circle of Radius with center at (X, Y) intersects a line. * Written to enable arbitrary line directions; for rounded/square lines, too. */ -pcb_bool pcb_is_point_in_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_any_line_t *Pad) +rnd_bool pcb_is_point_in_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_any_line_t *Pad) { double r, Sin, Cos; - pcb_coord_t x; + rnd_coord_t x; /* Also used from line_callback with line type smaller than pad type; use the smallest common subset; ->Thickness is still ok. */ - pcb_coord_t t2 = (Pad->Thickness + 1) / 2, range; + rnd_coord_t t2 = (Pad->Thickness + 1) / 2, range; pcb_any_line_t pad = *Pad; @@ -1001,9 +1001,9 @@ return range < Radius; } -pcb_bool pcb_is_point_in_box(pcb_coord_t X, pcb_coord_t Y, pcb_box_t *box, pcb_coord_t Radius) +rnd_bool pcb_is_point_in_box(rnd_coord_t X, rnd_coord_t Y, pcb_box_t *box, rnd_coord_t Radius) { - pcb_coord_t width, height, range; + rnd_coord_t width, height, range; /* NB: Assumes box has point1 with numerically lower X and Y coordinates */ @@ -1042,13 +1042,13 @@ return range < Radius; } -pcb_bool pcb_arc_in_box(pcb_arc_t *arc, pcb_box_t *b) +rnd_bool pcb_arc_in_box(pcb_arc_t *arc, pcb_box_t *b) { pcb_box_t ab = pcb_arc_mini_bbox(arc); return PCB_BOX_IN_BOX(&ab, b); } -pcb_bool pcb_gfx_in_box(pcb_gfx_t *gfx, pcb_box_t *b) +rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, pcb_box_t *b) { int n; @@ -1063,7 +1063,7 @@ * and in the case that the arc thickness is greater than * the radius. */ -pcb_bool pcb_is_point_on_arc(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_arc_t *Arc) +rnd_bool pcb_is_point_on_arc(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_arc_t *Arc) { /* Calculate angle of point from arc center */ double p_dist = pcb_distance(X, Y, Arc->X, Arc->Y); @@ -1098,7 +1098,7 @@ might be larger than 360 and that section of the arc shouldn't be missed either. */ if (!angle_in_range(ang1, ang2, p_ang) && !angle_in_range(ang1, ang2, p_ang+360)) { - pcb_coord_t ArcX, ArcY; + rnd_coord_t ArcX, ArcY; ArcX = Arc->X + Arc->Width * cos((Arc->StartAngle + 180) / PCB_RAD_TO_DEG); ArcY = Arc->Y - Arc->Height * sin((Arc->StartAngle + 180) / PCB_RAD_TO_DEG); if (pcb_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) @@ -1118,7 +1118,7 @@ else { /* elliptical case: guess where the arc would be in that point, by angle */ double ang, dx, dy; - pcb_coord_t ax, ay, d; + rnd_coord_t ax, ay, d; TODO(": elliptical arc: rewrite this, as it does not work properly on extreme cases") dy = (double)(Y - Arc->Y) / (double)Arc->Height; @@ -1135,7 +1135,7 @@ #undef angle_in_range } -pcb_bool pcb_is_point_in_gfx(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_gfx_t *gfx) +rnd_bool pcb_is_point_in_gfx(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_gfx_t *gfx) { pcb_vector_t pt, a, b, c; int n, m; @@ -1169,7 +1169,7 @@ } -pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, pcb_coord_t x, pcb_coord_t y, pcb_angle_t *ang, pcb_bool no_subc_part, pcb_bool no_term) +pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, pcb_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term) { pcb_rtree_it_t it; pcb_rtree_box_t pt; @@ -1299,7 +1299,7 @@ * Note that if Type includes PCB_OBJ_SUBC_PART, then the search includes * objects that are part of subcircuits, else they are ignored. */ -static int pcb_search_obj_by_location_(unsigned long Type, void **Result1, void **Result2, void **Result3, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, unsigned long req_flag) +static int pcb_search_obj_by_location_(unsigned long Type, void **Result1, void **Result2, void **Result3, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, unsigned long req_flag) { void *r1, *r2, *r3; void **pr1 = &r1, **pr2 = &r2, **pr3 = &r3; @@ -1431,7 +1431,7 @@ return PCB_OBJ_VOID; } -int pcb_search_obj_by_location(unsigned long Type, void **Result1, void **Result2, void **Result3, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius) +int pcb_search_obj_by_location(unsigned long Type, void **Result1, void **Result2, void **Result3, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius) { int res; @@ -1613,7 +1613,7 @@ { int res = pcb_search_obj_by_id_(Base, Result1, Result2, Result3, ID, type); if (res == PCB_OBJ_VOID) - pcb_message(PCB_MSG_ERROR, "pcb_search_obj_by_id(): internal error, search for ID %d failed\n", ID); + rnd_message(PCB_MSG_ERROR, "pcb_search_obj_by_id(): internal error, search for ID %d failed\n", ID); return res; } @@ -1635,7 +1635,7 @@ break; } - pcb_message(PCB_MSG_ERROR, "pcb_search_obj_by_id_buf2(): internal error, search for ID %d failed\n", ID); + rnd_message(PCB_MSG_ERROR, "pcb_search_obj_by_id_buf2(): internal error, search for ID %d failed\n", ID); return PCB_OBJ_VOID; } @@ -1642,7 +1642,7 @@ /* --------------------------------------------------------------------------- * searches the cursor position for the type */ -int pcb_search_screen(pcb_coord_t X, pcb_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) +int pcb_search_screen(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) { return pcb_search_obj_by_location(Type, Result1, Result2, Result3, X, Y, PCB_SLOP * pcb_pixel_slop); } @@ -1650,7 +1650,7 @@ /* --------------------------------------------------------------------------- * searches the cursor position for the type */ -int pcb_search_grid_slop(pcb_coord_t X, pcb_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) +int pcb_search_grid_slop(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3) { int ans; @@ -1658,9 +1658,9 @@ return ans; } -int pcb_lines_intersect(pcb_coord_t ax1, pcb_coord_t ay1, pcb_coord_t ax2, pcb_coord_t ay2, pcb_coord_t bx1, pcb_coord_t by1, pcb_coord_t bx2, pcb_coord_t by2) +int pcb_lines_intersect(rnd_coord_t ax1, rnd_coord_t ay1, rnd_coord_t ax2, rnd_coord_t ay2, rnd_coord_t bx1, rnd_coord_t by1, rnd_coord_t bx2, rnd_coord_t by2) { -/* TODO: this should be long double if pcb_coord_t is 64 bits */ +/* TODO: this should be long double if rnd_coord_t is 64 bits */ double ua, xi, yi, X1, Y1, X2, Y2, X3, Y3, X4, Y4, tmp; int is_a_pt, is_b_pt; Index: trunk/src/search.h =================================================================== --- trunk/src/search.h (revision 30902) +++ trunk/src/search.h (revision 30903) @@ -34,9 +34,9 @@ #include #include "layer.h" -int pcb_lines_intersect(pcb_coord_t ax1, pcb_coord_t ay1, pcb_coord_t ax2, pcb_coord_t ay2, pcb_coord_t bx1, pcb_coord_t by1, pcb_coord_t bx2, pcb_coord_t by2); -pcb_bool pcb_arc_in_box(pcb_arc_t *arc, pcb_box_t *b); -pcb_bool pcb_gfx_in_box(pcb_gfx_t *gfx, pcb_box_t *b); +int pcb_lines_intersect(rnd_coord_t ax1, rnd_coord_t ay1, rnd_coord_t ax2, rnd_coord_t ay2, rnd_coord_t bx1, rnd_coord_t by1, rnd_coord_t bx2, rnd_coord_t by2); +rnd_bool pcb_arc_in_box(pcb_arc_t *arc, pcb_box_t *b); +rnd_bool pcb_gfx_in_box(pcb_gfx_t *gfx, pcb_box_t *b); #define PCB_SLOP 5 @@ -171,20 +171,20 @@ #define PCB_GFX_NEAR_BOX(a,b) \ (PCB_IS_BOX_NEGATIVE(b) ? PCB_GFX_TOUCHES_BOX(a,b) : PCB_GFX_IN_BOX(a,b)) -pcb_bool pcb_is_point_on_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_line_t *Line); -pcb_bool pcb_is_point_on_thinline( pcb_coord_t X, pcb_coord_t Y, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2,pcb_coord_t Y2 ); -pcb_bool pcb_is_point_on_line_end(pcb_coord_t X, pcb_coord_t Y, pcb_rat_t *Line); -pcb_bool pcb_is_point_on_arc(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_arc_t *Arc); -pcb_bool pcb_is_point_in_gfx(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_gfx_t *gfx); -pcb_bool pcb_is_line_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_line_t *Line); -pcb_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line); -pcb_bool pcb_is_arc_in_rectangle(pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_arc_t *Arc); -pcb_bool pcb_is_gfx_in_rectangle(const pcb_box_t *b, const pcb_gfx_t *gfx); -pcb_bool pcb_is_point_in_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_any_line_t *Pad); -pcb_bool pcb_is_point_in_box(pcb_coord_t X, pcb_coord_t Y, pcb_box_t *box, pcb_coord_t Radius); +rnd_bool pcb_is_point_on_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_line_t *Line); +rnd_bool pcb_is_point_on_thinline( rnd_coord_t X, rnd_coord_t Y, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2,rnd_coord_t Y2 ); +rnd_bool pcb_is_point_on_line_end(rnd_coord_t X, rnd_coord_t Y, pcb_rat_t *Line); +rnd_bool pcb_is_point_on_arc(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_arc_t *Arc); +rnd_bool pcb_is_point_in_gfx(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_gfx_t *gfx); +rnd_bool pcb_is_line_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_line_t *Line); +rnd_bool pcb_is_line_in_quadrangle(pcb_point_t p[4], pcb_line_t *Line); +rnd_bool pcb_is_arc_in_rectangle(rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_arc_t *Arc); +rnd_bool pcb_is_gfx_in_rectangle(const pcb_box_t *b, const pcb_gfx_t *gfx); +rnd_bool pcb_is_point_in_line(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_any_line_t *Pad); +rnd_bool pcb_is_point_in_box(rnd_coord_t X, rnd_coord_t Y, pcb_box_t *box, rnd_coord_t Radius); /* Return the distance^2 between a line-center and a point */ -double pcb_point_line_dist2(pcb_coord_t X, pcb_coord_t Y, pcb_line_t *Line); +double pcb_point_line_dist2(rnd_coord_t X, rnd_coord_t Y, pcb_line_t *Line); /* Return the first line object that has its centerline crossing the point; if ang is not NULL, only return lines that are pointing in the right @@ -191,11 +191,11 @@ angle (also accept 180 degree rotation) if no_subc_part is true, ignore lines that are part of subcircuits; if no_term is true, ignore lines that are terminals */ -pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, pcb_coord_t x, pcb_coord_t y, pcb_angle_t *ang, pcb_bool no_subc_part, pcb_bool no_term); +pcb_line_t *pcb_line_center_cross_point(pcb_layer_t *layer, rnd_coord_t x, rnd_coord_t y, pcb_angle_t *ang, rnd_bool no_subc_part, rnd_bool no_term); -int pcb_search_screen(pcb_coord_t X, pcb_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); -int pcb_search_grid_slop(pcb_coord_t X, pcb_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); -int pcb_search_obj_by_location(unsigned long Type, void **Result1, void **Result2, void **Result3, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius); +int pcb_search_screen(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); +int pcb_search_grid_slop(rnd_coord_t X, rnd_coord_t Y, int Type, void **Result1, void **Result2, void **Result3); +int pcb_search_obj_by_location(unsigned long Type, void **Result1, void **Result2, void **Result3, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius); int pcb_search_obj_by_id(pcb_data_t *Base, void **Result1, void **Result2, void **Result3, int ID, int type); int pcb_search_obj_by_id_(pcb_data_t *Base, void **Result1, void **Result2, void **Result3, int ID, int type); /* no-hace version */ Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 30902) +++ trunk/src/select.c (revision 30903) @@ -63,13 +63,13 @@ * toggles the selection of any kind of object * the different types are defined by search.h */ -pcb_bool pcb_select_object(pcb_board_t *pcb) +rnd_bool pcb_select_object(pcb_board_t *pcb) { void *ptr1, *ptr2, *ptr3; pcb_layer_t *layer; int type; - pcb_bool changed = pcb_true; + rnd_bool changed = pcb_true; type = pcb_search_screen(pcb_crosshair.X, pcb_crosshair.Y, PCB_SELECT_TYPES | PCB_LOOSE_SUBC(PCB) | PCB_OBJ_FLOATER, &ptr1, &ptr2, &ptr3); if (type == PCB_OBJ_VOID || PCB_FLAG_TEST(PCB_FLAG_LOCK, (pcb_any_obj_t *) ptr2)) @@ -168,7 +168,7 @@ { #define swap(a,b) \ do { \ - pcb_coord_t tmp; \ + rnd_coord_t tmp; \ tmp = a; \ a = b; \ b = tmp; \ @@ -216,7 +216,7 @@ * length of the list. Returns NULL on no match. */ TODO("cleanup: should be rewritten with generic ops and rtree") -static long int *ListBlock_(pcb_board_t *pcb, pcb_box_t *Box, pcb_bool Flag, int *len) +static long int *ListBlock_(pcb_board_t *pcb, pcb_box_t *Box, rnd_bool Flag, int *len) { int changed = 0; int used = 0, alloced = 0; @@ -411,8 +411,8 @@ typedef struct { pcb_board_t *pcb; pcb_box_t box; - pcb_bool flag; - pcb_bool invert; + rnd_bool flag; + rnd_bool invert; } select_ctx_t; static pcb_r_dir_t pcb_select_block_cb(const pcb_box_t *box, void *cl) @@ -445,7 +445,7 @@ * Flag determines if the block is to be selected or unselected * returns pcb_true if the state of any object has changed */ -pcb_bool pcb_select_block(pcb_board_t *pcb, pcb_box_t *Box, pcb_bool flag, pcb_bool vis_only, pcb_bool invert) +rnd_bool pcb_select_block(pcb_board_t *pcb, pcb_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) { select_ctx_t ctx; @@ -476,9 +476,9 @@ * * text objects and subcircuits cannot be selected by this routine */ -static pcb_bool pcb_select_connection_(pcb_data_t *data, pcb_bool Flag) +static rnd_bool pcb_select_connection_(pcb_data_t *data, rnd_bool Flag) { - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; pcb_any_obj_t *o; pcb_data_it_t it; @@ -496,7 +496,7 @@ return changed; } -pcb_bool pcb_select_connection(pcb_board_t *pcb, pcb_bool Flag) +rnd_bool pcb_select_connection(pcb_board_t *pcb, rnd_bool Flag) { return pcb_select_connection_(pcb->Data, Flag); } Index: trunk/src/select.h =================================================================== --- trunk/src/select.h (revision 30902) +++ trunk/src/select.h (revision 30903) @@ -36,10 +36,10 @@ (PCB_OBJ_LINE | PCB_OBJ_TEXT | PCB_OBJ_POLY | PCB_OBJ_SUBC | \ PCB_OBJ_PSTK | PCB_OBJ_RAT | PCB_OBJ_ARC | PCB_OBJ_GFX) -pcb_bool pcb_select_object(pcb_board_t *pcb); -pcb_bool pcb_select_block(pcb_board_t *pcb, pcb_box_t *Box, pcb_bool flag, pcb_bool vis_only, pcb_bool invert); +rnd_bool pcb_select_object(pcb_board_t *pcb); +rnd_bool pcb_select_block(pcb_board_t *pcb, pcb_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert); long int *pcb_list_block(pcb_board_t *pcb, pcb_box_t *Box, int *len); -pcb_bool pcb_select_connection(pcb_board_t *pcb, pcb_bool); +rnd_bool pcb_select_connection(pcb_board_t *pcb, rnd_bool); #endif Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 30902) +++ trunk/src/select_act.c (revision 30903) @@ -156,7 +156,7 @@ case F_Convert: case F_ConvertSubc: { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_crosshair_note.Buffer = conf_core.editor.buffer_number; pcb_buffer_set_number(PCB_MAX_BUFFER - 1); pcb_buffer_clear(PCB, PCB_PASTEBUFFER); Index: trunk/src/stub_draw.c =================================================================== --- trunk/src/stub_draw.c (revision 30902) +++ trunk/src/stub_draw.c (revision 30903) @@ -45,7 +45,7 @@ pcb_text_draw_(info, &t, 0, 0, PCB_TXT_TINY_ACCURATE); } -static pcb_bool dummy_mouse(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool dummy_mouse(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return 0; } @@ -77,7 +77,7 @@ void (*pcb_stub_draw_csect)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) = dummy_draw_csect; -pcb_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) = dummy_mouse; +rnd_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) = dummy_mouse; /****** font selector GUI ******/ @@ -86,11 +86,11 @@ dummy_draw_text(NULL, gc, "Can't render the font selector: the draw_fontsel plugin is not compiled and/or not loaded"); } -static pcb_bool dummy_mouse_fontsel(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y, pcb_text_t *txt) +static rnd_bool dummy_mouse_fontsel(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt) { return 0; } void (*pcb_stub_draw_fontsel)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt) = dummy_draw_fontsel; -pcb_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y, pcb_text_t *txt) = dummy_mouse_fontsel; +rnd_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt) = dummy_mouse_fontsel; Index: trunk/src/stub_draw.h =================================================================== --- trunk/src/stub_draw.h (revision 30902) +++ trunk/src/stub_draw.h (revision 30903) @@ -42,10 +42,10 @@ /* csect */ extern void (*pcb_stub_draw_csect)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); -extern pcb_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y); +extern rnd_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); /* fontsel */ extern void (*pcb_stub_draw_fontsel)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt); -extern pcb_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y, pcb_text_t *txt); +extern rnd_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt); #endif Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 30902) +++ trunk/src/thermal.c (revision 30903) @@ -104,7 +104,7 @@ /* generate a round-cap line polygon */ -static pcb_polyarea_t *pa_line_at(double x1, double y1, double x2, double y2, pcb_coord_t clr, pcb_bool square) +static pcb_polyarea_t *pa_line_at(double x1, double y1, double x2, double y2, rnd_coord_t clr, rnd_bool square) { pcb_line_t ltmp; @@ -118,7 +118,7 @@ } /* generate a round-cap arc polygon knowing the center and endpoints */ -static pcb_polyarea_t *pa_arc_at(double cx, double cy, double r, double e1x, double e1y, double e2x, double e2y, pcb_coord_t clr, double max_span_angle) +static pcb_polyarea_t *pa_arc_at(double cx, double cy, double r, double e1x, double e1y, double e2x, double e2y, rnd_coord_t clr, double max_span_angle) { double sa, ea, da; pcb_arc_t atmp; @@ -154,7 +154,7 @@ { pcb_polyarea_t *pa, *pb, *pc; double dx, dy, len, vx, vy, nx, ny, clr, clrth, x1, y1, x2, y2, mx, my; - pcb_coord_t th; + rnd_coord_t th; if ((line->Point1.X == line->Point2.X) && (line->Point1.Y == line->Point2.Y)) { /* conrer case zero-long line is a circle: do the same as for vias */ @@ -412,10 +412,10 @@ #define CONG_MAX 256 -static int cong_map(char *cong, pcb_poly_it_t *it, pcb_coord_t clr) +static int cong_map(char *cong, pcb_poly_it_t *it, rnd_coord_t clr) { int n, go, first = 1; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; double cl2 = (double)clr * (double)clr * 1.5; double px, py, x, y; @@ -440,11 +440,11 @@ /* combine a round clearance line set into pres; "it" is an iterator already initialized to a polyarea contour */ -static void polytherm_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, pcb_coord_t clr, pcb_bool is_diag) +static void polytherm_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) { pcb_polyarea_t *ptmp, *p; double fact = 0.5, fact_ortho=0.75; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; double px, py, x, y, dx, dy, vx, vy, nx, ny, mx, my, len; int n, go, first = 1; char cong[CONG_MAX]; @@ -463,7 +463,7 @@ first = 0; } -/*pcb_trace("[%d] %d %mm;%mm\n", n, cong[n], (pcb_coord_t)x, (pcb_coord_t)y);*/ +/*pcb_trace("[%d] %d %mm;%mm\n", n, cong[n], (rnd_coord_t)x, (rnd_coord_t)y);*/ dx = x - px; @@ -530,10 +530,10 @@ } } -static void polytherm_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, pcb_coord_t clr, pcb_bool is_diag) +static void polytherm_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool is_diag) { pcb_polyarea_t *ptmp, *p; - pcb_coord_t cx, cy, x2c, y2c; + rnd_coord_t cx, cy, x2c, y2c; double px, py, x, y, dx, dy, vx, vy, nx, ny, mx, my, len, x2, y2, vx2, vy2, len2, dx2, dy2; int n, go, first = 1; char cong[CONG_MAX], cong2[CONG_MAX]; @@ -566,7 +566,7 @@ first = 0; } -/*pcb_trace("[%d] %d %mm;%mm\n", n, cong[n], (pcb_coord_t)x, (pcb_coord_t)y);*/ +/*pcb_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])) { @@ -620,7 +620,7 @@ } /* generate round thermal around a polyarea specified by the iterator */ -static void pcb_thermal_area_pa_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, pcb_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_round(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) { pcb_pline_t *pl; @@ -634,7 +634,7 @@ } /* generate sharp thermal around a polyarea specified by the iterator */ -static void pcb_thermal_area_pa_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, pcb_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_sharp(pcb_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) { pcb_pline_t *pl; @@ -652,7 +652,7 @@ pcb_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid) { pcb_polyarea_t *pa, *pres = NULL; - pcb_coord_t clr = poly->Clearance/2; + rnd_coord_t clr = poly->Clearance/2; pcb_poly_it_t it; assert(poly->thermal & PCB_THERMAL_ON); /* caller should have checked this */ @@ -675,7 +675,7 @@ } /* Generate a clearance around a padstack shape, with no thermal */ -static pcb_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid, pcb_pstk_shape_t *shp, pcb_coord_t clearance) +static pcb_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid, pcb_pstk_shape_t *shp, rnd_coord_t clearance) { pcb_poly_it_t it; pcb_polyarea_t *pres = NULL; @@ -711,7 +711,7 @@ pcb_pstk_shape_t *shp, tmpshp; pcb_polyarea_t *pres = NULL; pcb_layer_t *layer; - pcb_coord_t clearance = ps->Clearance; + rnd_coord_t clearance = ps->Clearance; /* thermal needs a stackup - only a PCB has a stackup, buffers don't */ if (pcb == NULL) Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 30902) +++ trunk/src/tool_logic.c (revision 30903) @@ -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)) { - pcb_message(PCB_MSG_WARNING, "That tool can not be used on the rat layer!\n"); + rnd_message(PCB_MSG_WARNING, "That tool can not be used on the rat layer!\n"); *ok = 0; } } @@ -102,7 +102,7 @@ was_rat = PCB->RatDraw; } -static void get_grid_lock_coordinates(int type, void *ptr1, void *ptr2, void *ptr3, pcb_coord_t * x, pcb_coord_t * y) +static void get_grid_lock_coordinates(int type, void *ptr1, void *ptr2, void *ptr3, rnd_coord_t * x, rnd_coord_t * y) { switch (type) { case PCB_OBJ_LINE: @@ -133,9 +133,9 @@ } } -void pcb_tool_attach_for_copy(rnd_hidlib_t *hl, pcb_coord_t PlaceX, pcb_coord_t PlaceY, pcb_bool do_rubberband) +void pcb_tool_attach_for_copy(rnd_hidlib_t *hl, rnd_coord_t PlaceX, rnd_coord_t PlaceY, rnd_bool do_rubberband) { - pcb_coord_t mx = 0, my = 0; + rnd_coord_t mx = 0, my = 0; pcb_event(hl, PCB_EVENT_RUBBER_RESET, NULL); if (!conf_core.editor.snap_pin) { Index: trunk/src/tool_logic.h =================================================================== --- trunk/src/tool_logic.h (revision 30902) +++ trunk/src/tool_logic.h (revision 30903) @@ -34,7 +34,7 @@ void pcb_tool_logic_init(void); void pcb_tool_logic_uninit(void); -void pcb_tool_attach_for_copy(rnd_hidlib_t *hl, pcb_coord_t PlaceX, pcb_coord_t PlaceY, pcb_bool do_rubberband); +void pcb_tool_attach_for_copy(rnd_hidlib_t *hl, rnd_coord_t PlaceX, rnd_coord_t PlaceY, rnd_bool do_rubberband); void pcb_tool_notify_block(void); /* create first or second corner of a marked block (when clicked) */ Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 30902) +++ trunk/src/undo.c (revision 30903) @@ -66,12 +66,12 @@ #include "obj_poly_draw.h" -static pcb_bool between_increment_and_restore = pcb_false; -static pcb_bool added_undo_between_increment_and_restore = pcb_false; +static rnd_bool between_increment_and_restore = pcb_false; +static rnd_bool added_undo_between_increment_and_restore = pcb_false; pcb_data_t *pcb_removelist = NULL; /* lists of removed objects */ -static pcb_bool Locked = pcb_false; /* do not add entries if */ -pcb_bool pcb_undo_and_draw = pcb_true; /* flag is set; prevents from infinite loops */ +static rnd_bool Locked = pcb_false; /* do not add entries if */ +rnd_bool pcb_undo_and_draw = pcb_true; /* flag is set; prevents from infinite loops */ uundo_list_t pcb_uundo; /* only the undo dialog box should have access to it */ void *pcb_undo_alloc(pcb_board_t *pcb, const uundo_oper_t *oper, size_t data_len) @@ -79,7 +79,7 @@ return uundo_append(&pcb_uundo, oper, data_len); } -int pcb_undo(pcb_bool draw) +int pcb_undo(rnd_bool draw) { int res; @@ -86,17 +86,17 @@ pcb_undo_and_draw = draw; if (pcb_uundo.num_undo == 0) { - pcb_message(PCB_MSG_INFO, "Nothing to undo - buffer is empty\n"); + rnd_message(PCB_MSG_INFO, "Nothing to undo - buffer is empty\n"); return -1; } if (pcb_uundo.serial == 0) { - pcb_message(PCB_MSG_ERROR, "ERROR: Attempt to pcb_undo() with Serial == 0\n Please save your work and report this bug.\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ERROR: Bad undo serial number %d in undo stack - expecting %d or lower\n" + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "ERROR: Failed to undo some operations\n"); + rnd_message(PCB_MSG_ERROR, "ERROR: Failed to undo some operations\n"); else if (pcb_undo_and_draw) pcb_draw(); @@ -131,7 +131,7 @@ return uundo_undo_above(&pcb_uundo, s_min); } -int pcb_redo(pcb_bool draw) +int pcb_redo(rnd_bool draw) { int res; @@ -138,13 +138,13 @@ pcb_undo_and_draw = draw; if (pcb_uundo.num_redo == 0) { - pcb_message(PCB_MSG_INFO, "Nothing to redo. Perhaps changes have been made since last undo\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ERROR: Bad undo serial number %d in redo stack - expecting %d or higher\n" + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "ERROR: Failed to redo some operations\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "ERROR: Operations were added to the Undo stack with an incorrect serial number\n"); + rnd_message(PCB_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); @@ -219,7 +219,7 @@ /* --------------------------------------------------------------------------- * releases memory of the undo- and remove list */ -void pcb_undo_clear_list(pcb_bool Force) +void pcb_undo_clear_list(rnd_bool Force) { if (pcb_uundo.num_undo && (Force || pcb_hid_message_box(&PCB->hidlib, "warning", "clear undo buffer", "Do you reall want to clear 'undo' buffer?", "yes", 1, "no", 0, NULL) == 1)) { uundo_list_clear(&pcb_uundo); @@ -246,7 +246,7 @@ /* --------------------------------------------------------------------------- * return undo lock state */ -pcb_bool pcb_undoing(void) +rnd_bool pcb_undoing(void) { return Locked; } Index: trunk/src/undo.h =================================================================== --- trunk/src/undo.h (revision 30902) +++ trunk/src/undo.h (revision 30903) @@ -43,18 +43,18 @@ } pcb_undo_ev_t; void *pcb_undo_alloc(pcb_board_t *pcb, const uundo_oper_t *oper, size_t data_len); -int pcb_undo(pcb_bool); -int pcb_redo(pcb_bool); +int pcb_undo(rnd_bool); +int pcb_redo(rnd_bool); int pcb_undo_above(uundo_serial_t s_min); void pcb_undo_inc_serial(void); void pcb_undo_save_serial(void); void pcb_undo_restore_serial(void); -void pcb_undo_clear_list(pcb_bool); +void pcb_undo_clear_list(rnd_bool); void pcb_undo_lock(void); void pcb_undo_unlock(void); -pcb_bool pcb_undoing(void); +rnd_bool pcb_undoing(void); uundo_serial_t pcb_undo_serial(void); void pcb_undo_truncate_from(uundo_serial_t sfirst); @@ -75,6 +75,6 @@ /* temporary */ #include extern pcb_data_t *pcb_removelist; -extern pcb_bool pcb_undo_and_draw; +extern rnd_bool pcb_undo_and_draw; #endif Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 30902) +++ trunk/src/undo_act.c (revision 30903) @@ -82,7 +82,7 @@ pcb_undo_unfreeze_serial(); break; default: - pcb_message(PCB_MSG_ERROR, "Invalid argument for Atomic()\n"); + rnd_message(PCB_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 30902) +++ trunk/src/undo_old.c (revision 30903) @@ -80,25 +80,25 @@ #define DRAW_FLAGS (PCB_FLAG_RAT | PCB_FLAG_SELECTED | PCB_FLAG_HIDENAME | PCB_FLAG_HOLE | PCB_FLAG_OCTAGON | PCB_FLAG_FOUND | PCB_FLAG_CLEARLINE | PCB_FLAG_CLEARPOLY | PCB_FLAG_CLEARPOLYPOLY) #define CLIP_FLAGS (PCB_FLAG_CLEARLINE | PCB_FLAG_CLEARPOLY | PCB_FLAG_CLEARPOLYPOLY) -static pcb_bool UndoRotate90(UndoListTypePtr); -static pcb_bool UndoRotate(UndoListTypePtr); -static pcb_bool UndoChangeName(UndoListTypePtr); -static pcb_bool UndoCopyOrCreate(UndoListTypePtr); -static pcb_bool UndoMove(UndoListTypePtr); -static pcb_bool UndoRemove(UndoListTypePtr); -static pcb_bool UndoRemovePoint(UndoListTypePtr); -static pcb_bool UndoInsertPoint(UndoListTypePtr); -static pcb_bool UndoRemoveContour(UndoListTypePtr); -static pcb_bool UndoInsertContour(UndoListTypePtr); -static pcb_bool UndoMoveToLayer(UndoListTypePtr); -static pcb_bool UndoFlag(UndoListTypePtr); -static pcb_bool UndoOtherSide(UndoListTypePtr); -static pcb_bool UndoChangeSize(UndoListTypePtr); -static pcb_bool UndoChange2ndSize(UndoListTypePtr); -static pcb_bool UndoChangeAngles(UndoListTypePtr); -static pcb_bool UndoChangeRadii(UndoListTypePtr); -static pcb_bool UndoChangeClearSize(UndoListTypePtr); -static pcb_bool UndoClearPoly(UndoListTypePtr); +static rnd_bool UndoRotate90(UndoListTypePtr); +static rnd_bool UndoRotate(UndoListTypePtr); +static rnd_bool UndoChangeName(UndoListTypePtr); +static rnd_bool UndoCopyOrCreate(UndoListTypePtr); +static rnd_bool UndoMove(UndoListTypePtr); +static rnd_bool UndoRemove(UndoListTypePtr); +static rnd_bool UndoRemovePoint(UndoListTypePtr); +static rnd_bool UndoInsertPoint(UndoListTypePtr); +static rnd_bool UndoRemoveContour(UndoListTypePtr); +static rnd_bool UndoInsertContour(UndoListTypePtr); +static rnd_bool UndoMoveToLayer(UndoListTypePtr); +static rnd_bool UndoFlag(UndoListTypePtr); +static rnd_bool UndoOtherSide(UndoListTypePtr); +static rnd_bool UndoChangeSize(UndoListTypePtr); +static rnd_bool UndoChange2ndSize(UndoListTypePtr); +static rnd_bool UndoChangeAngles(UndoListTypePtr); +static rnd_bool UndoChangeRadii(UndoListTypePtr); +static rnd_bool UndoChangeClearSize(UndoListTypePtr); +static rnd_bool UndoClearPoly(UndoListTypePtr); #define PCB_OBJECT_ID(p) (((pcb_any_obj_t *) p)->ID) @@ -150,7 +150,7 @@ * recovers an object from a 90 deg 'rotate' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoRotate90(UndoListTypePtr Entry) +static rnd_bool UndoRotate90(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -169,7 +169,7 @@ * recovers an object from an arbitrary angle 'rotate' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoRotate(UndoListTypePtr Entry) +static rnd_bool UndoRotate(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -188,7 +188,7 @@ * recovers an object from a clear/restore poly operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoClearPoly(UndoListTypePtr Entry) +static rnd_bool UndoClearPoly(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -209,7 +209,7 @@ * recovers an object from a 'change name' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoChangeName(UndoListTypePtr Entry) +static rnd_bool UndoChangeName(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -226,7 +226,7 @@ /* --------------------------------------------------------------------------- * recovers an object from a ChangeAngles change operation */ -static pcb_bool UndoChangeAngles(UndoListTypePtr Entry) +static rnd_bool UndoChangeAngles(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -259,11 +259,11 @@ /* --------------------------------------------------------------------------- * recovers an object from a ChangeRadii change operation */ -static pcb_bool UndoChangeRadii(UndoListTypePtr Entry) +static rnd_bool UndoChangeRadii(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; - pcb_coord_t old_w, old_h; + rnd_coord_t old_w, old_h; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -290,11 +290,11 @@ /* --------------------------------------------------------------------------- * recovers an object from a clearance size change operation */ -static pcb_bool UndoChangeClearSize(UndoListTypePtr Entry) +static rnd_bool UndoChangeClearSize(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; - pcb_coord_t swap; + rnd_coord_t swap; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -316,11 +316,11 @@ /* --------------------------------------------------------------------------- * recovers an object from a Size change operation */ -static pcb_bool UndoChangeSize(UndoListTypePtr Entry) +static rnd_bool UndoChangeSize(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3, *ptr1e; int type; - pcb_coord_t swap; + rnd_coord_t swap; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -345,11 +345,11 @@ /* --------------------------------------------------------------------------- * recovers an object from a 2nd Size change operation */ -static pcb_bool UndoChange2ndSize(UndoListTypePtr Entry) +static rnd_bool UndoChange2ndSize(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; - pcb_coord_t swap; + rnd_coord_t swap; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -368,12 +368,12 @@ /* --------------------------------------------------------------------------- * recovers an object from a Size change operation */ -static pcb_bool UndoChangeRot(UndoListTypePtr Entry) +static rnd_bool UndoChangeRot(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; double swap; - pcb_bool ret = pcb_false; + rnd_bool ret = pcb_false; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -409,7 +409,7 @@ /* --------------------------------------------------------------------------- * recovers an object from a FLAG change operation */ -static pcb_bool UndoFlag(UndoListTypePtr Entry) +static rnd_bool UndoFlag(UndoListTypePtr Entry) { void *ptr1, *ptr1e, *ptr2, *ptr3, *txt_save; int type; @@ -460,8 +460,8 @@ pcb_draw_obj((pcb_any_obj_t *)ptr2); return pcb_true; } - pcb_message(PCB_MSG_ERROR, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); - pcb_message(PCB_MSG_ERROR, "for UndoFlag Operation. Previous flags: %s\n", pcb_strflg_f2s(Entry->Data.Flags, 0, NULL, 0)); + 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)); return pcb_false; } @@ -469,7 +469,7 @@ * recovers a subc from an other-side operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoOtherSide(UndoListTypePtr Entry) +static rnd_bool UndoOtherSide(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -485,7 +485,7 @@ DrawSubc(subc); return pcb_true; } - pcb_message(PCB_MSG_ERROR, "hace Internal error: UndoOtherside on object type %x\n", type); + rnd_message(PCB_MSG_ERROR, "hace Internal error: UndoOtherside on object type %x\n", type); return pcb_false; } @@ -507,7 +507,7 @@ * recovers an object from a 'copy' or 'create' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoCopyOrCreate(UndoListTypePtr Entry) +static rnd_bool UndoCopyOrCreate(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -539,7 +539,7 @@ * recovers an object from a 'move' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoMove(UndoListTypePtr Entry) +static rnd_bool UndoMove(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -559,7 +559,7 @@ * recovers an object from a 'remove' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoRemove(UndoListTypePtr Entry) +static rnd_bool UndoRemove(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -601,7 +601,7 @@ * recovers an object from a 'move to another layer' operation * returns pcb_true if anything has been recovered */ -static pcb_bool UndoMoveToLayer(UndoListTypePtr Entry) +static rnd_bool UndoMoveToLayer(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; int type; @@ -628,7 +628,7 @@ * recovers a removed polygon point * returns pcb_true on success */ -static pcb_bool UndoRemovePoint(UndoListTypePtr Entry) +static rnd_bool UndoRemovePoint(UndoListTypePtr Entry) { pcb_layer_t *layer; pcb_poly_t *polygon; @@ -667,7 +667,7 @@ * recovers an inserted polygon point * returns pcb_true on success */ -static pcb_bool UndoInsertPoint(UndoListTypePtr Entry) +static rnd_bool UndoInsertPoint(UndoListTypePtr Entry) { pcb_layer_t *layer; pcb_poly_t *polygon; @@ -675,7 +675,7 @@ int type; pcb_cardinal_t point_idx; pcb_cardinal_t hole; - pcb_bool last_in_contour = pcb_false; + rnd_bool last_in_contour = pcb_false; assert((long int)Entry->Kind == PCB_OBJ_POLY_POINT); /* lookup entry by it's ID */ @@ -716,7 +716,7 @@ } } -static pcb_bool UndoSwapCopiedObject(UndoListTypePtr Entry) +static rnd_bool UndoSwapCopiedObject(UndoListTypePtr Entry) { void *ptr1, *ptr2, *ptr3; void *ptr1b, *ptr2b, *ptr3b; @@ -755,7 +755,7 @@ * recovers an removed polygon point * returns pcb_true on success */ -static pcb_bool UndoRemoveContour(UndoListTypePtr Entry) +static rnd_bool UndoRemoveContour(UndoListTypePtr Entry) { assert(Entry->Kind == PCB_OBJ_POLY); return UndoSwapCopiedObject(Entry); @@ -765,7 +765,7 @@ * recovers an inserted polygon point * returns pcb_true on success */ -static pcb_bool UndoInsertContour(UndoListTypePtr Entry) +static rnd_bool UndoInsertContour(UndoListTypePtr Entry) { assert(Entry->Kind == PCB_OBJ_POLY); return UndoSwapCopiedObject(Entry); @@ -881,7 +881,7 @@ /* --------------------------------------------------------------------------- * adds an object to the list of clearpoly objects */ -void pcb_undo_add_obj_to_clear_poly(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_bool clear) +void pcb_undo_add_obj_to_clear_poly(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_bool clear) { UndoListTypePtr undo; @@ -895,7 +895,7 @@ /* --------------------------------------------------------------------------- * adds an subc to the list of objects tossed to the other side */ -void pcb_undo_add_subc_to_otherside(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t yoff) +void pcb_undo_add_subc_to_otherside(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t yoff) { UndoListTypePtr undo; @@ -908,7 +908,7 @@ /* --------------------------------------------------------------------------- * adds an object to the list of 90-deg rotated objects */ -void pcb_undo_add_obj_to_rotate90(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t CenterX, pcb_coord_t CenterY, unsigned int Steps) +void pcb_undo_add_obj_to_rotate90(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, unsigned int Steps) { UndoListTypePtr undo; @@ -923,7 +923,7 @@ /* --------------------------------------------------------------------------- * adds an object to the list of rotated objects */ -void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t CenterX, pcb_coord_t CenterY, pcb_angle_t angle) +void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, pcb_angle_t angle) { UndoListTypePtr undo; @@ -993,7 +993,7 @@ UndoListTypePtr undo; pcb_poly_t *polygon = (pcb_poly_t *) Ptr2; pcb_cardinal_t hole; - pcb_bool last_in_contour = pcb_false; + rnd_bool last_in_contour = pcb_false; if (!Locked) { switch (Type) { @@ -1070,7 +1070,7 @@ /* --------------------------------------------------------------------------- * adds an object to the list of moved objects */ -void pcb_undo_add_obj_to_move(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t DX, pcb_coord_t DY) +void pcb_undo_add_obj_to_move(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t DX, rnd_coord_t DY) { UndoListTypePtr undo; Index: trunk/src/undo_old.h =================================================================== --- trunk/src/undo_old.h (revision 30902) +++ trunk/src/undo_old.h (revision 30903) @@ -38,13 +38,13 @@ void pcb_undo_add_obj_to_insert_point(int, void *, void *, void *); void pcb_undo_add_obj_to_remove_contour(int, pcb_layer_t *, pcb_poly_t *); void pcb_undo_add_obj_to_insert_contour(int, pcb_layer_t *, pcb_poly_t *); -void pcb_undo_add_obj_to_move(int, void *, void *, void *, pcb_coord_t, pcb_coord_t); +void pcb_undo_add_obj_to_move(int, void *, void *, void *, rnd_coord_t, rnd_coord_t); void pcb_undo_add_obj_to_change_name(int, void *, void *, void *, char *); void pcb_undo_add_obj_to_change_pinnum(int, void *, void *, void *, char *); -void pcb_undo_add_obj_to_rotate90(int, void *, void *, void *, pcb_coord_t, pcb_coord_t, unsigned int); -void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t CenterX, pcb_coord_t CenterY, pcb_angle_t angle); +void pcb_undo_add_obj_to_rotate90(int, void *, void *, void *, rnd_coord_t, rnd_coord_t, unsigned int); +void pcb_undo_add_obj_to_rotate(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t CenterX, rnd_coord_t CenterY, pcb_angle_t angle); void pcb_undo_add_obj_to_create(int, void *, void *, void *); -void pcb_undo_add_subc_to_otherside(int Type, void *Ptr1, void *Ptr2, void *Ptr3, pcb_coord_t yoff); +void pcb_undo_add_subc_to_otherside(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t yoff); void pcb_undo_add_obj_to_move_to_layer(int, void *, void *, void *); void pcb_undo_add_obj_to_flag(void *obj); void pcb_undo_add_obj_to_size(int, void *, void *, void *); @@ -53,7 +53,7 @@ void pcb_undo_add_obj_to_clear_size(int, void *, void *, void *); void pcb_undo_add_obj_to_change_angles(int, void *, void *, void *); void pcb_undo_add_obj_to_change_radii(int, void *, void *, void *); -void pcb_undo_add_obj_to_clear_poly(int, void *, void *, void *, pcb_bool); +void pcb_undo_add_obj_to_clear_poly(int, void *, void *, void *, rnd_bool); /* --------------------------------------------------------------------------- * define supported types of undo operations Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 30902) +++ trunk/src/undo_old_str.h (revision 30903) @@ -5,7 +5,7 @@ } ChangeNameType, *ChangeNameTypePtr; typedef struct { /* information about a move command */ - pcb_coord_t DX, DY; /* movement vector */ + rnd_coord_t DX, DY; /* movement vector */ } MoveType, *MoveTypePtr; typedef struct { @@ -14,14 +14,14 @@ } Removed; typedef struct { /* information about removed polygon points */ - pcb_coord_t X, Y; /* data */ + rnd_coord_t X, Y; /* data */ int ID; pcb_cardinal_t Index; /* index in a polygons array of points */ - pcb_bool last_in_contour; /* Whether the point was the last in its contour */ + rnd_bool last_in_contour; /* Whether the point was the last in its contour */ } RemovedPointType, *RemovedPointTypePtr; typedef struct { /* information about rotation */ - pcb_coord_t CenterX, CenterY; /* center of rotation */ + rnd_coord_t CenterX, CenterY; /* center of rotation */ pcb_cardinal_t Steps; /* number of steps */ } RotateType, *RotateTypePtr; @@ -30,7 +30,7 @@ } MoveToLayer; typedef struct { /* information about poly clear/restore */ - pcb_bool Clear; /* pcb_true was clear, pcb_false was restore */ + rnd_bool Clear; /* pcb_true was clear, pcb_false was restore */ pcb_layer_t *Layer; } ClearPolyType, *ClearPolyTypePtr; @@ -56,7 +56,7 @@ RotateType Rotate; MoveToLayer MoveToLayer; pcb_flag_t Flags; - pcb_coord_t Size; + rnd_coord_t Size; ClearPolyType ClearPoly; NetlistChangeType NetlistChange; long int CopyID; Index: trunk/src/view.c =================================================================== --- trunk/src/view.c (revision 30902) +++ trunk/src/view.c (revision 30903) @@ -154,12 +154,12 @@ case PCB_OBJ_GFX: idp = pcb_obj2idpath(obj); if (idp == NULL) - pcb_message(PCB_MSG_ERROR, "Internal error in pcb_drc_append_obj: can not resolve object id path\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Internal error in pcb_drc_append_obj: unknown object type %i\n", obj->type); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, LOADERR "Invalid object id (non-text)\n"); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, LOADERR "Invalid object id-path\n"); + rnd_message(PCB_MSG_ERROR, LOADERR "Invalid object id-path\n"); nope:; } } @@ -390,7 +390,7 @@ unsigned long int uid; char *end; pcb_view_type_t data_type; - pcb_bool succ; + rnd_bool succ; if (ctx->next == NULL) return NULL; @@ -410,7 +410,7 @@ else if (strcmp(n->data.text.value, "plain") == 0) data_type = PCB_VIEW_PLAIN; else { - pcb_message(PCB_MSG_ERROR, LOADERR "Invalid data type: '%s'\n", n->data.text.value); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, LOADERR "Invalid bbox values\n"); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, LOADERR "Invalid xy values\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, LOADERR "invalid drc required value: '%s'\n", c->data.text.value); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, LOADERR "invalid drc measured value: '%s'\n", c->data.text.value); + rnd_message(PCB_MSG_ERROR, LOADERR "invalid drc measured value: '%s'\n", c->data.text.value); } } break; Index: trunk/src/view.h =================================================================== --- trunk/src/view.h (revision 30902) +++ trunk/src/view.h (revision 30903) @@ -60,7 +60,7 @@ pcb_box_t bbox; /* bounding box of all error objects (in both groups) */ - pcb_coord_t x, y; /* optional: a coord to mark on the preview */ + rnd_coord_t x, y; /* optional: a coord to mark on the preview */ pcb_idpath_list_t objs[2]; /* optional: two groups of objects to highlight on preview */ gds_t long_desc; /* optional: if non-empty, description shall point to long_desc.array */ @@ -69,8 +69,8 @@ union { struct { unsigned have_measured:1; - pcb_coord_t measured_value; - pcb_coord_t required_value; + rnd_coord_t measured_value; + rnd_coord_t required_value; } drc; } data; Index: trunk/src/vtr0.h =================================================================== --- trunk/src/vtr0.h (revision 30902) +++ trunk/src/vtr0.h (revision 30903) @@ -6,10 +6,10 @@ #include typedef struct pcb_range_s { - pcb_coord_t begin, end; + rnd_coord_t begin, end; union { long l; - pcb_coord_t c; + rnd_coord_t c; double d; void *ptr; } data[4]; Index: trunk/src/vtroutestyle.h =================================================================== --- trunk/src/vtroutestyle.h (revision 30902) +++ trunk/src/vtroutestyle.h (revision 30903) @@ -9,13 +9,13 @@ /* Elem=RouteStyle; init=0 */ typedef struct { - pcb_coord_t Thick; /* line thickness */ - pcb_coord_t textt; /* text thickness */ - pcb_coord_t texts; /* text scale */ - pcb_coord_t Clearance; /* min. separation from other nets */ + rnd_coord_t Thick; /* line thickness */ + rnd_coord_t textt; /* text thickness */ + rnd_coord_t texts; /* text scale */ + rnd_coord_t Clearance; /* min. separation from other nets */ pcb_cardinal_t via_proto; /* via padstack prototype ID */ int via_proto_set; /* 1 if via_proto is set/valid, 0 for old file formats */ - pcb_coord_t Diameter, Hole; /* OBSOLETE: via diameter and drill hole; kept for compatibility with old file formats (lihata board v1..v4) */ + rnd_coord_t Diameter, Hole; /* OBSOLETE: via diameter and drill hole; kept for compatibility with old file formats (lihata board v1..v4) */ char name[32]; /* fixed length name to save malloc/free */ pcb_attribute_list_t attr; } pcb_route_style_t; Index: trunk/src_plugins/acompnet/acompnet.c =================================================================== --- trunk/src_plugins/acompnet/acompnet.c (revision 30902) +++ trunk/src_plugins/acompnet/acompnet.c (revision 30903) @@ -43,8 +43,8 @@ static pcb_layer_t *ly; typedef struct { - pcb_coord_t x, y; - pcb_coord_t r; + rnd_coord_t x, y; + rnd_coord_t r; } overlap_t; static pcb_r_dir_t overlap(const pcb_box_t *box, void *closure) Index: trunk/src_plugins/act_draw/act_draw.c =================================================================== --- trunk/src_plugins/act_draw/act_draw.c (revision 30902) +++ trunk/src_plugins/act_draw/act_draw.c (revision 30903) @@ -44,7 +44,7 @@ static int flg_error(const char *msg) { - pcb_message(PCB_MSG_ERROR, "act_draw flag conversion error: %s\n", msg); + rnd_message(PCB_MSG_ERROR, "act_draw flag conversion error: %s\n", msg); return 0; } @@ -72,7 +72,7 @@ pcb_line_t *line; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t x1, y1, x2, y2, th, cl; + rnd_coord_t x1, y1, x2, y2, th, cl; pcb_flag_t flags; DRAWOPTARG; @@ -109,7 +109,7 @@ pcb_arc_t *arc; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t cx, cy, hr, wr, th, cl; + rnd_coord_t cx, cy, hr, wr, th, cl; double sa, da; pcb_flag_t flags; DRAWOPTARG; @@ -149,7 +149,7 @@ pcb_text_t *text = NULL; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t x, y, th; + rnd_coord_t x, y, th; int scale, fontid; double rot; pcb_flag_t flags; @@ -177,7 +177,7 @@ text = pcb_text_new(layer, font, x, y, rot, scale, th, str, flags); } else - pcb_message(PCB_MSG_ERROR, "NewText: font %d not found\n", fontid); + rnd_message(PCB_MSG_ERROR, "NewText: font %d not found\n", fontid); if (text != NULL) { RET_IDPATH(text); @@ -195,7 +195,7 @@ pcb_pstk_t *pstk; pcb_data_t *data; long proto; - pcb_coord_t x, y, cl; + rnd_coord_t x, y, cl; pcb_flag_t flags; DRAWOPTARG; @@ -226,7 +226,7 @@ pcb_poly_t *poly; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t x1, y1, x2, y2, cl; + rnd_coord_t x1, y1, x2, y2, cl; pcb_flag_t flags; DRAWOPTARG; @@ -259,7 +259,7 @@ long len; char *s, *next, *tmp = pcb_strdup(ptlist); double c[2]; - pcb_bool success; + rnd_bool success; s = tmp; while (isspace(*s) || (*s == ',')) s++; @@ -274,7 +274,7 @@ } c[len % 2] = pcb_get_value_ex(s, NULL, NULL, NULL, "mm", &success); if (!success) { - pcb_message(PCB_MSG_ERROR, "act_draw ptlist processing: '%s' is not a valid coordinate\n", s); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "act_draw ptlist processing: odd number of points\n"); + rnd_message(PCB_MSG_ERROR, "act_draw ptlist processing: odd number of points\n"); return -1; } return len/2; @@ -297,7 +297,7 @@ pcb_poly_t *poly; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t cl; + rnd_coord_t cl; pcb_flag_t flags; DRAWOPTARG; @@ -334,7 +334,7 @@ pcb_poly_t *poly; pcb_data_t *data; pcb_layer_t *layer; - pcb_coord_t cl; + rnd_coord_t cl; pcb_flag_t flags; DRAWOPTARG; (void)noundo; @@ -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)) { - pcb_message(PCB_MSG_ERROR, "PolyNewPoints: invalid polygon pointer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "PolyNewEnd: invalid polygon pointer\n"); + rnd_message(PCB_MSG_ERROR, "PolyNewEnd: invalid polygon pointer\n"); RND_ACT_IRES(0); return 0; } if (poly->PointN < 3) { - pcb_message(PCB_MSG_ERROR, "PolyNewEnd: can not finish polygon, need at least 3 points\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "LayerObjDup: invalid object pointer\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/act_draw/act_pstk_proto.c (revision 30903) @@ -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)) { - pcb_message(PCB_MSG_ERROR, "PstkProtoTmp: invalid proto pointer\n"); + rnd_message(PCB_MSG_ERROR, "PstkProtoTmp: invalid proto pointer\n"); RND_ACT_IRES(-1); return 0; } @@ -156,7 +156,7 @@ pcb_layer_combining_t slyc, dlyc; int src_idx, dst_idx, n; pcb_pstk_tshape_t *ts; - pcb_coord_t crd; + rnd_coord_t crd; DRAWOPTARG; RND_PCB_ACT_CONVARG(1+ao, FGW_PTR, PstkProtoEdit, proto = argv[1+ao].val.ptr_void); @@ -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)) { - pcb_message(PCB_MSG_ERROR, "PstkProtoEdit: invalid proto pointer\n"); + rnd_message(PCB_MSG_ERROR, "PstkProtoEdit: invalid proto pointer\n"); RND_ACT_IRES(-1); return 0; } @@ -214,7 +214,7 @@ case act_draw_keywords_shape_line: { - pcb_coord_t x1, y1, x2, y2, th; + rnd_coord_t x1, y1, x2, y2, th; int sq = 0; RND_PCB_ACT_CONVARG(3+ao, FGW_STR, PstkProtoEdit, tmp = argv[3+ao].val.str); Index: trunk/src_plugins/act_read/act_geo.c =================================================================== --- trunk/src_plugins/act_read/act_geo.c (revision 30902) +++ trunk/src_plugins/act_read/act_geo.c (revision 30903) @@ -38,7 +38,7 @@ static const char pcb_acth_IsPointOnLine[] = "Returns 1 if point x;y with radius r is on the line addressed by idpath, 0 else."; static fgw_error_t pcb_act_IsPointOnLine(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y, r; + rnd_coord_t x, y, r; pcb_idpath_t *idp; pcb_any_obj_t *obj; @@ -61,7 +61,7 @@ static const char pcb_acth_IsPointOnArc[] = "Returns 1 if point x;y with radius r is on the arc addressed by idpath, 0 else."; static fgw_error_t pcb_act_IsPointOnArc(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y, r; + rnd_coord_t x, y, r; pcb_idpath_t *idp; pcb_any_obj_t *obj; Index: trunk/src_plugins/act_read/act_read.c =================================================================== --- trunk/src_plugins/act_read/act_read.c (revision 30902) +++ trunk/src_plugins/act_read/act_read.c (revision 30903) @@ -49,7 +49,7 @@ const char *input, *units, *def_unit; int relative, a; double v; - pcb_bool success; + rnd_bool success; RND_PCB_ACT_CONVARG(1, FGW_STR, GetValue, input = argv[1].val.str); RND_PCB_ACT_CONVARG(2, FGW_STR, GetValue, units = argv[2].val.str); @@ -88,7 +88,7 @@ static int flg_error(const char *msg) { - pcb_message(PCB_MSG_ERROR, "act_read flag conversion error: %s\n", msg); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 30903) @@ -133,7 +133,7 @@ for(rn = gsxl_children(dom.root); rn != NULL; rn = gsxl_next(rn)) { int numch = 0; gsxl_node_t *p, *nid, *ntr, *nvr, *ngap, *npads, *npaths, *nx, *ny, *nl; - pcb_coord_t thick, clear, via_dia; + rnd_coord_t thick, clear, via_dia; char *end; for(n = gsxl_children(rn); n != NULL; n = gsxl_next(n)) numch++; @@ -153,7 +153,7 @@ npaths = gsxl_next(npads); for(n = gsxl_children(npaths); n != NULL; n = gsxl_next(n)) { /* iterate over all paths of the track */ - pcb_coord_t lx, ly, x, y; + rnd_coord_t lx, ly, x, y; int len = 0, lidx, llidx; for(p = gsxl_children(n); p != NULL; p = gsxl_next(p)) { /* iterate over all points of the path */ @@ -164,11 +164,11 @@ lidx = strtol(nl->str, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Ignoring invalid layer index '%s' (not an integer) in line %ld\n", nl->str, (long)nl->line); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Ignoring invalid layer index '%s' (out of range) in line %ld\n", nl->str, (long)nl->line); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Invalid via: not vertical, in line %ld:%ld\n", (long)nl->line, (long)nl->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not open %s for read\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not open %s for write\n", fn); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Failed to map nets\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Only board routing is supported at the moment\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not open temp file %s for write\n", tmpfn); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Failed to map nets\n"); + rnd_message(PCB_MSG_ERROR, "Failed to map nets\n"); RND_ACT_IRES(-1); return 0; } @@ -390,7 +390,7 @@ RND_ACT_IRES(0); } else { - pcb_message(PCB_MSG_ERROR, "Failed to execute c-pcb\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/asm/asm.c (revision 30903) @@ -126,7 +126,7 @@ else if (strcmp(s, "y") == 0) templ_append(dst, TT_Y, NULL); else - pcb_message(PCB_MSG_ERROR, "Ignoring unknown asm template entry: '%s'\n", s); + rnd_message(PCB_MSG_ERROR, "Ignoring unknown asm template entry: '%s'\n", s); } return src; } @@ -138,7 +138,7 @@ template_t *t; int n, bot, have_coords = 0; char *tmp; - pcb_coord_t x = 0, y = 0; + rnd_coord_t x = 0, y = 0; gds_init(&s); for(n = 0, t = gdl_first(temp); t != NULL; n++, t = gdl_next(temp, t)) { Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 30902) +++ trunk/src_plugins/autocrop/autocrop.c (revision 30903) @@ -43,7 +43,7 @@ static fgw_error_t pcb_act_autocrop(fgw_arg_t *res, int argc, fgw_arg_t *argv) { pcb_box_t box; - pcb_coord_t dx, dy, w, h; + rnd_coord_t dx, dy, w, h; if (pcb_data_is_empty(PCB->Data)) return 0; Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 30902) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30903) @@ -92,9 +92,9 @@ double m; /* annealing stage cutoff constant */ double gamma; /* annealing schedule constant */ int good_ratio; /* ratio of moves to good moves for halting */ - pcb_bool fast; /* ignore SMD/pin conflicts */ - pcb_coord_t large_grid_size; /* snap perturbations to this grid when T is high */ - pcb_coord_t small_grid_size; /* snap to this grid when T is small. */ + rnd_bool fast; /* ignore SMD/pin conflicts */ + rnd_coord_t large_grid_size; /* snap perturbations to this grid when T is high */ + rnd_coord_t small_grid_size; /* snap to this grid when T is small. */ } /* wire cost is manhattan distance (in mils), thus 1 inch = 1000 */ CostParameter = { @@ -120,7 +120,7 @@ typedef struct { pcb_any_obj_t *comp; enum ewhich which; - pcb_coord_t DX, DY; /* for shift */ + rnd_coord_t DX, DY; /* for shift */ unsigned rotate; /* for rotate/flip */ pcb_any_obj_t *other; /* for exchange */ } PerturbationType; @@ -174,7 +174,7 @@ return layer->meta.real.grp; return SLayer; /* any layer will do */ default: - pcb_message(PCB_MSG_ERROR, "Odd terminal type encountered in obj_layergrp()\n"); + rnd_message(PCB_MSG_ERROR, "Odd terminal type encountered in obj_layergrp()\n"); } return -1; } @@ -224,7 +224,7 @@ pcb_box_t trap; pcb_direction_t search_dir; }; -#define ROTATEBOX(box) { pcb_coord_t t;\ +#define ROTATEBOX(box) { rnd_coord_t t;\ t = (box).X1; (box).X1 = - (box).Y1; (box).Y1 = t;\ t = (box).X2; (box).X2 = - (box).Y2; (box).Y2 = t;\ t = (box).X1; (box).X1 = (box).X2; (box).X2 = t;\ @@ -317,8 +317,8 @@ double delta4 = 0; /* alignment bonus */ double delta5 = 0; /* total area penalty */ pcb_cardinal_t i; - pcb_coord_t minx, maxx, miny, maxy; - pcb_bool allpads, allsameside; + rnd_coord_t minx, maxx, miny, maxy; + rnd_bool allpads, allsameside; pcb_cardinal_t thegroup; pcb_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ pcb_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ @@ -350,7 +350,7 @@ allsameside = pcb_true; for(t = pcb_termlist_next(t); t != NULL; t = pcb_termlist_next(t)) { - pcb_coord_t X, Y; + rnd_coord_t X, Y; obj = pcb_term_find_name(PCB, PCB->Data, PCB_LYT_COPPER, t->refdes, t->term, NULL, NULL); pcb_obj_center(obj, &X, &Y); PCB_MAKE_MIN(minx, X); @@ -382,7 +382,7 @@ { pcb_box_list_t *thisside, *otherside; pcb_box_t *box, *lastbox = NULL; - pcb_coord_t clearance; + rnd_coord_t clearance; pcb_any_obj_t *o; pcb_data_it_t it; int onbtm = 0; @@ -537,8 +537,8 @@ } /* penalize total area used by this layout */ { - pcb_coord_t minX = PCB_MAX_COORD, minY = PCB_MAX_COORD; - pcb_coord_t maxX = -PCB_MAX_COORD, maxY = -PCB_MAX_COORD; + rnd_coord_t minX = PCB_MAX_COORD, minY = PCB_MAX_COORD; + rnd_coord_t maxX = -PCB_MAX_COORD, maxY = -PCB_MAX_COORD; PCB_SUBC_LOOP(PCB->Data); { PCB_MAKE_MIN(minX, subc->BoundingBox.X1); @@ -559,7 +559,7 @@ return W + (delta1 + delta2 + delta3 - delta4 + delta5); } -static pcb_bool is_smd(const pcb_any_obj_t *obj) +static rnd_bool is_smd(const pcb_any_obj_t *obj) { pcb_subc_t *sc = (pcb_subc_t *)obj; pcb_pstk_t *ps; @@ -578,7 +578,7 @@ return 1; } -static pcb_bool on_bottom(const pcb_any_obj_t *obj) +static rnd_bool on_bottom(const pcb_any_obj_t *obj) { int onbtm = 0; pcb_subc_get_side((pcb_subc_t *)obj, &onbtm); @@ -602,7 +602,7 @@ switch (pcb_rand() % ((vtp0_len(selected) > 1) ? 3 : 2)) { case 0: { /* shift! */ - pcb_coord_t grid; + rnd_coord_t grid; double scaleX = PCB_CLAMP(sqrt(T), PCB_MIL_TO_COORD(2.5), PCB->hidlib.size_x / 3); double scaleY = PCB_CLAMP(sqrt(T), PCB_MIL_TO_COORD(2.5), PCB->hidlib.size_y / 3); pt.which = SHIFT; @@ -627,7 +627,7 @@ case 1: { /* flip/rotate! */ /* only flip if it's an SMD component */ - pcb_bool isSMD = is_smd(pt.comp); + rnd_bool isSMD = is_smd(pt.comp); pt.which = ROTATE; pt.rotate = isSMD ? (pcb_rand() & 3) : (1 + (pcb_rand() % 3)); @@ -653,10 +653,10 @@ return pt; } -void doPerturb(vtp0_t *selected, PerturbationType *pt, pcb_bool undo) +void doPerturb(vtp0_t *selected, PerturbationType *pt, rnd_bool undo) { pcb_box_t *bb; - pcb_coord_t bbcx, bbcy; + rnd_coord_t bbcx, bbcy; pcb_subc_t *subc = (pcb_subc_t *)pt->comp; /* compute center of element bounding box */ @@ -667,7 +667,7 @@ switch (pt->which) { case SHIFT: { - pcb_coord_t DX = pt->DX, DY = pt->DY; + rnd_coord_t DX = pt->DX, DY = pt->DY; if (undo) { DX = -DX; DY = -DY; @@ -686,7 +686,7 @@ } else { pcb_cardinal_t n; - pcb_coord_t y = bb->Y1; + rnd_coord_t y = bb->Y1; pcb_subc_change_side(subc, (bb->Y1+bb->Y2)/2); /* mirroring moves the subc. move it back. */ pcb_subc_move(subc, 0, y - subc->BoundingBox.Y1, 1); @@ -700,10 +700,10 @@ case EXCHANGE: { /* first exchange positions */ - pcb_coord_t x1 = bb->X1; - pcb_coord_t y1 = bb->Y1; - pcb_coord_t x2 = pt->other->BoundingBox.X1; - pcb_coord_t y2 = pt->other->BoundingBox.Y1; + rnd_coord_t x1 = bb->X1; + rnd_coord_t y1 = bb->Y1; + rnd_coord_t x2 = pt->other->BoundingBox.X1; + rnd_coord_t y2 = pt->other->BoundingBox.Y1; pcb_subc_move(subc, x2 - x1, y2 - y1, 1); pcb_subc_move((pcb_subc_t *)pt->other, x1 - x2, y1 - y2, 1); @@ -731,18 +731,18 @@ /* --------------------------------------------------------------------------- * Auto-place selected components. */ -pcb_bool AutoPlaceSelected(void) +rnd_bool AutoPlaceSelected(void) { vtp0_t Selected; PerturbationType pt; double C00, C0, T0; - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; vtp0_init(&Selected); Selected = collectSelectedSubcircuits(); if (vtp0_len(&Selected) == 0) { - pcb_message(PCB_MSG_ERROR, "No subcircuits selected to autoplace.\n"); + rnd_message(PCB_MSG_ERROR, "No subcircuits selected to autoplace.\n"); goto done; } Index: trunk/src_plugins/autoplace/autoplace.h =================================================================== --- trunk/src_plugins/autoplace/autoplace.h (revision 30902) +++ trunk/src_plugins/autoplace/autoplace.h (revision 30903) @@ -40,6 +40,6 @@ #include -pcb_bool AutoPlaceSelected(void); +rnd_bool AutoPlaceSelected(void); #endif Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 30902) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30903) @@ -231,7 +231,7 @@ struct routebox_s { pcb_box_t box, sbox; struct { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; } line; /* exact coords of the line we are going to draw if type is line; reverse engineering these from the bounding box using halfthick and other hacks lead to rounding errors, a few LSB flicker in coords, e.g. breaking rubber band */ union { pcb_pstk_t *via; @@ -320,8 +320,8 @@ pcb_route_style_t **styles; /* [max_styles+1] */ /* what is the maximum bloat (clearance+line half-width or * clearance+via_radius) for any style we've seen? */ - pcb_coord_t max_bloat; - pcb_coord_t max_keep; + rnd_coord_t max_bloat; + rnd_coord_t max_keep; mtspace_t *mtspace; } routedata_t; @@ -352,7 +352,7 @@ /* net style parameters */ pcb_route_style_t *style; /* the present bloat */ - pcb_coord_t bloat; + rnd_coord_t bloat; /* cost parameters */ pcb_cost_t ViaCost, /* additional "length" cost for using a via */ LastConflictPenalty, /* length mult. for routing over last pass' trace */ @@ -364,16 +364,16 @@ /* maximum conflict incidence before calling it "no path found" */ int hi_conflict; /* are vias allowed? */ - pcb_bool use_vias; + rnd_bool use_vias; /* is this an odd or even pass? */ - pcb_bool is_odd; + rnd_bool is_odd; /* permit conflicts? */ - pcb_bool with_conflicts; + rnd_bool with_conflicts; /* is this a final "smoothing" pass? */ - pcb_bool is_smoothing; + rnd_bool is_smoothing; /* rip up nets regardless of conflicts? */ - pcb_bool rip_always; - pcb_bool last_smooth; + rnd_bool rip_always; + rnd_bool last_smooth; unsigned char pass; } AutoRouteParameters; @@ -387,7 +387,7 @@ static routebox_t *CreateExpansionArea(const pcb_box_t * area, pcb_cardinal_t group, - routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * edge); + routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * edge); static pcb_cost_t edge_cost(const edge_t * e, const pcb_cost_t too_big); static void best_path_candidate(routeone_state_t *s, edge_t * e, routebox_t * best_target); @@ -397,7 +397,7 @@ static void add_or_destroy_edge(routeone_state_t *s, edge_t * e); static void -RD_DrawThermal(routedata_t * rd, pcb_coord_t X, pcb_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, pcb_bool is_bad); +RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad); static void ResetSubnet(routebox_t * net); #ifdef ROUTE_DEBUG static int showboxen = -2; @@ -407,9 +407,9 @@ /* group number of groups that hold surface mount pads */ static pcb_layergrp_id_t front, back; -static pcb_bool usedGroup[PCB_MAX_LAYERGRP]; +static rnd_bool usedGroup[PCB_MAX_LAYERGRP]; static int x_cost[PCB_MAX_LAYERGRP], y_cost[PCB_MAX_LAYERGRP]; -static pcb_bool is_layer_group_active[PCB_MAX_LAYERGRP]; +static rnd_bool is_layer_group_active[PCB_MAX_LAYERGRP]; static int ro = 0; static int smoothes = 1; static int passes = 12; @@ -546,7 +546,7 @@ return; } -static void init_const_box(routebox_t * rb, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t clearance) +static void init_const_box(routebox_t * rb, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t clearance) { pcb_box_t *bp = (pcb_box_t *) & rb->box; /* note discarding const! */ assert(!rb->flags.inited); @@ -579,7 +579,7 @@ return pcb_closest_pcb_point_in_box(from, &rb->sbox); } -static inline pcb_bool point_in_shrunk_box(const routebox_t * box, pcb_coord_t X, pcb_coord_t Y) +static inline rnd_bool point_in_shrunk_box(const routebox_t * box, rnd_coord_t X, rnd_coord_t Y) { pcb_box_t b = shrink_routebox(box); return pcb_point_in_box(&b, X, Y); @@ -593,7 +593,7 @@ routebox_t **rbpp; pcb_layer_type_t lyt; int layergroup = -1; - pcb_coord_t clr; + rnd_coord_t clr; lyt = pcb_layer_flags_(layer); if (!(lyt & PCB_LYT_COPPER)) @@ -716,11 +716,11 @@ } static routebox_t *AddIrregularObstacle(vtp0_t layergroupboxes[], - pcb_coord_t X1, pcb_coord_t Y1, - pcb_coord_t X2, pcb_coord_t Y2, pcb_cardinal_t layergroup, void *parent, pcb_route_style_t * style) + rnd_coord_t X1, rnd_coord_t Y1, + rnd_coord_t X2, rnd_coord_t Y2, pcb_cardinal_t layergroup, void *parent, pcb_route_style_t * style) { routebox_t **rbpp; - pcb_coord_t keep = style->Clearance; + rnd_coord_t keep = style->Clearance; assert(layergroupboxes && parent); assert(X1 <= X2 && Y1 <= Y2); assert(0 <= layergroup && layergroup < pcb_max_group(PCB)); @@ -810,7 +810,7 @@ return PCB_R_DIR_NOT_FOUND; } -static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, pcb_coord_t X, pcb_coord_t Y, pcb_cardinal_t layergroup) +static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t layergroup) { struct rb_info info; info.winner = NULL; @@ -888,8 +888,8 @@ /* dice up non-straight lines into many tiny obstacles */ if (line->Point1.X != line->Point2.X && line->Point1.Y != line->Point2.Y) { pcb_line_t fake_line = *line; - pcb_coord_t dx = (line->Point2.X - line->Point1.X); - pcb_coord_t dy = (line->Point2.Y - line->Point1.Y); + rnd_coord_t dx = (line->Point2.X - line->Point1.X); + rnd_coord_t dy = (line->Point2.Y - line->Point1.Y); int segs = MAX(PCB_ABS(dx), PCB_ABS(dy)) / (4 * rd->max_bloat + 1); int qq; segs = PCB_CLAMP(segs, 1, 32); /* don't go too crazy */ @@ -951,8 +951,8 @@ /* dice up non-straight lines into many tiny obstacles */ if (line->Point1.X != line->Point2.X && line->Point1.Y != line->Point2.Y) { pcb_line_t fake_line = *line; - pcb_coord_t dx = (line->Point2.X - line->Point1.X); - pcb_coord_t dy = (line->Point2.Y - line->Point1.Y); + rnd_coord_t dx = (line->Point2.X - line->Point1.X); + rnd_coord_t dy = (line->Point2.Y - line->Point1.Y); int segs = MAX(PCB_ABS(dx), PCB_ABS(dy)) / (4 * BLOAT(rd->styles[j]) + 1); int qq; segs = PCB_CLAMP(segs, 1, 32); /* don't go too crazy */ @@ -1319,7 +1319,7 @@ } /* get to actual pins/pad target coordinates */ -pcb_bool TargetPoint(pcb_cheap_point_t * nextpoint, const routebox_t * target) +rnd_bool TargetPoint(pcb_cheap_point_t * nextpoint, const routebox_t * target) { /* if (target->type == PIN) { nextpoint->X = target->parent.pin->X; @@ -1358,7 +1358,7 @@ static pcb_box_t bloat_routebox(routebox_t * rb) { pcb_box_t r; - pcb_coord_t clearance; + rnd_coord_t clearance; assert(__routepcb_box_is_good(rb)); if (rb->flags.nobloat) @@ -1471,7 +1471,7 @@ return rb; } -static vector_t *path_conflicts(routebox_t * rb, routebox_t * conflictor, pcb_bool branch) +static vector_t *path_conflicts(routebox_t * rb, routebox_t * conflictor, rnd_bool branch) { if (branch) rb->conflicts_with = vector_duplicate(rb->conflicts_with); @@ -1593,7 +1593,7 @@ /* create edge from field values */ /* minpcb_cost_target_guess can be NULL */ static edge_t *CreateEdge(routebox_t * rb, - pcb_coord_t CostPointX, pcb_coord_t CostPointY, + rnd_coord_t CostPointX, rnd_coord_t CostPointY, pcb_cost_t pcb_cost_to_point, routebox_t * minpcb_cost_target_guess, pcb_direction_t expand_dir, pcb_rtree_t * targets) { edge_t *e; @@ -1809,7 +1809,7 @@ struct broken_boxes { pcb_box_t left, center, right; - pcb_bool is_valid_left, is_valid_center, is_valid_right; + rnd_bool is_valid_left, is_valid_center, is_valid_right; }; static struct broken_boxes break_box_edge(const pcb_box_t * original, pcb_direction_t which_edge, routebox_t * breaker) @@ -1868,7 +1868,7 @@ * the last expansion area created, we string these together in a loop * so we can remove them all easily at the end. */ static routebox_t *CreateExpansionArea(const pcb_box_t * area, pcb_cardinal_t group, - routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * src_edge) + routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * src_edge) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); memset((void *) rb, 0, sizeof(*rb)); @@ -1914,7 +1914,7 @@ struct E_result { routebox_t *parent; routebox_t *n, *e, *s, *w; - pcb_coord_t keep, bloat; + rnd_coord_t keep, bloat; pcb_box_t inflated, orig; int done; }; @@ -1930,7 +1930,7 @@ struct E_result *res = (struct E_result *) cl; routebox_t *rb = (routebox_t *) box; pcb_box_t rbox; - pcb_coord_t dn, de, ds, dw, bloat; + rnd_coord_t dn, de, ds, dw, bloat; /* we don't see conflicts already encountered */ if (rb->flags.touched) @@ -2024,9 +2024,9 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_bool boink_box(routebox_t * rb, struct E_result *res, pcb_direction_t dir) +static rnd_bool boink_box(routebox_t * rb, struct E_result *res, pcb_direction_t dir) { - pcb_coord_t bloat; + rnd_coord_t bloat; if (rb->style->Clearance > res->keep) bloat = res->keep - rb->style->Clearance; else @@ -2457,7 +2457,7 @@ routebox_t *parent; pcb_box_t box; pcb_direction_t dir; - pcb_bool ignore_source; + rnd_bool ignore_source; }; static pcb_r_dir_t __GatherBlockers(const pcb_box_t * box, void *cl) @@ -2484,7 +2484,7 @@ * i.e. if dir is SOUTH, then this means fixing up an EAST leftover * edge, which would be the southern most edge for that example. */ -static inline pcb_box_t previous_edge(pcb_coord_t last, pcb_direction_t i, const pcb_box_t * b) +static inline pcb_box_t previous_edge(rnd_coord_t last, pcb_direction_t i, const pcb_box_t * b) { pcb_box_t db = *b; switch (i) { @@ -2498,7 +2498,7 @@ db.X2 = last; break; default: - pcb_message(PCB_MSG_ERROR, "previous edge bogus direction!"); + rnd_message(PCB_MSG_ERROR, "previous edge bogus direction!"); assert(0); } return db; @@ -2514,8 +2514,8 @@ struct break_info bi; vector_t *edges; pcb_heap_t *heap[4]; - pcb_coord_t first, last; - pcb_coord_t bloat; + rnd_coord_t first, last; + rnd_coord_t bloat; pcb_direction_t dir; routebox_t fake; @@ -2883,7 +2883,7 @@ * Route-tracing code: once we've got a path of expansion boxes, trace * a line through them to actually create the connection. */ -static void RD_DrawThermal(routedata_t * rd, pcb_coord_t X, pcb_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, pcb_bool is_bad) +static void RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad) { routebox_t *rb; rb = (routebox_t *) malloc(sizeof(*rb)); @@ -2905,7 +2905,7 @@ rb->flags.homeless = 0; } -static void RD_DrawVia(routedata_t * rd, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t radius, routebox_t * subnet, pcb_bool is_bad) +static void RD_DrawVia(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t radius, routebox_t * subnet, rnd_bool is_bad) { routebox_t *rb, *first_via = NULL; int i; @@ -2961,8 +2961,8 @@ static void RD_DrawLine(routedata_t * rd, - pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, - pcb_coord_t Y2, pcb_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool is_45) + rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, + rnd_coord_t Y2, rnd_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool is_45) { /* we hold the line in a queue to concatenate segments that * ajoin one another. That reduces the number of things in @@ -2969,14 +2969,14 @@ * the trees and allows conflict boxes to be larger, both of * which are really useful. */ - static pcb_coord_t qX1 = -1, qY1, qX2, qY2; - static pcb_coord_t qhthick; + static rnd_coord_t qX1 = -1, qY1, qX2, qY2; + static rnd_coord_t qhthick; static pcb_cardinal_t qgroup; - static pcb_bool qis_45, qis_bad; + static rnd_bool qis_45, qis_bad; static routebox_t *qsn; routebox_t *rb; - pcb_coord_t ka = AutoRouteParameters.style->Clearance; + rnd_coord_t ka = AutoRouteParameters.style->Clearance; /* don't draw zero-length segments. */ if (X1 == X2 && Y1 == Y2) @@ -3068,11 +3068,11 @@ qsn = subnet; } -static pcb_bool +static rnd_bool RD_DrawManhattanLine(routedata_t * rd, const pcb_box_t * box1, const pcb_box_t * box2, pcb_cheap_point_t start, pcb_cheap_point_t end, - pcb_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool last_was_x) + rnd_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool last_was_x) { pcb_cheap_point_t knee = start; if (end.X == start.X) { @@ -3108,7 +3108,7 @@ } else { /* draw 45-degree path across knee */ - pcb_coord_t len45 = MIN(PCB_ABS(start.X - end.X), PCB_ABS(start.Y - end.Y)); + rnd_coord_t len45 = MIN(PCB_ABS(start.X - end.X), PCB_ABS(start.Y - end.Y)); pcb_cheap_point_t kneestart = knee, kneeend = knee; if (kneestart.X == start.X) kneestart.Y += (kneestart.Y > start.Y) ? -len45 : len45; @@ -3168,11 +3168,11 @@ * as they don't poke more than half thick outside the path box. */ -static void TracePath(routedata_t * rd, routebox_t * path, const routebox_t * target, routebox_t * subnet, pcb_bool is_bad) +static void TracePath(routedata_t * rd, routebox_t * path, const routebox_t * target, routebox_t * subnet, rnd_bool is_bad) { - pcb_bool last_x = pcb_false; - pcb_coord_t halfwidth = HALF_THICK(AutoRouteParameters.style->Thick); - pcb_coord_t radius = HALF_THICK(AutoRouteParameters.style->Diameter); + rnd_bool last_x = pcb_false; + rnd_coord_t halfwidth = HALF_THICK(AutoRouteParameters.style->Thick); + rnd_coord_t radius = HALF_THICK(AutoRouteParameters.style->Diameter); pcb_cheap_point_t lastpoint, nextpoint; routebox_t *lastpath; pcb_box_t b; @@ -3328,7 +3328,7 @@ /* create a fake "edge" used to defer via site searching. */ static void CreateSearchEdge(routeone_state_t *s, vetting_t * work, edge_t * parent, - routebox_t * rb, conflict_t conflict, pcb_rtree_t * targets, pcb_bool in_plane) + routebox_t * rb, conflict_t conflict, pcb_rtree_t * targets, rnd_bool in_plane) { routebox_t *target; pcb_box_t b; @@ -3408,9 +3408,9 @@ add_via_sites(routeone_state_t *s, struct routeone_via_site_state *vss, mtspace_t * mtspace, routebox_t * within, - conflict_t within_conflict_level, edge_t * parent_edge, pcb_rtree_t * targets, pcb_coord_t shrink, pcb_bool in_plane) + conflict_t within_conflict_level, edge_t * parent_edge, pcb_rtree_t * targets, rnd_coord_t shrink, rnd_bool in_plane) { - pcb_coord_t radius, clearance; + rnd_coord_t radius, clearance; vetting_t *work; pcb_box_t region = shrink_routebox(within); pcb_shrink_box(®ion, shrink); @@ -3437,7 +3437,7 @@ struct routeone_via_site_state *vss, mtspace_t * mtspace, pcb_rtree_t * targets) { int i, j, count = 0; - pcb_coord_t radius, clearance; + rnd_coord_t radius, clearance; vetting_t *work; routebox_t *within; conflict_t within_conflict_level; @@ -3519,7 +3519,7 @@ showboxen = save; } -static pcb_bool net_id(routebox_t * rb, long int id) +static rnd_bool net_id(routebox_t * rb, long int id) { routebox_t *p; LIST_LOOP(rb, same_net, p); @@ -3595,10 +3595,10 @@ } typedef struct routeone_status_s { - pcb_bool found_route; + rnd_bool found_route; int route_had_conflicts; pcb_cost_t best_route_cost; - pcb_bool net_completely_routed; + rnd_bool net_completely_routed; } routeone_status_t; @@ -4081,7 +4081,7 @@ return result; } -static void InitAutoRouteParameters(int pass, pcb_route_style_t * style, pcb_bool with_conflicts, pcb_bool is_smoothing, pcb_bool lastpass) +static void InitAutoRouteParameters(int pass, pcb_route_style_t * style, rnd_bool with_conflicts, rnd_bool is_smoothing, rnd_bool lastpass) { int i; /* routing style */ @@ -4120,7 +4120,7 @@ return PCB_R_DIR_NOT_FOUND; } -pcb_bool no_expansion_boxes(routedata_t * rd) +rnd_bool no_expansion_boxes(routedata_t * rd) { int i; pcb_box_t big; @@ -4188,7 +4188,7 @@ { struct routeall_status ras; routeone_status_t ros; - pcb_bool rip; + rnd_bool rip; int request_cancel; #ifdef NET_HEAP pcb_heap_t *net_heap; @@ -4263,7 +4263,7 @@ p->flags.is_bad = 0; if (!p->flags.fixed) { #ifndef NDEBUG - pcb_bool del; + rnd_bool del; #endif assert(!p->flags.homeless); if (rip) { @@ -4379,7 +4379,7 @@ if (request_cancel) { ras.total_nets_routed = 0; ras.conflict_subnets = 0; - pcb_message(PCB_MSG_INFO, "Autorouting cancelled\n"); + rnd_message(PCB_MSG_INFO, "Autorouting cancelled\n"); goto out; } } @@ -4431,7 +4431,7 @@ this_cost = 0; } - pcb_message(PCB_MSG_INFO, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); + rnd_message(PCB_MSG_INFO, "%d of %d nets successfully routed.\n", ras.routed_subnets, ras.total_subnets); out: pcb_heap_destroy(&this_pass); @@ -4448,7 +4448,7 @@ struct fpin_info { pcb_pstk_t *ps; - pcb_coord_t x, y; + rnd_coord_t x, y; jmp_buf env; }; @@ -4485,9 +4485,9 @@ /* paths go on first 'on' layer in group */ /* returns 'pcb_true' if any paths were added. */ -pcb_bool IronDownAllUnfixedPaths(routedata_t * rd) +rnd_bool IronDownAllUnfixedPaths(routedata_t * rd) { - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; pcb_layer_t *layer; routebox_t *net, *p; int i; @@ -4507,7 +4507,7 @@ assert(layer && layer->meta.real.vis); /*at least one layer must be on in this group! */ assert(p->type != EXPANSION_AREA); if (p->type == LINE) { - pcb_coord_t halfwidth = HALF_THICK(p->style->Thick); + rnd_coord_t halfwidth = HALF_THICK(p->style->Thick); double th = halfwidth * 2 + 1; pcb_box_t b; assert(p->parent.line == NULL); @@ -4521,7 +4521,7 @@ if (b.Y2 == b.Y1 + 1) b.Y2 = b.Y1; if (p->flags.bl_to_ur) { - pcb_coord_t t; + rnd_coord_t t; t = b.X1; b.X1 = b.X2; b.X2 = t; @@ -4538,7 +4538,7 @@ } else if (p->type == VIA || p->type == VIA_SHADOW) { routebox_t *pp = (p->type == VIA_SHADOW) ? p->parent.via_shadow : p; - pcb_coord_t radius = HALF_THICK(pp->style->Diameter); + rnd_coord_t radius = HALF_THICK(pp->style->Diameter); pcb_box_t b = shrink_routebox(p); total_via_count++; assert(pp->type == VIA); @@ -4593,9 +4593,9 @@ return changed; } -pcb_bool AutoRoute(pcb_bool selected) +rnd_bool AutoRoute(rnd_bool selected) { - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; routedata_t *rd; int i; @@ -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) { - pcb_message(PCB_MSG_ERROR, "You must define proper routing styles\n" "before auto-routing.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to initialize data; might be missing\n" "top or bottom copper layer.\n"); + rnd_message(PCB_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 */ - pcb_message(PCB_MSG_ERROR, "The rats nest is stale! Aborting autoroute...\n"); + rnd_message(PCB_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); - pcb_message(PCB_MSG_INFO, "Total added wire length = %$mS, %d vias added\n", (pcb_coord_t) total_wire_length, total_via_count); + rnd_message(PCB_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/autoroute/autoroute.h =================================================================== --- trunk/src_plugins/autoroute/autoroute.h (revision 30902) +++ trunk/src_plugins/autoroute/autoroute.h (revision 30903) @@ -41,6 +41,6 @@ #include "config.h" #include "board.h" -pcb_bool AutoRoute(pcb_bool); +rnd_bool AutoRoute(rnd_bool); #endif Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 30902) +++ trunk/src_plugins/autoroute/mtspace.c (revision 30903) @@ -58,7 +58,7 @@ typedef struct mtspacebox { const pcb_box_t box; - pcb_coord_t clearance; /* the smallest clearance around this box */ + rnd_coord_t clearance; /* the smallest clearance around this box */ } mtspacebox_t; /* this is an mtspace_t */ @@ -79,14 +79,14 @@ heap_or_vector no_fix; heap_or_vector no_hi; heap_or_vector hi_candidate; - pcb_coord_t radius; - pcb_coord_t clearance; + rnd_coord_t radius; + rnd_coord_t clearance; pcb_cheap_point_t desired; }; #define SPECIAL 823157 -mtspacebox_t *mtspace_create_box(const pcb_box_t * box, pcb_coord_t clearance) +mtspacebox_t *mtspace_create_box(const pcb_box_t * box, rnd_coord_t clearance) { mtspacebox_t *mtsb; assert(pcb_box_is_good(box)); @@ -127,7 +127,7 @@ } struct mts_info { - pcb_coord_t clearance; + rnd_coord_t clearance; pcb_box_t box; pcb_rtree_t *tree; jmp_buf env; @@ -161,7 +161,7 @@ } /* add a space-filler to the empty space representation. */ -void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, pcb_coord_t clearance) +void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { mtspacebox_t *filler = mtspace_create_box(box, clearance); pcb_r_insert_entry(which_tree(mtspace, which), (const pcb_box_t *) filler); @@ -168,7 +168,7 @@ } /* remove a space-filler from the empty space representation. */ -void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, pcb_coord_t clearance) +void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, rnd_coord_t clearance) { struct mts_info cl; pcb_box_t small_search; @@ -188,9 +188,9 @@ heap_or_vector checking; heap_or_vector touching; pcb_cheap_point_t *desired; - pcb_coord_t radius, clearance; + rnd_coord_t radius, clearance; jmp_buf env; - pcb_bool touch_is_vec; + rnd_bool touch_is_vec; }; static inline void heap_append(pcb_heap_t * heap, pcb_cheap_point_t * desired, pcb_box_t * newone) @@ -217,7 +217,7 @@ { struct query_closure *qc = (struct query_closure *) cl; mtspacebox_t *mtsb = (mtspacebox_t *) box; - pcb_coord_t shrink; + rnd_coord_t shrink; #ifndef NDEBUG { @@ -241,8 +241,8 @@ return PCB_R_DIR_NOT_FOUND; /* ok, we do touch this box, now create up to 4 boxes that don't */ if (mtsb->box.Y1 > qc->cbox->Y1 + shrink) { /* top region exists */ - pcb_coord_t Y1 = qc->cbox->Y1; - pcb_coord_t Y2 = mtsb->box.Y1 + shrink; + rnd_coord_t Y1 = qc->cbox->Y1; + rnd_coord_t Y2 = mtsb->box.Y1 + shrink; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->X1 = qc->cbox->X1; @@ -254,8 +254,8 @@ } } if (mtsb->box.Y2 < qc->cbox->Y2 - shrink) { /* bottom region exists */ - pcb_coord_t Y1 = mtsb->box.Y2 - shrink; - pcb_coord_t Y2 = qc->cbox->Y2; + rnd_coord_t Y1 = mtsb->box.Y2 - shrink; + rnd_coord_t Y2 = qc->cbox->Y2; if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->X1 = qc->cbox->X1; @@ -267,8 +267,8 @@ } } if (mtsb->box.X1 > qc->cbox->X1 + shrink) { /* left region exists */ - pcb_coord_t X1 = qc->cbox->X1; - pcb_coord_t X2 = mtsb->box.X1 + shrink; + rnd_coord_t X1 = qc->cbox->X1; + rnd_coord_t X2 = mtsb->box.X1 + shrink; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { pcb_box_t *newone; newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); @@ -281,8 +281,8 @@ } } if (mtsb->box.X2 < qc->cbox->X2 - shrink) { /* right region exists */ - pcb_coord_t X1 = mtsb->box.X2 - shrink; - pcb_coord_t X2 = qc->cbox->X2; + rnd_coord_t X1 = mtsb->box.X2 - shrink; + rnd_coord_t X2 = qc->cbox->X2; if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { pcb_box_t *newone = (pcb_box_t *) malloc(sizeof(pcb_box_t)); newone->Y1 = qc->cbox->Y1; @@ -313,7 +313,7 @@ * it returns pcb_true if it has exhausted the region vector/heap and never * found an empty area. */ -static void qloop(struct query_closure *qc, pcb_rtree_t * tree, heap_or_vector res, pcb_bool is_vec) +static void qloop(struct query_closure *qc, pcb_rtree_t * tree, heap_or_vector res, rnd_bool is_vec) { pcb_box_t *cbox; int n; @@ -388,11 +388,11 @@ * necessary. */ vetting_t *mtspace_query_rect(mtspace_t * mtspace, const pcb_box_t * region, - pcb_coord_t radius, pcb_coord_t clearance, + rnd_coord_t radius, rnd_coord_t clearance, vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, - vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, pcb_cheap_point_t * desired) + vector_t * hi_conflict_space_vec, rnd_bool is_odd, rnd_bool with_conflicts, pcb_cheap_point_t * desired) { struct query_closure qc; Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 30902) +++ trunk/src_plugins/autoroute/mtspace.h (revision 30903) @@ -60,20 +60,20 @@ * should *not* be bloated; it should be "true". The feature will fill * *at least* a radius of clearance around it; */ -void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, pcb_coord_t clearance); +void mtspace_add(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, rnd_coord_t clearance); /* remove a space-filler from the empty space representation. The given box * should *not* be bloated; it should be "true". The feature will fill * *at least* a radius of clearance around it; */ -void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, pcb_coord_t clearance); +void mtspace_remove(mtspace_t * mtspace, const pcb_box_t * box, mtspace_type_t which, rnd_coord_t clearance); vetting_t *mtspace_query_rect(mtspace_t * mtspace, const pcb_box_t * region, - pcb_coord_t radius, pcb_coord_t clearance, + rnd_coord_t radius, rnd_coord_t clearance, vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, - vector_t * hi_conflict_space_vec, pcb_bool is_odd, pcb_bool with_conflicts, pcb_cheap_point_t * desired); + vector_t * hi_conflict_space_vec, rnd_bool is_odd, rnd_bool with_conflicts, pcb_cheap_point_t * desired); void mtsFreeWork(vetting_t **); int mtsBoxCount(vetting_t *); Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 30902) +++ trunk/src_plugins/cam/cam.c (revision 30903) @@ -106,7 +106,7 @@ return cam_exec(ctx); } - pcb_message(PCB_MSG_ERROR, "cam: can not find job configuration '%s'\n", job); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "cam: invalid action option '%s'\n", opt); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "cam: need one more argument for '%s'\n", cmd); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "-x cam needs a job name\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "cam -o requires a key=value argument\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "CAM job %s failed\n", cam_export_job); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/cam/cam_compile.c (revision 30903) @@ -93,7 +93,7 @@ case PCB_CAM_WRITE: if (ctx->exporter == NULL) { - pcb_message(PCB_MSG_ERROR, "cam: no exporter selected before write\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "cam: exporter '%s' refused the arguments\n", code->op.write.arg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "cam: can not find export plugin: '%s'\n", arg); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "cam: syntax error (unknown instruction): '%s'\n", cmd); + rnd_message(PCB_MSG_ERROR, "cam: syntax error (unknown instruction): '%s'\n", cmd); return -1; } return 0; Index: trunk/src_plugins/ddraft/centgeo.c =================================================================== --- trunk/src_plugins/ddraft/centgeo.c (revision 30902) +++ trunk/src_plugins/ddraft/centgeo.c (revision 30903) @@ -117,7 +117,7 @@ return 0; } -void pcb_cline_offs(pcb_line_t *line, double offs, pcb_coord_t *dstx, pcb_coord_t *dsty) +void pcb_cline_offs(pcb_line_t *line, double offs, rnd_coord_t *dstx, rnd_coord_t *dsty) { double line_dx, line_dy; @@ -128,7 +128,7 @@ *dsty = pcb_round((double)line->Point1.Y + offs * line_dy); } -double pcb_cline_pt_offs(pcb_line_t *line, pcb_coord_t px, pcb_coord_t py) +double pcb_cline_pt_offs(pcb_line_t *line, rnd_coord_t px, rnd_coord_t py) { double line_dx, line_dy, pt_dx, pt_dy; @@ -141,7 +141,7 @@ return (line_dx * pt_dx + line_dy * pt_dy) / (line_dx*line_dx + line_dy*line_dy); } -static int line_ep(pcb_line_t *line, pcb_coord_t x, pcb_coord_t y) +static int line_ep(pcb_line_t *line, rnd_coord_t x, rnd_coord_t y) { if ((line->Point1.X == x) && (line->Point1.Y == y)) return 1; if ((line->Point2.X == x) && (line->Point2.Y == y)) return 1; @@ -173,7 +173,7 @@ static int intersect_cline_carc(pcb_line_t *Line, pcb_arc_t *Arc, pcb_box_t *ip, double offs[2], int oline) { double dx, dy, dx1, dy1, l, d, r, r2, Radius; - pcb_coord_t ex, ey, ix, iy; + rnd_coord_t ex, ey, ix, iy; int found = 0; dx = Line->Point2.X - Line->Point1.X; @@ -271,7 +271,7 @@ } -void pcb_carc_offs(pcb_arc_t *arc, double offs, pcb_coord_t *dstx, pcb_coord_t *dsty) +void pcb_carc_offs(pcb_arc_t *arc, double offs, rnd_coord_t *dstx, rnd_coord_t *dsty) { double ang = (arc->StartAngle + offs * arc->Delta) / PCB_RAD_TO_DEG; @@ -279,7 +279,7 @@ *dsty = arc->Y - sin(ang) * arc->Height; } -double pcb_carc_pt_offs(pcb_arc_t *arc, pcb_coord_t px, pcb_coord_t py) +double pcb_carc_pt_offs(pcb_arc_t *arc, rnd_coord_t px, rnd_coord_t py) { double dx, dy, ang, end; @@ -311,7 +311,7 @@ } -static void get_arc_ends(pcb_coord_t *box, pcb_arc_t *arc) +static void get_arc_ends(rnd_coord_t *box, pcb_arc_t *arc) { box[0] = arc->X - arc->Width * cos(PCB_M180 * arc->StartAngle); box[1] = arc->Y + arc->Height * sin(PCB_M180 * arc->StartAngle); @@ -347,8 +347,8 @@ int pcb_intersect_carc_carc(pcb_arc_t *Arc1, pcb_arc_t *Arc2, pcb_box_t *ip, double offs[2]) { double x, y, dx, dy, r1, r2, a, d, l, dl; - pcb_coord_t pdx, pdy; - pcb_coord_t box[8]; + rnd_coord_t pdx, pdy; + rnd_coord_t box[8]; int found = 0; /* try the end points first */ Index: trunk/src_plugins/ddraft/centgeo.h =================================================================== --- trunk/src_plugins/ddraft/centgeo.h (revision 30902) +++ trunk/src_plugins/ddraft/centgeo.h (revision 30903) @@ -30,12 +30,12 @@ /* Calculate the point on an object corresponding to a [0..1] offset and store the result in dstx;dsty. */ -void pcb_cline_offs(pcb_line_t *line, double offs, pcb_coord_t *dstx, pcb_coord_t *dsty); -void pcb_carc_offs(pcb_arc_t *arc, double offs, pcb_coord_t *dstx, pcb_coord_t *dsty); +void pcb_cline_offs(pcb_line_t *line, double offs, rnd_coord_t *dstx, rnd_coord_t *dsty); +void pcb_carc_offs(pcb_arc_t *arc, double offs, rnd_coord_t *dstx, rnd_coord_t *dsty); /* Project a point (px;py) onto an object and return the offset from point1 */ -double pcb_cline_pt_offs(pcb_line_t *line, pcb_coord_t px, pcb_coord_t py); -double pcb_carc_pt_offs(pcb_arc_t *arc, pcb_coord_t px, pcb_coord_t py); +double pcb_cline_pt_offs(pcb_line_t *line, rnd_coord_t px, rnd_coord_t py); +double pcb_carc_pt_offs(pcb_arc_t *arc, rnd_coord_t px, rnd_coord_t py); #endif Index: trunk/src_plugins/ddraft/cli.c =================================================================== --- trunk/src_plugins/ddraft/cli.c (revision 30902) +++ trunk/src_plugins/ddraft/cli.c (revision 30903) @@ -96,7 +96,7 @@ int begin, end; /* cursor pos */ int invalid; - pcb_coord_t x, y, dist; + rnd_coord_t x, y, dist; pcb_angle_t angle, offs; pcb_cardinal_t id; }; @@ -151,7 +151,7 @@ char tmp[128]; char *sep, *s = strchr(line, ' '), *next; /* skip the instruction */ int i; - pcb_bool succ; + rnd_bool succ; if (s == NULL) return 0; @@ -278,11 +278,11 @@ return from + inslen + extra; } -static int cli_apply_coord(cli_node_t *argv, int start, int end, pcb_coord_t *ox, pcb_coord_t *oy, int annot) +static int cli_apply_coord(cli_node_t *argv, int start, int end, rnd_coord_t *ox, rnd_coord_t *oy, int annot) { int n, relative = 0, have_angle = 0, have_dist = 0, len = (start > 1); double angle = 0, dist = 0, lx, ly, x = *ox, y = *oy; - pcb_coord_t tx, ty; + rnd_coord_t tx, ty; for(n = start; n < end; n++) { int moved = 0; @@ -355,13 +355,13 @@ break; case CLI_PERP: - pcb_message(PCB_MSG_ERROR, "perp not yet implemented\n"); + rnd_message(PCB_MSG_ERROR, "perp not yet implemented\n"); return -1; case CLI_PARAL: - pcb_message(PCB_MSG_ERROR, "paral not yet implemented\n"); + rnd_message(PCB_MSG_ERROR, "paral not yet implemented\n"); return -1; case CLI_TANGENT: - pcb_message(PCB_MSG_ERROR, "tangent not yet implemented\n"); + rnd_message(PCB_MSG_ERROR, "tangent not yet implemented\n"); return -1; case CLI_CENTER: @@ -425,7 +425,7 @@ if (moved) { if ((annot) && (len > 0)) { - pcb_coord_t *c = vtc0_alloc_append(&pcb_ddraft_attached.annot_lines, 4); + rnd_coord_t *c = vtc0_alloc_append(&pcb_ddraft_attached.annot_lines, 4); c[0] = pcb_round(lx); c[1] = pcb_round(ly); c[2] = pcb_round(x); @@ -550,7 +550,7 @@ opp = find_op(op, oplen); if (opp == NULL) { if (strcmp(cmd, "/edit") != 0) - pcb_message(PCB_MSG_ERROR, "ddraft: unknown operator '%s'\n", op); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/ddraft/cli_line.c (revision 30903) @@ -5,18 +5,18 @@ if (argv[n].type == CLI_FROM) n++; else if (argv[n].type == CLI_TO) { - pcb_message(PCB_MSG_ERROR, "Incremental line drawing is not yet supported\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid 'from' coord\n"); + rnd_message(PCB_MSG_ERROR, "Invalid 'from' coord\n"); return -1; } if (argv[n].type != CLI_TO) { if (verbose) - pcb_message(PCB_MSG_ERROR, "Missing 'to'\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid 'to' coord\n"); + rnd_message(PCB_MSG_ERROR, "Invalid 'to' coord\n"); return -1; } if (n != argc) { if (verbose) - pcb_message(PCB_MSG_ERROR, "Excess tokens after the to coord\n"); + rnd_message(PCB_MSG_ERROR, "Excess tokens after the to coord\n"); return -1; } return 0; @@ -79,7 +79,7 @@ return res; } -static int get_rel_coord(int argc, cli_node_t *argv, int argn, pcb_coord_t *ox, pcb_coord_t *oy) +static int get_rel_coord(int argc, cli_node_t *argv, int argn, rnd_coord_t *ox, rnd_coord_t *oy) { int nto, res; @@ -106,7 +106,7 @@ { int argn = cli_cursor_arg(argc, argv, cursor); int replace = 0, by, res; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; char buff[CLI_MAX_INS_LEN]; pcb_trace("line c: '%s':%d (argn=%d)\n", line, cursor, argn); @@ -148,7 +148,7 @@ case CLI_RELATIVE: res = get_rel_coord(argc, argv, argn, &ox, &oy); if (res < 0) { - pcb_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); return 0; } pcb_trace("rel from %$mm,%$mm", ox, oy); @@ -162,7 +162,7 @@ case CLI_ANGLE: res = get_rel_coord(argc, argv, argn, &ox, &oy); if (res < 0) { - pcb_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); + rnd_message(PCB_MSG_ERROR, "Failed to interpret coords already entered\n"); return 0; } replace=1; Index: trunk/src_plugins/ddraft/constraint.c =================================================================== --- trunk/src_plugins/ddraft/constraint.c (revision 30902) +++ trunk/src_plugins/ddraft/constraint.c (revision 30903) @@ -32,9 +32,9 @@ typedef struct { double line_angle[32], move_angle[32]; - pcb_coord_t line_length[32], move_length[32]; + rnd_coord_t line_length[32], move_length[32]; double line_angle_mod, move_angle_mod; - pcb_coord_t line_length_mod, move_length_mod; + rnd_coord_t line_length_mod, move_length_mod; int line_angle_len, line_length_len, move_angle_len, move_length_len; } ddraft_cnst_t; @@ -41,7 +41,7 @@ static ddraft_cnst_t cons; -static int find_best_angle(double *out_ang, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, double *angles, int anglen, double angle_mod) +static int find_best_angle(double *out_ang, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, double *angles, int anglen, double angle_mod) { double diff, ang, best_diff, target_ang; int n, best; @@ -78,7 +78,7 @@ return 0; } -static int find_best_length(double *out_len, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t *lengths, int lengthlen, pcb_coord_t length_mod) +static int find_best_length(double *out_len, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t *lengths, int lengthlen, rnd_coord_t length_mod) { double len, best_diff, diff, target_len; int n, best; Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 30902) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 30903) @@ -125,7 +125,7 @@ static void gui2cons(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { char *end, buff[1024]; - pcb_bool succ; + rnd_bool succ; g2c_array(line_angle, strtod(curr, &end)); g2c_scalar(line_angle_mod, dbl); Index: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 30902) +++ trunk/src_plugins/ddraft/ddraft.c (revision 30903) @@ -90,7 +90,7 @@ { pcb_objtype_t type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; long res = 0; switch(kwobj) { @@ -103,7 +103,7 @@ type = pcb_search_screen(x, y, CUT_TYPES, &ptr1, &ptr2, &ptr3); if (type == 0) { - pcb_message(PCB_MSG_ERROR, "Can't cut that object\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Invalid second argument\n"); + rnd_message(PCB_MSG_ERROR, "Invalid second argument\n"); return -1; } @@ -126,7 +126,7 @@ int kwcut = F_Object, kwobj = F_Object; pcb_objtype_t type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; vtp0_t edges; rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, trim_split, kwcut = fgw_keyword(&argv[1])); @@ -135,7 +135,7 @@ vtp0_init(&edges); if ((kwobj == kwcut) && (kwobj != F_Object)) { - pcb_message(PCB_MSG_ERROR, "Both cutting edge and objects to cut can't be '%s'\n", kwcut == F_Selected ? "selected" : "found"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid cutting edge object\n"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Invalid first argument\n"); + rnd_message(PCB_MSG_ERROR, "Invalid first argument\n"); goto err; } if (vtp0_len(&edges) < 1) { - pcb_message(PCB_MSG_ERROR, "No cutting edge found\n"); + rnd_message(PCB_MSG_ERROR, "No cutting edge found\n"); goto err; } @@ -253,7 +253,7 @@ do { \ int n; \ if (argc-2 >= sizeof(arr) / sizeof(arr[0])) { \ - pcb_message(PCB_MSG_ERROR, "constraint: Too many " msg "\n"); \ + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "constraint: invalid field '%s'\n", stype); + rnd_message(PCB_MSG_ERROR, "constraint: invalid field '%s'\n", stype); RND_ACT_IRES(-1); return 0; break; @@ -337,7 +337,7 @@ const char *actname = argv[0].val.func->name; pcb_objtype_t type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; double dx, dy; pcb_line_t *line; @@ -350,7 +350,7 @@ } if (type != PCB_OBJ_LINE) { - pcb_message(PCB_MSG_ERROR, "%s: target object must be a line\n", actname); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "%s: target line must be longer than 0\n", actname); + rnd_message(PCB_MSG_ERROR, "%s: target line must be longer than 0\n", actname); RND_ACT_IRES(-1); return 0; } @@ -382,7 +382,7 @@ { pcb_objtype_t type; void *ptr1, *ptr2, *ptr3; - pcb_coord_t x, y; + rnd_coord_t x, y; double d, r, base; pcb_route_object_t *line; pcb_arc_t *arc; @@ -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:; - pcb_message(PCB_MSG_ERROR, "tang: must be in line drawing mode with the first point already set\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tang: target object must be an arc\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tang: elliptical arcs are not supported (%$mm != %$mm)\n", arc->Height, arc->Width); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tang: line must start outside of the circle\n"); + rnd_message(PCB_MSG_ERROR, "tang: line must start outside of the circle\n"); RND_ACT_IRES(-1); return 0; } @@ -448,7 +448,7 @@ pcb_render->set_line_width(pcb_crosshair.GC, 1); pcb_render->set_color(pcb_crosshair.GC, pcb_color_grey33); for(n = 0; n < vtc0_len(&pcb_ddraft_attached.annot_lines); n += 4) { - pcb_coord_t *c = &pcb_ddraft_attached.annot_lines.array[n]; + rnd_coord_t *c = &pcb_ddraft_attached.annot_lines.array[n]; pcb_render->draw_line(pcb_crosshair.GC, c[0], c[1], c[2], c[3]); } Index: trunk/src_plugins/ddraft/trim.c =================================================================== --- trunk/src_plugins/ddraft/trim.c (revision 30902) +++ trunk/src_plugins/ddraft/trim.c (revision 30903) @@ -32,7 +32,7 @@ #define remo_is_valid(v) ((v) > REMO_INVALID) /* Move a line endpoint to a new absoltue coord in an undoable way */ -static void move_lp(pcb_line_t *line, int pt_idx, pcb_coord_t x, pcb_coord_t y) +static void move_lp(pcb_line_t *line, int pt_idx, rnd_coord_t x, rnd_coord_t y) { pcb_point_t *pt; @@ -59,12 +59,12 @@ mino = 1.0; \ } while(0) -static int pcb_trim_line(vtp0_t *cut_edges, pcb_line_t *line, double remo_in, pcb_coord_t rem_x, pcb_coord_t rem_y) +static int pcb_trim_line(vtp0_t *cut_edges, pcb_line_t *line, double remo_in, rnd_coord_t rem_x, rnd_coord_t rem_y) { int p, n; double io[2]; double mino = 0.0, maxo = 1.0, remo = remo_in; - pcb_coord_t x, y; + rnd_coord_t x, y; if (!remo_is_valid(remo)) remo = pcb_cline_pt_offs(line, rem_x, rem_y); @@ -158,7 +158,7 @@ } -static int pcb_trim_arc(vtp0_t *cut_edges, pcb_arc_t *arc, double remo_in, pcb_coord_t rem_x, pcb_coord_t rem_y) +static int pcb_trim_arc(vtp0_t *cut_edges, pcb_arc_t *arc, double remo_in, rnd_coord_t rem_x, rnd_coord_t rem_y) { int p, n; double io[2]; @@ -233,7 +233,7 @@ /* Split a line in two lines at a specific offset (undoable) */ static pcb_line_t *split_lp(pcb_line_t *line, double offs) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_line_t *new_line = pcb_line_dup(line->parent.layer, line); pcb_undo_add_obj_to_create(PCB_OBJ_LINE, new_line->parent.layer, new_line, new_line); @@ -265,7 +265,7 @@ return (v1 < 0.0001); } -static int pcb_split_line(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_line_t *line, double remo_in, pcb_coord_t rem_x, pcb_coord_t rem_y) +static int pcb_split_line(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_line_t *line, double remo_in, rnd_coord_t rem_x, rnd_coord_t rem_y) { int p, n, numsplt = 0, res; double io[2]; @@ -313,7 +313,7 @@ return numsplt; } -static int pcb_split_arc(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_arc_t *arc, double remo_in, pcb_coord_t rem_x, pcb_coord_t rem_y) +static int pcb_split_arc(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_arc_t *arc, double remo_in, rnd_coord_t rem_x, rnd_coord_t rem_y) { int p, n, numsplt = 0, res; double io[2]; @@ -361,7 +361,7 @@ return numsplt; } -int pcb_trim_split(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_any_obj_t *obj, double remo, pcb_coord_t rem_x, pcb_coord_t rem_y, int trim) +int pcb_trim_split(vtp0_t *cut_edges, vtp0_t *new_objs, pcb_any_obj_t *obj, double remo, rnd_coord_t rem_x, rnd_coord_t rem_y, int trim) { int res = 0; switch(obj->type) { Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 30902) +++ trunk/src_plugins/diag/diag.c (revision 30903) @@ -83,7 +83,7 @@ rnd_PCB_ACT_MAY_CONVARG(3, FGW_STR, DumpConf, prefix = argv[3].val.str); role = pcb_conf_role_parse(srole); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'\n", argv[1]); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'\n", argv[1]); RND_ACT_IRES(1); return 0; } @@ -123,7 +123,7 @@ nat = pcb_conf_get_field(path); if (nat == NULL) { - pcb_message(PCB_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); + rnd_message(PCB_MSG_ERROR, "EvalConf: invalid path %s - no such config setting\n", path); RND_ACT_IRES(-1); return 0; } @@ -303,7 +303,7 @@ ind++; for(o = pcb_data_first(&it, data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { const char *type = pcb_obj_type_name(o->type); - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; if ((what & DD_COPPER_ONLY) && (o->type == PCB_OBJ_SUBC)) goto skip; @@ -462,7 +462,7 @@ } PCB_END_LOOP; - pcb_message(PCB_MSG_INFO, "Measuring find.c peformance for %f seconds starting from %ld pins...\n", duration, pins); + rnd_message(PCB_MSG_INFO, "Measuring find.c peformance for %f seconds starting from %ld pins...\n", duration, pins); from = pcb_dtime(); end = from + duration; @@ -478,7 +478,7 @@ its++; now = pcb_dtime(); } while(now < end); - pcb_message(PCB_MSG_INFO, "find2.c peformance: %d %f pin find per second\n", its, (double)its * (double)pins / (now-from)); + rnd_message(PCB_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; } @@ -550,12 +550,12 @@ static const char pcb_acth_forcecolor[] = "change selected objects' color to #RRGGBB, reset if does not start with '#'"; static fgw_error_t pcb_act_forcecolor(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; const char *new_color; - pcb_message(PCB_MSG_ERROR, "pcb_acth_forcecolor() is temporarily disabled.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/diag/integrity.c (revision 30903) @@ -37,15 +37,15 @@ do { \ pcb_any_obj_t *__obj__ = (pcb_any_obj_t *)(obj); \ if (__obj__->type != exp_type) \ - pcb_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(PCB_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) \ - pcb_message(PCB_MSG_ERROR, CHK "%s " name " %ld parent type broken (%d != %d)\n", whose, obj->ID, 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); \ else if (obj->parent.any != prnt) \ - pcb_message(PCB_MSG_ERROR, CHK "%s " name " %ld parent type broken (%p != %p)\n", whose, obj->ID, 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); \ } 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) \ - pcb_message(PCB_MSG_ERROR, CHK "%s " name " %ld id hash broken (%p != %p)\n", whose, obj->ID, obj, __ao__); \ + rnd_message(PCB_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)) \ - pcb_message(PCB_MSG_ERROR, CHK "%s " name " %ld broken empty attribute list\n", whose, (obj)->ID); \ + rnd_message(PCB_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) \ - pcb_message(PCB_MSG_ERROR, CHK "%s " name " field ." #fld " value mismatch (" fmt " != " fmt ")\n", whose, obj->ID, (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); \ } 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 = pcb_attribute_get(&obj->Attributes, "intconn"); if (pcb_obj_id_invalid(aterm)) - pcb_message(PCB_MSG_ERROR, CHK "%s %ld has term attribute '%s' with invalid characters\n", whose, obj->ID, aterm); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, CHK "%s %ld has term attribute '%s' but no ->term set\n", whose, obj->ID, aterm); + rnd_message(PCB_MSG_ERROR, CHK "%s %ld has term attribute '%s' but no ->term set\n", whose, obj->ID, aterm); return; } if (aterm == NULL) { - pcb_message(PCB_MSG_ERROR, CHK "%s %ld has ->term '%s' but no attribute term set\n", whose, obj->ID, obj->term); + rnd_message(PCB_MSG_ERROR, CHK "%s %ld has ->term '%s' but no attribute term set\n", whose, obj->ID, obj->term); return; } if (aterm != obj->term) { - pcb_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(PCB_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) { - pcb_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(PCB_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 = pcb_attribute_get(&subc->Attributes, "refdes"); if (pcb_obj_id_invalid(arefdes)) - pcb_message(PCB_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' with invalid characters\n", subc->ID, arefdes); + rnd_message(PCB_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)) - pcb_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(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); if ((subc->BoundingBox.X1 > PCB->hidlib.size_x) || (subc->BoundingBox.Y1 > PCB->hidlib.size_y)) - pcb_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(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); if ((arefdes == NULL) && (subc->refdes == NULL)) return; if (subc->refdes == NULL) { - pcb_message(PCB_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' but no ->refdes set\n", subc->ID, arefdes); + rnd_message(PCB_MSG_ERROR, CHK "subc %ld has refdes attribute '%s' but no ->refdes set\n", subc->ID, arefdes); return; } if (arefdes == NULL) { - pcb_message(PCB_MSG_ERROR, CHK "subc %ld has ->refdes '%s' but no attribute refdes set\n", subc->ID, subc->refdes); + rnd_message(PCB_MSG_ERROR, CHK "subc %ld has ->refdes '%s' but no attribute refdes set\n", subc->ID, subc->refdes); return; } if (arefdes != subc->refdes) { - pcb_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(PCB_MSG_ERROR, CHK "subc %ld has mismatching pointer of ->refdes ('%s') and attribute refdes ('%s')\n", subc->ID, subc->refdes, arefdes); return; } } @@ -140,7 +140,7 @@ { int n; pcb_pstk_t *ps; - pcb_coord_t dummy; + rnd_coord_t dummy; double dummy2; chk_layers("subc", subc->data, PCB_PARENT_SUBC, subc, 0); @@ -147,11 +147,11 @@ chk_subc_cache(subc); if (pcb_subc_get_origin(subc, &dummy, &dummy) != 0) - pcb_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc origin\n", whose, subc->ID); + rnd_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc origin\n", whose, subc->ID); if (pcb_subc_get_rotation(subc, &dummy2) != 0) - pcb_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc rotation\n", whose, subc->ID); + rnd_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc rotation\n", whose, subc->ID); if (pcb_subc_get_side(subc, &dummy) != 0) - pcb_message(PCB_MSG_ERROR, CHK "%s %ld: can not determine subc side\n", whose, subc->ID); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, CHK "%ld subc layer %ld is not a bound layer\n", subc->ID, n); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, CHK "%s data: parent type broken (%d != %d)\n", whose, data->parent_type, pt); + rnd_message(PCB_MSG_ERROR, CHK "%s data: parent type broken (%d != %d)\n", whose, data->parent_type, pt); else if (data->parent.any != parent) - pcb_message(PCB_MSG_ERROR, CHK "%s data: parent broken (%p != %p)\n", whose, data->parent, parent); + rnd_message(PCB_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) - pcb_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(PCB_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'))) - pcb_message(PCB_MSG_ERROR, CHK "%s layer %ld has invalid name\n", whose, n); + rnd_message(PCB_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) - pcb_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(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); } else - pcb_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(PCB_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)) - pcb_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(PCB_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) - pcb_message(PCB_MSG_ERROR, CHK "id hash contains %ld excess IDs in %s\n", id_chk_cnt, whose); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_ERROR, CHK "layer group %ld/%s is a non-global boundary\n", n, grp->name); + rnd_message(PCB_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]) - pcb_message(PCB_MSG_ERROR, CHK "layer group %ld/%s has duplicate layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); + rnd_message(PCB_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) - pcb_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(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); } else - pcb_message(PCB_MSG_ERROR, CHK "layer group %ld/%s contains invalid layer entry: %ld\n", n, grp->name, (long)grp->lid[i]); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, CHK "undo\n"); + rnd_message(PCB_MSG_ERROR, CHK "undo\n"); } Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 30903) @@ -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); - pcb_message(PCB_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); + rnd_message(PCB_MSG_INFO, "Export done using exporter: %s\n", export_ctx->hid[h]->name); goto done; } } - pcb_message(PCB_MSG_ERROR, "Internal error: can not find which exporter to call\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not export: there are no export plugins available\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 30903) @@ -95,7 +95,7 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, FlagEdit, op = fgw_keyword(&argv[1])); if (op == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2, *ptr3; rnd_hid_get_coords("Click on object to change flags of", &x, &y, 0); type = pcb_search_screen(x, y, PCB_FLAGEDIT_TYPES | PCB_LOOSE_SUBC(PCB), &ptr1, &ptr2, &ptr3); @@ -107,7 +107,7 @@ RND_ACT_FAIL(FlagEdit); if ((ctx.obj_type != 0) && (PCB_FLAG_TEST(PCB_FLAG_LOCK, ctx.obj))) { - pcb_message(PCB_MSG_ERROR, "Can't edit the flags of a locked object, unlock first.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30903) @@ -88,7 +88,7 @@ } } -pcb_bool fontsel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +rnd_bool fontsel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { fontsel_ctx_t *ctx = prv->user_ctx; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Can not remove the default font.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "There is already an active fontedit dialog for that object,\nnot going to open a second dialog.\n"); + rnd_message(PCB_MSG_ERROR, "There is already an active fontedit dialog for that object,\nnot going to open a second dialog.\n"); return; } } @@ -212,7 +212,7 @@ if (op != NULL) { if (pcb_strcasecmp(op, "Object") == 0) { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; rnd_hid_get_coords("Select an Object", &x, &y, 0); Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30903) @@ -137,7 +137,7 @@ static void lb_data2dialog(void *hid_ctx, lb_ctx_t *ctx) { int n; - pcb_bool enable; + rnd_bool enable; for(n = 0; n < ctx->data->LayerN; n++) { lb_widx_t *w = ctx->widx + n; @@ -264,13 +264,13 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, LayerBinding, op = fgw_keyword(&argv[1])); if (op == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; int type; void *ptr1, *ptr2, *ptr3; 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) { - pcb_message(PCB_MSG_ERROR, "No subc under the cursor\n"); + rnd_message(PCB_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") - pcb_message(PCB_MSG_ERROR, "TODO\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30903) @@ -189,7 +189,7 @@ changed = 1; } else - pcb_message(PCB_MSG_ERROR, "Ignoring location - for this layer group type it is determined by the stackup\n"); + rnd_message(PCB_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_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30903) @@ -55,7 +55,7 @@ pcb_cardinal_t proto_id; pcb_cardinal_t *stat; /* temporary usage stat */ pcb_box_t drawbox; - pcb_bool modal; + rnd_bool modal; } pstk_lib_ctx_t; static pcb_cardinal_t pstklib_last_proto_id; /* set on close to preserve the id after free'ing the context; useful only for modal windows because of blocking calls */ @@ -156,7 +156,7 @@ pcb_pstk_t ps; char layers[pcb_proto_num_layers]; int n; - pcb_coord_t x1, y1, x2, y2, x, y, grid; + rnd_coord_t x1, y1, x2, y2, x, y, grid; if (data == NULL) { return; @@ -483,7 +483,7 @@ ctx->stat = NULL; } -pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, pcb_bool modal, const char *hint) +pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint) { static const char *hdr[] = {"ID", "name", "used", NULL}; pcb_subc_t *sc; @@ -572,7 +572,7 @@ PCB_DAD_COORD(ctx->dlg, ""); ctx->wgrid = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, PCB_MM_TO_COORD(0.01), PCB_MM_TO_COORD(10)); - PCB_DAD_DEFAULT_NUM(ctx->dlg, (pcb_coord_t)PCB_MM_TO_COORD(1)); + PCB_DAD_DEFAULT_NUM(ctx->dlg, (rnd_coord_t)PCB_MM_TO_COORD(1)); PCB_DAD_CHANGE_CB(ctx->dlg, pstklib_update_prv); PCB_DAD_LABEL(ctx->dlg, ""); @@ -633,7 +633,7 @@ const char *cmd = NULL; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, pstklib, cmd = argv[1].val.str); if ((cmd != NULL) && (strcmp(cmd, "object") == 0)) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *r1, *r2, *r3; pcb_subc_t *sc; int type; Index: trunk/src_plugins/dialogs/dlg_lib_pstk.h =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.h (revision 30902) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.h (revision 30903) @@ -2,7 +2,7 @@ is 0). If modal, returns the selected prototype or PCB_PADSTACK_INVALID when nothing is selected or the operation cancelled. In non-modal mode return 0 on success and PCB_PADSTACK_INVALID on error. */ -pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, pcb_bool modal, const char *hint); +pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint); extern const char pcb_acts_pstklib[]; extern const char pcb_acth_pstklib[]; Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30903) @@ -583,7 +583,7 @@ } if ((name == NULL) || (*name == '\0')) { - pcb_message(PCB_MSG_ERROR, "Filed to figure the name of the parametric footprint\n"); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "No such parametric footprint: '%s'\n", name); + rnd_message(PCB_MSG_ERROR, "No such parametric footprint: '%s'\n", name); free(name); } @@ -625,15 +625,15 @@ oname = pcb_strdup(l->name); /* need to save the name because refresh invalidates l */ if (pcb_fp_rehash(&PCB->hidlib, l) == 0) - pcb_message(PCB_MSG_INFO, "Refreshed library '%s'\n", oname); + rnd_message(PCB_MSG_INFO, "Refreshed library '%s'\n", oname); else - pcb_message(PCB_MSG_ERROR, "Failed to refresh library '%s'\n", oname); + rnd_message(PCB_MSG_ERROR, "Failed to refresh library '%s'\n", oname); free(oname); } -static pcb_bool library_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool library_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; } Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 30903) @@ -135,7 +135,7 @@ do { \ if (curr >= MAX_PARAMS) { \ if (curr == MAX_PARAMS) \ - pcb_message(PCB_MSG_ERROR, "too many parameters, displaying only the first %d\n", MAX_PARAMS); \ + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "More positional parameters than expected - ignoring %s", argv_in[n]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unknown parameter %s - ignoring value %s", key, val); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not execute parametric footprint %s\n", l->data.fp.loc_info); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30903) @@ -79,7 +79,7 @@ else if (pcb_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 { - pcb_message(PCB_MSG_ERROR, "Invalid subcommand for Load(): '%s'\n", function); + rnd_message(PCB_MSG_ERROR, "Invalid subcommand for Load(): '%s'\n", function); RND_ACT_IRES(1); return 0; } @@ -251,7 +251,7 @@ } } -static void save_on_close(pcb_hid_dad_subdialog_t *sub, pcb_bool ok) +static void save_on_close(pcb_hid_dad_subdialog_t *sub, rnd_bool ok) { save_t *save = sub->sub_ctx; int n, i; @@ -481,7 +481,7 @@ if (fmt < 0) { static int warned = 0; if (!warned) - pcb_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(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); warned = 1; } } @@ -494,7 +494,7 @@ name_in = pcb_concat("unnamed", avail.plug[fmt]->fp_extension, NULL); } else { - pcb_message(PCB_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Error: no IO plugin avaialble for saving a buffer."); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 30903) @@ -179,7 +179,7 @@ term++; obj = pcb_term_find_name(ctx->pcb, ctx->pcb->Data, PCB_LYT_COPPER, refdes, term, NULL, NULL); if (obj != NULL) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_obj_center(obj, &x, &y); pcb_event(&PCB->hidlib, PCB_EVENT_GUI_LEAD_USER, "cci", x, y, 1); } @@ -229,7 +229,7 @@ free(tmp); } else { - pcb_message(PCB_MSG_ERROR, "Internal error: netlist_button_cb() called from an invalid widget\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: netlist_button_cb() called from an invalid widget\n"); return; } pcb_gui->invalidate_all(pcb_gui); @@ -302,7 +302,7 @@ } } -static pcb_bool netlist_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool netlist_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; } Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 30903) @@ -143,7 +143,7 @@ if (shp_found[n] == 0) not_found++; if (not_found) - pcb_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(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); } /* proto - hole */ @@ -243,7 +243,7 @@ assert(pse->ps->parent_type == PCB_PARENT_DATA); if (proto == NULL) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't determine prototype\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find shape - clearance unchanged (a)\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find shape - clearance unchanged (b)\n"); + rnd_message(PCB_MSG_ERROR, "Can't find shape - clearance unchanged (b)\n"); return; } @@ -417,7 +417,7 @@ if (ts == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't derive shape: no shapes (empty padstack)\n"); + rnd_message(PCB_MSG_ERROR, "Can't derive shape: no shapes (empty padstack)\n"); return; } @@ -440,7 +440,7 @@ if (end > src_shape_names) end--; *end = 0; - pcb_message(PCB_MSG_ERROR, "Can't derive shape: source shapes (%s) are empty\n", src_shape_names); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't copy shape: no such source shape (empty padstack)\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); + rnd_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); return; } if (src_idx == dst_idx) { - pcb_message(PCB_MSG_ERROR, "Can't copy shape: source shape and destination shape are the same layer type\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't swap shape: no such shapes (empty padstack)\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't swap shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); + rnd_message(PCB_MSG_ERROR, "Can't swap shape: source shape (%s) is empty\n", pcb_proto_layers[from].name); return; } if (src_idx == dst_idx) { - pcb_message(PCB_MSG_ERROR, "Can't swap shape: source shape and destination shape are the same layer type\n"); + rnd_message(PCB_MSG_ERROR, "Can't swap shape: source shape and destination shape are the same layer type\n"); return; } @@ -520,19 +520,19 @@ } -static void pse_shape_bloat(void *hid_ctx, void *caller_data, pcb_coord_t sign) +static void pse_shape_bloat(void *hid_ctx, void *caller_data, rnd_coord_t sign) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); pcb_pstk_tshape_t *ts = &proto->tr.array[0]; int n, dst_idx = pcb_pstk_get_shape_idx(ts, pcb_proto_layers[pse->editing_shape].mask, pcb_proto_layers[pse->editing_shape].comb); - pcb_coord_t bloat = pse->shape_chg[pse->amount].val.crd; + rnd_coord_t bloat = pse->shape_chg[pse->amount].val.crd; if (bloat <= 0) return; if (dst_idx < 0) { - pcb_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[pse->editing_shape].name); + rnd_message(PCB_MSG_ERROR, "Can't copy shape: source shape (%s) is empty\n", pcb_proto_layers[pse->editing_shape].name); return; } @@ -643,12 +643,12 @@ } /* Auto gen shape on a single layer */ -static int pse_gen_shape(pcb_pstk_tshape_t *ts, pcb_layer_type_t lyt, int shape, pcb_coord_t size) +static int pse_gen_shape(pcb_pstk_tshape_t *ts, pcb_layer_type_t lyt, int shape, rnd_coord_t size) { int idx = ts->len; if (size <= 0) { - pcb_message(PCB_MSG_ERROR, "Invalid size - has to be larger than 0\n"); + rnd_message(PCB_MSG_ERROR, "Invalid size - has to be larger than 0\n"); return -1; } @@ -700,7 +700,7 @@ int shape = pse->attrs[pse->gen_shp].val.lng; int expose = pse->attrs[pse->gen_expose].val.lng; int paste = pse->attrs[pse->gen_paste].val.lng; - pcb_coord_t size = pse->attrs[pse->gen_size].val.crd; + rnd_coord_t size = pse->attrs[pse->gen_size].val.crd; pcb_layer_type_t lyt = sides_lyt[sides]; pcb_pstk_tshape_t *ts; pcb_cardinal_t pid; @@ -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) - pcb_message(PCB_MSG_ERROR, "Internal error: pse_gen() failed to raplace padstack prototype\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Internal error: pse_gen() failed to insert padstack prototype\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: pse_gen() failed to insert padstack prototype\n"); else pcb_pstk_change_instance(pse->ps, &pid, NULL, NULL, NULL, NULL); } @@ -1013,13 +1013,13 @@ RND_ACT_IRES(0); if (op == F_Object) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2 = NULL, *ptr3; long type; 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) { - pcb_message(PCB_MSG_ERROR, "Need a padstack.\n"); + rnd_message(PCB_MSG_ERROR, "Need a padstack.\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/dialogs/dlg_padstack.h =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.h (revision 30902) +++ trunk/src_plugins/dialogs/dlg_padstack.h (revision 30903) @@ -22,7 +22,7 @@ int proto_shape[pcb_proto_num_layers]; int proto_info[pcb_proto_num_layers]; int proto_change[pcb_proto_num_layers]; - pcb_coord_t proto_clr[pcb_proto_num_layers]; + rnd_coord_t proto_clr[pcb_proto_num_layers]; int prname, prsmirror; int hole_header; int hdia, hplated; Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 30903) @@ -105,7 +105,7 @@ return PCB_R_DIR_NOT_FOUND; } -static pcb_bool pinout_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool pinout_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { if (kind == PCB_HID_MOUSE_RELEASE) { pinout_ctx_t *ctx = prv->user_ctx; @@ -176,7 +176,7 @@ static fgw_error_t pcb_act_Pinout(fgw_arg_t *res, int argc, fgw_arg_t *argv) { void *r1, *r2, *r3; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_objtype_t type; rnd_hid_get_coords("Click on a subcircuit", &x, &y, 0); @@ -187,7 +187,7 @@ RND_ACT_IRES(0); } else { - pcb_message(PCB_MSG_ERROR, "pinout dialog: there's no subcircuit there\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 30903) @@ -74,7 +74,7 @@ case CFN_STRING: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, str, cn->val.string[0]); break; - default: pcb_message(PCB_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); + default: rnd_message(PCB_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); } } @@ -105,12 +105,12 @@ if (strcmp(cn->val.string[0], attr->val.str) != 0) pcb_conf_set(ctx->role, item->confpath, -1, attr->val.str, POL_OVERWRITE); break; - default: pcb_message(PCB_MSG_ERROR, "pcb_pref_dlg2conf_item(): widget type not handled\n"); + default: rnd_message(PCB_MSG_ERROR, "pcb_pref_dlg2conf_item(): widget type not handled\n"); } ctx->pcb_conf_lock = old; } -pcb_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr) +rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr) { pref_confitem_t *c; int wid = attr - ctx->dlg; @@ -130,7 +130,7 @@ conf_native_t *cn = pcb_conf_get_field(item->confpath); if (cn == NULL) { - pcb_message(PCB_MSG_ERROR, "Internal error: pcb_pref_create_conf_item(): invalid conf node %s\n", item->confpath); + rnd_message(PCB_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.h =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.h (revision 30902) +++ trunk/src_plugins/dialogs/dlg_pref.h (revision 30903) @@ -50,7 +50,7 @@ /* Set the config node from the current widget value of a conf item, or create whole list of them; the table version returns whether the item is found. */ void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, pcb_hid_attribute_t *attr); -pcb_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr); +rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr); /* Remove conf change binding - shall be called when widgets are removed (i.e. on dialog box close) */ Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30903) @@ -72,13 +72,13 @@ e = sorted[n]; if (strlen(e->key) > sizeof(path) - 1) { - pcb_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: path too long\n", e->key); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: invalid path (node in root)\n", e->key); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Warning: can't create config item for %s: invalid path\n", e->key); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Warning: can't show array item %s: path too long\n", row->path); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30903) @@ -108,11 +108,11 @@ } break; case CFN_HLIST: -/* pcb_message(PCB_MSG_ERROR, "ERROR: can not import hash lists on GUI\n");*/ +/* rnd_message(PCB_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 CFN_max: - pcb_message(PCB_MSG_ERROR, "ERROR: invalid conf node type\n"); + rnd_message(PCB_MSG_ERROR, "ERROR: invalid conf node type\n"); break; } } @@ -149,12 +149,12 @@ lht_node_t *nd = pcb_conf_lht_get_at(ctx->role, ctx->nat->hash_path, 0); if (nd == NULL) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't copy back to non-existing list!\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: can't copy back to non-existing list!\n"); return; } if (nd->type != LHT_LIST) { - pcb_message(PCB_MSG_ERROR, "Internal error: can't copy back list into non-list!\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "You need to select a conf leaf node to edit\nTry the tree on the left.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); + rnd_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); return; } if (pctx->conf.selected_idx >= pctx->conf.selected_nat->array_size) { - pcb_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); return; } if (pctx->conf.selected_nat->type == CFN_HLIST) { if (pctx->conf.selected_nat->gui_edit_act == NULL) { - pcb_message(PCB_MSG_ERROR, "ERROR: can not edit hash lists on GUI\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "You need to select a conf leaf node to remove\nTry the tree on the left.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); + rnd_message(PCB_MSG_ERROR, "You need to select a role (upper right list)\n"); return; } if (pctx->conf.selected_idx >= pctx->conf.selected_nat->array_size) { - pcb_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: array index out of bounds\n"); return; } if (rnd_conf_is_read_only(r->user_data2.lng)) { - pcb_message(PCB_MSG_ERROR, "Role is read-only, can not remove item\n"); + rnd_message(PCB_MSG_ERROR, "Role is read-only, can not remove item\n"); return; } Index: trunk/src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30903) @@ -39,7 +39,7 @@ pcb_stub_draw_csect(gc, e); } -pcb_bool layersel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +rnd_bool layersel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_stub_draw_csect_mouse_ev(kind, x, y); } Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30903) @@ -322,7 +322,7 @@ switch(pos) { case 0: /* replace */ - pcb_message(PCB_MSG_ERROR, "need to select a library path row first\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30903) @@ -109,7 +109,7 @@ return; if (pcb_wplc_save_to_file(fname) != 0) - pcb_message(PCB_MSG_ERROR, "Error saving window geometry to '%s'\n", fname); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30903) @@ -45,7 +45,7 @@ pcb_hid_t *printer = pcb_hid_find_printer(); if (printer == NULL) { - pcb_message(PCB_MSG_ERROR, "No printer available\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_search.c (revision 30903) @@ -275,7 +275,7 @@ return; } } - pcb_message(PCB_MSG_ERROR, "Too many expressions in the row, can not add more\n"); + rnd_message(PCB_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; } } - pcb_message(PCB_MSG_ERROR, "Too many expression rows, can not add more\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/dialogs/dlg_test.c (revision 30903) @@ -64,7 +64,7 @@ static void cb_text_ro(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); static void prv_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); -static pcb_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y); +static rnd_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); static const char * test_xpm[] = { "8 8 4 1", @@ -277,7 +277,7 @@ PCB_DAD_AUTORUN("dlg_test", ctx.dlg, "attribute dialog test", &ctx, failed); if (failed != 0) - pcb_message(PCB_MSG_WARNING, "Test dialog cancelled"); + rnd_message(PCB_MSG_WARNING, "Test dialog cancelled"); PCB_DAD_FREE(ctx.dlg); @@ -288,7 +288,7 @@ static void pcb_act_attr_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { static pcb_hid_attr_val_t val; - static pcb_bool st; + static rnd_bool st; printf("Chg\n"); st = !st; @@ -517,7 +517,7 @@ } -static pcb_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { pcb_printf("Mouse %d %mm %mm\n", kind, x, y); return (kind == PCB_HID_MOUSE_PRESS) || (kind == PCB_HID_MOUSE_RELEASE); Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 30902) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 30903) @@ -256,7 +256,7 @@ } -static pcb_bool view_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool view_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; /* don't redraw */ } @@ -447,7 +447,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "w"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't open %s for write\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); + rnd_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); return; } load_ctx = pcb_view_load_start_file(f); if (load_ctx == NULL) { - pcb_message(PCB_MSG_ERROR, "Error parsing %s - is it a view list?\n", fn); + rnd_message(PCB_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))) { - pcb_message(PCB_MSG_ERROR, "invalid list pointer"); + rnd_message(PCB_MSG_ERROR, "invalid list pointer"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 30902) +++ trunk/src_plugins/distalign/distalign.c (revision 30903) @@ -87,10 +87,10 @@ /* this macro produces a function in X or Y that switches on 'point' */ #define COORD(DIR) \ -static inline pcb_coord_t \ +static inline rnd_coord_t \ coord ## DIR(pcb_any_obj_t *obj, int point) \ { \ - pcb_coord_t oX, oY; \ + rnd_coord_t oX, oY; \ switch (point) { \ case K_Marks: \ oX = oY = 0; \ @@ -116,7 +116,7 @@ COORD(Y) /* return the object coordinate associated with the given internal point */ -static pcb_coord_t coord(pcb_any_obj_t *obj, int dir, int point) +static rnd_coord_t coord(pcb_any_obj_t *obj, int dir, int point) { if (dir == K_X) return coordX(obj, point); @@ -126,8 +126,8 @@ static struct obj_by_pos { pcb_any_obj_t *obj; - pcb_coord_t pos; - pcb_coord_t width; + rnd_coord_t pos; + rnd_coord_t width; } *objs_by_pos; static int nobjs_by_pos; @@ -203,9 +203,9 @@ } /* Find the reference coordinate from the specified points of all selected objects. */ -static pcb_coord_t reference_coord(int op, int x, int y, int dir, int point, int reference) +static rnd_coord_t reference_coord(int op, int x, int y, int dir, int point, int reference) { - pcb_coord_t q; + rnd_coord_t q; int nsel; pcb_data_it_t it; pcb_any_obj_t *obj; @@ -258,7 +258,7 @@ int point; int reference; int gridless; - pcb_coord_t q; + rnd_coord_t q; int changed = 0; pcb_data_it_t it; pcb_any_obj_t *obj; @@ -332,7 +332,7 @@ /* move all selected objects to the new coordinate */ for(obj = pcb_data_first(&it, PCB->Data, PCB_OBJ_CLASS_REAL); obj != NULL; obj = pcb_data_next(&it)) { - pcb_coord_t p, dp, dx, dy; + rnd_coord_t p, dp, dx, dy; if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, obj)) continue; @@ -375,7 +375,7 @@ int point; int refa, refb; int gridless; - pcb_coord_t s, e, slack; + rnd_coord_t s, e, slack; int divisor; int changed = 0; int i; @@ -474,7 +474,7 @@ /* even the gaps instead of the edges or whatnot */ /* find the "slack" in the row */ if (point == K_Gaps) { - pcb_coord_t w; + rnd_coord_t w; /* subtract all the "widths" from the slack */ for (i = 0; i < nobjs_by_pos; ++i) { @@ -493,7 +493,7 @@ /* move all selected objects to the new coordinate */ for (i = 0; i < nobjs_by_pos; ++i) { pcb_any_obj_t *obj = objs_by_pos[i].obj; - pcb_coord_t p, q, dp, dx, dy; + rnd_coord_t p, q, dp, dx, dy; /* find reference point for this object */ q = s + slack * i / divisor; Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 30902) +++ trunk/src_plugins/djopt/djopt.c (revision 30903) @@ -236,7 +236,7 @@ #define SWAP(a,b) { a^=b; b^=a; a^=b; } -static int gridsnap(pcb_coord_t n) +static int gridsnap(rnd_coord_t n) { if (n <= 0) return 0; @@ -2219,7 +2219,7 @@ got_one = 0; for (c2 = corners; c2; c2 = c2->next) { int lt; - pcb_coord_t thick; + rnd_coord_t thick; if (DELETED(c2)) continue; @@ -2328,8 +2328,8 @@ static int pstk_orient(pcb_pstk_t *p) { - pcb_coord_t dx = p->BoundingBox.X2 - p->BoundingBox.X1; - pcb_coord_t dy = p->BoundingBox.Y2 - p->BoundingBox.Y1; + rnd_coord_t dx = p->BoundingBox.X2 - p->BoundingBox.X1; + rnd_coord_t dy = p->BoundingBox.Y2 - p->BoundingBox.Y1; if (dx < dy * 3) return O_VERT; if (dx > dy * 3) Index: trunk/src_plugins/djopt/djopt.h =================================================================== --- trunk/src_plugins/djopt/djopt.h (revision 30902) +++ trunk/src_plugins/djopt/djopt.h (revision 30903) @@ -36,6 +36,6 @@ #include "config.h" -fgw_error_t pcb_act_DJopt(int, char **, pcb_coord_t, pcb_coord_t); -int djopt_set_auto_only(int, char **, pcb_coord_t, pcb_coord_t); +fgw_error_t pcb_act_DJopt(int, char **, rnd_coord_t, rnd_coord_t); +int djopt_set_auto_only(int, char **, rnd_coord_t, rnd_coord_t); #endif Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 30902) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 30903) @@ -88,7 +88,7 @@ } /* Draw a text at x;y sized scale percentage */ -static pcb_text_t *dtext_(pcb_coord_t x, pcb_coord_t y, int scale, int dir, const char *txt, pcb_coord_t th) +static pcb_text_t *dtext_(rnd_coord_t x, rnd_coord_t y, int scale, int dir, const char *txt, rnd_coord_t th) { static pcb_text_t t; @@ -147,7 +147,7 @@ } /* draw a line of a specific thickness */ -static void dline_(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, float thick) +static void dline_(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, float thick) { pcb_line_t l; memset(&l, 0, sizeof(l)); @@ -253,7 +253,7 @@ static char group_valid[PCB_MAX_LAYERGRP]; static char outline_valid; -static void reg_layer_coords(pcb_layer_id_t lid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void reg_layer_coords(pcb_layer_id_t lid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { if ((lid < 0) || (lid >= PCB_MAX_LAYER)) return; @@ -264,7 +264,7 @@ layer_valid[lid] = 1; } -static void reg_group_coords(pcb_layergrp_id_t gid, pcb_coord_t y1, pcb_coord_t y2) +static void reg_group_coords(pcb_layergrp_id_t gid, rnd_coord_t y1, rnd_coord_t y2) { if ((gid < 0) || (gid >= PCB_MAX_LAYER)) return; @@ -273,7 +273,7 @@ group_valid[gid] = 1; } -static void reg_outline_coords(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void reg_outline_coords(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { outline_crd.X1 = x1; outline_crd.Y1 = y1; @@ -289,7 +289,7 @@ outline_valid = 0; } -static pcb_layer_id_t get_layer_coords(pcb_coord_t x, pcb_coord_t y) +static pcb_layer_id_t get_layer_coords(rnd_coord_t x, rnd_coord_t y) { pcb_layer_id_t n; @@ -302,7 +302,7 @@ return -1; } -static pcb_layergrp_id_t get_group_coords(pcb_coord_t y, pcb_coord_t *y1, pcb_coord_t *y2) +static pcb_layergrp_id_t get_group_coords(rnd_coord_t y, rnd_coord_t *y1, rnd_coord_t *y2) { pcb_layergrp_id_t n; @@ -317,7 +317,7 @@ return -1; } -static pcb_coord_t create_button(pcb_hid_gc_t gc, int x, int y, const char *label, pcb_box_t *box) +static rnd_coord_t create_button(pcb_hid_gc_t gc, int x, int y, const char *label, pcb_box_t *box) { pcb_text_t *t; t = dtext_bg(gc, x, y, 200, 0, label, &COLOR_BG, &COLOR_ANNOT); @@ -337,7 +337,7 @@ static pcb_hid_gc_t csect_gc; -static pcb_coord_t ox, oy, cx, cy; +static rnd_coord_t ox, oy, cx, cy; static int drag_addgrp, drag_delgrp, drag_addlayer, drag_dellayer, drag_addoutline; static pcb_layergrp_id_t gactive = -1; static pcb_layergrp_id_t outline_gactive = -1; @@ -353,9 +353,9 @@ MARK_GRP_TOP } mark_grp_loc_t; -static void mark_grp(pcb_coord_t y, unsigned int accept_mask, mark_grp_loc_t loc) +static void mark_grp(rnd_coord_t y, unsigned int accept_mask, mark_grp_loc_t loc) { - pcb_coord_t y1, y2, x0 = -PCB_MM_TO_COORD(5); + rnd_coord_t y1, y2, x0 = -PCB_MM_TO_COORD(5); pcb_layergrp_id_t g; g = get_group_coords(y, &y1, &y2); @@ -379,7 +379,7 @@ gactive = -1; } -static void mark_outline_grp(pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid) +static void mark_outline_grp(rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) { if (outline_valid && (outline_crd.X1 <= x) && (outline_crd.Y1 <= y) && @@ -390,7 +390,7 @@ outline_gactive = -1; } -static void mark_layer(pcb_coord_t x, pcb_coord_t y) +static void mark_layer(rnd_coord_t x, rnd_coord_t y) { lactive = get_layer_coords(x, y); if (lactive >= 0) { @@ -402,10 +402,10 @@ } } -static void mark_layer_order(pcb_coord_t x) +static void mark_layer_order(rnd_coord_t x) { pcb_layergrp_t *g; - pcb_coord_t tx, ty1, ty2; + rnd_coord_t tx, ty1, ty2; lactive_idx = -1; if ((gactive < 0) || (PCB->LayerGroups.grp[gactive].len < 1)) @@ -630,12 +630,12 @@ grp = pcb_get_layergrp(PCB, pcb_layer_get_group(PCB, lid)); if (grp == NULL) { - pcb_message(PCB_MSG_ERROR, "Invalid source group.\n"); + rnd_message(PCB_MSG_ERROR, "Invalid source group.\n"); return -1; } if ((tflg & PCB_LYT_SILK) && (grp->len == 1)) { - pcb_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(PCB_MSG_ERROR, "Can not remove the last layer of this group because this group must have at least one layer.\n"); return -1; } @@ -676,9 +676,9 @@ } -static pcb_bool mouse_csect(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool mouse_csect(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { - pcb_bool res = 0; + rnd_bool res = 0; pcb_layer_id_t lid; switch(kind) { @@ -722,7 +722,7 @@ } if ((x > 0) && (x < PCB_MM_TO_COORD(GROUP_WIDTH_MM))) { - pcb_coord_t tmp; + rnd_coord_t tmp; pcb_layergrp_id_t gid; gid = get_group_coords(y, &tmp, &tmp); if ((gid >= 0) && (pcb_layergrp_flags(PCB, gid) & PCB_LYT_COPPER) && (pcb_layergrp_flags(PCB, gid) & PCB_LYT_INTERN)) { @@ -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); - pcb_message(PCB_MSG_INFO, "moved layer %s to group %d\n", l->name, gactive); + rnd_message(PCB_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); - pcb_message(PCB_MSG_INFO, "moved layer %s to group %d\n", l->name, outline_gactive); + rnd_message(PCB_MSG_INFO, "moved layer %s to group %d\n", l->name, outline_gactive); } else - pcb_message(PCB_MSG_ERROR, "Can not move layer into that layer group\n"); + rnd_message(PCB_MSG_ERROR, "Can not move layer into that layer group\n"); res = 1; drag_lid = -1; gactive = -1; @@ -879,7 +879,7 @@ rnd_actionva(&PCB->hidlib, "Popup", "layer", NULL); } else if ((x > 0) && (x < PCB_MM_TO_COORD(GROUP_WIDTH_MM))) { - pcb_coord_t tmp; + rnd_coord_t tmp; pcb_actd_EditGroup_gid = get_group_coords(y, &tmp, &tmp); if (pcb_actd_EditGroup_gid >= 0) rnd_actionva(&PCB->hidlib, "Popup", "group", NULL); Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 30902) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 30903) @@ -238,7 +238,7 @@ pcb_render->set_color(gc, &conf_core.appearance.color.pin); for (i = 0; i < drill->PinN; i++) { int unplated = 1; - pcb_coord_t x, y; + rnd_coord_t x, y; assert(drill->hole[i]->type == PCB_OBJ_PSTK); { pcb_pstk_t *ps = (pcb_pstk_t *)drill->hole[i]; Index: trunk/src_plugins/draw_fontsel/draw_fontsel.c =================================================================== --- trunk/src_plugins/draw_fontsel/draw_fontsel.c (revision 30902) +++ trunk/src_plugins/draw_fontsel/draw_fontsel.c (revision 30903) @@ -160,7 +160,7 @@ return -1; } -static pcb_bool pcb_mouse_fontsel(pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y, pcb_text_t *txt) +static rnd_bool pcb_mouse_fontsel(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt) { pcb_font_id_t fid; int ymm; Index: trunk/src_plugins/drc_orig/drc_orig.c =================================================================== --- trunk/src_plugins/drc_orig/drc_orig.c (revision 30902) +++ trunk/src_plugins/drc_orig/drc_orig.c (revision 30903) @@ -88,7 +88,7 @@ } break; default: - pcb_message(PCB_MSG_ERROR, "hace: Bad Plow object in callback\n"); + rnd_message(PCB_MSG_ERROR, "hace: Bad Plow object in callback\n"); } return PCB_R_DIR_NOT_FOUND; @@ -103,7 +103,7 @@ return PCB_R_DIR_NOT_FOUND; } -static int drc_text(pcb_view_list_t *lst, pcb_layer_t *layer, pcb_text_t *text, pcb_coord_t min_wid) +static int drc_text(pcb_view_list_t *lst, pcb_layer_t *layer, pcb_text_t *text, rnd_coord_t min_wid) { pcb_view_t *violation; @@ -254,7 +254,7 @@ PCB_PADSTACK_LOOP(PCB->Data); { - pcb_coord_t ring = 0, hole = 0; + rnd_coord_t ring = 0, hole = 0; pcb_poly_plows(PCB->Data, PCB_OBJ_PSTK, padstack, padstack, drc_callback, lst); pcb_pstk_drc_check_and_warn(padstack, &ring, &hole, conf_core.design.min_ring, conf_core.design.min_drill); if ((ring > 0) || (hole > 0)) { @@ -306,7 +306,7 @@ for(o = pcb_data_first(&it, data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { const char *message = NULL; - pcb_coord_t measured, required; + rnd_coord_t measured, required; if (o->BoundingBox.X1 > PCB->hidlib.size_x) { message = "Beyond the drawing area, to the right"; Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 30902) +++ trunk/src_plugins/drc_query/dlg.c (revision 30903) @@ -96,7 +96,7 @@ txt->hid_set_text(atxt, ctx->dlg_hid_ctx, PCB_HID_TEXT_REPLACE, textval(nd, "query")); } else { - pcb_message(PCB_MSG_ERROR, "Rule %s disappeared from the config tree.\n", ctx->rule); + rnd_message(PCB_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)) { \ - pcb_message(PCB_MSG_ERROR, "Internal error: invalid existing node type for %s: %d, rule is NOT saved\n", nname, nnew->type); \ + rnd_message(PCB_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: \ - pcb_message(PCB_MSG_ERROR, "Internal error: invalid parent node type for %s: %d, rule is NOT saved\n", parent->name, parent->type); \ + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "Internal error: new text node for %s is NULL, rule is NOT saved\n", nname); \ + rnd_message(PCB_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]))) { - pcb_message(PCB_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: role out of range, rule is NOT saved\n"); return; } @@ -187,7 +187,7 @@ if (nd == NULL) { nd = pcb_conf_lht_get_first(role, 1); if (nd == NULL) { - pcb_message(PCB_MSG_ERROR, "Internal error: failed to create role root, rule is NOT saved\n"); + rnd_message(PCB_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); } - pcb_message(PCB_MSG_WARNING, "NOTE: Copying ALL drc rule to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(PCB_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); - pcb_message(PCB_MSG_INFO, "NOTE: Copying drc rule '%s' to config role %s\n", ctx->rule, save_roles[ri]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "An edit dialog for rule %s is already open.\n", rule); + rnd_message(PCB_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 = pcb_conf_lht_get_at_mainplug(role, path, 1, 0); if (nd == NULL) { - pcb_message(PCB_MSG_ERROR, "Rule %s not found on this role.\n", rule); + rnd_message(PCB_MSG_ERROR, "Rule %s not found on this role.\n", rule); return -1; } @@ -431,13 +431,13 @@ int *dis; if (row == NULL) { - pcb_message(PCB_MSG_ERROR, "Select a rule first!\n"); + rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); return; } dis = drc_get_disable(row->cell[0]); if (dis == NULL) { - pcb_message(PCB_MSG_ERROR, "internal error: no disable conf node for %s\n", row->cell[0]); + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "Select a rule first!\n"); \ + rnd_message(PCB_MSG_ERROR, "Select a rule first!\n"); \ return; \ } \ role = pcb_conf_role_parse(row->cell[1]); \ if (role == CFR_invalid) { \ - pcb_message(PCB_MSG_ERROR, "internal error: invalid role %s\n", row->cell[0]); \ + rnd_message(PCB_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 = pcb_conf_lht_get_at_mainplug(role, path, 1, 0); \ if (nd == NULL) { \ - pcb_message(PCB_MSG_ERROR, "internal error: rule not found at %s\n", path); \ + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not run rule %s: no query specified\n", row->cell[0]); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/drc_query/drc_query.c (revision 30903) @@ -77,7 +77,7 @@ long hit_cnt; } drc_qry_ctx_t; -pcb_coord_t load_obj_const(pcb_obj_qry_const_t *cnst) +rnd_coord_t load_obj_const(pcb_obj_qry_const_t *cnst) { switch(cnst->val.type) { case PCBQ_VT_COORD: return cnst->val.data.crd; @@ -114,7 +114,7 @@ violation = pcb_view_new(&qctx->pcb->hidlib, qctx->type, qctx->title, qctx->desc); if (res->type == PCBQ_VT_LST) { int i; - pcb_coord_t *expv = NULL, expv_, *mesv = NULL, mesv_; + rnd_coord_t *expv = NULL, expv_, *mesv = NULL, mesv_; for(i = 0; i < res->data.lst.used-1; i+=2) { pcb_any_obj_t *cmd = res->data.lst.array[i], *obj = res->data.lst.array[i+1]; pcb_qry_drc_ctrl_t ctrl = pcb_qry_drc_ctrl_decode(cmd); @@ -149,7 +149,7 @@ double ts, te; if (query == NULL) { - pcb_message(PCB_MSG_ERROR, "drc_query: igoring rule with no query string:%s\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "drc_query: igoring non-text node %s of rule %s \n", name, i->name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); + rnd_message(PCB_MSG_ERROR, "drc_query: rule %s is not a hash\n", i->name); continue; } @@ -272,7 +272,7 @@ nat = pcb_conf_reg_field_(b, 1, CFN_BOOLEAN, path, pcb_strdup(sdesc), 0); if (nat == NULL) { free(b); - pcb_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); goto fail; } @@ -288,11 +288,11 @@ else if (nat_defs == cfg) { lht_node_t *nd = i->prop.src; char *path = pcb_concat(DRC_CONF_PATH_CONST, nd->name, NULL); - pcb_coord_t *c; + rnd_coord_t *c; if (pcb_conf_get_field(path) == NULL) { union { - pcb_coord_t c; + rnd_coord_t c; double d; void *ptr; char *str; @@ -311,13 +311,13 @@ if (stype == NULL) { - pcb_message(PCB_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); + rnd_message(PCB_MSG_ERROR, "drc_query: missing type field for constant %s\n", nd->name); goto fail; } type = pcb_conf_native_type_parse(stype); if (type >= CFN_LIST) { - pcb_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); + rnd_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); goto fail; } @@ -325,7 +325,7 @@ nat = pcb_conf_reg_field_(c, 1, type, path, pcb_strdup(sdesc), 0); if (nat == NULL) { free(c); - pcb_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/expfeat/expfeat.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_INFO, "Hello world from expfeat!\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_bom/bom.c (revision 30903) @@ -200,7 +200,7 @@ fp = pcb_fopen_askovr(&PCB->hidlib, bom_filename, "w", NULL); if (!fp) { - pcb_message(PCB_MSG_ERROR, "Cannot open file %s for writing\n", bom_filename); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30903) @@ -71,10 +71,10 @@ #define GRP_NAME(grp_) ((grp_) - PCB->LayerGroups.grp), ((grp_)->name) -static pcb_coord_t trackwidth = 8; /* user options defined in export dialog */ -static pcb_coord_t clearance = 8; -static pcb_coord_t viawidth = 45; -static pcb_coord_t viadrill = 25; +static rnd_coord_t trackwidth = 8; /* user options defined in export dialog */ +static rnd_coord_t clearance = 8; +static rnd_coord_t viawidth = 45; +static rnd_coord_t viadrill = 25; static pcb_hid_t dsn_hid; @@ -173,7 +173,7 @@ PCB_SUBC_LOOP(PCB->Data); { char *ename; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; char *side; int res; int subc_on_solder = 0; @@ -206,7 +206,7 @@ fprintf(fp, " )\n"); } -static void print_polyshape(gds_t *term_shapes, pcb_pstk_poly_t *ply, pcb_coord_t ox, pcb_coord_t oy, pcb_layergrp_t *grp, int partsidesign) +static void print_polyshape(gds_t *term_shapes, pcb_pstk_poly_t *ply, rnd_coord_t ox, rnd_coord_t oy, pcb_layergrp_t *grp, int partsidesign) { char tmp[512]; int fld; @@ -227,11 +227,11 @@ gds_append_str(term_shapes, "\n )\n"); } -static void print_lineshape(gds_t *term_shapes, pcb_pstk_line_t *lin, pcb_coord_t ox, pcb_coord_t oy, pcb_layergrp_t *grp, int partsidesign) +static void print_lineshape(gds_t *term_shapes, pcb_pstk_line_t *lin, rnd_coord_t ox, rnd_coord_t oy, pcb_layergrp_t *grp, int partsidesign) { char tmp[512]; int fld; - pcb_coord_t x[4], y[4]; + rnd_coord_t x[4], y[4]; int n; pcb_line_t ltmp; @@ -260,7 +260,7 @@ gds_append_str(term_shapes, "\n )\n"); } -static void print_circshape(gds_t *term_shapes, pcb_pstk_circ_t *circ, pcb_coord_t ox, pcb_coord_t oy, pcb_layergrp_t *grp, int partsidesign) +static void print_circshape(gds_t *term_shapes, pcb_pstk_circ_t *circ, rnd_coord_t ox, rnd_coord_t oy, pcb_layergrp_t *grp, int partsidesign) { char tmp[512]; @@ -273,11 +273,11 @@ gds_append_str(term_shapes, tmp); } -static void print_polyline(gds_t *term_shapes, pcb_poly_it_t *it, pcb_pline_t *pl, pcb_coord_t ox, pcb_coord_t oy, pcb_layergrp_t *grp, int partsidesign) +static void print_polyline(gds_t *term_shapes, pcb_poly_it_t *it, pcb_pline_t *pl, rnd_coord_t ox, rnd_coord_t oy, pcb_layergrp_t *grp, int partsidesign) { char tmp[512]; int fld; - pcb_coord_t x, y; + rnd_coord_t x, y; int go; if (pl != NULL) { @@ -297,7 +297,7 @@ } } -static void print_term_poly(FILE *fp, gds_t *term_shapes, pcb_poly_t *poly, pcb_coord_t ox, pcb_coord_t oy, int term_on_bottom, int partsidesign) +static void print_term_poly(FILE *fp, gds_t *term_shapes, pcb_poly_t *poly, rnd_coord_t ox, rnd_coord_t oy, int term_on_bottom, int partsidesign) { if (poly->term != NULL) { pcb_layergrp_id_t gid = term_on_bottom ? pcb_layergrp_get_bottom_copper() : pcb_layergrp_get_top_copper(); @@ -329,7 +329,7 @@ } } -void print_pstk_shape(gds_t *term_shapes, pcb_pstk_t *padstack, pcb_layergrp_id_t gid, pcb_coord_t ox, pcb_coord_t oy, int partsidesign) +void print_pstk_shape(gds_t *term_shapes, pcb_pstk_t *padstack, pcb_layergrp_id_t gid, rnd_coord_t ox, rnd_coord_t oy, int partsidesign) { pcb_pstk_shape_t *shp; pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); @@ -385,7 +385,7 @@ PCB_SUBC_LOOP(PCB->Data); { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; int partsidesign, subc_on_solder = 0; pcb_layer_type_t lyt_side; @@ -510,7 +510,7 @@ /* Print out the dsn .dsn file. */ fp = pcb_fopen_askovr(&PCB->hidlib, dsn_filename, "w", NULL); if (!fp) { - pcb_message(PCB_MSG_WARNING, "Cannot open file %s for writing\n", dsn_filename); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_dxf/dxf.c (revision 30903) @@ -90,7 +90,7 @@ pcb_core_gc_t core_gc; pcb_hid_t *me_pointer; pcb_cap_style_t cap; - pcb_coord_t width; + rnd_coord_t width; char *color; int drill; unsigned warned_elliptical:1; @@ -247,7 +247,7 @@ dxf_gen_layer(&dxf_ctx, *s); } else { - pcb_message(PCB_MSG_ERROR, "Invalid header insertion: '%s'\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid footer insertion: '%s'\n", name); + rnd_message(PCB_MSG_ERROR, "Invalid footer insertion: '%s'\n", name); return -1; } @@ -310,7 +310,7 @@ } if (dxf_ctx.temp == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't open dxf template: %s\n", fn); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "dxf cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); + rnd_message(PCB_MSG_ERROR, "Can't render dxf template header\n"); } if (!dxf_cam.active) { @@ -443,7 +443,7 @@ free(gc); } -static void dxf_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void dxf_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { if (direct) return; @@ -473,7 +473,7 @@ gc->cap = style; } -static void dxf_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void dxf_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -486,22 +486,22 @@ #define fix_rect_coords() \ if (x1 > x2) {\ - pcb_coord_t t = x1; \ + rnd_coord_t t = x1; \ x1 = x2; \ x2 = t; \ } \ if (y1 > y2) { \ - pcb_coord_t t = y1; \ + rnd_coord_t t = y1; \ y1 = y2; \ y2 = t; \ } -static void dxf_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void dxf_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { fix_rect_coords(); } -static void dxf_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void dxf_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { fix_rect_coords(); } @@ -508,11 +508,11 @@ static void dxf_calibrate(pcb_hid_t *hid, double xval, double yval) { - pcb_message(PCB_MSG_ERROR, "dxf_calibrate() not implemented"); + rnd_message(PCB_MSG_ERROR, "dxf_calibrate() not implemented"); return; } -static void dxf_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int a) +static void dxf_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } Index: trunk/src_plugins/export_dxf/dxf_draw.c =================================================================== --- trunk/src_plugins/export_dxf/dxf_draw.c (revision 30902) +++ trunk/src_plugins/export_dxf/dxf_draw.c (revision 30903) @@ -72,7 +72,7 @@ fprintf(ctx->f, "98\n0\n"); /* number of seed points */ } -static void dxf_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void dxf_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { dxf_ctx_t *ctx = &dxf_ctx; fprintf(ctx->f, "0\nLINE\n"); @@ -83,7 +83,7 @@ pcb_fprintf(ctx->f, "11\n%mm\n21\n%mm\n", TRX(x2), TRY(y2)); } -static void dxf_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r) +static void dxf_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { dxf_ctx_t *ctx = &dxf_ctx; fprintf(ctx->f, "0\nCIRCLE\n"); @@ -110,7 +110,7 @@ } } -static void dxf_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void dxf_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { pcb_angle_t end_angle, tmp; dxf_ctx_t *ctx = &dxf_ctx; @@ -141,7 +141,7 @@ fprintf(ctx->f, "51\n%f\n", end_angle); } -static void dxf_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void dxf_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { dxf_ctx_t *ctx = &dxf_ctx; int n, to; @@ -149,7 +149,7 @@ dxf_ctx.drawn_objs++; #if HATCH_NEEDS_BBOX - pcb_coord_t x_min, x_max, y_min, y_max; + rnd_coord_t x_min, x_max, y_min, y_max; x_max = x_min = *x + dx; y_max = y_min = *y + dy; for(n = 1; n < n_coords; n++) { @@ -184,7 +184,7 @@ } -static void dxf_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void dxf_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { dxf_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } Index: trunk/src_plugins/export_excellon/aperture.c =================================================================== --- trunk/src_plugins/export_excellon/aperture.c (revision 30902) +++ trunk/src_plugins/export_excellon/aperture.c (revision 30903) @@ -29,7 +29,7 @@ init_aperture_list(list); } -aperture_t *add_aperture(aperture_list_t *list, pcb_coord_t width, aperture_shape_t shape) +aperture_t *add_aperture(aperture_list_t *list, rnd_coord_t width, aperture_shape_t shape) { aperture_t *app = (aperture_t *) malloc(sizeof *app); if (app == NULL) @@ -46,7 +46,7 @@ return app; } -aperture_t *find_aperture(aperture_list_t *list, pcb_coord_t width, aperture_shape_t shape) +aperture_t *find_aperture(aperture_list_t *list, rnd_coord_t width, aperture_shape_t shape) { aperture_t *search; @@ -80,7 +80,7 @@ uninit_aperture_list(&ctx->apr); } -pcb_pending_drill_t *pcb_drill_new_pending(pcb_drill_ctx_t *ctx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t diam) +pcb_pending_drill_t *pcb_drill_new_pending(pcb_drill_ctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t diam) { pcb_pending_drill_t *pd = vtpdr_alloc_append(&ctx->obj, 1); Index: trunk/src_plugins/export_excellon/aperture.h =================================================================== --- trunk/src_plugins/export_excellon/aperture.h (revision 30902) +++ trunk/src_plugins/export_excellon/aperture.h (revision 30903) @@ -16,7 +16,7 @@ typedef struct aperture { int dCode; /* The RS-274X D code */ - pcb_coord_t width; /* Size in pcb units */ + rnd_coord_t width; /* Size in pcb units */ aperture_shape_t shape; /* ROUND/SQUARE etc */ struct aperture *next; } aperture_t; @@ -31,23 +31,23 @@ void uninit_aperture_list(aperture_list_t *list); /* Create and add a new aperture to the list */ -aperture_t *add_aperture(aperture_list_t *list, pcb_coord_t width, aperture_shape_t shape); +aperture_t *add_aperture(aperture_list_t *list, rnd_coord_t width, aperture_shape_t shape); /* Fetch an aperture from the list with the specified * width/shape, creating a new one if none exists */ -aperture_t *find_aperture(aperture_list_t *list, pcb_coord_t width, aperture_shape_t shape); +aperture_t *find_aperture(aperture_list_t *list, rnd_coord_t width, aperture_shape_t shape); /*** drill ***/ typedef struct { - pcb_coord_t diam; - pcb_coord_t x; - pcb_coord_t y; + rnd_coord_t diam; + rnd_coord_t x; + rnd_coord_t y; /* for slots */ int is_slot; - pcb_coord_t x2; - pcb_coord_t y2; + rnd_coord_t x2; + rnd_coord_t y2; } pcb_pending_drill_t; #define GVT(x) vtpdr_ ## x @@ -70,7 +70,7 @@ void pcb_drill_init(pcb_drill_ctx_t *ctx, int *aper_cnt); void pcb_drill_uninit(pcb_drill_ctx_t *ctx); -pcb_pending_drill_t *pcb_drill_new_pending(pcb_drill_ctx_t *ctx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t diam); +pcb_pending_drill_t *pcb_drill_new_pending(pcb_drill_ctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t diam); void pcb_drill_sort(pcb_drill_ctx_t *ctx); #endif Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30902) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30903) @@ -26,8 +26,8 @@ static int exc_aperture_cnt; -#define excellonDrX(pcb, x) ((pcb_coord_t) (x)) -#define excellonDrY(pcb, y) ((pcb_coord_t) ((pcb)->hidlib.size_y - (y))) +#define excellonDrX(pcb, x) ((rnd_coord_t) (x)) +#define excellonDrY(pcb, y) ((rnd_coord_t) ((pcb)->hidlib.size_y - (y))) typedef struct { const char *hdr1; @@ -50,7 +50,7 @@ }; -static pcb_cardinal_t drill_print_objs(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, int slots, pcb_coord_t *excellon_last_tool_dia) +static pcb_cardinal_t drill_print_objs(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, int slots, rnd_coord_t *excellon_last_tool_dia) { pcb_cardinal_t i, cnt = 0; int first = 1; @@ -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) { - pcb_message(PCB_MSG_ERROR, "excellon: internal error: can't register ROUND aperture of dia %$mm\n", pd->diam); + rnd_message(PCB_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); @@ -95,7 +95,7 @@ { aperture_t *search; pcb_cardinal_t cnt = 0; - pcb_coord_t excellon_last_tool_dia = 0; + rnd_coord_t excellon_last_tool_dia = 0; /* We omit the ,TZ here because we are not omitting trailing zeros. Our format is always six-digit 0.1 mil resolution (i.e. 001100 = 0.11") */ @@ -117,12 +117,12 @@ coord_format_t *cfmt; if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Error: Could not open %s for writing the excellon file.\n", fn); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Error: Invalid excellon coordinate format idx %d.\n", coord_fmt_idx); + rnd_message(PCB_MSG_ERROR, "Error: Invalid excellon coordinate format idx %d.\n", coord_fmt_idx); return; } @@ -147,7 +147,7 @@ static int is_plated, finding_apertures, exc_aperture_cnt; static pcb_drill_ctx_t pdrills, udrills; static pcb_cam_t excellon_cam; -static pcb_coord_t lastwidth; +static rnd_coord_t lastwidth; static char *filename = NULL; static struct { unsigned nonround:1; @@ -159,7 +159,7 @@ typedef struct hid_gc_s { pcb_core_gc_t core_gc; pcb_cap_style_t style; - pcb_coord_t width; + rnd_coord_t width; } hid_gc_s; static long exc_drawn_objs; @@ -287,11 +287,11 @@ if (pcb_cam_end(&excellon_cam) == 0) { if (!excellon_cam.okempty_group) - pcb_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_MSG_ERROR, "excellon cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } pcb_drill_uninit(&pdrills); @@ -337,7 +337,7 @@ free(gc); } -static void excellon_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) +static void excellon_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *drw_screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -349,7 +349,7 @@ case PCB_HID_COMP_NEGATIVE: if (!warn.comp) { warn.comp = 1; - pcb_message(PCB_MSG_ERROR, "Excellon: can not draw composite layers (some features may be missing from the export)\n"); + rnd_message(PCB_MSG_ERROR, "Excellon: can not draw composite layers (some features may be missing from the export)\n"); } } } @@ -363,7 +363,7 @@ gc->style = style; } -static void excellon_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void excellon_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -380,12 +380,12 @@ return (is_plated ? &pdrills : &udrills); } -static void use_gc(pcb_hid_gc_t gc, pcb_coord_t radius) +static void use_gc(pcb_hid_gc_t gc, rnd_coord_t radius) { exc_drawn_objs++; if ((gc->style != pcb_cap_round) && (!warn.nonround)) { warn.nonround = 1; - pcb_message(PCB_MSG_ERROR, "Excellon: can not set non-round aperture (some features may be missing from the export)\n"); + rnd_message(PCB_MSG_ERROR, "Excellon: can not set non-round aperture (some features may be missing from the export)\n"); } if (radius == 0) @@ -402,9 +402,9 @@ } -static void excellon_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void excellon_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - pcb_coord_t dia = gc->width/2; + rnd_coord_t dia = gc->width/2; find_aperture(&(get_drill_ctx()->apr), dia*2, ROUND); @@ -412,7 +412,7 @@ pcb_drill_new_pending(get_drill_ctx(), x1, y1, x2, y2, dia*2); } -static void excellon_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void excellon_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { excellon_draw_line(gc, x1, y1, x1, y2); excellon_draw_line(gc, x1, y1, x2, y1); @@ -420,15 +420,15 @@ excellon_draw_line(gc, x2, y1, x2, y2); } -static void excellon_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void excellon_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { if (!warn.arc) { warn.arc = 1; - pcb_message(PCB_MSG_ERROR, "Excellon: can not export arcs (some features may be missing from the export)\n"); + rnd_message(PCB_MSG_ERROR, "Excellon: can not export arcs (some features may be missing from the export)\n"); } } -static void excellon_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void excellon_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if (radius <= 0) return; @@ -439,21 +439,21 @@ pcb_drill_new_pending(get_drill_ctx(), cx, cy, cx, cy, radius * 2); } -static void excellon_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void excellon_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { if (!warn.poly) { warn.poly = 1; - pcb_message(PCB_MSG_ERROR, "Excellon: can not export polygons (some features may be missing from the export)\n"); + rnd_message(PCB_MSG_ERROR, "Excellon: can not export polygons (some features may be missing from the export)\n"); } } -static void excellon_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void excellon_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { excellon_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void excellon_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void excellon_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { excellon_fill_polygon(gc, 0, NULL, NULL); } @@ -460,7 +460,7 @@ static void excellon_calibrate(pcb_hid_t *hid, double xval, double yval) { - pcb_message(PCB_MSG_ERROR, "Excellon internal error: can not calibrate()\n"); + rnd_message(PCB_MSG_ERROR, "Excellon internal error: can not calibrate()\n"); } static int excellon_usage(pcb_hid_t *hid, const char *topic) @@ -471,7 +471,7 @@ return 0; } -static void excellon_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void excellon_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30902) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30903) @@ -100,13 +100,13 @@ char line[1024]; f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't open fidocadj PCB library file '%s' for read\n", fn); + rnd_message(PCB_MSG_ERROR, "Can't open fidocadj PCB library file '%s' for read\n", fn); return -1; } *line = '\0'; fgets(line, sizeof(line), f); if (pcb_strncasecmp(line, "[FIDOLIB PCB Footprints]", 24) != 0) { - pcb_message(PCB_MSG_ERROR, "'%s' doesn't have the fidocadj lib header\n", fn); + rnd_message(PCB_MSG_ERROR, "'%s' doesn't have the fidocadj lib header\n", fn); fclose(f); return -1; } @@ -127,7 +127,7 @@ return 0; } -static long int crd(pcb_coord_t c) +static long int crd(rnd_coord_t c) { return pcb_round((double)PCB_COORD_TO_MIL(c) / 5.0); } @@ -245,12 +245,12 @@ * default_font stroke thickness = 800 * giving sx = (4189+800)/(5333+800) ~= 0.813 */ - pcb_coord_t x0 = text->X; - /*pcb_coord_t sx = text->BoundingBox.X2 - text->BoundingBox.X1; unused */ - pcb_coord_t y0 = text->Y; - /* pcb_coord_t sy = text->BoundingBox.Y2 - text->BoundingBox.Y1; unused */ - pcb_coord_t glyphy = 5789*(text->Scale); /* (ascent+descent)*Scale */ - pcb_coord_t glyphx = 813*(glyphy/1000); /* based on 'm' glyph dimensions */ + rnd_coord_t x0 = text->X; + /*rnd_coord_t sx = text->BoundingBox.X2 - text->BoundingBox.X1; unused */ + rnd_coord_t y0 = text->Y; + /* rnd_coord_t sy = text->BoundingBox.Y2 - text->BoundingBox.Y1; unused */ + rnd_coord_t glyphy = 5789*(text->Scale); /* (ascent+descent)*Scale */ + rnd_coord_t glyphx = 813*(glyphy/1000); /* based on 'm' glyph dimensions */ glyphy = 10*glyphy/7; /* empirically determined */ glyphx = 10*glyphx/7; /* scaling voodoo */ /*switch(text->Direction) { @@ -284,9 +284,9 @@ PCB_PADSTACK_LOOP(PCB->Data) { int oshape; - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; - pcb_bool plated; + rnd_bool plated; if (!pcb_pstk_export_compat_via(padstack, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { pcb_io_incompat_save(PCB->Data, (pcb_any_obj_t *)padstack, "padstack-uniformity", "can't export non-uniform padstacl", "use a simpler padstack - omiting this one from the export"); continue; @@ -308,7 +308,7 @@ PCB_SUBC_LOOP(PCB->Data) { const char *fp = pcb_attribute_get(&subc->Attributes, "footprint"); if ((fp != NULL) && have_lib && (htsi_get(&lib_names, fp))) { - pcb_coord_t x, y; + rnd_coord_t x, y; double rot = 0.0; int on_bottom = 0; if (pcb_subc_get_origin(subc, &x, &y)) { Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 30902) +++ trunk/src_plugins/export_gcode/gcode.c (revision 30903) @@ -156,9 +156,9 @@ static void gcode_print_header(void) { - pcb_coord_t step = gcode_values[HA_cutdepth].crd; - pcb_coord_t total = gcode_values[HA_totalcutdepth].crd; - pcb_coord_t at = gcode_values[HA_layerdepth].crd; + rnd_coord_t step = gcode_values[HA_cutdepth].crd; + rnd_coord_t total = gcode_values[HA_totalcutdepth].crd; + rnd_coord_t at = gcode_values[HA_layerdepth].crd; pcb_fprintf(gctx.f, "#100=%mm (safe Z for travels above the board)\n", gcode_values[HA_safeZ].crd); pcb_fprintf(gctx.f, "#101=%mm (cutting depth for layers)\n", gcode_values[HA_layerdepth].crd); @@ -167,7 +167,7 @@ if (step > 0) step = -step; else if (step == 0) { - pcb_message(PCB_MSG_ERROR, "export_gcode: cut increment not configured - not exporting thru-cut layer\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "export_gcode: can't determine board thickness - not exporting thru-cut layer\n"); + rnd_message(PCB_MSG_ERROR, "export_gcode: can't determine board thickness - not exporting thru-cut layer\n"); return; } } @@ -212,7 +212,7 @@ { pcb_line_t *from = NULL, *to, *last_to = NULL; gdl_iterator_t it; - pcb_coord_t lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD; + rnd_coord_t lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD; int start_depth, passes; if (tctx->res_path->Line.lst.length == 0) { @@ -233,7 +233,7 @@ lastx = TX(from->Point2.X); lasty = TY(from->Point2.Y); linelist_foreach(&tctx->res_path->Line, &it, to) { - pcb_coord_t x1 = TX(to->Point1.X), y1 = TY(to->Point1.Y), x2 = TX(to->Point2.X), y2 = TY(to->Point2.Y); + rnd_coord_t x1 = TX(to->Point1.X), y1 = TY(to->Point1.Y), x2 = TX(to->Point2.X), y2 = TY(to->Point2.Y); if ((lastx != x1) && (lasty != y1)) { if (to->link.prev == NULL) gcode_print_lines_(from, from, passes, start_depth); /* corner case: first line is a stand-alone segment */ @@ -255,7 +255,7 @@ const char *script; pcb_layergrp_t *grp = &gctx.pcb->LayerGroups.grp[group]; static pcb_tlp_session_t tctx; - static pcb_coord_t tool_dias[] = { + static rnd_coord_t tool_dias[] = { PCB_MM_TO_COORD(0.2), PCB_MM_TO_COORD(3) }; @@ -369,11 +369,11 @@ if (pcb_cam_end(&gctx.cam) == 0) { if (!gctx.cam.okempty_group) - pcb_message(PCB_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "gcode cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30903) @@ -57,10 +57,10 @@ static pcb_cam_t gerber_cam; /* These are for films */ -#define gerberX(pcb, x) ((pcb_coord_t) (x)) -#define gerberY(pcb, y) ((pcb_coord_t) ((pcb)->hidlib.size_y - (y))) -#define gerberXOffset(pcb, x) ((pcb_coord_t) (x)) -#define gerberYOffset(pcb, y) ((pcb_coord_t) (-(y))) +#define gerberX(pcb, x) ((rnd_coord_t) (x)) +#define gerberY(pcb, y) ((rnd_coord_t) ((pcb)->hidlib.size_y - (y))) +#define gerberXOffset(pcb, x) ((rnd_coord_t) (x)) +#define gerberYOffset(pcb, y) ((rnd_coord_t) (-(y))) static int verbose; static int all_layers; @@ -105,7 +105,7 @@ break; case OCTAGON: pcb_fprintf(f, "%%AMOCT%d*5,0,8,0,0,%[5],22.5*%%\r\n" - "%%ADD%dOCT%d*%%\r\n", aptr->dCode, (pcb_coord_t) ((double) aptr->width / PCB_COS_22_5_DEGREE), aptr->dCode, aptr->dCode); + "%%ADD%dOCT%d*%%\r\n", aptr->dCode, (rnd_coord_t) ((double) aptr->width / PCB_COS_22_5_DEGREE), aptr->dCode, aptr->dCode); break; } } @@ -333,7 +333,7 @@ /* set up the coord format */ i = options[HA_coord_format].lng; if ((i < 0) || (i >= NUM_COORD_FORMATS)) { - pcb_message(PCB_MSG_ERROR, "Invalid coordinate format (out of bounds)\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "gerber cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Error: Could not open %s for writing.\n", filename); + rnd_message(PCB_MSG_ERROR, "Error: Could not open %s for writing.\n", filename); return 1; } } @@ -631,7 +631,7 @@ free(gc); } -static void gerber_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) +static void gerber_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *drw_screen) { gerber_drawing_mode = op; if ((f != NULL) && (gerber_debug)) @@ -657,7 +657,7 @@ gc->cap = style; } -static void gerber_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void gerber_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -718,12 +718,12 @@ } } -static void gerber_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void gerber_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { - pcb_bool m = pcb_false; + rnd_bool m = pcb_false; int i; int firstTime = 1; - pcb_coord_t startX = 0, startY = 0; + rnd_coord_t startX = 0, startY = 0; if (is_mask && (gerber_drawing_mode != PCB_HID_COMP_POSITIVE) && (gerber_drawing_mode != PCB_HID_COMP_POSITIVE_XOR) && (gerber_drawing_mode != PCB_HID_COMP_NEGATIVE)) return; @@ -769,17 +769,17 @@ fprintf(f, "G37*\r\n"); } -static void gerber_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void gerber_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { gerber_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void gerber_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void gerber_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - pcb_bool m = pcb_false; + rnd_bool m = pcb_false; if (line_slots) { - pcb_coord_t dia = gc->width/2; + rnd_coord_t dia = gc->width/2; find_aperture(curr_aptr_list, dia*2, ROUND); /* for a real gerber export of the BOUNDARY group: place aperture on the per layer aperture list */ if (finding_apertures) @@ -787,7 +787,7 @@ } if (x1 != x2 && y1 != y2 && gc->cap == pcb_cap_square) { - pcb_coord_t x[5], y[5]; + rnd_coord_t x[5], y[5]; double tx, ty, theta; theta = atan2(y2 - y1, x2 - x1); @@ -844,7 +844,7 @@ } } -static void gerber_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void gerber_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gerber_draw_line(gc, x1, y1, x1, y2); gerber_draw_line(gc, x1, y1, x2, y1); @@ -852,9 +852,9 @@ gerber_draw_line(gc, x2, y1, x2, y2); } -static void gerber_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void gerber_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { - pcb_bool m = pcb_false; + rnd_bool m = pcb_false; double arcStartX, arcStopX, arcStartY, arcStopY; /* we never draw zero-width lines */ @@ -902,10 +902,10 @@ segments. Note that most arcs in pcb are circles anyway. */ if (width != height) { double step, angle; - pcb_coord_t max = width > height ? width : height; - pcb_coord_t minr = max - gc->width / 10; + rnd_coord_t max = width > height ? width : height; + rnd_coord_t minr = max - gc->width / 10; int nsteps; - pcb_coord_t x0, y0, x1, y1; + rnd_coord_t x0, y0, x1, y1; if (minr >= max) minr = max - 1; @@ -953,7 +953,7 @@ lastY = arcStopY; } -static void gerber_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void gerber_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if (radius <= 0) return; @@ -979,10 +979,10 @@ fprintf(f, "D03*\r\n"); } -static void gerber_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void gerber_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - pcb_coord_t x[5]; - pcb_coord_t y[5]; + rnd_coord_t x[5]; + rnd_coord_t y[5]; x[0] = x[4] = x1; y[0] = y[4] = y1; x[1] = x1; @@ -1051,7 +1051,7 @@ } -static void gerber_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void gerber_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30902) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30903) @@ -66,7 +66,7 @@ pcb_any_obj_t *o; const char *netname, *refdes, *term; int is_plated, access_top, access_bottom, rot, masked_top, masked_bottom; - pcb_coord_t hole, width, height, cx, cy; + rnd_coord_t hole, width, height, cx, cy; } test_feature_t; static int getattr(pcb_any_obj_t *o, const char *key) @@ -92,10 +92,10 @@ dst[n] = ' '; } if (*d != '\0') - pcb_message(PCB_MSG_WARNING, "Data '%s' is too long for a(n) %s, truncated\n", data, name); + rnd_message(PCB_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, pcb_coord_t crd, int sign, const char *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) { int len = end-start+1; char tmp[32], fmt[16]; @@ -217,7 +217,7 @@ static void ipcd356_pstk_shape(test_feature_t *t, pcb_pstk_shape_t *sh) { int n; - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; switch(sh->shape) { case PCB_PSSH_HSHADOW: break; @@ -463,7 +463,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't open %s for write\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 30903) @@ -263,7 +263,7 @@ const char *name = NULL; FILE *f; void *ptrtmp; - pcb_coord_t x, y; + rnd_coord_t x, y; RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, ExportOldConn, op = fgw_keyword(&argv[1])); rnd_PCB_ACT_MAY_CONVARG(2, FGW_STR, ExportOldConn, name = argv[2].val.str); Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 30902) +++ trunk/src_plugins/export_openems/excitation.c (revision 30903) @@ -86,7 +86,7 @@ if (orig != NULL) { hv.lng = strtol(orig, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Invalid integer value in board attribute '%s': '%s'\n", attrkey, orig); + rnd_message(PCB_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 (pcb_strcasecmp(end, "hz") != 0) { - pcb_message(PCB_MSG_ERROR, "Invalid real value (Hz) in board attribute '%s': '%s'\n", attrkey, orig); + rnd_message(PCB_MSG_ERROR, "Invalid real value (Hz) in board attribute '%s': '%s'\n", attrkey, orig); hv.dbl = 0; } } @@ -143,7 +143,7 @@ static void exc_val_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static pcb_bool to_hz(const char *s, double *out) +static rnd_bool to_hz(const char *s, double *out) { const pcb_unit_t *u; double d; @@ -187,10 +187,10 @@ double f0 = 0, fc = 0; if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::f0"), &f0)) - pcb_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); + rnd_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::f0\n"); if (!to_hz(pcb_attribute_get(&PCB->Attributes, AEPREFIX "gaussian::fc"), &fc)) - pcb_message(PCB_MSG_ERROR, "Gauss excitation: unable to parse frequency gaussian::fc\n"); + rnd_message(PCB_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(pcb_attribute_get(&PCB->Attributes, AEPREFIX "sinusoidal::f0"), &f0)) - pcb_message(PCB_MSG_ERROR, "Sinus excitation: unable to parse frequency sinusoidal::f0\n"); + rnd_message(PCB_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(pcb_attribute_get(&PCB->Attributes, AEPREFIX "custom::f0"), &f0)) - pcb_message(PCB_MSG_ERROR, "Custom excitation: unable to parse frequency custom::f0\n"); + rnd_message(PCB_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]))) { - pcb_message(PCB_MSG_ERROR, "Invalid excitation selected\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "internal error: too many excitations"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); + rnd_message(PCB_MSG_ERROR, "OpenemsExcitation(select) needs a excitation name"); goto error; } pcb_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: - pcb_message(PCB_MSG_ERROR, "OpenemsExcitation(set) needs exactly 2 or 3 more arguments"); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "OpenemsExcitation(get) needs exactly 1 or 2 more arguments"); + rnd_message(PCB_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]))) { - pcb_message(PCB_MSG_ERROR, "No excitation selected\n"); + rnd_message(PCB_MSG_ERROR, "No excitation selected\n"); return pcb_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 30902) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30903) @@ -82,7 +82,7 @@ int clayer; /* current layer (lg index really) */ long oid; /* unique object ID - we need some unique variable names, keep on counting them */ long port_id; /* unique port ID for similar reasons */ - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; unsigned warn_subc_term:1; unsigned warn_port_pstk:1; } wctx_t; @@ -360,7 +360,7 @@ fprintf(ctx->f, "\n"); } -static void openems_vport_write(wctx_t *ctx, pcb_any_obj_t *o, pcb_coord_t x, pcb_coord_t y, pcb_layergrp_id_t gid1, pcb_layergrp_id_t gid2, const char *port_name) +static void openems_vport_write(wctx_t *ctx, pcb_any_obj_t *o, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid1, pcb_layergrp_id_t gid2, const char *port_name) { char *end, *s, *safe_name = pcb_strdup(port_name); const char *att; @@ -375,7 +375,7 @@ if (*end == '\0') resistance = tmp; else - pcb_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(PCB_MSG_WARNING, "Ignoring invalid openems::resistance value for port %s: '%s' (must be a number without suffix)\n", port_name, att); } att = pcb_attribute_get(&o->Attributes, "openems::active"); @@ -385,7 +385,7 @@ else if (pcb_strcasecmp(att, "false") == 0) act = 0; else - pcb_message(PCB_MSG_WARNING, "Ignoring invalid openems::active value for port %s: '%s' (must be true or false)\n", port_name, att); + rnd_message(PCB_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) { - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not export openems vport %s: it has both top and bottom copper\n", port_name); + rnd_message(PCB_MSG_ERROR, "Can not export openems vport %s: it has both top and bottom copper\n", port_name); return -1; } if (!top && !bot) { - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not export openems vport %s: can not find top or bottom layer group ID\n", port_name); + rnd_message(PCB_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; - pcb_message(PCB_MSG_ERROR, "Can not export openems vport %s: can not find pair layer\n", port_name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Subcircuit being a terminal is not supported.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Only padstacks can be openems ports at the moment\n"); + rnd_message(PCB_MSG_ERROR, "Only padstacks can be openems ports at the moment\n"); ctx->warn_port_pstk = 1; break; } @@ -708,7 +708,7 @@ free(gc); } -static void openems_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void openems_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -717,7 +717,7 @@ case PCB_HID_COMP_POSITIVE_XOR: break; case PCB_HID_COMP_NEGATIVE: - pcb_message(PCB_MSG_ERROR, "Can't draw composite layer, especially not on copper\n"); + rnd_message(PCB_MSG_ERROR, "Can't draw composite layer, especially not on copper\n"); break; case PCB_HID_COMP_FLUSH: break; @@ -733,7 +733,7 @@ gc->cap = style; } -static void openems_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void openems_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -744,19 +744,19 @@ ; } -static void openems_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openems_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void openems_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openems_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void openems_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void openems_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { } -static void openems_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void openems_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { wctx_t *ctx = ems_ctx; long oid = ctx->oid++; @@ -766,7 +766,7 @@ pcb_fprintf(ctx->f, "CSX = AddPcbrndTrace(CSX, PCBRND, %d, points%ld, %mm, 0);\n", ctx->clayer, oid, radius*2); } -static void openems_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void openems_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { wctx_t *ctx = ems_ctx; int n; @@ -778,17 +778,17 @@ fprintf(ctx->f, "CSX = AddPcbrndPoly(CSX, PCBRND, %d, poly%ld_xy, 1);\n", ctx->clayer, oid); } -static void openems_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void openems_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { openems_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void openems_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openems_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { wctx_t *ctx = ems_ctx; if (gc->cap == pcb_cap_square) { - pcb_coord_t x[4], y[4]; + rnd_coord_t x[4], y[4]; pcb_line_t tmp; tmp.Point1.X = x1; tmp.Point1.Y = y1; @@ -808,11 +808,11 @@ static void openems_calibrate(pcb_hid_t *hid, double xval, double yval) { - pcb_message(PCB_MSG_ERROR, "openems_calibrate() not implemented"); + rnd_message(PCB_MSG_ERROR, "openems_calibrate() not implemented"); return; } -static void openems_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int a) +static void openems_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 30902) +++ trunk/src_plugins/export_openems/mesh.c (revision 30903) @@ -56,11 +56,11 @@ static void mesh2dlg() { int n; - pcb_coord_t subst_thick; + rnd_coord_t subst_thick; subst_thick = pcb_board_thickness(PCB, "openems", PCB_BRDTHICK_PRINT_ERROR); if (subst_thick <= 0) { - pcb_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(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."); subst_thick = PCB_MM_TO_COORD(1.5); } @@ -122,12 +122,12 @@ #endif TODO("reorder to avoid fwd decl") -static void mesh_auto_add_smooth(vtc0_t *v, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t d1, pcb_coord_t d, pcb_coord_t d2); +static void mesh_auto_add_smooth(vtc0_t *v, rnd_coord_t c1, rnd_coord_t c2, rnd_coord_t d1, rnd_coord_t d, rnd_coord_t d2); #define SAVE_INT(name) \ pcb_append_printf(dst, "%s " #name" = %d\n", prefix, (int)me->dlg[me->name].val.lng); #define SAVE_COORD(name) \ - pcb_append_printf(dst, "%s " #name" = %.08$$mm\n", prefix, (pcb_coord_t)me->dlg[me->name].val.crd); + pcb_append_printf(dst, "%s " #name" = %.08$$mm\n", prefix, (rnd_coord_t)me->dlg[me->name].val.crd); void pcb_mesh_save(const mesh_dlg_t *me, gds_t *dst, const char *prefix) { int n; @@ -186,12 +186,12 @@ int v; \ char *end; \ if (n->type != LHT_TEXT) { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ + rnd_message(PCB_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ return -1; \ } \ v = strtol(n->data.text.value, &end, 10); \ if (*end != '\0') { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh integer: " #name "\n"); \ + rnd_message(PCB_MSG_ERROR, "Invalid mesh integer: " #name "\n"); \ return -1; \ } \ PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, lng, v); \ @@ -203,17 +203,17 @@ lht_node_t *n = lht_dom_hash_get(root, #name); \ if (n != NULL) { \ double v; \ - pcb_bool succ; \ + rnd_bool succ; \ if (n->type != LHT_TEXT) { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh item: " #name " should be text\n"); \ + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh coord: " #name "\n"); \ + rnd_message(PCB_MSG_ERROR, "Invalid mesh coord: " #name "\n"); \ return -1; \ } \ - PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, crd, (pcb_coord_t)v); \ + PCB_DAD_SET_VALUE(me->dlg_hid_ctx, me->name, crd, (rnd_coord_t)v); \ } \ } while(0) @@ -223,7 +223,7 @@ int __found__ = 0, __n__; \ const char **__a__; \ if (node->type != LHT_TEXT) { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh value: " #name " should be text\n"); \ + rnd_message(PCB_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__) { \ - pcb_message(PCB_MSG_ERROR, "Invalid mesh value '%s' for " #name "\n", node->data.text.value); \ + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Input is not a valid mesh save - should be a ha:pcb-rnd-mesh subtree\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Boundary shall be a list\n"); + rnd_message(PCB_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) @@ -303,17 +303,17 @@ } -static void mesh_add_edge(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t crd) +static void mesh_add_edge(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t crd) { vtc0_append(&mesh->line[dir].edge, crd); } -static void mesh_add_result(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t crd) +static void mesh_add_result(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t crd) { vtc0_append(&mesh->line[dir].result, crd); } -static void mesh_add_range(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t dens) +static void mesh_add_range(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t c1, rnd_coord_t c2, rnd_coord_t dens) { pcb_range_t *r = vtr0_alloc_append(&mesh->line[dir].dens, 1); r->begin = c1; @@ -321,7 +321,7 @@ r->data[0].c = dens; } -static void mesh_add_obj(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t c1, pcb_coord_t c2, int aligned) +static void mesh_add_obj(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t c1, rnd_coord_t c2, int aligned) { if (aligned) { mesh_add_edge(mesh, dir, c1 - mesh->dens_obj * 2 / 3); @@ -353,7 +353,7 @@ } linelist_foreach(&layer->Line, &it, line) { - pcb_coord_t x1 = line->Point1.X, y1 = line->Point1.Y, x2 = line->Point2.X, y2 = line->Point2.Y; + rnd_coord_t x1 = line->Point1.X, y1 = line->Point1.Y, x2 = line->Point2.X, y2 = line->Point2.Y; int aligned = (x1 == x2) || (y1 == y2); switch(dir) { @@ -389,13 +389,13 @@ pcb_polyarea_t *pa; for(pa = pcb_poly_island_first(poly, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_pline_t *pl; int go; pl = pcb_poly_contour(&it); if (pl != NULL) { - pcb_coord_t lx, ly, minx, miny, maxx, maxy; + rnd_coord_t lx, ly, minx, miny, maxx, maxy; pcb_poly_vect_first(&it, &minx, &miny); maxx = minx; @@ -461,7 +461,7 @@ static int cmp_coord(const void *v1, const void *v2) { - const pcb_coord_t *c1 = v1, *c2 = v2; + const rnd_coord_t *c1 = v1, *c2 = v2; return *c1 < *c2 ? -1 : +1; } @@ -473,8 +473,8 @@ typedef struct { - pcb_coord_t min; - pcb_coord_t max; + rnd_coord_t min; + rnd_coord_t max; int found; } mesh_maybe_t; @@ -481,7 +481,7 @@ static int cmp_maybe_add(const void *k, const void *v) { const mesh_maybe_t *ctx = k; - const pcb_coord_t *c = v; + const rnd_coord_t *c = v; if ((*c >= ctx->min) && (*c <= ctx->max)) return 0; @@ -490,19 +490,19 @@ return -1; } -static void mesh_maybe_add_edge(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t at, pcb_coord_t dist) +static void mesh_maybe_add_edge(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t at, rnd_coord_t dist) { mesh_maybe_t ctx; - pcb_coord_t *c; + rnd_coord_t *c; ctx.min = at - dist; ctx.max = at + dist; ctx.found = 0; - c = bsearch(&ctx, mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(pcb_coord_t), cmp_maybe_add); + c = bsearch(&ctx, mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(rnd_coord_t), cmp_maybe_add); if (c == NULL) { TODO(": optimization: run a second bsearch and insert instead of this; testing: 45 deg line (won't have axis aligned edge for the 2/3 1/3 rule)") vtc0_append(&mesh->line[dir].edge, at); - qsort(mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(pcb_coord_t), cmp_coord); + qsort(mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(rnd_coord_t), cmp_coord); } } @@ -512,16 +512,16 @@ pcb_range_t *r; if (vtr0_len(&mesh->line[dir].dens) < 1) { - pcb_message(PCB_MSG_ERROR, "There are not enough objects to do the meshing\n"); + rnd_message(PCB_MSG_ERROR, "There are not enough objects to do the meshing\n"); return -1; } - qsort(mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(pcb_coord_t), cmp_coord); + qsort(mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(rnd_coord_t), cmp_coord); qsort(mesh->line[dir].dens.array, vtr0_len(&mesh->line[dir].dens), sizeof(pcb_range_t), cmp_range); /* warn for edges too close */ for(n = 0; n < vtc0_len(&mesh->line[dir].edge)-1; n++) { - pcb_coord_t c1 = mesh->line[dir].edge.array[n], c2 = mesh->line[dir].edge.array[n+1]; + rnd_coord_t c1 = mesh->line[dir].edge.array[n], c2 = mesh->line[dir].edge.array[n+1]; if (c2 - c1 < mesh->min_space) { if ((c2 - c1) < PCB_MM_TO_COORD(0.1)) { mesh->line[dir].edge.array[n] = (c1 + c2) / 2; @@ -528,7 +528,7 @@ vtc0_remove(&mesh->line[dir].edge, n+1, 1); } else - pcb_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(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); } } @@ -549,7 +549,7 @@ for(n = 0; n < vtr0_len(&mesh->line[dir].dens)-1; n++) { pcb_range_t *r1 = &mesh->line[dir].dens.array[n], *r2 = &mesh->line[dir].dens.array[n+1]; if (r1->end < r2->begin) { - pcb_coord_t my_end = r2->begin; /* the insert will change r2 pointer */ + rnd_coord_t my_end = r2->begin; /* the insert will change r2 pointer */ pcb_range_t *r = vtr0_alloc_insert(&mesh->line[dir].dens, n+1, 1); r->begin = r1->end; r->end = my_end; @@ -583,7 +583,7 @@ static int cmp_range_at(const void *key_, const void *v_) { - const pcb_coord_t *key = key_; + const rnd_coord_t *key = key_; const pcb_range_t *v = v_; if ((*key >= v->begin) && (*key <= v->end)) @@ -592,7 +592,7 @@ return +1; } -static pcb_range_t *mesh_find_range(const vtr0_t *v, pcb_coord_t at, pcb_coord_t *dens, pcb_coord_t *dens_left, pcb_coord_t *dens_right) +static pcb_range_t *mesh_find_range(const vtr0_t *v, rnd_coord_t at, rnd_coord_t *dens, rnd_coord_t *dens_left, rnd_coord_t *dens_right) { pcb_range_t *r; r = bsearch(&at, v->array, vtr0_len((vtr0_t *)v), sizeof(pcb_range_t), cmp_range_at); @@ -619,7 +619,7 @@ static int mesh_auto_z(pcb_mesh_t *mesh) { pcb_layergrp_id_t gid; - pcb_coord_t y = 0, ytop = 0, ybottom, top_dens, bottom_dens; + rnd_coord_t y = 0, ytop = 0, ybottom, top_dens, bottom_dens; int n, lns, first = 1; vtc0_truncate(&mesh->line[PCB_MESH_Z].result, 0); @@ -633,7 +633,7 @@ /* Ignore the thickness of copper layers for now: copper sheets are modelled in 2d */ } else if (grp->ltype & PCB_LYT_SUBSTRATE) { - pcb_coord_t d, t = mesh->def_subs_thick; + rnd_coord_t d, t = mesh->def_subs_thick; double dens = (double)t/(double)lns; bottom_dens = pcb_round(dens); if (lns != 0) { @@ -691,7 +691,7 @@ return 0; } -static void mesh_draw_line(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t at, pcb_coord_t aux1, pcb_coord_t aux2, pcb_coord_t thick) +static void mesh_draw_line(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t at, rnd_coord_t aux1, rnd_coord_t aux2, rnd_coord_t thick) { if (dir == PCB_MESH_HORIZONTAL) pcb_line_new(mesh->ui_layer_xy, aux1, at, aux2, at, thick, 0, pcb_no_flags()); @@ -699,7 +699,7 @@ pcb_line_new(mesh->ui_layer_xy, at, aux1, at, aux2, thick, 0, pcb_no_flags()); } -static void mesh_draw_range(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t at1, pcb_coord_t at2, pcb_coord_t aux, pcb_coord_t thick) +static void mesh_draw_range(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t at1, rnd_coord_t at2, rnd_coord_t aux, rnd_coord_t thick) { if (dir == PCB_MESH_HORIZONTAL) pcb_line_new(mesh->ui_layer_xy, aux, at1, aux, at2, thick, 0, pcb_no_flags()); @@ -707,7 +707,7 @@ pcb_line_new(mesh->ui_layer_xy, at1, aux, at2, aux, thick, 0, pcb_no_flags()); } -static void mesh_draw_label(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t aux, const char *label) +static void mesh_draw_label(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, rnd_coord_t aux, const char *label) { aux -= PCB_MM_TO_COORD(0.6); if (dir == PCB_MESH_HORIZONTAL) @@ -720,7 +720,7 @@ static int mesh_vis_xy(pcb_mesh_t *mesh, pcb_mesh_dir_t dir) { size_t n; - pcb_coord_t end; + rnd_coord_t end; mesh_draw_label(mesh, dir, PCB_MM_TO_COORD(0.1), "object edge"); @@ -756,10 +756,10 @@ { int n; pcb_layergrp_id_t gid; - pcb_coord_t y0 = PCB->hidlib.size_y/3, y = y0, y2; - pcb_coord_t xl = PCB->hidlib.size_x/5; /* board left */ - pcb_coord_t xr = PCB->hidlib.size_x/5*3; /* board right */ - pcb_coord_t spen = PCB_MM_TO_COORD(0.3), cpen = PCB_MM_TO_COORD(0.2), mpen = PCB_MM_TO_COORD(0.03); + rnd_coord_t y0 = PCB->hidlib.size_y/3, y = y0, y2; + rnd_coord_t xl = PCB->hidlib.size_x/5; /* board left */ + rnd_coord_t xr = PCB->hidlib.size_x/5*3; /* board right */ + rnd_coord_t spen = PCB_MM_TO_COORD(0.3), cpen = PCB_MM_TO_COORD(0.2), mpen = PCB_MM_TO_COORD(0.03); int mag = 2; for(gid = 0; gid < PCB->LayerGroups.len; gid++) { @@ -782,7 +782,7 @@ mesh_trace("Z lines:\n"); for(n = 0; n < vtc0_len(&mesh->line[PCB_MESH_Z].result); n++) { - pcb_coord_t y = y0+mesh->line[PCB_MESH_Z].result.array[n]*mag; + rnd_coord_t y = y0+mesh->line[PCB_MESH_Z].result.array[n]*mag; mesh_trace(" %mm", y); pcb_line_new(mesh->ui_layer_z, 0, y, PCB->hidlib.size_x, y, mpen, 0, pcb_no_flags()); } @@ -791,7 +791,7 @@ } -static void mesh_auto_add_even(vtc0_t *v, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t d) +static void mesh_auto_add_even(vtc0_t *v, rnd_coord_t c1, rnd_coord_t c2, rnd_coord_t d) { long num = (c2 - c1) / d; @@ -806,7 +806,7 @@ } } -static pcb_coord_t mesh_auto_add_interp(vtc0_t *v, pcb_coord_t c, pcb_coord_t d1, pcb_coord_t d2, pcb_coord_t dd) +static rnd_coord_t mesh_auto_add_interp(vtc0_t *v, rnd_coord_t c, rnd_coord_t d1, rnd_coord_t d2, rnd_coord_t dd) { if (dd > 0) { for(; d1 <= d2; d1 += dd) { @@ -825,9 +825,9 @@ } -static void mesh_auto_add_smooth(vtc0_t *v, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t d1, pcb_coord_t d, pcb_coord_t d2) +static void mesh_auto_add_smooth(vtc0_t *v, rnd_coord_t c1, rnd_coord_t c2, rnd_coord_t d1, rnd_coord_t d, rnd_coord_t d2) { - pcb_coord_t len = c2 - c1, begin = c1, end = c2, glen; + rnd_coord_t len = c2 - c1, begin = c1, end = c2, glen; int lines; /* ramp up (if there's room) */ @@ -861,8 +861,8 @@ static int mesh_auto_build(pcb_mesh_t *mesh, pcb_mesh_dir_t dir) { size_t n; - pcb_coord_t c1, c2; - pcb_coord_t d1, d, d2; + rnd_coord_t c1, c2; + rnd_coord_t d1, d, d2; mesh_trace("build:\n"); @@ -982,7 +982,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fname, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Can not open '%s' for write\n", fname); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not open '%s' for read\n", fname); + rnd_message(PCB_MSG_ERROR, "Can not open '%s' for read\n", fname); return; } if (mesh_load_file(&ia, f) != 0) - pcb_message(PCB_MSG_ERROR, "Loading mesh settings from '%s' failed.\n", fname); + rnd_message(PCB_MSG_ERROR, "Loading mesh settings from '%s' failed.\n", fname); fclose(f); } Index: trunk/src_plugins/export_openems/mesh.h =================================================================== --- trunk/src_plugins/export_openems/mesh.h (revision 30902) +++ trunk/src_plugins/export_openems/mesh.h (revision 30903) @@ -22,17 +22,17 @@ pcb_layer_t *layer; /* input layer (objects are picked up from this layer) */ pcb_layer_t *ui_layer_xy, *ui_layer_z; /* optional UI layers to draw the mesh on */ char *ui_name_xy; /* name of the UI layer */ - pcb_coord_t dens_obj, dens_gap; /* target density: distance between mesh lines above objects and above gaps */ - pcb_coord_t min_space; /* make sure there's always at least this much space between two mesh lines */ - pcb_coord_t def_subs_thick; /* default substrate thickness */ - pcb_coord_t def_copper_thick; /* default copper thickness */ + rnd_coord_t dens_obj, dens_gap; /* target density: distance between mesh lines above objects and above gaps */ + rnd_coord_t min_space; /* make sure there's always at least this much space between two mesh lines */ + rnd_coord_t def_subs_thick; /* default substrate thickness */ + rnd_coord_t def_copper_thick; /* default copper thickness */ pcb_mesh_lines_t line[PCB_MESH_max]; /* actual lines of the mesh */ const char *bnd[6]; /* temporary: boundary conditions */ - pcb_coord_t z_bottom_copper; /* z coordinate of the bottom copper layer, along the z-mesh (0 is the top copper) */ + rnd_coord_t z_bottom_copper; /* z coordinate of the bottom copper layer, along the z-mesh (0 is the top copper) */ int pml; /* add pml cells around the exterior of the existing mesh of "perfectly matched" impedance */ int subslines; /* number of mesh lines in substrate (z) */ - pcb_coord_t dens_air; /* mesh line density (spacing) in air */ - pcb_coord_t max_air; /* how far out to mesh in air */ + rnd_coord_t dens_air; /* mesh line density (spacing) in air */ + rnd_coord_t max_air; /* how far out to mesh in air */ unsigned hor:1; /* enable adding horizontal mesh lines */ unsigned ver:1; /* enable adding vertical mesh lines */ unsigned smooth:1; /* if set, avoid jumps in the meshing by gradually changing meshing distance: x and y direction */ Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30902) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30903) @@ -429,7 +429,7 @@ free(gc); } -static void openscad_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void openscad_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -458,7 +458,7 @@ gc->cap = style; } -static void openscad_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void openscad_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -471,18 +471,18 @@ #define fix_rect_coords() \ if (x1 > x2) {\ - pcb_coord_t t = x1; \ + rnd_coord_t t = x1; \ x1 = x2; \ x2 = t; \ } \ if (y1 > y2) { \ - pcb_coord_t t = y1; \ + rnd_coord_t t = y1; \ y1 = y2; \ y2 = t; \ } -static void openscad_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openscad_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -492,7 +492,7 @@ x1, y1, x2, y2, 0.0, effective_layer_thickness); } -static void openscad_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openscad_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double length, angle; const char *cap_style; @@ -509,10 +509,10 @@ cap_style = "rc"; pcb_fprintf(f, " pcb_line_%s(%mm, %mm, %mm, %f, %mm, %f);\n", cap_style, - x1, y1, (pcb_coord_t)pcb_round(length), angle * PCB_RAD_TO_DEG, gc->width, effective_layer_thickness); + x1, y1, (rnd_coord_t)pcb_round(length), angle * PCB_RAD_TO_DEG, gc->width, effective_layer_thickness); } -static void openscad_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void openscad_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -524,11 +524,11 @@ openscad_draw_line(gc, x1, y2, x1, y1); } -static void openscad_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void openscad_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { double a, step = delta_angle/10.0, end_angle = start_angle + delta_angle; int first; - pcb_coord_t lx, ly, x, y; + rnd_coord_t lx, ly, x, y; if (step >= 0) { if (step < 1) step = 1; @@ -562,7 +562,7 @@ } } -static void openscad_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void openscad_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { TRX(cx); TRY(cy); @@ -569,7 +569,7 @@ pcb_fprintf(f, " pcb_fcirc(%mm, %mm, %mm, %f);\n", cx, cy, radius, effective_layer_thickness); } -static void openscad_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void openscad_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int n; fprintf(f, " pcb_fill_poly(["); @@ -578,7 +578,7 @@ pcb_fprintf(f, "[%mm,%mm]], %f);\n", TRX_(x[n]+dx), TRY_(y[n]+dy), effective_layer_thickness); } -static void openscad_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void openscad_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { openscad_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } @@ -585,11 +585,11 @@ static void openscad_calibrate(pcb_hid_t *hid, double xval, double yval) { - pcb_message(PCB_MSG_ERROR, "openscad_calibrate() not implemented"); + rnd_message(PCB_MSG_ERROR, "openscad_calibrate() not implemented"); return; } -static void openscad_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int a) +static void openscad_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } @@ -613,7 +613,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to open %s for writing\n", name); + rnd_message(PCB_MSG_ERROR, "Failed to open %s for writing\n", name); RND_ACT_IRES(-1); return 0; } @@ -628,7 +628,7 @@ /* iterate over all islands of a polygon */ for(pa = pcb_poly_island_first(polygon, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_pline_t *pl; int go; Index: trunk/src_plugins/export_openscad/scad_models.c =================================================================== --- trunk/src_plugins/export_openscad/scad_models.c (revision 30902) +++ trunk/src_plugins/export_openscad/scad_models.c (revision 30903) @@ -26,7 +26,7 @@ #include "conf_core.h" -static void scad_insert_model(htsp_t *models, const char *name, pcb_coord_t x0, pcb_coord_t y0, double rot, int on_bottom, const char *transf, const char *param) +static void scad_insert_model(htsp_t *models, const char *name, rnd_coord_t x0, rnd_coord_t y0, double rot, int on_bottom, const char *transf, const char *param) { FILE *fin; char *ref; @@ -68,7 +68,7 @@ } else { htsp_set(models, (char *)name, NULL); - pcb_message(PCB_MSG_WARNING, "openscad: can't find model file for %s in the footprint library\n", name); + rnd_message(PCB_MSG_WARNING, "openscad: can't find model file for %s in the footprint library\n", name); } } ref = htsp_get(models, (char *)name); @@ -111,7 +111,7 @@ PCB_SUBC_LOOP(PCB->Data); { mod = pcb_attribute_get(&subc->Attributes, "openscad"); if (mod != NULL) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; double rot = 0; int on_bottom = 0; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 30902) +++ trunk/src_plugins/export_png/png.c (revision 30903) @@ -85,8 +85,8 @@ static double bloat = 0; static double scale = 1; -static pcb_coord_t x_shift = 0; -static pcb_coord_t y_shift = 0; +static rnd_coord_t x_shift = 0; +static rnd_coord_t y_shift = 0; static int show_solder_side; static long png_drawn_objs = 0; #define SCALE(w) ((int)pcb_round((w)/scale)) @@ -99,7 +99,7 @@ #define NOT_EDGE_Y(y) ((y) != 0 && (y) != PCB->hidlib.size_y) #define NOT_EDGE(x,y) (NOT_EDGE_X(x) || NOT_EDGE_Y(y)) -static void png_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); +static void png_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); /* The result of a failed gdImageColorAllocate() call */ #define BADC -1 @@ -488,7 +488,7 @@ static void png_foot(void) { const char *fmt; - pcb_bool format_error = pcb_false; + rnd_bool format_error = pcb_false; if (photo_mode) png_photo_foot(); @@ -703,7 +703,7 @@ im = gdImageCreate(w, h); if (im == NULL) { - pcb_message(PCB_MSG_ERROR, "png_do_export(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", w, h); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "png_do_export(): gdImageColorAllocateAlpha() returned NULL. Aborting export.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_MSG_ERROR, "png cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -873,7 +873,7 @@ } static pcb_composite_op_t drawing_mode; -static void png_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void png_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { static gdImagePtr dst_im; drawing_mode = op; @@ -886,7 +886,7 @@ if (comp_im == NULL) { comp_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (!comp_im) { - pcb_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(PCB_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) { - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(PCB_MSG_ERROR, "png_set_color(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } } @@ -988,7 +988,7 @@ gc->cap = style; } -static void png_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void png_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -1082,13 +1082,13 @@ int bg, fg; agc->brush = gdImageCreate(r, r); if (agc->brush == NULL) { - pcb_message(PCB_MSG_ERROR, "use_gc(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", r, r); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(PCB_MSG_ERROR, "use_gc(): gdImageColorAllocate() returned NULL. Aborting export.\n"); return; } gdImageColorTransparent(agc->brush, bg); @@ -1128,7 +1128,7 @@ } -static void png_fill_rect_(gdImagePtr im, pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void png_fill_rect_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(im, gc); gdImageSetThickness(im, 0); @@ -1135,12 +1135,12 @@ linewidth = 0; if (x1 > x2) { - pcb_coord_t t = x1; + rnd_coord_t t = x1; x2 = x2; x2 = t; } if (y1 > y2) { - pcb_coord_t t = y1; + rnd_coord_t t = y1; y2 = y2; y2 = t; } @@ -1152,7 +1152,7 @@ have_outline |= doing_outline; } -static void png_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void png_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_fill_rect_(im, gc, x1, y1, x2, y2); if ((im != erase_im) && (erase_im != NULL)) { @@ -1163,11 +1163,11 @@ } -static void png_draw_line_(gdImagePtr im, pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void png_draw_line_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int x1o = 0, y1o = 0, x2o = 0, y2o = 0; if (x1 == x2 && y1 == y2 && !photo_mode) { - pcb_coord_t w = gc->width / 2; + rnd_coord_t w = gc->width / 2; if (gc->cap != pcb_cap_square) png_fill_circle(gc, x1, y1, w); else @@ -1225,7 +1225,7 @@ } } -static void png_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void png_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_draw_line_(im, gc, x1, y1, x2, y2); if ((im != erase_im) && (erase_im != NULL)) { @@ -1235,7 +1235,7 @@ } } -static void png_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void png_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_draw_line(gc, x1, y1, x2, y1); png_draw_line(gc, x2, y1, x2, y2); @@ -1244,7 +1244,7 @@ } -static void png_draw_arc_(gdImagePtr im, pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void png_draw_arc_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { pcb_angle_t sa, ea; @@ -1255,8 +1255,8 @@ /* zero angle arcs need special handling as gd will output either nothing at all or a full circle when passed delta angle of 0 or 360. */ if (delta_angle == 0) { - pcb_coord_t x = (width * cos(start_angle * M_PI / 180)); - pcb_coord_t y = (width * sin(start_angle * M_PI / 180)); + rnd_coord_t x = (width * cos(start_angle * M_PI / 180)); + rnd_coord_t y = (width * sin(start_angle * M_PI / 180)); x = cx - x; y = cy + y; png_fill_circle(gc, x, y, gc->width / 2); @@ -1302,7 +1302,7 @@ gdImageArc(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * width), SCALE(2 * height), sa, ea, gdBrushed); } -static void png_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void png_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { png_draw_arc_(im, gc, cx, cy, width, height, start_angle, delta_angle); if ((im != erase_im) && (erase_im != NULL)) { @@ -1312,9 +1312,9 @@ } } -static void png_fill_circle_(gdImagePtr im, pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void png_fill_circle_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { - pcb_coord_t my_bloat; + rnd_coord_t my_bloat; use_gc(im, gc); @@ -1330,7 +1330,7 @@ gdImageFilledEllipse(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * radius + my_bloat), SCALE(2 * radius + my_bloat), unerase_override ? white->c : gc->color->c); } -static void png_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void png_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { png_fill_circle_(im, gc, cx, cy, radius); if ((im != erase_im) && (erase_im != NULL)) { @@ -1341,7 +1341,7 @@ } -static void png_fill_polygon_offs_(gdImagePtr im, pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void png_fill_polygon_offs_(gdImagePtr im, pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; gdPoint *points; @@ -1365,7 +1365,7 @@ free(points); } -static void png_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void png_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { png_fill_polygon_offs_(im, gc, n_coords, x, y, dx, dy); if ((im != erase_im) && (erase_im != NULL)) { @@ -1376,7 +1376,7 @@ } -static void png_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void png_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { png_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } @@ -1387,7 +1387,7 @@ CRASH("png_calibrate"); } -static void png_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int a) +static void png_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } Index: trunk/src_plugins/export_png/png_photo2.c =================================================================== --- trunk/src_plugins/export_png/png_photo2.c (revision 30902) +++ trunk/src_plugins/export_png/png_photo2.c (revision 30903) @@ -178,7 +178,7 @@ static color_struct *black = NULL, *white = NULL; *photo_im = gdImageCreate(gdImageSX(im), gdImageSY(im)); if (photo_im == NULL) { - pcb_message(PCB_MSG_ERROR, "png_set_layer(): gdImageCreate(%d, %d) returned NULL. Aborting export.\n", gdImageSX(im), gdImageSY(im)); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "png_set_layer(): gdImageColorAllocate() returned NULL. Aborting export.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_ps/eps.c (revision 30903) @@ -31,7 +31,7 @@ typedef struct hid_gc_s { pcb_core_gc_t core_gc; pcb_cap_style_t cap; - pcb_coord_t width; + rnd_coord_t width; unsigned long color; int erase; } hid_gc_s; @@ -39,7 +39,7 @@ static pcb_hid_t eps_hid; static FILE *f = 0; -static pcb_coord_t linewidth = -1; +static rnd_coord_t linewidth = -1; static int lastcap = -1; static int lastcolor = -1; static int print_group[PCB_MAX_LAYERGRP]; @@ -188,7 +188,7 @@ if (options_[HA_as_shown].lng && conf_core.editor.show_solder_side) pcb_fprintf(f, "-1 1 scale %mi 0 translate\n", bounds->X1 - bounds->X2); -#define Q (pcb_coord_t) PCB_MIL_TO_COORD(10) +#define Q (rnd_coord_t) PCB_MIL_TO_COORD(10) pcb_fprintf(f, "/nclip { %mi %mi moveto %mi %mi lineto %mi %mi lineto %mi %mi lineto %mi %mi lineto eoclip newpath } def\n", bounds->X1 - Q, bounds->Y1 - Q, bounds->X1 - Q, bounds->Y2 + Q, @@ -349,11 +349,11 @@ if (pcb_cam_end(&eps_cam) == 0) { if (!eps_cam.okempty_group) - pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_MSG_ERROR, "eps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -443,7 +443,7 @@ free(gc); } -static void eps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void eps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { if (direct) return; @@ -492,7 +492,7 @@ gc->cap = style; } -static void eps_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void eps_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -533,18 +533,18 @@ } } -static void eps_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); -static void eps_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); +static void eps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +static void eps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); -static void eps_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void eps_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -static void eps_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void eps_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - pcb_coord_t w = gc->width / 2; + rnd_coord_t w = gc->width / 2; if (x1 == x2 && y1 == y2) { if (gc->cap == pcb_cap_square) eps_fill_rect(gc, x1 - w, y1 - w, x1 + w, y1 + w); @@ -558,8 +558,8 @@ double dx = w * sin(ang); double dy = -w * cos(ang); double deg = ang * 180.0 / M_PI; - pcb_coord_t vx1 = x1 + dx; - pcb_coord_t vy1 = y1 + dy; + rnd_coord_t vx1 = x1 + dx; + rnd_coord_t vy1 = y1 + dy; pcb_fprintf(f, "%mi %mi moveto ", vx1, vy1); pcb_fprintf(f, "%mi %mi %mi %g %g arc\n", x2, y2, w, deg - 90, deg + 90); @@ -571,7 +571,7 @@ pcb_fprintf(f, "%mi %mi %mi %mi %s\n", x1, y1, x2, y2, gc->erase ? "tc" : "t"); } -static void eps_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void eps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { pcb_angle_t sa, ea; double w; @@ -600,13 +600,13 @@ pcb_fprintf(f, "%ma %ma %mi %mi %mi %mi %f a\n", sa, ea, -width, height, cx, cy, (double) linewidth / w); } -static void eps_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void eps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %s\n", cx, cy, radius, gc->erase ? "cc" : "c"); } -static void eps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void eps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; const char *op = "moveto"; @@ -619,13 +619,13 @@ fprintf(f, "fill\n"); } -static void eps_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void eps_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { eps_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void eps_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void eps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); @@ -636,7 +636,7 @@ CRASH("eps_calibrate"); } -static void eps_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void eps_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 30902) +++ trunk/src_plugins/export_ps/ps.c (revision 30903) @@ -39,7 +39,7 @@ pcb_core_gc_t core_gc; pcb_hid_t *me_pointer; pcb_cap_style_t cap; - pcb_coord_t width; + rnd_coord_t width; unsigned char r, g, b; int erase; int faded; @@ -299,27 +299,27 @@ FILE *f; int pagecount; - pcb_coord_t linewidth; + rnd_coord_t linewidth; double fade_ratio; - pcb_bool multi_file; - pcb_bool multi_file_cam; - pcb_coord_t media_width, media_height, ps_width, ps_height; + rnd_bool multi_file; + rnd_bool multi_file_cam; + rnd_coord_t media_width, media_height, ps_width, ps_height; const char *filename; - pcb_bool drill_helper; - pcb_coord_t drill_helper_size; - pcb_bool align_marks; - pcb_bool outline; - pcb_bool mirror; - pcb_bool fillpage; - pcb_bool automirror; - pcb_bool incolor; - pcb_bool doing_toc; - pcb_bool invert; + rnd_bool drill_helper; + rnd_coord_t drill_helper_size; + rnd_bool align_marks; + rnd_bool outline; + rnd_bool mirror; + rnd_bool fillpage; + rnd_bool automirror; + rnd_bool incolor; + rnd_bool doing_toc; + rnd_bool invert; int media_idx; - pcb_bool drillcopper; - pcb_bool legend; - pcb_bool single_page; + rnd_bool drillcopper; + rnd_bool legend; + rnd_bool single_page; int has_outline; double scale_factor; @@ -328,11 +328,11 @@ pcb_hid_attr_val_t ps_values[NUM_OPTIONS]; - pcb_bool is_mask; - pcb_bool is_drill; - pcb_bool is_assy; - pcb_bool is_copper; - pcb_bool is_paste; + rnd_bool is_mask; + rnd_bool is_drill; + rnd_bool is_assy; + rnd_bool is_copper; + rnd_bool is_paste; pcb_composite_op_t drawing_mode; int ovr_all; @@ -661,11 +661,11 @@ if (pcb_cam_end(&ps_cam) == 0) { if (!ps_cam.okempty_group) - pcb_message(PCB_MSG_ERROR, "ps cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "ps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_MSG_ERROR, "ps cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -676,11 +676,11 @@ return pcb_hid_parse_command_line(argc, argv); } -static void corner(FILE * fh, pcb_coord_t x, pcb_coord_t y, int dx, int dy) +static void corner(FILE * fh, rnd_coord_t x, rnd_coord_t y, int dx, int dy) { - pcb_coord_t len = PCB_MIL_TO_COORD(2000); - pcb_coord_t len2 = PCB_MIL_TO_COORD(200); - pcb_coord_t thick = 0; + rnd_coord_t len = PCB_MIL_TO_COORD(2000); + rnd_coord_t len2 = PCB_MIL_TO_COORD(200); + rnd_coord_t thick = 0; /* * Originally 'thick' used thicker lines. Currently is uses * Postscript's "device thin" line - i.e. zero width means one @@ -873,8 +873,8 @@ * If users don't want to make smaller boards, or use fewer drill * sizes, they can always ignore this sheet. */ if (PCB_LAYER_IS_FAB(flags, purpi)) { - pcb_coord_t natural = boffset - PCB_MIL_TO_COORD(500) - PCB->hidlib.size_y / 2; - pcb_coord_t needed = pcb_stub_draw_fab_overhang(); + rnd_coord_t natural = boffset - PCB_MIL_TO_COORD(500) - PCB->hidlib.size_y / 2; + rnd_coord_t needed = pcb_stub_draw_fab_overhang(); pcb_fprintf(global.f, "%% PrintFab overhang natural %mi, needed %mi\n", natural, needed); if (needed > natural) pcb_fprintf(global.f, "0 %mi translate\n", needed - natural); @@ -922,7 +922,7 @@ if (global.drill_helper) pcb_fprintf(global.f, "/dh { gsave %mi setlinewidth 0 gray %mi 0 360 arc stroke grestore} bind def\n", - (pcb_coord_t) global.drill_helper_size, (pcb_coord_t) (global.drill_helper_size * 3 / 2)); + (rnd_coord_t) global.drill_helper_size, (rnd_coord_t) (global.drill_helper_size * 3 / 2)); } #if 0 /* Try to outsmart ps2pdf's heuristics for page rotation, by putting @@ -963,7 +963,7 @@ free(gc); } -static void ps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void ps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { global.drawing_mode = op; } @@ -996,7 +996,7 @@ gc->cap = style; } -static void ps_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void ps_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -1070,16 +1070,16 @@ } } -static void ps_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ps_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(global.f, "%mi %mi %mi %mi dr\n", x1, y1, x2, y2); } -static void ps_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); -static void ps_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); +static void ps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +static void ps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); -static void ps_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ps_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { #if 0 /* If you're etching your own paste mask, this will reduce the @@ -1086,7 +1086,7 @@ amount of brass you need to etch by drawing outlines for large pads. See also ps_fill_rect. */ if (is_paste && gc->width > 2500 && gc->cap == pcb_cap_square && (x1 == x2 || y1 == y2)) { - pcb_coord_t t, w; + rnd_coord_t t, w; if (x1 > x2) { t = x1; x1 = x2; @@ -1103,7 +1103,7 @@ } #endif if (x1 == x2 && y1 == y2) { - pcb_coord_t w = gc->width / 2; + rnd_coord_t w = gc->width / 2; if (gc->cap == pcb_cap_square) ps_fill_rect(gc, x1 - w, y1 - w, x1 + w, y1 + w); else @@ -1114,7 +1114,7 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi t\n", x1, y1, x2, y2); } -static void ps_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { pcb_angle_t sa, ea; double w; @@ -1144,7 +1144,7 @@ sa, ea, -width, height, cx, cy, (double)(global.linewidth) / w); } -static void ps_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void ps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { use_gc(gc); if (!gc->erase || !global.is_copper || global.drillcopper) { @@ -1154,7 +1154,7 @@ } } -static void ps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void ps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; const char *op = "moveto"; @@ -1166,7 +1166,7 @@ fprintf(global.f, "fill\n"); } -static void ps_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void ps_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { ps_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } @@ -1173,11 +1173,11 @@ typedef struct { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; } lseg_t; typedef struct { - pcb_coord_t x, y; + rnd_coord_t x, y; } lpoint_t; #define minmax(val, min, max) \ @@ -1217,20 +1217,20 @@ int coord_comp(const void *c1_, const void *c2_) { - const pcb_coord_t *c1 = c1_, *c2 = c2_; + const rnd_coord_t *c1 = c1_, *c2 = c2_; return *c1 < *c2; } -static void ps_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); if (x1 > x2) { - pcb_coord_t t = x1; + rnd_coord_t t = x1; x1 = x2; x2 = t; } if (y1 > y2) { - pcb_coord_t t = y1; + rnd_coord_t t = y1; y1 = y2; y2 = t; } @@ -1351,7 +1351,7 @@ if (xval < 2) ps_attribute_list[HA_xcalib].default_val.dbl = global.calibration_x = xval; else - pcb_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(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); } 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 - pcb_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(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); } return; } @@ -1410,7 +1410,7 @@ ps_calibrate_1(hid, xval, yval, 0); } -static void ps_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void ps_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 30902) +++ trunk/src_plugins/export_stat/stat.c (revision 30903) @@ -123,7 +123,7 @@ } typedef struct layer_stat_s { - pcb_coord_t trace_len; + rnd_coord_t trace_len; double copper_area; unsigned long int lines, arcs, polys, elements; } layer_stat_t; @@ -138,7 +138,7 @@ layer_stat_t ls, *lgs, lgss[PCB_MAX_LAYERGRP]; int nl, phg, hp, hup, group_not_empty[PCB_MAX_LAYERGRP]; pcb_cardinal_t num_etop = 0, num_ebottom = 0, num_esmd = 0, num_epads = 0, num_epins = 0, num_terms = 0, num_slots = 0; - pcb_coord_t width, height; + rnd_coord_t width, height; pcb_cam_t cam; memset(lgss, 0, sizeof(lgss)); @@ -199,7 +199,7 @@ memset(&ls, 0, sizeof(ls)); PCB_LINE_LOOP(l) { - pcb_coord_t v; + rnd_coord_t v; double d; lgs->lines++; ls.lines++; @@ -214,7 +214,7 @@ PCB_END_LOOP; PCB_ARC_LOOP(l) { - pcb_coord_t v; + rnd_coord_t v; double d; lgs->arcs++; ls.arcs++; Index: trunk/src_plugins/export_stl/export_stl.c =================================================================== --- trunk/src_plugins/export_stl/export_stl.c (revision 30902) +++ trunk/src_plugins/export_stl/export_stl.c (revision 30903) @@ -82,20 +82,20 @@ return stl_attribute_list; } -static void stl_print_horiz_tri(FILE *f, fp2t_triangle_t *t, int up, pcb_coord_t z) +static void stl_print_horiz_tri(FILE *f, fp2t_triangle_t *t, int up, rnd_coord_t z) { fprintf(f, " facet normal 0 0 %d\n", up ? 1 : -1); fprintf(f, " outer loop\n"); if (up) { - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[0]->X, (pcb_coord_t)t->Points[0]->Y, z); - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[1]->X, (pcb_coord_t)t->Points[1]->Y, z); - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[2]->X, (pcb_coord_t)t->Points[2]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[0]->X, (rnd_coord_t)t->Points[0]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[1]->X, (rnd_coord_t)t->Points[1]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[2]->X, (rnd_coord_t)t->Points[2]->Y, z); } else { - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[2]->X, (pcb_coord_t)t->Points[2]->Y, z); - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[1]->X, (pcb_coord_t)t->Points[1]->Y, z); - pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (pcb_coord_t)t->Points[0]->X, (pcb_coord_t)t->Points[0]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[2]->X, (rnd_coord_t)t->Points[2]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[1]->X, (rnd_coord_t)t->Points[1]->Y, z); + pcb_fprintf(f, " vertex %.09mm %.09mm %.09mm\n", (rnd_coord_t)t->Points[0]->X, (rnd_coord_t)t->Points[0]->Y, z); } fprintf(f, " endloop\n"); @@ -102,7 +102,7 @@ fprintf(f, " endfacet\n"); } -static void stl_print_vert_tri(FILE *f, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t z0, pcb_coord_t z1) +static void stl_print_vert_tri(FILE *f, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t z0, rnd_coord_t z1) { double vx, vy, nx, ny, len; @@ -129,7 +129,7 @@ fprintf(f, " endfacet\n"); } -int stl_hid_export_to_file(FILE *f, pcb_hid_attr_val_t *options, pcb_coord_t maxy, pcb_coord_t z0, pcb_coord_t z1) +int stl_hid_export_to_file(FILE *f, pcb_hid_attr_val_t *options, rnd_coord_t maxy, rnd_coord_t z0, rnd_coord_t z1) { pcb_poly_t *poly = pcb_topoly_1st_outline(PCB, PCB_TOPOLY_FLOATING); size_t mem_req = fp2t_memory_required(poly->PointN); @@ -187,7 +187,7 @@ int i; pcb_cam_t cam; FILE *f; - pcb_coord_t thick; + rnd_coord_t thick; if (!options) { stl_get_export_options(hid, 0); @@ -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) { - pcb_message(PCB_MSG_WARNING, "STL: can not determine board thickness - falling back to hardwired 1.6mm\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/export_svg/svg.c (revision 30903) @@ -117,7 +117,7 @@ const char *bright; const char *normal; const char *dark; - pcb_coord_t offs; + rnd_coord_t offs; } photo_palette[] = { /* MASK */ { "#00ff00", "#00ff00", "#00ff00", PCB_MM_TO_COORD(0) }, /* SILK */ { "#ffffff", "#eeeeee", "#aaaaaa", PCB_MM_TO_COORD(0) }, @@ -288,7 +288,7 @@ static void svg_header(void) { - pcb_coord_t w, h, x1, y1, x2, y2; + rnd_coord_t w, h, x1, y1, x2, y2; fprintf(f, "\n"); w = PCB->hidlib.size_x; @@ -369,11 +369,11 @@ if (pcb_cam_end(&svg_cam) == 0) { if (!svg_cam.okempty_group) - pcb_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content (layer group missing)\n", options[HA_cam].str); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); + rnd_message(PCB_MSG_ERROR, "svg cam export for '%s' failed to produce any content (no objects)\n", options[HA_cam].str); } } @@ -486,7 +486,7 @@ free(gc); } -static void svg_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void svg_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { drawing_mode = op; @@ -561,7 +561,7 @@ gc->cap = style; } -static void svg_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void svg_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width < PCB_MM_TO_COORD(0.01) ? PCB_MM_TO_COORD(0.01) : width; } @@ -592,17 +592,17 @@ #define fix_rect_coords() \ if (x1 > x2) {\ - pcb_coord_t t = x1; \ + rnd_coord_t t = x1; \ x1 = x2; \ x2 = t; \ } \ if (y1 > y2) { \ - pcb_coord_t t = y1; \ + rnd_coord_t t = y1; \ y1 = y2; \ y2 = t; \ } -static void draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t w, pcb_coord_t h, pcb_coord_t stroke) +static void draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h, rnd_coord_t stroke) { const char *clip_color = svg_clip_color(gc); @@ -616,7 +616,7 @@ } } -static void svg_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void svg_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; fix_rect_coords(); @@ -623,11 +623,11 @@ draw_rect(gc, x1, y1, x2-x1, y2-y1, gc->width); } -static void draw_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t w, pcb_coord_t h) +static void draw_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { - pcb_coord_t photo_offs = photo_palette[photo_color].offs; + rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sdark); pcb_append_printf(&sdark, "\n", @@ -650,7 +650,7 @@ } } -static void svg_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void svg_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -658,11 +658,11 @@ draw_fill_rect(gc, x1, y1, x2-x1, y2-y1); } -static void pcb_line_draw(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void pcb_line_draw(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { - pcb_coord_t photo_offs = photo_palette[photo_color].offs; + rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sbright); pcb_append_printf(&sbright, "\n", @@ -686,7 +686,7 @@ } } -static void svg_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void svg_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -693,11 +693,11 @@ pcb_line_draw(gc, x1, y1, x2, y2); } -static void pcb_arc_draw(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t r, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t stroke, int large, int sweep) +static void pcb_arc_draw(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t r, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t stroke, int large, int sweep) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { - pcb_coord_t photo_offs = photo_palette[photo_color].offs; + rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { indent(&sbright); pcb_append_printf(&sbright, "\n", @@ -720,9 +720,9 @@ } } -static void svg_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void svg_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { - pcb_coord_t x1, y1, x2, y2, diff = 0, diff2, maxdiff; + rnd_coord_t x1, y1, x2, y2, diff = 0, diff2, maxdiff; pcb_angle_t sa, ea; svg_drawn_objs++; @@ -742,7 +742,7 @@ maxdiff = height; if (diff2 > maxdiff / 1000) { if (!gc->warned_elliptical) { - pcb_message(PCB_MSG_ERROR, "Can't draw elliptical arc on svg; object omitted; expect BROKEN TRACE\n"); + rnd_message(PCB_MSG_ERROR, "Can't draw elliptical arc on svg; object omitted; expect BROKEN TRACE\n"); gc->warned_elliptical = 1; } return; @@ -779,7 +779,7 @@ pcb_arc_draw(gc, x1, y1, width, x2, y2, gc->width, (fabs(delta_angle) > 180), (delta_angle < 0.0)); } -static void draw_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t r, pcb_coord_t stroke) +static void draw_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, rnd_coord_t stroke) { const char *clip_color = svg_clip_color(gc); @@ -787,7 +787,7 @@ if ((photo_mode) && (clip_color == NULL)) { if (!drawing_hole) { - pcb_coord_t photo_offs = photo_palette[photo_color].offs; + rnd_coord_t photo_offs = photo_palette[photo_color].offs; if ((!gc->drill) && (photo_offs != 0)) { indent(&sbright); pcb_append_printf(&sbright, "\n", @@ -817,7 +817,7 @@ } } -static void svg_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void svg_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { svg_drawn_objs++; TRX(cx); TRY(cy); @@ -824,7 +824,7 @@ draw_fill_circle(gc, cx, cy, radius, 0); } -static void draw_poly(gds_t *s, pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y, pcb_coord_t dx, pcb_coord_t dy, const char *clr) +static void draw_poly(gds_t *s, pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y, rnd_coord_t dx, rnd_coord_t dy, const char *clr) { int i; float poly_bloat = 0.01; @@ -832,7 +832,7 @@ indent(s); gds_append_str(s, "\n", poly_bloat, clr, clr); } -static void svg_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void svg_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { const char *clip_color = svg_clip_color(gc); svg_drawn_objs++; if ((photo_mode) && (clip_color == NULL)) { - pcb_coord_t photo_offs = photo_palette[photo_color].offs; + rnd_coord_t photo_offs = photo_palette[photo_color].offs; if (photo_offs != 0) { draw_poly(&sbright, gc, n_coords, x, y, dx-photo_offs, dy-photo_offs, photo_palette[photo_color].bright); draw_poly(&sdark, gc, n_coords, x, y, dx+photo_offs, dy+photo_offs, photo_palette[photo_color].dark); @@ -858,7 +858,7 @@ } } -static void svg_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void svg_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { svg_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } @@ -866,11 +866,11 @@ static void svg_calibrate(pcb_hid_t *hid, double xval, double yval) { - pcb_message(PCB_MSG_ERROR, "svg_calibrate() not implemented"); + rnd_message(PCB_MSG_ERROR, "svg_calibrate() not implemented"); return; } -static void svg_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int a) +static void svg_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30902) +++ trunk/src_plugins/export_xy/xy.c (revision 30903) @@ -114,7 +114,7 @@ int len; if (sep == NULL) { - pcb_message(PCB_MSG_ERROR, "export_xy: ignoring invalid template name (missing period): '%s'\n", li->name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "export_xy: ignoring invalid template name (too long): '%s'\n", li->name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "export_xy: can not set up export options: no template available\n"); + rnd_message(PCB_MSG_ERROR, "export_xy: can not set up export options: no template available\n"); return NULL; } @@ -164,18 +164,18 @@ char utcTime[64]; char *name, *descr, *value; const char *pad_netname; - pcb_coord_t x, y; + rnd_coord_t x, y; double theta, xray_theta; pcb_subc_t *subc; - pcb_coord_t pad_cx, pad_cy; - pcb_coord_t pad_w, pad_h; - pcb_coord_t prpad_cx, prpad_cy; - pcb_coord_t prpad_w, prpad_h; + rnd_coord_t pad_cx, pad_cy; + rnd_coord_t pad_w, pad_h; + rnd_coord_t prpad_cx, prpad_cy; + rnd_coord_t prpad_w, prpad_h; pcb_cardinal_t count; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; int origin_score; char *origin_tmp; - pcb_bool front; + rnd_bool front; } subst_ctx_t; /* Find the pick and place 0;0 mark, if there is any */ @@ -208,7 +208,7 @@ } } -static void calc_pad_bbox_(subst_ctx_t *ctx, pcb_coord_t *pw, pcb_coord_t *ph, pcb_coord_t *pcx, pcb_coord_t *pcy) +static void calc_pad_bbox_(subst_ctx_t *ctx, rnd_coord_t *pw, rnd_coord_t *ph, rnd_coord_t *pcx, rnd_coord_t *pcy) { pcb_box_t box; box.X1 = box.Y1 = PCB_MAX_COORD; @@ -282,7 +282,7 @@ } } -static void calc_pad_bbox(subst_ctx_t *ctx, int prerot, pcb_coord_t *pw, pcb_coord_t *ph, pcb_coord_t *pcx, pcb_coord_t *pcy) +static void calc_pad_bbox(subst_ctx_t *ctx, int prerot, rnd_coord_t *pw, rnd_coord_t *ph, rnd_coord_t *pcx, rnd_coord_t *pcy) { if (prerot) { pcb_subc_t *save, *sc_rot0; @@ -391,7 +391,7 @@ end = strpbrk(*input, "?|%"); len = end - *input; if (len >= sizeof(aname) - 1) { - pcb_message(PCB_MSG_ERROR, "xy tempalte error: attribute name '%s' too long\n", *input); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "xy tempalte error: elem atribute '|unknown' field '%s' too long\n", *input); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "xy tempalte error: elem atribute trenary field '%s' too long\n", *input); + rnd_message(PCB_MSG_ERROR, "xy tempalte error: elem atribute trenary field '%s' too long\n", *input); return 1; } @@ -646,7 +646,7 @@ } } -static void xy_translate(subst_ctx_t *ctx, pcb_coord_t *x, pcb_coord_t *y) +static void xy_translate(subst_ctx_t *ctx, rnd_coord_t *x, rnd_coord_t *y) { /* translate the xy coords using explicit or implicit origin; implicit origin is lower left corner (looking from top) of board extents */ @@ -670,7 +670,7 @@ fp = pcb_fopen_askovr(&PCB->hidlib, xy_filename, "w", NULL); if (!fp) { - pcb_message(PCB_MSG_ERROR, "Cannot open file %s for writing\n", xy_filename); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "xy: can't get subc origin for %s\n", ctx.name); + rnd_message(PCB_MSG_ERROR, "xy: can't get subc origin for %s\n", ctx.name); - if (pcb_subc_get_rotation(subc, &ctx.theta) != 0) pcb_message(PCB_MSG_ERROR, "xy: can't get subc rotation for %s\n", ctx.name); - if (pcb_subc_get_side(subc, &bott) != 0) pcb_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(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); 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) { - pcb_message(PCB_MSG_ERROR, "export_xy: ignoring template '%s': name too long\n", i->name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "export_xy: ignoring template '%s': does not have a .section suffix\n", i->name); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "export_xy: invalid template selected\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/extedit/extedit.c (revision 30903) @@ -84,7 +84,7 @@ pcb_hidval_t wid; } extedit_wait_t; -pcb_bool extedit_fd_watch(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data) +rnd_bool extedit_fd_watch(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data) { char tmp[128]; int res; @@ -178,7 +178,7 @@ int bn = PCB_MAX_BUFFER - 1, load_bn = PCB_MAX_BUFFER - 1; int obn = conf_core.editor.buffer_number; int paste = 0, del_selected = 0; - pcb_coord_t pastex = 0, pastey = 0; + rnd_coord_t pastex = 0, pastey = 0; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, extedit, cmd = argv[1].val.str); rnd_PCB_ACT_MAY_CONVARG(2, FGW_STR, extedit, method = argv[2].val.str); @@ -185,7 +185,7 @@ /* pick up the object to edit */ if ((cmd == NULL) || (pcb_strcasecmp(cmd, "object") == 0)) { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to edit", &x, &y, 0); type = pcb_search_screen(x, y, EXTEDIT_TYPES, &ptr1, &ptr2, &ptr3); @@ -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) { - pcb_message(PCB_MSG_ERROR, "Failed to copy target objects to temporary paste buffer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Nothing is selected, can't ext-edit selection\n"); + rnd_message(PCB_MSG_WARNING, "Nothing is selected, can't ext-edit selection\n"); goto quit0; } } @@ -213,12 +213,12 @@ else if ((argc > 1) && (pcb_strcasecmp(cmd, "buffer") == 0)) { load_bn = bn = conf_core.editor.buffer_number; if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { - pcb_message(PCB_MSG_WARNING, "Nothing in current buffer, can't ext-edit selection\n"); + rnd_message(PCB_MSG_WARNING, "Nothing in current buffer, can't ext-edit selection\n"); goto quit0; } } else { - pcb_message(PCB_MSG_ERROR, "Wrong 1st argument '%s'\n", cmd); + rnd_message(PCB_MSG_ERROR, "Wrong 1st argument '%s'\n", cmd); ret = 1; goto quit0; } @@ -230,13 +230,13 @@ break; } if (mth->name == NULL) { - pcb_message(PCB_MSG_ERROR, "unknown method '%s'; available methods:\n", method); + rnd_message(PCB_MSG_ERROR, "unknown method '%s'; available methods:\n", method); for(mth = methods; mth->name != NULL; mth++) { if (mth != methods) - pcb_message(PCB_MSG_ERROR, ", ", mth->name); - pcb_message(PCB_MSG_ERROR, "%s", mth->name); + rnd_message(PCB_MSG_ERROR, ", ", mth->name); + rnd_message(PCB_MSG_ERROR, "%s", mth->name); } - pcb_message(PCB_MSG_ERROR, "\n"); + rnd_message(PCB_MSG_ERROR, "\n"); ret = 1; goto quit0; } @@ -252,7 +252,7 @@ tmp_fn = pcb_tempfile_name_new("extedit"); tmp_cfg_fn = pcb_tempfile_name_new("extedit_cfg"); if ((tmp_fn == NULL) || (tmp_cfg_fn == NULL)) { - pcb_message(PCB_MSG_ERROR, "Failed to create temporary file\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to open temporary file\n"); + rnd_message(PCB_MSG_ERROR, "Failed to open temporary file\n"); goto quit1; } @@ -280,7 +280,7 @@ if (res != 0) { fclose(f); - pcb_message(PCB_MSG_ERROR, "Failed to export target objects to lihata footprint.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to load the edited footprint. File left at '%s'.\n", tmp_fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/exto_std/bus.c (revision 30903) @@ -33,12 +33,12 @@ PCB_DAD_DECL_NOINIT(dlg) int gui_active; int width; - pcb_coord_t pitch; - pcb_coord_t thickness; - pcb_coord_t clearance; + rnd_coord_t pitch; + rnd_coord_t thickness; + rnd_coord_t clearance; /* cache: */ - pcb_coord_t vthickness; /* virtual thickness (edit object's) */ + rnd_coord_t vthickness; /* virtual thickness (edit object's) */ } bus_t; static void pcb_bus_del_pre(pcb_subc_t *subc) @@ -97,7 +97,7 @@ static int close_enough(pcb_point_t a, pcb_point_t b) { - pcb_coord_t dx = a.X - b.X, dy = a.Y - b.Y; + rnd_coord_t dx = a.X - b.X, dy = a.Y - b.Y; if (dx < -1) return 0; if (dx > +1) return 0; @@ -196,8 +196,8 @@ for(n = 0; n < bus->width; n++,o-=bus->pitch) { double o2 = -o; -/* pcb_trace(" off1: %f %f %ml = %ml\n", vx, tune1, (pcb_coord_t)o, (pcb_coord_t)(vx * tune1 * o)); - pcb_trace(" off2: %f %f %ml = %ml\n", vx, tune2, (pcb_coord_t)o, (pcb_coord_t)(vx * tune2 * 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));*/ 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, @@ -227,7 +227,7 @@ pcb_hid_set_line_width(pcb_draw_out.fgGC, -1); for(l = linelist_first(&ly->Line); l != NULL; l = linelist_next(l)) { - pcb_coord_t x, y; + rnd_coord_t x, y; double o; bus_seg_def; Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 30902) +++ trunk/src_plugins/exto_std/cord.c (revision 30903) @@ -110,7 +110,7 @@ cord_get_ends(subc, group, &e1, &a1, &e2, &a2); if ((e1 == NULL) || (e2 == NULL)) { - pcb_message(PCB_MSG_ERROR, "extended object cord: failed to generate cord for #%ld group %s: missing endpoint\n", subc->ID, group); + rnd_message(PCB_MSG_ERROR, "extended object cord: failed to generate cord for #%ld group %s: missing endpoint\n", subc->ID, group); return -1; } @@ -133,7 +133,7 @@ if ((a1 != NULL) && (a2 != NULL)) { double t, it, t2, t3, it2, it3, step = 1.0/25.0; - pcb_coord_t lx, ly, x, y; + rnd_coord_t lx, ly, x, y; lx = e1->x; ly = e1->y; for(t = step; t <= 1.0+step/2.0; t += step) { @@ -273,10 +273,10 @@ return pcb_pstk_proto_insert_dup(data, &proto, 1, 0); } -static pcb_pstk_t *endpt_pstk(pcb_subc_t *subc, const char *ptidx, pcb_cardinal_t pid, pcb_coord_t x, pcb_coord_t y, pcb_coord_t ox, pcb_coord_t oy, const char *term, const char *grp, int floater) +static pcb_pstk_t *endpt_pstk(pcb_subc_t *subc, const char *ptidx, pcb_cardinal_t pid, rnd_coord_t x, rnd_coord_t y, rnd_coord_t ox, rnd_coord_t oy, const char *term, const char *grp, int floater) { pcb_pstk_t *ps; - pcb_coord_t dx = ox-x, dy = oy-y, cpx = x+dx/4, cpy = y+dy/4, cpr = PCB_MM_TO_COORD(0.5); + rnd_coord_t dx = ox-x, dy = oy-y, cpx = x+dx/4, cpy = y+dy/4, cpr = PCB_MM_TO_COORD(0.5); pcb_layer_t *ely = &subc->data->Layer[LID_EDIT]; @@ -310,7 +310,7 @@ static void conv_pstk(pcb_subc_t *subc, pcb_pstk_t *ps, long *grp, long *term, int *has_origin) { char sgrp[16], sterm[16]; - pcb_coord_t d = PCB_MM_TO_COORD(0.75); + rnd_coord_t d = PCB_MM_TO_COORD(0.75); sprintf(sgrp, "%ld", (*grp)++); @@ -331,7 +331,7 @@ { pcb_subc_t *subc; long n, grp = 1, term = 0; /* for intconn grp needs to start from 1 */ - pcb_coord_t ox = 0, oy = 0, has_origin = 0, has_subc = 0; + rnd_coord_t ox = 0, oy = 0, has_origin = 0, has_subc = 0; pcb_dflgmap_t layers[] = { {"edit", PCB_LYT_DOC, "extobj", 0, 0}, {"target", PCB_LYT_SILK | PCB_LYT_TOP, NULL, 0, 0}, @@ -371,9 +371,9 @@ /* create padstack prototypes */ if (endpt_pstk_proto(subc->data, PCB_LYT_COPPER | PCB_LYT_TOP) != COPPER_END) - pcb_message(PCB_MSG_WARNING, "extended object cord: wrong pstk proto ID for copper end\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_WARNING, "extended object cord: wrong pstk proto ID for silk end\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/exto_std/dimension.c (revision 30903) @@ -36,7 +36,7 @@ int gui_active; int style; - pcb_coord_t displace; + rnd_coord_t displace; const char *fmt; unsigned int valid:1; @@ -133,7 +133,7 @@ } } -static void draw_arrow(dimension *dim, pcb_data_t *data, pcb_layer_t *ly, pcb_coord_t x1, pcb_coord_t y1, double arrx, double arry) +static void draw_arrow(dimension *dim, pcb_data_t *data, pcb_layer_t *ly, rnd_coord_t x1, rnd_coord_t y1, double arrx, double arry) { pcb_poly_t *p = pcb_poly_new(ly, 0, pcb_flag_make(0)); pcb_poly_point_new(p, x1, y1); @@ -151,7 +151,7 @@ pcb_line_t *flt; double ang, deg, dispe, rotsign; double arrx = PCB_MM_TO_COORD(2), arry = PCB_MM_TO_COORD(0.5); - pcb_coord_t x1, y1, x2, y2, x1e, y1e, x2e, y2e, tx, ty, x, y, ex, ey; + rnd_coord_t x1, y1, x2, y2, x1e, y1e, x2e, y2e, tx, ty, x, y, ex, ey; pcb_text_t *t; char ttmp[128]; pcb_any_obj_t *edit_obj; @@ -214,7 +214,7 @@ draw_arrow(dim, subc->data, ly, x2, y2, -arrx, arry); /* text */ - if (pcb_safe_snprintf(ttmp, sizeof(ttmp), PCB_SAFEPRINT_COORD_ONLY | 1, dim->fmt, (pcb_coord_t)dim->len) < 0) + if (pcb_safe_snprintf(ttmp, sizeof(ttmp), PCB_SAFEPRINT_COORD_ONLY | 1, dim->fmt, (rnd_coord_t)dim->len) < 0) strcpy(ttmp, ""); t = pcb_text_new(ly, pcb_font(PCB, 0, 0), 0, 0, 0, 100, 0, ttmp, pcb_flag_make(0)); tx = t->BoundingBox.X2 - t->BoundingBox.X1; @@ -262,7 +262,7 @@ { dimension *dim; pcb_line_t *fline = (pcb_line_t *)floater, bline; - pcb_coord_t fx, fy; + rnd_coord_t fx, fy; double d; char tmp[128]; @@ -288,7 +288,7 @@ d = -d; } -pcb_trace("new disp: %mm f=%mm;%mm\n", (pcb_coord_t)d, fx, fy); +pcb_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; @@ -297,7 +297,7 @@ dimension_clear(subc); dim->displace = d; - pcb_snprintf(tmp, sizeof(tmp), "%.08$mH", (pcb_coord_t)d); + pcb_snprintf(tmp, sizeof(tmp), "%.08$mH", (rnd_coord_t)d); pcb_attribute_put(&subc->Attributes, "extobj::displace", tmp); dimension_gen(subc); } Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 30902) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 30903) @@ -33,8 +33,8 @@ typedef struct { PCB_DAD_DECL_NOINIT(dlg) int gui_active; - pcb_coord_t pitch; - pcb_coord_t clearance; + rnd_coord_t pitch; + rnd_coord_t clearance; } line_of_vias; static void pcb_line_of_vias_del_pre(pcb_subc_t *subc) @@ -100,7 +100,7 @@ pcb_rtree_box_t qbox; pcb_pstk_t *cl; int skip = 0; - pcb_coord_t rx = pcb_round(x), ry = pcb_round(y); + rnd_coord_t rx = pcb_round(x), ry = pcb_round(y); /* skip if there's a via too close */ qbox.x1 = pcb_round(rx - qbox_bloat); qbox.y1 = pcb_round(ry - qbox_bloat); @@ -135,7 +135,7 @@ lov = subc->extobj_data; if (lov->pitch < PCB_MM_TO_COORD(0.001)) { - pcb_message(PCB_MSG_ERROR, "line_of_vias_gen(): can not generate line-of-vias, pitch value is too small\n"); + rnd_message(PCB_MSG_ERROR, "line_of_vias_gen(): can not generate line-of-vias, pitch value is too small\n"); return -1; } @@ -162,7 +162,7 @@ double arrow = PCB_MM_TO_COORD(0.2); double ax, ay, ax1, ay1, ax2, ay2; line_geo_def; - pcb_coord_t x1 = line->Point1.X, y1 = line->Point1.Y, x2 = line->Point2.X, y2 = line->Point2.Y; + rnd_coord_t x1 = line->Point1.X, y1 = line->Point1.Y, x2 = line->Point2.X, y2 = line->Point2.Y; /* line_of_vias *lov = subc->extobj_data;*/ line_geo_calc(line); Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 30902) +++ trunk/src_plugins/fontmode/fontmode.c (revision 30903) @@ -64,7 +64,7 @@ should search the grid for the gridlines and use them to figure out where the symbols are. */ -#define CELL_SIZE ((pcb_coord_t)(PCB_MIL_TO_COORD (100))) +#define CELL_SIZE ((rnd_coord_t)(PCB_MIL_TO_COORD (100))) #define XYtoSym(x,y) (((x) / CELL_SIZE - 1) + (16 * ((y) / CELL_SIZE - 1))) @@ -82,7 +82,7 @@ return &PCB->Data->Layer[lid]; } -static void add_poly(pcb_layer_t *layer, pcb_poly_t *poly, pcb_coord_t ox, pcb_coord_t oy) +static void add_poly(pcb_layer_t *layer, pcb_poly_t *poly, rnd_coord_t ox, rnd_coord_t oy) { pcb_poly_t *np; @@ -108,7 +108,7 @@ font = pcb_font_unlink(PCB, conf_core.design.text_font_id); if (font == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't fetch font id %d\n", conf_core.design.text_font_id); + rnd_message(PCB_MSG_ERROR, "Can't fetch font id %d\n", conf_core.design.text_font_id); return 1; } @@ -150,9 +150,9 @@ for (s = 0; s <= PCB_MAX_FONTPOSITION; s++) { char txt[32]; - pcb_coord_t ox = (s % 16 + 1) * CELL_SIZE; - pcb_coord_t oy = (s / 16 + 1) * CELL_SIZE; - pcb_coord_t w, miny, maxy, maxx = 0; + rnd_coord_t ox = (s % 16 + 1) * CELL_SIZE; + rnd_coord_t oy = (s / 16 + 1) * CELL_SIZE; + rnd_coord_t w, miny, maxy, maxx = 0; symbol = &font->Symbol[s]; @@ -302,9 +302,9 @@ /* pack polygons */ polylist_foreach(&lfont->Polygon, &it, p) { - pcb_coord_t x1 = p->Points[0].X; - pcb_coord_t y1 = p->Points[0].Y; - pcb_coord_t s, ox, oy; + rnd_coord_t x1 = p->Points[0].X; + rnd_coord_t y1 = p->Points[0].Y; + rnd_coord_t s, ox, oy; int n; s = XYtoSym(x1, y1); @@ -324,9 +324,9 @@ /* recalc delta */ linelist_foreach(&lwidth->Line, &it, l) { - pcb_coord_t x1 = l->Point1.X; - pcb_coord_t y1 = l->Point1.Y; - pcb_coord_t ox, s; + rnd_coord_t x1 = l->Point1.X; + rnd_coord_t y1 = l->Point1.Y; + rnd_coord_t ox, s; s = XYtoSym(x1, y1); ox = (s % 16 + 1) * CELL_SIZE; Index: trunk/src_plugins/fp_board/fp_board.c =================================================================== --- trunk/src_plugins/fp_board/fp_board.c (revision 30902) +++ trunk/src_plugins/fp_board/fp_board.c (revision 30903) @@ -35,7 +35,7 @@ /* load file */ memset(&buff, 0, sizeof(buff)); if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != pcb_true) { - pcb_message(PCB_MSG_ERROR, "Warning: failed to load %s\n", fpath); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Warning: failed to load %s\n", fpath); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Internal error: fp_board_fclose() shouldn't have been called. Please report this bug.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 30903) @@ -127,7 +127,7 @@ /* Cache old dir, then cd into subdir because stat is given relative file names. */ memset(olddir, 0, sizeof olddir); if (pcb_get_wd(olddir) == NULL) { - pcb_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine initial working directory\n"); + rnd_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine initial working directory\n"); return 0; } @@ -143,7 +143,7 @@ /* Determine subdir's abs path */ if (pcb_get_wd(new_subdir) == NULL) { - pcb_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine new working directory\n"); + rnd_message(PCB_MSG_ERROR, "fp_fs_list(): Could not determine new working directory\n"); if (chdir(olddir)) pcb_chdir_error_message(olddir); return 0; Index: trunk/src_plugins/fp_wget/edakrill.c =================================================================== --- trunk/src_plugins/fp_wget/edakrill.c (revision 30902) +++ trunk/src_plugins/fp_wget/edakrill.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "edakrill: failed to download the new list\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/fp_wget/gedasymbols.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "gedasymbols: failed to download the new list\n"); + rnd_message(PCB_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/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30902) +++ trunk/src_plugins/hid_batch/batch.c (revision 30903) @@ -161,7 +161,7 @@ return pcb_hid_parse_command_line(argc, argv); } -static void batch_invalidate_lr(pcb_hid_t *hid, pcb_coord_t l, pcb_coord_t r, pcb_coord_t t, pcb_coord_t b) +static void batch_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { } @@ -192,7 +192,7 @@ { } -static void batch_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void batch_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { } @@ -200,31 +200,31 @@ { } -static void batch_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void batch_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void batch_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) +static void batch_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t end_angle) { } -static void batch_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void batch_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void batch_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void batch_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { } -static void batch_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y) +static void batch_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { } -static void batch_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void batch_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { } -static void batch_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void batch_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } @@ -247,11 +247,11 @@ return 0; } -static void batch_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +static void batch_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { } -static void batch_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void batch_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } @@ -267,7 +267,7 @@ } pcb_hidval_t -batch_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, pcb_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), +batch_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t ret; @@ -283,19 +283,19 @@ { } -static void batch_zoom_win(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool set_crosshair) +static void batch_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { } -static void batch_zoom(pcb_hid_t *hid, pcb_coord_t center_x, pcb_coord_t center_y, double factor, int relative) +static void batch_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { } -static void batch_pan(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int relative) +static void batch_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { } -static void batch_pan_mode(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, pcb_bool mode) +static void batch_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { } Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30902) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30903) @@ -38,8 +38,8 @@ GdkGC *clear_gc, *copy_gc; GdkColor grid_color; GdkRectangle clip_rect; - pcb_bool clip_rect_valid; - pcb_bool direct; + rnd_bool clip_rect_valid; + rnd_bool direct; int attached_invalidate_depth; int mark_invalidate_depth; @@ -65,7 +65,7 @@ GdkGC *clip_gc; pcb_color_t pcolor; - pcb_coord_t width; + rnd_coord_t width; gint cap, join; gchar xor_mask; gint sketch_seq; @@ -83,7 +83,7 @@ } /* Returns TRUE only if color_string has been allocated to color. */ -static pcb_bool map_color(const pcb_color_t *inclr, pcb_gtk_color_t *color) +static rnd_bool map_color(const pcb_color_t *inclr, pcb_gtk_color_t *color) { static GdkColormap *colormap = NULL; @@ -141,7 +141,7 @@ static inline void ghid_gdk_draw_grid_global(rnd_hidlib_t *hidlib) { render_priv_t *priv = ghidgui->port.render_priv; - pcb_coord_t x, y, x1, y1, x2, y2, grd; + rnd_coord_t x, y, x1, y1, x2, y2, grd; int n, i; static GdkPoint *points = NULL; static int npoints = 0; @@ -162,12 +162,12 @@ } if (x1 > x2) { - pcb_coord_t tmp = x1; + rnd_coord_t tmp = x1; x1 = x2; x2 = tmp; } if (y1 > y2) { - pcb_coord_t tmp = y1; + rnd_coord_t tmp = y1; y1 = y2; y2 = tmp; } @@ -203,15 +203,15 @@ } } -static void ghid_gdk_draw_grid_local_(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy, int radius) +static void ghid_gdk_draw_grid_local_(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy, int radius) { render_priv_t *priv = ghidgui->port.render_priv; static GdkPoint *points_base = NULL; static GdkPoint *points_abs = NULL; static int apoints = 0, npoints = 0, old_radius = 0; - static pcb_coord_t last_grid = 0; + static rnd_coord_t last_grid = 0; int recalc = 0, n, r2; - pcb_coord_t x, y; + rnd_coord_t x, y; /* PI is approximated with 3.25 here - allows a minimal overallocation, speeds up calculations */ r2 = radius * radius; @@ -259,9 +259,9 @@ static int grid_local_have_old = 0, grid_local_old_r = 0; -static pcb_coord_t grid_local_old_x, grid_local_old_y; +static rnd_coord_t grid_local_old_x, grid_local_old_y; -static void ghid_gdk_draw_grid_local(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy) +static void ghid_gdk_draw_grid_local(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy) { if (grid_local_have_old) { ghid_gdk_draw_grid_local_(hidlib, grid_local_old_x, grid_local_old_y, grid_local_old_r); @@ -320,7 +320,7 @@ } /* ------------------------------------------------------------ */ -static void ghid_gdk_draw_pixmap(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t dw, pcb_coord_t dh) +static void ghid_gdk_draw_pixmap(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t dw, rnd_coord_t dh) { GdkInterpType interp_type; gint src_x, src_y, dst_x, dst_y, w, h, w_src, h_src; @@ -374,7 +374,7 @@ priv->out_clip = priv->sketch_clip; } -static void ghid_gdk_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void ghid_gdk_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { render_priv_t *priv = ghidgui->port.render_priv; @@ -547,7 +547,7 @@ gdk_gc_set_line_attributes(gc->pixel_gc, Vz(gc->width), GDK_LINE_SOLID, (GdkCapStyle) gc->cap, (GdkJoinStyle) gc->join); } -static void ghid_gdk_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void ghid_gdk_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { /* If width is negative then treat it as pixel width, otherwise it is world coordinates. */ if(width < 0) { @@ -632,7 +632,7 @@ return 1; } -static void ghid_gdk_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gdk_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double dx1, dy1, dx2, dy2; render_priv_t *priv = ghidgui->port.render_priv; @@ -666,7 +666,7 @@ gdk_draw_line(priv->out_clip, priv->clip_gc, dx1, dy1, dx2, dy2); } -static void ghid_gdk_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t xradius, pcb_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ghid_gdk_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) { gint vrx2, vry2; double w, h, radius; @@ -717,7 +717,7 @@ (start_angle + 180) * 64, delta_angle * 64); } -static void ghid_gdk_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gdk_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gint w, h, lw, sx1, sy1; render_priv_t *priv = ghidgui->port.render_priv; @@ -770,7 +770,7 @@ } -static void ghid_gdk_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void ghid_gdk_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { gint w, h, vr; render_priv_t *priv = ghidgui->port.render_priv; @@ -789,7 +789,7 @@ /* optimization: draw a single dot if object is too small */ if (pcb_gtk_1dot(radius*2, cx, cy, cx, cy)) { - pcb_coord_t sx1 = Vx(cx), sy1 = Vy(cy); + rnd_coord_t sx1 = Vx(cx), sy1 = Vy(cy); if (pcb_gtk_dot_in_canvas(radius*2, sx1, sy1)) { USE_GC(gc); gdk_draw_point(priv->out_pixel, priv->pixel_gc, sx1, sy1); @@ -806,7 +806,7 @@ /* Decide if a polygon is an axis aligned rectangle; if so, return non-zero and save the corners in b */ -static int poly_is_aligned_rect(pcb_box_t *b, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static int poly_is_aligned_rect(pcb_box_t *b, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { int n, xi1 = 0, yi1 = 0, xi2 = 0, yi2 = 0, xs1 = 0, ys1 = 0, xs2 = 0, ys2 = 0; if (n_coords != 4) @@ -848,13 +848,13 @@ } /* Intentional code duplication for performance */ -static void ghid_gdk_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void ghid_gdk_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { pcb_box_t b; static GdkPoint *points = 0; static int npoints = 0; int i, len, sup = 0; - pcb_coord_t lsx, lsy, lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD, mindist = ghidgui->port.view.coord_per_px * 2; + rnd_coord_t lsx, lsy, lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD, mindist = ghidgui->port.view.coord_per_px * 2; render_priv_t *priv = ghidgui->port.render_priv; USE_GC_NOPEN(gc); @@ -908,7 +908,7 @@ } /* Intentional code duplication for performance */ -static void ghid_gdk_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void ghid_gdk_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { pcb_box_t b; static GdkPoint *points = 0; @@ -915,7 +915,7 @@ static int npoints = 0; int i, len, sup = 0; render_priv_t *priv = ghidgui->port.render_priv; - pcb_coord_t lsx, lsy, lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD, mindist = ghidgui->port.view.coord_per_px * 2; + rnd_coord_t lsx, lsy, lastx = PCB_MAX_COORD, lasty = PCB_MAX_COORD, mindist = ghidgui->port.view.coord_per_px * 2; USE_GC_NOPEN(gc); assert((curr_drawing_mode == PCB_HID_COMP_POSITIVE) || (curr_drawing_mode == PCB_HID_COMP_POSITIVE_XOR) || (curr_drawing_mode == PCB_HID_COMP_NEGATIVE)); @@ -966,7 +966,7 @@ gdk_draw_polygon(priv->out_clip, priv->clip_gc, 1, points, len); } -static void ghid_gdk_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gdk_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gint w, h, lw, xx, yy, sx1, sy1; render_priv_t *priv = ghidgui->port.render_priv; @@ -1105,7 +1105,7 @@ } static int preview_lock = 0; -static void ghid_gdk_invalidate_lr(pcb_hid_t *hid, pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom) +static void ghid_gdk_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { rnd_hidlib_t *hidlib = ghidgui->hidlib; int dleft, dright, dtop, dbottom; @@ -1152,7 +1152,7 @@ } } -static void ghid_gdk_notify_crosshair_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void ghid_gdk_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) { rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = ghidgui->port.render_priv; @@ -1187,7 +1187,7 @@ } } -static void ghid_gdk_notify_mark_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void ghid_gdk_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) { rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = ghidgui->port.render_priv; @@ -1450,8 +1450,8 @@ int save_width, save_height; double xz, yz, vw, vh; render_priv_t *priv = ghidgui->port.render_priv; - pcb_coord_t ox1 = ctx->view.X1, oy1 = ctx->view.Y1, ox2 = ctx->view.X2, oy2 = ctx->view.Y2; - pcb_coord_t save_cpp; + rnd_coord_t ox1 = ctx->view.X1, oy1 = ctx->view.Y1, ox2 = ctx->view.X2, oy2 = ctx->view.Y2; + rnd_coord_t save_cpp; vw = ctx->view.X2 - ctx->view.X1; vh = ctx->view.Y2 - ctx->view.Y1; Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30902) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30903) @@ -34,7 +34,7 @@ /* Sets ghidgui->port.u_gc to the "right" GC to use (wrt mask or window) */ #define USE_GC(gc) if (!use_gc(gc)) return -static pcb_coord_t grid_local_x = 0, grid_local_y = 0, grid_local_radius = 0; +static rnd_coord_t grid_local_x = 0, grid_local_y = 0, grid_local_radius = 0; typedef struct render_priv_s { GdkGLConfig *glconfig; @@ -41,8 +41,8 @@ pcb_color_t bg_color; pcb_color_t offlimits_color; pcb_color_t grid_color; - pcb_bool trans_lines; - pcb_bool in_context; + rnd_bool trans_lines; + rnd_bool in_context; int subcomposite_stencil_bit; unsigned long current_color_packed; double current_alpha_mult; @@ -59,7 +59,7 @@ const pcb_color_t *pcolor; double alpha_mult; - pcb_coord_t width; + rnd_coord_t width; } hid_gc_s; void ghid_gl_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const pcb_box_t *screen) @@ -79,7 +79,7 @@ } /* Returns TRUE only if color_string has been allocated to color. */ -static pcb_bool map_color(const pcb_color_t *inclr, pcb_gtk_color_t *color) +static rnd_bool map_color(const pcb_color_t *inclr, pcb_gtk_color_t *color) { static GdkColormap *colormap = NULL; @@ -180,7 +180,7 @@ return rv; } -void ghid_gl_draw_grid_local(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy) +void ghid_gl_draw_grid_local(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy) { /* cx and cy are the actual cursor snapped to wherever - round them to the nearest real grid point */ grid_local_x = (cx / hidlib->grid) * hidlib->grid + hidlib->grid_ox; @@ -208,12 +208,12 @@ glDisable(GL_COLOR_LOGIC_OP); } -static void pcb_gl_draw_texture(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t bw, pcb_coord_t bh) +static void pcb_gl_draw_texture(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t bw, rnd_coord_t bh) { hidgl_draw_texture_rect( ox,oy,ox+bw,oy+bh, gpm->cache.lng ); } -static void ghid_gl_draw_pixmap(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t bw, pcb_coord_t bh) +static void ghid_gl_draw_pixmap(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t bw, rnd_coord_t bh) { GLuint texture_handle = gpm->cache.lng; if (texture_handle == 0) { @@ -406,7 +406,7 @@ { } -void ghid_gl_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +void ghid_gl_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width < 0 ? (-width) * ghidgui->port.view.coord_per_px : width; } @@ -425,7 +425,7 @@ printf("ghid_gl_set_draw_faded(%p,%d) -- not implemented\n", (void *)gc, faded); } -void ghid_gl_set_line_cap_angle(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void ghid_gl_set_line_cap_angle(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { printf("ghid_gl_set_line_cap_angle() -- not implemented\n"); } @@ -452,7 +452,7 @@ } -static void ghid_gl_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gl_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -459,7 +459,7 @@ hidgl_draw_line(gc->core_gc.cap, gc->width, x1, y1, x2, y2, ghidgui->port.view.coord_per_px); } -static void ghid_gl_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t xradius, pcb_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void ghid_gl_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) { USE_GC(gc); @@ -466,7 +466,7 @@ hidgl_draw_arc(gc->width, cx, cy, xradius, yradius, start_angle, delta_angle, ghidgui->port.view.coord_per_px); } -static void ghid_gl_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gl_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -474,7 +474,7 @@ } -static void ghid_gl_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void ghid_gl_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { USE_GC(gc); @@ -482,7 +482,7 @@ } -static void ghid_gl_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void ghid_gl_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { USE_GC(gc); @@ -489,7 +489,7 @@ hidgl_fill_polygon(n_coords, x, y); } -static void ghid_gl_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void ghid_gl_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { USE_GC(gc); @@ -496,7 +496,7 @@ hidgl_fill_polygon_offs(n_coords, x, y, dx, dy); } -static void ghid_gl_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void ghid_gl_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -517,7 +517,7 @@ } } -void ghid_gl_invalidate_lr(pcb_hid_t *hid, pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom) +void ghid_gl_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { ghid_gl_invalidate_all(hid); if (!preview_lock) { @@ -527,7 +527,7 @@ } } -static void ghid_gl_notify_crosshair_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void ghid_gl_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) { /* We sometimes get called before the GUI is up */ if (ghidgui->port.drawing_area == NULL) @@ -537,7 +537,7 @@ ghid_gl_invalidate_all(hid); } -static void ghid_gl_notify_mark_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void ghid_gl_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) { /* We sometimes get called before the GUI is up */ if (ghidgui->port.drawing_area == NULL) @@ -547,7 +547,7 @@ ghid_gl_invalidate_all(hid); } -static void pcb_gl_draw_right_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, pcb_coord_t minx, pcb_coord_t miny, pcb_coord_t maxx, pcb_coord_t maxy) +static void pcb_gl_draw_right_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, rnd_coord_t minx, rnd_coord_t miny, rnd_coord_t maxx, rnd_coord_t maxy) { glVertex3i(x, miny, z); glVertex3i(x, maxy, z); @@ -555,9 +555,9 @@ glVertex3i(maxx, y, z); } -static void pcb_gl_draw_slanted_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, pcb_coord_t minx, pcb_coord_t miny, pcb_coord_t maxx, pcb_coord_t maxy) +static void pcb_gl_draw_slanted_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, rnd_coord_t minx, rnd_coord_t miny, rnd_coord_t maxx, rnd_coord_t maxy) { - pcb_coord_t cmax = MAX(maxx-minx, maxy-miny); + rnd_coord_t cmax = MAX(maxx-minx, maxy-miny); glVertex3i(x-cmax, y-cmax, z); glVertex3i(x+cmax, y+cmax, z); @@ -566,9 +566,9 @@ glVertex3i(x+cmax, y-cmax, z); } -static void pcb_gl_draw_dozen_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, pcb_coord_t minx, pcb_coord_t miny, pcb_coord_t maxx, pcb_coord_t maxy) +static void pcb_gl_draw_dozen_cross(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, rnd_coord_t minx, rnd_coord_t miny, rnd_coord_t maxx, rnd_coord_t maxy) { - pcb_coord_t cmax = MAX(maxx-minx, maxy-miny); + rnd_coord_t cmax = MAX(maxx-minx, maxy-miny); double c30 = cos(M_PI/6.0), s30 = sin(M_PI/6.0); double c60 = cos(M_PI/3.0), s60 = sin(M_PI/3.0); @@ -583,7 +583,7 @@ glVertex3i(x+cmax*c60, y-cmax*s60, z); } -static void pcb_gl_draw_crosshair(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, pcb_coord_t minx, pcb_coord_t miny, pcb_coord_t maxx, pcb_coord_t maxy) +static void pcb_gl_draw_crosshair(rnd_hidlib_t *hidlib, GLint x, GLint y, GLint z, rnd_coord_t minx, rnd_coord_t miny, rnd_coord_t maxx, rnd_coord_t maxy) { static enum pcb_crosshair_shape_e prev = pcb_ch_shape_basic; @@ -598,7 +598,7 @@ prev = pcbhl_conf.editor.crosshair_shape_idx; } -static void ghid_gl_show_crosshair(rnd_hidlib_t *hidlib, gboolean paint_new_location, pcb_coord_t minx, pcb_coord_t miny, pcb_coord_t maxx, pcb_coord_t maxy) +static void ghid_gl_show_crosshair(rnd_hidlib_t *hidlib, gboolean paint_new_location, rnd_coord_t minx, rnd_coord_t miny, rnd_coord_t maxx, rnd_coord_t maxy) { GLint x, y, z; static int done_once = 0; @@ -833,8 +833,8 @@ pcb_gtk_view_t save_view; int save_width, save_height; double xz, yz, vw, vh; - pcb_coord_t ox1 = ctx->view.X1, oy1 = ctx->view.Y1, ox2 = ctx->view.X2, oy2 = ctx->view.Y2; - pcb_coord_t save_cpp; + rnd_coord_t ox1 = ctx->view.X1, oy1 = ctx->view.Y1, ox2 = ctx->view.X2, oy2 = ctx->view.Y2; + rnd_coord_t save_cpp; vw = ctx->view.X2 - ctx->view.X1; vh = ctx->view.Y2 - ctx->view.Y1; Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 30903) @@ -632,7 +632,7 @@ XtUnmanageChild(ctx->wltop[n]); } -void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { Widget topform, main_tbl; lesstif_attr_dlg_t *ctx; @@ -796,7 +796,7 @@ return 0; } -int lesstif_attr_dlg_widget_hide(void *hid_ctx, int idx, pcb_bool hide) +int lesstif_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide) { lesstif_attr_dlg_t *ctx = hid_ctx; @@ -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) { - pcb_message(PCB_MSG_ERROR, "AdjustSizes() is not supported anymore, please use the Preferences() action\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30903) @@ -113,7 +113,7 @@ pcb_ltf_preview_t *pd = pd_; pcb_hid_attribute_t *attr = pd->attr; pcb_hid_preview_t *prv = attr->wdata; - pcb_coord_t x, y; + rnd_coord_t x, y; Window root, child; unsigned int keys_buttons; int root_x, root_y, pos_x, pos_y; @@ -133,7 +133,7 @@ pcb_ltf_preview_t *pd = pd_; pcb_hid_attribute_t *attr = pd->attr; pcb_hid_preview_t *prv = attr->wdata; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_hid_mouse_ev_t kind = -1; if (prv->user_mouse_cb == NULL) @@ -262,7 +262,7 @@ return; if (!(res.type & FGW_STR)) { - pcb_message(PCB_MSG_ERROR, CPACT " returned non-string\n"); + rnd_message(PCB_MSG_ERROR, CPACT " returned non-string\n"); fgw_arg_free(&rnd_fgw, &res); return; } @@ -270,7 +270,7 @@ r = pcb_color_load_str(&nclr, res.val.str); fgw_arg_free(&rnd_fgw, &res); if (r != 0) { - pcb_message(PCB_MSG_ERROR, CPACT " returned invalid color string\n"); + rnd_message(PCB_MSG_ERROR, CPACT " returned invalid color string\n"); return; } @@ -438,7 +438,7 @@ XtFree(orig); } -void ltf_text_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_bool readonly) +void ltf_text_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; Index: trunk/src_plugins/hid_lesstif/lesstif.h =================================================================== --- trunk/src_plugins/hid_lesstif/lesstif.h (revision 30902) +++ trunk/src_plugins/hid_lesstif/lesstif.h (revision 30903) @@ -41,7 +41,7 @@ extern void lesstif_need_idle_proc(void); extern void lesstif_show_crosshair(int); extern void lesstif_invalidate_all(pcb_hid_t *hid); -extern void lesstif_coords_to_pcb(int, int, pcb_coord_t *, pcb_coord_t *); +extern void lesstif_coords_to_pcb(int, int, rnd_coord_t *, rnd_coord_t *); extern void lesstif_get_xy(const char *msg); extern void lesstif_update_widget_flags(pcb_hid_t *hid, const char *cookie); extern int lesstif_call_action(const char *, int, char **); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30903) @@ -123,7 +123,7 @@ static Pixel bgcolor, offlimit_color, grid_color; static int bgred, bggreen, bgblue; -static pcb_coord_t crosshair_x = 0, crosshair_y = 0; +static rnd_coord_t crosshair_x = 0, crosshair_y = 0; static int in_move_event = 0, crosshair_in_window = 1; Widget mainwind; @@ -135,13 +135,13 @@ /* This is the PCB location represented by the upper left corner of the viewport. Note that PCB coordinates put 0,0 in the upper left, much like X does. */ -static pcb_coord_t view_left_x = 0, view_top_y = 0; +static rnd_coord_t view_left_x = 0, view_top_y = 0; /* Denotes PCB units per screen pixel. Larger numbers mean zooming out - the largest value means you are looking at the whole board. */ static double view_zoom = PCB_MIL_TO_COORD(10); -static pcb_bool autofade = 0; -static pcb_bool crosshair_on = pcb_true; +static rnd_bool autofade = 0; +static rnd_bool crosshair_on = pcb_true; static void lesstif_reg_attrs(void); static void lesstif_begin(void); @@ -224,7 +224,7 @@ pcb_hid_dock_t where; } ltf_docked_t; -static void ShowCrosshair(pcb_bool show) +static void ShowCrosshair(rnd_bool show) { if (crosshair_on == show) return; @@ -285,14 +285,14 @@ #define use_mask() ((!lesstif_direct) && ((lesstif_drawing_mode == PCB_HID_COMP_POSITIVE) || (lesstif_drawing_mode == PCB_HID_COMP_POSITIVE_XOR) || (lesstif_drawing_mode == PCB_HID_COMP_NEGATIVE))) static void zoom_max(); -static void zoom_to(double factor, pcb_coord_t x, pcb_coord_t y); -static void zoom_win(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int setch); -static void zoom_by(double factor, pcb_coord_t x, pcb_coord_t y); -static void Pan(int mode, pcb_coord_t x, pcb_coord_t y); +static void zoom_to(double factor, rnd_coord_t x, rnd_coord_t y); +static void zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch); +static void zoom_by(double factor, rnd_coord_t x, rnd_coord_t y); +static void Pan(int mode, rnd_coord_t x, rnd_coord_t y); /* Px converts view->pcb, Vx converts pcb->view */ -static inline int Vx(pcb_coord_t x) +static inline int Vx(rnd_coord_t x) { int rv = (x - view_left_x) / view_zoom + 0.5; if (pcbhl_conf.editor.view.flip_x) @@ -300,7 +300,7 @@ return rv; } -static inline int Vy(pcb_coord_t y) +static inline int Vy(rnd_coord_t y) { int rv = (y - view_top_y) / view_zoom + 0.5; if (pcbhl_conf.editor.view.flip_y) @@ -308,17 +308,17 @@ return rv; } -static inline int Vz(pcb_coord_t z) +static inline int Vz(rnd_coord_t z) { return z / view_zoom + 0.5; } -static inline int Vw(pcb_coord_t w) +static inline int Vw(rnd_coord_t w) { return w < 0 ? -w : w / view_zoom + 0.5; } -static inline pcb_coord_t Px(int x) +static inline rnd_coord_t Px(int x) { if (pcbhl_conf.editor.view.flip_x) x = view_width - x; @@ -325,7 +325,7 @@ return x * view_zoom + view_left_x; } -static inline pcb_coord_t Py(int y) +static inline rnd_coord_t Py(int y) { if (pcbhl_conf.editor.view.flip_y) y = view_height - y; @@ -332,7 +332,7 @@ return y * view_zoom + view_top_y; } -void lesstif_coords_to_pcb(int vx, int vy, pcb_coord_t * px, pcb_coord_t * py) +void lesstif_coords_to_pcb(int vx, int vy, rnd_coord_t * px, rnd_coord_t * py) { *px = Px(vx); *py = Py(vy); @@ -367,7 +367,7 @@ } /* Called from the core when it's busy doing something and we need to indicate that to the user. */ -static void ltf_busy(pcb_hid_t *hid, pcb_bool busy) +static void ltf_busy(pcb_hid_t *hid, rnd_bool busy) { static Cursor busy_cursor = 0; if (!lesstif_active) @@ -389,7 +389,7 @@ /* Local actions. */ -static void PointCursor(pcb_hid_t *hid, pcb_bool grabbed) +static void PointCursor(pcb_hid_t *hid, rnd_bool grabbed) { if (grabbed > 0) over_point = 1; @@ -623,7 +623,7 @@ unsigned inited:1; } pcb_ltf_pixmap_t; -static void pcb_ltf_draw_pixmap_(rnd_hidlib_t *hidlib, pcb_ltf_pixmap_t *lpm, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t dw, pcb_coord_t dh) +static void pcb_ltf_draw_pixmap_(rnd_hidlib_t *hidlib, pcb_ltf_pixmap_t *lpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t dw, rnd_coord_t dh) { int w, h, sx3, done = 0; @@ -772,7 +772,7 @@ } } -static void pcb_ltf_draw_pixmap(pcb_hid_t *hid, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_pixmap_t *pixmap) +static void pcb_ltf_draw_pixmap(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_pixmap_t *pixmap) { if (pixmap->hid_data == NULL) { pcb_ltf_pixmap_t *lpm = calloc(sizeof(pcb_ltf_pixmap_t), 1); @@ -800,7 +800,7 @@ static void LoadBackgroundImage(const char *fn) { if (pcb_pixmap_load(ltf_hidlib, <f_bg_img, fn) != 0) - pcb_message(PCB_MSG_ERROR, "Failed to load pixmap %s for background image\n", fn); + rnd_message(PCB_MSG_ERROR, "Failed to load pixmap %s for background image\n", fn); } /* ---------------------------------------------------------------------- */ @@ -863,10 +863,10 @@ } -static void zoom_to(double new_zoom, pcb_coord_t x, pcb_coord_t y) +static void zoom_to(double new_zoom, rnd_coord_t x, rnd_coord_t y) { double max_zoom, xfrac, yfrac; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; if (PCB == NULL) return; @@ -903,9 +903,9 @@ lesstif_pan_fixup(); } -static void zoom_win(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int setch) +static void zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch) { - pcb_coord_t w = x2 - x1, h = y2 - y1; + rnd_coord_t w = x2 - x1, h = y2 - y1; double new_zoom = w / view_width; if (new_zoom < h / view_height) new_zoom = h / view_height; @@ -926,16 +926,16 @@ pcb_hidcore_crosshair_move_to(ltf_hidlib, (x1+x2)/2, (y1+y2)/2, 0); } -void zoom_by(double factor, pcb_coord_t x, pcb_coord_t y) +void zoom_by(double factor, rnd_coord_t x, rnd_coord_t y) { zoom_to(view_zoom * factor, x, y); } /* X and Y are in screen coordinates. */ -static void Pan(int mode, pcb_coord_t x, pcb_coord_t y) +static void Pan(int mode, rnd_coord_t x, rnd_coord_t y) { - static pcb_coord_t ox, oy; - static pcb_coord_t opx, opy; + static rnd_coord_t ox, oy; + static rnd_coord_t opx, opy; panning = mode; /* This is for ctrl-pan, where the viewport's position is directly @@ -1371,7 +1371,7 @@ key = XStringToKeysym(desc); if (key == NoSymbol && len > 1) { - pcb_message(PCB_MSG_INFO, "lesstif_translate_key: no symbol for %s\n", desc); + rnd_message(PCB_MSG_INFO, "lesstif_translate_key: no symbol for %s\n", desc); return 0; } return key; @@ -1582,7 +1582,7 @@ int i; double f; char *s; - pcb_coord_t c; + rnd_coord_t c; } val_union; static Boolean @@ -1601,10 +1601,10 @@ static Boolean pcb_cvt_string_to_coord(Display * d, XrmValue * args, Cardinal * num_args, XrmValue * from, XrmValue * to, XtPointer * data) { - static pcb_coord_t rv; + static rnd_coord_t rv; rv = pcb_get_value((char *) from->addr, NULL, NULL, NULL); if (to->addr) - *(pcb_coord_t *) to->addr = rv; + *(rnd_coord_t *) to->addr = rv; else to->addr = (XPointer) & rv; to->size = sizeof(rv); @@ -1746,7 +1746,7 @@ case PCB_HATT_COORD: r->resource_type = XmStrCast(XtRPCBCoord); r->default_type = XmStrCast(XtRPCBCoord); - r->resource_size = sizeof(pcb_coord_t); + r->resource_size = sizeof(rnd_coord_t); r->default_addr = &(a->default_val.crd); rcount++; break; @@ -1826,7 +1826,7 @@ break; case PCB_HATT_COORD: if (a->value) - *(pcb_coord_t *) a->value = v->c; + *(rnd_coord_t *) a->value = v->c; else a->default_val.crd = v->c; rcount++; @@ -1876,8 +1876,8 @@ { static XPoint *points = 0; static int npoints = 0; - pcb_coord_t x1, y1, x2, y2, prevx; - pcb_coord_t x, y; + rnd_coord_t x1, y1, x2, y2, prevx; + rnd_coord_t x, y; int n; static GC grid_gc = 0; @@ -1960,12 +1960,12 @@ ctx.view.X2 = Px(view_width); ctx.view.Y2 = Py(view_height); if (pcbhl_conf.editor.view.flip_x) { - pcb_coord_t tmp = ctx.view.X1; + rnd_coord_t tmp = ctx.view.X1; ctx.view.X1 = ctx.view.X2; ctx.view.X2 = tmp; } if (pcbhl_conf.editor.view.flip_y) { - pcb_coord_t tmp = ctx.view.Y1; + rnd_coord_t tmp = ctx.view.Y1; ctx.view.Y1 = ctx.view.Y2; ctx.view.Y2 = tmp; } @@ -2077,7 +2077,7 @@ idle_proc_set = 1; } -static void lesstif_invalidate_lr(pcb_hid_t *hid, pcb_coord_t l, pcb_coord_t r, pcb_coord_t t, pcb_coord_t b) +static void lesstif_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { if (!window) return; @@ -2092,7 +2092,7 @@ lesstif_invalidate_lr(hid, 0, ltf_hidlib->size_x, 0, ltf_hidlib->size_y); } -static void lesstif_notify_crosshair_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void lesstif_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) { static int invalidate_depth = 0; Pixmap save_pixmap; @@ -2126,7 +2126,7 @@ invalidate_depth++; } -static void lesstif_notify_mark_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void lesstif_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) { static int invalidate_depth = 0; Pixmap save_pixmap; @@ -2180,7 +2180,7 @@ pcb_gui->coord_per_pix = view_zoom; } -static void lesstif_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) +static void lesstif_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *drw_screen) { lesstif_drawing_mode = op; @@ -2343,7 +2343,7 @@ gc->cap = style; } -static void lesstif_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void lesstif_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } @@ -2355,7 +2355,7 @@ #define ISORT(a,b) if (a>b) { a^=b; b^=a; a^=b; } -static void lesstif_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void lesstif_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double dx1, dy1, dx2, dy2; int vw = Vw(gc->width); @@ -2395,7 +2395,7 @@ } } -static void lesstif_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void lesstif_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { if (conf_core.editor.thin_draw && gc->erase) return; @@ -2432,7 +2432,7 @@ XDrawArc(display, mask_bitmap, mask_gc, cx, cy, width * 2, height * 2, (start_angle + 180) * 64, delta_angle * 64); } -static void lesstif_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void lesstif_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int vw = Vw(gc->width); if (conf_core.editor.thin_draw && gc->erase) @@ -2450,7 +2450,7 @@ if (y1 > view_height + vw && y2 > view_height + vw) return; if (x1 > x2) { - pcb_coord_t xt = x1; + rnd_coord_t xt = x1; x1 = x2; x2 = xt; } @@ -2465,7 +2465,7 @@ XDrawRectangle(display, mask_bitmap, mask_gc, x1, y1, x2 - x1 + 1, y2 - y1 + 1); } -static void lesstif_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void lesstif_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if ((conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly) && gc->erase) return; @@ -2489,7 +2489,7 @@ } /* Intentaional code duplication for performance */ -static void lesstif_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y) +static void lesstif_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { static XPoint *p = 0; static int maxp = 0; @@ -2517,7 +2517,7 @@ } /* Intentaional code duplication for performance */ -static void lesstif_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void lesstif_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { static XPoint *p = 0; static int maxp = 0; @@ -2542,7 +2542,7 @@ XFillPolygon(display, mask_bitmap, mask_gc, p, n_coords, Complex, CoordModeOrigin); } -static void lesstif_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void lesstif_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int vw = Vw(gc->width); if (conf_core.editor.thin_draw && gc->erase) @@ -2560,7 +2560,7 @@ if (y1 > view_height + vw && y2 > view_height + vw) return; if (x1 > x2) { - pcb_coord_t xt = x1; + rnd_coord_t xt = x1; x1 = x2; x2 = xt; } @@ -2595,9 +2595,9 @@ return alt_pressed; } -extern void lesstif_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force); +extern void lesstif_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); -static void lesstif_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void lesstif_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { if (crosshair_x != x || crosshair_y != y) { lesstif_show_crosshair(0); @@ -2673,7 +2673,7 @@ typedef struct { - pcb_bool (*func) (pcb_hidval_t, int, unsigned int, pcb_hidval_t); + rnd_bool (*func) (pcb_hidval_t, int, unsigned int, pcb_hidval_t); pcb_hidval_t user_data; int fd; XtInputId id; @@ -2716,7 +2716,7 @@ return; } -pcb_hidval_t lesstif_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, pcb_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) +pcb_hidval_t lesstif_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { WatchStruct *watch = (WatchStruct *)malloc(sizeof(WatchStruct)); pcb_hidval_t ret; @@ -2740,7 +2740,7 @@ return ret; } -extern void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +extern void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); extern int lesstif_attr_dlg_run(void *hid_ctx); extern void lesstif_attr_dlg_raise(void *hid_ctx); @@ -2748,7 +2748,7 @@ extern void lesstif_attr_dlg_free(void *hid_ctx); extern void lesstif_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val); extern int lesstif_attr_dlg_widget_state(void *hid_ctx, int idx, int enabled); -extern int lesstif_attr_dlg_widget_hide(void *hid_ctx, int idx, pcb_bool hide); +extern int lesstif_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide); extern int lesstif_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); extern void lesstif_attr_dlg_set_help(void *hid_ctx, int idx, const char *val); @@ -2862,12 +2862,12 @@ free(data); } -static void ltf_zoom_win(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool set_crosshair) +static void ltf_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { zoom_win(hid, x1, y1, x2, y2, 1); } -static void ltf_zoom(pcb_hid_t *hid, pcb_coord_t center_x, pcb_coord_t center_y, double factor, int relative) +static void ltf_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { if (relative) zoom_by(factor, Vx(center_x), Vy(center_y)); @@ -2875,7 +2875,7 @@ zoom_to(factor, Vx(center_x), Vy(center_y)); } -static void ltf_pan(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int relative) +static void ltf_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { if (relative) { view_left_x += x; @@ -2891,7 +2891,7 @@ } } -static void ltf_pan_mode(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, pcb_bool mode) +static void ltf_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { Pan(mode, Vx(x), Vy(y)); } Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30903) @@ -175,7 +175,7 @@ pcb_hidlib_crosshair_restore(ltf_hidlib, chst); } -void lesstif_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *px, pcb_coord_t *py, int force) +void lesstif_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *px, rnd_coord_t *py, int force) { if ((force || !have_xy) && msg) { if (force) { @@ -511,7 +511,7 @@ } else { if (*uo != '\0') - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); + rnd_message(PCB_MSG_ERROR, "FATAL: can't load the lesstif menu res either from file or from hardwired default."); abort(); } Index: trunk/src_plugins/hid_lesstif/mouse.c =================================================================== --- trunk/src_plugins/hid_lesstif/mouse.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/mouse.c (revision 30903) @@ -66,7 +66,7 @@ return; } } - pcb_message(PCB_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); + rnd_message(PCB_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_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 30903) @@ -224,8 +224,8 @@ PCB_PAD_LOOP(element); { if (strcmp(pad->Number, pname) == 0) { - pcb_coord_t x = (pad->Point1.X + pad->Point2.X) / 2; - pcb_coord_t y = (pad->Point1.Y + pad->Point2.Y) / 2; + rnd_coord_t x = (pad->Point1.X + pad->Point2.X) / 2; + rnd_coord_t y = (pad->Point1.Y + pad->Point2.Y) / 2; pcb_gui->set_crosshair(pcb_gui, x, y, HID_SC_PAN_VIEWPORT); free(ename); return; Index: trunk/src_plugins/hid_lesstif/wt_preview.c =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30902) +++ trunk/src_plugins/hid_lesstif/wt_preview.c (revision 30903) @@ -69,9 +69,9 @@ } } -void pcb_ltf_preview_getxy(pcb_ltf_preview_t *pd, int px, int py, pcb_coord_t *dst_x, pcb_coord_t *dst_y) +void pcb_ltf_preview_getxy(pcb_ltf_preview_t *pd, int px, int py, rnd_coord_t *dst_x, rnd_coord_t *dst_y) { - pcb_coord_t x, y; + rnd_coord_t x, y; if (pcbhl_conf.editor.view.flip_x) px = pd->v_width - px; @@ -93,7 +93,7 @@ Pixmap save_px, save_main_px, save_mask_px, save_mask_bm; XGCValues gcv; GC gc; - pcb_coord_t save_cpp; + rnd_coord_t save_cpp; if (pd->expose_lock) return; Index: trunk/src_plugins/hid_lesstif/wt_preview.h =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.h (revision 30902) +++ trunk/src_plugins/hid_lesstif/wt_preview.h (revision 30903) @@ -10,13 +10,13 @@ Window window; Widget pw; - pcb_coord_t x, y; /* PCB coordinates of upper right corner of window */ - pcb_coord_t x1, y1, x2, y2; /* PCB extends of desired drawing area */ + rnd_coord_t x, y; /* PCB coordinates of upper right corner of window */ + rnd_coord_t x1, y1, x2, y2; /* PCB extends of desired drawing area */ double zoom; /* PCB units per screen pixel */ int v_width, v_height; /* widget dimensions in pixels */ pcb_hid_expose_ctx_t ctx; - pcb_bool (*mouse_ev)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y); + rnd_bool (*mouse_ev)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); void (*pre_close)(struct pcb_ltf_preview_s *pd); pcb_hid_expose_t overlay_draw; unsigned resized:1; @@ -24,7 +24,7 @@ unsigned expose_lock:1; unsigned redraw_with_board:1; int pan_ox, pan_oy; - pcb_coord_t pan_opx, pan_opy; + rnd_coord_t pan_opx, pan_opy; gdl_elem_t link; /* in the list of all previews in ltf_previews */ } pcb_ltf_preview_t; @@ -39,7 +39,7 @@ void pcb_ltf_preview_redraw(pcb_ltf_preview_t *pd); /* Convert widget pixel px;py back to preview render coordinates */ -void pcb_ltf_preview_getxy(pcb_ltf_preview_t *pd, int px, int py, pcb_coord_t *dst_x, pcb_coord_t *dst_y); +void pcb_ltf_preview_getxy(pcb_ltf_preview_t *pd, int px, int py, rnd_coord_t *dst_x, rnd_coord_t *dst_y); /* invalidate (redraw) all preview widgets whose current view overlaps with the screen box; if screen is NULL, redraw all */ Index: trunk/src_plugins/hid_remote/proto.c =================================================================== --- trunk/src_plugins/hid_remote/proto.c (revision 30902) +++ trunk/src_plugins/hid_remote/proto.c (revision 30903) @@ -59,7 +59,7 @@ send_end(&pctx); } -void remote_proto_send_brddim(pcb_coord_t w, pcb_coord_t h) +void remote_proto_send_brddim(rnd_coord_t w, rnd_coord_t h) { send_begin(&pctx, "brddim"); send_open(&pctx, 0, 1); @@ -208,7 +208,7 @@ send_end(&pctx); } -void proto_send_set_line_width(int gc, pcb_coord_t width) +void proto_send_set_line_width(int gc, rnd_coord_t width) { send_begin(&pctx, "linwid"); send_open(&pctx, 0, 1); @@ -228,7 +228,7 @@ send_end(&pctx); } -void proto_send_draw_line(int gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void proto_send_draw_line(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { send_begin(&pctx, "line"); send_open(&pctx, 0, 1); @@ -241,7 +241,7 @@ send_end(&pctx); } -void proto_send_draw_arc(int gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { send_begin(&pctx, "arc"); send_open(&pctx, 0, 1); @@ -258,7 +258,7 @@ -void proto_send_draw_rect(int gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int is_filled) +void proto_send_draw_rect(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int is_filled) { send_begin(&pctx, "rect"); send_open(&pctx, 0, 1); @@ -272,7 +272,7 @@ send_end(&pctx); } -void proto_send_fill_circle(int gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +void proto_send_fill_circle(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { send_begin(&pctx, "fcirc"); send_open(&pctx, 0, 1); @@ -284,7 +284,7 @@ send_end(&pctx); } -void proto_send_draw_poly(int gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +void proto_send_draw_poly(int gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int n; send_begin(&pctx, "poly"); Index: trunk/src_plugins/hid_remote/proto.h =================================================================== --- trunk/src_plugins/hid_remote/proto.h (revision 30902) +++ trunk/src_plugins/hid_remote/proto.h (revision 30903) @@ -27,7 +27,7 @@ void remote_proto_send_ver(); void remote_proto_send_unit(); -void remote_proto_send_brddim(pcb_coord_t w, pcb_coord_t h); +void remote_proto_send_brddim(rnd_coord_t w, rnd_coord_t h); int remote_proto_send_ready(); void proto_send_invalidate(int l, int r, int t, int b); void proto_send_invalidate_all(void); @@ -40,13 +40,13 @@ int proto_send_del_gc(int gc); void proto_send_set_color(int gc, const char *name); void proto_send_set_line_cap(int gc, char style); -void proto_send_set_line_width(int gc, pcb_coord_t width); +void proto_send_set_line_width(int gc, rnd_coord_t width); void proto_send_set_draw_xor(int gc, int xor_set); -void proto_send_draw_line(int gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); -void proto_send_draw_arc(int gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle); -void proto_send_draw_rect(int gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int is_filled); -void proto_send_fill_circle(int gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius); -void proto_send_draw_poly(int gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy); +void proto_send_draw_line(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +void proto_send_draw_arc(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle); +void proto_send_draw_rect(int gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int is_filled); +void proto_send_fill_circle(int gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); +void proto_send_draw_poly(int gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); int proto_send_set_drawing_mode(const char *name, int direct); int remote_proto_parse_all(); Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30902) +++ trunk/src_plugins/hid_remote/remote.c (revision 30903) @@ -123,7 +123,7 @@ return pcb_hid_parse_command_line(argc, argv); } -static void remote_invalidate_lr(pcb_hid_t *hid, pcb_coord_t l, pcb_coord_t r, pcb_coord_t t, pcb_coord_t b) +static void remote_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { proto_send_invalidate(l,r, t, b); } @@ -153,7 +153,7 @@ typedef struct { unsigned long int color_packed; - pcb_coord_t line_width; + rnd_coord_t line_width; char cap; } remote_gc_cache_t; static hid_gc_s remote_gc[32]; @@ -164,7 +164,7 @@ int gci = proto_send_make_gc(); int max = sizeof(remote_gc) / sizeof(remote_gc[0]); if (gci >= max) { - pcb_message(PCB_MSG_ERROR, "remote_make_gc(): GC index too high: %d >= %d\n", gci, max); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); + rnd_message(PCB_MSG_ERROR, "GC index too high: %d >= %d\n", idx, max); return -1; } return idx; @@ -192,12 +192,12 @@ } static const char *drawing_mode_names[] = { "reset", "positive", "negative", "flush"}; -static void remote_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *drw_screen) +static void remote_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *drw_screen) { if ((op >= 0) && (op < sizeof(drawing_mode_names) / sizeof(drawing_mode_names[0]))) proto_send_set_drawing_mode(drawing_mode_names[op], direct); else - pcb_message(PCB_MSG_ERROR, "Invalid drawing mode %d\n", op); + rnd_message(PCB_MSG_ERROR, "Invalid drawing mode %d\n", op); } static void remote_set_color(pcb_hid_gc_t gc, const pcb_color_t *color) @@ -220,7 +220,7 @@ if (style >= max) { - pcb_message(PCB_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); + rnd_message(PCB_MSG_ERROR, "can't set invalid cap style: %d >= %d\n", style, max); return; } if (idx >= 0) { @@ -232,7 +232,7 @@ } } -static void remote_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void remote_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { int idx = gc2idx(gc); if (idx >= 0) { @@ -250,7 +250,7 @@ proto_send_set_draw_xor(idx, xor_set); } -static void remote_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void remote_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -257,7 +257,7 @@ proto_send_draw_line(idx, x1, y1, x2, y2); } -static void remote_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t width, pcb_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void remote_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, pcb_angle_t start_angle, pcb_angle_t delta_angle) { int idx = gc2idx(gc); if (idx >= 0) @@ -264,7 +264,7 @@ proto_send_draw_arc(idx, cx, cy, width, height, start_angle, delta_angle); } -static void remote_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void remote_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -271,7 +271,7 @@ proto_send_draw_rect(idx, x1, y1, x2, y2, 0); } -static void remote_fill_circle(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t radius) +static void remote_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { int idx = gc2idx(gc); if (idx >= 0) @@ -278,7 +278,7 @@ proto_send_fill_circle(idx, cx, cy, radius); } -static void remote_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t * x, pcb_coord_t * y) +static void remote_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { int idx = gc2idx(gc); if (idx >= 0) @@ -285,7 +285,7 @@ proto_send_draw_poly(idx, n_coords, x, y, 0, 0); } -static void remote_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void remote_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int idx = gc2idx(gc); if (idx >= 0) @@ -292,7 +292,7 @@ proto_send_draw_poly(idx, n_coords, x, y, dx, dy); } -static void remote_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void remote_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -318,11 +318,11 @@ return 0; } -static void remote_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +static void remote_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { } -static void remote_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void remote_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } @@ -338,7 +338,7 @@ } pcb_hidval_t -remote_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, pcb_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), +remote_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t ret; @@ -350,7 +350,7 @@ { } -static void *remote_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +static void *remote_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { return NULL; } Index: trunk/src_plugins/import_calay/calay.c =================================================================== --- trunk/src_plugins/import_calay/calay.c (revision 30902) +++ trunk/src_plugins/import_calay/calay.c (revision 30903) @@ -101,10 +101,10 @@ if (curr != NULL) rnd_actionva(&PCB->hidlib, "Netlist", "Add", curr, s, NULL); else - pcb_message(PCB_MSG_ERROR, "Calay syntax error: %s is after a ;, not in any net\n", s); + rnd_message(PCB_MSG_ERROR, "Calay syntax error: %s is after a ;, not in any net\n", s); } else - pcb_message(PCB_MSG_ERROR, "Calay syntax error: %s should have been refdes(pin)\n", s); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Calay syntax error: invalid separator: %s %d (expected , or ;)\n", next, *next); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Calay component syntax error: short line: '%s'\n", line); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't open calay netlist file '%s' for read\n", fname_net); + rnd_message(PCB_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) - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_calay: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_dsn/dsn.c (revision 30903) @@ -68,17 +68,17 @@ return -1; if (strcmp(end+2, grp->name) != 0) { - pcb_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(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); return -1; } if (grp->len <= 0) { - pcb_message(PCB_MSG_ERROR, "layer (group) '%s' has no layers\nses file not for this board?\n", name); + rnd_message(PCB_MSG_ERROR, "layer (group) '%s' has no layers\nses file not for this board?\n", name); return -1; } if (!(grp->ltype & PCB_LYT_COPPER)) { - pcb_message(PCB_MSG_ERROR, "layer (group) type %s should a copper layer group\nses file not for this board?\n", name); + rnd_message(PCB_MSG_ERROR, "layer (group) type %s should a copper layer group\nses file not for this board?\n", name); return -1; } @@ -85,26 +85,26 @@ return grp->lid[0]; } -static void parse_polyline(long int *nlines, pcb_coord_t clear, const gsxl_node_t *n, const char *unit, int workaround0) +static void parse_polyline(long int *nlines, rnd_coord_t clear, const gsxl_node_t *n, const char *unit, int workaround0) { const gsxl_node_t *c; - pcb_coord_t x, y, lx, ly, thick; + rnd_coord_t x, y, lx, ly, thick; long pn; const char *slayer = n->children->str; const char *sthick = n->children->next->str; - pcb_bool succ; + rnd_bool succ; pcb_layer_id_t lid; pcb_layer_t *layer; thick = pcb_get_value(sthick, unit, NULL, &succ); if (!succ) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping polyline because thickness is invalid: %s\n", sthick); + rnd_message(PCB_MSG_ERROR, "import_dsn: skipping polyline because thickness is invalid: %s\n", sthick); return; } lid = ses_layer_by_name(PCB, slayer); if (lid < 0) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping polyline because layer name is invalid: %s\n", slayer); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sx); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping polyline segment because x coord is invalid: %s\n", sy); + rnd_message(PCB_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 */ @@ -137,7 +137,7 @@ } } -static void parse_wire(long int *nlines, pcb_coord_t clear, const gsxl_node_t *wire, dsn_type_t type) +static void parse_wire(long int *nlines, rnd_coord_t clear, const gsxl_node_t *wire, dsn_type_t type) { const gsxl_node_t *n; for(n = wire->children; n != NULL; n = n->next) { @@ -155,29 +155,29 @@ /* ignore */ } else - pcb_message(PCB_MSG_WARNING, "import_dsn: ignoring unknown wire directive %s\n", n->str); + rnd_message(PCB_MSG_WARNING, "import_dsn: ignoring unknown wire directive %s\n", n->str); } } -static void parse_via(pcb_coord_t clear, const gsxl_node_t *via, dsn_type_t type) +static void parse_via(rnd_coord_t clear, const gsxl_node_t *via, dsn_type_t type) { const gsxl_node_t *c = via->children->next; const char *name = via->children->str; const char *sx = c->str; const char *sy = c->next->str; - pcb_bool succ; - pcb_coord_t x, y, dia, drill; + rnd_bool succ; + rnd_coord_t x, y, dia, drill; long l1, l2; const char *unit = (type == TYPE_PCB) ? "mm" : "nm"; if (strncmp(name, "via_", 4) != 0) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping via with invalid name (prefix): %s\n", name); + rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via with invalid name (prefix): %s\n", name); return; } name += 4; if (sscanf(name, "%ld_%ld", &l1, &l2) != 2) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping via with invalid name (diameters): %s\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sx); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sy); + rnd_message(PCB_MSG_ERROR, "import_dsn: skipping via segment because x coord is invalid: %s\n", sy); return; } @@ -207,7 +207,7 @@ fgw_error_t pcb_act_LoadDsnFrom(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *fname = NULL; - pcb_coord_t clear; + rnd_coord_t clear; FILE *f; gsxl_dom_t dom; int c, seek_quote = 1; @@ -231,7 +231,7 @@ /* load and parse the file into a dom tree */ f = pcb_fopen(&PCB->hidlib, fname, "r"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "import_dsn: can't open %s for read\n", fname); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_dsn: parse error in %s at %d:%d\n", fname, dom.parse.line, dom.parse.col); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "import_dsn: s-expr is not a PCB or session\n"); + rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr is not a PCB or session\n"); goto error; } @@ -276,7 +276,7 @@ break; if (wiring == NULL) { - pcb_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a wiring section\n"); + rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a wiring section\n"); goto error; } @@ -296,7 +296,7 @@ break; if (routes == NULL) { - pcb_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a routes section\n"); + rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a routes section\n"); goto error; } @@ -305,7 +305,7 @@ break; if (nout == NULL) { - pcb_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a network_out section\n"); + rnd_message(PCB_MSG_ERROR, "import_dsn: s-expr does not have a network_out section\n"); goto error; } @@ -322,7 +322,7 @@ break; } - pcb_message(PCB_MSG_INFO, "import_dsn: loaded %ld wires and %ld vias\n", nlines, nvias); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_edif/edif.c (revision 30903) @@ -5782,7 +5782,7 @@ #ifdef DEBUG DumpStack(); #endif /* DEBUG */ - pcb_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); + rnd_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); } /* * String bucket definitions. @@ -6244,7 +6244,7 @@ int ReadEdifNetlist(char *filename) { - pcb_message(PCB_MSG_INFO,"Importing edif netlist %s\n", filename); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_edif/edif.y (revision 30903) @@ -3984,7 +3984,7 @@ #ifdef DEBUG DumpStack(); #endif /* DEBUG */ - pcb_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); + rnd_message(PCB_MSG_ERROR, "EDIF import error: %s, line %ld: %s\n",InFile,LineNumber,ers); } /* * String bucket definitions. @@ -4446,7 +4446,7 @@ int ReadEdifNetlist(char *filename) { - pcb_message(PCB_MSG_INFO,"Importing edif netlist %s\n", filename); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_edif/import_edif.c (revision 30903) @@ -77,7 +77,7 @@ int ret; if (numfns != 1) { - pcb_message(PCB_MSG_ERROR, "import_edif: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_fpcb_nl/fpcb_nl.c (revision 30903) @@ -67,7 +67,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); + rnd_message(PCB_MSG_ERROR, "Can't open %s for read\n", fn); return -1; } @@ -95,13 +95,13 @@ ltrim(line); len = strlen(line); if (len == 0) { - pcb_message(PCB_MSG_ERROR, "Empty/missing net name in *SINGAL*\n"); + rnd_message(PCB_MSG_ERROR, "Empty/missing net name in *SINGAL*\n"); sprintf(signame, "pcbrndanonymous%d", anon++); } else { if (len > sizeof(signame)-1) { len = sizeof(signame)-1; - pcb_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(PCB_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 - pcb_message(PCB_MSG_ERROR, "No footprint specified for %s\n", line); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Syntax error in netlist: '%s' in net '%s' should be refdes.termid\n", curr, signame); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_fpcb_nl: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_gnetlist/import_gnetlist.c (revision 30903) @@ -93,7 +93,7 @@ PCB_IMPORT_SCH_VERBOSE(verbose); if (tmpfn == NULL) { - pcb_message(PCB_MSG_ERROR, "Could not create temp file for gnetlist output"); + rnd_message(PCB_MSG_ERROR, "Could not create temp file for gnetlist output"); return -1; } @@ -112,16 +112,16 @@ cmd[numfns+8] = NULL; if (verbose) { - pcb_message(PCB_MSG_DEBUG, "import_gnetlist: running gnetlist:\n"); + rnd_message(PCB_MSG_DEBUG, "import_gnetlist: running gnetlist:\n"); for(n = 0; n < numfns+8; n++) - pcb_message(PCB_MSG_DEBUG, " %s", cmd[n]); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " %s", cmd[n]); + rnd_message(PCB_MSG_DEBUG, "\n"); } res = pcb_spawnvp((const char **)cmd); if (res == 0) { if (verbose) - pcb_message(PCB_MSG_DEBUG, "pcb_gnetlist: about to run pcb_act_ExecuteFile, file = %s\n", tmpfn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_hpgl/hpgl.c (revision 30903) @@ -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;*/ - pcb_message(PCB_MSG_ERROR, "HPGL: polygons are not yet supported\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Error opening HP-GL %s for read\n", fname); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Error loading HP-GL: could not load any object from %s\n", fname); + rnd_message(PCB_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); - pcb_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(PCB_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 30902) +++ trunk/src_plugins/import_ipcd356/ipcd356.c (revision 30903) @@ -74,16 +74,16 @@ *dst = '\0'; } -static int extract_dim(pcb_coord_t *dst, const char *line, int start, int end, int has_sign, int is_mil) +static int extract_dim(rnd_coord_t *dst, const char *line, int start, int end, int has_sign, int is_mil) { char tmp[16]; const char *sign = line + start; double d; - pcb_bool succ; + rnd_bool succ; if (has_sign) { if ((*sign != '+') && (*sign != '-') && (*sign != ' ')) { - pcb_message(PCB_MSG_WARNING, "Invalid coordinate sign: '%c':\n", *line); + rnd_message(PCB_MSG_WARNING, "Invalid coordinate sign: '%c':\n", *line); return -1; } } @@ -112,17 +112,17 @@ typedef struct { int is_via, is_middle, is_plated, side, rot, is_tooling, mask; - pcb_coord_t hole, width, height, cx, cy; + rnd_coord_t hole, width, height, cx, cy; } test_feature_t; 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') { - pcb_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(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); return -1; } if (line[26] != '-') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing dash between refdes and pin number\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid hole dimension\n", fn, lineno); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - hole is neither plated nor unplated\n", fn, lineno); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'A' for access\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid access side\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid access side\n", fn, lineno); return -1; } if (line[41] != 'X') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'X'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid X dimension\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid X dimension\n", fn, lineno); return -1; } if (line[49] != 'Y') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing 'Y'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid Y dimension\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid Y dimension\n", fn, lineno); return -1; } if (line[57] != 'X') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing width 'X'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid width dimension\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid width dimension\n", fn, lineno); return -1; } if (line[62] != 'Y') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing height 'Y'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); return -1; } if (line[67] != 'R') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - missing rotation 'R'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); return -1; } if (line[72] != 'S') { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - solder mask marker 'S'\n", fn, lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - invalid height 'Y' dimension\n", fn, lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - thru-hole feature without hole dia\n", fn, lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - SMD feature with hole dia\n", fn, lineno); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid test feautre in %s:%ld' - SMD feature with hole dia\n", fn, lineno); break; } break; default: - pcb_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(PCB_MSG_WARNING, "Ignoring unknown test feautre '3%c%c' in %s:%ld - unknown second digit'\n", line[1], line[2], fn, lineno); } return 0; } @@ -232,7 +232,7 @@ { pcb_pstk_t *ps; pcb_pstk_shape_t sh[6]; - pcb_coord_t msk = PCB_MIL_TO_COORD(4), y; + rnd_coord_t msk = PCB_MIL_TO_COORD(4), y; int i = 0, thru = (tf->hole > 0) && (tf->is_plated); memset(sh, 0, sizeof(sh)); @@ -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)) - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unimplemented unit in %s:%ld - requested radians in rotation, the code doesn't handle that\n", fn, lineno); + rnd_message(PCB_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; - pcb_message(PCB_MSG_ERROR, "Invalid end-of-file marker in %s:%ld - expected '999'\n", fn, lineno); + rnd_message(PCB_MSG_ERROR, "Invalid end-of-file marker in %s:%ld - expected '999'\n", fn, lineno); return 1; } } - pcb_message(PCB_MSG_ERROR, "Unexpected end of file - expected '999'\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't open %s for read\n", fname); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_ipcd356: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_ltspice/ltspice.c (revision 30903) @@ -84,7 +84,7 @@ if (sattr->refdes != NULL) { if (sattr->footprint == NULL) - pcb_message(PCB_MSG_ERROR, "ltspice: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(PCB_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); } @@ -236,18 +236,18 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_asc); + rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_asc); fclose(fn); return -1; } if (ltspice_hdr_asc(fa)) { - pcb_message(PCB_MSG_ERROR, "file '%s' doesn't look like a verison 4 asc file\n", fname_asc); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_ltspice: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 30903) @@ -149,7 +149,7 @@ } } if (cnt == 0) - pcb_message(PCB_MSG_WARNING, "Couldn't find any part map rules - check your map_search_paths and rule files\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid mentor edf header: not an EDIF file\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); return -1; } @@ -244,7 +244,7 @@ ret = mentor_parse_tree(&dom); } else { - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_mentor_sch: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_mentor_sch/netlist_helper.c (revision 30903) @@ -121,13 +121,13 @@ int prio; if (argc != 5) { - pcb_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(PCB_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') { - pcb_message(PCB_MSG_ERROR, "Loading part map: invaid priority '%s' in %s:%d - ignoring this rule\n", argv[0], fn, lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Loading part map: can't compile attribute name regex in %s:%d - ignoring this rule\n", fn, lineno); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Loading part map: can't compile attribute value regex in %s:%d - ignoring this rule\n", fn, lineno); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Ignoring part %s: no refdes\n", ectx->id); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "nethelper: can't resolve refdes of part %s\n", part); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_mucs/mucs.c (revision 30903) @@ -61,13 +61,13 @@ static char *default_file = NULL; FILE *fi; int c, c2; - pcb_coord_t x1, y1, x2, y2, r; + rnd_coord_t x1, y1, x2, y2, r; pcb_pstk_t *ps; 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)) { - pcb_message(PCB_MSG_ERROR, "The currently active layer is not a copper layer.\n"); + rnd_message(PCB_MSG_ERROR, "The currently active layer is not a copper layer.\n"); RND_ACT_IRES(1); return 0; } @@ -92,7 +92,7 @@ fi = pcb_fopen(&PCB->hidlib, fname, "r"); if (!fi) { - pcb_message(PCB_MSG_ERROR, "Can't load mucs unixplot file %s for read\n", fname); + rnd_message(PCB_MSG_ERROR, "Can't load mucs unixplot file %s for read\n", fname); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/import_net_action/import_net_action.c =================================================================== --- trunk/src_plugins/import_net_action/import_net_action.c (revision 30902) +++ trunk/src_plugins/import_net_action/import_net_action.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "import_net_action: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_net_cmd/import_net_cmd.c (revision 30903) @@ -55,7 +55,7 @@ PCB_IMPORT_SCH_VERBOSE(verbose); if (numfns != 2) { - pcb_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(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"); return -1; } @@ -63,7 +63,7 @@ cmdline = fns[1]; if ((outfn == NULL) || (*outfn == '\0')) { - pcb_message(PCB_MSG_ERROR, "net_cmd_import: Could not create temp file for the netlist output"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "import_net_cmd: running cmd: '%s' outfn='%s'\n", cmdline, outfn); + rnd_message(PCB_MSG_DEBUG, "import_net_cmd: running cmd: '%s' outfn='%s'\n", cmdline, outfn); pcb_setenv("IMPORT_NET_CMD_PCB", PCB->hidlib.filename, 1); pcb_setenv("IMPORT_NET_CMD_OUT", outfn, 1); @@ -79,7 +79,7 @@ res = pcb_system(&PCB->hidlib, cmdline); if (res == 0) { if (verbose) - pcb_message(PCB_MSG_DEBUG, "pcb_net_cmd: about to run pcb_act_ExecuteFile, outfn='%s'\n", outfn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 30903) @@ -60,7 +60,7 @@ FILE *fp; pcb_net_t *net = NULL; int i, j, lines, kind; - pcb_bool continued; + rnd_bool continued; int used_popen = 0; const char *ratcmd; @@ -67,13 +67,13 @@ if (!filename) return 1; /* nothing to do */ - pcb_message(PCB_MSG_INFO, "Importing PCB netlist %s\n", filename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Cannot open %s for reading", filename); + rnd_message(PCB_MSG_ERROR, "Cannot open %s for reading", filename); return 1; } } @@ -105,7 +105,7 @@ /* check for maximum length line */ if (len) { if (inputline[--len] != '\n') - pcb_message(PCB_MSG_ERROR, "Line length (%i) exceeded in netlist file.\n" + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Empty netlist file!\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_netlist: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_sch2/import_sch.c (revision 30903) @@ -116,12 +116,12 @@ if ((imp_name == NULL) || (*imp_name == '\0')) { if (convert_attribs()) { - pcb_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(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"); imp_name = conf_import_sch.plugins.import_sch.import_fmt; } else { if (!PCB_HAVE_GUI_ATTR_DLG) { - pcb_message(PCB_MSG_ERROR, "import_sch not configured; please use ImportSch(setup, ...)\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_sch2: can not find importer called '%s'\nIs the corresponding plugin compiled?\n", imp_name); + rnd_message(PCB_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 = pcb_conflist_first((pcb_conflist_t *)&conf_import_sch.plugins.import_sch.args); ci != NULL; ci = pcb_conflist_next(ci), n++) a[n] = ci->val.string[0]; - pcb_message(PCB_MSG_DEBUG, "import_sch2: reimport with %s -> %p\n", imp_name, p); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ImportSch: setup needs importer name\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ImportSch: failed to convert argument %d to string\n", n+1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ImportSch: importer not found: '%s'\n", argv[0].val.str); + rnd_message(PCB_MSG_ERROR, "ImportSch: importer not found: '%s'\n", argv[0].val.str); return -1; } if (p->single_arg && (argc != 2)) { - pcb_message(PCB_MSG_ERROR, "ImportSch: importer '%s' requires exactly one file name argument\n", argv[0].val.str); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ImportSch: importer '%s' requires at least one file name argument\n", argv[0].val.str); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/import_tinycad/tinycad.c (revision 30903) @@ -72,7 +72,7 @@ if (sattr->refdes != NULL) { /* pcb_trace("tinycad sym: refdes=%s val=%s fp=%s\n", sattr->refdes, sattr->value, sattr->footprint);*/ if (sattr->footprint == NULL) - pcb_message(PCB_MSG_ERROR, "tinycad: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(PCB_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); } @@ -161,7 +161,7 @@ fn = pcb_fopen(&PCB->hidlib, fname_net, "r"); if (fn == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_tinycad: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_autotrax/read.c (revision 30903) @@ -86,7 +86,7 @@ { if (sattr->refdes != NULL) { if (sattr->footprint == NULL) - pcb_message(PCB_MSG_ERROR, "protel autotrax: not importing refdes=%s: no footprint specified\n", sattr->refdes); + rnd_message(PCB_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); } @@ -107,9 +107,9 @@ conf_role_t settings_dest; pcb_layer_id_t protel_to_stackup[14]; int lineno; - pcb_coord_t mask_clearance; - pcb_coord_t copper_clearance; - pcb_coord_t minimum_comp_pin_drill; + rnd_coord_t mask_clearance; + rnd_coord_t copper_clearance; + rnd_coord_t minimum_comp_pin_drill; int trax_version; int ignored_keepout_element; int ignored_layer_zero_element; @@ -128,7 +128,7 @@ return NULL; } if (autotrax_layer == 0) { - pcb_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax layer zero, %s:%d\n", otyp, st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Ignored '%s' on easy/autotrax unknown layer %d, %s:%d\n", otyp, autotrax_layer, st->Filename, st->lineno); return NULL; } @@ -155,7 +155,7 @@ char line[MAXREAD], *t; int success; int valid = 1; - pcb_coord_t X, Y, linewidth; + rnd_coord_t X, Y, linewidth; int scaling = 100; unsigned direction = 0; /* default is horizontal */ pcb_flag_t Flags; @@ -189,7 +189,7 @@ qparse_free(argc, &argv); } else { - pcb_message(PCB_MSG_ERROR, "Insufficient free string attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to parse text attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Empty free string text field, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); return 0; } */ @@ -237,7 +237,7 @@ static int rdax_track(read_state_t *st, FILE *FP, pcb_subc_t *subc) { char line[MAXREAD]; - pcb_coord_t X1, Y1, X2, Y2, Thickness, Clearance; + rnd_coord_t X1, Y1, X2, Y2, Thickness, Clearance; pcb_flag_t Flags = pcb_flag_make(0); int autotrax_layer = 0; int success; @@ -272,7 +272,7 @@ qparse_free(argc, &argv); } else { - pcb_message(PCB_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Insufficient track attribute fields, %s:%d\n", st->Filename, st->lineno); qparse_free(argc, &argv); return -1; } @@ -297,7 +297,7 @@ int autotrax_layer = 0; pcb_layer_t *ly; - pcb_coord_t centreX, centreY, width, height, Thickness, Clearance, radius; + rnd_coord_t centreX, centreY, width, height, Thickness, Clearance, radius; pcb_angle_t start_angle = 0.0; pcb_angle_t delta = 360.0; @@ -333,13 +333,13 @@ } else { qparse_free(argc, &argv); - pcb_message(PCB_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Insufficient arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - pcb_message(PCB_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Unable to parse arc attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -440,7 +440,7 @@ int valid = 1; pcb_data_t *data = (subc == NULL) ? st->pcb->Data : subc->data; pcb_pstk_t *ps; - pcb_coord_t X, Y, Thickness, Clearance, Mask, Drill; /* not sure what to do with mask */ + rnd_coord_t X, Y, Thickness, Clearance, Mask, Drill; /* not sure what to do with mask */ Thickness = 0; Clearance = st->copper_clearance; /* start with sane default */ @@ -469,13 +469,13 @@ } else { qparse_free(argc, &argv); - pcb_message(PCB_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Insufficient via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - pcb_message(PCB_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Unable to parse via attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -498,7 +498,7 @@ int autotrax_layer = 0; int valid = 1; int success; - pcb_coord_t X, Y, X_size, Y_size, Thickness, Clearance, Mask, Drill; + rnd_coord_t X, Y, X_size, Y_size, Thickness, Clearance, Mask, Drill; pcb_data_t *data = (subc == NULL) ? st->pcb->Data : subc->data; pcb_pstk_t *ps; @@ -516,7 +516,7 @@ argc = qparse2(s, &argv, 0); if (argc <= 6) { qparse_free(argc, &argv); - pcb_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Insufficient pad attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "pin clears PWR/GND, %s:%d.\n", st->Filename, st->lineno); break; case 2: - pcb_message(PCB_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "pin requires relief to GND plane, %s:%d.\n", st->Filename, st->lineno); break; case 4: - pcb_message(PCB_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "pin requires relief to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 3: - pcb_message(PCB_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "pin should connect to PWR plane, %s:%d.\n", st->Filename, st->lineno); break; case 5: - pcb_message(PCB_MSG_ERROR, "pin should connect to GND plane, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Ignored pad on easy/autotrax layer zero, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Unsupported FP target shape %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Unsupported FP layer: %d, %s:%d.\n", autotrax_layer, st->Filename, st->lineno); return 0; } @@ -640,7 +640,7 @@ switch(Shape) { case 1: /* round */ for(n = 0; n < 7; n++) { - pcb_coord_t clr = (sh[n].layer_mask & PCB_LYT_MASK) ? Clearance : 0; + rnd_coord_t clr = (sh[n].layer_mask & PCB_LYT_MASK) ? Clearance : 0; if (sh[n].layer_mask == 0) break; pcb_shape_oval(&sh[n], X_size+clr, Y_size+clr); } @@ -649,7 +649,7 @@ case 4: /* round-rect - for now */ TODO("generate round-rect") for(n = 0; n < 7; n++) { - pcb_coord_t clr = (sh[n].layer_mask & PCB_LYT_MASK) ? Clearance : 0; + rnd_coord_t clr = (sh[n].layer_mask & PCB_LYT_MASK) ? Clearance : 0; if (sh[n].layer_mask == 0) break; pcb_shape_rect(&sh[n], X_size+clr, Y_size+clr); } @@ -657,12 +657,12 @@ case 3: /* octa */ TODO("generate octa") default: - pcb_message(PCB_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Failed to convert FP to padstack, %s:%d.\n", st->Filename, st->lineno); return (ps != NULL); } @@ -677,7 +677,7 @@ char line[MAXREAD]; pcb_poly_t *polygon = NULL; pcb_flag_t flags = pcb_flag_make(PCB_FLAG_CLEARPOLY); - pcb_coord_t X1, Y1, X2, Y2, Clearance; + rnd_coord_t X1, Y1, X2, Y2, Clearance; pcb_layer_t *ly; Clearance = st->copper_clearance; /* start with sane default */ @@ -705,13 +705,13 @@ } else { qparse_free(argc, &argv); - pcb_message(PCB_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Insufficient fill attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - pcb_message(PCB_MSG_ERROR, "Fill attribute fields unable to be parsed, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -737,7 +737,7 @@ return 1; } else { - pcb_coord_t w = X2-X1, h = Y2-Y1; + rnd_coord_t w = X2-X1, h = Y2-Y1; pcb_pstk_shape_t sh[4]; pcb_layer_type_t side; int n; @@ -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; - pcb_message(PCB_MSG_ERROR, "SMD pad: filed to convert from polygon, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Unable to create Keepout, Multi layers in default top silk group\n"); + rnd_message(PCB_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 = pcb_strdup(line); } else { - pcb_message(PCB_MSG_ERROR, "Empty netlist name found, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Empty line in netlist COMP, %s:%d\n", st->Filename, st->lineno); } else { if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - pcb_message(PCB_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Empty netlist REFDES, %s:%d\n", st->Filename, st->lineno); } else { s = line; @@ -879,7 +879,7 @@ sattr.refdes = pcb_strdup(line); } if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { - pcb_message(PCB_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Empty NETDEF package, %s:%d\n", st->Filename, st->lineno); free(sattr.footprint); sattr.footprint = pcb_strdup("unknown"); } @@ -934,7 +934,7 @@ } } else if (length >= 6 && strncmp(line, "ENDPCB", 6) == 0) { - pcb_message(PCB_MSG_ERROR, "End of protel Autotrax file found in netlist section?!, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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 */ } } @@ -950,7 +950,7 @@ int success; int valid = 1; int refdes_scaling = 100; - pcb_coord_t module_X, module_Y; + rnd_coord_t module_X, module_Y; unsigned direction = 0; /* default is horizontal */ char module_name[MAXREAD], module_refdes[MAXREAD], module_value[MAXREAD]; pcb_subc_t *new_module; @@ -1004,13 +1004,13 @@ } else { qparse_free(argc, &argv); - pcb_message(PCB_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Insufficient COMP attribute fields, %s:%d\n", st->Filename, st->lineno); return -1; } } if (!valid) { - pcb_message(PCB_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_MSG_ERROR, "Unable to parse COMP attributes, %s:%d\n", st->Filename, st->lineno); return -1; } @@ -1034,7 +1034,7 @@ break; } else { - pcb_message(PCB_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); + rnd_message(PCB_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); } if (st.ignored_layer_zero_element) { - pcb_message(PCB_MSG_ERROR, "Ignored %d auto/easytrax layer zero feature(s)\n", st.ignored_layer_zero_element); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Can not determine board extents - empty board?\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_autotrax/write.c (revision 30903) @@ -43,7 +43,7 @@ typedef struct { pcb_layer_type_t lyt; - pcb_bool plane; + rnd_bool plane; } layer_map_t; /* The hardwired layer map of autotrax */ @@ -143,12 +143,12 @@ #define PCB_PSTK_COMPAT_RRECT 250 -static int wrax_padstack(wctx_t *ctx, pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_padstack(wctx_t *ctx, pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { const char *name; - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness, w, h; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness, w, h; pcb_pstk_compshape_t cshape; - pcb_bool plated, square, nopaste; + rnd_bool plated, square, nopaste; int ashape, alayer; if (ps->term != NULL) { @@ -229,9 +229,9 @@ return 0; } -int wrax_data(wctx_t *ctx, pcb_data_t *data, pcb_coord_t dx, pcb_coord_t dy); +int wrax_data(wctx_t *ctx, pcb_data_t *data, rnd_coord_t dx, rnd_coord_t dy); -static int wrax_vias(wctx_t *ctx, pcb_data_t *Data, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_vias(wctx_t *ctx, pcb_data_t *Data, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { gdl_iterator_t it; pcb_pstk_t *ps; @@ -244,7 +244,7 @@ } /* writes generic autotrax track descriptor line for components and layouts */ -static int wrax_line(wctx_t *ctx, pcb_line_t *line, pcb_cardinal_t layer, pcb_coord_t dx, pcb_coord_t dy) +static int wrax_line(wctx_t *ctx, pcb_line_t *line, pcb_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) { int user_routed = 1; pcb_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", line->Point1.X+dx, PCB->hidlib.size_y - (line->Point1.Y+dy), line->Point2.X+dx, PCB->hidlib.size_y - (line->Point2.Y+dy), line->Thickness, layer, user_routed); @@ -252,7 +252,7 @@ } /* writes autotrax track descriptor for a pair of polyline vertices */ -static int wrax_pline_segment(wctx_t *ctx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t Thickness, pcb_cardinal_t layer) +static int wrax_pline_segment(wctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t Thickness, pcb_cardinal_t layer) { int user_routed = 1; pcb_fprintf(ctx->f, "FT\r\n%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", x1, PCB->hidlib.size_y - y1, x2, PCB->hidlib.size_y - y2, Thickness, layer, user_routed); @@ -262,12 +262,12 @@ typedef struct { wctx_t *wctx; pcb_cardinal_t layer; - pcb_coord_t dx, dy; - pcb_coord_t thickness; + rnd_coord_t dx, dy; + rnd_coord_t thickness; } autotrax_hatch_ctx_t; -static void autotrax_hatch_cb(void *ctx_, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void autotrax_hatch_cb(void *ctx_, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { autotrax_hatch_ctx_t *hctx = (autotrax_hatch_ctx_t *) ctx_; wrax_pline_segment( @@ -277,7 +277,7 @@ } /* generates autotrax tracks to cross hatch a complex polygon being exported */ -static void autotrax_cpoly_hatch_lines(wctx_t *ctx, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, pcb_coord_t period, pcb_coord_t thickness, pcb_cardinal_t layer, pcb_coord_t dx, pcb_coord_t dy) +static void autotrax_cpoly_hatch_lines(wctx_t *ctx, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t period, rnd_coord_t thickness, pcb_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) { autotrax_hatch_ctx_t hctx; @@ -331,9 +331,9 @@ } /* writes generic autotrax arc descriptor line for components and layouts */ -static int wrax_arc(wctx_t *ctx, pcb_arc_t *arc, int current_layer, pcb_coord_t dx, pcb_coord_t dy) +static int wrax_arc(wctx_t *ctx, pcb_arc_t *arc, int current_layer, rnd_coord_t dx, rnd_coord_t dy) { - pcb_coord_t radius; + rnd_coord_t radius; if (arc->Width > arc->Height) { radius = arc->Height; } @@ -373,7 +373,7 @@ } -static int wrax_lines(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_lines(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { gdl_iterator_t it; pcb_line_t *line; @@ -397,7 +397,7 @@ } /* writes autotrax arcs for layouts */ -static int wrax_arcs(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_arcs(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { gdl_iterator_t it; pcb_arc_t *arc; @@ -421,13 +421,13 @@ } /* writes generic autotrax text descriptor line layouts onl, since no text in .fp */ -static int wrax_text(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_text(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { pcb_font_t *myfont = pcb_font(PCB, 0, 1); - pcb_coord_t mHeight = myfont->MaxHeight; /* autotrax needs the width of the widest letter */ + rnd_coord_t mHeight = myfont->MaxHeight; /* autotrax needs the width of the widest letter */ int autotrax_mirrored = 0; /* 0 is not mirrored, +16 is mirrored */ - pcb_coord_t default_stroke_thickness, strokeThickness, textHeight; + rnd_coord_t default_stroke_thickness, strokeThickness, textHeight; int rotation; int local_flag; @@ -498,10 +498,10 @@ { int res, on_bottom = 0, silk_layer; pcb_box_t *box = &subc->BoundingBox; - pcb_coord_t xPos, yPos, yPos2, yPos3; + rnd_coord_t xPos, yPos, yPos2, yPos3; TODO("do not hardcode things like this, especially when actual data is available") - pcb_coord_t text_offset = PCB_MIL_TO_COORD(400); /* this gives good placement of refdes relative to element */ + rnd_coord_t text_offset = PCB_MIL_TO_COORD(400); /* this gives good placement of refdes relative to element */ TODO("rename these variables to something more expressive") TODO("instead of hardwiring coords, just read existing dyntex coords") @@ -544,7 +544,7 @@ } /* writes polygon data in autotrax fill (rectangle) format for use in a layout .PCB file */ -static int wrax_polygons(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t dx, pcb_coord_t dy, pcb_bool in_subc) +static int wrax_polygons(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { int i; gdl_iterator_t it; @@ -554,7 +554,7 @@ pcb_poly_it_t poly_it; pcb_polyarea_t *pa; - pcb_coord_t minx, miny, maxx, maxy; + rnd_coord_t minx, miny, maxx, maxy; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer)) { /*|| (layer->name && *layer->name)) { */ @@ -586,11 +586,11 @@ /* here we need to test for non rectangular polygons to flag imperfect export to easy/autotrax if (helper_clipped_polygon_type_function(clipped_thing)) { - pcb_message(PCB_MSG_ERROR, "Polygon exported as a bounding box only.\n"); + rnd_message(PCB_MSG_ERROR, "Polygon exported as a bounding box only.\n"); }*/ } else { - pcb_coord_t Thickness; + rnd_coord_t Thickness; Thickness = PCB_MIL_TO_COORD(10); autotrax_cpoly_hatch_lines(ctx, polygon, PCB_CPOLY_HATCH_HORIZONTAL | PCB_CPOLY_HATCH_VERTICAL, Thickness * 3, Thickness, current_layer, dx, dy); TODO("do we really need to reimplement this, can not cpoly_hatch_lines handle it?") @@ -630,10 +630,10 @@ return 0; } -int wrax_data(wctx_t *ctx, pcb_data_t *data, pcb_coord_t dx, pcb_coord_t dy) +int wrax_data(wctx_t *ctx, pcb_data_t *data, rnd_coord_t dx, rnd_coord_t dy) { int n; - pcb_bool in_subc = (data->parent_type == PCB_PARENT_SUBC); + rnd_bool in_subc = (data->parent_type == PCB_PARENT_SUBC); for(n = 0; n < data->LayerN; n++) { pcb_layer_t *ly = &data->Layer[n]; @@ -656,7 +656,7 @@ } /* writes autotrax PCB to file */ -int io_autotrax_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_autotrax_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { wctx_t wctx; @@ -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) { - pcb_message(PCB_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); + rnd_message(PCB_MSG_ERROR, "Layout size exceeds protel autotrax 32000 mil x 32000 mil maximum."); return -1; } Index: trunk/src_plugins/io_autotrax/write.h =================================================================== --- trunk/src_plugins/io_autotrax/write.h (revision 30902) +++ trunk/src_plugins/io_autotrax/write.h (revision 30903) @@ -32,4 +32,4 @@ int io_autotrax_write_element(pcb_plug_io_t *ctx, FILE *FP, pcb_data_t *Data); int io_autotrax_write_buffer(pcb_plug_io_t *ctx, FILE *FP, pcb_buffer_t *buff); -int io_autotrax_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_autotrax_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); Index: trunk/src_plugins/io_bxl/bxl.h =================================================================== --- trunk/src_plugins/io_bxl/bxl.h (revision 30902) +++ trunk/src_plugins/io_bxl/bxl.h (revision 30903) @@ -36,13 +36,13 @@ int proto_id; struct { - pcb_coord_t origin_x, origin_y, pick_x, pick_y, glue_x, glue_y; + rnd_coord_t origin_x, origin_y, pick_x, pick_y, glue_x, glue_y; } pat_state; struct { pcb_layer_t *layer; - pcb_coord_t origin_x, origin_y, endp_x, endp_y, width, height, radius; - pcb_coord_t hole; + rnd_coord_t origin_x, origin_y, endp_x, endp_y, width, height, radius; + rnd_coord_t hole; pcb_poly_t *poly; double arc_start, arc_delta; double rot; @@ -72,8 +72,8 @@ } warn; } pcb_bxl_ctx_t; -pcb_coord_t pcb_bxl_coord_x(pcb_coord_t c); -pcb_coord_t pcb_bxl_coord_y(pcb_coord_t c); +rnd_coord_t pcb_bxl_coord_x(rnd_coord_t c); +rnd_coord_t pcb_bxl_coord_y(rnd_coord_t c); void pcb_bxl_pattern_begin(pcb_bxl_ctx_t *ctx, const char *name); void pcb_bxl_pattern_end(pcb_bxl_ctx_t *ctx); @@ -93,7 +93,7 @@ void pcb_bxl_poly_begin(pcb_bxl_ctx_t *ctx); void pcb_bxl_poly_end(pcb_bxl_ctx_t *ctx); -void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, pcb_coord_t x, pcb_coord_t y); +void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, rnd_coord_t x, rnd_coord_t y); void pcb_bxl_text_style_begin(pcb_bxl_ctx_t *ctx, char *name); void pcb_bxl_text_style_end(pcb_bxl_ctx_t *ctx); Index: trunk/src_plugins/io_bxl/bxl_gram.h =================================================================== --- trunk/src_plugins/io_bxl/bxl_gram.h (revision 30902) +++ trunk/src_plugins/io_bxl/bxl_gram.h (revision 30903) @@ -58,7 +58,7 @@ double d; int i; char *s; - pcb_coord_t c; + rnd_coord_t c; } pcb_bxl_tokunion_t; #line 3 "bxl_gram.y" typedef struct Index: trunk/src_plugins/io_bxl/bxl_gram.y =================================================================== --- trunk/src_plugins/io_bxl/bxl_gram.y (revision 30902) +++ trunk/src_plugins/io_bxl/bxl_gram.y (revision 30903) @@ -10,7 +10,7 @@ double d; int i; char *s; - pcb_coord_t c; + rnd_coord_t c; } Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 30902) +++ trunk/src_plugins/io_bxl/read.c (revision 30903) @@ -106,8 +106,8 @@ return &tmp; } -pcb_coord_t pcb_bxl_coord_x(pcb_coord_t c) { return c; } -pcb_coord_t pcb_bxl_coord_y(pcb_coord_t c) { return -c; } +rnd_coord_t pcb_bxl_coord_x(rnd_coord_t c) { return c; } +rnd_coord_t pcb_bxl_coord_y(rnd_coord_t c) { return -c; } void pcb_bxl_pattern_begin(pcb_bxl_ctx_t *bctx, const char *name) { @@ -213,7 +213,7 @@ { htsi_entry_t *e = htsi_getentry(&ctx->proto_name2id, name); if (e != NULL) - pcb_message(PCB_MSG_WARNING, "bxl footprint error: padstack '%s' redefined\n", name); + rnd_message(PCB_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) - pcb_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(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); if (ctx->state.has_mask_shape) return; /* do not override user's mask */ if (ctx->state.copper_shape_idx < 0) { - pcb_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(PCB_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) - pcb_message(PCB_MSG_WARNING, "bxl footprint error: failed to insert padstack '%s'\n", ctx->state.proto.name); + rnd_message(PCB_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 (pcb_strcasecmp(name, "square") == 0) ctx->state.shape_type = 1; else if (pcb_strcasecmp(name, "round") == 0) ctx->state.shape_type = 2; else { - pcb_message(PCB_MSG_WARNING, "bxl footprint error: unknown padstack shape '%s' in '%s' - omitting shape\n", name, ctx->state.proto.name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_WARNING, "bxl footprint error: 0 sized copper shape in padstack '%s'\n", ctx->state.proto.name); + rnd_message(PCB_MSG_WARNING, "bxl footprint error: 0 sized copper shape in padstack '%s'\n", ctx->state.proto.name); return; } @@ -313,7 +313,7 @@ switch(ctx->state.shape_type) { case 1: /* rectangle, square */ { - pcb_coord_t w2 = (ctx->state.width/2)+1, h2 = (ctx->state.height/2)+1; + rnd_coord_t w2 = (ctx->state.width/2)+1, h2 = (ctx->state.height/2)+1; sh->shape = PCB_PSSH_POLY; pcb_pstk_shape_alloc_poly(&sh->data.poly, 4); sh->data.poly.x[0] = -w2; sh->data.poly.y[0] = -h2; @@ -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) - pcb_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(PCB_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 - pcb_message(PCB_MSG_ERROR, "bxl footprint: internal error: failed to create padstack - expect missing padstacks\n"); + rnd_message(PCB_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; - pcb_message(PCB_MSG_WARNING, "bxl footprint error: invalid padstack reference '%s' - pad will not be created\n", pstkname); + rnd_message(PCB_MSG_WARNING, "bxl footprint error: invalid padstack reference '%s' - pad will not be created\n", pstkname); return; } ctx->state.pstk_proto_id = e->value; @@ -394,7 +394,7 @@ void pcb_bxl_add_line(pcb_bxl_ctx_t *ctx) { - pcb_coord_t width; + rnd_coord_t width; SKIP; width = ctx->state.width; if (width == 0) @@ -407,7 +407,7 @@ void pcb_bxl_add_arc(pcb_bxl_ctx_t *ctx) { - pcb_coord_t width; + rnd_coord_t width; SKIP; width = ctx->state.width; if (width == 0) @@ -423,7 +423,7 @@ { pcb_flag_values_t flg = 0; int scale; - pcb_coord_t thickness; + rnd_coord_t thickness; SKIP; if (!ctx->state.is_text && (ctx->state.attr_key != NULL)) { @@ -475,7 +475,7 @@ ctx->state.delayed_poly = 1; } -void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, pcb_coord_t x, pcb_coord_t y) +void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, rnd_coord_t x, rnd_coord_t y) { SKIP; assert(ctx->state.poly != NULL); @@ -507,7 +507,7 @@ htsp_set(&ctx->text_name2style, name, ts); /* name is not free'd at the caller */ } else - pcb_message(PCB_MSG_WARNING, "bxl footprint error: text style '%s' is redefined; second definition will override first\n", name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_WARNING, "bxl footprint error: text style '%s' not defined (using default style)\n", name); + rnd_message(PCB_MSG_WARNING, "bxl footprint error: text style '%s' not defined (using default style)\n", name); } @@ -527,7 +527,7 @@ #define WARN_CNT(_count_, args) \ do { \ long cnt = (bctx->warn._count_); \ - if (cnt > 0) pcb_message args; \ + if (cnt > 0) rnd_message args; \ } while(0) Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30902) +++ trunk/src_plugins/io_dsn/read.c (revision 30903) @@ -83,19 +83,19 @@ #define if_save_uniq(node, name) \ if (pcb_strcasecmp(node->str, #name) == 0) { \ if (n ## name != NULL) { \ - pcb_message(PCB_MSG_ERROR, "Multiple " #name " nodes where only one is expected (at %ld:%ld)\n", (long)node->line, (long)node->col); \ + rnd_message(PCB_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; \ } -static pcb_coord_t COORD(dsn_read_t *ctx, gsxl_node_t *n) +static rnd_coord_t COORD(dsn_read_t *ctx, gsxl_node_t *n) { char *end, *s = STRE(n); double v = strtod(s, &end); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Invalid coord: '%s' (at %ld:%ld)\n", s, (long)n->line, (long)n->col); + rnd_message(PCB_MSG_ERROR, "Invalid coord: '%s' (at %ld:%ld)\n", s, (long)n->line, (long)n->col); return 0; } v /= ctx->unit->scale_factor; @@ -108,7 +108,7 @@ #define COORDY(ctx, n) (ctx->bbox.Y2 - COORD(ctx, n)) /* load coordinates from nodes starting from src, hoppin on ->next, into - pcb_coord_t dst[]. Each coord is converted according to the next char + rnd_coord_t dst[]. Each coord is converted according to the next char in const char *fmt[]; 'c' is raw coord, 'x' and 'y' are board coords, 'X' and 'Y' are relative coords */ #define DSN_LOAD_COORDS_FMT(dst, src, fmt, err_statement) \ @@ -142,7 +142,7 @@ ctx->unit = get_unit_struct(su); if (ctx->unit == NULL) { - pcb_message(PCB_MSG_ERROR, "Invalid unit: '%s' (at %ld:%ld)\n", su, (long)nu->line, (long)nu->col); + rnd_message(PCB_MSG_ERROR, "Invalid unit: '%s' (at %ld:%ld)\n", su, (long)nu->line, (long)nu->col); return NULL; } @@ -175,9 +175,9 @@ static int dsn_parse_wire(dsn_read_t *ctx, gsxl_node_t *wrr, pcb_subc_t *subc, pcb_layer_t *force_ly); -static pcb_coord_t dsn_load_aper(dsn_read_t *ctx, gsxl_node_t *c) +static rnd_coord_t dsn_load_aper(dsn_read_t *ctx, gsxl_node_t *c) { - pcb_coord_t res = COORD(ctx, c); + rnd_coord_t res = COORD(ctx, c); if (res == 0) res = 1; return res; @@ -191,10 +191,10 @@ static int dsn_parse_rect(dsn_read_t *ctx, pcb_box_t *dst, gsxl_node_t *src, int no_y_flip) { - pcb_coord_t x, y; + rnd_coord_t x, y; if (src == NULL) { - pcb_message(PCB_MSG_ERROR, "Missing coord in rect\n"); + rnd_message(PCB_MSG_ERROR, "Missing coord in rect\n"); return -1; } @@ -221,7 +221,7 @@ return 0; err:; - pcb_message(PCB_MSG_ERROR, "Missing coord in rect (at %ld:%ld)\n", (long)src->line, (long)src->col); + rnd_message(PCB_MSG_ERROR, "Missing coord in rect (at %ld:%ld)\n", (long)src->line, (long)src->col); return -1; } @@ -236,7 +236,7 @@ return 0; } -static void boundary_line(pcb_layer_t *oly, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t aper) +static void boundary_line(pcb_layer_t *oly, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t aper) { if (aper <= 0) aper = 1; @@ -250,16 +250,16 @@ if (bnd->str == NULL) continue; if (pcb_strcasecmp(bnd->str, "path") == 0) { - pcb_coord_t x, y, lx, ly, fx, fy, aper; + rnd_coord_t x, y, lx, ly, fx, fy, aper; int len; b = gsxl_children(bnd); if (!do_bbox && (pcb_strcasecmp(STRE(b), "pcb") == 0)) { - pcb_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(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "not enough arguments for boundary poly (at %ld:%ld)\n", (long)b->line, (long)b->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "not enough arguments for boundary rect (at %ld:%ld)\n", (long)b->line, (long)b->col); + rnd_message(PCB_MSG_ERROR, "not enough arguments for boundary rect (at %ld:%ld)\n", (long)b->line, (long)b->col); return -1; } if (pcb_strcasecmp(STRE(b), "pcb") == 0) @@ -328,7 +328,7 @@ return 0; if (pcb_layer_list(ctx->pcb, PCB_LYT_BOUNDARY, &olid, 1) < 1) { - pcb_message(PCB_MSG_ERROR, "Intenal error: no boundary layer found\n"); + rnd_message(PCB_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; } - pcb_message(PCB_MSG_WARNING, "Ignoring unknown layer type '%s' for %s\n", ty, grp->name); + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "Too many layer groups in the layer stack (at %ld:%ld)\n", (long)node->line, (long)node->col); \ + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not parse board without a structure subtree\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "io_dsn internal error: no layer in group\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not parse board without a copper layers\n"); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_WARNING, "Negative coordinates on input - you may want to execute autocrop()\n"); + rnd_message(PCB_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; - pcb_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(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"); } /* place polygons on planes */ @@ -499,7 +499,7 @@ if (pcb_attribute_get(&grp->Attributes, "plane") != NULL) { pcb_layer_t *ly; if (!ctx->has_pcb_boundary) { - pcb_message(PCB_MSG_ERROR, "Because of the missing pcb boundary power planes are not filled with polygons.\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Padstack circle: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Padstack path: not enough arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_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))) { - pcb_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(PCB_MSG_ERROR, "Padstack path: too many arguments - only a single line supported (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } @@ -592,18 +592,18 @@ int dsn_parse_pstk_shape_poly(dsn_read_t *ctx, gsxl_node_t *nd, pcb_pstk_shape_t *shp) { gsxl_node_t *n, *ap = nd->children->next, *args = ap->next; - pcb_coord_t aper; + rnd_coord_t aper; long len, i; for(len = 0, n = args; (n != NULL) && !(isalpha(*n->str)); n = n->next, len++) ; if (len < 3) { - pcb_message(PCB_MSG_ERROR, "Padstack poly: too few points (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_MSG_ERROR, "Padstack poly: too few points (at %ld:%ld)\n", (long)nd->line, (long)nd->col); return -1; } if ((len % 2) != 0) { - pcb_message(PCB_MSG_ERROR, "Padstack poly: wrong (odd) number of arguments (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid padstack shape (at %ld:%ld)\n", (long)sn->line, (long)sn->col); + rnd_message(PCB_MSG_ERROR, "Invalid padstack shape (at %ld:%ld)\n", (long)sn->line, (long)sn->col); return -1; } if (pcb_strcasecmp(sn->str, "circle") == 0) { @@ -659,11 +659,11 @@ return -1; } else if (pcb_strcasecmp(sn->str, "qarc") == 0) { - pcb_message(PCB_MSG_ERROR, "Unsupported padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); + rnd_message(PCB_MSG_ERROR, "Unsupported padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); return -1; } else { - pcb_message(PCB_MSG_ERROR, "Invalid/unknown padstack shape %s (at %ld:%ld)\n", sn->str, (long)sn->line, (long)sn->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", nname, (long)net->line, (long)net->col); + rnd_message(PCB_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; - pcb_message(PCB_MSG_WARNING, "Incompatible padstack: some shape details are lost (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Empty padstack (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_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)) - pcb_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(PCB_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 ((pcb_strcasecmp(n->str, "rotate") == 0) || (pcb_strcasecmp(n->str, "absolute") == 0)) { if (pcb_strcasecmp(STRE(n->children), "off") == 0) { - pcb_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(PCB_MSG_WARNING, "unhandled padstack flag %s (at %ld:%ld) - this property will be ignored\n", n->str, (long)n->line, (long)n->col); } } } @@ -831,18 +831,18 @@ pcb_pstk_proto_t *proto; if ((psname == NULL) || (*psname == '\0')) { - pcb_message(PCB_MSG_ERROR, "Invalid anonymous via (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); return -1; } for(ncoord = pn->children->next; ncoord != NULL; ncoord = ncoord->next->next) { - pcb_coord_t crd[2]; + rnd_coord_t crd[2]; pcb_cardinal_t pid; DSN_LOAD_COORDS_FMT(crd, ncoord, "XY", goto err_coord); @@ -852,7 +852,7 @@ return 0; err_coord:; - pcb_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } @@ -863,22 +863,22 @@ pcb_pstk_proto_t *proto; pcb_pstk_t *ps; pcb_cardinal_t pid; - pcb_coord_t crd[2] = {0, 0}; + rnd_coord_t crd[2] = {0, 0}; double rotang = 0.0; if ((psname == NULL) || (*psname == '\0')) { - pcb_message(PCB_MSG_ERROR, "Invalid anonymous pin (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unknown pin '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Unknown pin '%s' (at %ld:%ld)\n", psname, (long)pn->line, (long)pn->col); return -1; } if (pn->children->next == NULL) { - pcb_message(PCB_MSG_ERROR, "Missing pin terminal ID (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "Invalid pin rotation angle (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Invalid pin rotation angle (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } } @@ -906,11 +906,11 @@ pcb_attribute_put(&ps->Attributes, "term", term); } else - pcb_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return 0; err_coord:; - pcb_message(PCB_MSG_ERROR, "Invalid pin coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); + rnd_message(PCB_MSG_ERROR, "Invalid pin coordinates (at %ld:%ld)\n", (long)pn->line, (long)pn->col); return -1; } @@ -930,7 +930,7 @@ } } if (!found) { - pcb_message(PCB_MSG_ERROR, "Internal error: subc doc outline layer (at %ld:%ld)\n", (long)nd->line, (long)nd->col); + rnd_message(PCB_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')) { - pcb_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(PCB_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 ((pcb_strcasecmp(n->str, "jumper") == 0) || (pcb_strcasecmp(n->str, "via_array_template") == 0) || (pcb_strcasecmp(n->str, "directory") == 0)) { - pcb_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(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); } } @@ -1097,7 +1097,7 @@ else \ ly = htsp_get(&ctx->name2layer, __nname__); \ if (ly == NULL) { \ - pcb_message(PCB_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", __nname__, (long)__net__->line, (long)__net__->col); \ + rnd_message(PCB_MSG_ERROR, "Invalid/unknown net '%s' (at %ld:%ld)\n", __nname__, (long)__net__->line, (long)__net__->col); \ { fail; } \ } \ } \ @@ -1109,8 +1109,8 @@ { gsxl_node_t *n, *net = wrr->children; pcb_layer_t *ly; - pcb_coord_t aper; - pcb_coord_t x, y, fx, fy; + rnd_coord_t aper; + rnd_coord_t x, y, fx, fy; long len = 0; pcb_poly_t *poly; @@ -1117,7 +1117,7 @@ DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - pcb_message(PCB_MSG_ERROR, "Not enough wire polygon attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); break; } n = n->next; @@ -1152,7 +1152,7 @@ } if (len < 3) { - pcb_message(PCB_MSG_ERROR, "Not enough coordinate pairs for a polygon (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_MSG_ERROR, "Not enough coordinate pairs for a polygon (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1209,7 +1209,7 @@ { gsxl_node_t *n, *net = wrr->children; pcb_layer_t *ly; - pcb_coord_t r, cent[2] = {0, 0}; + rnd_coord_t r, cent[2] = {0, 0}; pcb_poly_t *poly; double a, astep; @@ -1216,7 +1216,7 @@ DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - pcb_message(PCB_MSG_ERROR, "Not enough wire circle attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_MSG_ERROR, "Not enough wire circle attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1230,7 +1230,7 @@ astep = 2*M_PI / (8 + r / PCB_MM_TO_COORD(0.1)); for(a = 0; a < 2*M_PI; a += astep) { - pcb_coord_t x, y; + rnd_coord_t x, y; x = pcb_round(cos(a) * (double)r + (double)cent[0]); y = pcb_round(sin(a) * (double)r + (double)cent[1]); pcb_poly_point_new(poly, x, y); @@ -1239,7 +1239,7 @@ return 0; err_cent:; - pcb_message(PCB_MSG_ERROR, "Not enough circle center attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_MSG_ERROR, "Not enough circle center attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1247,14 +1247,14 @@ { gsxl_node_t *n, *net = wrr->children; pcb_layer_t *ly; - pcb_coord_t aper; - pcb_coord_t x, y, px, py; + rnd_coord_t aper; + rnd_coord_t x, y, px, py; int len = 0; DSN_PARSE_NET(ly, net, return -1, subc, force_ly); if ((net->next == NULL) || (net->next->next == NULL)) { - pcb_message(PCB_MSG_ERROR, "Not enough wire path attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); + rnd_message(PCB_MSG_ERROR, "Not enough coordinate values (missing y)\n"); break; } n = n->next; @@ -1284,10 +1284,10 @@ return 0; } -static int qarc_angle(pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t x, pcb_coord_t y, pcb_coord_t *r) +static int qarc_angle(rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t x, rnd_coord_t y, rnd_coord_t *r) { - pcb_coord_t dx = x - cx; - pcb_coord_t dy = y - cy; + rnd_coord_t dx = x - cx; + rnd_coord_t dy = y - cy; if ((dx != 0) && (dy != 0)) return -1; @@ -1317,8 +1317,8 @@ { gsxl_node_t *coords, *net = wrr->children; pcb_layer_t *ly; - pcb_coord_t r1, r2, aper; - pcb_coord_t crd[6]; /* sx, sy, ex, ey, cx, cy */ + rnd_coord_t r1, r2, aper; + rnd_coord_t crd[6]; /* sx, sy, ex, ey, cx, cy */ int sa, ea; DSN_PARSE_NET(ly, net, return -1, subc, force_ly); @@ -1325,7 +1325,7 @@ if ((net->next == NULL) || ((coords = net->next->next) == NULL)) { not_enough:; - pcb_message(PCB_MSG_ERROR, "Not enough wire qarc attributes (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "invalid qarcs coords (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); + rnd_message(PCB_MSG_ERROR, "invalid qarcs coords (at %ld:%ld)\n", (long)wrr->line, (long)wrr->col); return -1; } @@ -1395,10 +1395,10 @@ pcb_pstk_proto_t *proto; const char *pname; pcb_cardinal_t pid; - pcb_coord_t crd[2] = {0, 0}; + rnd_coord_t crd[2] = {0, 0}; if ((vnd->children == NULL) || (vnd->children->str == NULL)) { - pcb_message(PCB_MSG_ERROR, "Not enough via arguments (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", pname, (long)vnd->line, (long)vnd->col); + rnd_message(PCB_MSG_ERROR, "Unknown via '%s' (at %ld:%ld)\n", pname, (long)vnd->line, (long)vnd->col); return -1; } @@ -1413,17 +1413,17 @@ 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) - pcb_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(PCB_MSG_ERROR, "Failed to create via - expect missing vias (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); return 0; err_coord:; - pcb_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); + rnd_message(PCB_MSG_ERROR, "Invalid via coordinates (at %ld:%ld)\n", (long)vnd->line, (long)vnd->col); return -1; } static int dsn_parse_point(dsn_read_t *ctx, gsxl_node_t *tnd) { - pcb_coord_t crd[2] = {0, 0}; + rnd_coord_t crd[2] = {0, 0}; gsxl_node_t *side; pcb_pstk_t *ps; int back; @@ -1432,7 +1432,7 @@ side = tnd->children->next->next; if ((side == NULL) || (side->str == NULL)) { - pcb_message(PCB_MSG_ERROR, "Testpoint without side (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(PCB_MSG_ERROR, "Testpoint without side (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); return -1; } if (pcb_strcasecmp(side->str, "front") == 0) { @@ -1442,7 +1442,7 @@ back = 1; } else { - pcb_message(PCB_MSG_ERROR, "Invalid testpoint side '%s' (at %ld:%ld)\n", side->str, (long)tnd->line, (long)tnd->col); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to create testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(PCB_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:; - pcb_message(PCB_MSG_ERROR, "Not enough coordinates for a testpoint (at %ld:%ld)\n", (long)tnd->line, (long)tnd->col); + rnd_message(PCB_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 ((pcb_strcasecmp(wrr->str, "bond") == 0) || (pcb_strcasecmp(wrr->str, "supply_pin") == 0)) { - pcb_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(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); } } @@ -1530,12 +1530,12 @@ subc = htsp_get(&ctx->subcs, id); if (subc == NULL) { - pcb_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(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); return -1; } for(n = plr->children->next; n != NULL; n = n->next) { - pcb_coord_t crd[2] = {0, 0}; + rnd_coord_t crd[2] = {0, 0}; const char *refdes = STRE(n->children); gsxl_node_t *side; int need_mirror; @@ -1546,7 +1546,7 @@ side = n->children->next->next->next; if ((side == NULL) || (side->str == NULL)) { - pcb_message(PCB_MSG_ERROR, "Invalid placement side (at %ld:%ld)\n", (long)n->line, (long)n->col); + rnd_message(PCB_MSG_ERROR, "Invalid placement side (at %ld:%ld)\n", (long)n->line, (long)n->col); return -1; } if (pcb_strcasecmp(side->str, "front") == 0) @@ -1554,13 +1554,13 @@ else if (pcb_strcasecmp(side->str, "back") == 0) need_mirror = 1; else { - pcb_message(PCB_MSG_ERROR, "Invalid placement side '%s' (at %ld:%ld)\n", side->str, (long)n->line, (long)n->col); + rnd_message(PCB_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') { - pcb_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(PCB_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:; - pcb_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(PCB_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 (pcb_strcasecmp(STRE(plr->children->children), "mirror_first") == 0) mirror_first = 0; else - pcb_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(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); } } else if (pcb_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) { - pcb_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(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); 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) { - pcb_message(PCB_MSG_ERROR, "Invalid resolution unit: '%s'\n", su); + rnd_message(PCB_MSG_ERROR, "Invalid resolution unit: '%s'\n", su); return -1; } } @@ -1820,7 +1820,7 @@ fclose(f); if (res != GSX_RES_EOE) { - pcb_message(PCB_MSG_ERROR, "s-expression parse error at offset %ld\n", offs); + rnd_message(PCB_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) || (pcb_strcasecmp(rn->str, "pcb") != 0)) { - pcb_message(PCB_MSG_ERROR, "Root node should be pcb, got %s instead\n", rn->str); + rnd_message(PCB_MSG_ERROR, "Root node should be pcb, got %s instead\n", rn->str); goto error; } if (gsxl_next(rn) != NULL) { - pcb_message(PCB_MSG_ERROR, "Multiple root nodes?!\n"); + rnd_message(PCB_MSG_ERROR, "Multiple root nodes?!\n"); goto error; } Index: trunk/src_plugins/io_dsn/write.c =================================================================== --- trunk/src_plugins/io_dsn/write.c (revision 30902) +++ trunk/src_plugins/io_dsn/write.c (revision 30903) @@ -127,7 +127,7 @@ int res = 0; if (pcb_netmap_init(&wctx->nmap, wctx->pcb) != 0) { - pcb_message(PCB_MSG_ERROR, "Can not set up net map\n"); + rnd_message(PCB_MSG_ERROR, "Can not set up net map\n"); return -1; } @@ -166,7 +166,7 @@ } -int io_dsn_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_dsn_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { dsn_write_t wctx; Index: trunk/src_plugins/io_dsn/write.h =================================================================== --- trunk/src_plugins/io_dsn/write.h (revision 30902) +++ trunk/src_plugins/io_dsn/write.h (revision 30903) @@ -1 +1 @@ -int io_dsn_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_dsn_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); Index: trunk/src_plugins/io_eagle/eagle_bin.c =================================================================== --- trunk/src_plugins/io_eagle/eagle_bin.c (revision 30902) +++ trunk/src_plugins/io_eagle/eagle_bin.c (revision 30903) @@ -1104,7 +1104,7 @@ egb_ctx->free_text_cursor = NULL; if (fread(block, 1, 8, f) != 8) { - pcb_message(PCB_MSG_ERROR, "Short attempted free text section read. Text section not found.\n"); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Failed to find 0x1312 start of pre-DRC free text section.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); + rnd_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); return -1; } return 0; @@ -1607,10 +1607,10 @@ } if (!cxy_ok) { - pcb_message(PCB_MSG_ERROR, "cx and cy not set in arc/linetype: %d/%d\n", linetype, arctype); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); + rnd_message(PCB_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); } radius = (long)(pcb_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) - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_library_ref_by_idx() can't find library index %ld\n", idx); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find packages node in library tree\n", idx); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_pkg_ref_by_idx() can't find package index %ld\n", idx); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_elem_ref_by_idx() can't find element placement index %ld\n", idx); + rnd_message(PCB_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"); - pcb_message(PCB_MSG_WARNING, "Substituted invalid name %s in PCB_EKGW_SECT_ELEMENT with 'HYPHEN'\n", e->value); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); + rnd_message(PCB_MSG_ERROR, "postproc_libs(): unexpected node under libraries (must be packages)\n"); return -1; } Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30902) +++ trunk/src_plugins/io_eagle/read.c (revision 30903) @@ -92,8 +92,8 @@ htsp_t libs; /* design rules */ - pcb_coord_t md_wire_wire; /* minimal distance between wire and wire (clearance) */ - pcb_coord_t ms_width; /* minimal trace width */ + rnd_coord_t md_wire_wire; /* minimal distance between wire and wire (clearance) */ + rnd_coord_t ms_width; /* minimal trace width */ double rv_pad_top, rv_pad_inner, rv_pad_bottom; /* pad size-to-drill ration on different layers */ const char *default_unit; /* assumed unit for unitless coord values */ @@ -159,7 +159,7 @@ if (STRCMP(d->node_name, name) == 0) return d->parser(st, subtree, obj, type); - pcb_message(PCB_MSG_ERROR, "eagle: unknown node: '%s'\n", name); + rnd_message(PCB_MSG_ERROR, "eagle: unknown node: '%s'\n", name); /* node name not found in the dispatcher table */ return -1; } @@ -260,11 +260,11 @@ /* Return a node attribute value converted to coord, or return invalid_val if the attribute doesn't exist */ -static pcb_coord_t eagle_get_attrc(read_state_t *st, trnode_t *nd, const char *name, pcb_coord_t invalid_val) +static rnd_coord_t eagle_get_attrc(read_state_t *st, trnode_t *nd, const char *name, rnd_coord_t invalid_val) { const char *p = GET_PROP(nd, name); - pcb_coord_t c; - pcb_bool succ; + rnd_coord_t c; + rnd_bool succ; if (p == NULL) return invalid_val; @@ -276,11 +276,11 @@ } /* same as eagle_get_attrc() but assume the input has units */ -static pcb_coord_t eagle_get_attrcu(read_state_t *st, trnode_t *nd, const char *name, pcb_coord_t invalid_val) +static rnd_coord_t eagle_get_attrcu(read_state_t *st, trnode_t *nd, const char *name, rnd_coord_t invalid_val) { const char *p = GET_PROP(nd, name); - pcb_coord_t c; - pcb_bool succ; + rnd_coord_t c; + rnd_bool succ; if (p == NULL) return invalid_val; @@ -315,7 +315,7 @@ ly->lid = -1; tmp_id = eagle_get_attrl(st, n, "number", -1); if (tmp_id < 1 || tmp_id > 254) { - pcb_message(PCB_MSG_ERROR, "invalid layer definition layer number found: '%d', skipping\n", tmp_id); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); + rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find lib by idx:\n"); return NULL; } if (STRCMP(NODENAME(n), "library") != 0) { - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); + rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected library node:\n"); return NULL; } n = CHILDREN(n); if (STRCMP(NODENAME(n), "packages") != 0) { - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); + rnd_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() expected packages node:\n"); return NULL; } @@ -469,17 +469,17 @@ /* 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) { - pcb_message(PCB_MSG_ERROR, "io_eagle bin: eagle_libelem_by_idx() can't find pkg by idx:\n"); + rnd_message(PCB_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) - pcb_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(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"); return res; } -static void size_bump(read_state_t *st, pcb_coord_t x, pcb_coord_t y) +static void size_bump(read_state_t *st, rnd_coord_t x, rnd_coord_t y) { if (x > st->pcb->hidlib.size_x) st->pcb->hidlib.size_x = x; @@ -517,7 +517,7 @@ case 180: return 2; case 270: return 1; } - pcb_message(PCB_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); + rnd_message(PCB_MSG_WARNING, "Unexpected non n*90 degree rotation value '%s' ignored\n", rot); return -1; } @@ -527,7 +527,7 @@ static int eagle_read_text(read_state_t *st, trnode_t *subtree, void *obj, int type) { eagle_layerid_t ln = eagle_get_attrl(st, subtree, "layer", -1); - pcb_coord_t X, Y, height; + rnd_coord_t X, Y, height; const char *rot, *text_val; unsigned int rotdeg = 0, text_scaling = 100; pcb_flag_t text_flags = pcb_flag_make(0); @@ -534,15 +534,15 @@ pcb_layer_t *ly; ly = eagle_layer_get(st, ln, type, obj); if (ly == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate text layer 'ly' to 'ln:%d' in eagle_read_text()\n", ln); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Ignoring empty text field\n"); + rnd_message(PCB_MSG_WARNING, "Ignoring empty text field\n"); return 0; } if (text_val == NULL && !IS_TEXT(CHILDREN(subtree))) { - pcb_message(PCB_MSG_WARNING, "Ignoring text field (invalid child node)\n"); + rnd_message(PCB_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') - pcb_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); + rnd_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (requires integer)\n", rot); TODO("but: alignment changed, see {text_rot}"); /* @@ -569,7 +569,7 @@ */ } else - pcb_message(PCB_MSG_WARNING, "Ignoring invalid text rotation '%s' (missing R prefix)\n", rot); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); + rnd_message(PCB_MSG_ERROR, "Failed to allocate circle layer 'ly' to 'ln:%d' in eagle_read_circle()\n", ln); return 0; } @@ -628,11 +628,11 @@ eagle_loc_t loc = type; eagle_layerid_t ln = eagle_get_attrl(st, subtree, "layer", -1); pcb_layer_t *ly; - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); + rnd_message(PCB_MSG_ERROR, "Failed to allocate rect layer 'ly' to 'ln:%d' in eagle_read_rect()\n", ln); return 0; } @@ -659,7 +659,7 @@ static int eagle_read_wire_curve(read_state_t *st, trnode_t *subtree, void *obj, eagle_loc_t loc, pcb_layer_t *ly, double curvang) { pcb_arc_t *arc; - pcb_coord_t x1, y1, x2, y2, th, cx, cy; + rnd_coord_t x1, y1, x2, y2, th, cx, cy; double sidex, sidey, sidelen, nx, ny, midx, midy, r, sa, ea, da, dx, dy; x1 = eagle_get_attrc(st, subtree, "x1", -1); @@ -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", (pcb_coord_t)r, sa, ea, da);*/ +/* pcb_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) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); + rnd_message(PCB_MSG_ERROR, "Failed to allocate wire layer 'ly' to ln:%d in eagle_read_wire()\n"); return 0; } @@ -764,13 +764,13 @@ /* Create a padstack at x;y; roundness and onbottom, applies only to EAGLE_PSH_SMD. dx and dy are the size; for some shapes they have to be equal. Returns NULL on error. */ -static pcb_pstk_t *eagle_create_pstk(read_state_t *st, pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, eagle_pstk_shape_t shape, pcb_coord_t dx, pcb_coord_t dy, pcb_coord_t clr, pcb_coord_t drill_dia, int roundness, int rot, int onbottom, pcb_bool plated) +static pcb_pstk_t *eagle_create_pstk(read_state_t *st, pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, eagle_pstk_shape_t shape, rnd_coord_t dx, rnd_coord_t dy, rnd_coord_t clr, rnd_coord_t drill_dia, int roundness, int rot, int onbottom, rnd_bool plated) { pcb_pstk_shape_t shapes[8]; TODO("{clearance} need to establish how mask clearance is defined and done in eagle") - pcb_coord_t mask_gap = clr; + rnd_coord_t mask_gap = clr; TODO("{clearance} need to establish how paste clearance, if any, is defined and done in eagle") - pcb_coord_t paste_gap = 0; + rnd_coord_t paste_gap = 0; switch (shape) { case EAGLE_PSH_SQUARE: @@ -799,7 +799,7 @@ break; case EAGLE_PSH_OCTAGON: { - pcb_coord_t dx2 = dx/2, dy2 = dy/2; + rnd_coord_t dx2 = dx/2, dy2 = dy/2; shapes[0].layer_mask = PCB_LYT_TOP | PCB_LYT_MASK; shapes[0].comb = PCB_LYC_SUB | PCB_LYC_AUTO; pcb_shape_octagon(&shapes[0], dx2 + mask_gap, dy2 + mask_gap); @@ -894,7 +894,7 @@ static int eagle_read_smd(read_state_t *st, trnode_t *subtree, void *obj, int type) { - pcb_coord_t x, y, dx, dy; + rnd_coord_t x, y, dx, dy; pcb_pstk_t *ps; pcb_subc_t *subc = obj; const char *name, *srot; @@ -902,7 +902,7 @@ eagle_layerid_t ln; eagle_layer_t *ly; long roundness = 0; - pcb_coord_t clr; + rnd_coord_t clr; int rot = 0, onbottom = 0; assert(type == IN_SUBC); @@ -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 pcb_message(PCB_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 (invalid layer %d)\n", ln); } else - pcb_message(PCB_MSG_ERROR, "Failed to determine smd pad side, assuming top (missing layer)\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Failed to load smd pad\n"); + rnd_message(PCB_MSG_ERROR, "Failed to load smd pad\n"); if (name != NULL) pcb_attribute_put(&ps->Attributes, "term", name); @@ -944,7 +944,7 @@ static int eagle_read_pad_or_hole(read_state_t *st, trnode_t *subtree, void *obj, int type, int hole) { eagle_loc_t loc = type; - pcb_coord_t x, y, drill, diax, diay, clr, mask; + rnd_coord_t x, y, drill, diax, diay, clr, mask; pcb_pstk_t *ps; const char *name, *shape; pcb_data_t *data; @@ -994,7 +994,7 @@ diay *= 2; } else { - pcb_message(PCB_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); + rnd_message(PCB_MSG_ERROR, "Invalid padstack shape: '%s' - omitting padstack\n", shape); return -1; } } @@ -1035,10 +1035,10 @@ /* Save the relative coords and size of the each relevant text fields */ static int eagle_read_pkg_txt(read_state_t *st, trnode_t *subtree, void *obj, int type) { - pcb_coord_t size; + rnd_coord_t size; trnode_t *n; const char *cont; - pcb_coord_t x, y; + rnd_coord_t x, y; int dir = 0, scale; eagle_layerid_t layer; const char *pattern; @@ -1072,7 +1072,7 @@ static void eagle_read_poly_corner(read_state_t *st, trnode_t *n, pcb_poly_t *poly, const char *xname, const char *yname, eagle_loc_t loc) { - pcb_coord_t x, y; + rnd_coord_t x, y; x = eagle_get_attrc(st, n, xname, 0); y = eagle_get_attrc(st, n, yname, 0); pcb_poly_point_new(poly, x, y); @@ -1097,7 +1097,7 @@ ly = eagle_layer_get(st, ln, loc, obj); if (ly == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); + rnd_message(PCB_MSG_ERROR, "Failed to allocate polygon layer 'ly' to 'ln:%d' in eagle_read_poly()\n", ln); return 0; } @@ -1107,7 +1107,7 @@ TODO("{polyarc} need to check XML never defines a polygon outline with arcs or curves") for(n = CHILDREN(subtree); n != NULL; n = NEXT(n)) { if (STRCMP(NODENAME(n), "vertex") == 0) { - pcb_coord_t x, y; + rnd_coord_t x, y; x = eagle_get_attrc(st, n, "x", 0); y = eagle_get_attrc(st, n, "y", 0); pcb_poly_point_new(poly, x, y); @@ -1170,7 +1170,7 @@ eagle_read_pkg(st, n, subc); if (pcb_data_is_empty(subc->data)) { pcb_subc_free(subc); - pcb_message(PCB_MSG_WARNING, "Ignoring empty package in library\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring package with no name\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring empty package %s\n", name); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring library with no name\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Failed to parse contactref node: missing \"element\" or \"pad\" netlist attributes\n"); + rnd_message(PCB_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); - pcb_message(PCB_MSG_WARNING, "Substituted invalid element name '-' with 'HYPHEN'\n"); + rnd_message(PCB_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); - pcb_message(PCB_MSG_WARNING, "Substituted contactref net \"GND\" instead of original invalid '-'\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Ignoring signal with no name\n"); + rnd_message(PCB_MSG_WARNING, "Ignoring signal with no name\n"); continue; } eagle_foreach_dispatch(st, CHILDREN(n), disp, (char *)name, ON_BOARD); @@ -1347,7 +1347,7 @@ return 0; } -static void eagle_read_subc_attrs(read_state_t *st, trnode_t *nd, pcb_subc_t *subc, pcb_coord_t x, pcb_coord_t y, const char *attname, const char *subc_attr, const char *str, pcb_bool add_text) +static void eagle_read_subc_attrs(read_state_t *st, trnode_t *nd, pcb_subc_t *subc, rnd_coord_t x, rnd_coord_t y, const char *attname, const char *subc_attr, const char *str, rnd_bool add_text) { pcb_attribute_put(&subc->Attributes, subc_attr, str); if (!add_text) @@ -1382,7 +1382,7 @@ for(n = CHILDREN(subtree); n != NULL; n = NEXT(n)) { if (STRCMP(NODENAME(n), "element") == 0) { - pcb_coord_t x, y; + rnd_coord_t x, y; const char *name, *val, *lib, *pkg, *rot, *mirrored; pcb_subc_t *subc, *new_subc; int back = 0; @@ -1391,7 +1391,7 @@ val = eagle_get_attrs(st, n, "value", NULL); if (name == NULL) { - pcb_message(PCB_MSG_ERROR, "Element name not found in tree\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring element with incomplete library reference\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Ignoring element with broken library reference: %s/%s\n", lib, pkg); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); + rnd_message(PCB_MSG_ERROR, "Library element not found: %s/%s\n", lib, pkg); continue; } if (pcb_subc_is_empty(subc)) { - pcb_message(PCB_MSG_ERROR, "Not placing empty element: %s/%s\n", lib, pkg); + rnd_message(PCB_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 - pcb_message(PCB_MSG_WARNING, "0 degree element rotation/steps used for '%s'/'%d': %s/%s/%s\n", rot, steps, name, pkg, lib); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "syntax error in element rotation '%s': %s/%s/%s\n", rot, name, pkg, lib); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "can't find design rules, using sane defaults\n"); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_WARNING, "top/inner/bottom default pad sizes differ - using top size only\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "no version attribute in \n"); + rnd_message(PCB_MSG_ERROR, "no version attribute in \n"); return -1; } v1 = strtol(ver, &end, 10); if (*end != '.') { - pcb_message(PCB_MSG_ERROR, "malformed version string [1] in \n"); + rnd_message(PCB_MSG_ERROR, "malformed version string [1] in \n"); return -1; } v2 = strtol(end+1, &end, 10); if (*end != '.' && *end != '\0') { - pcb_message(PCB_MSG_ERROR, "malformed version string [2] in \n"); + rnd_message(PCB_MSG_ERROR, "malformed version string [2] in \n"); return -1; } else if (*end == '.') { v3 = strtol(end+1, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "malformed version string [3] in \n"); + rnd_message(PCB_MSG_ERROR, "malformed version string [3] in \n"); return -1; } } @@ -1617,14 +1617,14 @@ /* version check */ if (v1 < 6) { - pcb_message(PCB_MSG_ERROR, "file version too old\n"); + rnd_message(PCB_MSG_ERROR, "file version too old\n"); return -1; } if (v1 > 8) { - pcb_message(PCB_MSG_ERROR, "file version too new\n"); + rnd_message(PCB_MSG_ERROR, "file version too new\n"); return -1; } - pcb_message(PCB_MSG_DEBUG, "Loading eagle board version %d.%d.%d\n", v1, v2, v3); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Eagle XML version parse error\n"); + rnd_message(PCB_MSG_ERROR, "Eagle XML version parse error\n"); goto err; } @@ -1755,7 +1755,7 @@ err:; st_uninit(&st); - pcb_message(PCB_MSG_ERROR, "Eagle XML parsing error.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 30903) @@ -143,14 +143,14 @@ return pcb_eagle_dru_test_parse(f); } -static void bump_up_str(const char *key, const char *val, const char *cpath, pcb_coord_t curr_val) +static void bump_up_str(const char *key, const char *val, const char *cpath, rnd_coord_t curr_val) { - pcb_bool succ; + rnd_bool succ; double d; d = pcb_get_value(val, NULL, NULL, &succ); if (!succ) { - pcb_message(PCB_MSG_ERROR, "Invalid coord value for key %s: '%s'\n", key, val); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_eagle/trparse_xml.c (revision 30903) @@ -47,7 +47,7 @@ f = pcb_fopen_fn(NULL, fn, "r", &efn); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open '%s'\n", fn); + rnd_message(PCB_MSG_ERROR, "can't open '%s'\n", fn); return -1; } fclose(f); @@ -54,7 +54,7 @@ doc = xmlReadFile(efn, NULL, 0); if (doc == NULL) { - pcb_message(PCB_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "xml error: root is not \n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 30903) @@ -104,7 +104,7 @@ #endif if (debug > 0) - pcb_message(PCB_MSG_INFO, "Importing Hyperlynx file '%s', debug level %d\n", fname, debug); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_hyp/parser.c (revision 30903) @@ -61,13 +61,13 @@ */ typedef struct outline_s { - pcb_coord_t x1; - pcb_coord_t y1; - pcb_coord_t x2; - pcb_coord_t y2; - pcb_coord_t xc; - pcb_coord_t yc; - pcb_coord_t r; + rnd_coord_t x1; + rnd_coord_t y1; + rnd_coord_t x2; + rnd_coord_t y2; + rnd_coord_t xc; + rnd_coord_t yc; + rnd_coord_t r; pcb_bool_t is_arc; /* arc or line */ pcb_bool_t used; /* already included in outline */ struct outline_s *next; @@ -105,17 +105,17 @@ double unit; /* conversion factor: pcb length units to meters */ double metal_thickness_unit; /* conversion factor: metal thickness to meters */ -pcb_bool use_die_for_metal; /* use dielectric constant and loss tangent of dielectric for metal layers */ +rnd_bool use_die_for_metal; /* use dielectric constant and loss tangent of dielectric for metal layers */ -pcb_coord_t board_clearance; /* distance between PLANE polygon and copper of different nets; -1 if not set */ +rnd_coord_t board_clearance; /* distance between PLANE polygon and copper of different nets; -1 if not set */ /* stackup */ -pcb_bool layer_is_plane[PCB_MAX_LAYER]; /* whether layer is signal or plane layer */ -pcb_coord_t layer_clearance[PCB_MAX_LAYER]; /* separation between fill copper and signals on layer */ +rnd_bool layer_is_plane[PCB_MAX_LAYER]; /* whether layer is signal or plane layer */ +rnd_coord_t layer_clearance[PCB_MAX_LAYER]; /* separation between fill copper and signals on layer */ /* net */ char *net_name; /* name of current copper */ -pcb_coord_t net_clearance; /* distance between PLANE polygon and net copper */ +rnd_coord_t net_clearance; /* distance between PLANE polygon and net copper */ /* netlist */ void hyp_netlist_begin(); @@ -142,11 +142,11 @@ typedef struct padstack_element_s { char *layer_name; int pad_shape; - pcb_coord_t pad_sx; - pcb_coord_t pad_sy; + rnd_coord_t pad_sx; + rnd_coord_t pad_sy; double pad_angle; - pcb_coord_t thermal_clear_sx; - pcb_coord_t thermal_clear_sy; + rnd_coord_t thermal_clear_sx; + rnd_coord_t thermal_clear_sy; double thermal_clear_angle; pad_type_enum pad_type; struct padstack_element_s *next; @@ -156,7 +156,7 @@ typedef struct padstack_s { char *name; - pcb_coord_t drill_size; + rnd_coord_t drill_size; struct padstack_element_s *padstack; struct padstack_s *next; } padstack_t; @@ -177,13 +177,13 @@ */ typedef struct hyp_vertex_s { - pcb_coord_t x1; - pcb_coord_t y1; - pcb_coord_t x2; - pcb_coord_t y2; - pcb_coord_t xc; - pcb_coord_t yc; - pcb_coord_t r; + rnd_coord_t x1; + rnd_coord_t y1; + rnd_coord_t x2; + rnd_coord_t y2; + rnd_coord_t xc; + rnd_coord_t yc; + rnd_coord_t r; pcb_bool_t is_first; /* true if first vertex of contour */ pcb_bool_t is_arc; /* true if arc */ struct hyp_vertex_s *next; @@ -195,8 +195,8 @@ polygon_type_enum hyp_poly_type; /* pour, copper, ... */ pcb_bool_t is_polygon; /* true if polygon, false if polyline */ char *layer_name; /* layer of polygon */ - pcb_coord_t line_width; /* line width of edge */ - pcb_coord_t clearance; /* clearance with other copper */ + rnd_coord_t line_width; /* line width of edge */ + rnd_coord_t clearance; /* clearance with other copper */ hyp_vertex_t *vertex; /* polygon contours as linked list of vertices */ struct hyp_polygon_s *next; } hyp_polygon_t; @@ -205,45 +205,45 @@ hyp_vertex_t *current_vertex = NULL; /* keeps track where to add next polygon segment when parsing polygons */ /* origin. Chosen so all coordinates are positive. */ -pcb_coord_t origin_x; -pcb_coord_t origin_y; +rnd_coord_t origin_x; +rnd_coord_t origin_y; /* - * Conversion from hyperlynx to pcb_coord_t + * Conversion from hyperlynx to rnd_coord_t */ -/* meter to pcb_coord_t */ +/* meter to rnd_coord_t */ -static pcb_coord_t m2coord(double m) +static rnd_coord_t m2coord(double m) { - return ((pcb_coord_t) PCB_MM_TO_COORD(1000.0 * m)); + return ((rnd_coord_t) PCB_MM_TO_COORD(1000.0 * m)); } -/* xy coordinates to pcb_coord_t, without offset */ +/* xy coordinates to rnd_coord_t, without offset */ -static pcb_coord_t xy2coord(double f) +static rnd_coord_t xy2coord(double f) { return (m2coord(unit * f)); } -/* x coordinates to pcb_coord_t, with offset */ +/* x coordinates to rnd_coord_t, with offset */ -static pcb_coord_t x2coord(double f) +static rnd_coord_t x2coord(double f) { return (m2coord(unit * f) - origin_x); } -/* y coordinates to pcb_coord_t, with offset */ +/* y coordinates to rnd_coord_t, with offset */ -static pcb_coord_t y2coord(double f) +static rnd_coord_t y2coord(double f) { return (origin_y - m2coord(unit * f)); } -/* z coordinates to pcb_coord_t. No offset needed. */ +/* z coordinates to rnd_coord_t. No offset needed. */ -static pcb_coord_t z2coord(double f) +static rnd_coord_t z2coord(double f) { return (m2coord(metal_thickness_unit * f)); } @@ -363,7 +363,7 @@ else level = PCB_MSG_ERROR; - pcb_message(level, "line %d: %s at '%s'\n", hyylineno, msg, hyytext); + rnd_message(level, "line %d: %s at '%s'\n", hyylineno, msg, hyytext); } /* @@ -397,7 +397,7 @@ char conn[MAX_STRING]; if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "netlist net: '%s' device: '%s' pin: '%s'\n", net_name, device_name, pin_name); + rnd_message(PCB_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); @@ -427,7 +427,7 @@ return NULL; } -pcb_subc_t *hyp_create_subc_by_name(char *refdes, pcb_coord_t x, pcb_coord_t y) +pcb_subc_t *hyp_create_subc_by_name(char *refdes, rnd_coord_t x, rnd_coord_t y) { pcb_subc_t *subc; unsigned int text_direction = 0; @@ -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. */ - pcb_message(PCB_MSG_WARNING, "device \"%s\" not specified in DEVICE record. Assuming device is on component side.\n", refdes); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "creating device \"%s\".\n", dev->ref); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "no outline layer.\n"); + rnd_message(PCB_MSG_ERROR, "no outline layer.\n"); return; } outline_layer = pcb_get_layer(PCB->Data, outline_id); if (outline_layer == NULL) { - pcb_message(PCB_MSG_ERROR, "get outline layer failed.\n"); + rnd_message(PCB_MSG_ERROR, "get outline layer failed.\n"); return; } @@ -517,10 +517,10 @@ /* debugging */ if (hyp_debug) { if (forward) - pcb_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(PCB_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 - pcb_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(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 */ } if (s->is_arc) { @@ -538,7 +538,7 @@ * Check whether point (end_x, end_y) is connected to point (begin_x, begin_y) via un-used segment s and other un-used segments. */ -pcb_bool_t hyp_segment_connected(pcb_coord_t begin_x, pcb_coord_t begin_y, pcb_coord_t end_x, pcb_coord_t end_y, outline_t * s) +pcb_bool_t hyp_segment_connected(rnd_coord_t begin_x, rnd_coord_t begin_y, rnd_coord_t end_x, rnd_coord_t end_y, outline_t * s) { outline_t *i; pcb_bool_t connected; @@ -616,9 +616,9 @@ void hyp_resize_board() { - pcb_coord_t x_max, x_min, y_max, y_min; - pcb_coord_t width, height; - pcb_coord_t slack = PCB_MM_TO_COORD(1); + rnd_coord_t x_max, x_min, y_max, y_min; + rnd_coord_t width, height; + rnd_coord_t slack = PCB_MM_TO_COORD(1); outline_t *i; if (PCB == NULL) @@ -673,7 +673,7 @@ pcb_bool_t warn_not_closed; pcb_bool_t segment_found; pcb_bool_t polygon_closed; - pcb_coord_t begin_x, begin_y, last_x, last_y; + rnd_coord_t begin_x, begin_y, last_x, last_y; outline_t *i; outline_t *j; @@ -721,10 +721,10 @@ #undef XXX #ifdef XXX - pcb_message(PCB_MSG_DEBUG, "perimeter: last_x = %ml last_y = %ml\n", last_x, last_y); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "perimeter segments available: %s from (%ml, %ml) to (%ml, %ml)\n", + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "outline: closed\n"); + rnd_message(PCB_MSG_DEBUG, "outline: closed\n"); } else { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "outline: open\n"); + rnd_message(PCB_MSG_DEBUG, "outline: open\n"); warn_not_closed = pcb_true; } } @@ -782,7 +782,7 @@ outline_head = outline_tail = NULL; if (warn_not_closed) - pcb_message(PCB_MSG_WARNING, "warning: board outline not closed\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "failed to create top silk\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "failed to create bottom silk\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "failed to create top copper\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "failed to create bottom copper\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "failed to create outline\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "running out of layers\n"); + rnd_message(PCB_MSG_DEBUG, "running out of layers\n"); return bottom_layer_id; } @@ -944,9 +944,9 @@ * Direction of arc is clockwise or counter-clockwise, depending upon value of pcb_bool_t Clockwise. */ -pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC, - pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness, - pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t XC, + rnd_coord_t YC, rnd_coord_t Width, rnd_coord_t Height, pcb_bool_t Clockwise, rnd_coord_t Thickness, + rnd_coord_t Clearance, pcb_flag_t Flags) { pcb_angle_t start_angle; pcb_angle_t end_angle; @@ -983,10 +983,10 @@ * Draw an arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r using a polygonal approximation. * Arc may be clockwise or counterclockwise. Note pcb-rnd y-axis points downward. */ -void hyp_arc2contour(pcb_pline_t * contour, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t xc, - pcb_coord_t yc, pcb_coord_t r, pcb_bool_t clockwise) +void hyp_arc2contour(pcb_pline_t * contour, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t xc, + rnd_coord_t yc, rnd_coord_t r, pcb_bool_t clockwise) { - pcb_coord_t arc_precision = PCB_MM_TO_COORD(0.254); /* mm */ + rnd_coord_t arc_precision = PCB_MM_TO_COORD(0.254); /* mm */ int min_circle_segments = 8; /* 8 seems minimal, 16 seems more than sufficient. */ int segments; int poly_points = 0; @@ -1026,7 +1026,7 @@ while (arc_error > arc_precision); } else if (arc_precision < 0) - pcb_message(PCB_MSG_ERROR, "error: negative arc precision\n"); + rnd_message(PCB_MSG_ERROR, "error: negative arc precision\n"); /* A full circle is drawn using 'segments' segments; a 90 degree arc using segments/4. */ poly_points = pcb_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) { - pcb_message(PCB_MSG_DEBUG, "%s id=%i.\n", (i->is_polygon ? "polygon" : "polyline"), i->hyp_poly_id); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, " contour\n"); + rnd_message(PCB_MSG_DEBUG, " contour\n"); if (v->is_arc) - pcb_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(PCB_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 - pcb_message(PCB_MSG_DEBUG, " line x1 = %ml y1 = %ml\n", v->x1, v->y1); + rnd_message(PCB_MSG_DEBUG, " line x1 = %ml y1 = %ml\n", v->x1, v->y1); } } } @@ -1086,8 +1086,8 @@ void hyp_draw_polyline(hyp_polygon_t * polyline) { pcb_layer_t *layer; - pcb_coord_t xpos; - pcb_coord_t ypos; + rnd_coord_t xpos; + rnd_coord_t ypos; hyp_vertex_t *vrtx; if ((polyline == NULL) || (polyline->vertex == NULL)) @@ -1094,7 +1094,7 @@ return; if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "draw polyline: drawing poly id=%i.\n", polyline->hyp_poly_id); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "draw polygon: drawing poly id=%i.\n", polygon->hyp_poly_id); + rnd_message(PCB_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) - pcb_message(PCB_MSG_WARNING, "draw polygon: bad contour? continuing.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "draw polygon: self-intersecting polygon id=%i dropped.\n", polygon->hyp_poly_id); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "draw polygons: layer %lx \"%s\"\n", layer_id, pcb_layer_name(PCB->Data, layer_id)); + rnd_message(PCB_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) { @@ -1259,9 +1259,9 @@ * if neither copper, net, layer nor board have plane_separation set, do not set clearance. */ -pcb_coord_t hyp_clearance(parse_param * h) +rnd_coord_t hyp_clearance(parse_param * h) { - pcb_coord_t clearance; + rnd_coord_t clearance; pcb_layer_id_t layr_id; if (h->layer_name_set) @@ -1288,10 +1288,10 @@ * 'BOARD_FILE' record. */ -pcb_bool exec_board_file(parse_param * h) +rnd_bool exec_board_file(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "board:\n"); + rnd_message(PCB_MSG_DEBUG, "board:\n"); return 0; } @@ -1301,13 +1301,13 @@ * Specifies version number. */ -pcb_bool exec_version(parse_param * h) +rnd_bool exec_version(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "version: vers = %f\n", h->vers); + rnd_message(PCB_MSG_DEBUG, "version: vers = %f\n", h->vers); if (h->vers < 1.0) - pcb_message(PCB_MSG_DEBUG, "info: version 1.x deprecated\n"); + rnd_message(PCB_MSG_DEBUG, "info: version 1.x deprecated\n"); return 0; } @@ -1318,10 +1318,10 @@ * If DATA_MODE is SIMPLIFIED, model can be used for signal simulation only. */ -pcb_bool exec_data_mode(parse_param * h) +rnd_bool exec_data_mode(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "data_mode: detailed = %i\n", h->detailed); + rnd_message(PCB_MSG_DEBUG, "data_mode: detailed = %i\n", h->detailed); return 0; } @@ -1331,10 +1331,10 @@ * Specifies measurement system (english/metric) for the rest of the file. */ -pcb_bool exec_units(parse_param * h) +rnd_bool exec_units(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "units: unit_system_english = %d metal_thickness_weight = %d\n", h->unit_system_english, + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit); + rnd_message(PCB_MSG_DEBUG, "units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit); return 0; } @@ -1365,12 +1365,12 @@ * Defines default trace to plane clearance. */ -pcb_bool exec_plane_sep(parse_param * h) +rnd_bool exec_plane_sep(parse_param * h) { board_clearance = xy2coord(h->default_plane_separation); if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "plane_sep: default_plane_separation = %ml\n", board_clearance); + rnd_message(PCB_MSG_DEBUG, "plane_sep: default_plane_separation = %ml\n", board_clearance); return 0; } @@ -1380,7 +1380,7 @@ * Draws linear board outline segment from (x1, y1) to (x2, y2). */ -pcb_bool exec_perimeter_segment(parse_param * h) +rnd_bool exec_perimeter_segment(parse_param * h) { outline_t *peri_seg; @@ -1399,7 +1399,7 @@ peri_seg->next = NULL; if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "perimeter_segment: x1 = %ml y1 = %ml x2 = %ml y2 = %ml\n", peri_seg->x1, peri_seg->y1, + rnd_message(PCB_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 */ @@ -1427,7 +1427,7 @@ * Arc drawn counterclockwise from (x1, y1) to (x2, y2) with center (xc, yc) and radius r. */ -pcb_bool exec_perimeter_arc(parse_param * h) +rnd_bool exec_perimeter_arc(parse_param * h) { outline_t *peri_arc; @@ -1445,7 +1445,7 @@ peri_arc->next = NULL; if (hyp_debug) - pcb_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(PCB_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 */ @@ -1469,10 +1469,10 @@ * Defines board attributes as name/value pairs. */ -pcb_bool exec_board_attribute(parse_param * h) +rnd_bool exec_board_attribute(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "board_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, " thickness = %ml", z2coord(h->thickness)); + rnd_message(PCB_MSG_DEBUG, " thickness = %ml", z2coord(h->thickness)); if (h->plating_thickness_set) - pcb_message(PCB_MSG_DEBUG, " plating_thickness = %ml", z2coord(h->plating_thickness)); + rnd_message(PCB_MSG_DEBUG, " plating_thickness = %ml", z2coord(h->plating_thickness)); if (h->bulk_resistivity_set) - pcb_message(PCB_MSG_DEBUG, " bulk_resistivity = %f", h->bulk_resistivity); + rnd_message(PCB_MSG_DEBUG, " bulk_resistivity = %f", h->bulk_resistivity); if (h->temperature_coefficient_set) - pcb_message(PCB_MSG_DEBUG, " temperature_coefficient = %f", h->temperature_coefficient); + rnd_message(PCB_MSG_DEBUG, " temperature_coefficient = %f", h->temperature_coefficient); if (h->epsilon_r_set) - pcb_message(PCB_MSG_DEBUG, " epsilon_r = %f", h->epsilon_r); + rnd_message(PCB_MSG_DEBUG, " epsilon_r = %f", h->epsilon_r); if (h->loss_tangent_set) - pcb_message(PCB_MSG_DEBUG, " loss_tangent = %f", h->loss_tangent); + rnd_message(PCB_MSG_DEBUG, " loss_tangent = %f", h->loss_tangent); if (h->conformal_set) - pcb_message(PCB_MSG_DEBUG, " conformal = %i", h->conformal); + rnd_message(PCB_MSG_DEBUG, " conformal = %i", h->conformal); if (h->prepreg_set) - pcb_message(PCB_MSG_DEBUG, " prepreg = %i", h->prepreg); + rnd_message(PCB_MSG_DEBUG, " prepreg = %i", h->prepreg); if (h->layer_name_set) - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->material_name_set) - pcb_message(PCB_MSG_DEBUG, " material_name = \"%s\"", h->material_name); + rnd_message(PCB_MSG_DEBUG, " material_name = \"%s\"", h->material_name); if (h->plane_separation_set) - pcb_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); + rnd_message(PCB_MSG_DEBUG, "\n"); } return; @@ -1521,11 +1521,11 @@ * Defines dielectric constant and loss tangent of metal layers. */ -pcb_bool exec_options(parse_param * h) +rnd_bool exec_options(parse_param * h) { /* Use dielectric for metal? */ if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "options: use_die_for_metal = %f\n", h->use_die_for_metal); + rnd_message(PCB_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; @@ -1536,12 +1536,12 @@ * signal layer. */ -pcb_bool exec_signal(parse_param * h) +rnd_bool exec_signal(parse_param * h) { pcb_layer_id_t signal_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) - pcb_message(PCB_MSG_WARNING, "duplicate SIGNAL layer name \"%s\"\n", h->layer_name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "signal layer: \"%s\"", pcb_layer_name(PCB->Data, signal_layer_id)); + rnd_message(PCB_MSG_DEBUG, "signal layer: \"%s\"", pcb_layer_name(PCB->Data, signal_layer_id)); hyp_debug_layer(h); return 0; @@ -1561,10 +1561,10 @@ * dielectric layer */ -pcb_bool exec_dielectric(parse_param * h) +rnd_bool exec_dielectric(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "dielectric layer: "); + rnd_message(PCB_MSG_DEBUG, "dielectric layer: "); hyp_debug_layer(h); return 0; @@ -1575,12 +1575,12 @@ * plane layer - a layer which is flooded with copper. */ -pcb_bool exec_plane(parse_param * h) +rnd_bool exec_plane(parse_param * h) { pcb_layer_id_t plane_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) - pcb_message(PCB_MSG_WARNING, "duplicate PLANE layer name \"%s\"\n", h->layer_name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "plane layer: \"%s\"", pcb_layer_name(PCB->Data, plane_layer_id)); + rnd_message(PCB_MSG_DEBUG, "plane layer: \"%s\"", pcb_layer_name(PCB->Data, plane_layer_id)); hyp_debug_layer(h); return 0; @@ -1598,24 +1598,24 @@ } /* DEVICE record. */ -pcb_bool exec_devices(parse_param * h) +rnd_bool exec_devices(parse_param * h) { device_t *new_device; char value[128]; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref); + rnd_message(PCB_MSG_DEBUG, "device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref); if (h->name_set) - pcb_message(PCB_MSG_DEBUG, " name = \"%s\"", h->name); + rnd_message(PCB_MSG_DEBUG, " name = \"%s\"", h->name); if (h->value_float_set) - pcb_message(PCB_MSG_DEBUG, " value_float = %f", h->value_float); + rnd_message(PCB_MSG_DEBUG, " value_float = %f", h->value_float); if (h->value_string_set) - pcb_message(PCB_MSG_DEBUG, " value_string = \"%s\"", h->value_string); + rnd_message(PCB_MSG_DEBUG, " value_string = \"%s\"", h->value_string); if (h->layer_name_set) - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->package_set) - pcb_message(PCB_MSG_DEBUG, " package = \"%s\"", h->package); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " package = \"%s\"", h->package); + rnd_message(PCB_MSG_DEBUG, "\n"); } /* add device to list */ @@ -1652,10 +1652,10 @@ * marks nets as power supply. */ -pcb_bool exec_supplies(parse_param * h) +rnd_bool exec_supplies(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "supplies: name = \"%s\" value_float = %f voltage_specified = %i conversion = %i\n", h->name, + rnd_message(PCB_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; @@ -1665,7 +1665,7 @@ * PADSTACK record */ -pcb_bool exec_pstk_element(parse_param * h) +rnd_bool exec_pstk_element(parse_param * h) { /* * Layer names with special meaning, used in padstack definition: @@ -1674,55 +1674,55 @@ */ if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "padstack_element:"); + rnd_message(PCB_MSG_DEBUG, "padstack_element:"); if (h->padstack_name_set) - pcb_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); if (h->drill_size_set) - pcb_message(PCB_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); - pcb_message(PCB_MSG_DEBUG, " pad_shape = %f", h->pad_shape); + 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); if (h->pad_shape == 0) - pcb_message(PCB_MSG_DEBUG, " oval"); + rnd_message(PCB_MSG_DEBUG, " oval"); else if (h->pad_shape == 1) - pcb_message(PCB_MSG_DEBUG, " rectangular"); + rnd_message(PCB_MSG_DEBUG, " rectangular"); else if (h->pad_shape == 2) - pcb_message(PCB_MSG_DEBUG, " oblong"); + rnd_message(PCB_MSG_DEBUG, " oblong"); else - pcb_message(PCB_MSG_DEBUG, " ?"); - pcb_message(PCB_MSG_DEBUG, " pad_sx = %ml", xy2coord(h->pad_sx)); - pcb_message(PCB_MSG_DEBUG, " pad_sy = %ml", xy2coord(h->pad_sy)); - pcb_message(PCB_MSG_DEBUG, " pad_angle = %f", h->pad_angle); + 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); if (h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) { - pcb_message(PCB_MSG_DEBUG, " thermal_clear_shape = %f", h->thermal_clear_shape); + rnd_message(PCB_MSG_DEBUG, " thermal_clear_shape = %f", h->thermal_clear_shape); if (h->thermal_clear_shape == 0) - pcb_message(PCB_MSG_DEBUG, " oval"); + rnd_message(PCB_MSG_DEBUG, " oval"); else if (h->thermal_clear_shape == 1) - pcb_message(PCB_MSG_DEBUG, " rectangular"); + rnd_message(PCB_MSG_DEBUG, " rectangular"); else if (h->thermal_clear_shape == 2) - pcb_message(PCB_MSG_DEBUG, " oblong"); + rnd_message(PCB_MSG_DEBUG, " oblong"); else - pcb_message(PCB_MSG_DEBUG, " ?"); - pcb_message(PCB_MSG_DEBUG, " thermal_clear_sx = %ml", xy2coord(h->thermal_clear_sx)); - pcb_message(PCB_MSG_DEBUG, " thermal_clear_sy = %ml", xy2coord(h->thermal_clear_sy)); - pcb_message(PCB_MSG_DEBUG, " thermal_clear_angle = %f", h->thermal_clear_angle); + 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); } if (h->pad_type_set) { - pcb_message(PCB_MSG_DEBUG, " pad_type = "); + rnd_message(PCB_MSG_DEBUG, " pad_type = "); switch (h->pad_type) { case PAD_TYPE_METAL: - pcb_message(PCB_MSG_DEBUG, "metal"); + rnd_message(PCB_MSG_DEBUG, "metal"); break; case PAD_TYPE_ANTIPAD: - pcb_message(PCB_MSG_DEBUG, "antipad"); + rnd_message(PCB_MSG_DEBUG, "antipad"); break; case PAD_TYPE_THERMAL_RELIEF: - pcb_message(PCB_MSG_DEBUG, "thermal_relief"); + rnd_message(PCB_MSG_DEBUG, "thermal_relief"); break; default: - pcb_message(PCB_MSG_DEBUG, "error"); + rnd_message(PCB_MSG_DEBUG, "error"); } } - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, "\n"); } if (h->padstack_name_set) { @@ -1763,10 +1763,10 @@ } -pcb_bool exec_pstk_end(parse_param * h) +rnd_bool exec_pstk_end(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "padstack_end\n"); + rnd_message(PCB_MSG_DEBUG, "padstack_end\n"); /* add current padstack to list of padstacks */ if (current_pstk != NULL) { @@ -1780,7 +1780,7 @@ return 0; } -static int hyp_pstk_add_shp(pcb_pstk_shape_t *sh, int *used, int max, padstack_element_t *i, pcb_layer_type_t lyt, pcb_layer_combining_t comb, pcb_coord_t offs) +static int hyp_pstk_add_shp(pcb_pstk_shape_t *sh, int *used, int max, padstack_element_t *i, pcb_layer_type_t lyt, pcb_layer_combining_t comb, rnd_coord_t offs) { if (*used >= max) return -1; @@ -1801,7 +1801,7 @@ return 0; } -static pcb_pstk_t *hyp_new_pstk(padstack_t *padstk, pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_bool with_paste, pcb_bool with_mask) +static pcb_pstk_t *hyp_new_pstk(padstack_t *padstk, pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_bool with_paste, rnd_bool with_mask) { pcb_pstk_t *ps; padstack_element_t *i; @@ -1824,7 +1824,7 @@ continue; if (i->pad_angle != 0) - pcb_message(PCB_MSG_ERROR, "ignoring pad rotation of padstack at %$mm;%$mm.\n", x, y); + rnd_message(PCB_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,13 +1855,13 @@ ps = pcb_pstk_new_from_shape(data, x, y, padstk->drill_size, 1, 0, sh); if (ps == NULL) - pcb_message(PCB_MSG_ERROR, "Failed to convert padstack at %$mm;%$mm.\n", x, y); + rnd_message(PCB_MSG_ERROR, "Failed to convert padstack at %$mm;%$mm.\n", x, y); return ps; } /* draw padstack. Used when drawing vias, pins and pads. * ref is an optional string which gives pin reference as device.pin, eg. U1.VCC */ -void hyp_draw_pstk(padstack_t *padstk, pcb_coord_t x, pcb_coord_t y, char *ref) +void hyp_draw_pstk(padstack_t *padstk, rnd_coord_t x, rnd_coord_t y, char *ref) { /* * We try to map a hyperlynx padstack to its closest pcb-rnd primitive. @@ -1880,7 +1880,7 @@ if (padstk == NULL) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "draw padstack: padstack not found.\n"); + rnd_message(PCB_MSG_DEBUG, "draw padstack: padstack not found.\n"); return; } @@ -1921,7 +1921,7 @@ number = pin_name; if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "draw padstack: device_name = \"%s\" pin_name = \"%s\"\n", name, number); + rnd_message(PCB_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) @@ -1938,10 +1938,10 @@ * NET record. */ -pcb_bool exec_net(parse_param * h) +rnd_bool exec_net(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "net: net_name = \"%s\"\n", h->net_name); + rnd_message(PCB_MSG_DEBUG, "net: net_name = \"%s\"\n", h->net_name); net_name = pcb_strdup(h->net_name); net_clearance = -1; @@ -1953,10 +1953,10 @@ * PS subrecord of NET record. Plane separation. */ -pcb_bool exec_net_plane_separation(parse_param * h) +rnd_bool exec_net_plane_separation(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation)); + rnd_message(PCB_MSG_DEBUG, "net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation)); net_clearance = xy2coord(h->plane_separation); @@ -1967,10 +1967,10 @@ * A subrecord of NET record. Attribute. */ -pcb_bool exec_net_attribute(parse_param * h) +rnd_bool exec_net_attribute(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(PCB_MSG_DEBUG, "net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); return 0; } @@ -1979,17 +1979,17 @@ * SEG subrecord of NET record. line segment. */ -pcb_bool exec_seg(parse_param * h) +rnd_bool exec_seg(parse_param * h) { if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), + rnd_message(PCB_MSG_DEBUG, "seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2)); - pcb_message(PCB_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); + rnd_message(PCB_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); if (h->plane_separation_set) - pcb_message(PCB_MSG_DEBUG, " plane_separation = %ml ", xy2coord(h->plane_separation)); + rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml ", xy2coord(h->plane_separation)); if (h->left_plane_separation_set) - pcb_message(PCB_MSG_DEBUG, " left_plane_separation = %ml ", xy2coord(h->left_plane_separation)); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " left_plane_separation = %ml ", xy2coord(h->left_plane_separation)); + rnd_message(PCB_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), @@ -2002,19 +2002,19 @@ * ARC subrecord of NET record. arc segment, drawn clockwise. */ -pcb_bool exec_arc(parse_param * h) +rnd_bool exec_arc(parse_param * h) { if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), + rnd_message(PCB_MSG_DEBUG, "arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2)); - pcb_message(PCB_MSG_DEBUG, " xc = %ml yc = %ml r = %ml", x2coord(h->xc), y2coord(h->yc), xy2coord(h->r)); - pcb_message(PCB_MSG_DEBUG, " width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name); + 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); if (h->plane_separation_set) - pcb_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); + rnd_message(PCB_MSG_DEBUG, " plane_separation = %ml", xy2coord(h->plane_separation)); if (h->left_plane_separation_set) - pcb_message(PCB_MSG_DEBUG, " left_plane_separation = %ml", xy2coord(h->left_plane_separation)); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " left_plane_separation = %ml", xy2coord(h->left_plane_separation)); + rnd_message(PCB_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), @@ -2046,7 +2046,7 @@ * Draws via using padstack definition. */ -pcb_bool exec_via(parse_param * h) +rnd_bool exec_via(parse_param * h) { /* detect old-style v1.0 via */ if (!h->padstack_name_set) @@ -2053,15 +2053,15 @@ return exec_via_v1(h); if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(PCB_MSG_DEBUG, "via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->padstack_name_set) - pcb_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(PCB_MSG_DEBUG, "\n"); } if (!h->padstack_name_set) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); + rnd_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); return 0; } @@ -2075,7 +2075,7 @@ * Draws deprecated v1.x via. */ -pcb_bool exec_via_v1(parse_param * h) +rnd_bool exec_via_v1(parse_param * h) { padstack_t *padstk; padstack_element_t *pad1; @@ -2082,38 +2082,38 @@ padstack_element_t *pad2; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(PCB_MSG_DEBUG, "old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->drill_size_set) - pcb_message(PCB_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); + rnd_message(PCB_MSG_DEBUG, " drill_size = %ml", xy2coord(h->drill_size)); if (h->layer1_name_set) - pcb_message(PCB_MSG_DEBUG, " layer1_name = \"%s\"", h->layer1_name); + rnd_message(PCB_MSG_DEBUG, " layer1_name = \"%s\"", h->layer1_name); if (h->layer2_name_set) - pcb_message(PCB_MSG_DEBUG, " layer2_name = \"%s\"", h->layer2_name); + rnd_message(PCB_MSG_DEBUG, " layer2_name = \"%s\"", h->layer2_name); if (h->via_pad_shape_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); + rnd_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); if (h->via_pad_sx_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); + rnd_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); if (h->via_pad_sy_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); + rnd_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); if (h->via_pad_angle_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); + rnd_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); if (h->via_pad1_shape_set) - pcb_message(PCB_MSG_DEBUG, " via_pad1_shape = \"%s\"", h->via_pad1_shape); + rnd_message(PCB_MSG_DEBUG, " via_pad1_shape = \"%s\"", h->via_pad1_shape); if (h->via_pad1_sx_set) - pcb_message(PCB_MSG_DEBUG, " via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx)); + rnd_message(PCB_MSG_DEBUG, " via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx)); if (h->via_pad1_sy_set) - pcb_message(PCB_MSG_DEBUG, " via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy)); + rnd_message(PCB_MSG_DEBUG, " via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy)); if (h->via_pad1_angle_set) - pcb_message(PCB_MSG_DEBUG, " via_pad1_angle = \"%f\"", h->via_pad1_angle); + rnd_message(PCB_MSG_DEBUG, " via_pad1_angle = \"%f\"", h->via_pad1_angle); if (h->via_pad2_shape_set) - pcb_message(PCB_MSG_DEBUG, " via_pad2_shape = \"%s\"", h->via_pad2_shape); + rnd_message(PCB_MSG_DEBUG, " via_pad2_shape = \"%s\"", h->via_pad2_shape); if (h->via_pad2_sx_set) - pcb_message(PCB_MSG_DEBUG, " via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx)); + rnd_message(PCB_MSG_DEBUG, " via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx)); if (h->via_pad2_sy_set) - pcb_message(PCB_MSG_DEBUG, " via_pad2_sy = \"%ml\"", xy2coord(h->via_pad2_sy)); + rnd_message(PCB_MSG_DEBUG, " via_pad2_sy = \"%ml\"", xy2coord(h->via_pad2_sy)); if (h->via_pad2_angle_set) - pcb_message(PCB_MSG_DEBUG, " via_pad2_angle = \"%f\"", h->via_pad2_angle); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " via_pad2_angle = \"%f\"", h->via_pad2_angle); + rnd_message(PCB_MSG_DEBUG, "\n"); } /* create padstack for this via */ @@ -2174,21 +2174,21 @@ * Draws PIN using padstack definiton. */ -pcb_bool exec_pin(parse_param * h) +rnd_bool exec_pin(parse_param * h) { if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "pin: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); - pcb_message(PCB_MSG_DEBUG, " pin_reference = \"%s\"", h->pin_reference); + 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); if (h->padstack_name_set) - pcb_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); + rnd_message(PCB_MSG_DEBUG, " padstack_name = \"%s\"", h->padstack_name); if (h->pin_function_set) - pcb_message(PCB_MSG_DEBUG, " pin_function = %i", h->pin_function); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " pin_function = %i", h->pin_function); + rnd_message(PCB_MSG_DEBUG, "\n"); } if (!h->padstack_name_set) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); + rnd_message(PCB_MSG_DEBUG, "pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference); return 0; } @@ -2202,29 +2202,29 @@ * Draws deprecated v1.x pad. */ -pcb_bool exec_pad(parse_param * h) +rnd_bool exec_pad(parse_param * h) { padstack_t *padstk; padstack_element_t *pad; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); + rnd_message(PCB_MSG_DEBUG, "pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y)); if (h->layer_name_set) - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->via_pad_shape_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); + rnd_message(PCB_MSG_DEBUG, " via_pad_shape = \"%s\"", h->via_pad_shape); if (h->via_pad_sx_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); + rnd_message(PCB_MSG_DEBUG, " via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx)); if (h->via_pad_sy_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); + rnd_message(PCB_MSG_DEBUG, " via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy)); if (h->via_pad_angle_set) - pcb_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " via_pad_angle = \"%f\"", h->via_pad_angle); + rnd_message(PCB_MSG_DEBUG, "\n"); } if (!h->layer_name_set) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "pad: layer name not set. skipping pad\n."); + rnd_message(PCB_MSG_DEBUG, "pad: layer name not set. skipping pad\n."); return 0; } @@ -2267,21 +2267,21 @@ * unrouted segment. */ -pcb_bool exec_useg(parse_param * h) +rnd_bool exec_useg(parse_param * h) { pcb_layergrp_id_t layer1_grp_id, layer2_grp_id; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name); - pcb_message(PCB_MSG_DEBUG, " x2 = %ml y2 = %ml layer2_name = \"%s\"", x2coord(h->x2), y2coord(h->y2), h->layer2_name); + 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); if (h->zlayer_name_set) - pcb_message(PCB_MSG_DEBUG, " zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), + rnd_message(PCB_MSG_DEBUG, " zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), xy2coord(h->length)); if (h->impedance_set) - pcb_message(PCB_MSG_DEBUG, " impedance = %f delay = %f ", h->impedance, h->delay); + rnd_message(PCB_MSG_DEBUG, " impedance = %f delay = %f ", h->impedance, h->delay); if (h->resistance_set) - pcb_message(PCB_MSG_DEBUG, " resistance = %f ", h->resistance); - pcb_message(PCB_MSG_DEBUG, "\n"); + rnd_message(PCB_MSG_DEBUG, " resistance = %f ", h->resistance); + rnd_message(PCB_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) - pcb_message(PCB_MSG_DEBUG, "useg: skipping unrouted segment\n"); + rnd_message(PCB_MSG_DEBUG, "useg: skipping unrouted segment\n"); return 0; } @@ -2305,7 +2305,7 @@ * draws copper polygon. */ -pcb_bool exec_polygon_begin(parse_param * h) +rnd_bool exec_polygon_begin(parse_param * h) { hyp_polygon_t *new_poly; hyp_vertex_t *new_vertex; @@ -2312,31 +2312,31 @@ hyp_polygon_t *i; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "polygon begin:"); + rnd_message(PCB_MSG_DEBUG, "polygon begin:"); if (h->layer_name_set) - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->width_set) - pcb_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); + rnd_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); if (h->polygon_type_set) { - pcb_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); + rnd_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); switch (h->polygon_type) { case POLYGON_TYPE_PLANE: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); break; case POLYGON_TYPE_POUR: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); break; case POLYGON_TYPE_COPPER: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); break; default: - pcb_message(PCB_MSG_DEBUG, "Error"); + rnd_message(PCB_MSG_DEBUG, "Error"); break; } } if (h->id_set) - pcb_message(PCB_MSG_DEBUG, " id = %i", h->id); - pcb_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + 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)); } 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) { - pcb_message(PCB_MSG_INFO, "info: duplicate polygon id %i.\n", h->id); + rnd_message(PCB_MSG_INFO, "info: duplicate polygon id %i.\n", h->id); break; } @@ -2392,14 +2392,14 @@ return 0; } -pcb_bool exec_polygon_end(parse_param * h) +rnd_bool exec_polygon_end(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "polygon end:\n"); + rnd_message(PCB_MSG_DEBUG, "polygon end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - pcb_message(PCB_MSG_WARNING, "polygon: unexpected polygon end. continuing.\n"); + rnd_message(PCB_MSG_WARNING, "polygon: unexpected polygon end. continuing.\n"); current_vertex = NULL; return 0; @@ -2410,16 +2410,16 @@ * same as POLYGON, but instead of creating copper, creates a hole in copper. */ -pcb_bool exec_polyvoid_begin(parse_param * h) +rnd_bool exec_polyvoid_begin(parse_param * h) { hyp_polygon_t *i; hyp_vertex_t *new_vertex; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "polyvoid begin:"); + rnd_message(PCB_MSG_DEBUG, "polyvoid begin:"); if (h->id_set) - pcb_message(PCB_MSG_DEBUG, " id = %i", h->id); - pcb_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + 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)); } if (!h->id_set) { @@ -2434,7 +2434,7 @@ if (i == NULL) { current_vertex = NULL; - pcb_message(PCB_MSG_WARNING, "polyvoid: polygon id %i not found\n", h->id); + rnd_message(PCB_MSG_WARNING, "polyvoid: polygon id %i not found\n", h->id); return 0; } @@ -2467,14 +2467,14 @@ return 0; } -pcb_bool exec_polyvoid_end(parse_param * h) +rnd_bool exec_polyvoid_end(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "polyvoid end:\n"); + rnd_message(PCB_MSG_DEBUG, "polyvoid end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - pcb_message(PCB_MSG_WARNING, "polyvoid: unexpected polyvoid end. continuing.\n"); + rnd_message(PCB_MSG_WARNING, "polyvoid: unexpected polyvoid end. continuing.\n"); current_vertex = NULL; return 0; @@ -2484,7 +2484,7 @@ * POLYLINE subrecord of NET record. */ -pcb_bool exec_polyline_begin(parse_param * h) +rnd_bool exec_polyline_begin(parse_param * h) { hyp_polygon_t *new_poly; hyp_vertex_t *new_vertex; @@ -2491,31 +2491,31 @@ hyp_polygon_t *i; if (hyp_debug) { - pcb_message(PCB_MSG_DEBUG, "polyline begin:"); + rnd_message(PCB_MSG_DEBUG, "polyline begin:"); if (h->layer_name_set) - pcb_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); + rnd_message(PCB_MSG_DEBUG, " layer_name = \"%s\"", h->layer_name); if (h->width_set) - pcb_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); + rnd_message(PCB_MSG_DEBUG, " width = %ml", xy2coord(h->width)); if (h->polygon_type_set) { - pcb_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); + rnd_message(PCB_MSG_DEBUG, " polygon_type = ", h->polygon_type, " "); switch (h->polygon_type) { case POLYGON_TYPE_PLANE: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_PLANE"); break; case POLYGON_TYPE_POUR: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_POUR"); break; case POLYGON_TYPE_COPPER: - pcb_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); + rnd_message(PCB_MSG_DEBUG, "POLYGON_TYPE_COPPER"); break; default: - pcb_message(PCB_MSG_DEBUG, "Error"); + rnd_message(PCB_MSG_DEBUG, "Error"); break; } } if (h->id_set) - pcb_message(PCB_MSG_DEBUG, " id = %i", h->id); - pcb_message(PCB_MSG_DEBUG, " x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + 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)); } 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) { - pcb_message(PCB_MSG_DEBUG, "info: duplicate polygon id %i.\n", h->id); + rnd_message(PCB_MSG_DEBUG, "info: duplicate polygon id %i.\n", h->id); break; } @@ -2576,14 +2576,14 @@ return 0; } -pcb_bool exec_polyline_end(parse_param * h) +rnd_bool exec_polyline_end(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "polyline end:\n"); + rnd_message(PCB_MSG_DEBUG, "polyline end:\n"); /* bookkeeping */ if ((current_vertex == NULL) && hyp_debug) - pcb_message(PCB_MSG_WARNING, "polyline: unexpected polyline end. continuing.\n"); + rnd_message(PCB_MSG_WARNING, "polyline: unexpected polyline end. continuing.\n"); current_vertex = NULL; return 0; @@ -2593,15 +2593,15 @@ * LINE subrecord of NET record. */ -pcb_bool exec_line(parse_param * h) +rnd_bool exec_line(parse_param * h) { hyp_vertex_t *new_vertex; if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); + rnd_message(PCB_MSG_DEBUG, "line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y)); if (current_vertex == NULL) { - pcb_message(PCB_MSG_DEBUG, "line: skipping."); + rnd_message(PCB_MSG_DEBUG, "line: skipping."); return 0; } @@ -2630,16 +2630,16 @@ * Clockwise from (x1, y1) to (x2, y2). */ -pcb_bool exec_curve(parse_param * h) +rnd_bool exec_curve(parse_param * h) { hyp_vertex_t *new_vertex; if (hyp_debug) - pcb_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(PCB_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) { - pcb_message(PCB_MSG_DEBUG, "curve: skipping."); + rnd_message(PCB_MSG_DEBUG, "curve: skipping."); return 0; } @@ -2667,10 +2667,10 @@ * NET_CLASS record */ -pcb_bool exec_net_class(parse_param * h) +rnd_bool exec_net_class(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "net_class: net_class_name = \"%s\"\n", h->net_class_name); + rnd_message(PCB_MSG_DEBUG, "net_class: net_class_name = \"%s\"\n", h->net_class_name); return 0; } @@ -2679,10 +2679,10 @@ * N net membership subrecord of NET_CLASS record */ -pcb_bool exec_net_class_element(parse_param * h) +rnd_bool exec_net_class_element(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "net_class_element: net_name = \"%s\"\n", h->net_name); + rnd_message(PCB_MSG_DEBUG, "net_class_element: net_name = \"%s\"\n", h->net_name); return 0; } @@ -2692,10 +2692,10 @@ */ -pcb_bool exec_net_class_attribute(parse_param * h) +rnd_bool exec_net_class_attribute(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); + rnd_message(PCB_MSG_DEBUG, "netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value); return 0; } @@ -2704,10 +2704,10 @@ * KEY record */ -pcb_bool exec_key(parse_param * h) +rnd_bool exec_key(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "key: key = \"%s\"\n", h->key); + rnd_message(PCB_MSG_DEBUG, "key: key = \"%s\"\n", h->key); return 0; } @@ -2716,10 +2716,10 @@ * END record */ -pcb_bool exec_end(parse_param * h) +rnd_bool exec_end(parse_param * h) { if (hyp_debug) - pcb_message(PCB_MSG_DEBUG, "end:\n"); + rnd_message(PCB_MSG_DEBUG, "end:\n"); return 0; } Index: trunk/src_plugins/io_hyp/parser.h =================================================================== --- trunk/src_plugins/io_hyp/parser.h (revision 30902) +++ trunk/src_plugins/io_hyp/parser.h (revision 30903) @@ -40,15 +40,15 @@ typedef struct { double vers; /* version of the hyp file format */ - pcb_bool detailed; /* data detailed enough for power integrity */ - pcb_bool unit_system_english; /* english or metric units */ - pcb_bool metal_thickness_weight; /* copper by weight or by length */ + rnd_bool detailed; /* data detailed enough for power integrity */ + rnd_bool unit_system_english; /* english or metric units */ + rnd_bool metal_thickness_weight; /* copper by weight or by length */ double default_plane_separation; /* trace to plane separation */ /* stackup record */ - pcb_bool use_die_for_metal; /* dielectric constant and loss tangent of dielectric for metal layers */ + rnd_bool use_die_for_metal; /* dielectric constant and loss tangent of dielectric for metal layers */ double bulk_resistivity; - pcb_bool conformal; + rnd_bool conformal; double epsilon_r; char *layer_name; double loss_tangent; @@ -55,22 +55,22 @@ char *material_name; double plane_separation; double plating_thickness; - pcb_bool prepreg; + rnd_bool prepreg; double temperature_coefficient; /* temperature coefficient of resistivity */ double thickness; /* layer thickness */ /* stackup record flags */ - pcb_bool bulk_resistivity_set; - pcb_bool conformal_set; - pcb_bool epsilon_r_set; - pcb_bool layer_name_set; - pcb_bool loss_tangent_set; - pcb_bool material_name_set; - pcb_bool plane_separation_set; - pcb_bool plating_thickness_set; - pcb_bool prepreg_set; - pcb_bool temperature_coefficient_set; - pcb_bool thickness_set; + rnd_bool bulk_resistivity_set; + rnd_bool conformal_set; + rnd_bool epsilon_r_set; + rnd_bool layer_name_set; + rnd_bool loss_tangent_set; + rnd_bool material_name_set; + rnd_bool plane_separation_set; + rnd_bool plating_thickness_set; + rnd_bool prepreg_set; + rnd_bool temperature_coefficient_set; + rnd_bool thickness_set; /* device record */ char *device_type; @@ -80,14 +80,14 @@ char *package; /* device record flags */ - pcb_bool name_set; - pcb_bool value_float_set; - pcb_bool value_string_set; - pcb_bool package_set; + rnd_bool name_set; + rnd_bool value_float_set; + rnd_bool value_string_set; + rnd_bool package_set; /* supplies record */ - pcb_bool voltage_specified; - pcb_bool conversion; + rnd_bool voltage_specified; + rnd_bool conversion; /* padstack record */ char *padstack_name; @@ -103,67 +103,67 @@ pad_type_enum pad_type; /* padstack record flags */ - pcb_bool padstack_name_set; - pcb_bool drill_size_set; - pcb_bool pad_type_set; + rnd_bool padstack_name_set; + rnd_bool drill_size_set; + rnd_bool pad_type_set; /* net record */ double width; double left_plane_separation; - pcb_bool width_set; - pcb_bool left_plane_separation_set; + rnd_bool width_set; + rnd_bool left_plane_separation_set; /* via subrecord of net */ char *layer1_name; - pcb_bool layer1_name_set; + rnd_bool layer1_name_set; char *layer2_name; - pcb_bool layer2_name_set; + rnd_bool layer2_name_set; char *via_pad_shape; - pcb_bool via_pad_shape_set; + rnd_bool via_pad_shape_set; double via_pad_sx; - pcb_bool via_pad_sx_set; + rnd_bool via_pad_sx_set; double via_pad_sy; - pcb_bool via_pad_sy_set; + rnd_bool via_pad_sy_set; double via_pad_angle; - pcb_bool via_pad_angle_set; + rnd_bool via_pad_angle_set; char *via_pad1_shape; - pcb_bool via_pad1_shape_set; + rnd_bool via_pad1_shape_set; double via_pad1_sx; - pcb_bool via_pad1_sx_set; + rnd_bool via_pad1_sx_set; double via_pad1_sy; - pcb_bool via_pad1_sy_set; + rnd_bool via_pad1_sy_set; double via_pad1_angle; - pcb_bool via_pad1_angle_set; + rnd_bool via_pad1_angle_set; char *via_pad2_shape; - pcb_bool via_pad2_shape_set; + rnd_bool via_pad2_shape_set; double via_pad2_sx; - pcb_bool via_pad2_sx_set; + rnd_bool via_pad2_sx_set; double via_pad2_sy; - pcb_bool via_pad2_sy_set; + rnd_bool via_pad2_sy_set; double via_pad2_angle; - pcb_bool via_pad2_angle_set; + rnd_bool via_pad2_angle_set; /* pin subrecord of net */ char *pin_reference; - pcb_bool pin_reference_set; + rnd_bool pin_reference_set; pin_function_enum pin_function; - pcb_bool pin_function_set; + rnd_bool pin_function_set; /* useg subrecord of net */ char *zlayer_name; - pcb_bool zlayer_name_set; + rnd_bool zlayer_name_set; double length; double impedance; - pcb_bool impedance_set; + rnd_bool impedance_set; double delay; double resistance; - pcb_bool resistance_set; + rnd_bool resistance_set; /* polygon subrecord of net */ int id; - pcb_bool id_set; + rnd_bool id_set; polygon_type_enum polygon_type; - pcb_bool polygon_type_set; + rnd_bool polygon_type_set; /* net class record */ char *net_class_name; @@ -189,62 +189,62 @@ } parse_param; /* exec_* routines are called by parser to interpret hyperlynx file */ -pcb_bool exec_board_file(parse_param * h); -pcb_bool exec_version(parse_param * h); -pcb_bool exec_data_mode(parse_param * h); -pcb_bool exec_units(parse_param * h); -pcb_bool exec_plane_sep(parse_param * h); -pcb_bool exec_perimeter_segment(parse_param * h); -pcb_bool exec_perimeter_arc(parse_param * h); -pcb_bool exec_board_attribute(parse_param * h); +rnd_bool exec_board_file(parse_param * h); +rnd_bool exec_version(parse_param * h); +rnd_bool exec_data_mode(parse_param * h); +rnd_bool exec_units(parse_param * h); +rnd_bool exec_plane_sep(parse_param * h); +rnd_bool exec_perimeter_segment(parse_param * h); +rnd_bool exec_perimeter_arc(parse_param * h); +rnd_bool exec_board_attribute(parse_param * h); -pcb_bool exec_options(parse_param * h); -pcb_bool exec_signal(parse_param * h); -pcb_bool exec_dielectric(parse_param * h); -pcb_bool exec_plane(parse_param * h); +rnd_bool exec_options(parse_param * h); +rnd_bool exec_signal(parse_param * h); +rnd_bool exec_dielectric(parse_param * h); +rnd_bool exec_plane(parse_param * h); -pcb_bool exec_devices(parse_param * h); +rnd_bool exec_devices(parse_param * h); -pcb_bool exec_supplies(parse_param * h); +rnd_bool exec_supplies(parse_param * h); -pcb_bool exec_pstk_element(parse_param * h); -pcb_bool exec_pstk_end(parse_param * h); +rnd_bool exec_pstk_element(parse_param * h); +rnd_bool exec_pstk_end(parse_param * h); -pcb_bool exec_net(parse_param * h); -pcb_bool exec_net_plane_separation(parse_param * h); -pcb_bool exec_net_attribute(parse_param * h); -pcb_bool exec_seg(parse_param * h); -pcb_bool exec_arc(parse_param * h); -pcb_bool exec_via(parse_param * h); -pcb_bool exec_via_v1(parse_param * h); /* Old style via format */ -pcb_bool exec_pin(parse_param * h); -pcb_bool exec_pad(parse_param * h); -pcb_bool exec_useg(parse_param * h); +rnd_bool exec_net(parse_param * h); +rnd_bool exec_net_plane_separation(parse_param * h); +rnd_bool exec_net_attribute(parse_param * h); +rnd_bool exec_seg(parse_param * h); +rnd_bool exec_arc(parse_param * h); +rnd_bool exec_via(parse_param * h); +rnd_bool exec_via_v1(parse_param * h); /* Old style via format */ +rnd_bool exec_pin(parse_param * h); +rnd_bool exec_pad(parse_param * h); +rnd_bool exec_useg(parse_param * h); -pcb_bool exec_polygon_begin(parse_param * h); -pcb_bool exec_polygon_end(parse_param * h); -pcb_bool exec_polyvoid_begin(parse_param * h); -pcb_bool exec_polyvoid_end(parse_param * h); -pcb_bool exec_polyline_begin(parse_param * h); -pcb_bool exec_polyline_end(parse_param * h); -pcb_bool exec_line(parse_param * h); -pcb_bool exec_curve(parse_param * h); +rnd_bool exec_polygon_begin(parse_param * h); +rnd_bool exec_polygon_end(parse_param * h); +rnd_bool exec_polyvoid_begin(parse_param * h); +rnd_bool exec_polyvoid_end(parse_param * h); +rnd_bool exec_polyline_begin(parse_param * h); +rnd_bool exec_polyline_end(parse_param * h); +rnd_bool exec_line(parse_param * h); +rnd_bool exec_curve(parse_param * h); -pcb_bool exec_net_class(parse_param * h); -pcb_bool exec_net_class_element(parse_param * h); -pcb_bool exec_net_class_attribute(parse_param * h); +rnd_bool exec_net_class(parse_param * h); +rnd_bool exec_net_class_element(parse_param * h); +rnd_bool exec_net_class_attribute(parse_param * h); -pcb_bool exec_end(parse_param * h); -pcb_bool exec_key(parse_param * h); +rnd_bool exec_end(parse_param * h); +rnd_bool exec_key(parse_param * h); /* called by pcb-rnd to load hyperlynx file */ -pcb_bool hyp_parse(pcb_data_t * dest, const char *fname, int debug); +rnd_bool hyp_parse(pcb_data_t * dest, const char *fname, int debug); void hyp_error(const char *msg); /* create arc, hyperlynx-style */ -pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC, - pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness, - pcb_coord_t Clearance, pcb_flag_t Flags); +pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t XC, + rnd_coord_t YC, rnd_coord_t Width, rnd_coord_t Height, pcb_bool_t Clockwise, rnd_coord_t Thickness, + rnd_coord_t Clearance, pcb_flag_t Flags); #endif Index: trunk/src_plugins/io_hyp/write.c =================================================================== --- trunk/src_plugins/io_hyp/write.c (revision 30902) +++ trunk/src_plugins/io_hyp/write.c (revision 30903) @@ -57,7 +57,7 @@ } hyp_wr_t; /* pcb-rnd y-axis points down; hyperlynx y-axis points up */ -static pcb_coord_t flip(pcb_coord_t y) +static rnd_coord_t flip(rnd_coord_t y) { return (PCB->hidlib.size_y - y); } @@ -161,7 +161,7 @@ return g->name; } -static void write_pr_line(hyp_wr_t * wr, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void write_pr_line(hyp_wr_t * wr, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(wr->f, " (PERIMETER_SEGMENT X1=%me Y1=%me X2=%me Y2=%me)\n", x1, flip(y1), x2, flip(y2)); } @@ -179,7 +179,7 @@ void hyp_pstk_shape(hyp_wr_t *wr, const char *lynam, const pcb_pstk_shape_t *shp) { - pcb_coord_t sx, sy, minx, miny, maxx, maxy; + rnd_coord_t sx, sy, minx, miny, maxx, maxy; int shnum = 0, n; TODO(": this ignores rotation") switch(shp->shape) { @@ -231,7 +231,7 @@ htpi_set(&wr->pstk_cache, proto, id); } else - pcb_message(PCB_MSG_ERROR, "Internal error: unknown padstack prototype\n"); + rnd_message(PCB_MSG_ERROR, "Internal error: unknown padstack prototype\n"); } sprintf(name, "proto_%ld", id); @@ -321,11 +321,11 @@ static void write_arc_(hyp_wr_t * wr, const char *cmd, pcb_arc_t * arc, const char *layer) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; if (arc->Width != arc->Height) { if (!wr->warn.elliptic) { - pcb_message(PCB_MSG_WARNING, "Elliptic arcs are not supported - omitting all elliptic arcs\n"); + rnd_message(PCB_MSG_WARNING, "Elliptic arcs are not supported - omitting all elliptic arcs\n"); wr->warn.elliptic = 1; } return; @@ -465,7 +465,7 @@ } if (cnt == 0) - pcb_message(PCB_MSG_WARNING, + rnd_message(PCB_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"); @@ -537,7 +537,7 @@ return 0; } -int io_hyp_write_pcb(pcb_plug_io_t * ctx, FILE * f, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_hyp_write_pcb(pcb_plug_io_t * ctx, FILE * f, const char *old_filename, const char *new_filename, rnd_bool emergency) { hyp_wr_t wr; Index: trunk/src_plugins/io_hyp/write.h =================================================================== --- trunk/src_plugins/io_hyp/write.h (revision 30902) +++ trunk/src_plugins/io_hyp/write.h (revision 30903) @@ -2,4 +2,4 @@ #include #include "plug_io.h" -int io_hyp_write_pcb(pcb_plug_io_t * ctx, FILE * f, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_hyp_write_pcb(pcb_plug_io_t * ctx, FILE * f, const char *old_filename, const char *new_filename, rnd_bool emergency); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30902) +++ trunk/src_plugins/io_kicad/read.c (revision 30903) @@ -106,13 +106,13 @@ pcb_layer_t *primitive_ly; /* for gr_ objects: if not NULL, use this layer and expect no layer specified in the file */ pcb_subc_t *primitive_subc; /* for gr_ objects: if not NULL, object is being added under this subc (apply offs) */ - pcb_coord_t width[DIM_max]; - pcb_coord_t height[DIM_max]; - pcb_coord_t dim_valid[DIM_max]; + rnd_coord_t width[DIM_max]; + rnd_coord_t height[DIM_max]; + rnd_coord_t dim_valid[DIM_max]; /* setup */ - pcb_coord_t pad_to_mask_clearance; - pcb_coord_t zone_clearance; + rnd_coord_t pad_to_mask_clearance; + rnd_coord_t zone_clearance; /* delayed actions */ zone_connect_t *zc_head; @@ -148,7 +148,7 @@ gds_append(&str, '\n'); - pcb_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(PCB_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -168,7 +168,7 @@ gds_append(&str, '\n'); - pcb_message(PCB_MSG_WARNING, "%s", str.array); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", layer_name); + rnd_message(PCB_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]; - pcb_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(PCB_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; @@ -670,7 +670,7 @@ return kicad_error(missnode, "Missing child node for " errmsg); \ } while(0) \ -/* same as PARSE_DOUBLE() but res is a pcb_coord_t, input string is in mm */ +/* same as PARSE_DOUBLE() but res is a rnd_coord_t, input string is in mm */ #define PARSE_COORD(res, missnode, node, errmsg) \ do { \ double __dtmp__; \ @@ -718,7 +718,7 @@ break; case KICAD_COORD: { - pcb_coord_t *d = (pcb_coord_t *)dst; + rnd_coord_t *d = (rnd_coord_t *)dst; PARSE_COORD(*d, NULL, subtree->children, ""); } break; @@ -810,7 +810,7 @@ int i; unsigned long tally = 0, required; double rotdeg = 0.0; /* default is horizontal */ - pcb_coord_t X, Y, thickness = 0; + rnd_coord_t X, Y, thickness = 0; int scaling = 100; int mirrored = 0; int align = 0; /* -1 for left, 0 for center and +1 for right */ @@ -832,7 +832,7 @@ PARSE_DOUBLE(rotdeg, NULL, n->children->next->next, "text rotation"); rotdeg -= mod_rot; if (subc != NULL) { - pcb_coord_t sx, sy; + rnd_coord_t sx, sy; if (pcb_subc_get_origin(subc, &sx, &sy) == 0) { X += sx; Y += sy; @@ -911,7 +911,7 @@ return kicad_error(subtree, "failed to create text due to missing fields"); { - pcb_coord_t mx, my, xalign, tw, th; + rnd_coord_t mx, my, xalign, tw, th; int swap; pcb_text_t txt; @@ -993,7 +993,7 @@ static int kicad_parse_target(read_state_t *st, gsxl_node_t *subtree) { unsigned long tally = 0, required; - pcb_coord_t x, y, thick = PCB_MM_TO_COORD(0.15); + rnd_coord_t x, y, thick = PCB_MM_TO_COORD(0.15); double size = 5.0; pcb_layer_t *ly = NULL; pcb_subc_t *subc; @@ -1076,7 +1076,7 @@ { gsxl_node_t *n; unsigned long tally = 0, required; - pcb_coord_t x1, y1, x2, y2, thickness, clearance; + rnd_coord_t x1, y1, x2, y2, thickness, clearance; pcb_flag_t flg = pcb_flag_make(flag); pcb_layer_t *ly = NULL; pcb_line_t *line; @@ -1159,7 +1159,7 @@ subc = st->primitive_subc; if (subc != NULL) { - pcb_coord_t sx, sy; + rnd_coord_t sx, sy; if (pcb_subc_get_origin(subc, &sx, &sy) == 0) { x1 += sx; y1 += sy; @@ -1184,7 +1184,7 @@ { gsxl_node_t *n; unsigned long tally = 0, required; - pcb_coord_t cx, cy, endx, endy, thickness, clearance, deltax, deltay; + rnd_coord_t cx, cy, endx, endy, thickness, clearance, deltax, deltay; pcb_angle_t end_angle = 0.0, delta = 360.0; /* these defaults allow a gr_circle to be parsed, which does not specify (angle XXX) */ pcb_flag_t flg = pcb_flag_make(0); /* start with something bland here */ pcb_layer_t *ly = NULL; @@ -1249,7 +1249,7 @@ { pcb_angle_t start_angle; - pcb_coord_t width, height; + rnd_coord_t width, height; width = height = pcb_distance(cx, cy, endx, endy); /* calculate radius of arc */ deltax = endx - cx; @@ -1274,7 +1274,7 @@ subc = st->primitive_subc; if (subc != NULL) { - pcb_coord_t sx, sy; + rnd_coord_t sx, sy; if (pcb_subc_get_origin(subc, &sx, &sy) == 0) { cx += sx; cy += sy; @@ -1300,7 +1300,7 @@ gsxl_node_t *n, *nly1, *nly2; unsigned long tally = 0, required; int blind_cnt = 0; - pcb_coord_t x, y, thickness, clearance, mask, drill; /* not sure what to do with mask */ + rnd_coord_t x, y, thickness, clearance, mask, drill; /* not sure what to do with mask */ pcb_layer_t *ly1, *ly2; /* blind/buried: from-to layers */ pcb_pstk_t *ps; @@ -1619,7 +1619,7 @@ -static void kicad_slot_shape(pcb_pstk_shape_t *shape, pcb_coord_t sx, pcb_coord_t sy) +static void kicad_slot_shape(pcb_pstk_shape_t *shape, rnd_coord_t sx, rnd_coord_t sy) { shape->shape = PCB_PSSH_LINE; if (sx > sy) { /* horizontal */ @@ -1645,10 +1645,10 @@ /* check if shape is wanted on a given layer - SMD version */ #define LYSHS(loc, typ) ((layers->want[loc] & (PCB_LYT_ ## typ))) -static pcb_pstk_t *kicad_make_pad_thr(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t padXsize, pcb_coord_t padYsize, pcb_coord_t clearance, pcb_coord_t mask, pcb_coord_t paste, double paste_ratio, pcb_coord_t drillx, pcb_coord_t drilly, const char *pad_shape, int plated, kicad_padly_t *layers, double shape_arg, double shape_arg2) +static pcb_pstk_t *kicad_make_pad_thr(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t padXsize, rnd_coord_t padYsize, rnd_coord_t clearance, rnd_coord_t mask, rnd_coord_t paste, double paste_ratio, rnd_coord_t drillx, rnd_coord_t drilly, const char *pad_shape, int plated, kicad_padly_t *layers, double shape_arg, double shape_arg2) { int len = 0, slot = (drillx != drilly); - pcb_coord_t drill = 0; + rnd_coord_t drill = 0; if (pad_shape == NULL) { kicad_error(subtree, "pin with no shape"); @@ -1665,7 +1665,7 @@ padstack and add the custom shapes as heavy terminal together with the padstack */ pcb_pstk_shape_t sh[9]; - pcb_coord_t dy = PCB_MM_TO_COORD(shape_arg), dx = PCB_MM_TO_COORD(shape_arg2); /* x;y and 1;2 swapped intentionally - kicad does it like that */ + rnd_coord_t dy = PCB_MM_TO_COORD(shape_arg), dx = PCB_MM_TO_COORD(shape_arg2); /* x;y and 1;2 swapped intentionally - kicad does it like that */ memset(sh, 0, sizeof(sh)); if (LYSHT(TOP, MASK)) {sh[len].layer_mask = PCB_LYT_TOP | PCB_LYT_MASK; sh[len].comb = PCB_LYC_SUB | PCB_LYC_AUTO; pcb_shape_rect_trdelta(&sh[len++], padXsize+mask*2, padYsize+mask*2, dx, dy);} if (LYSHT(BOTTOM, MASK)) {sh[len].layer_mask = PCB_LYT_BOTTOM | PCB_LYT_MASK; sh[len].comb = PCB_LYC_SUB | PCB_LYC_AUTO; pcb_shape_rect_trdelta(&sh[len++], padXsize+mask*2, padYsize+mask*2, dx, dy);} @@ -1724,7 +1724,7 @@ return NULL; } -static pcb_pstk_t *kicad_make_pad_smd(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t padXsize, pcb_coord_t padYsize, pcb_coord_t clearance, pcb_coord_t mask, pcb_coord_t paste, double paste_ratio, const char *pad_shape, pcb_layer_type_t side, kicad_padly_t *layers, double shape_arg, double shape_arg2) +static pcb_pstk_t *kicad_make_pad_smd(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t padXsize, rnd_coord_t padYsize, rnd_coord_t clearance, rnd_coord_t mask, rnd_coord_t paste, double paste_ratio, const char *pad_shape, pcb_layer_type_t side, kicad_padly_t *layers, double shape_arg, double shape_arg2) { int len = 0; @@ -1743,7 +1743,7 @@ if ((strcmp(pad_shape, "rect") == 0) || (strcmp(pad_shape, "trapezoid") == 0) || (strcmp(pad_shape, "custom") == 0)) { /* "custom" pads: see comment in kicad_make_pad_thr() */ pcb_pstk_shape_t sh[4]; - pcb_coord_t dy = PCB_MM_TO_COORD(shape_arg), dx = PCB_MM_TO_COORD(shape_arg2); /* x;y and 1;2 swapped intentionally - kicad does it like that */ + rnd_coord_t dy = PCB_MM_TO_COORD(shape_arg), dx = PCB_MM_TO_COORD(shape_arg2); /* x;y and 1;2 swapped intentionally - kicad does it like that */ memset(sh, 0, sizeof(sh)); if (LYSHS(side, MASK)) {sh[len].layer_mask = side | PCB_LYT_MASK; sh[len].comb = PCB_LYC_SUB | PCB_LYC_AUTO; pcb_shape_rect_trdelta(&sh[len++], padXsize+mask*2, padYsize+mask*2, dx, dy);} if (LYSHS(side, PASTE)) {sh[len].layer_mask = side | PCB_LYT_PASTE; sh[len].comb = PCB_LYC_AUTO; pcb_shape_rect_trdelta(&sh[len++], padXsize * paste_ratio + paste*2, padYsize * paste_ratio + paste*2, dx, dy);} @@ -1790,7 +1790,7 @@ #undef LYSHT #undef LYSHS -static int kicad_make_pad(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, const char *netname, int throughHole, int plated, pcb_coord_t moduleX, pcb_coord_t moduleY, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t padXsize, pcb_coord_t padYsize, double pad_rot, unsigned int moduleRotation, pcb_coord_t clearance, pcb_coord_t mask, pcb_coord_t paste, double paste_ratio, int zone_connect, pcb_coord_t drillx, pcb_coord_t drilly, const char *pin_name, const char *pad_shape, unsigned long *featureTally, int *moduleEmpty, pcb_layer_type_t smd_side, kicad_padly_t *layers, double shape_arg, double shape_arg2) +static int kicad_make_pad(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, const char *netname, int throughHole, int plated, rnd_coord_t moduleX, rnd_coord_t moduleY, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t padXsize, rnd_coord_t padYsize, double pad_rot, unsigned int moduleRotation, rnd_coord_t clearance, rnd_coord_t mask, rnd_coord_t paste, double paste_ratio, int zone_connect, rnd_coord_t drillx, rnd_coord_t drilly, const char *pin_name, const char *pad_shape, unsigned long *featureTally, int *moduleEmpty, pcb_layer_type_t smd_side, kicad_padly_t *layers, double shape_arg, double shape_arg2) { pcb_pstk_t *ps; unsigned long required; @@ -2018,11 +2018,11 @@ } TODO("eliminate this forward declaration by reordering the code") -static int kicad_parse_any_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, pcb_coord_t modx, pcb_coord_t mody); +static int kicad_parse_any_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, rnd_coord_t modx, rnd_coord_t mody); static int kicad_parse_gr_poly(read_state_t *st, gsxl_node_t *subtree) { - pcb_coord_t sx = 0, sy = 0; + rnd_coord_t sx = 0, sy = 0; pcb_subc_get_origin(st->primitive_subc, &sx, &sy); return kicad_parse_any_poly(st, subtree, st->primitive_subc, sx, sy); } @@ -2082,10 +2082,10 @@ } -static int kicad_parse_pad(read_state_t *st, gsxl_node_t *n, pcb_subc_t *subc, unsigned long *tally, pcb_coord_t moduleX, pcb_coord_t moduleY, unsigned int moduleRotation, pcb_coord_t mod_clr, pcb_coord_t mod_mask, pcb_coord_t mod_paste, double mod_paste_ratio, int mod_zone_connect, int *moduleEmpty) +static int kicad_parse_pad(read_state_t *st, gsxl_node_t *n, pcb_subc_t *subc, unsigned long *tally, rnd_coord_t moduleX, rnd_coord_t moduleY, unsigned int moduleRotation, rnd_coord_t mod_clr, rnd_coord_t mod_mask, rnd_coord_t mod_paste, double mod_paste_ratio, int mod_zone_connect, int *moduleEmpty) { gsxl_node_t *m; - pcb_coord_t x, y, drillx, drilly, sx, sy, clearance, mask = st->pad_to_mask_clearance*2, paste = 0; + rnd_coord_t x, y, drillx, drilly, sx, sy, clearance, mask = st->pad_to_mask_clearance*2, paste = 0; const char *netname = NULL; char *pin_name = NULL, *pad_shape = NULL; unsigned long feature_tally = 0; @@ -2247,10 +2247,10 @@ return 0; } -static int kicad_parse_poly_pts(read_state_t *st, gsxl_node_t *subtree, pcb_poly_t *polygon, pcb_coord_t xo, pcb_coord_t yo) +static int kicad_parse_poly_pts(read_state_t *st, gsxl_node_t *subtree, pcb_poly_t *polygon, rnd_coord_t xo, rnd_coord_t yo) { gsxl_node_t *m; - pcb_coord_t x, y; + rnd_coord_t x, y; if ((subtree == NULL) || (subtree->str == NULL)) return kicad_error(subtree, "error parsing empty polygon."); @@ -2269,11 +2269,11 @@ return 0; } -static int kicad_parse_any_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, pcb_coord_t modx, pcb_coord_t mody) +static int kicad_parse_any_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, rnd_coord_t modx, rnd_coord_t mody) { gsxl_node_t *n, *npts = NULL; pcb_layer_t *ly = NULL; - pcb_coord_t width = 0; + rnd_coord_t width = 0; unsigned long tally = 0; pcb_poly_t *poly; pcb_flag_t flags = pcb_flag_make(PCB_FLAG_CLEARPOLY); @@ -2330,7 +2330,7 @@ return 0; } -static int kicad_parse_fp_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, pcb_coord_t modx, pcb_coord_t mody) +static int kicad_parse_fp_poly(read_state_t *st, gsxl_node_t *subtree, pcb_subc_t *subc, rnd_coord_t modx, rnd_coord_t mody) { return kicad_parse_any_poly(st, subtree, subc, modx, mody); } @@ -2344,7 +2344,7 @@ int mod_zone_connect = 1; /* default seems to be connect; see CUCP#57, case labeled "-1" */ double mod_rot = 0, mod_paste_ratio = 0; unsigned long tally = 0; - pcb_coord_t mod_x = 0, mod_y = 0, mod_clr = UNSPECIFIED, mod_mask = UNSPECIFIED, mod_paste = UNSPECIFIED; + rnd_coord_t mod_x = 0, mod_y = 0, mod_clr = UNSPECIFIED, mod_mask = UNSPECIFIED, mod_paste = UNSPECIFIED; char *mod_name; pcb_subc_t *subc = NULL; @@ -2777,7 +2777,7 @@ pcb_layer_auto_fixup(Ptr); if (pcb_board_normalize(Ptr) > 0) - pcb_message(PCB_MSG_WARNING, "Had to make changes to the coords so that the design fits the board.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Error parsing s-expression '%s'\n", name); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Wrong root node '%s', expected 'module'\n", st.dom.root->str); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_kicad/read_net.c (revision 30903) @@ -49,7 +49,7 @@ #define if_strval(node, name) \ if (strcmp(node->str, #name) == 0) { \ if (name != NULL) { \ - pcb_message(PCB_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ + rnd_message(PCB_MSG_ERROR, "Invalid eeschema: multiple %s subtrees\n", #name); \ return -1; \ } \ name = node; \ @@ -67,7 +67,7 @@ #define req_subtree(name) \ if (name == NULL) { \ - pcb_message(PCB_MSG_ERROR, "Invalid eeschema: missing %s subtree\n", #name); \ + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid eeschema netlist header: not an export\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid eeschema version: expected 'D', got '%s'\n", version->children->str); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "eeschema: ignoring component with no refdes\n"); + rnd_message(PCB_MSG_WARNING, "eeschema: ignoring component with no refdes\n"); continue; } if (footprint == NULL) { - pcb_message(PCB_MSG_WARNING, "eeschema: ignoring component %s with no footprint\n", ref); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "eeschema: ignoring pins of incomplete net\n"); + rnd_message(PCB_MSG_WARNING, "eeschema: ignoring pins of incomplete net\n"); continue; } /* do the binding */ if ((ref == NULL) || (pin == NULL)) { - pcb_message(PCB_MSG_WARNING, "eeschema: ignoring incomplete connection to net %s: refdes=%s pin=%s \n", netname, ref, pin); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_eeschema: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_kicad/write.c (revision 30903) @@ -51,7 +51,7 @@ typedef struct { FILE *f; /* output file */ pcb_board_t *pcb; /* board being exported */ - pcb_coord_t ox, oy; /* move every object by this origin */ + rnd_coord_t ox, oy; /* move every object by this origin */ struct { pcb_layergrp_t *grp; char name[32]; /* kicad layer name */ @@ -229,7 +229,7 @@ int skip_term; /* do not print terminals on this layer */ } klayer_t; -static void kicad_print_line(const wctx_t *ctx, const klayer_t *kly, pcb_line_t *line, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_line(const wctx_t *ctx, const klayer_t *kly, pcb_line_t *line, int ind, rnd_coord_t dx, rnd_coord_t dy) { const char *cmd[] = {"segment", "gr_line", "fp_line"}; @@ -243,12 +243,12 @@ /* neglect (net ___ ) for now */ } -static void kicad_print_arc(const wctx_t *ctx, const klayer_t *kly, pcb_arc_t *arc, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_arc(const wctx_t *ctx, const klayer_t *kly, pcb_arc_t *arc, int ind, rnd_coord_t dx, rnd_coord_t dy) { pcb_arc_t localArc = *arc; /* for converting ellipses to circular arcs */ /* int kicadArcShape; 3 = circle, and 2 = arc, 1= rectangle used in eeschema only */ - pcb_coord_t copperStartX, copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ - pcb_coord_t radius, xStart, yStart, xEnd, yEnd; + rnd_coord_t copperStartX, copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ + rnd_coord_t radius, xStart, yStart, xEnd, yEnd; if (arc->Width > arc->Height) { radius = arc->Height; @@ -295,20 +295,20 @@ } } -static void kicad_print_text(const wctx_t *ctx, const klayer_t *kly, pcb_text_t *text, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_text(const wctx_t *ctx, const klayer_t *kly, pcb_text_t *text, int ind, rnd_coord_t dx, rnd_coord_t dy) { pcb_font_t *myfont = pcb_font(PCB, 0, 1); - pcb_coord_t mWidth = myfont->MaxWidth; /* kicad needs the width of the widest letter */ - pcb_coord_t defaultStrokeThickness = 100 * 2540; /* use 100 mil as default 100% stroked font line thickness */ + rnd_coord_t mWidth = myfont->MaxWidth; /* kicad needs the width of the widest letter */ + rnd_coord_t defaultStrokeThickness = 100 * 2540; /* use 100 mil as default 100% stroked font line thickness */ int kicadMirrored = 1; /* 1 is not mirrored, 0 is mirrored */ - pcb_coord_t defaultXSize; - pcb_coord_t defaultYSize; - pcb_coord_t strokeThickness; + rnd_coord_t defaultXSize; + rnd_coord_t defaultYSize; + rnd_coord_t strokeThickness; int rotation, direction; - pcb_coord_t textOffsetX; - pcb_coord_t textOffsetY; - pcb_coord_t halfStringWidth; - pcb_coord_t halfStringHeight; + rnd_coord_t textOffsetX; + rnd_coord_t textOffsetY; + rnd_coord_t halfStringWidth; + rnd_coord_t halfStringHeight; if (!(kly->lyt & PCB_LYT_COPPER) && !(kly->lyt & PCB_LYT_SILK)) { pcb_io_incompat_save(ctx->pcb->Data, (pcb_any_obj_t *)text, "text-layer", "Kicad supports text only on copper or silk - omitting text object on misc layer", NULL); @@ -400,7 +400,7 @@ fprintf(ctx->f, ")\n%*s)\n", ind, ""); } -static void kicad_print_poly_zone(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_poly_zone(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, rnd_coord_t dx, rnd_coord_t dy) { int i, j; @@ -436,7 +436,7 @@ fprintf(ctx->f, "%*s)\n", ind, ""); } -static void kicad_print_poly_fp_poly(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_poly_fp_poly(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, rnd_coord_t dx, rnd_coord_t dy) { int i, j; @@ -467,7 +467,7 @@ -static void kicad_print_poly(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, pcb_coord_t dx, pcb_coord_t dy, int in_module) +static void kicad_print_poly(const wctx_t *ctx, const klayer_t *kly, pcb_poly_t *polygon, int ind, rnd_coord_t dx, rnd_coord_t dy, int in_module) { if (in_module) kicad_print_poly_fp_poly(ctx, kly, polygon, ind, dx, dy); @@ -478,7 +478,7 @@ /* Print all objects of a kicad layer; if skip_term is true, ignore the objects with term ID set */ -static void kicad_print_layer(wctx_t *ctx, pcb_layer_t *ly, const klayer_t *kly, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_layer(wctx_t *ctx, pcb_layer_t *ly, const klayer_t *kly, int ind, rnd_coord_t dx, rnd_coord_t dy) { gdl_iterator_t it; pcb_line_t *line; @@ -516,7 +516,7 @@ /* writes kicad format via data For a track segment: Position shape Xstart Ystart Xend Yend width Description layer 0 netcode timestamp status; Shape parameter is set to 0 (reserved for future) */ -static void kicad_print_pstks(wctx_t *ctx, pcb_data_t *Data, int ind, pcb_coord_t dx, pcb_coord_t dy) +static void kicad_print_pstks(wctx_t *ctx, pcb_data_t *Data, int ind, rnd_coord_t dx, rnd_coord_t dy) { gdl_iterator_t it; pcb_pstk_t *ps; @@ -524,9 +524,9 @@ padstacklist_foreach(&Data->padstack, &it, ps) { int klayer_from = 0, klayer_to = 15; - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; pcb_pstk_compshape_t cshape; - pcb_bool plated, square, nopaste; + rnd_bool plated, square, nopaste; double psrot; if (is_subc && (ps->term == NULL)) { @@ -568,7 +568,7 @@ int n, has_mask = 0, on_bottom; pcb_pstk_proto_t *proto = pcb_pstk_get_proto_(Data, ps->proto); pcb_pstk_tshape_t *tshp = &proto->tr.array[0]; - pcb_coord_t w, h; + rnd_coord_t w, h; for(n = 0; n < tshp->len; n++) { if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { @@ -658,7 +658,7 @@ } } -void kicad_print_data(wctx_t *ctx, pcb_data_t *data, int ind, pcb_coord_t dx, pcb_coord_t dy) +void kicad_print_data(wctx_t *ctx, pcb_data_t *data, int ind, rnd_coord_t dx, rnd_coord_t dy) { int n, klayer; @@ -706,9 +706,9 @@ kicad_print_pstks(ctx, data, ind, dx, dy); } -static int kicad_print_subc(wctx_t *ctx, pcb_subc_t *subc, pcb_cardinal_t ind, pcb_coord_t dx, pcb_coord_t dy, unm_t *group1) +static int kicad_print_subc(wctx_t *ctx, pcb_subc_t *subc, pcb_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, unm_t *group1) { - pcb_coord_t xPos, yPos, sox, soy; + rnd_coord_t xPos, yPos, sox, soy; int on_bottom; const char *currentElementName; const char *currentElementRef; @@ -804,7 +804,7 @@ } -static int kicad_print_subcs(wctx_t *ctx, pcb_data_t *Data, pcb_cardinal_t ind, pcb_coord_t dx, pcb_coord_t dy, long subc_idx) +static int kicad_print_subcs(wctx_t *ctx, pcb_data_t *Data, pcb_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, long subc_idx) { gdl_iterator_t sit; pcb_subc_t *subc; @@ -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)) { - pcb_message(PCB_MSG_ERROR, "Can't save a library and/or multiple modules (footprints) in a single s-experssion mod file\n"); + rnd_message(PCB_MSG_ERROR, "Can't save a library and/or multiple modules (footprints) in a single s-experssion mod file\n"); return -1; } return 0; @@ -933,8 +933,8 @@ fprintf(ctx->f, "\n%*s(page A%d)\n", ind, "", paperSize); if (force_center) { - pcb_coord_t LayoutXOffset; - pcb_coord_t LayoutYOffset; + rnd_coord_t LayoutXOffset; + rnd_coord_t LayoutYOffset; /* we now sort out the offsets for centring the layout in the chosen sheet size here */ if (sheetWidth > PCB_COORD_TO_MIL(PCB->hidlib.size_x)) { /* usually A4, bigger if needed */ @@ -961,7 +961,7 @@ ctx->ox = ctx->oy = 0; } -static void kicad_print_implicit_outline(wctx_t *ctx, const char *lynam, pcb_coord_t thick, int ind) +static void kicad_print_implicit_outline(wctx_t *ctx, const char *lynam, rnd_coord_t thick, int ind) { fprintf(ctx->f, "%*s", ind, ""); pcb_fprintf(ctx->f, "(gr_line (start %.3mm %.3mm) (end %.3mm %.3mm) (layer %s) (width %.3mm))\n", @@ -1000,11 +1000,11 @@ } } - pcb_message(PCB_MSG_ERROR, "io_kicad: internal error: can not find output outline layer for drawing the implicit outline\n"); + rnd_message(PCB_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 */ -int io_kicad_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_kicad_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { wctx_t wctx; int baseSExprIndent = 2; Index: trunk/src_plugins/io_kicad/write.h =================================================================== --- trunk/src_plugins/io_kicad/write.h (revision 30902) +++ trunk/src_plugins/io_kicad/write.h (revision 30903) @@ -30,7 +30,7 @@ #include #include "data.h" -int io_kicad_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_kicad_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); int io_kicad_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs); int io_kicad_write_subcs_subc(pcb_plug_io_t *ctx, void **udata, FILE *f, pcb_subc_t *subc); Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 30902) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 30903) @@ -78,13 +78,13 @@ /* via is: Position shape Xstart Ystart Xend Yend width Description layer 0 netcode timestamp status Shape parameter is set to 0 (reserved for future) */ -static int write_kicad_legacy_layout_vias(FILE *FP, pcb_data_t *Data, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_vias(FILE *FP, pcb_data_t *Data, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t it; pcb_pstk_t *ps; - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; - pcb_bool plated; + rnd_bool plated; padstacklist_foreach(&Data->padstack, &it, ps) { if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { @@ -111,7 +111,7 @@ return 0; } -static int write_kicad_legacy_layout_tracks(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_tracks(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t it; pcb_line_t *line; @@ -140,13 +140,13 @@ } } -static int write_kicad_legacy_layout_arcs(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_arcs(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t it; pcb_arc_t *arc; pcb_arc_t localArc; /* for converting ellipses to circular arcs */ pcb_cardinal_t currentLayer = number; - pcb_coord_t radius, xStart, yStart, xEnd, yEnd; + rnd_coord_t radius, xStart, yStart, xEnd, yEnd; int copperStartX; /* used for mapping geda copper arcs onto kicad copper lines */ int copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ @@ -200,22 +200,22 @@ } } -static int write_kicad_legacy_layout_text(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_text(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { pcb_font_t *myfont = pcb_font(PCB, 0, 1); - pcb_coord_t mWidth = myfont->MaxWidth; /* kicad needs the width of the widest letter */ - pcb_coord_t defaultStrokeThickness = 100 * 2540; /* use 100 mil as default 100% stroked font line thickness */ + rnd_coord_t mWidth = myfont->MaxWidth; /* kicad needs the width of the widest letter */ + rnd_coord_t defaultStrokeThickness = 100 * 2540; /* use 100 mil as default 100% stroked font line thickness */ int kicadMirrored = 1; /* 1 is not mirrored, 0 is mirrored */ int direction; - pcb_coord_t defaultXSize; - pcb_coord_t defaultYSize; - pcb_coord_t strokeThickness; + rnd_coord_t defaultXSize; + rnd_coord_t defaultYSize; + rnd_coord_t strokeThickness; int rotation; - pcb_coord_t textOffsetX; - pcb_coord_t textOffsetY; - pcb_coord_t halfStringWidth; - pcb_coord_t halfStringHeight; + rnd_coord_t textOffsetX; + rnd_coord_t textOffsetY; + rnd_coord_t halfStringWidth; + rnd_coord_t halfStringHeight; int localFlag; gdl_iterator_t it; @@ -360,10 +360,10 @@ fprintf(FP, "Ne 0 \"\"\n"); /* unconnected pads have zero for net */ } -static int io_kicad_legacy_write_subc(FILE *FP, pcb_board_t *pcb, pcb_subc_t *subc, pcb_coord_t xOffset, pcb_coord_t yOffset, const char *uname) +static int io_kicad_legacy_write_subc(FILE *FP, pcb_board_t *pcb, pcb_subc_t *subc, rnd_coord_t xOffset, rnd_coord_t yOffset, const char *uname) { pcb_pstk_t *ps; - pcb_coord_t ox, oy, sox, soy; + rnd_coord_t ox, oy, sox, soy; int on_bottom; int copperLayer; /* hard coded default, 0 is bottom copper */ gdl_iterator_t it; @@ -408,9 +408,9 @@ /* export padstacks */ padstacklist_foreach(&subc->data->padstack, &it, ps) { - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; pcb_pstk_compshape_t cshape; - pcb_bool plated, square, nopaste; + rnd_bool plated, square, nopaste; double psrot; if (ps->term == NULL) { @@ -451,7 +451,7 @@ int n, has_mask = 0, on_bottom; pcb_pstk_proto_t *proto = pcb_pstk_get_proto_(subc->data, ps->proto); pcb_pstk_tshape_t *tshp = &proto->tr.array[0]; - pcb_coord_t w, h, cx, cy; + rnd_coord_t w, h, cx, cy; int found = 0; fputs("$PAD\n", FP); /* start pad descriptor for an smd pad */ @@ -547,7 +547,7 @@ pcb_arc_t *arc; pcb_poly_t *poly; pcb_text_t *text; - pcb_coord_t arcStartX, arcStartY, arcEndX, arcEndY; + rnd_coord_t arcStartX, arcStartY, arcEndX, arcEndY; int silkLayer; if (!(lyt & PCB_LYT_SILK)) { @@ -600,7 +600,7 @@ return 0; } -static int write_kicad_legacy_layout_subcs(FILE *FP, pcb_board_t *Layout, pcb_data_t *Data, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_subcs(FILE *FP, pcb_board_t *Layout, pcb_data_t *Data, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t sit; pcb_subc_t *subc; @@ -619,7 +619,7 @@ return 0; } -static int write_kicad_legacy_layout_polygons(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, pcb_coord_t xOffset, pcb_coord_t yOffset) +static int write_kicad_legacy_layout_polygons(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { int i, j; gdl_iterator_t it; @@ -703,7 +703,7 @@ return 0; } -int io_kicad_legacy_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_kicad_legacy_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { pcb_cardinal_t i; int kicadLayerCount = 0; @@ -711,7 +711,7 @@ int layer = 0; int currentKicadLayer = 0; int currentGroup = 0; - pcb_coord_t outlineThickness = PCB_MIL_TO_COORD(10); + rnd_coord_t outlineThickness = PCB_MIL_TO_COORD(10); int bottomCount; pcb_layer_id_t *bottomLayers; @@ -726,8 +726,8 @@ int outlineCount; pcb_layer_id_t *outlineLayers; - pcb_coord_t LayoutXOffset; - pcb_coord_t LayoutYOffset; + rnd_coord_t LayoutXOffset; + rnd_coord_t LayoutYOffset; /* Kicad expects a layout "sheet" size to be specified in mils, and A4, A3 etc... */ int A4HeightMil = 8267; Index: trunk/src_plugins/io_kicad_legacy/write.h =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.h (revision 30902) +++ trunk/src_plugins/io_kicad_legacy/write.h (revision 30903) @@ -30,7 +30,7 @@ #include #include "data.h" -int io_kicad_legacy_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_kicad_legacy_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); int io_kicad_legacy_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs); int io_kicad_legacy_write_subcs_subc(pcb_plug_io_t *ctx, void **udata, FILE *f, pcb_subc_t *subc); int io_kicad_legacy_write_subcs_tail(pcb_plug_io_t *ctx, void **udata, FILE *f); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 30902) +++ trunk/src_plugins/io_lihata/read.c (revision 30903) @@ -93,7 +93,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - pcb_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(PCB_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); - pcb_message(PCB_MSG_WARNING, "%s", str.array); + rnd_message(PCB_MSG_WARNING, "%s", str.array); gds_uninit(&str); } @@ -183,11 +183,11 @@ return 0; } -/* Load the pcb_coord_t value of a text node into res. Return 0 on success */ -static int parse_coord(pcb_coord_t *res, lht_node_t *nd) +/* Load the rnd_coord_t value of a text node into res. Return 0 on success */ +static int parse_coord(rnd_coord_t *res, lht_node_t *nd) { double tmp; - pcb_bool success; + rnd_bool success; if (nd == &missing_ok) return 0; @@ -210,7 +210,7 @@ static int parse_angle(pcb_angle_t *res, lht_node_t *nd) { double tmp; - pcb_bool success; + rnd_bool success; if (nd == &missing_ok) return 0; @@ -337,7 +337,7 @@ /* Load the boolean value of a text node into res. Return 0 on success */ -static int parse_bool(pcb_bool *res, lht_node_t *nd) +static int parse_bool(rnd_bool *res, lht_node_t *nd) { char val[8], *end; @@ -374,7 +374,7 @@ static int parse_coord_conf(const char *path, lht_node_t *nd) { - pcb_coord_t tmp; + rnd_coord_t tmp; if (nd == &missing_ok) return 0; @@ -536,7 +536,7 @@ for (n = 0; n < pcb_object_flagbits_len; n++) { long my_types = pcb_object_flagbits[n].object_types | ((rdver <= 4) ? pcb_object_flagbits[n].compat_types : 0); if (my_types & object_type) { - pcb_bool b = 0; + rnd_bool b = 0; if ((parse_bool(&b, hash_get(fn, pcb_object_flagbits[n].name, 1)) == 0) && b) PCB_FLAG_SET(pcb_object_flagbits[n].mask, &fh); } @@ -588,7 +588,7 @@ return 0; } -static int parse_line(pcb_layer_t *ly, lht_node_t *obj, pcb_coord_t dx, pcb_coord_t dy) +static int parse_line(pcb_layer_t *ly, lht_node_t *obj, rnd_coord_t dx, rnd_coord_t dy) { pcb_line_t *line; unsigned char intconn = 0; @@ -664,7 +664,7 @@ return err; } -static int parse_arc(pcb_layer_t *ly, lht_node_t *obj, pcb_coord_t dx, pcb_coord_t dy) +static int parse_arc(pcb_layer_t *ly, lht_node_t *obj, rnd_coord_t dx, rnd_coord_t dy) { pcb_arc_t *arc; unsigned char intconn = 0; @@ -1129,11 +1129,11 @@ iolht_warn(obj, -1, "Lihata from v5 does not support the old data model (elements, pins, pads and vias);\nyour file contains %s that will be converted to the new model\n", type); } -static int parse_via(pcb_data_t *dt, lht_node_t *obj, pcb_coord_t dx, pcb_coord_t dy, int subc_on_bottom) +static int parse_via(pcb_data_t *dt, lht_node_t *obj, rnd_coord_t dx, rnd_coord_t dy, int subc_on_bottom) { pcb_pstk_t *ps; unsigned char intconn = 0; - pcb_coord_t Thickness, Clearance, Mask = 0, DrillingHole, X, Y; + rnd_coord_t Thickness, Clearance, Mask = 0, DrillingHole, X, Y; char *Name = NULL, *Number = NULL; pcb_flag_t flg; lht_node_t *fln; @@ -1182,12 +1182,12 @@ return err; } -static int parse_pad(pcb_subc_t *subc, lht_node_t *obj, pcb_coord_t dx, pcb_coord_t dy, int subc_on_bottom) +static int parse_pad(pcb_subc_t *subc, lht_node_t *obj, rnd_coord_t dx, rnd_coord_t dy, int subc_on_bottom) { pcb_pstk_t *p; unsigned char intconn = 0; pcb_flag_t flg; - pcb_coord_t X1, Y1, X2, Y2, Thickness, Clearance, Mask = 0; + rnd_coord_t X1, Y1, X2, Y2, Thickness, Clearance, Mask = 0; char *Name = NULL, *Number = NULL; int err = 0; long int id; @@ -1235,7 +1235,7 @@ lht_node_t *lst, *n; lht_dom_iterator_t it; int onsld, tdir = 0, tscale = 100; - pcb_coord_t ox = 0, oy = 0, tx, ty; + rnd_coord_t ox = 0, oy = 0, tx, ty; pcb_text_t *txt; int err = 0; @@ -1421,7 +1421,7 @@ pcb_layergrp_fix_turn_to_outline(g); } else - pcb_message(PCB_MSG_ERROR, "failed to create layer %s\n", l->name); + rnd_message(PCB_MSG_ERROR, "failed to create layer %s\n", l->name); } pcb_layergrp_fix_old_outline(pcb); @@ -1897,7 +1897,7 @@ grp = lht_dom_hash_get(nd, "objects"); for(obj = lht_dom_first(&it, grp); obj != NULL; obj = lht_dom_next(&it)) { - pcb_coord_t x1, y1, x2, y2, th, r; + rnd_coord_t x1, y1, x2, y2, th, r; double sa, da; if (strncmp(obj->name, "line.", 5) == 0) { @@ -2218,7 +2218,7 @@ if (cfg_dest == CFR_invalid) return; if (pcb_conf_insert_tree_as(cfg_dest, sub) != 0) - pcb_message(PCB_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); + rnd_message(PCB_MSG_ERROR, "Failed to insert the config subtree '%s' found in %s\n", sub->name, pcb->hidlib.filename); else pcb_conf_update(NULL, -1); } @@ -2354,7 +2354,7 @@ free(realfn); if (doc == NULL) { - pcb_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); free(errmsg); return -1; } @@ -2402,7 +2402,7 @@ free(realfn); if (doc == NULL) { - pcb_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", filename, errmsg); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", Filename, errmsg); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Not a font lihata.\n"); + rnd_message(PCB_MSG_ERROR, "Not a font lihata.\n"); res = -1; } else @@ -2537,7 +2537,7 @@ if (doc == NULL) { if (!pcb_io_err_inhibit) - pcb_message(PCB_MSG_ERROR, "Error loading '%s': %s\n", name, errmsg); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Not a subcircuit lihata.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "io_lihata: invalid subc file version: %s (expected 3 or higher)\n", doc->root->name+20); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_lihata/write.c (revision 30903) @@ -264,18 +264,18 @@ if (wrver < 5) { if (pcb_attribute_get(&obj->Attributes, "intnoconn") != NULL) { warned = 1; - pcb_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); + rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v5 may ignore the intnoconn flag\n"); } } if (wrver < 3) { if (pcb_attribute_get(&obj->Attributes, "intconn") != NULL) { warned = 1; - pcb_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); + rnd_message(PCB_MSG_WARNING, "pcb-rnd versions only reading file older than lihata v3 may ignore the intconn flag\n"); } } if (warned) - pcb_message(PCB_MSG_WARNING, "^^^ in %s #%ld\n", pcb_obj_type_name(obj->type), obj->ID); + rnd_message(PCB_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" @@ -303,7 +303,7 @@ } -static lht_node_t *build_line(pcb_line_t *line, int local_id, pcb_coord_t dx, pcb_coord_t dy, int simple) +static lht_node_t *build_line(pcb_line_t *line, int local_id, rnd_coord_t dx, rnd_coord_t dy, int simple) { char buff[128]; lht_node_t *obj; @@ -386,7 +386,7 @@ return obj; } -static lht_node_t *build_arc(pcb_arc_t *arc, pcb_coord_t dx, pcb_coord_t dy) +static lht_node_t *build_arc(pcb_arc_t *arc, rnd_coord_t dx, rnd_coord_t dy) { char buff[128]; lht_node_t *obj; @@ -413,13 +413,13 @@ } /* attempt to convert a padstack to an old-style via for v1, v2 and v3 */ -static lht_node_t *build_pstk_pinvia(pcb_data_t *data, pcb_pstk_t *ps, pcb_bool is_via, pcb_coord_t dx, pcb_coord_t dy) +static lht_node_t *build_pstk_pinvia(pcb_data_t *data, pcb_pstk_t *ps, rnd_bool is_via, rnd_coord_t dx, rnd_coord_t dy) { char buff[128]; lht_node_t *obj; - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; - pcb_bool plated; + rnd_bool plated; pcb_flag_t flg; char *name = pcb_attribute_get(&ps->Attributes, "name"); @@ -450,12 +450,12 @@ } /* attempt to convert a padstack to an old-style pad for v1, v2 and v3 */ -static lht_node_t *build_pstk_pad(pcb_data_t *data, pcb_pstk_t *ps, pcb_coord_t dx, pcb_coord_t dy) +static lht_node_t *build_pstk_pad(pcb_data_t *data, pcb_pstk_t *ps, rnd_coord_t dx, rnd_coord_t dy) { char buff[128]; lht_node_t *obj; - pcb_coord_t x1, y1, x2, y2, thickness, clearance, mask; - pcb_bool square, nopaste; + rnd_coord_t x1, y1, x2, y2, thickness, clearance, mask; + rnd_bool square, nopaste; char *name = pcb_attribute_get(&ps->Attributes, "name"); pcb_flag_t flg; @@ -583,7 +583,7 @@ { char buff[128]; lht_node_t *obj, *lst; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; gdl_iterator_t it; int l, seen_refdes = 0; pcb_pstk_t *ps; @@ -809,7 +809,7 @@ nshapeo = build_text("ps_hshadow", ""); break; default: - pcb_message(PCB_MSG_ERROR, "Internal error: unimplemented pad stack shape %d\n", shape->shape); + rnd_message(PCB_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) - pcb_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(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"); } else - pcb_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(PCB_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) @@ -1457,8 +1457,8 @@ { /* for coords, preserve formatting as long as values match */ if (lhtpers_rule_find(io_lihata_out_coords, inmem_node) != NULL) { - pcb_coord_t v1, v2; - pcb_bool success1, success2; + rnd_coord_t v1, v2; + rnd_bool success1, success2; /* fprintf(stderr, "SMART d='%s' m='%s'\n", ondisk_value, inmem_node->data.text.value);*/ @@ -1497,7 +1497,7 @@ } } -static int io_lihata_write_pcb(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency, int ver) +static int io_lihata_write_pcb(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency, int ver) { int res; lht_doc_t *brd; @@ -1506,7 +1506,7 @@ brd = build_board(PCB); if (brd == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to build the board at that version - nothing is written\n"); + rnd_message(PCB_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); } - pcb_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); - pcb_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(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); } fflush(FP); if (inf != NULL) @@ -1587,32 +1587,32 @@ return res; } -int io_lihata_write_pcb_v1(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v1(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 1); } -int io_lihata_write_pcb_v2(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v2(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 2); } -int io_lihata_write_pcb_v3(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v3(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 3); } -int io_lihata_write_pcb_v4(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v4(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 4); } -int io_lihata_write_pcb_v5(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v5(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 5); } -int io_lihata_write_pcb_v6(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_lihata_write_pcb_v6(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { return io_lihata_write_pcb(ctx, FP, old_filename, new_filename, emergency, 6); } @@ -1626,7 +1626,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, Filename, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to open font file %s for write\n", Filename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Invalid lihata subc version to write: %d\n", wrver); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); + rnd_message(PCB_MSG_ERROR, "Only one subcircuit per footprint file can be written in lihata\n"); return -1; } return 0; @@ -1781,7 +1781,7 @@ return save; } -void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, pcb_bool apply) +void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply) { io_lihata_save_t *save = plg_ctx; Index: trunk/src_plugins/io_lihata/write.h =================================================================== --- trunk/src_plugins/io_lihata/write.h (revision 30902) +++ trunk/src_plugins/io_lihata/write.h (revision 30903) @@ -26,12 +26,12 @@ #include "plug_io.h" -int io_lihata_write_pcb_v1(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); -int io_lihata_write_pcb_v2(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); -int io_lihata_write_pcb_v3(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); -int io_lihata_write_pcb_v4(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); -int io_lihata_write_pcb_v5(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); -int io_lihata_write_pcb_v6(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_lihata_write_pcb_v1(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); +int io_lihata_write_pcb_v2(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); +int io_lihata_write_pcb_v3(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); +int io_lihata_write_pcb_v4(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); +int io_lihata_write_pcb_v5(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); +int io_lihata_write_pcb_v6(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency); int io_lihata_write_font(pcb_plug_io_t *ctx, pcb_font_t *font, const char *Filename); int io_lihata_write_buffer(pcb_plug_io_t *ctx, FILE *f, pcb_buffer_t *buff); int io_lihata_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs); @@ -39,5 +39,5 @@ int io_lihata_write_subcs_tail(pcb_plug_io_t *ctx, void **udata, FILE *f); void *io_lihata_save_as_subd_init(const pcb_plug_io_t *ctx, pcb_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); -void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, pcb_bool apply); +void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply); void io_lihata_save_as_fmt_changed(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/io_mentor_cell/font.c =================================================================== --- trunk/src_plugins/io_mentor_cell/font.c (revision 30902) +++ trunk/src_plugins/io_mentor_cell/font.c (revision 30903) @@ -48,7 +48,7 @@ - height is the total net height from bottom to top (depends on number of lines) - yoffs is the vertical offset because of the baseline (does not depend on number of lines) */ -static font_size_res_t font_text_nominal_size(int font_id, const char *txt, pcb_coord_t *width, pcb_coord_t *height, pcb_coord_t *yoffs) +static font_size_res_t font_text_nominal_size(int font_id, const char *txt, rnd_coord_t *width, rnd_coord_t *height, rnd_coord_t *yoffs) { const char *s; double lw = 0; /* current line width */ Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30902) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30903) @@ -85,8 +85,8 @@ node_t *subtree; unsigned valid:1; /* whether it's already parsed */ unsigned plated:1; - pcb_coord_t dia; /* Should be zero when defining w,h slot */ - pcb_coord_t w,h; /* Slot width and height */ + rnd_coord_t dia; /* Should be zero when defining w,h slot */ + rnd_coord_t w,h; /* Slot width and height */ } hkp_hole_t; typedef struct { @@ -105,7 +105,7 @@ } hkp_clearance_type_t; typedef struct { - pcb_coord_t clearance[PCB_MAX_LAYER][HKP_CLR_max]; + rnd_coord_t clearance[PCB_MAX_LAYER][HKP_CLR_max]; } hkp_netclass_t; typedef struct { @@ -130,7 +130,7 @@ static void set_pstk_clearance(hkp_ctx_t *ctx, const hkp_netclass_t *nc, pcb_pstk_t *ps, node_t *errnd); /*** read_net.c ***/ -static pcb_coord_t net_get_clearance(hkp_ctx_t *ctx, pcb_layer_t *ly, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode); +static rnd_coord_t net_get_clearance(hkp_ctx_t *ctx, pcb_layer_t *ly, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode); /*** local ***/ static pcb_layer_t *parse_layer(hkp_ctx_t *ctx, pcb_subc_t *subc, const char *ln, int user, node_t *err_node); @@ -153,7 +153,7 @@ pcb_safe_append_vprintf(&str, 0, fmt, ap); va_end(ap); - pcb_message(PCB_MSG_ERROR, "%s", str.array); + rnd_message(PCB_MSG_ERROR, "%s", str.array); gds_uninit(&str); return -1; @@ -173,10 +173,10 @@ } /* parse a string it into a coord - modifies s; returns 0 on success */ -static int parse_coord(hkp_ctx_t *ctx, char *s, pcb_coord_t *crd) +static int parse_coord(hkp_ctx_t *ctx, char *s, rnd_coord_t *crd) { char *end; - pcb_bool suc; + rnd_bool suc; end = strchr(s, ','); if (end != NULL) @@ -186,15 +186,15 @@ return !suc; } -static int parse_x(hkp_ctx_t *ctx, char *s, pcb_coord_t *crd) +static int parse_x(hkp_ctx_t *ctx, char *s, rnd_coord_t *crd) { return parse_coord(ctx, s, crd); } -static int parse_y(hkp_ctx_t *ctx, char *s, pcb_coord_t *crd) +static int parse_y(hkp_ctx_t *ctx, char *s, rnd_coord_t *crd) { - pcb_coord_t tmp; + rnd_coord_t tmp; if (parse_coord(ctx, s, &tmp) != 0) return -1; *crd = -tmp; @@ -203,11 +203,11 @@ /* split s and parse it into (x,y) - modifies s */ -static int parse_xy(hkp_ctx_t *ctx, char *s, pcb_coord_t *x, pcb_coord_t *y, int xform) +static int parse_xy(hkp_ctx_t *ctx, char *s, rnd_coord_t *x, rnd_coord_t *y, int xform) { char *sy; - pcb_coord_t xx, yy; - pcb_bool suc1, suc2; + rnd_coord_t xx, yy; + rnd_bool suc1, suc2; if (s == NULL) return -1; @@ -232,11 +232,11 @@ } /* split s and parse it into (x,y,r) - modifies s */ -static int parse_xyr(hkp_ctx_t *ctx, char *s, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t *r, int xform) +static int parse_xyr(hkp_ctx_t *ctx, char *s, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t *r, int xform) { char *sy, *sr; - pcb_coord_t xx, yy, rr; - pcb_bool suc1, suc2, suc3; + rnd_coord_t xx, yy, rr; + rnd_bool suc1, suc2, suc3; if (s == NULL) return -1; @@ -327,7 +327,7 @@ static int parse_dwg_path_polyline(hkp_ctx_t *ctx, pcb_subc_t *subc, pcb_layer_t *ly, const hkp_netclass_t *nc, node_t *pp, int is_shape) { node_t *tmp; - pcb_coord_t th = 1, px, py, x, y; + rnd_coord_t th = 1, px, py, x, y; int n, filled = 0; DWG_REQ_LY(pp); @@ -362,7 +362,7 @@ pcb_poly_init_clip(ctx->pcb->Data, ly, poly); } else { /* "polyline" = a bunch of line objects */ - pcb_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; + rnd_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; if (parse_xy(ctx, tmp->argv[1], &px, &py, 1) != 0) return hkp_error(pp, "Failed to parse polyline start point (%s), can't place polygon\n", tmp->argv[1]); for(n = 2; n < tmp->argc; n++) { @@ -377,13 +377,13 @@ return 0; } -static void convert_arc(pcb_coord_t sx, pcb_coord_t sy, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t ex, pcb_coord_t ey, pcb_coord_t *r, double *sa, double *da) +static void convert_arc(rnd_coord_t sx, rnd_coord_t sy, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t ex, rnd_coord_t ey, rnd_coord_t *r, double *sa, double *da) { /* In pcb-rnd, start angle 0 is towards the left of the screen (-x direction)*/ /* da > 0 is counterclockwise */ /* In HKP format, r<0 means counterclockwise, r>0 means clockwise */ double ea; - pcb_coord_t srx, sry, erx, ery; /* relative x;y from the center for start and end */ + rnd_coord_t srx, sry, erx, ery; /* relative x;y from the center for start and end */ srx = -(sx - cx); sry = sy - cy; /* Since angle = 0 is towards -x, change sign to x part */ erx = -(ex - cx); ery = ey - cy; /* Since angle = 0 is towards -x, change sign to x part */ @@ -413,10 +413,10 @@ static int parse_dwg_path_polyarc(hkp_ctx_t *ctx, pcb_subc_t *subc, pcb_layer_t *ly, const hkp_netclass_t *nc, node_t *pp, int is_shape) { node_t *tmp; - pcb_coord_t th = 1, r, ex, ey, dummy, x, y, px, py; + rnd_coord_t th = 1, r, ex, ey, dummy, x, y, px, py; double sa, da; int n, filled = 0; - pcb_coord_t cl; + rnd_coord_t cl; DWG_REQ_LY(pp); @@ -475,7 +475,7 @@ static int parse_dwg_rect(hkp_ctx_t *ctx, pcb_subc_t *subc, pcb_layer_t *ly, const hkp_netclass_t *nc, node_t *rp, int is_shape) { node_t *tmp; - pcb_coord_t th = 1, x1, y1, x2, y2; + rnd_coord_t th = 1, x1, y1, x2, y2; int filled = 0; DWG_REQ_LY(rp); @@ -497,12 +497,12 @@ if (parse_xy(ctx, tmp->argv[2], &x2, &y2, 1) != 0) return hkp_error(tmp, "Failed to parse rect end point (%s), can't place rectangle\n", tmp->argv[2]); if (filled) { - pcb_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2POLY, tmp) * 2; + rnd_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2POLY, tmp) * 2; TODO("when to generate a rounded corner?"); pcb_poly_new_from_rectangle(ly, x1, y1, x2, y2, cl, DEFAULT_POLY_FLAG); } else { - pcb_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; + rnd_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; pcb_line_new(ly, x1, y1, x2, y1, th, cl, DEFAULT_OBJ_FLAG); pcb_line_new(ly, x2, y1, x2, y2, th, cl, DEFAULT_OBJ_FLAG); pcb_line_new(ly, x2, y2, x1, y2, th, cl, DEFAULT_OBJ_FLAG); @@ -514,8 +514,8 @@ static void parse_dwg_text(hkp_ctx_t *ctx, pcb_subc_t *subc, pcb_layer_t *ly, const hkp_netclass_t *nc, node_t *nt, int omit_on_silk, pcb_flag_values_t flg) { node_t *attr, *tmp; - pcb_coord_t tx, ty, h, thickness = 0, width = 0, height = 0, ymin = 0; - pcb_coord_t x1 = 0, x2 = 0, y1 = 0, y2 = 0; + rnd_coord_t tx, ty, h, thickness = 0, width = 0, height = 0, ymin = 0; + rnd_coord_t x1 = 0, x2 = 0, y1 = 0, y2 = 0; double rot = 0; unsigned long mirrored = 0; @@ -634,10 +634,10 @@ tmp = find_nth(attr->first_child, "VERT_JUST", 0); if (tmp != NULL) { - pcb_coord_t ymax = height+ymin; + rnd_coord_t ymax = height+ymin; TODO( "Consider rotation, using:" - " pcb_rotate(pcb_coord_t * x, pcb_coord_t * y, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina)" + " pcb_rotate(rnd_coord_t * x, rnd_coord_t * y, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina)" "Maybe:" " double sina = sin(-(double)rot / PCB_RAD_TO_DEG), cosa = cos(-(double)rot / PCB_RAD_TO_DEG);"); if (strcmp(tmp->argv[1], "Top") == 0) { @@ -660,7 +660,7 @@ { TODO("Remove this block after checking text bounding box calculations"); TODO("Use an UI layer for this. UI layer API in src/layer_ui.h"); - pcb_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; + rnd_coord_t cl = net_get_clearance(ctx, ly, nc, HKP_CLR_POLY2TRACE, tmp) * 2; pcb_line_new(ly, x1, y1, x2, y1, thickness, cl, DEFAULT_OBJ_FLAG); pcb_line_new(ly, x2, y1, x2, y2, thickness, cl, DEFAULT_OBJ_FLAG); pcb_line_new(ly, x2, y2, x1, y2, thickness, cl, DEFAULT_OBJ_FLAG); @@ -684,7 +684,7 @@ static void parse_dgw_via(hkp_ctx_t *ctx, const hkp_netclass_t *nc, node_t *nv) { - pcb_coord_t vx, vy; + rnd_coord_t vx, vy; node_t *tmp; hkp_pstk_t *hps; pcb_cardinal_t pid; @@ -1042,7 +1042,7 @@ { pcb_subc_t *subc; node_t *n; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; double rot = 0; int on_bottom = 0, seen_oxy = 0; const hkp_netclass_t *nc = NULL; @@ -1408,7 +1408,7 @@ flay = pcb_fopen(&pcb->hidlib, fn, "r"); if (flay == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open layout hkp '%s' for read\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_mentor_cell/read_net.c (revision 30903) @@ -28,7 +28,7 @@ */ -static pcb_coord_t net_get_clearance_(hkp_ctx_t *ctx, pcb_layer_id_t lid, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) +static rnd_coord_t net_get_clearance_(hkp_ctx_t *ctx, pcb_layer_id_t lid, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) { if ((lid < 0) || (lid >= PCB_MAX_LAYER)) { hkp_error(errnode, "failed to determine clearance, falling back to default value\n"); @@ -37,7 +37,7 @@ return ctx->nc_dflt.clearance[lid][type]; } -static pcb_coord_t net_get_clearance(hkp_ctx_t *ctx, pcb_layer_t *ly, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) +static rnd_coord_t net_get_clearance(hkp_ctx_t *ctx, pcb_layer_t *ly, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) { pcb_layer_id_t lid; @@ -60,7 +60,7 @@ fnc = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnc == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open netclass hkp '%s' for read\n", fn); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "netclass hkp '%s' does not contain any NET_CLASS_SCHEME/CLEARANCE_RULE_SET section\n", fn); + rnd_message(PCB_MSG_ERROR, "netclass hkp '%s' does not contain any NET_CLASS_SCHEME/CLEARANCE_RULE_SET section\n", fn); return -1; } @@ -99,7 +99,7 @@ for(ns = ncrs->first_child; ns != NULL; ns = ns->next) { pcb_layergrp_id_t gid; pcb_layergrp_t *grp; - pcb_coord_t val; + rnd_coord_t val; int i; if (strcmp(ns->argv[0], "SUBRULE") != 0) continue; @@ -144,7 +144,7 @@ fnet = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fnet == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open netprops hkp '%s' for read\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30903) @@ -27,7 +27,7 @@ * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") */ -static int parse_dia(hkp_ctx_t *ctx, node_t *roundn, pcb_coord_t *dia) +static int parse_dia(hkp_ctx_t *ctx, node_t *roundn, rnd_coord_t *dia) { node_t *hr = roundn->first_child; if ((hr == NULL) || (strcmp(hr->argv[0], "DIAMETER") != 0)) @@ -104,7 +104,7 @@ { const pcb_unit_t *old_unit; node_t *n, *on, *tmp; - pcb_coord_t ox = 0, oy = 0; + rnd_coord_t ox = 0, oy = 0; hkp_shape_t *s = htsp_get(&ctx->shapes, name); int has_shape = 0; @@ -125,7 +125,7 @@ for(n = s->subtree->first_child; n != NULL; n = n->next) { if (strcmp(n->argv[0], "ROUND") == 0) { - pcb_coord_t dia; + rnd_coord_t dia; SHAPE_CHECK_DUP; if (parse_dia(ctx, n, &dia) != 0) goto error; @@ -135,7 +135,7 @@ s->shp.data.circ.y = oy; } else if ((strcmp(n->argv[0], "RECTANGLE") == 0) || (strcmp(n->argv[0], "SQUARE") == 0)) { - pcb_coord_t w, h; + rnd_coord_t w, h; SHAPE_CHECK_DUP; tmp = find_nth(n->first_child, "WIDTH", 0); if (parse_coord(ctx, tmp->argv[1], &w) != 0) { @@ -160,7 +160,7 @@ s->shp.data.poly.x[3] = ox + w/2; s->shp.data.poly.y[3] = oy - h/2; } else if (strcmp(n->argv[0], "OBLONG") == 0) { - pcb_coord_t w, h; + rnd_coord_t w, h; SHAPE_CHECK_DUP; tmp = find_nth(n->first_child, "WIDTH", 0); if (parse_coord(ctx, tmp->argv[1], &w) != 0) { @@ -208,7 +208,7 @@ {NULL, 0} }; -static void slot_shape(pcb_pstk_shape_t *shape, pcb_coord_t sx, pcb_coord_t sy) +static void slot_shape(pcb_pstk_shape_t *shape, rnd_coord_t sx, rnd_coord_t sy) { shape->shape = PCB_PSSH_LINE; if (sx > sy) { /* horizontal */ @@ -230,7 +230,7 @@ static hkp_pstk_t *parse_pstk(hkp_ctx_t *ctx, const char *ps) { const pcb_unit_t *old_unit; - pcb_coord_t ox = 0, oy = 0; + rnd_coord_t ox = 0, oy = 0; node_t *n, *hn, *on, *tn; hkp_pstk_t *p = htsp_get(&ctx->pstks, ps); int top_only = 0; @@ -346,7 +346,7 @@ static void parse_pin(hkp_ctx_t *ctx, pcb_subc_t *subc, const hkp_netclass_t *nc, node_t *nd, int on_bottom) { node_t *tmp; - pcb_coord_t px, py; + rnd_coord_t px, py; hkp_pstk_t *hpstk; pcb_cardinal_t pid; pcb_pstk_t *ps; @@ -397,7 +397,7 @@ fpstk = pcb_fopen(&ctx->pcb->hidlib, fn, "r"); if (fpstk == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open padstack hkp '%s' for read\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_pcb/file.c (revision 30903) @@ -349,9 +349,9 @@ /* write information about vias */ padstacklist_foreach(&Data->padstack, &it, ps) { - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask; pcb_pstk_compshape_t cshape; - pcb_bool plated; + rnd_bool plated; char *name = pcb_attribute_get(&ps->Attributes, "name"); if (!pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { @@ -426,7 +426,7 @@ gdl_iterator_t it; int l; - pcb_coord_t ox, oy, rx = 0, ry = 0; + rnd_coord_t ox, oy, rx = 0, ry = 0; int rdir = 0, rscale = 100, on_bot = 0; pcb_text_t *trefdes; pcb_pstk_t *ps; @@ -477,9 +477,9 @@ WriteAttributeList(FP, &sc->Attributes, "\t", attr_inhibit); padstacklist_foreach(&sc->data->padstack, &it, ps) { - pcb_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; + rnd_coord_t x, y, drill_dia, pad_dia, clearance, mask, x1, y1, x2, y2, thickness; pcb_pstk_compshape_t cshape; - pcb_bool plated, square, nopaste; + rnd_bool plated, square, nopaste; unsigned char ic = ps->intconn; if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { pcb_fprintf(FP, "\tPin[%[0] %[0] %[0] %[0] %[0] %[0] ", x - ox, y - oy, pad_dia, clearance*2, mask, drill_dia); @@ -691,7 +691,7 @@ ts = pcb_layer_get_top_silk(); if ((bs < 0) || (ts < 0)) { - pcb_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(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"); return; } @@ -730,7 +730,7 @@ } } -int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, pcb_bool emergency) +int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE * FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { pcb_attribute_put(&PCB->Attributes, "PCB::loader", ctx->description); @@ -904,7 +904,7 @@ return -1; } -int pcb_layer_improvise(pcb_board_t *pcb, pcb_bool setup) +int pcb_layer_improvise(pcb_board_t *pcb, rnd_bool setup) { pcb_layergrp_id_t gid; pcb_layer_id_t lid, silk = -1; @@ -1017,12 +1017,12 @@ static int yysubc_bottom; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *subc, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, - char *Value, pcb_coord_t TextX, pcb_coord_t TextY, unsigned int Direction, - int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName) + char *Value, rnd_coord_t TextX, rnd_coord_t TextY, unsigned int Direction, + int TextScale, pcb_flag_t TextFlags, rnd_bool uniqueName) { pcb_subc_t *sc = pcb_subc_new(); pcb_text_t *txt; @@ -1083,20 +1083,20 @@ return pcb_subc_get_layer(subc, PCB_LYT_SILK | side, /*PCB_LYC_AUTO*/0, pcb_true, name, pcb_false); } -pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness) +pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness) { pcb_layer_t *ly = subc_silk_layer(subc); return pcb_line_new(ly, X1, Y1, X2, Y2, Thickness, 0, pcb_no_flags()); } -pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, - pcb_coord_t Width, pcb_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, pcb_coord_t Thickness) +pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, + rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness) { pcb_layer_t *ly = subc_silk_layer(subc); return pcb_arc_new(ly, X, Y, Width, Height, angle, delta, Thickness, 0, pcb_no_flags(), pcb_true); } -pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags) +pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags) { pcb_pstk_t *p; p = pcb_old_via_new(subc->data, -1, X, Y, Thickness, Clearance, Mask, DrillingHole, Name, Flags); @@ -1110,7 +1110,7 @@ return p; } -pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags) +pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags) { pcb_pstk_t *p; @@ -1158,13 +1158,13 @@ if (PCB->Data->Layer[n].meta.real.grp == -1) { pcb_layergrp_t *grp = pcb_get_grp_new_intern(pcb, -1); - pcb_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(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); if (grp != NULL) { pcb_layergrp_id_t gid = grp - PCB->LayerGroups.grp; pcb_layer_move_to_group(pcb, n, gid); } else - pcb_message(PCB_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); + rnd_message(PCB_MSG_ERROR, "Failed to add a new layer group - the board in memory IS BROKEN.\n"); } } Index: trunk/src_plugins/io_pcb/file.h =================================================================== --- trunk/src_plugins/io_pcb/file.h (revision 30902) +++ trunk/src_plugins/io_pcb/file.h (revision 30903) @@ -37,7 +37,7 @@ /* This is used by the lexer/parser */ typedef struct { int ival; - pcb_coord_t bval; + rnd_coord_t bval; double dval; char has_units; } PLMeasure; @@ -56,7 +56,7 @@ extern pcb_plug_io_t *pcb_preferred_io_pcb, *pcb_nanometer_io_pcb, *pcb_centimil_io_pcb; -int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, pcb_bool emergency); +int io_pcb_WritePCB(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency); int io_pcb_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs); int io_pcb_write_subcs_subc(pcb_plug_io_t *ctx, void **udata, FILE *f, pcb_subc_t *subc); int io_pcb_write_subcs_tail(pcb_plug_io_t *ctx, void **udata, FILE *f); @@ -79,14 +79,14 @@ int PCBFileVersionNeeded(void); /* Improvise layers and groups for a partial input file that lacks layer groups (and maybe even some layers) */ -int pcb_layer_improvise(pcb_board_t *pcb, pcb_bool setup); +int pcb_layer_improvise(pcb_board_t *pcb, rnd_bool setup); -pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *Element, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, pcb_coord_t TextX, pcb_coord_t TextY, unsigned int Direction, int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName); +pcb_subc_t *io_pcb_element_new(pcb_data_t *Data, pcb_subc_t *Element, pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, rnd_coord_t TextX, rnd_coord_t TextY, unsigned int Direction, int TextScale, pcb_flag_t TextFlags, rnd_bool uniqueName); void io_pcb_element_fin(pcb_data_t *Data); -pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness); -pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Width, pcb_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, pcb_coord_t Thickness); -pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags); -pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags); +pcb_line_t *io_pcb_element_line_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness); +pcb_arc_t *io_pcb_element_arc_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Width, rnd_coord_t Height, pcb_angle_t angle, pcb_angle_t delta, rnd_coord_t Thickness); +pcb_pstk_t *io_pcb_element_pin_new(pcb_subc_t *subc, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, const char *Number, pcb_flag_t Flags); +pcb_pstk_t *io_pcb_element_pad_new(pcb_subc_t *subc, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, const char *Name, const char *Number, pcb_flag_t Flags); void io_pcb_preproc_board(pcb_board_t *pcb); void io_pcb_postproc_board(pcb_board_t *pcb); Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 30902) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 30903) @@ -942,13 +942,13 @@ pcb_board_t * yyPCB; /* used by parser */ pcb_data_t * yyData; pcb_subc_t *yysubc; -pcb_coord_t yysubc_ox, yysubc_oy; +rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; -pcb_bool yyFontReset; +rnd_bool yyFontReset; int yyElemFixLayers = 0; static int parse_number (void); @@ -2601,7 +2601,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static pcb_bool firsttime = pcb_true; + static rnd_bool firsttime = pcb_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -2830,20 +2830,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - pcb_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(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); PCB->Data->loader = pcb_centimil_io_pcb; break; case PCB_USTY_NANOMETER: - pcb_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(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); PCB->Data->loader = pcb_nanometer_io_pcb; break; case PCB_USTY_UNITS: case PCB_USTY_UNITS | PCB_USTY_NANOMETER: - pcb_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(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); PCB->Data->loader = pcb_preferred_io_pcb; break; default: - pcb_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(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); PCB->Data->loader = pcb_preferred_io_pcb; } } @@ -2873,7 +2873,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 30903) @@ -73,13 +73,13 @@ pcb_board_t * yyPCB; /* used by parser */ pcb_data_t * yyData; pcb_subc_t *yysubc; -pcb_coord_t yysubc_ox, yysubc_oy; +rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; -pcb_bool yyFontReset; +rnd_bool yyFontReset; int yyElemFixLayers = 0; static int parse_number (void); @@ -218,7 +218,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static pcb_bool firsttime = pcb_true; + static rnd_bool firsttime = pcb_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -447,20 +447,20 @@ /* Loaded a file that did not have any information about preferred format */ switch((int)pcb_io_pcb_usty_seen) { case PCB_USTY_CMIL: - pcb_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(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); PCB->Data->loader = pcb_centimil_io_pcb; break; case PCB_USTY_NANOMETER: - pcb_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(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); PCB->Data->loader = pcb_nanometer_io_pcb; break; case PCB_USTY_UNITS: case PCB_USTY_UNITS | PCB_USTY_NANOMETER: - pcb_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(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); PCB->Data->loader = pcb_preferred_io_pcb; break; default: - pcb_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(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); PCB->Data->loader = pcb_preferred_io_pcb; } } @@ -490,7 +490,7 @@ r = Parse(NULL, fcmd, NULL, Filename); if (r == 0) { #ifdef DEBUG - pcb_message(PCB_MSG_DEBUG, "Found %s in %s\n", Filename, conf_core.rc.font_command); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 30903) @@ -141,7 +141,7 @@ static pcb_symbol_t *Symbol; static int pin_num; static pcb_net_t *currnet; -static pcb_bool LayerFlag[PCB_MAX_LAYER + 2]; +static rnd_bool LayerFlag[PCB_MAX_LAYER + 2]; static int old_fmt; /* 1 if we are reading a PCB(), 0 if PCB[] */ static unsigned char yy_intconn; @@ -149,9 +149,9 @@ extern pcb_board_t * yyPCB; extern pcb_data_t * yyData; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; extern pcb_font_t * yyFont; -extern pcb_bool yyFontReset; +extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; @@ -167,7 +167,7 @@ int yylex(); static int check_file_version (int); -static void do_measure (PLMeasure *m, pcb_coord_t i, double d, int u); +static void do_measure (PLMeasure *m, rnd_coord_t i, double d, int u); #define M(r,f,d) do_measure (&(r), f, d, 1) /* Macros for interpreting what "measure" means - integer value only, @@ -177,10 +177,10 @@ #define NU(m) new_units (m) static int integer_value (PLMeasure m); -static pcb_coord_t old_units (PLMeasure m); -static pcb_coord_t new_units (PLMeasure m); +static rnd_coord_t old_units (PLMeasure m); +static rnd_coord_t new_units (PLMeasure m); static pcb_flag_t pcb_flag_old(unsigned int flags); -static void load_meta_coord(const char *path, pcb_coord_t crd); +static void load_meta_coord(const char *path, rnd_coord_t crd); static void load_meta_float(const char *path, double val); #define YYDEBUG 1 @@ -1821,7 +1821,7 @@ if (!yyPCB) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - pcb_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - pcb_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -1921,7 +1921,7 @@ if (!yyData || !yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -2143,7 +2143,7 @@ { if (pcb_route_string_parse((yyvsp[-1].string), &yyPCB->RouteStyle, "mil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_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")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free((yyvsp[-1].string)); @@ -2230,7 +2230,7 @@ case 70: #line 567 "parse_y.y" /* yacc.c:1652 */ { - pcb_coord_t hole = (OU((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE); + rnd_coord_t hole = (OU((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ if (OU((yyvsp[-3].measure)) - hole < PCB_MIN_PINORVIACOPPER && @@ -2429,7 +2429,7 @@ #line 771 "parse_y.y" /* yacc.c:1652 */ { pcb_cardinal_t contour, contour_start, contour_end; - pcb_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -2444,7 +2444,7 @@ if (bad_contour_found) { - pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -2751,7 +2751,7 @@ case 157: #line 1085 "parse_y.y" /* yacc.c:1652 */ { - pcb_coord_t hole = OU ((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE; + rnd_coord_t hole = OU ((yyvsp[-3].measure)) * PCB_DEFAULT_DRILLINGHOLE; char p_number[8]; /* make sure that there's enough copper left */ @@ -2932,7 +2932,7 @@ char *old_val, *key = (yyvsp[-2].string), *val = (yyvsp[-1].string) ? (yyvsp[-1].string) : (char *)""; old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) - pcb_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else pcb_attribute_put(attr_list, key, val); free(key); @@ -3265,7 +3265,7 @@ */ int yyerror(const char * s) { - pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(PCB_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 ) { - pcb_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(PCB_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" @@ -3294,7 +3294,7 @@ } static void -do_measure (PLMeasure *m, pcb_coord_t i, double d, int u) +do_measure (PLMeasure *m, rnd_coord_t i, double d, int u) { m->ival = i; m->bval = pcb_round (d); @@ -3310,7 +3310,7 @@ return m.ival; } -static pcb_coord_t +static rnd_coord_t old_units (PLMeasure m) { if (m.has_units) @@ -3320,7 +3320,7 @@ return pcb_round (PCB_MIL_TO_COORD (m.ival)); } -static pcb_coord_t +static rnd_coord_t new_units (PLMeasure m) { if (m.has_units) @@ -3350,7 +3350,7 @@ } /* load a board metadata into conf_core */ -static void load_meta_coord(const char *path, pcb_coord_t crd) +static void load_meta_coord(const char *path, rnd_coord_t crd) { char tmp[128]; pcb_sprintf(tmp, "%$mm", crd); Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 30902) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 30903) @@ -64,7 +64,7 @@ static pcb_symbol_t *Symbol; static int pin_num; static pcb_net_t *currnet; -static pcb_bool LayerFlag[PCB_MAX_LAYER + 2]; +static rnd_bool LayerFlag[PCB_MAX_LAYER + 2]; static int old_fmt; /* 1 if we are reading a PCB(), 0 if PCB[] */ static unsigned char yy_intconn; @@ -72,9 +72,9 @@ extern pcb_board_t * yyPCB; extern pcb_data_t * yyData; extern pcb_subc_t *yysubc; -extern pcb_coord_t yysubc_ox, yysubc_oy; +extern rnd_coord_t yysubc_ox, yysubc_oy; extern pcb_font_t * yyFont; -extern pcb_bool yyFontReset; +extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; @@ -90,7 +90,7 @@ int yylex(); static int check_file_version (int); -static void do_measure (PLMeasure *m, pcb_coord_t i, double d, int u); +static void do_measure (PLMeasure *m, rnd_coord_t i, double d, int u); #define M(r,f,d) do_measure (&(r), f, d, 1) /* Macros for interpreting what "measure" means - integer value only, @@ -100,10 +100,10 @@ #define NU(m) new_units (m) static int integer_value (PLMeasure m); -static pcb_coord_t old_units (PLMeasure m); -static pcb_coord_t new_units (PLMeasure m); +static rnd_coord_t old_units (PLMeasure m); +static rnd_coord_t new_units (PLMeasure m); static pcb_flag_t pcb_flag_old(unsigned int flags); -static void load_meta_coord(const char *path, pcb_coord_t crd); +static void load_meta_coord(const char *path, rnd_coord_t crd); static void load_meta_float(const char *path, double val); #define YYDEBUG 1 @@ -160,7 +160,7 @@ if (!yyPCB) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } - pcb_message(PCB_MSG_ERROR, "missing layer-group string: invalid input file, had to improvise, the layer stack is most probably broken\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "illegal layer-group string\n"); + rnd_message(PCB_MSG_ERROR, "illegal layer-group string\n"); YYABORT; } else { if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { - pcb_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); + rnd_message(PCB_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } } @@ -259,7 +259,7 @@ if (!yyData || !yyFont) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "illegal fileformat\n"); + rnd_message(PCB_MSG_ERROR, "illegal fileformat\n"); YYABORT; } if (yyFontReset) { @@ -469,7 +469,7 @@ { if (pcb_route_string_parse($3, &yyPCB->RouteStyle, "mil")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_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")) { - pcb_message(PCB_MSG_ERROR, "illegal route-style string\n"); + rnd_message(PCB_MSG_ERROR, "illegal route-style string\n"); YYABORT; } free($3); @@ -565,7 +565,7 @@ /* old format: x, y, thickness, name, flags */ : T_VIA '(' measure measure measure STRING INTEGER ')' { - pcb_coord_t hole = (OU($5) * PCB_DEFAULT_DRILLINGHOLE); + rnd_coord_t hole = (OU($5) * PCB_DEFAULT_DRILLINGHOLE); /* make sure that there's enough copper left */ if (OU($5) - hole < PCB_MIN_PINORVIACOPPER && @@ -770,7 +770,7 @@ polygonholes ')' { pcb_cardinal_t contour, contour_start, contour_end; - pcb_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -785,7 +785,7 @@ if (bad_contour_found) { - pcb_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" + rnd_message(PCB_MSG_WARNING, "WARNING parsing file '%s'\n" " line: %i\n" " description: 'ignored polygon (< 3 points in a contour)'\n", yyfilename, pcb_lineno); @@ -1083,7 +1083,7 @@ */ : T_PIN '(' measure measure measure STRING INTEGER ')' { - pcb_coord_t hole = OU ($5) * PCB_DEFAULT_DRILLINGHOLE; + rnd_coord_t hole = OU ($5) * PCB_DEFAULT_DRILLINGHOLE; char p_number[8]; /* make sure that there's enough copper left */ @@ -1323,7 +1323,7 @@ char *old_val, *key = $3, *val = $4 ? $4 : (char *)""; old_val = pcb_attribute_get(attr_list, key); if (old_val != NULL) - pcb_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); + rnd_message(PCB_MSG_ERROR, "mutliple values for attribute %s: '%s' and '%s' - ignoring '%s'\n", key, old_val, val, val); else pcb_attribute_put(attr_list, key, val); free(key); @@ -1361,7 +1361,7 @@ */ int yyerror(const char * s) { - pcb_message(PCB_MSG_ERROR, "ERROR parsing file '%s'\n" + rnd_message(PCB_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 ) { - pcb_message(PCB_MSG_ERROR, "ERROR: The file you are attempting to load is in a format\n" + rnd_message(PCB_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" @@ -1390,7 +1390,7 @@ } static void -do_measure (PLMeasure *m, pcb_coord_t i, double d, int u) +do_measure (PLMeasure *m, rnd_coord_t i, double d, int u) { m->ival = i; m->bval = pcb_round (d); @@ -1406,7 +1406,7 @@ return m.ival; } -static pcb_coord_t +static rnd_coord_t old_units (PLMeasure m) { if (m.has_units) @@ -1416,7 +1416,7 @@ return pcb_round (PCB_MIL_TO_COORD (m.ival)); } -static pcb_coord_t +static rnd_coord_t new_units (PLMeasure m) { if (m.has_units) @@ -1446,7 +1446,7 @@ } /* load a board metadata into conf_core */ -static void load_meta_coord(const char *path, pcb_coord_t crd) +static void load_meta_coord(const char *path, rnd_coord_t crd) { char tmp[128]; pcb_sprintf(tmp, "%$mm", crd); Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 30902) +++ trunk/src_plugins/io_tedax/footprint.c (revision 30903) @@ -51,9 +51,9 @@ #include "../src_plugins/lib_compat_help/subc_help.h" #include "../src_plugins/lib_compat_help/pstk_help.h" -static void print_sqpad_coords(FILE *f, pcb_any_line_t *Pad, pcb_coord_t cx, pcb_coord_t cy) +static void print_sqpad_coords(FILE *f, pcb_any_line_t *Pad, rnd_coord_t cx, rnd_coord_t cy) { - pcb_coord_t x[4], y[4]; + rnd_coord_t x[4], y[4]; pcb_sqline_to_rect((pcb_line_t *)Pad, x, y); pcb_fprintf(f, " %.9mm %.9mm", x[0] - cx, y[0] - cy); @@ -109,7 +109,7 @@ else if (lyt & PCB_LYT_PASTE) ltyp = "paste"; \ else { invalid; } -int tedax_pstk_fsave(pcb_pstk_t *padstack, pcb_coord_t ox, pcb_coord_t oy, FILE *f) +int tedax_pstk_fsave(pcb_pstk_t *padstack, rnd_coord_t ox, rnd_coord_t oy, FILE *f) { pcb_pstk_proto_t *proto = pcb_pstk_get_proto(padstack); pcb_pstk_tshape_t *tshp; @@ -117,7 +117,7 @@ int n, i; if (proto == NULL) { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); + rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc padstack with invalid prototype\n"); return 1; } if (proto->hdia > 0) @@ -126,7 +126,7 @@ tshp = pcb_pstk_get_tshape(padstack); for(n = 0, shp = tshp->shape; n < tshp->len; n++,shp++) { const char *lloc, *ltyp; - pcb_coord_t clr; + rnd_coord_t clr; get_layer_props(shp->layer_mask, lloc, ltyp, continue); clr = padstack->Clearance > 0 ? padstack->Clearance : shp->clearance; @@ -175,7 +175,7 @@ { htsp_t terms; htsp_entry_t *e; - pcb_coord_t ox = 0, oy = 0; + rnd_coord_t ox = 0, oy = 0; int l; htsp_init(&terms, strhash, strkeyeq); @@ -220,12 +220,12 @@ { int go; long numpt = 0; - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_poly_it_t it; pcb_poly_iterate_polyarea(polygon->Clipped, &it); if (pcb_poly_contour(&it) == NULL) { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no clipped contour\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); + rnd_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon holes\n"); if (numpt == 0) { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint export: omitting subc polygon with no points\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_fp_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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') { \ - pcb_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(PCB_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -367,7 +367,7 @@ char *end; \ dst = strtod(src, &end); \ if (*end != '\0') { \ - pcb_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(PCB_MSG_ERROR, msg, src); \ return -1; \ } \ } while(0) @@ -374,10 +374,10 @@ #define load_val(dst, src, msg) \ do { \ - pcb_bool succ; \ + rnd_bool succ; \ dst = pcb_get_value_ex(src, NULL, NULL, NULL, "mm", &succ); \ if (!succ) { \ - pcb_message(PCB_MSG_ERROR, msg, src); \ + rnd_message(PCB_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) { \ - pcb_message(PCB_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ + rnd_message(PCB_MSG_ERROR, "undefined terminal %s - skipping footprint\n", src); \ return -1; \ } \ pcb_attribute_put(&obj->Attributes, "term", term->name); \ @@ -404,13 +404,13 @@ else if (strcmp(src, "primary") == 0) \ dst = 0; \ else { \ - pcb_message(PCB_MSG_ERROR, msg, lloc); \ + rnd_message(PCB_MSG_ERROR, msg, lloc); \ return -1; \ } \ } while(0) -static int load_poly(pcb_coord_t *px, pcb_coord_t *py, int maxpt, int argc, char *argv[]) +static int load_poly(rnd_coord_t *px, rnd_coord_t *py, int maxpt, int argc, char *argv[]) { int max, n; load_int(max, argv[0], "invalid number of points '%s' in poly, skipping footprint\n"); @@ -417,7 +417,7 @@ argc--; argv++; if (max*2 != argc) { - pcb_message(PCB_MSG_ERROR, "invalid number of polygon points: expected %d coords got %d skipping footprint\n", max*2, argc); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer type %s\n", ltyp); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); + rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: invalid layer location %s\n", lloc); return NULL; } @@ -478,7 +478,7 @@ htip_entry_t *ei; htip_t terms; term_t *term; - pcb_coord_t px[256], py[256], clr; + rnd_coord_t px[256], py[256], clr; pcb_layer_t **ly; htip_init(&terms, longhash, longkeyeq); @@ -495,7 +495,7 @@ numpt = load_poly(px, py, (sizeof(px) / sizeof(px[0])), argc-5, argv+5); if (numpt < 0) { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to load polygon\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); + rnd_message(PCB_MSG_ERROR, "tEDAx footprint load: failed to create poly, skipping footprint\n"); return -1; } for(n = 0; n < numpt; n++) @@ -516,7 +516,7 @@ } } else if ((argc == 10) && (strcmp(argv[0], "line") == 0)) { - pcb_coord_t x1, y1, x2, y2, w, clr; + rnd_coord_t x1, y1, x2, y2, w, clr; pcb_line_t *l; ly = subc_get_layer(subc, argv[1], argv[2]); @@ -534,7 +534,7 @@ } } else if ((argc == 11) && (strcmp(argv[0], "arc") == 0)) { - pcb_coord_t cx, cy, r, w; + rnd_coord_t cx, cy, r, w; double sa, da; pcb_arc_t *a; @@ -553,7 +553,7 @@ } } else if ((argc == 6) && (strcmp(argv[0], "hole") == 0)) { - pcb_coord_t cx, cy, d; + rnd_coord_t cx, cy, d; int plated; pcb_pstk_t *ps; @@ -566,7 +566,7 @@ load_term(ps, argv[1], "invalid term ID for hole: '%s', skipping footprint\n"); } else if ((argc == 8) && (strcmp(argv[0], "fillcircle") == 0)) { - pcb_coord_t cx, cy, r, clr; + rnd_coord_t cx, cy, r, clr; pcb_line_t *l; ly = subc_get_layer(subc, argv[1], argv[2]); @@ -647,7 +647,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fn); + rnd_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fn); return -1; } Index: trunk/src_plugins/io_tedax/footprint.h =================================================================== --- trunk/src_plugins/io_tedax/footprint.h (revision 30902) +++ trunk/src_plugins/io_tedax/footprint.h (revision 30903) @@ -13,7 +13,7 @@ /* Save a single subc, with footprint header */ int tedax_fp_fsave_subc_(pcb_subc_t *subc, const char *fpname, int lyrecipe, FILE *f); -int tedax_pstk_fsave(pcb_pstk_t *padstack, pcb_coord_t ox, pcb_coord_t oy, FILE *f); +int tedax_pstk_fsave(pcb_pstk_t *padstack, rnd_coord_t ox, rnd_coord_t oy, FILE *f); pcb_plug_fp_map_t *tedax_fp_map(pcb_plug_io_t *ctx, FILE *f, const char *fn, pcb_plug_fp_map_t *head, int need_tags); Index: trunk/src_plugins/io_tedax/parse.c =================================================================== --- trunk/src_plugins/io_tedax/parse.c (revision 30902) +++ trunk/src_plugins/io_tedax/parse.c (revision 30903) @@ -94,12 +94,12 @@ /* look for the header */ if ((argc = tedax_getline(f, buff, buff_size, argv, argv_size)) < 2) { - pcb_message(PCB_MSG_ERROR, "Can't find tEDAx header (no line)\n"); + rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (no line)\n"); return -1; } if ((argv[1] == NULL) || (pcb_strcasecmp(argv[0], "tEDAx") != 0) || (pcb_strcasecmp(argv[1], "v1") != 0)) { - pcb_message(PCB_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); + rnd_message(PCB_MSG_ERROR, "Can't find tEDAx header (wrong line)\n"); return -1; } @@ -118,7 +118,7 @@ if (argc < 2) { if (!silent) - pcb_message(PCB_MSG_ERROR, "Can't find %s %s block in tEDAx\n", blk_ver, blk_name); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/stackup.c (revision 30903) @@ -184,11 +184,11 @@ if (thick != NULL) { if (grp->ltype & (PCB_LYT_SUBSTRATE | PCB_LYT_COPPER)) { - pcb_bool succ; + rnd_bool succ; double th = pcb_get_value(thick, NULL, NULL, &succ); if (succ) { char tmp[64]; - pcb_sprintf(tmp, "%mu", (pcb_coord_t)th); + pcb_sprintf(tmp, "%mu", (rnd_coord_t)th); save_prop(pcb, f, name, "thickness", tmp); } else { @@ -257,7 +257,7 @@ else if (strcmp(lloc, "virtual") == 0) grp->ltype |= PCB_LYT_VIRTUAL; else if (strcmp(lloc, "all") == 0) {} else - pcb_message(PCB_MSG_ERROR, "invalid layer location: %s\n", lloc); + rnd_message(PCB_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 @@ } } - pcb_message(PCB_MSG_ERROR, "invalid layer type: %s\n", typename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_stackup_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_stackup_load(): can't open %s for reading\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/tboard.c (revision 30903) @@ -130,7 +130,7 @@ fputc('\n', f); if (tedax_stackup_fsave(&ctx, pcb, stackupid, f) != 0) { - pcb_message(PCB_MSG_ERROR, "internal error: failed to save the stackup\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_board_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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) \ - pcb_message(PCB_MSG_ERROR, msg); \ + rnd_message(PCB_MSG_ERROR, msg); \ res = -1; \ goto error; \ } while(0) @@ -309,7 +309,7 @@ struct tdx_plc_s { char *block; - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; double rot; char swapside; char role; /* 'v' for via, 'c' for comp or 'm' for misc */ @@ -359,7 +359,7 @@ tedax_stackup_t ctx; tdx_plc_t *p; htsp_t plc; - pcb_bool succ; + rnd_bool succ; pcb_data_t *scdata = NULL; htsp_init(&plc, strhash, strkeyeq); @@ -366,7 +366,7 @@ tedax_stackup_init(&ctx); while((argc = tedax_getline(f, buff, buff_size, argv, argv_size)) >= 0) { if (strcmp(argv[0], "drawing_area") == 0) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; reqarg("drawing_area", 5); x1 = pcb_get_value(argv[1], "mm", NULL, &succ); @@ -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)) pcb_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(PCB_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; } @@ -396,7 +396,7 @@ remember(drc); } else if (strcmp(argv[0], "place") == 0) { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; double rot; char *end; char swapside, role; @@ -435,7 +435,7 @@ p->attr = a; } else if (strcmp(argv[0], "place_text") == 0) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; tdx_text_t *t; char *end; double rot; @@ -545,7 +545,7 @@ f = pcb_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "tedax_board_load(): can't open %s for reading\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/tdrc.c (revision 30903) @@ -79,7 +79,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); + rnd_message(PCB_MSG_ERROR, "tedax_drc_save(): can't open %s for writing\n", fn); return -1; } fprintf(f, "tEDAx v1\n"); @@ -93,7 +93,7 @@ const drc_rule_t *r; char line[520], *argv[16]; int argc, n; - pcb_coord_t val[NUM_RULES] = {0}; + rnd_coord_t val[NUM_RULES] = {0}; if (tedax_seek_hdr(f, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0])) < 0) return -1; @@ -105,7 +105,7 @@ if (strcmp(argv[0], "rule") == 0) { double d; for(n = 0, r = rules; n < NUM_RULES; r++,n++) { - pcb_bool succ; + rnd_bool succ; if ((strcmp(argv[2], r->ttype) != 0) || (strcmp(argv[3], r->tkind) != 0)) continue; d = pcb_get_value(argv[4], "mm", NULL, &succ); @@ -114,13 +114,13 @@ val[n] = d; } else - pcb_message(PCB_MSG_ERROR, "ignoring invalid numeric value '%s'\n", argv[4]); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "ignoring invalid command in drc %s\n", argv[0]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_drc_load(): can't open %s for reading\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/tetest.c (revision 30903) @@ -65,7 +65,7 @@ pcb_pstk_tshape_t *ts; pcb_layer_type_t copper = 0, exposed = 0, side; pcb_pstk_shape_t *shp, *minshp = NULL; - pcb_coord_t shx, shy, dia, mindia; + rnd_coord_t shx, shy, dia, mindia; if (proto == NULL) return; @@ -161,7 +161,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "tedax_etest_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/tlayer.c (revision 30903) @@ -93,7 +93,7 @@ line->Thickness, PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, line) ? pcb_round(line->Clearance/2) : 0); } PCB_END_LOOP; PCB_ARC_LOOP(ly) { - pcb_coord_t sx, sy, ex, ey, clr; + rnd_coord_t sx, sy, ex, ey, clr; if (arc->Width != arc->Height) pcb_io_incompat_save(pcb->Data, (pcb_any_obj_t *)arc, "arc", "Elliptical arc", "Saving as circular arc instead - geometry will differ"); @@ -131,7 +131,7 @@ f = pcb_fopen_askovr(&PCB->hidlib, fn, "w", NULL); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "tedax_layer_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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])) { - pcb_message(PCB_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); + rnd_message(PCB_MSG_ERROR, "duplicate polyline: %s\n", argv[3]); res = -1; goto error; } @@ -170,11 +170,11 @@ while((argc = tedax_getline(f, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) >= 0) { if ((argc == 3) && (strcmp(argv[0], "v") == 0)) { - pcb_bool s1, s2; + rnd_bool s1, s2; 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) { - pcb_message(PCB_MSG_ERROR, "invalid coords in polyline %s: %s;%s\n", pname, argv[1], argv[2]); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "invalid command in polyline %s: %s\n", pname, argv[0]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "too many layers\n"); + rnd_message(PCB_MSG_ERROR, "too many layers\n"); res = -1; goto error; } @@ -218,8 +218,8 @@ while((argc = tedax_getline(f, line, sizeof(line), argv, sizeof(argv)/sizeof(argv[0]))) >= 0) { if ((argc == 7) && (strcmp(argv[0], "line") == 0)) { - pcb_coord_t x1, y1, x2, y2, th, cl; - pcb_bool s1, s2, s3, s4; + rnd_coord_t x1, y1, x2, y2, th, cl; + rnd_bool s1, s2, s3, s4; x1 = pcb_get_value(argv[1], "mm", NULL, &s1); y1 = pcb_get_value(argv[2], "mm", NULL, &s2); @@ -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) { - pcb_message(PCB_MSG_ERROR, "invalid line coords in line: %s;%s %s;%s\n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); + rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in line: %s;%s\n", argv[5], argv[6]); res = -1; goto error; } @@ -240,27 +240,27 @@ pcb_line_new_merge(ly, x1, y1, x2, y2, th, cl*2, pcb_flag_make(PCB_FLAG_CLEARLINE)); } else if ((argc == 12) && (strcmp(argv[0], "arc") == 0)) { - pcb_coord_t cx, cy, r, th, cl; + rnd_coord_t cx, cy, r, th, cl; double sa, da; - pcb_bool s1, s2, s3; + rnd_bool s1, s2, s3; cx = pcb_get_value(argv[1], "mm", NULL, &s1); cy = pcb_get_value(argv[2], "mm", NULL, &s2); r = pcb_get_value(argv[3], "mm", NULL, &s3); if (!s1 || !s2 || !s3) { - pcb_message(PCB_MSG_ERROR, "invalid arc coords or radius in line: %s;%s %s\n", argv[1], argv[2], argv[3]); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "invalid arc start angle %s\n", argv[4]); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "invalid arc delta angle %s\n", argv[5]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); + rnd_message(PCB_MSG_ERROR, "invalid thickness or clearance in arc: %s;%s\n", argv[6], argv[7]); res = -1; goto error; } @@ -274,8 +274,8 @@ pcb_arc_new(ly, cx, cy, r, r, sa, da, th, cl*2, pcb_flag_make(PCB_FLAG_CLEARLINE), 1); } else if ((argc == 9) && (strcmp(argv[0], "text") == 0)) { - pcb_coord_t bx1, by1, bx2, by2, rw, rh, aw, ah; - pcb_bool s1, s2, s3, s4; + rnd_coord_t bx1, by1, bx2, by2, rw, rh, aw, ah; + rnd_bool s1, s2, s3, s4; double rot, zx, zy, z; pcb_text_t *text; @@ -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) { - pcb_message(PCB_MSG_ERROR, "invalid bbox coords in text %s;%s %s;%s \n", argv[1], argv[2], argv[3], argv[4]); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "invalid text rotation %s \n", argv[6]); + rnd_message(PCB_MSG_ERROR, "invalid text rotation %s \n", argv[6]); res = -1; goto error; } @@ -316,20 +316,20 @@ } else if ((argc == 4) && (strcmp(argv[0], "poly") == 0)) { - pcb_bool s1, s2; - pcb_coord_t ox, oy; + rnd_bool s1, s2; + rnd_coord_t ox, oy; pcb_poly_t *poly; ox = pcb_get_value(argv[2], "mm", NULL, &s1); oy = pcb_get_value(argv[3], "mm", NULL, &s2); if (!s1 || !s2) { - pcb_message(PCB_MSG_ERROR, "invalid coords in poly %s;%s\n", argv[2], argv[3]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); + rnd_message(PCB_MSG_ERROR, "invalid polyline referecnce %s\n", argv[1]); res = -1; goto error; } @@ -342,7 +342,7 @@ else if ((argc == 2) && (strcmp(argv[0], "end") == 0) && (strcmp(argv[1], "layer") == 0)) break; else { - pcb_message(PCB_MSG_ERROR, "invalid layer object %s\n", argv[0]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_layers_load(): can't open %s for reading\n", fn); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/io_tedax/tnetlist.c (revision 30903) @@ -120,7 +120,7 @@ /* pcb_trace("tedax fp: refdes=%s val=%s fp=%s\n", e->key, fp->value, fp->footprint);*/ if (fp->footprint == NULL) - pcb_message(PCB_MSG_ERROR, "tedax: not importing refdes=%s: no footprint specified\n", e->key); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "can't open file '%s' for read\n", fname_net); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "tedax_net_save(): can't open %s for writing\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "import_tedaxnet: requires exactly 1 input file name\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/jostle/jostle.c (revision 30903) @@ -181,7 +181,7 @@ default: /* diagonal case */ { int kx, ky, minmax, dq, ckx, cky; - pcb_coord_t mm[2] = { PCB_MAX_COORD, -PCB_MAX_COORD }; + rnd_coord_t mm[2] = { PCB_MAX_COORD, -PCB_MAX_COORD }; pcb_vector_t mmp[2]; pcb_vnode_t *v; @@ -216,7 +216,7 @@ minmax = 1; break; default: - pcb_message(PCB_MSG_ERROR, "jostle: aiee, what side?"); + rnd_message(PCB_MSG_ERROR, "jostle: aiee, what side?"); return; } v = a->contours->head; @@ -470,7 +470,7 @@ static const char pcb_acth_jostle[] = "Make room by moving wires away."; static fgw_error_t pcb_act_jostle(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_polyarea_t *expand; float value = conf_core.design.via_thickness + (conf_core.design.bloat + 1) * 2 + 50; struct info info; Index: trunk/src_plugins/lib_compat_help/elem_rot.c =================================================================== --- trunk/src_plugins/lib_compat_help/elem_rot.c (revision 30902) +++ trunk/src_plugins/lib_compat_help/elem_rot.c (revision 30903) @@ -41,7 +41,7 @@ #define MAXREFPINS 32 /* max length of following list */ static char *reference_pin_names[] = {"1", "2", "A1", "A2", "B1", "B2", 0}; -static double xyToAngle(double x, double y, pcb_bool morethan2pins) +static double xyToAngle(double x, double y, rnd_bool morethan2pins) { double d = atan2(-y, x) * 180.0 / M_PI; @@ -85,7 +85,7 @@ } } -void pcb_subc_xy_rot(pcb_subc_t *subc, pcb_coord_t *cx, pcb_coord_t *cy, double *theta, double *xray_theta, pcb_bool autodetect) +void pcb_subc_xy_rot(pcb_subc_t *subc, rnd_coord_t *cx, rnd_coord_t *cy, double *theta, double *xray_theta, rnd_bool autodetect) { double centroidx, centroidy; int found_any_not_at_centroid, found_any, rpindex; @@ -96,7 +96,7 @@ double pinx[MAXREFPINS]; double piny[MAXREFPINS]; const char *fixed_rotation; - pcb_coord_t ox = 0, oy = 0; + rnd_coord_t ox = 0, oy = 0; pcb_any_obj_t *o; pcb_data_it_t it; @@ -104,10 +104,10 @@ if (!autodetect) { if (pcb_subc_get_origin(subc, &ox, &oy) != 0) - pcb_message(PCB_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc origin for %s\n", subc->refdes); + rnd_message(PCB_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc origin for %s\n", subc->refdes); if (pcb_subc_get_side(subc, &bott) != 0) - pcb_message(PCB_MSG_ERROR, "pcb_subc_xy_rot(): can't get subc side for %s\n", subc->refdes); + rnd_message(PCB_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 @@ -124,7 +124,7 @@ * we can find them */ for(o = pcb_data_first(&it, subc->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { - pcb_coord_t px, py; + rnd_coord_t px, py; if (o->term == NULL) continue; @@ -212,13 +212,13 @@ } if (!found_any) { - pcb_message + rnd_message (PCB_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) { - pcb_message + rnd_message (PCB_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); @@ -227,9 +227,9 @@ } } -void pcb_subc_xy_rot_pnp(pcb_subc_t *subc, pcb_coord_t subc_ox, pcb_coord_t subc_oy, pcb_bool on_bottom) +void pcb_subc_xy_rot_pnp(pcb_subc_t *subc, rnd_coord_t subc_ox, rnd_coord_t subc_oy, rnd_bool on_bottom) { - pcb_coord_t cx = subc_ox, cy = subc_oy; + rnd_coord_t cx = subc_ox, cy = subc_oy; double rot = 0.0, tmp; const char *cent; Index: trunk/src_plugins/lib_compat_help/elem_rot.h =================================================================== --- trunk/src_plugins/lib_compat_help/elem_rot.h (revision 30902) +++ trunk/src_plugins/lib_compat_help/elem_rot.h (revision 30903) @@ -1,5 +1,5 @@ -void pcb_subc_xy_rot(pcb_subc_t *subc, pcb_coord_t *cx, pcb_coord_t *cy, double *theta, double *xray_theta, pcb_bool autodetect); +void pcb_subc_xy_rot(pcb_subc_t *subc, rnd_coord_t *cx, rnd_coord_t *cy, double *theta, double *xray_theta, rnd_bool autodetect); /* Automatic version of pcb_subc_xy_rot: inserts all the p&p attributes and creates the aux layer */ -void pcb_subc_xy_rot_pnp(pcb_subc_t *subc, pcb_coord_t subc_ox, pcb_coord_t subc_oy, pcb_bool on_bottom); +void pcb_subc_xy_rot_pnp(pcb_subc_t *subc, rnd_coord_t subc_ox, rnd_coord_t subc_oy, rnd_bool on_bottom); Index: trunk/src_plugins/lib_compat_help/media.h =================================================================== --- trunk/src_plugins/lib_compat_help/media.h (revision 30902) +++ trunk/src_plugins/lib_compat_help/media.h (revision 30903) @@ -1,7 +1,7 @@ typedef struct { const char *name; - pcb_coord_t width, height; /* orientation: landscape */ - pcb_coord_t margin_x, margin_y; + rnd_coord_t width, height; /* orientation: landscape */ + rnd_coord_t margin_x, margin_y; } pcb_media_t; extern pcb_media_t pcb_media_data[]; Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 30902) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 30903) @@ -38,7 +38,7 @@ #define sqr(o) ((double)(o)*(double)(o)) /* emulate old pcb-rnd "pin shape" feature */ -static void octa_shape(pcb_pstk_poly_t *dst, pcb_coord_t x0, pcb_coord_t y0, pcb_coord_t rx, pcb_coord_t ry, int style) +static void octa_shape(pcb_pstk_poly_t *dst, rnd_coord_t x0, rnd_coord_t y0, rnd_coord_t rx, rnd_coord_t ry, int style) { double xm[8], ym[8]; @@ -65,9 +65,9 @@ } /* emulate the old 'square flag' feature */ -static void square_shape(pcb_pstk_poly_t *dst, pcb_coord_t x0, pcb_coord_t y0, pcb_coord_t radius, int style) +static void square_shape(pcb_pstk_poly_t *dst, rnd_coord_t x0, rnd_coord_t y0, rnd_coord_t radius, int style) { - pcb_coord_t r2 = pcb_round(radius * 0.5); + rnd_coord_t r2 = pcb_round(radius * 0.5); pcb_pstk_shape_alloc_poly(dst, 4); @@ -78,7 +78,7 @@ } -static int compat_via_shape_gen(pcb_pstk_shape_t *dst, pcb_pstk_compshape_t cshape, pcb_coord_t pad_dia) +static int compat_via_shape_gen(pcb_pstk_shape_t *dst, pcb_pstk_compshape_t cshape, rnd_coord_t pad_dia) { if ((cshape >= PCB_PSTK_COMPAT_SHAPED) && (cshape <= PCB_PSTK_COMPAT_SHAPED_END)) { dst->shape = PCB_PSSH_POLY; @@ -113,7 +113,7 @@ free(shp->data.poly.x); } -static pcb_pstk_t *pcb_pstk_new_compat_via_(pcb_data_t *data, long int id, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_coord_t pad_dia, pcb_coord_t clearance, pcb_coord_t mask, pcb_pstk_compshape_t cshape, pcb_bool plated, pcb_bool hole_clearance_hack) +static pcb_pstk_t *pcb_pstk_new_compat_via_(pcb_data_t *data, long int id, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_coord_t pad_dia, rnd_coord_t clearance, rnd_coord_t mask, pcb_pstk_compshape_t cshape, rnd_bool plated, rnd_bool hole_clearance_hack) { pcb_pstk_proto_t proto; pcb_pstk_shape_t shape[5]; /* max number of shapes: 3 coppers, 2 masks */ @@ -193,13 +193,13 @@ return pcb_pstk_new(data, -1, pid, x, y, clearance, pcb_flag_make(PCB_FLAG_CLEARLINE)); } -pcb_pstk_t *pcb_pstk_new_compat_via(pcb_data_t *data, long int id, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_coord_t pad_dia, pcb_coord_t clearance, pcb_coord_t mask, pcb_pstk_compshape_t cshape, pcb_bool plated) +pcb_pstk_t *pcb_pstk_new_compat_via(pcb_data_t *data, long int id, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_coord_t pad_dia, rnd_coord_t clearance, rnd_coord_t mask, pcb_pstk_compshape_t cshape, rnd_bool plated) { return pcb_pstk_new_compat_via_(data, id, x, y, drill_dia, pad_dia, clearance, mask, cshape, plated, 0); } -static pcb_pstk_compshape_t get_old_shape_square(pcb_coord_t *dia, const pcb_pstk_shape_t *shp) +static pcb_pstk_compshape_t get_old_shape_square(rnd_coord_t *dia, const pcb_pstk_shape_t *shp) { double sq, len2, l, a; int n; @@ -229,7 +229,7 @@ } -static pcb_pstk_compshape_t get_old_shape_octa(pcb_coord_t *dia, const pcb_pstk_shape_t *shp) +static pcb_pstk_compshape_t get_old_shape_octa(rnd_coord_t *dia, const pcb_pstk_shape_t *shp) { double x[8], y[8], xm[8], ym[8], minx = 0.0, miny = 0.0, tmp; int shi, n, found; @@ -313,7 +313,7 @@ return PCB_PSTK_COMPAT_INVALID; } -static pcb_pstk_compshape_t get_old_shape(pcb_coord_t *dia, const pcb_pstk_shape_t *shp) +static pcb_pstk_compshape_t get_old_shape(rnd_coord_t *dia, const pcb_pstk_shape_t *shp) { switch(shp->shape) { case PCB_PSSH_LINE: @@ -335,13 +335,13 @@ return PCB_PSTK_COMPAT_INVALID; } -pcb_bool pcb_pstk_export_compat_via(pcb_pstk_t *ps, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t *drill_dia, pcb_coord_t *pad_dia, pcb_coord_t *clearance, pcb_coord_t *mask, pcb_pstk_compshape_t *cshape, pcb_bool *plated) +rnd_bool pcb_pstk_export_compat_via(pcb_pstk_t *ps, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t *drill_dia, rnd_coord_t *pad_dia, rnd_coord_t *clearance, rnd_coord_t *mask, pcb_pstk_compshape_t *cshape, rnd_bool *plated) { pcb_pstk_proto_t *proto; pcb_pstk_tshape_t *tshp; int n, coppern = -1, maskn = -1; pcb_pstk_compshape_t old_shape[5]; - pcb_coord_t old_dia[5]; + rnd_coord_t old_dia[5]; proto = pcb_pstk_get_proto_(ps->parent.data, ps->proto); if ((proto == NULL) || (proto->tr.used < 1)) @@ -414,11 +414,11 @@ } /* emulate the old 'square flag' pad */ -static void pad_shape(pcb_pstk_poly_t *dst, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thickness) +static void pad_shape(pcb_pstk_poly_t *dst, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thickness) { double d, dx, dy; - pcb_coord_t nx, ny; - pcb_coord_t halfthick = (thickness + 1) / 2; + rnd_coord_t nx, ny; + rnd_coord_t halfthick = (thickness + 1) / 2; dx = x2 - x1; dy = y2 - y1; @@ -450,7 +450,7 @@ } /* Generate a square or round pad of a given thickness - typically mask or copper */ -static void gen_pad(pcb_pstk_shape_t *dst, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thickness, pcb_bool square) +static void gen_pad(pcb_pstk_shape_t *dst, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thickness, rnd_bool square) { if (square) { dst->shape = PCB_PSSH_POLY; @@ -473,7 +473,7 @@ } } -pcb_pstk_t *pcb_pstk_new_compat_pad(pcb_data_t *data, long int id, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thickness, pcb_coord_t clearance, pcb_coord_t mask, pcb_bool square, pcb_bool nopaste, pcb_bool onotherside) +pcb_pstk_t *pcb_pstk_new_compat_pad(pcb_data_t *data, long int id, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thickness, rnd_coord_t clearance, rnd_coord_t mask, rnd_bool square, rnd_bool nopaste, rnd_bool onotherside) { pcb_layer_type_t side; pcb_pstk_proto_t proto; @@ -481,7 +481,7 @@ pcb_cardinal_t pid; pcb_pstk_tshape_t tshp; int n; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; assert(thickness >= 0); assert(clearance >= 0); @@ -525,13 +525,13 @@ } -pcb_bool pcb_pstk_export_compat_pad(pcb_pstk_t *ps, pcb_coord_t *x1, pcb_coord_t *y1, pcb_coord_t *x2, pcb_coord_t *y2, pcb_coord_t *thickness, pcb_coord_t *clearance, pcb_coord_t *mask, pcb_bool *square, pcb_bool *nopaste) +rnd_bool pcb_pstk_export_compat_pad(pcb_pstk_t *ps, rnd_coord_t *x1, rnd_coord_t *y1, rnd_coord_t *x2, rnd_coord_t *y2, rnd_coord_t *thickness, rnd_coord_t *clearance, rnd_coord_t *mask, rnd_bool *square, rnd_bool *nopaste) { pcb_pstk_proto_t *proto; pcb_pstk_tshape_t *tshp; int n, coppern = -1, maskn = -1, pasten = -1; pcb_layer_type_t side; - pcb_coord_t lx1[3], ly1[3], lx2[3], ly2[3], lt[3]; /* poly->line conversion cache */ + rnd_coord_t lx1[3], ly1[3], lx2[3], ly2[3], lt[3]; /* poly->line conversion cache */ proto = pcb_pstk_get_proto_(ps->parent.data, ps->proto); if ((proto == NULL) || (proto->tr.used < 1)) @@ -576,7 +576,7 @@ /* if the shape is poly, convert to line to make the rest of the code simpler */ if (tshp->shape[0].shape == PCB_PSSH_POLY) { for(n = 0; n < tshp->len; n++) { - pcb_coord_t w, h, x1, x2, y1, y2; + rnd_coord_t w, h, x1, x2, y1, y2; double stepd, step2; int step; @@ -745,7 +745,7 @@ } -pcb_pstk_t *pcb_old_via_new(pcb_data_t *data, long int id, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags) +pcb_pstk_t *pcb_old_via_new(pcb_data_t *data, long int id, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, pcb_flag_t Flags) { pcb_pstk_t *p; pcb_pstk_compshape_t shp; @@ -783,7 +783,7 @@ return p; } -void pcb_shape_octagon(pcb_pstk_shape_t *dst, pcb_coord_t radiusx, pcb_coord_t radiusy) +void pcb_shape_octagon(pcb_pstk_shape_t *dst, rnd_coord_t radiusx, rnd_coord_t radiusy) { dst->shape = PCB_PSSH_POLY; octa_shape(&dst->data.poly, 0, 0, radiusx, radiusy, 0); Index: trunk/src_plugins/lib_compat_help/pstk_compat.h =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.h (revision 30902) +++ trunk/src_plugins/lib_compat_help/pstk_compat.h (revision 30903) @@ -14,17 +14,17 @@ /* Create a padstack that emulates an old-style via - register proto as needed if id <= 0, allocate a new id automatically */ -pcb_pstk_t *pcb_pstk_new_compat_via(pcb_data_t *data, long int id, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_coord_t pad_dia, pcb_coord_t clearance, pcb_coord_t mask, pcb_pstk_compshape_t shp, pcb_bool plated); +pcb_pstk_t *pcb_pstk_new_compat_via(pcb_data_t *data, long int id, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_coord_t pad_dia, rnd_coord_t clearance, rnd_coord_t mask, pcb_pstk_compshape_t shp, rnd_bool plated); /* Convert an existing padstack to old-style via and return broken down parameters */ -pcb_bool pcb_pstk_export_compat_via(pcb_pstk_t *ps, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t *drill_dia, pcb_coord_t *pad_dia, pcb_coord_t *clearance, pcb_coord_t *mask, pcb_pstk_compshape_t *cshape, pcb_bool *plated); +rnd_bool pcb_pstk_export_compat_via(pcb_pstk_t *ps, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t *drill_dia, rnd_coord_t *pad_dia, rnd_coord_t *clearance, rnd_coord_t *mask, pcb_pstk_compshape_t *cshape, rnd_bool *plated); /* Create a padstack that emulates an old-style pad - register proto as needed If id <= 0, allocate an id automatically. */ -pcb_pstk_t *pcb_pstk_new_compat_pad(pcb_data_t *data, long int id, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thickness, pcb_coord_t clearance, pcb_coord_t mask, pcb_bool square, pcb_bool nopaste, pcb_bool onotherside); +pcb_pstk_t *pcb_pstk_new_compat_pad(pcb_data_t *data, long int id, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thickness, rnd_coord_t clearance, rnd_coord_t mask, rnd_bool square, rnd_bool nopaste, rnd_bool onotherside); /* Convert an existing padstack to old-style pad and return broken down parameters */ -pcb_bool pcb_pstk_export_compat_pad(pcb_pstk_t *ps, pcb_coord_t *x1, pcb_coord_t *y1, pcb_coord_t *x2, pcb_coord_t *y2, pcb_coord_t *thickness, pcb_coord_t *clearance, pcb_coord_t *mask, pcb_bool *square, pcb_bool *nopaste); +rnd_bool pcb_pstk_export_compat_pad(pcb_pstk_t *ps, rnd_coord_t *x1, rnd_coord_t *y1, rnd_coord_t *x2, rnd_coord_t *y2, rnd_coord_t *thickness, rnd_coord_t *clearance, rnd_coord_t *mask, rnd_bool *square, rnd_bool *nopaste); typedef enum { PCB_PSTKCOMP_OLD_OCTAGON = 1 @@ -39,6 +39,6 @@ /* Create a padstack that mimics the old gEDA/PCB via (or pin). If id <= 0, allocate a new ID automatically. Should not be used anywhere but io_pcb and io_lihata. */ -pcb_pstk_t *pcb_old_via_new(pcb_data_t *data, long int id, pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_coord_t Mask, pcb_coord_t DrillingHole, const char *Name, pcb_flag_t Flags); +pcb_pstk_t *pcb_old_via_new(pcb_data_t *data, long int id, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Thickness, rnd_coord_t Clearance, rnd_coord_t Mask, rnd_coord_t DrillingHole, const char *Name, pcb_flag_t Flags); #endif Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30902) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30903) @@ -34,7 +34,7 @@ #include "find.h" -pcb_pstk_t *pcb_pstk_new_hole(pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_bool plated) +pcb_pstk_t *pcb_pstk_new_hole(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated) { pcb_pstk_proto_t proto; pcb_cardinal_t pid; @@ -67,7 +67,7 @@ #define NUM_LYTS (sizeof(lyts) / sizeof(lyts[0])) -static int vect2pstk_conv_cand(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet, pcb_any_obj_t **cand, int *num_cand, pcb_coord_t cx, pcb_coord_t cy, int plated, pcb_any_obj_t *extrao) +static int vect2pstk_conv_cand(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet, pcb_any_obj_t **cand, int *num_cand, rnd_coord_t cx, rnd_coord_t cy, int plated, pcb_any_obj_t *extrao) { pcb_pstk_proto_t proto; int l, ci, res = -1; @@ -121,7 +121,7 @@ { int l, n, plated, done = 0, ci; pcb_pstk_proto_t *p; - pcb_coord_t cx, cy, d, r, valid; + rnd_coord_t cx, cy, d, r, valid; pcb_any_obj_t *cand[NUM_LYTS]; int num_cand[NUM_LYTS]; @@ -206,7 +206,7 @@ int pcb_pstk_vect2pstk_smd(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet) { int l, n, done = 0, ci; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; pcb_any_obj_t *cand[NUM_LYTS]; int num_cand[NUM_LYTS]; @@ -283,7 +283,7 @@ } -pcb_pstk_t *pcb_pstk_new_from_shape(pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_bool plated, pcb_coord_t glob_clearance, pcb_pstk_shape_t *shape) +pcb_pstk_t *pcb_pstk_new_from_shape(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated, rnd_coord_t glob_clearance, pcb_pstk_shape_t *shape) { pcb_pstk_proto_t proto; pcb_cardinal_t pid; @@ -310,7 +310,7 @@ return pcb_pstk_new(data, -1, pid, x, y, glob_clearance, pcb_flag_make(PCB_FLAG_CLEARLINE)); } -void pcb_shape_rect(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height) +void pcb_shape_rect(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height) { pcb_pstk_poly_t *dst = &shape->data.poly; @@ -326,7 +326,7 @@ dst->x[3] = -width; dst->y[3] = +height; } -void pcb_shape_rect_trdelta(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height, pcb_coord_t dx, pcb_coord_t dy) +void pcb_shape_rect_trdelta(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height, rnd_coord_t dx, rnd_coord_t dy) { pcb_pstk_poly_t *dst = &shape->data.poly; @@ -344,7 +344,7 @@ dst->x[3] = -width-dx; dst->y[3] = +height+dy; } -void pcb_shape_oval(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height) +void pcb_shape_oval(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height) { shape->shape = PCB_PSSH_LINE; Index: trunk/src_plugins/lib_compat_help/pstk_help.h =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.h (revision 30902) +++ trunk/src_plugins/lib_compat_help/pstk_help.h (revision 30903) @@ -5,11 +5,11 @@ #include /* create a new adstack that contains only a hole, but no shapes */ -pcb_pstk_t *pcb_pstk_new_hole(pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_bool plated); +pcb_pstk_t *pcb_pstk_new_hole(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated); /* Convert an array of shapes, terminated by a shape with layer_mask=0, into a padstack. */ -pcb_pstk_t *pcb_pstk_new_from_shape(pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, pcb_coord_t drill_dia, pcb_bool plated, pcb_coord_t glob_clearance, pcb_pstk_shape_t *shape); +pcb_pstk_t *pcb_pstk_new_from_shape(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated, rnd_coord_t glob_clearance, pcb_pstk_shape_t *shape); /* Convert a vector of (pcb_any_obj_t *) into zero or more padstacks. Remove objects that are converted from both data and objs. New padstacks are @@ -23,16 +23,16 @@ int pcb_pstk_vect2pstk(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet); /*** shape generators ***/ -void pcb_shape_rect(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height); -void pcb_shape_oval(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height); +void pcb_shape_rect(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height); +void pcb_shape_oval(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height); /* trapezoid: deform the rectangle so that upper horizontal edge is smaller by dx and lower horizontal edge is larger by dx; same happens to the vertical edges and dy. */ -void pcb_shape_rect_trdelta(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height, pcb_coord_t dx, pcb_coord_t dy); +void pcb_shape_rect_trdelta(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height, rnd_coord_t dx, rnd_coord_t dy); /* Create a regular octagon shape */ -void pcb_shape_octagon(pcb_pstk_shape_t *dst, pcb_coord_t radiusx, pcb_coord_t radiusy); +void pcb_shape_octagon(pcb_pstk_shape_t *dst, rnd_coord_t radiusx, rnd_coord_t radiusy); #endif Index: trunk/src_plugins/lib_compat_help/subc_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/subc_help.c (revision 30902) +++ trunk/src_plugins/lib_compat_help/subc_help.c (revision 30903) @@ -26,7 +26,7 @@ #include "subc_help.h" -pcb_text_t *pcb_subc_add_dyntex(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, unsigned direction, int scale, pcb_bool bottom, const char *pattern) +pcb_text_t *pcb_subc_add_dyntex(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, unsigned direction, int scale, rnd_bool bottom, const char *pattern) { pcb_layer_type_t side = bottom ? PCB_LYT_BOTTOM : PCB_LYT_TOP; pcb_layer_t *ly = pcb_subc_get_layer(sc, side | PCB_LYT_SILK, 0, pcb_true, "top-silk", pcb_false); @@ -35,7 +35,7 @@ return 0; } -pcb_text_t *pcb_subc_add_refdes_text(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, unsigned direction, int scale, pcb_bool bottom) +pcb_text_t *pcb_subc_add_refdes_text(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, unsigned direction, int scale, rnd_bool bottom) { return pcb_subc_add_dyntex(sc, x, y, direction, scale, bottom, "%a.parent.refdes%"); } Index: trunk/src_plugins/lib_compat_help/subc_help.h =================================================================== --- trunk/src_plugins/lib_compat_help/subc_help.h (revision 30902) +++ trunk/src_plugins/lib_compat_help/subc_help.h (revision 30903) @@ -7,8 +7,8 @@ /* Create dynamic text on the top silk layer (creates the layer if needed). Returns the text object, or NULL on error. Does not set any subc attribute. The refdes version is just a shorthand for the pattern. */ -pcb_text_t *pcb_subc_add_dyntex(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, unsigned direction, int scale, pcb_bool bottom, const char *pattern); -pcb_text_t *pcb_subc_add_refdes_text(pcb_subc_t *sc, pcb_coord_t x, pcb_coord_t y, unsigned direction, int scale, pcb_bool bottom); +pcb_text_t *pcb_subc_add_dyntex(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, unsigned direction, int scale, rnd_bool bottom, const char *pattern); +pcb_text_t *pcb_subc_add_refdes_text(pcb_subc_t *sc, rnd_coord_t x, rnd_coord_t y, unsigned direction, int scale, rnd_bool bottom); /* Returns the refdes text objects; must be DYNTEXT and must contain the refdes attribute printing. If there's are multiple objects, silk is Index: trunk/src_plugins/lib_gtk_common/bu_command.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_command.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/bu_command.c (revision 30903) @@ -100,7 +100,7 @@ ctx->command_entered = command; /* Caller will free it */ } -static pcb_bool command_keypress_cb(GtkWidget *widget, GdkEventKey *kev, pcb_gtk_command_t *ctx) +static rnd_bool command_keypress_cb(GtkWidget *widget, GdkEventKey *kev, pcb_gtk_command_t *ctx) { gint ksym = kev->keyval; @@ -118,7 +118,7 @@ return FALSE; } -static pcb_bool command_keyrelease_cb(GtkWidget *widget, GdkEventKey *kev, pcb_gtk_command_t *ctx) +static rnd_bool command_keyrelease_cb(GtkWidget *widget, GdkEventKey *kev, pcb_gtk_command_t *ctx) { if (ctx->command_entry_status_line_active) rnd_cli_edit(ghidgui->hidlib); @@ -231,7 +231,7 @@ } -void ghid_handle_user_command(rnd_hidlib_t *hl, pcb_gtk_command_t *ctx, pcb_bool raise) +void ghid_handle_user_command(rnd_hidlib_t *hl, pcb_gtk_command_t *ctx, rnd_bool raise) { char *command; Index: trunk/src_plugins/lib_gtk_common/bu_command.h =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_command.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/bu_command.h (revision 30903) @@ -21,7 +21,7 @@ void *status_ctx; } pcb_gtk_command_t; -void ghid_handle_user_command(rnd_hidlib_t *hl, pcb_gtk_command_t *ctx, pcb_bool raise); +void ghid_handle_user_command(rnd_hidlib_t *hl, pcb_gtk_command_t *ctx, rnd_bool raise); char *ghid_command_entry_get(pcb_gtk_command_t *ctx, const char *prompt, const char *command); /* Update the prompt text before the command entry - call it when any of conf_core.rc.cli_* change */ Index: trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.c (revision 30903) @@ -39,7 +39,7 @@ #define TOOLTIP_UPDATE_DELAY 200 static int tooltip_update_timeout_id = 0; -gboolean pcb_gtk_dwg_tooltip_check_object(rnd_hidlib_t *hl, GtkWidget *drawing_area, pcb_coord_t crosshairx, pcb_coord_t crosshairy) +gboolean pcb_gtk_dwg_tooltip_check_object(rnd_hidlib_t *hl, GtkWidget *drawing_area, rnd_coord_t crosshairx, rnd_coord_t crosshairy) { const char *description; fgw_arg_t res, argv[3]; Index: trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.h =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/bu_dwg_tooltip.h (revision 30903) @@ -1,5 +1,5 @@ #include -gboolean pcb_gtk_dwg_tooltip_check_object(rnd_hidlib_t *hl, GtkWidget *drawing_area, pcb_coord_t crosshairx, pcb_coord_t crosshairy); +gboolean pcb_gtk_dwg_tooltip_check_object(rnd_hidlib_t *hl, GtkWidget *drawing_area, rnd_coord_t crosshairx, rnd_coord_t crosshairy); void pcb_gtk_dwg_tooltip_cancel_update(void); void pcb_gtk_dwg_tooltip_queue(GtkWidget *drawing_area, GSourceFunc cb, void *ctx); Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30903) @@ -183,7 +183,7 @@ } else { if ((update_on == NULL) || (*update_on != '\0')) - pcb_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(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ghid: can't initialize the menu - is your menu .lht valid?\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "FATAL: can't load the gtk menu res either from file or from hardwired default."); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Error: failed to load mouse actions from the hid config lihata - mouse input will not work."); + rnd_message(PCB_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/coord_conv.h =================================================================== --- trunk/src_plugins/lib_gtk_common/coord_conv.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/coord_conv.h (revision 30903) @@ -3,7 +3,7 @@ #include /* Px converts view->pcb, Vx converts pcb->view */ -static inline int Vx(pcb_coord_t x) +static inline int Vx(rnd_coord_t x) { double rv; if (pcbhl_conf.editor.view.flip_x) @@ -13,7 +13,7 @@ return pcb_round(rv); } -static inline int Vy(pcb_coord_t y) +static inline int Vy(rnd_coord_t y) { double rv; if (pcbhl_conf.editor.view.flip_y) @@ -23,12 +23,12 @@ return pcb_round(rv); } -static inline int Vz(pcb_coord_t z) +static inline int Vz(rnd_coord_t z) { return pcb_round((double)z / ghidgui->port.view.coord_per_px + 0.5); } -static inline double Vxd(pcb_coord_t x) +static inline double Vxd(rnd_coord_t x) { double rv; if (pcbhl_conf.editor.view.flip_x) @@ -38,7 +38,7 @@ return rv; } -static inline double Vyd(pcb_coord_t y) +static inline double Vyd(rnd_coord_t y) { double rv; if (pcbhl_conf.editor.view.flip_y) @@ -48,34 +48,34 @@ return rv; } -static inline double Vzd(pcb_coord_t z) +static inline double Vzd(rnd_coord_t z) { return (double)z / ghidgui->port.view.coord_per_px; } -static inline pcb_coord_t Px(int x) +static inline rnd_coord_t Px(int x) { - pcb_coord_t rv = x * ghidgui->port.view.coord_per_px + ghidgui->port.view.x0; + rnd_coord_t rv = x * ghidgui->port.view.coord_per_px + ghidgui->port.view.x0; if (pcbhl_conf.editor.view.flip_x) rv = ghidgui->port.view.ctx->hidlib->size_x - (x * ghidgui->port.view.coord_per_px + ghidgui->port.view.x0); return rv; } -static inline pcb_coord_t Py(int y) +static inline rnd_coord_t Py(int y) { - pcb_coord_t rv = y * ghidgui->port.view.coord_per_px + ghidgui->port.view.y0; + rnd_coord_t rv = y * ghidgui->port.view.coord_per_px + ghidgui->port.view.y0; if (pcbhl_conf.editor.view.flip_y) rv = ghidgui->port.view.ctx->hidlib->size_y - (y * ghidgui->port.view.coord_per_px + ghidgui->port.view.y0); return rv; } -static inline pcb_coord_t Pz(int z) +static inline rnd_coord_t Pz(int z) { return (z * ghidgui->port.view.coord_per_px); } /* Return non-zero if box would be rendered into a single dot */ -static inline int pcb_gtk_1dot(pcb_coord_t penwidth, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static inline int pcb_gtk_1dot(rnd_coord_t penwidth, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double minw = ghidgui->port.view.coord_per_px; double dx = PCB_ABS(x1-x2) + penwidth, dy = PCB_ABS(y1-y2) + penwidth; @@ -83,7 +83,7 @@ } /* Return non-zero if dot coords are within canvas extents */ -static inline int pcb_gtk_dot_in_canvas(pcb_coord_t penwidth, double dx1, double dy1) +static inline int pcb_gtk_dot_in_canvas(rnd_coord_t penwidth, double dx1, double dy1) { penwidth/=2; return ((dx1+penwidth >= 0) && (dx1-penwidth <= ghidgui->port.view.canvas_width) && (dy1+penwidth >= 0) && (dy1-penwidth <= ghidgui->port.view.canvas_height)); Index: trunk/src_plugins/lib_gtk_common/dlg_attr_box.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30903) @@ -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: - pcb_message(PCB_MSG_ERROR, "Wrong number of pages for a paned widget (%d): must be exactly 2\n", ts->val.pane.next); + rnd_message(PCB_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/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30903) @@ -64,7 +64,7 @@ prv->user_expose_cb(prv->attrib, prv, gc, e); } -static pcb_bool ghid_preview_mouse(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool ghid_preview_mouse(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { pcb_hid_preview_t *prv = draw_data; if (prv->user_mouse_cb != NULL) Index: trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 30903) @@ -234,7 +234,7 @@ GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; - pcb_bool key_handled, arrow_key, enter_key, force_activate = pcb_false; + rnd_bool key_handled, arrow_key, enter_key, force_activate = pcb_false; GtkClipboard *clipboard; guint default_mod_mask = gtk_accelerator_get_default_mod_mask(); Index: trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 30903) @@ -195,7 +195,7 @@ return gtk_text_buffer_get_text(b, &it, &it2, 0); } -static void txt_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_bool readonly) +static void txt_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30903) @@ -735,7 +735,7 @@ } /* Hide (or show) a widget by idx - no check performed on idx range */ -static int ghid_attr_dlg_widget_hide_(attr_dlg_t *ctx, int idx, pcb_bool hide) +static int ghid_attr_dlg_widget_hide_(attr_dlg_t *ctx, int idx, rnd_bool hide) { GtkWidget *w; @@ -770,7 +770,7 @@ ghid_attr_dlg_widget_hide_(ctx, n, 1); } -void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { GtkWidget *content_area; GtkWidget *main_vbox; @@ -960,7 +960,7 @@ } -int ghid_attr_dlg_widget_hide(void *hid_ctx, int idx, pcb_bool hide) +int ghid_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide) { attr_dlg_t *ctx = hid_ctx; Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.h (revision 30903) @@ -2,7 +2,7 @@ #include #include "pcb_gtk.h" -void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int ghid_attr_dlg_run(void *hid_ctx); void ghid_attr_dlg_raise(void *hid_ctx); void ghid_attr_dlg_close(void *hid_ctx); @@ -10,7 +10,7 @@ void ghid_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val); int ghid_attr_dlg_widget_state(void *hid_ctx, int idx, int enabled); -int ghid_attr_dlg_widget_hide(void *hid_ctx, int idx, pcb_bool hide); +int ghid_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide); int ghid_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); void ghid_attr_dlg_set_help(void *hid_ctx, int idx, const char *val); Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "Failed to load pixmap %s for background image\n", pcb_conf_hid_gtk.plugins.hid_gtk.bg_image); + rnd_message(PCB_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; @@ -304,7 +304,7 @@ gdk_window_invalidate_rect(gtkc_widget_get_window(port->drawing_area), rect, FALSE); } -void pcb_gtk_previews_invalidate_lr(pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom) +void pcb_gtk_previews_invalidate_lr(rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { pcb_box_t screen; screen.X1 = left; screen.X2 = right; Index: trunk/src_plugins/lib_gtk_common/glue_common.h =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/glue_common.h (revision 30903) @@ -13,7 +13,7 @@ be slightly larger than the original request */ #define PCB_GTK_PREVIEW_TUNE_EXTENT(ctx, allocation) \ do { \ - pcb_coord_t nx1, ny1, nx2, ny2; \ + rnd_coord_t nx1, ny1, nx2, ny2; \ nx1 = Px(0); nx2 = Px(allocation.width); \ ny1 = Py(0); ny2 = Py(allocation.height); \ if (nx1 < nx2) { \ @@ -35,7 +35,7 @@ } while(0) /* Redraw all previews intersecting the specified screenbox (in case of lr) */ -void pcb_gtk_previews_invalidate_lr(pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom); +void pcb_gtk_previews_invalidate_lr(rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom); void pcb_gtk_previews_invalidate_all(void); /*** Internal calls, hid implementations won't need these ***/ Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30903) @@ -249,7 +249,7 @@ printf("ghid_calibrate() -- not implemented\n"); } -static void ghid_set_crosshair(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int action) +static void ghid_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { pcb_gtk_t *gctx = hid->hid_data; int offset_x, offset_y; @@ -262,7 +262,7 @@ pcb_gtk_crosshair_set(x, y, action, offset_x, offset_y, &gctx->port.view); } -static void ghid_get_coords(pcb_hid_t *hid, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +static void ghid_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_get_coords(gctx, &gctx->port.view, msg, x, y, force); @@ -274,7 +274,7 @@ } static pcb_hidval_t ghid_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, - pcb_bool (*func)(pcb_hidval_t, int, unsigned int, pcb_hidval_t), pcb_hidval_t user_data) + rnd_bool (*func)(pcb_hidval_t, int, unsigned int, pcb_hidval_t), pcb_hidval_t user_data) { return pcb_gtk_watch_file((pcb_gtk_t *)hid->hid_data, fd, condition, func, user_data); } @@ -284,7 +284,7 @@ return pcb_gtk_fileselect((pcb_gtk_t *)hid->hid_data, title, descr, default_file, default_ext, flt, history_tag, flags, sub); } -static void *ghid_attr_dlg_new_(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, pcb_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +static void *ghid_attr_dlg_new_(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { return ghid_attr_dlg_new((pcb_gtk_t *)hid->hid_data, id, attrs, n_attrs, title, caller_data, modal, button_cb, defx, defy, minx, miny); } @@ -300,7 +300,7 @@ pcb_gtk_dlg_attributes(gctx->port.top_window, owner, attrs); } -static void PointCursor(pcb_hid_t *hid, pcb_bool grabbed) +static void PointCursor(pcb_hid_t *hid, rnd_bool grabbed) { pcb_gtk_t *gctx = hid->hid_data; @@ -444,13 +444,13 @@ pcb_gtk_tw_dock_leave(&gctx->topwin, sub); } -static void ghid_zoom_win(pcb_hid_t *hid, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_bool set_crosshair) +static void ghid_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_zoom_view_win_side(&gctx->port.view, x1, y1, x2, y2, set_crosshair); } -static void ghid_zoom(pcb_hid_t *hid, pcb_coord_t center_x, pcb_coord_t center_y, double factor, int relative) +static void ghid_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { pcb_gtk_t *gctx = hid->hid_data; if (relative) @@ -459,7 +459,7 @@ pcb_gtk_zoom_view_abs(&gctx->port.view, center_x, center_y, factor); } -static void ghid_pan(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, int relative) +static void ghid_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { pcb_gtk_t *gctx = hid->hid_data; if (relative) @@ -468,7 +468,7 @@ pcb_gtk_pan_view_abs(&gctx->port.view, x, y, gctx->port.view.canvas_width/2.0, gctx->port.view.canvas_height/2.0); } -static void ghid_pan_mode(pcb_hid_t *hid, pcb_coord_t x, pcb_coord_t y, pcb_bool mode) +static void ghid_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { pcb_gtk_t *gctx = hid->hid_data; gctx->port.view.panning = mode; @@ -500,7 +500,7 @@ menu = pcb_gtk_menu_widget(menu_node); if (!GTK_IS_MENU(menu)) { - pcb_message(PCB_MSG_ERROR, "The specified popup menu \"%s\" has not been defined.\n", menupath); + rnd_message(PCB_MSG_ERROR, "The specified popup menu \"%s\" has not been defined.\n", menupath); return 1; } @@ -548,7 +548,7 @@ pcb_gtk_tw_set_title(&gctx->topwin, title); } -static void ghid_busy(pcb_hid_t *hid, pcb_bool busy) +static void ghid_busy(pcb_hid_t *hid, rnd_bool busy) { pcb_gtk_t *gctx = hid->hid_data; if ((gctx == NULL) || (!gctx->hid_active)) @@ -623,7 +623,7 @@ ghid_init_pixmap_(gtk_px); } -static void ghid_draw_pixmap(pcb_hid_t *hid, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, const pcb_pixmap_t *pixmap) +static void ghid_draw_pixmap(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const pcb_pixmap_t *pixmap) { pcb_gtk_t *gctx = hid->hid_data; TODO("gfx: this use of sx/sy ignores rotation"); @@ -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, (pcb_coord_t)rsx, (pcb_coord_t)rsy); +pcb_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 30902) +++ trunk/src_plugins/lib_gtk_common/in_keyboard.c (revision 30903) @@ -140,7 +140,7 @@ key = gdk_keyval_from_name(desc); if (key > 0xffff) { - pcb_message(PCB_MSG_WARNING, "Ignoring invalid/exotic key sym: '%s'\n", desc); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/lib_gtk_common/in_mouse.c (revision 30903) @@ -88,7 +88,7 @@ } -void ghid_point_cursor(pcb_gtk_t *ctx, pcb_bool grabbed) +void ghid_point_cursor(pcb_gtk_t *ctx, rnd_bool grabbed) { if (grabbed) { static GdkCursor *xc; @@ -385,7 +385,7 @@ return; } } - pcb_message(PCB_MSG_ERROR, "Failed to register named mouse cursor for tool: '%s' is unknown name\n", name); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Failed to set mouse cursor for unregistered tool %d\n", idx); + rnd_message(PCB_MSG_ERROR, "Failed to set mouse cursor for unregistered tool %d\n", idx); return; } Index: trunk/src_plugins/lib_gtk_common/in_mouse.h =================================================================== --- trunk/src_plugins/lib_gtk_common/in_mouse.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/in_mouse.h (revision 30903) @@ -24,7 +24,7 @@ void ghid_port_set_mouse_cursor(pcb_gtk_t *ctx, int idx); void ghid_watch_cursor(pcb_gtk_t *ctx); /* Override the cursor appearance to signifies a wait state */ -void ghid_point_cursor(pcb_gtk_t *ctx, pcb_bool grabbed); /* Override the cursor appearance to signifies a point is found */ +void ghid_point_cursor(pcb_gtk_t *ctx, rnd_bool grabbed); /* Override the cursor appearance to signifies a point is found */ void ghid_mode_cursor(pcb_gtk_t *ctx); /* Changes the normal cursor appearance according to last set mode, but respect override */ void ghid_restore_cursor(pcb_gtk_t *ctx); /* Remove override and restore the mode cursor */ Index: trunk/src_plugins/lib_gtk_common/lib_gtk_config.c =================================================================== --- trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30903) @@ -113,10 +113,10 @@ if ((nat == NULL) || (nat->prop->src == NULL)) continue; if (!warned) { - pcb_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(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"); warned = 1; } - pcb_message(PCB_MSG_WARNING, "%s from %s:%d\n", nat->hash_path, nat->prop->src->file_name, nat->prop->src->line); + rnd_message(PCB_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/pcb_gtk.h =================================================================== --- trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30903) @@ -61,17 +61,17 @@ gboolean (*preview_expose)(GtkWidget *widget, pcb_gtk_expose_t *p, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx); /* p == NULL when called from the code, not from a GUI expose event */ void (*load_bg_image)(void); void (*init_renderer)(int *argc, char ***argv, void *port); - void (*draw_grid_local)(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy); + void (*draw_grid_local)(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy); /* screen */ void (*screen_update)(void); void (*shutdown_renderer)(void *port); - pcb_bool (*map_color)(const pcb_color_t *inclr, pcb_gtk_color_t *color); + rnd_bool (*map_color)(const pcb_color_t *inclr, pcb_gtk_color_t *color); const gchar *(*get_color_name)(pcb_gtk_color_t *color); void (*set_special_colors)(conf_native_t *cfg); - void (*draw_pixmap)(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, pcb_coord_t ox, pcb_coord_t oy, pcb_coord_t dw, pcb_coord_t dh); + void (*draw_pixmap)(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t dw, rnd_coord_t dh); }; #include "../src_plugins/lib_gtk_common/ui_zoompan.h" @@ -157,7 +157,7 @@ GtkWidget *top_window, /* toplevel widget */ *drawing_area; /* and its drawing area */ - pcb_bool drawing_allowed; /* track if a drawing area is available for rendering */ + rnd_bool drawing_allowed; /* track if a drawing area is available for rendering */ struct render_priv_s *render_priv; Index: trunk/src_plugins/lib_gtk_common/ui_crosshair.c =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_crosshair.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/ui_crosshair.c (revision 30903) @@ -35,13 +35,13 @@ #include "hid_gtk_conf.h" #include "ui_zoompan.h" -void pcb_gtk_crosshair_set(pcb_coord_t x, pcb_coord_t y, int action, int offset_x, int offset_y, pcb_gtk_view_t *view) +void pcb_gtk_crosshair_set(rnd_coord_t x, rnd_coord_t y, int action, int offset_x, int offset_y, pcb_gtk_view_t *view) { GdkDisplay *display; GdkScreen *screen; int widget_x, widget_y; int pointer_x, pointer_y; - pcb_coord_t pcb_x, pcb_y; + rnd_coord_t pcb_x, pcb_y; if (view->crosshair_x != x || view->crosshair_y != y) { view->crosshair_x = x; Index: trunk/src_plugins/lib_gtk_common/ui_crosshair.h =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_crosshair.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/ui_crosshair.h (revision 30903) @@ -1,5 +1,5 @@ #include #include "ui_zoompan.h" -void pcb_gtk_crosshair_set(pcb_coord_t x, pcb_coord_t y, int action, int offset_x, int offset_y, pcb_gtk_view_t *view); +void pcb_gtk_crosshair_set(rnd_coord_t x, rnd_coord_t y, int action, int offset_x, int offset_y, pcb_gtk_view_t *view); Index: trunk/src_plugins/lib_gtk_common/ui_zoompan.c =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 30903) @@ -42,7 +42,7 @@ min_zoom = 200; - /* max zoom is calculated so that zoom * canvas_size * 2 doesn't overflow pcb_coord_t */ + /* max zoom is calculated so that zoom * canvas_size * 2 doesn't overflow rnd_coord_t */ max_zoom_w = (double)COORD_MAX / (double)vw->canvas_width; max_zoom_h = (double)COORD_MAX / (double)vw->canvas_height; max_zoom = MIN(max_zoom_w, max_zoom_h) / 2.0; @@ -89,7 +89,7 @@ pcb_gtk_pan_common(); } -pcb_bool pcb_gtk_coords_pcb2event(const pcb_gtk_view_t *v, pcb_coord_t pcb_x, pcb_coord_t pcb_y, int *event_x, int *event_y) +rnd_bool pcb_gtk_coords_pcb2event(const pcb_gtk_view_t *v, rnd_coord_t pcb_x, rnd_coord_t pcb_y, int *event_x, int *event_y) { *event_x = DRAW_X(v, pcb_x); *event_y = DRAW_Y(v, pcb_y); @@ -97,7 +97,7 @@ return pcb_true; } -pcb_bool pcb_gtk_coords_event2pcb(const pcb_gtk_view_t *v, int event_x, int event_y, pcb_coord_t * pcb_x, pcb_coord_t * pcb_y) +rnd_bool pcb_gtk_coords_event2pcb(const pcb_gtk_view_t *v, int event_x, int event_y, rnd_coord_t * pcb_x, rnd_coord_t * pcb_y) { *pcb_x = pcb_round(EVENT_TO_PCB_X(v, event_x)); *pcb_y = pcb_round(EVENT_TO_PCB_Y(v, event_y)); @@ -118,11 +118,11 @@ * * gport->view_width and gport->view_height are in PCB coordinates */ -void pcb_gtk_zoom_view_abs(pcb_gtk_view_t *v, pcb_coord_t center_x, pcb_coord_t center_y, double new_zoom) +void pcb_gtk_zoom_view_abs(pcb_gtk_view_t *v, rnd_coord_t center_x, rnd_coord_t center_y, double new_zoom) { double clamped_zoom; double xtmp, ytmp; - pcb_coord_t cmaxx, cmaxy; + rnd_coord_t cmaxx, cmaxy; clamped_zoom = pcb_gtk_clamp_zoom(v, new_zoom); if (clamped_zoom != new_zoom) @@ -153,13 +153,13 @@ -void pcb_gtk_zoom_view_rel(pcb_gtk_view_t *v, pcb_coord_t center_x, pcb_coord_t center_y, double factor) +void pcb_gtk_zoom_view_rel(pcb_gtk_view_t *v, rnd_coord_t center_x, rnd_coord_t center_y, double factor) { pcb_gtk_zoom_view_abs(v, center_x, center_y, v->coord_per_px * factor); } TODO(": remove this and make the side-correct version the default (rename that to this short name); check when looking from the bottom: library window, drc window") -void pcb_gtk_zoom_view_win(pcb_gtk_view_t *v, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void pcb_gtk_zoom_view_win(pcb_gtk_view_t *v, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double xf, yf; @@ -177,7 +177,7 @@ } /* Side-correct version - long term this will be kept and the other is removed */ -void pcb_gtk_zoom_view_win_side(pcb_gtk_view_t *v, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int setch) +void pcb_gtk_zoom_view_win_side(pcb_gtk_view_t *v, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch) { double xf, yf; @@ -199,7 +199,7 @@ } } -void pcb_gtk_pan_view_abs(pcb_gtk_view_t *v, pcb_coord_t pcb_x, pcb_coord_t pcb_y, double widget_x, double widget_y) +void pcb_gtk_pan_view_abs(pcb_gtk_view_t *v, rnd_coord_t pcb_x, rnd_coord_t pcb_y, double widget_x, double widget_y) { v->x0 = pcb_round((double)SIDE_X(v, pcb_x) - (double)widget_x * v->coord_per_px); v->y0 = pcb_round((double)SIDE_Y(v, pcb_y) - (double)widget_y * v->coord_per_px); @@ -207,7 +207,7 @@ uiz_pan_common(v); } -void pcb_gtk_pan_view_rel(pcb_gtk_view_t *v, pcb_coord_t dx, pcb_coord_t dy) +void pcb_gtk_pan_view_rel(pcb_gtk_view_t *v, rnd_coord_t dx, rnd_coord_t dy) { v->x0 += dx; v->y0 += dy; @@ -215,7 +215,7 @@ uiz_pan_common(v); } -void pcb_gtk_get_coords(pcb_gtk_t *ctx, pcb_gtk_view_t *vw, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force) +void pcb_gtk_get_coords(pcb_gtk_t *ctx, pcb_gtk_view_t *vw, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { if ((force || !vw->has_entered) && msg) if (!ghid_get_user_xy(ctx, msg)) Index: trunk/src_plugins/lib_gtk_common/ui_zoompan.h =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_zoompan.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/ui_zoompan.h (revision 30903) @@ -40,8 +40,8 @@ #define DRAW_X(view, x) (gint)((SIDE_X((view), x) - (view)->x0) / (view)->coord_per_px) #define DRAW_Y(view, y) (gint)((SIDE_Y((view), y) - (view)->y0) / (view)->coord_per_px) -#define EVENT_TO_PCB_X_(hidlib, view, x) (pcb_coord_t)pcb_round(SIDE_X_((hidlib), (double)(x) * (view)->coord_per_px + (double)(view)->x0)) -#define EVENT_TO_PCB_Y_(hidlib, view, y) (pcb_coord_t)pcb_round(SIDE_Y_((hidlib), (double)(y) * (view)->coord_per_px + (double)(view)->y0)) +#define EVENT_TO_PCB_X_(hidlib, view, x) (rnd_coord_t)pcb_round(SIDE_X_((hidlib), (double)(x) * (view)->coord_per_px + (double)(view)->x0)) +#define EVENT_TO_PCB_Y_(hidlib, view, y) (rnd_coord_t)pcb_round(SIDE_Y_((hidlib), (double)(y) * (view)->coord_per_px + (double)(view)->y0)) #define EVENT_TO_PCB_X(view, x) EVENT_TO_PCB_X_((view)->ctx->hidlib, view, (x)) #define EVENT_TO_PCB_Y(view, y) EVENT_TO_PCB_Y_((view)->ctx->hidlib, view, (y)) @@ -49,22 +49,22 @@ typedef struct { double coord_per_px; /* Zoom level described as PCB units per screen pixel */ - pcb_coord_t x0; - pcb_coord_t y0; - pcb_coord_t width; - pcb_coord_t height; + rnd_coord_t x0; + rnd_coord_t y0; + rnd_coord_t width; + rnd_coord_t height; unsigned inhibit_pan_common:1; /* when 1, do not call pcb_gtk_pan_common() */ unsigned use_max_pcb:1; /* when 1, use PCB->Max*; when 0, use the following two: */ - pcb_coord_t max_width; - pcb_coord_t max_height; + rnd_coord_t max_width; + rnd_coord_t max_height; int canvas_width, canvas_height; - pcb_bool has_entered; - pcb_bool panning; - pcb_coord_t pcb_x, pcb_y; /* PCB coordinates of the mouse pointer */ - pcb_coord_t crosshair_x, crosshair_y; /* PCB coordinates of the crosshair */ + rnd_bool has_entered; + rnd_bool panning; + rnd_coord_t pcb_x, pcb_y; /* PCB coordinates of the mouse pointer */ + rnd_coord_t crosshair_x, crosshair_y; /* PCB coordinates of the crosshair */ struct pcb_gtk_s *ctx; } pcb_gtk_view_t; @@ -75,26 +75,26 @@ coord_per_px or the clamped value if it was too small or too large. */ double pcb_gtk_clamp_zoom(const pcb_gtk_view_t *vw, double coord_per_px); -void pcb_gtk_pan_view_abs(pcb_gtk_view_t *v, pcb_coord_t pcb_x, pcb_coord_t pcb_y, double widget_x, double widget_y); -void pcb_gtk_pan_view_rel(pcb_gtk_view_t *v, pcb_coord_t dx, pcb_coord_t dy); -void pcb_gtk_zoom_view_abs(pcb_gtk_view_t *v, pcb_coord_t center_x, pcb_coord_t center_y, double new_zoom); -void pcb_gtk_zoom_view_rel(pcb_gtk_view_t *v, pcb_coord_t center_x, pcb_coord_t center_y, double factor); -void pcb_gtk_zoom_view_win_side(pcb_gtk_view_t *v, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, int setch); +void pcb_gtk_pan_view_abs(pcb_gtk_view_t *v, rnd_coord_t pcb_x, rnd_coord_t pcb_y, double widget_x, double widget_y); +void pcb_gtk_pan_view_rel(pcb_gtk_view_t *v, rnd_coord_t dx, rnd_coord_t dy); +void pcb_gtk_zoom_view_abs(pcb_gtk_view_t *v, rnd_coord_t center_x, rnd_coord_t center_y, double new_zoom); +void pcb_gtk_zoom_view_rel(pcb_gtk_view_t *v, rnd_coord_t center_x, rnd_coord_t center_y, double factor); +void pcb_gtk_zoom_view_win_side(pcb_gtk_view_t *v, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch); /* obsolete, do not use (kept temporarily for preview) */ -void pcb_gtk_zoom_view_win(pcb_gtk_view_t *v, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); +void pcb_gtk_zoom_view_win(pcb_gtk_view_t *v, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); /* Updates width and heigth using the new zoom level; call after a call to pcb_gtk_zoom_*() */ void pcb_gtk_zoom_post(pcb_gtk_view_t *v); -pcb_bool pcb_gtk_coords_pcb2event(const pcb_gtk_view_t *v, pcb_coord_t pcb_x, pcb_coord_t pcb_y, int *event_x, int *event_y); -pcb_bool pcb_gtk_coords_event2pcb(const pcb_gtk_view_t *v, int event_x, int event_y, pcb_coord_t * pcb_x, pcb_coord_t * pcb_y); +rnd_bool pcb_gtk_coords_pcb2event(const pcb_gtk_view_t *v, rnd_coord_t pcb_x, rnd_coord_t pcb_y, int *event_x, int *event_y); +rnd_bool pcb_gtk_coords_event2pcb(const pcb_gtk_view_t *v, int event_x, int event_y, rnd_coord_t * pcb_x, rnd_coord_t * pcb_y); -void pcb_gtk_get_coords(pcb_gtk_t *ctx, pcb_gtk_view_t *vw, const char *msg, pcb_coord_t *x, pcb_coord_t *y, int force); +void pcb_gtk_get_coords(pcb_gtk_t *ctx, pcb_gtk_view_t *vw, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); /* Update adj limits to match the current zoom level */ -static inline void pcb_gtk_zoom_adjustment(GtkAdjustment *adj, pcb_coord_t view_size, pcb_coord_t board_size) +static inline void pcb_gtk_zoom_adjustment(GtkAdjustment *adj, rnd_coord_t view_size, rnd_coord_t board_size) { adj->page_size = MIN(view_size, board_size); adj->lower = -view_size; Index: trunk/src_plugins/lib_gtk_common/util_listener.c =================================================================== --- trunk/src_plugins/lib_gtk_common/util_listener.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/util_listener.c (revision 30903) @@ -50,7 +50,7 @@ if (condition & G_IO_HUP) { - pcb_message(PCB_MSG_ERROR, "gtk listener: Read end of pipe died!\n"); + rnd_message(PCB_MSG_ERROR, "gtk listener: Read end of pipe died!\n"); return FALSE; } @@ -63,22 +63,22 @@ break; case G_IO_STATUS_ERROR: - pcb_message(PCB_MSG_ERROR, "gtk listener: status from g_io_channel_read_line\n"); + rnd_message(PCB_MSG_ERROR, "gtk listener: status from g_io_channel_read_line\n"); return FALSE; break; case G_IO_STATUS_EOF: - pcb_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(PCB_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: - pcb_message(PCB_MSG_ERROR, "gtk listener: AGAIN status from g_io_channel_read_line\n"); + rnd_message(PCB_MSG_ERROR, "gtk listener: AGAIN status from g_io_channel_read_line\n"); return FALSE; break; default: - pcb_message(PCB_MSG_ERROR, "gtk listener: unhandled error case\n"); + rnd_message(PCB_MSG_ERROR, "gtk listener: unhandled error case\n"); return FALSE; break; } Index: trunk/src_plugins/lib_gtk_common/util_watch.c =================================================================== --- trunk/src_plugins/lib_gtk_common/util_watch.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/util_watch.c (revision 30903) @@ -32,7 +32,7 @@ #include "glue_common.h" typedef struct pcb_gtk_watch_s { - pcb_bool (*func)(pcb_hidval_t, int, unsigned int, pcb_hidval_t); + rnd_bool (*func)(pcb_hidval_t, int, unsigned int, pcb_hidval_t); pcb_hidval_t user_data; int fd; GIOChannel *channel; @@ -46,7 +46,7 @@ unsigned int pcb_condition = 0; pcb_hidval_t x; pcb_gtk_watch_t *watch = (pcb_gtk_watch_t *)data; - pcb_bool res; + rnd_bool res; if (condition & G_IO_IN) pcb_condition |= PCB_WATCH_READABLE; @@ -66,7 +66,7 @@ } pcb_hidval_t pcb_gtk_watch_file(pcb_gtk_t *gctx, int fd, unsigned int condition, - pcb_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), + rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_gtk_watch_t *watch = g_new0(pcb_gtk_watch_t, 1); Index: trunk/src_plugins/lib_gtk_common/util_watch.h =================================================================== --- trunk/src_plugins/lib_gtk_common/util_watch.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/util_watch.h (revision 30903) @@ -2,7 +2,7 @@ #include "pcb_gtk.h" pcb_hidval_t pcb_gtk_watch_file(pcb_gtk_t *gctx, int fd, unsigned int condition, - pcb_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), + rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data); void pcb_gtk_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data); Index: trunk/src_plugins/lib_gtk_common/wt_preview.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30902) +++ trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 30903) @@ -44,7 +44,7 @@ #include "draw.h" #include -static void get_ptr(pcb_gtk_preview_t *preview, pcb_coord_t *cx, pcb_coord_t *cy, gint *xp, gint *yp); +static void get_ptr(pcb_gtk_preview_t *preview, rnd_coord_t *cx, rnd_coord_t *cy, gint *xp, gint *yp); static void perview_update_offs(pcb_gtk_preview_t *preview) { @@ -54,8 +54,8 @@ yf = (double)preview->view.height / preview->view.canvas_height; preview->view.coord_per_px = (xf > yf ? xf : yf); - preview->xoffs = (pcb_coord_t)(preview->view.width / 2 - preview->view.canvas_width * preview->view.coord_per_px / 2); - preview->yoffs = (pcb_coord_t)(preview->view.height / 2 - preview->view.canvas_height * preview->view.coord_per_px / 2); + preview->xoffs = (rnd_coord_t)(preview->view.width / 2 - preview->view.canvas_width * preview->view.coord_per_px / 2); + preview->yoffs = (rnd_coord_t)(preview->view.height / 2 - preview->view.canvas_height * preview->view.coord_per_px / 2); } static void pcb_gtk_preview_update_x0y0(pcb_gtk_preview_t *preview) @@ -89,8 +89,8 @@ } /* modify the zoom level to coord_per_px (clamped), keeping window cursor - position wx;wy at perview pcb_coord_t position cx;cy */ -void pcb_gtk_preview_zoom_cursor(pcb_gtk_preview_t *preview, pcb_coord_t cx, pcb_coord_t cy, int wx, int wy, double coord_per_px) + position wx;wy at perview rnd_coord_t position cx;cy */ +void pcb_gtk_preview_zoom_cursor(pcb_gtk_preview_t *preview, rnd_coord_t cx, rnd_coord_t cy, int wx, int wy, double coord_per_px) { int orig; @@ -118,7 +118,7 @@ preview->view.inhibit_pan_common = orig; } -void pcb_gtk_preview_zoom_cursor_rel(pcb_gtk_preview_t *preview, pcb_coord_t cx, pcb_coord_t cy, int wx, int wy, double factor) +void pcb_gtk_preview_zoom_cursor_rel(pcb_gtk_preview_t *preview, rnd_coord_t cx, rnd_coord_t cy, int wx, int wy, double factor) { pcb_gtk_preview_zoom_cursor(preview, cx, cy, wx, wy, preview->view.coord_per_px * factor); } @@ -314,7 +314,7 @@ static gboolean button_press_(GtkWidget *w, pcb_hid_cfg_mod_t btn) { pcb_gtk_preview_t *preview = (pcb_gtk_preview_t *) w; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; gint wx, wy; get_ptr(preview, &cx, &cy, &wx, &wy); void *draw_data = NULL; @@ -393,7 +393,7 @@ { pcb_gtk_preview_t *preview = (pcb_gtk_preview_t *) w; gint wx, wy; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; void *draw_data = NULL; int save_fx, save_fy; @@ -434,7 +434,7 @@ { pcb_gtk_preview_t *preview = (pcb_gtk_preview_t *) w; int save_fx, save_fy; - pcb_coord_t cx, cy; + rnd_coord_t cx, cy; gint wx, wy; void *draw_data = NULL; @@ -570,7 +570,7 @@ } /* Has to be at the end since it undef's SIDE_X */ -static void get_ptr(pcb_gtk_preview_t *preview, pcb_coord_t *cx, pcb_coord_t *cy, gint *xp, gint *yp) +static void get_ptr(pcb_gtk_preview_t *preview, rnd_coord_t *cx, rnd_coord_t *cy, gint *xp, gint *yp) { gdkc_window_get_pointer(GTK_WIDGET(preview), xp, yp, NULL); #undef SIDE_X Index: trunk/src_plugins/lib_gtk_common/wt_preview.h =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 30902) +++ trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 30903) @@ -58,7 +58,7 @@ typedef void (*pcb_gtk_init_drawing_widget_t)(GtkWidget *widget, void *port); typedef void (*pcb_gtk_preview_config_t)(pcb_gtk_preview_t *gp, GtkWidget *widget); typedef gboolean(*pcb_gtk_preview_expose_t)(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx); -typedef pcb_bool(*pcb_gtk_preview_mouse_ev_t)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y); +typedef rnd_bool(*pcb_gtk_preview_mouse_ev_t)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); struct pcb_gtk_preview_s { GtkDrawingArea parent_instance; @@ -66,11 +66,11 @@ pcb_hid_expose_ctx_t expose_data; pcb_gtk_view_t view; - pcb_coord_t x_min, y_min, x_max, y_max; /* for the obj preview: bounding box */ + rnd_coord_t x_min, y_min, x_max, y_max; /* for the obj preview: bounding box */ gint w_pixels, h_pixels; /* natural size of object preview */ gint win_w, win_h; - pcb_coord_t xoffs, yoffs; /* difference between desired x0;y0 and the actual window's top left coords */ + rnd_coord_t xoffs, yoffs; /* difference between desired x0;y0 and the actual window's top left coords */ void *gport; pcb_gtk_init_drawing_widget_t init_drawing_widget; @@ -78,7 +78,7 @@ pcb_gtk_preview_expose_t expose; pcb_gtk_preview_mouse_ev_t mouse_cb; pcb_hid_expose_t overlay_draw_cb; - pcb_coord_t grabx, graby; + rnd_coord_t grabx, graby; time_t grabt; long grabmot; Index: trunk/src_plugins/lib_hid_common/act_dad.c =================================================================== --- trunk/src_plugins/lib_hid_common/act_dad.c (revision 30902) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 30903) @@ -78,7 +78,7 @@ dad_t *dad; if (htsp_get(&dads, name) != NULL) { - pcb_message(PCB_MSG_ERROR, "Can't create named DAD dialog %s: already exists\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Too many DAD %s values\n", cmd); + rnd_message(PCB_MSG_ERROR, "Too many DAD %s values\n", cmd); return -1; } next = strchr(s, '\t'); @@ -222,7 +222,7 @@ } if (dad == NULL) { - pcb_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); + rnd_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); RND_ACT_IRES(-1); return 0; } @@ -288,7 +288,7 @@ rv = PCB_DAD_CURRENT(dad->dlg); } else if (pcb_strcasecmp(cmd, "coord") == 0) { - pcb_coord_t vmin, vmax; + rnd_coord_t vmin, vmax; if (dad->running) goto cant_chg; txt = ""; RND_PCB_ACT_CONVARG(3, FGW_COORD_, dad, vmin = fgw_coord(&argv[3])); @@ -358,7 +358,7 @@ if (row != NULL) { if (!fgw_ptr_in_domain(&rnd_fgw, &argv[3], dad->row_domain)) { - pcb_message(PCB_MSG_ERROR, "Invalid DAD row pointer\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid DAD flag: %s (ignored)\n", txt); + rnd_message(PCB_MSG_ERROR, "Invalid DAD flag: %s (ignored)\n", txt); flg |= tmp; } PCB_DAD_COMPFLAG(dad->dlg, flg); @@ -445,12 +445,12 @@ else if (pcb_strcasecmp(cmd, "set") == 0) { int wid, i; double d; - pcb_coord_t c; + rnd_coord_t c; pcb_hid_attr_type_t wtype; RND_PCB_ACT_CONVARG(3, FGW_INT, dad, wid = argv[3].val.nat_int); if ((wid < 0) || (wid >= dad->dlg_len)) { - pcb_message(PCB_MSG_ERROR, "Invalid widget ID %d (set ignored)\n", wid); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Invalid widget type %d - can not change value (set ignored)\n", wid); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid widget ID %d (get ignored)\n", wid); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid unit %s (get ignored)\n", txt); + rnd_message(PCB_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: - pcb_message(PCB_MSG_ERROR, "Invalid widget type %d - can not retrieve value (get ignored)\n", wid); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid DAD dialog structure: %d levels not closed (missing 'end' calls)\n", dad->level); + rnd_message(PCB_MSG_ERROR, "Invalid DAD dialog structure: %d levels not closed (missing 'end' calls)\n", dad->level); rv = -1; } else { @@ -551,7 +551,7 @@ } } else { - pcb_message(PCB_MSG_ERROR, "Invalid DAD dialog command: '%s'\n", cmd); + rnd_message(PCB_MSG_ERROR, "Invalid DAD dialog command: '%s'\n", cmd); rv = -1; } @@ -559,7 +559,7 @@ return 0; cant_chg:; - pcb_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); + rnd_message(PCB_MSG_ERROR, "Can't find named DAD dialog %s\n", dlgname); RND_ACT_IRES(-1); return 0; } Index: trunk/src_plugins/lib_hid_common/clip.h =================================================================== --- trunk/src_plugins/lib_hid_common/clip.h (revision 30902) +++ trunk/src_plugins/lib_hid_common/clip.h (revision 30903) @@ -35,7 +35,7 @@ /* Clip X,Y to the given bounding box, plus a margin. Returns pcb_true if there is something left to be drawn. */ -PCB_INLINE pcb_bool pcb_line_clip(double minx, double miny, double maxx, double maxy, double *x1, double *y1, double *x2, double *y2, double margin) +PCB_INLINE rnd_bool pcb_line_clip(double minx, double miny, double maxx, double maxy, double *x1, double *y1, double *x2, double *y2, double margin) { double d, r; Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30902) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30903) @@ -54,7 +54,7 @@ return; if (nat->type != CFN_LIST) { - pcb_message(PCB_MSG_ERROR, "grid_install_menu(): conf node editor/grids should be a list\n"); + rnd_message(PCB_MSG_ERROR, "grid_install_menu(): conf node editor/grids should be a list\n"); return; } Index: trunk/src_plugins/lib_hid_common/lead_user.c =================================================================== --- trunk/src_plugins/lib_hid_common/lead_user.c (revision 30902) +++ trunk/src_plugins/lib_hid_common/lead_user.c (revision 30903) @@ -38,8 +38,8 @@ #define LEAD_ANIM_SPEED 0.6 #define LEAD_PERIOD_MS 100 -static pcb_coord_t leadx, leady, step; -static pcb_bool lead; +static rnd_coord_t leadx, leady, step; +static rnd_bool lead; static pcb_hidval_t lead_timer; static rnd_hidlib_t *lead_hidlib; @@ -56,7 +56,7 @@ lead_timer = pcb_gui->add_timer(pcb_gui, lead_cb, LEAD_PERIOD_MS, user_data); } -static void pcb_lead_user_to_location(rnd_hidlib_t *hidlib, pcb_coord_t x, pcb_coord_t y, pcb_bool enabled) +static void pcb_lead_user_to_location(rnd_hidlib_t *hidlib, rnd_coord_t x, rnd_coord_t y, rnd_bool enabled) { pcb_hidval_t user_data; @@ -92,7 +92,7 @@ { if (lead) { pcb_hid_gc_t *gc = argv[1].d.p; - pcb_coord_t x = leadx + step, y = leady + step; + rnd_coord_t x = leadx + step, y = leady + step; assert(argv[1].type == PCB_EVARG_PTR); Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30902) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30903) @@ -67,7 +67,7 @@ int len, multiarg; len = cp - name; if (len > sizeof(buff)-1) { - pcb_message(PCB_MSG_ERROR, "hid_get_flag: action name too long: %s()\n", name); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "hid_get_flag: no action %s\n", name); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "hid_get_flag: action arg too long or unterminated: %s\n", name); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/lib_hid_common/menu_helper.h (revision 30903) @@ -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 pcb_message(PCB_MSG_ERROR, ) if +/* Return non-zero if submenu has further submenus; generate rnd_message(PCB_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 pcb_message(PCB_MSG_ERROR, ) if +/* Return a text field of a submenu; return NULL and generate a rnd_message(PCB_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 30902) +++ trunk/src_plugins/lib_hid_common/place.c (revision 30903) @@ -139,7 +139,7 @@ nat = pcb_conf_get_field(path); if ((nat == NULL) || (nat->prop->src == NULL) || (nat->prop->src->type != LHT_TEXT)) { - pcb_message(PCB_MSG_ERROR, "Can not load window geometry from invalid node for %s\n", path); + rnd_message(PCB_MSG_ERROR, "Can not load window geometry from invalid node for %s\n", path); return; } @@ -228,7 +228,7 @@ if (role != CFR_DESIGN) { int r = pcb_conf_save_file(hidlib, NULL, (hidlib == NULL ? NULL : hidlib->filename), role, NULL); if (r != 0) - pcb_message(PCB_MSG_ERROR, "Failed to save window geometry in %s\n", pcb_conf_role_name(role)); + rnd_message(PCB_MSG_ERROR, "Failed to save window geometry in %s\n", pcb_conf_role_name(role)); } } Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30902) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30903) @@ -115,7 +115,7 @@ tool = (pcb_tool_t **)vtp0_get(&pcb_tools, tid, 0); if ((tid < 0) || (tool == NULL)) { - pcb_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(PCB_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 30902) +++ trunk/src_plugins/lib_hid_common/zoompan.c (revision 30903) @@ -41,7 +41,7 @@ rnd_hidlib_t *hidlib = RND_ACT_HIDLIB; const char *vp, *ovp; double v; - pcb_coord_t x = 0, y = 0; + rnd_coord_t x = 0, y = 0; PCB_GUI_NOGUI(); @@ -51,7 +51,7 @@ } if (argc == 5) { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; RND_PCB_ACT_CONVARG(1, FGW_COORD, Zoom, x1 = fgw_coord(&argv[1])); RND_PCB_ACT_CONVARG(2, FGW_COORD, Zoom, y1 = fgw_coord(&argv[2])); @@ -68,7 +68,7 @@ RND_PCB_ACT_CONVARG(1, FGW_STR, Zoom, ovp = vp = argv[1].val.str); if (*vp == '?') { - pcb_message(PCB_MSG_INFO, "Current zoom level (coord-per-pix): %$mm\n", pcb_gui->coord_per_pix); + rnd_message(PCB_MSG_INFO, "Current zoom level (coord-per-pix): %$mm\n", pcb_gui->coord_per_pix); return 0; } @@ -108,7 +108,7 @@ fgw_error_t pcb_act_Pan(fgw_arg_t *res, int argc, fgw_arg_t *argv) { int mode; - pcb_coord_t x, y; + rnd_coord_t x, y; PCB_GUI_NOGUI(); @@ -126,7 +126,7 @@ /* DOC: center.html */ fgw_error_t pcb_act_Center(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; PCB_GUI_NOGUI(); rnd_hid_get_coords("Click to center", &x, &y, 0); Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30902) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30903) @@ -50,7 +50,7 @@ } static pcb_composite_op_t composite_op = PCB_HID_COMP_RESET; -static pcb_bool direct_mode = pcb_true; +static rnd_bool direct_mode = pcb_true; static int comp_stencil_bit = 0; static GLfloat *grid_points = NULL; @@ -57,7 +57,7 @@ static int grid_point_capacity = 0; -static inline void mode_reset(pcb_bool direct, const pcb_box_t *screen) +static inline void mode_reset(rnd_bool direct, const pcb_box_t *screen) { drawgl_flush(); drawgl_reset(); @@ -67,7 +67,7 @@ comp_stencil_bit = 0; } -static inline void mode_positive(pcb_bool direct, const pcb_box_t *screen) +static inline void mode_positive(rnd_bool direct, const pcb_box_t *screen) { if (comp_stencil_bit == 0) comp_stencil_bit = stencilgl_allocate_clear_stencil_bit(); @@ -79,7 +79,7 @@ stencilgl_mode_write_set(comp_stencil_bit); } -static inline void mode_positive_xor(pcb_bool direct, const pcb_box_t *screen) +static inline void mode_positive_xor(rnd_bool direct, const pcb_box_t *screen) { drawgl_flush(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); @@ -88,7 +88,7 @@ glLogicOp(GL_XOR); } -static inline void mode_negative(pcb_bool direct, const pcb_box_t *screen) +static inline void mode_negative(rnd_bool direct, const pcb_box_t *screen) { glEnable(GL_STENCIL_TEST); glDisable(GL_COLOR_LOGIC_OP); @@ -110,7 +110,7 @@ drawgl_set_marker(); } -static inline void mode_flush(pcb_bool direct, pcb_bool xor_mode, const pcb_box_t *screen) +static inline void mode_flush(rnd_bool direct, rnd_bool xor_mode, const pcb_box_t *screen) { drawgl_flush(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); @@ -140,9 +140,9 @@ return composite_op; } -void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { - pcb_bool xor_mode = (composite_op == PCB_HID_COMP_POSITIVE_XOR ? pcb_true : pcb_false); + rnd_bool xor_mode = (composite_op == PCB_HID_COMP_POSITIVE_XOR ? pcb_true : pcb_false); /* If the previous mode was NEGATIVE then all of the primitives drawn * in that mode were used only for creating the stencil and will not be @@ -181,7 +181,7 @@ } -void hidgl_fill_rect(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void hidgl_fill_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { drawgl_add_triangle(x1, y1, x1, y2, x2, y2); drawgl_add_triangle(x2, y1, x2, y2, x1, y1); @@ -196,10 +196,10 @@ } } -void hidgl_draw_local_grid(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy, int radius) +void hidgl_draw_local_grid(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy, int radius) { int npoints = 0; - pcb_coord_t x, y; + rnd_coord_t x, y; /* PI is approximated with 3.25 here - allows a minimal overallocation, speeds up calculations */ const int r2 = radius * radius; @@ -227,7 +227,7 @@ void hidgl_draw_grid(rnd_hidlib_t *hidlib, pcb_box_t *drawn_area) { - pcb_coord_t x1, y1, x2, y2, n, i; + rnd_coord_t x1, y1, x2, y2, n, i; double x, y; x1 = pcb_grid_fit(MAX(0, drawn_area->X1), hidlib->grid, hidlib->grid_ox); @@ -236,13 +236,13 @@ y2 = pcb_grid_fit(MIN(hidlib->size_y, drawn_area->Y2), hidlib->grid, hidlib->grid_oy); if (x1 > x2) { - pcb_coord_t tmp = x1; + rnd_coord_t tmp = x1; x1 = x2; x2 = tmp; } if (y1 > y2) { - pcb_coord_t tmp = y1; + rnd_coord_t tmp = y1; y1 = y2; y2 = tmp; } @@ -281,7 +281,7 @@ #define MIN_TRIANGLES_PER_CAP 3 #define MAX_TRIANGLES_PER_CAP 90 -static void draw_cap(pcb_coord_t width, pcb_coord_t x, pcb_coord_t y, pcb_angle_t angle, double scale) +static void draw_cap(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, pcb_angle_t angle, double scale) { float last_capx, last_capy; float capx, capy; @@ -310,13 +310,13 @@ #define NEEDS_CAP(width, coord_per_pix) (width > coord_per_pix) -void hidgl_draw_line(int cap, pcb_coord_t width, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, double scale) +void hidgl_draw_line(int cap, rnd_coord_t width, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, double scale) { double angle; float deltax, deltay, length; float wdx, wdy; int circular_caps = 0; - pcb_coord_t orig_width = width; + rnd_coord_t orig_width = width; if ((width == 0) || (!NEEDS_CAP(orig_width, scale))) drawgl_add_line(x1, y1, x2, y2); @@ -380,7 +380,7 @@ #define MIN_SLICES_PER_ARC 6 #define MAX_SLICES_PER_ARC 360 -void hidgl_draw_arc(pcb_coord_t width, pcb_coord_t x, pcb_coord_t y, pcb_coord_t rx, pcb_coord_t ry, pcb_angle_t start_angle, pcb_angle_t delta_angle, double scale) +void hidgl_draw_arc(rnd_coord_t width, rnd_coord_t x, rnd_coord_t y, rnd_coord_t rx, rnd_coord_t ry, pcb_angle_t start_angle, pcb_angle_t delta_angle, double scale) { float last_inner_x, last_inner_y; float last_outer_x, last_outer_y; @@ -395,7 +395,7 @@ int slices; int i; int hairline = 0; - pcb_coord_t orig_width = width; + rnd_coord_t orig_width = width; /* TODO: Draw hairlines as lines instead of triangles ? */ @@ -461,17 +461,17 @@ } } -void hidgl_draw_rect(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +void hidgl_draw_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { drawgl_add_rectangle(x1, y1, x2, y2); } -void hidgl_draw_texture_rect( pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, unsigned long texture_id ) +void hidgl_draw_texture_rect( rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned long texture_id ) { drawgl_add_texture_quad(x1,y1,0.0,0.0, x2,y1,1.0,0.0, x2,y2,1.0,1.0, x1,y2,0.0,1.0, texture_id); } -void hidgl_fill_circle(pcb_coord_t vx, pcb_coord_t vy, pcb_coord_t vr, double scale) +void hidgl_fill_circle(rnd_coord_t vx, rnd_coord_t vy, rnd_coord_t vr, double scale) { #define MIN_TRIANGLES_PER_CIRCLE 6 #define MAX_TRIANGLES_PER_CIRCLE 360 @@ -598,7 +598,7 @@ } /* Intentaional code duplication for performance */ -void hidgl_fill_polygon(int n_coords, pcb_coord_t *x, pcb_coord_t *y) +void hidgl_fill_polygon(int n_coords, rnd_coord_t *x, rnd_coord_t *y) { int i; GLUtesselator *tobj; @@ -633,7 +633,7 @@ } /* Intentaional code duplication for performance */ -void hidgl_fill_polygon_offs(int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +void hidgl_fill_polygon_offs(int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; GLUtesselator *tobj; Index: trunk/src_plugins/lib_hid_gl/hidgl.h =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30902) +++ trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30903) @@ -29,20 +29,20 @@ #define PCB_HID_COMMON_HIDGL_H /*extern float global_depth;*/ -void hidgl_draw_local_grid(rnd_hidlib_t *hidlib, pcb_coord_t cx, pcb_coord_t cy, int radius); +void hidgl_draw_local_grid(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy, int radius); void hidgl_draw_grid(rnd_hidlib_t *hidlib, pcb_box_t *drawn_area); void hidgl_set_depth(float depth); -void hidgl_draw_line(int cap, pcb_coord_t width, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, double scale); -void hidgl_draw_arc(pcb_coord_t width, pcb_coord_t vx, pcb_coord_t vy, pcb_coord_t vrx, pcb_coord_t vry, pcb_angle_t start_angle, pcb_angle_t delta_angle, double scale); -void hidgl_draw_rect(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); -void hidgl_draw_texture_rect( pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, unsigned long texture_id ); -void hidgl_fill_circle(pcb_coord_t vx, pcb_coord_t vy, pcb_coord_t vr, double scale); -void hidgl_fill_polygon(int n_coords, pcb_coord_t *x, pcb_coord_t *y); -void hidgl_fill_polygon_offs(int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy); +void hidgl_draw_line(int cap, rnd_coord_t width, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, double scale); +void hidgl_draw_arc(rnd_coord_t width, rnd_coord_t vx, rnd_coord_t vy, rnd_coord_t vrx, rnd_coord_t vry, pcb_angle_t start_angle, pcb_angle_t delta_angle, double scale); +void hidgl_draw_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +void hidgl_draw_texture_rect( rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned long texture_id ); +void hidgl_fill_circle(rnd_coord_t vx, rnd_coord_t vy, rnd_coord_t vr, double scale); +void hidgl_fill_polygon(int n_coords, rnd_coord_t *x, rnd_coord_t *y); +void hidgl_fill_polygon_offs(int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); void hidgl_fill_pcb_polygon(pcb_polyarea_t *poly, const pcb_box_t *clip_box, double scale, int fullpoly); -void hidgl_fill_rect(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2); +void hidgl_fill_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); void hidgl_init(void); -void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen); +void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen); pcb_composite_op_t hidgl_get_drawing_mode(); #endif /* PCB_HID_COMMON_HIDGL_H */ Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 30902) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 30903) @@ -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 - pcb_message(PCB_MSG_ERROR, "Can't zoom to selection: nothing selected\n"); + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "Can't zoom to 'found': nothing found\n"); + rnd_message(PCB_MSG_ERROR, "Can't zoom to 'found': nothing found\n"); return 0; } } @@ -88,9 +88,9 @@ { pcb_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); pcb_layergrp_id_t comp_group = -1, solder_group = -1; - pcb_bool comp_on = pcb_false, solder_on = pcb_false; + rnd_bool comp_on = pcb_false, solder_on = pcb_false; pcb_box_t vb; - pcb_coord_t x, y; + rnd_coord_t x, y; double xcent, ycent, xoffs, yoffs; PCB_GUI_NOGUI(); @@ -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, (pcb_coord_t)xcent, (pcb_coord_t)ycent, (pcb_coord_t)xoffs, (pcb_coord_t)yoffs);*/ +/* 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);*/ 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; @@ -164,7 +164,7 @@ conf_toggle_editor(show_solder_side); if ((active_group == comp_group && comp_on && !solder_on) || (active_group == solder_group && solder_on && !comp_on)) { - pcb_bool new_solder_vis = conf_core.editor.show_solder_side; + rnd_bool new_solder_vis = conf_core.editor.show_solder_side; if (comp_group >= 0) pcb_layervis_change_group_vis(&PCB->hidlib, PCB->LayerGroups.grp[comp_group].lid[0], !new_solder_vis, !new_solder_vis); @@ -174,7 +174,7 @@ pcb_draw_inhibit_dec(); -/*pcb_trace("-jump-> %mm;%mm -> %mm;%mm\n", x, y, (pcb_coord_t)(x + xoffs), (pcb_coord_t)(y + yoffs));*/ +/*pcb_trace("-jump-> %mm;%mm -> %mm;%mm\n", x, y, (rnd_coord_t)(x + xoffs), (rnd_coord_t)(y + yoffs));*/ pcb_gui->pan(pcb_gui, pcb_round(x + xoffs), pcb_round(y + yoffs), 0); pcb_gui->set_crosshair(pcb_gui, x, y, HID_SC_PAN_VIEWPORT); @@ -216,7 +216,7 @@ switch(ctx_sens) { case CTX_OBJ_TYPE: { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_objtype_t type; void *o1, *o2, *o3; pcb_any_obj_t *o; Index: trunk/src_plugins/lib_hid_pcbui/layersel.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30902) +++ trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30903) @@ -258,7 +258,7 @@ static void layer_select(ls_layer_t *lys) { - pcb_bool *vis = NULL; + rnd_bool *vis = NULL; if (lys->ly != NULL) { if (lys->grp_vis) { @@ -272,7 +272,7 @@ PCB->RatDraw = 0; } else if (lys->ml != NULL) { - vis = (pcb_bool *)((char *)PCB + lys->ml->vis_offs); + vis = (rnd_bool *)((char *)PCB + lys->ml->vis_offs); *vis = 1; rnd_actionva(&PCB->hidlib, "SelectLayer", lys->ml->select_name, NULL); } @@ -396,12 +396,12 @@ static void layer_vis_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { ls_layer_t *lys = attr->user_data; - pcb_bool *vis; + rnd_bool *vis; if (lys->ly != NULL) vis = &lys->ly->meta.real.vis; else if (lys->ml != NULL) - vis = (pcb_bool *)((char *)PCB + lys->ml->vis_offs); + vis = (rnd_bool *)((char *)PCB + lys->ml->vis_offs); else return; @@ -796,10 +796,10 @@ lys = (ls_layer_t **)ls->menu_layer.array; for(ml = pcb_menu_layers; ml->name != NULL; ml++,lys++) { - pcb_bool *b; + rnd_bool *b; if (*lys == NULL) continue; - b = (pcb_bool *)((char *)PCB + ml->vis_offs); + b = (rnd_bool *)((char *)PCB + ml->vis_offs); lys_update_vis(*lys, *b); } Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30902) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_ERROR, "had to increase the via ring diameter - can not be smaller than the hole"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "route style does not exist"); + rnd_message(PCB_MSG_ERROR, "route style does not exist"); return; } @@ -158,7 +158,7 @@ } else { - pcb_message(PCB_MSG_ERROR, "Internal error: route style field does not exist"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid route style %ld index; max value: %ld\n", idx, vtroutestyle_len(&PCB->RouteStyle)-1); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "No style selected\n"); + rnd_message(PCB_MSG_ERROR, "No style selected\n"); RND_ACT_IRES(-1); } } Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30902) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30903) @@ -196,9 +196,9 @@ status.buf.used = 0; if (pcb_marked.status) { - pcb_coord_t dx = pcb_crosshair.X - pcb_marked.X; - pcb_coord_t dy = pcb_crosshair.Y - pcb_marked.Y; - pcb_coord_t r = pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, pcb_marked.X, pcb_marked.Y); + rnd_coord_t dx = pcb_crosshair.X - pcb_marked.X; + rnd_coord_t dy = pcb_crosshair.Y - pcb_marked.Y; + rnd_coord_t r = pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, pcb_marked.X, pcb_marked.Y); double a = atan2(dy, dx) * PCB_RAD_TO_DEG; s1 = status.buf.array; @@ -377,7 +377,7 @@ const char pcb_acth_DescribeLocation[] = "Return a string constant (valud until the next call) containing a short description at x;y (object, net, etc.)"; fgw_error_t pcb_act_DescribeLocation(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; void *ptr1, *ptr2, *ptr3; pcb_any_obj_t *obj; int type; Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30902) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30903) @@ -65,15 +65,15 @@ #if 0 /* debug helper */ -static void cross(FILE *f, pcb_coord_t x, pcb_coord_t y) +static void cross(FILE *f, rnd_coord_t x, rnd_coord_t y) { - static pcb_coord_t cs = PCB_MM_TO_COORD(0.2); + static rnd_coord_t cs = PCB_MM_TO_COORD(0.2); pcb_fprintf(f, "line %#mm %#mm %#mm %#mm\n", x - cs, y, x + cs, y); pcb_fprintf(f, "line %#mm %#mm %#mm %#mm\n", x, y - cs, x, y + cs); } #endif -pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags) +pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { pcb_cardinal_t cnt = 0; vtp0_t tracks; @@ -100,7 +100,7 @@ return cnt; } -pcb_bool pcb_pline_is_aligned(const pcb_pline_t *src) +rnd_bool pcb_pline_is_aligned(const pcb_pline_t *src) { const pcb_vnode_t *v, *n; @@ -115,7 +115,7 @@ } -pcb_bool pcb_cpoly_is_simple_rect(const pcb_poly_t *p) +rnd_bool pcb_cpoly_is_simple_rect(const pcb_poly_t *p) { if (p->Clipped->f != p->Clipped) return pcb_false; /* more than one islands */ @@ -145,7 +145,7 @@ return res; } -static void add_track_seg(pcb_cpoly_edgetree_t *dst, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void add_track_seg(pcb_cpoly_edgetree_t *dst, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_cpoly_edge_t *e = &dst->edges[dst->used++]; pcb_box_t *b = &e->bbox; @@ -179,7 +179,7 @@ static void add_track(pcb_cpoly_edgetree_t *dst, pcb_pline_t *track) { int go, first = 1; - pcb_coord_t x, y, px, py; + rnd_coord_t x, y, px, py; pcb_poly_it_t it; it.cntr = track; @@ -197,7 +197,7 @@ /* collect all edge lines (contour and holes) in an rtree, calculate the bbox */ -pcb_cpoly_edgetree_t *pcb_cpoly_edgetree_create(const pcb_poly_t *src, pcb_coord_t offs) +pcb_cpoly_edgetree_t *pcb_cpoly_edgetree_create(const pcb_poly_t *src, rnd_coord_t offs) { pcb_poly_it_t it; pcb_polyarea_t *pa; @@ -240,8 +240,8 @@ typedef struct { int used; - pcb_coord_t at; - pcb_coord_t coord[1]; + rnd_coord_t at; + rnd_coord_t coord[1]; } intersect_t; static pcb_r_dir_t pcb_cploy_hatch_edge_hor(const pcb_box_t *region, void *cl) @@ -284,7 +284,7 @@ static int coord_cmp(const void *p1, const void *p2) { - const pcb_coord_t *c1 = p1, *c2 = p2; + const rnd_coord_t *c1 = p1, *c2 = p2; if (*c1 < *c2) return -1; return 1; @@ -291,7 +291,7 @@ } -void pcb_cpoly_hatch(const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, pcb_coord_t offs, pcb_coord_t period, void *ctx, void (*cb)(void *ctx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2)) +void pcb_cpoly_hatch(const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t offs, rnd_coord_t period, void *ctx, void (*cb)(void *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2)) { pcb_cpoly_edgetree_t *etr; pcb_box_t scan; @@ -303,10 +303,10 @@ etr = pcb_cpoly_edgetree_create(src, offs); - is = malloc(sizeof(intersect_t) + sizeof(pcb_coord_t) * etr->alloced); + is = malloc(sizeof(intersect_t) + sizeof(rnd_coord_t) * etr->alloced); if (dir & PCB_CPOLY_HATCH_HORIZONTAL) { - pcb_coord_t y; + rnd_coord_t y; for(y = etr->bbox.Y1; y <= etr->bbox.Y2; y += period) { scan.X1 = -PCB_MAX_COORD; @@ -317,7 +317,7 @@ is->used = 0; is->at = y; pcb_r_search(etr->edge_tree, &scan, NULL, pcb_cploy_hatch_edge_hor, is, NULL); - qsort(is->coord, is->used, sizeof(pcb_coord_t), coord_cmp); + qsort(is->coord, is->used, sizeof(rnd_coord_t), coord_cmp); for(n = 1; n < is->used; n+=2) /* call the callback for the odd scan lines */ cb(ctx, is->coord[n-1], y, is->coord[n], y); } @@ -324,7 +324,7 @@ } if (dir & PCB_CPOLY_HATCH_VERTICAL) { - pcb_coord_t x; + rnd_coord_t x; for(x = etr->bbox.X1; x <= etr->bbox.X2; x += period) { scan.Y1 = -PCB_MAX_COORD; @@ -335,7 +335,7 @@ is->used = 0; is->at = x; pcb_r_search(etr->edge_tree, &scan, NULL, pcb_cploy_hatch_edge_ver, is, NULL); - qsort(is->coord, is->used, sizeof(pcb_coord_t), coord_cmp); + qsort(is->coord, is->used, sizeof(rnd_coord_t), coord_cmp); for(n = 1; n < is->used; n+=2) /* call the callback for the odd scan lines */ cb(ctx, x, is->coord[n-1], x, is->coord[n]); } @@ -348,17 +348,17 @@ typedef struct { pcb_layer_t *dst; - pcb_coord_t thickness, clearance; + rnd_coord_t thickness, clearance; pcb_flag_t flags; } hatch_ctx_t; -static void hatch_cb(void *ctx_, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void hatch_cb(void *ctx_, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { hatch_ctx_t *ctx = (hatch_ctx_t *)ctx_; pcb_line_new(ctx->dst, x1, y1, x2, y2, ctx->thickness, ctx->clearance, ctx->flags); } -void pcb_cpoly_hatch_lines(pcb_layer_t *dst, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, pcb_coord_t period, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags) +void pcb_cpoly_hatch_lines(pcb_layer_t *dst, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t period, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { hatch_ctx_t ctx; @@ -371,7 +371,7 @@ pcb_cpoly_hatch(src, dir, (thickness/2)+1, period, &ctx, hatch_cb); } -static int polyhatch_gui(pcb_coord_t *period, pcb_cpoly_hatchdir_t *dir, pcb_flag_t *flg, int *want_contour) +static int polyhatch_gui(rnd_coord_t *period, pcb_cpoly_hatchdir_t *dir, pcb_flag_t *flg, int *want_contour) { int wspc, wcont, whor, wver, wclr; pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", -1}, {"ok", 0}, {NULL, 0}}; @@ -436,7 +436,7 @@ static fgw_error_t pcb_act_PolyHatch(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *op, *arg = NULL; - pcb_coord_t period = 0; + rnd_coord_t period = 0; pcb_cpoly_hatchdir_t dir = 0; pcb_flag_t flg; int want_contour = 0, want_poly = 0, cont_specd = 0; @@ -452,10 +452,10 @@ } else { if (op != NULL) { - pcb_bool succ; + rnd_bool succ; period = pcb_get_value(op, NULL, NULL, &succ); if (!succ) { - pcb_message(PCB_MSG_ERROR, "Invalid spacing value - must be a coordinate\n"); + rnd_message(PCB_MSG_ERROR, "Invalid spacing value - must be a coordinate\n"); return -1; } } @@ -508,7 +508,7 @@ static const char pcb_acth_PolyOffs[] = "replicate the outer contour of the selected polygon(s) with growing or shrinking them by offset; the new polygon is drawn on the current layer"; static fgw_error_t pcb_act_PolyOffs(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t offs; + rnd_coord_t offs; RND_PCB_ACT_CONVARG(1, FGW_COORD, PolyOffs, offs = fgw_coord(&argv[1])); Index: trunk/src_plugins/lib_polyhelp/polyhelp.h =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30902) +++ trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30903) @@ -32,20 +32,20 @@ /* Add lines on dst tracing pline from the inner side (no line will extend outside of the original pline, except when the original polygon has a hair narrower than thickness). Returns number of lines created */ -pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags); +pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); /* Returns whether the clipped polygon is a simple rectangle (single island, no-hole rectangle). */ -pcb_bool pcb_cpoly_is_simple_rect(const pcb_poly_t *p); +rnd_bool pcb_cpoly_is_simple_rect(const pcb_poly_t *p); /* Returns whether all edges of a pline are axis aligned */ -pcb_bool pcb_pline_is_aligned(const pcb_pline_t *src); +rnd_bool pcb_pline_is_aligned(const pcb_pline_t *src); /*** Generate an rtree of all edges if a polygon */ typedef struct { pcb_box_t bbox; - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; } pcb_cpoly_edge_t; typedef struct { @@ -55,7 +55,7 @@ pcb_cpoly_edge_t edges[1]; } pcb_cpoly_edgetree_t; -pcb_cpoly_edgetree_t *pcb_cpoly_edgetree_create(const pcb_poly_t *src, pcb_coord_t offs); +pcb_cpoly_edgetree_t *pcb_cpoly_edgetree_create(const pcb_poly_t *src, rnd_coord_t offs); void pcb_cpoly_edgetree_destroy(pcb_cpoly_edgetree_t *etr); @@ -69,8 +69,8 @@ /* hatch a polygon with horizontal and/or vertical lines drawn on dst, one line per period */ -void pcb_cpoly_hatch_lines(pcb_layer_t *dst, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, pcb_coord_t period, pcb_coord_t thickness, pcb_coord_t clearance, pcb_flag_t flags); +void pcb_cpoly_hatch_lines(pcb_layer_t *dst, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t period, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); /* Generic hor-ver hatch with a callback */ -void pcb_cpoly_hatch(const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, pcb_coord_t offs, pcb_coord_t period, void *ctx, void (*cb)(void *ctx, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2)); +void pcb_cpoly_hatch(const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t offs, rnd_coord_t period, void *ctx, void (*cb)(void *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2)); Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 30902) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 30903) @@ -54,13 +54,13 @@ vtp0_t *list; vti0_t *endlist; pcb_any_obj_t *curr, *result; - pcb_coord_t tx, ty; + rnd_coord_t tx, ty; pcb_dynf_t mark; } next_conn_t; static pcb_r_dir_t next_conn_found_arc(const pcb_box_t *box, void *cl) { - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; next_conn_t *ctx = cl; pcb_any_obj_t *obj = (pcb_any_obj_t *)box; int n; @@ -115,7 +115,7 @@ pcb_line_t *l; int n; next_conn_t ctx; - pcb_coord_t cx[2], cy[2]; + rnd_coord_t cx[2], cy[2]; /* determine the endpoints of the current object */ switch(curr->type) { @@ -151,7 +151,7 @@ pcb_r_search(curr->parent.layer->arc_tree, ®ion, NULL, next_conn_found_arc, &ctx, &len); if (len > 1) { - pcb_message(PCB_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "map_contour(): contour is not a clean loop: it contains at least one stub or subloop\n"); + rnd_message(PCB_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) @@ -194,7 +194,7 @@ return 0; } -static int contour2poly_cb(void *uctx, pcb_coord_t x, pcb_coord_t y) +static int contour2poly_cb(void *uctx, rnd_coord_t x, rnd_coord_t y) { pcb_poly_t *poly = uctx; pcb_poly_point_new(poly, x, y); @@ -253,7 +253,7 @@ pcb_poly_t *poly; if (!VALID_TYPE(start)) { - pcb_message(PCB_MSG_ERROR, "pcb_topoly_conn(): starting object is not a line or arc\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "pcb_topoly_conn(): failed to find a closed loop of lines and arcs\n"); + rnd_message(PCB_MSG_ERROR, "pcb_topoly_conn(): failed to find a closed loop of lines and arcs\n"); vtp0_uninit(&objs); vti0_uninit(&ends); return NULL; @@ -288,7 +288,7 @@ pcb_layer_id_t lid; pcb_layer_t *layer; pcb_any_obj_t *best = NULL; - pcb_coord_t x, y; + rnd_coord_t x, y; double bestd = (double)pcb->hidlib.size_y*(double)pcb->hidlib.size_y + (double)pcb->hidlib.size_x*(double)pcb->hidlib.size_x; for(lid = 0; lid < pcb->Data->LayerN; lid++) { @@ -345,10 +345,10 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, topoly, op = argv[1].val.str); if (op == NULL) { - pcb_coord_t x, y; + 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) { - pcb_message(PCB_MSG_ERROR, "ToPoly(): failed to find a line or arc there\n"); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Invalid first argument\n"); + rnd_message(PCB_MSG_ERROR, "Invalid first argument\n"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 30902) +++ trunk/src_plugins/loghid/hid-logger.c (revision 30903) @@ -37,7 +37,7 @@ return delegatee_->parse_arguments(delegatee_, argc, argv); } -static void log_invalidate_lr(pcb_hid_t *hid, pcb_coord_t left, pcb_coord_t right, pcb_coord_t top, pcb_coord_t bottom) +static void log_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { pcb_fprintf(out_, "invalidate_lr(%mm, %mm, %mm, %mm)\n", left, right, top, bottom); delegatee_->invalidate_lr(hid, left, right, top, bottom); @@ -49,13 +49,13 @@ delegatee_->invalidate_all(hid); } -static void log_notify_crosshair_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void log_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) { pcb_fprintf(out_, "pcb_hid_notify_crosshair_change(%s)\n", changes_complete ? "true" : "false"); delegatee_->notify_crosshair_change(hid, changes_complete); } -static void log_notify_mark_change(pcb_hid_t *hid, pcb_bool changes_complete) +static void log_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) { pcb_fprintf(out_, "pcb_notify_mark_change(%s)\n", changes_complete ? "true" : "false"); delegatee_->notify_mark_change(hid, changes_complete); @@ -85,7 +85,7 @@ delegatee_->destroy_gc(gc); } -static void log_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, pcb_bool direct, const pcb_box_t *screen) +static void log_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const pcb_box_t *screen) { if (screen != NULL) pcb_fprintf(out_, "set_drawing_mode(%d,%d,[%mm;%mm,%mm;%mm])\n", op, direct, screen->X1, screen->Y1, screen->X2, screen->Y2); @@ -120,7 +120,7 @@ delegatee_->set_line_cap(gc, style); } -static void log_set_line_width(pcb_hid_gc_t gc, pcb_coord_t width) +static void log_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) { pcb_fprintf(out_, "set_line_width(gc, %d)\n", width); delegatee_->set_line_width(gc, width); @@ -138,13 +138,13 @@ delegatee_->set_draw_faded(gc, faded); } -static void log_draw_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void log_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "draw_line(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_line(gc, x1, y1, x2, y2); } -static void log_draw_arc(pcb_hid_gc_t gc, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t xradius, pcb_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) +static void log_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, pcb_angle_t start_angle, pcb_angle_t delta_angle) { pcb_fprintf(out_, "draw_arc(gc, %mm, %mm, rx=%mm, ry=%mm, start_angle=%.1f, delta_a=%.1f)\n", cx, cy, xradius, yradius, start_angle, delta_angle); @@ -151,19 +151,19 @@ delegatee_->draw_arc(gc, cx, cy, xradius, yradius, start_angle, delta_angle); } -static void log_draw_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void log_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "draw_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_rect(gc, x1, y1, x2, y2); } -static void log_fill_circle(pcb_hid_gc_t gc, pcb_coord_t x, pcb_coord_t y, pcb_coord_t r) +static void log_fill_circle(pcb_hid_gc_t gc, rnd_coord_t x, rnd_coord_t y, rnd_coord_t r) { pcb_fprintf(out_, "fill_circle(gc, %mm, %mm, %mm)\n", x, y, r); delegatee_->fill_circle(gc, x, y, r); } -static void log_fill_polygon(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y) +static void log_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { int i; pcb_fprintf(out_, "fill_polygon(gc, %d", n_coords); @@ -174,7 +174,7 @@ delegatee_->fill_polygon(gc, n_coords, x, y); } -static void log_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, pcb_coord_t *x, pcb_coord_t *y, pcb_coord_t dx, pcb_coord_t dy) +static void log_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; pcb_fprintf(out_, "fill_polygon_offs(gc, %d", n_coords); @@ -185,7 +185,7 @@ delegatee_->fill_polygon_offs(gc, n_coords, x, y, dx, dy); } -static void log_fill_rect(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) +static void log_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "fill_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->fill_rect(gc, x1, y1, x2, y2); @@ -203,7 +203,7 @@ delegatee_ = delegatee; if (delegatee == NULL) { - pcb_message(PCB_MSG_ERROR, "loghid: Invalid target HID.\n"); + rnd_message(PCB_MSG_ERROR, "loghid: Invalid target HID.\n"); exit(1); } Index: trunk/src_plugins/millpath/millpath.c =================================================================== --- trunk/src_plugins/millpath/millpath.c (revision 30902) +++ trunk/src_plugins/millpath/millpath.c (revision 30903) @@ -36,7 +36,7 @@ const char *pcb_millpath_cookie = "millpath plugin"; static pcb_tlp_session_t ctx; -static pcb_coord_t tool_dias[] = { +static rnd_coord_t tool_dias[] = { PCB_MM_TO_COORD(0.5), PCB_MM_TO_COORD(3) }; Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30902) +++ trunk/src_plugins/millpath/toolpath.c (revision 30903) @@ -114,7 +114,7 @@ { sub_layer_text_t *ctx = ctx_; pcb_poly_t *poly = (pcb_poly_t *)obj; - pcb_bool dummy; + rnd_bool dummy; switch(obj->type) { case PCB_OBJ_LINE: sub_layer_line(ctx->pcb, ctx->result, ctx->layer, (pcb_line_t *)obj, ctx->centerline); break; @@ -124,7 +124,7 @@ sub_layer_poly(ctx->pcb, ctx->result, ctx->layer, poly, ctx->centerline); pcb_polyarea_free(&poly->Clipped); break; - default: pcb_message(PCB_MSG_ERROR, "Internal error: toolpath sub_layer_text() invalid object type %ld\n", obj->type); + default: rnd_message(PCB_MSG_ERROR, "Internal error: toolpath sub_layer_text() invalid object type %ld\n", obj->type); } } @@ -305,11 +305,11 @@ } } -static pcb_cardinal_t trace_contour(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, pcb_coord_t extra_offs) +static pcb_cardinal_t trace_contour(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, rnd_coord_t extra_offs) { pcb_poly_it_t it; pcb_polyarea_t *pa; - pcb_coord_t tool_dia = result->tools->dia[tool_idx]; + rnd_coord_t tool_dia = result->tools->dia[tool_idx]; pcb_cardinal_t cnt = 0; for(pa = pcb_poly_island_first(result->fill, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { @@ -326,10 +326,10 @@ return cnt; } -static long trace_spiral(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, pcb_coord_t extra_offs, long passes) +static long trace_spiral(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, rnd_coord_t extra_offs, long passes) { long pass = 0; - pcb_coord_t tool_dia = result->tools->dia[tool_idx]; + rnd_coord_t tool_dia = result->tools->dia[tool_idx]; for(;;) { if ((passes > 0) && (pass >= passes)) @@ -430,7 +430,7 @@ } else { /* check endpoints only if side didn't intersect */ pcb_polyarea_t *c; - pcb_coord_t r = (line->Thickness-1)/2 - 1000; + rnd_coord_t r = (line->Thickness-1)/2 - 1000; int within = 0; c = pcb_poly_from_circle(line->Point1.X, line->Point1.Y, r); @@ -471,7 +471,7 @@ rem = fix_overcuts(pcb, result); if (rem != 0) - pcb_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(PCB_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) \ - pcb_message(PCB_MSG_ERROR, "millpath script: need to call a setup_* function before milling"); \ + rnd_message(PCB_MSG_ERROR, "millpath script: need to call a setup_* function before milling"); \ else \ - pcb_message(PCB_MSG_ERROR, "millpath script: can not call multiple setup_* functions"); \ + rnd_message(PCB_MSG_ERROR, "millpath script: can not call multiple setup_* functions"); \ continue; \ } @@ -512,7 +512,7 @@ } else if (strcmp(argv[0], "trace_contour") == 0) { int tool = 0; - pcb_coord_t extra = 1000; + rnd_coord_t extra = 1000; req_setup(1); if (argc > 1) tool = atoi(argv[1]); if (argc > 2) extra = pcb_get_value(argv[2], NULL, NULL, NULL); @@ -521,7 +521,7 @@ else if (strcmp(argv[0], "trace_spiral") == 0) { long passes = -1; int tool = 0; - pcb_coord_t extra = 1000; + rnd_coord_t extra = 1000; req_setup(1); if (argc > 1) tool = atoi(argv[1]); if (argc > 2) extra = pcb_get_value(argv[2], NULL, NULL, NULL); @@ -532,7 +532,7 @@ long rem = fix_overcuts(pcb, result); req_setup(1); if (rem != 0) - pcb_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(PCB_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/millpath/toolpath.h =================================================================== --- trunk/src_plugins/millpath/toolpath.h (revision 30902) +++ trunk/src_plugins/millpath/toolpath.h (revision 30903) @@ -40,11 +40,11 @@ struct pcb_tlp_tools_s { int used; /* number of tools */ - pcb_coord_t *dia; /* tool diameters */ + rnd_coord_t *dia; /* tool diameters */ }; struct pcb_tlp_line_s { - pcb_coord_t x1, y1, x2, y2; + rnd_coord_t x1, y1, x2, y2; }; struct pcb_tlp_seg_s { @@ -57,7 +57,7 @@ struct pcb_tlp_session_s { const pcb_tlp_tools_t *tools; - pcb_coord_t edge_clearance; /* when milling copper, keep this clearance from the edges */ + rnd_coord_t edge_clearance; /* when milling copper, keep this clearance from the edges */ /* temp data */ pcb_layer_t *res_ply; /* resulting "remove" polygon */ Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 30902) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 30903) @@ -111,7 +111,7 @@ /* returns 0 on succes */ static int proc_short(pcb_any_obj_t *term, pcb_net_t *Snet, pcb_net_t *Tnet, int *cancel) { - pcb_coord_t x, y; + rnd_coord_t x, y; short_conn_t *n, **lut_by_oid, **lut_by_gid, *next; int gids; gr_t *g; @@ -240,7 +240,7 @@ } } else - pcb_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(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); } } Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30902) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30903) @@ -49,11 +49,11 @@ { conf_native_t *n = pcb_conf_get_field(path); if (n == NULL) { - pcb_message(PCB_MSG_ERROR, "Error: can't find config node %s to toggle\n", path); + rnd_message(PCB_MSG_ERROR, "Error: can't find config node %s to toggle\n", path); return; } if (n->type != CFN_BOOLEAN) { - pcb_message(PCB_MSG_ERROR, "Error: config node %s is not a boolean, can't toggle\n", path); + rnd_message(PCB_MSG_ERROR, "Error: config node %s is not a boolean, can't toggle\n", path); return; } @@ -142,7 +142,7 @@ static fgw_error_t pcb_act_Debug(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; int i; printf("Debug:"); for (i = 1; i < argc; i++) { @@ -237,9 +237,9 @@ double rot; const char *refdes = PCB_UNKNOWN(subc->refdes); if (pcb_subc_get_rotation(subc, &rot) == 0) - pcb_message(PCB_MSG_INFO, "%f %s\n", rot, refdes); + rnd_message(PCB_MSG_INFO, "%f %s\n", rot, refdes); else - pcb_message(PCB_MSG_INFO, " %s\n", refdes); + rnd_message(PCB_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) { - pcb_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(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_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) { - pcb_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(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_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) { - pcb_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(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"); return 1; } static fgw_error_t pcb_act_MinMaskGap(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_message(PCB_MSG_ERROR, "MinMaskGap: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ChangeHole: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ChangePaste: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ChangeSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "SetSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ClearSquare: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ChangeOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "SetOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ClearOctagon: deprecated feature; use padstackedit() instead\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/order/order.c (revision 30903) @@ -72,7 +72,7 @@ return 0; } - pcb_message(PCB_MSG_ERROR, "CLI version of OrderPCB() not yet implemented\n"); + rnd_message(PCB_MSG_ERROR, "CLI version of OrderPCB() not yet implemented\n"); RND_ACT_IRES(-1); return 0; } @@ -116,7 +116,7 @@ } } -static void autoload_field_crd(order_ctx_t *octx, pcb_order_field_t *f, pcb_coord_t c) +static void autoload_field_crd(order_ctx_t *octx, pcb_order_field_t *f, rnd_coord_t c) { switch(f->type) { case PCB_HATT_INTEGER: f->val.lng = c; break; Index: trunk/src_plugins/order/order_dlg.c =================================================================== --- trunk/src_plugins/order/order_dlg.c (revision 30902) +++ trunk/src_plugins/order/order_dlg.c (revision 30903) @@ -17,7 +17,7 @@ return -1; /* do not open another */ if (pcb_order_imps.used == 0) { - pcb_message(PCB_MSG_ERROR, "OrderPCB(): there are no ordering plugins compiled/loaded\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 30903) @@ -73,18 +73,18 @@ if (update || (mt < 0) || ((now - mt) > CFG.cache_update_sec)) { if (CFG.verbose) { if (update) - pcb_message(PCB_MSG_INFO, "pcbway: static '%s', updating it in the cache\n", path); + rnd_message(PCB_MSG_INFO, "pcbway: static '%s', updating it in the cache\n", path); else - pcb_message(PCB_MSG_INFO, "pcbway: stale '%s', updating it in the cache\n", path); + rnd_message(PCB_MSG_INFO, "pcbway: stale '%s', updating it in the cache\n", path); } if (pcb_wget_disk(url, path, update, wopts) != 0) { - pcb_message(PCB_MSG_ERROR, "pcbway: failed to download %s\n", url); + rnd_message(PCB_MSG_ERROR, "pcbway: failed to download %s\n", url); return -1; } } else if (CFG.verbose) - pcb_message(PCB_MSG_INFO, "pcbway: '%s' from cache\n", path); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "pcbway: can't open '%s' (%s) for read\n", fn, efn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "xml parsing error on file %s (%s)\n", fn, efn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: failed to parse the country xml\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: wrong root node in the country xml\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: failed to find a node\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: invalid field description: too long\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: too many fields for a form\n"); + rnd_message(PCB_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')) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: no api_key available."); + rnd_message(PCB_MSG_ERROR, "order_pcbway: no api_key available."); return -1; } if (pcbway_cache_update(&PCB->hidlib) != 0) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: failed to update the cache."); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: xml error: invalid API xml\n"); + rnd_message(PCB_MSG_ERROR, "order_pcbway: xml error: invalid API xml\n"); res = -1; } free(country_fn); } else - pcb_message(PCB_MSG_ERROR, "order_pcbway: xml error: root is not \n"); + rnd_message(PCB_MSG_ERROR, "order_pcbway: xml error: root is not \n"); } else - pcb_message(PCB_MSG_ERROR, "order_pcbway: xml error: failed to parse the xml\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: wrong root node on quote answer\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: missing from the quote response\n"); + rnd_message(PCB_MSG_ERROR, "order_pcbway: missing from the quote response\n"); xmlFreeDoc(doc); return -1; } if (xmlStrcmp(status->children->content, (xmlChar *)"ok") != 0) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: server error in quote\n"); + rnd_message(PCB_MSG_ERROR, "order_pcbway: server error in quote\n"); if ((error != NULL) && (error->children != NULL) && (error->children->type == XML_TEXT_NODE)) - pcb_message(PCB_MSG_ERROR, " %s\n", error->children->content); + rnd_message(PCB_MSG_ERROR, " %s\n", error->children->content); xmlFreeDoc(doc); return -1; } @@ -460,7 +460,7 @@ tmpfn = pcb_tempfile_name_new("pcbway_quote.xml"); if (tmpfn == NULL) { - pcb_message(PCB_MSG_ERROR, "order_pcbway: can't get temp file name\n"); + rnd_message(PCB_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) { pcb_tempfile_unlink(tmpfn); - pcb_message(PCB_MSG_ERROR, "order_pcbway: can't open temp file\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "pcbway: failed to get a quote from the server\n"); + rnd_message(PCB_MSG_ERROR, "pcbway: failed to get a quote from the server\n"); goto err; } } Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 30902) +++ trunk/src_plugins/polycombine/polycombine.c (revision 30903) @@ -31,7 +31,7 @@ #include #include "obj_poly.h" -static pcb_polyarea_t *original_poly(pcb_poly_t *p, pcb_bool *forward) +static pcb_polyarea_t *original_poly(pcb_poly_t *p, rnd_bool *forward) { pcb_pline_t *contour = NULL; pcb_polyarea_t *np = NULL; @@ -86,7 +86,7 @@ struct poly_tree { pcb_poly_t *polygon; - pcb_bool forward; + rnd_bool forward; pcb_polyarea_t *polyarea; poly_tree *parent; poly_tree *child; @@ -118,7 +118,7 @@ * contours can be assumed not to overlap, we can drill down in this * order: P1, P2, P3, P4, P5, P6. */ -static pcb_bool PolygonContainsPolygon(pcb_polyarea_t *outer, pcb_polyarea_t *inner) +static rnd_bool PolygonContainsPolygon(pcb_polyarea_t *outer, pcb_polyarea_t *inner) { /* int contours_isect;*/ /* Should check outer contours don't intersect? */ @@ -134,9 +134,9 @@ { poly_tree *cur_node, *next = NULL; /* bool to_insert_isects_cur_node; Intersection */ - pcb_bool to_insert_contains_cur_node; /* Containment */ - pcb_bool cur_node_contains_to_insert; /* Containment */ - pcb_bool placed_to_insert = pcb_false; + rnd_bool to_insert_contains_cur_node; /* Containment */ + rnd_bool cur_node_contains_to_insert; /* Containment */ + rnd_bool placed_to_insert = pcb_false; poly_tree *return_root = start_point; @@ -263,7 +263,7 @@ static fgw_error_t pcb_act_polycombine(fgw_arg_t *res, int argc, fgw_arg_t *argv) { pcb_polyarea_t *rs; - pcb_bool forward; + rnd_bool forward; pcb_polyarea_t *np; /* bool outer; pcb_polyarea_t *pa; Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 30902) +++ trunk/src_plugins/polystitch/polystitch.c (revision 30903) @@ -30,7 +30,7 @@ #include "obj_poly_draw.h" /* Given the X,Y, find the inmost (closest) polygon */ -static pcb_poly_t *find_crosshair_poly(pcb_coord_t x, pcb_coord_t y) +static pcb_poly_t *find_crosshair_poly(rnd_coord_t x, rnd_coord_t y) { double best = 0, dist; pcb_poly_t *res = NULL; @@ -41,8 +41,8 @@ PCB_POLY_POINT_LOOP(polygon); { /* point */ - pcb_coord_t dx = x - point->X; - pcb_coord_t dy = y - point->Y; + rnd_coord_t dx = x - point->X; + rnd_coord_t dy = y - point->Y; dist = (double)dx * dx + (double)dy * dy; if ((dist < best) || (res == NULL)) { res = polygon; @@ -54,7 +54,7 @@ PCB_ENDALL_LOOP; if (res == NULL) - pcb_message(PCB_MSG_ERROR, "Cannot find any polygons"); + rnd_message(PCB_MSG_ERROR, "Cannot find any polygons"); return res; } @@ -76,7 +76,7 @@ } PCB_END_LOOP; - pcb_message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); + rnd_message(PCB_MSG_ERROR, "Cannot find a polygon enclosing the one you selected"); return NULL; } @@ -83,7 +83,7 @@ static fgw_error_t pcb_act_polystitch(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t x, y; + rnd_coord_t x, y; pcb_poly_t *inner_poly, *outer_poly; rnd_hid_get_coords("Select a corner on the inner polygon", &x, &y, 0); Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 30902) +++ trunk/src_plugins/propedit/propdlg.c (revision 30903) @@ -216,7 +216,7 @@ } -static pcb_bool prop_prv_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, pcb_coord_t x, pcb_coord_t y) +static rnd_bool prop_prv_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; /* don't redraw */ } @@ -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) { - pcb_message(PCB_MSG_ERROR, "can not delete: no attribute selected\n"); + rnd_message(PCB_MSG_ERROR, "can not delete: no attribute selected\n"); return; } if (r->path[0] != 'a') { - pcb_message(PCB_MSG_ERROR, "Only atributes (a/ subtree) can be deleted.\n"); + rnd_message(PCB_MSG_ERROR, "Only atributes (a/ subtree) can be deleted.\n"); return; } if (pcb_propsel_del(&ctx->pe, r->path) < 1) { - pcb_message(PCB_MSG_ERROR, "Failed to remove the attribute from any object.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/propedit/propedit.c (revision 30903) @@ -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) - pcb_message(PCB_MSG_ERROR, "No object under the cursor\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Failed to convert object ID: '%s'\n", cmd+7); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "No object under the cursor\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Object under the cursor has no idpath\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid layergrp ID '%s'\n", cmd+9); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid layer ID '%s'\n", cmd+6); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "Invalid scope: %s\n", cmd); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "can't load propedig: layer id type wider than long\n"); + rnd_message(PCB_MSG_ERROR, "can't load propedig: layer id type wider than long\n"); return -1; } if (sizeof(long) < sizeof(pcb_layergrp_id_t)) { - pcb_message(PCB_MSG_ERROR, "can't load propedig: layergrp id type wider than long\n"); + rnd_message(PCB_MSG_ERROR, "can't load propedig: layergrp id type wider than long\n"); return -1; } Index: trunk/src_plugins/propedit/props.h =================================================================== --- trunk/src_plugins/propedit/props.h (revision 30902) +++ trunk/src_plugins/propedit/props.h (revision 30903) @@ -55,7 +55,7 @@ typedef union { const char *string; - pcb_coord_t coord; + rnd_coord_t coord; pcb_angle_t angle; int i; pcb_color_t clr; Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 30902) +++ trunk/src_plugins/propedit/propsel.c (revision 30903) @@ -50,7 +50,7 @@ /*********** map ***********/ #define type2field_String string -#define type2field_pcb_coord_t coord +#define type2field_rnd_coord_t coord #define type2field_pcb_angle_t angle #define type2field_int i #define type2field_bool i @@ -57,7 +57,7 @@ #define type2field_color clr #define type2TYPE_String PCB_PROPT_STRING -#define type2TYPE_pcb_coord_t PCB_PROPT_COORD +#define type2TYPE_rnd_coord_t PCB_PROPT_COORD #define type2TYPE_pcb_angle_t PCB_PROPT_ANGLE #define type2TYPE_int PCB_PROPT_INT #define type2TYPE_bool PCB_PROPT_BOOL @@ -125,8 +125,8 @@ { map_add_prop(ctx, "p/board/name", String, pcb->hidlib.name); map_add_prop(ctx, "p/board/filename", String, pcb->hidlib.filename); - map_add_prop(ctx, "p/board/width", pcb_coord_t, pcb->hidlib.size_x); - map_add_prop(ctx, "p/board/height", pcb_coord_t, pcb->hidlib.size_y); + map_add_prop(ctx, "p/board/width", rnd_coord_t, pcb->hidlib.size_x); + map_add_prop(ctx, "p/board/height", rnd_coord_t, pcb->hidlib.size_y); map_attr(ctx, &pcb->Attributes); } @@ -172,44 +172,44 @@ static void map_line(pcb_propedit_t *ctx, pcb_line_t *line) { - map_add_prop(ctx, "p/trace/thickness", pcb_coord_t, line->Thickness); - map_add_prop(ctx, "p/trace/clearance", pcb_coord_t, line->Clearance/2); + map_add_prop(ctx, "p/trace/thickness", rnd_coord_t, line->Thickness); + map_add_prop(ctx, "p/trace/clearance", rnd_coord_t, line->Clearance/2); map_common(ctx, (pcb_any_obj_t *)line); map_attr(ctx, &line->Attributes); if (ctx->geo) { - map_add_prop(ctx, "p/line/x1", pcb_coord_t, line->Point1.X); - map_add_prop(ctx, "p/line/y1", pcb_coord_t, line->Point1.Y); - map_add_prop(ctx, "p/line/x2", pcb_coord_t, line->Point2.X); - map_add_prop(ctx, "p/line/y2", pcb_coord_t, line->Point2.Y); + map_add_prop(ctx, "p/line/x1", rnd_coord_t, line->Point1.X); + map_add_prop(ctx, "p/line/y1", rnd_coord_t, line->Point1.Y); + map_add_prop(ctx, "p/line/x2", rnd_coord_t, line->Point2.X); + map_add_prop(ctx, "p/line/y2", rnd_coord_t, line->Point2.Y); } } static void map_arc(pcb_propedit_t *ctx, pcb_arc_t *arc) { - map_add_prop(ctx, "p/trace/thickness", pcb_coord_t, arc->Thickness); - map_add_prop(ctx, "p/trace/clearance", pcb_coord_t, arc->Clearance/2); - map_add_prop(ctx, "p/arc/width", pcb_coord_t, arc->Width); - map_add_prop(ctx, "p/arc/height", pcb_coord_t, arc->Height); + map_add_prop(ctx, "p/trace/thickness", rnd_coord_t, arc->Thickness); + map_add_prop(ctx, "p/trace/clearance", rnd_coord_t, arc->Clearance/2); + map_add_prop(ctx, "p/arc/width", rnd_coord_t, arc->Width); + map_add_prop(ctx, "p/arc/height", rnd_coord_t, arc->Height); map_add_prop(ctx, "p/arc/angle/start", pcb_angle_t, arc->StartAngle); map_add_prop(ctx, "p/arc/angle/delta", pcb_angle_t, arc->Delta); map_common(ctx, (pcb_any_obj_t *)arc); map_attr(ctx, &arc->Attributes); if (ctx->geo) { - map_add_prop(ctx, "p/arc/x", pcb_coord_t, arc->X); - map_add_prop(ctx, "p/arc/y", pcb_coord_t, arc->Y); + map_add_prop(ctx, "p/arc/x", rnd_coord_t, arc->X); + map_add_prop(ctx, "p/arc/y", rnd_coord_t, arc->Y); } } static void map_gfx(pcb_propedit_t *ctx, pcb_gfx_t *gfx) { - map_add_prop(ctx, "p/gfx/sx", pcb_coord_t, gfx->sx); - map_add_prop(ctx, "p/gfx/sy", pcb_coord_t, gfx->sy); + map_add_prop(ctx, "p/gfx/sx", rnd_coord_t, gfx->sx); + map_add_prop(ctx, "p/gfx/sy", rnd_coord_t, gfx->sy); map_add_prop(ctx, "p/gfx/rot", pcb_angle_t, gfx->rot); map_common(ctx, (pcb_any_obj_t *)gfx); map_attr(ctx, &gfx->Attributes); if (ctx->geo) { - map_add_prop(ctx, "p/gfx/cx", pcb_coord_t, gfx->cx); - map_add_prop(ctx, "p/gfx/cy", pcb_coord_t, gfx->cy); + map_add_prop(ctx, "p/gfx/cx", rnd_coord_t, gfx->cx); + map_add_prop(ctx, "p/gfx/cy", rnd_coord_t, gfx->cy); } } @@ -218,13 +218,13 @@ map_add_prop(ctx, "p/text/scale", int, text->Scale); map_add_prop(ctx, "p/text/fid", int, text->fid); map_add_prop(ctx, "p/text/rotation", pcb_angle_t, text->rot); - map_add_prop(ctx, "p/text/thickness", pcb_coord_t, text->thickness); + map_add_prop(ctx, "p/text/thickness", rnd_coord_t, text->thickness); map_add_prop(ctx, "p/text/string", String, text->TextString); map_common(ctx, (pcb_any_obj_t *)text); map_attr(ctx, &text->Attributes); if (ctx->geo) { - map_add_prop(ctx, "p/text/x", pcb_coord_t, text->X); - map_add_prop(ctx, "p/text/y", pcb_coord_t, text->Y); + map_add_prop(ctx, "p/text/x", rnd_coord_t, text->X); + map_add_prop(ctx, "p/text/y", rnd_coord_t, text->Y); } } @@ -232,7 +232,7 @@ { map_attr(ctx, &poly->Attributes); map_common(ctx, (pcb_any_obj_t *)poly); - map_add_prop(ctx, "p/trace/clearance", pcb_coord_t, poly->Clearance/2); + map_add_prop(ctx, "p/trace/clearance", rnd_coord_t, poly->Clearance/2); } static void map_pstk(pcb_propedit_t *ctx, pcb_pstk_t *ps) @@ -239,14 +239,14 @@ { pcb_pstk_proto_t *proto; - map_add_prop(ctx, "p/padstack/xmirror", pcb_coord_t, ps->xmirror); - map_add_prop(ctx, "p/padstack/smirror", pcb_coord_t, ps->smirror); + map_add_prop(ctx, "p/padstack/xmirror", rnd_coord_t, ps->xmirror); + map_add_prop(ctx, "p/padstack/smirror", rnd_coord_t, ps->smirror); map_add_prop(ctx, "p/padstack/rotation", pcb_angle_t, ps->rot); - map_add_prop(ctx, "p/padstack/proto", pcb_coord_t, ps->proto); + map_add_prop(ctx, "p/padstack/proto", rnd_coord_t, ps->proto); proto = pcb_pstk_get_proto(ps); - map_add_prop(ctx, "p/padstack/clearance", pcb_coord_t, ps->Clearance); - map_add_prop(ctx, "p/padstack/hole", pcb_coord_t, proto->hdia); + map_add_prop(ctx, "p/padstack/clearance", rnd_coord_t, ps->Clearance); + map_add_prop(ctx, "p/padstack/hole", rnd_coord_t, proto->hdia); map_add_prop(ctx, "p/padstack/plated", int, proto->hplated); map_add_prop(ctx, "p/padstack/htop", int, proto->htop); map_add_prop(ctx, "p/padstack/hbottom", int, proto->hbottom); @@ -255,8 +255,8 @@ map_common(ctx, (pcb_any_obj_t *)ps); if (ctx->geo) { - map_add_prop(ctx, "p/padstack/x", pcb_coord_t, ps->x); - map_add_prop(ctx, "p/padstack/y", pcb_coord_t, ps->y); + map_add_prop(ctx, "p/padstack/x", rnd_coord_t, ps->x); + map_add_prop(ctx, "p/padstack/y", rnd_coord_t, ps->y); } } @@ -290,10 +290,10 @@ map_common(ctx, (pcb_any_obj_t *)msubc); if (ctx->geo) { - pcb_coord_t x, y; + rnd_coord_t x, y; if (pcb_subc_get_origin(msubc, &x, &y) == 0) { - map_add_prop(ctx, "p/subcircuit/x", pcb_coord_t, x); - map_add_prop(ctx, "p/subcircuit/y", pcb_coord_t, y); + map_add_prop(ctx, "p/subcircuit/x", rnd_coord_t, x); + map_add_prop(ctx, "p/subcircuit/y", rnd_coord_t, y); } } } @@ -391,7 +391,7 @@ return 0; } -static int brd_resize(pcb_coord_t w, pcb_coord_t h) +static int brd_resize(rnd_coord_t w, rnd_coord_t h) { pcb_board_resize(w, h, 0); return 1; @@ -792,7 +792,7 @@ if (strncmp(st->name, "p/subcircuit/", 13) == 0) { pcb_opctx_t op; - pcb_coord_t x = 0, y = 0; + rnd_coord_t x = 0, y = 0; const char *pn = st->name + 13; pcb_subc_get_origin(ssubc, &x, &y); Index: trunk/src_plugins/propedit/propsel.h =================================================================== --- trunk/src_plugins/propedit/propsel.h (revision 30902) +++ trunk/src_plugins/propedit/propsel.h (revision 30903) @@ -29,10 +29,10 @@ typedef struct set_ctx_s { const char *s; /* only for string */ - pcb_coord_t c; /* also int */ + rnd_coord_t c; /* also int */ double d; pcb_color_t color; - pcb_bool c_absolute, d_absolute, c_valid, d_valid, clr_valid; + rnd_bool c_absolute, d_absolute, c_valid, d_valid, clr_valid; /* private */ unsigned is_trace:1; Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 30902) +++ trunk/src_plugins/puller/puller.c (revision 30903) @@ -341,7 +341,7 @@ /* DOC: puller.html */ static fgw_error_t pcb_act_Puller(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_coord_t Ux, Uy; + rnd_coord_t Ux, Uy; double arc_angle, base_angle; #if TRACE1 double line_angle, rel_angle; @@ -715,7 +715,7 @@ } case PCB_PSSH_CIRC: { - pcb_coord_t cx = shape->data.circ.x + ps->x, cy = shape->data.circ.y + ps->y; + rnd_coord_t cx = shape->data.circ.x + ps->x, cy = shape->data.circ.y + ps->y; double max_dist2 = ((double)shape->data.circ.dia/2.0) * ((double)shape->data.circ.dia/2.0); double dist2 = pcb_distance2(cx, cy, x, y); return (dist2 <= max_dist2); Index: trunk/src_plugins/query/fnc_glue.c =================================================================== --- trunk/src_plugins/query/fnc_glue.c (revision 30902) +++ trunk/src_plugins/query/fnc_glue.c (revision 30903) @@ -34,7 +34,7 @@ fgw_arg_t tmp, resa, arga[PCB_QRY_MAX_FUNC_ARGS], *arg; if (argv[0].type != PCBQ_VT_STRING) { - pcb_message(PCB_MSG_ERROR, "query: action() first argument must be a string\n"); + rnd_message(PCB_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)) { \ - pcb_message(PCB_MSG_ERROR, "query action(): can not convert object list yet\n"); \ + rnd_message(PCB_MSG_ERROR, "query action(): can not convert object list yet\n"); \ res->type = PCBQ_VT_VOID; \ goto fin; \ } \ else { \ - pcb_message(PCB_MSG_ERROR, "query action(): can not convert unknown pointer\n"); \ + rnd_message(PCB_MSG_ERROR, "query action(): can not convert unknown pointer\n"); \ res->type = PCBQ_VT_VOID; \ goto fin; \ } @@ -178,7 +178,7 @@ static int fnc_netint_any(pcb_qry_exec_t *ectx, int argc, pcb_qry_val_t *argv, pcb_qry_val_t *res, int is_shrink) { - pcb_coord_t shrink = 0, bloat = 0; + rnd_coord_t shrink = 0, bloat = 0; fnc_netint_t ctx; if ((argc != 2) || (argv[0].type != PCBQ_VT_OBJ) || ((argv[1].type != PCBQ_VT_COORD) && (argv[1].type != PCBQ_VT_LONG))) @@ -246,7 +246,7 @@ static int fnc_pstkring(pcb_qry_exec_t *ectx, int argc, pcb_qry_val_t *argv, pcb_qry_val_t *res) { - pcb_coord_t cnt = 0; + rnd_coord_t cnt = 0; pcb_pstk_t *ps; if ((argc != 2) || (argv[0].type != PCBQ_VT_OBJ) || ((argv[1].type != PCBQ_VT_COORD) && (argv[1].type != PCBQ_VT_LONG))) Index: trunk/src_plugins/query/net_int.c =================================================================== --- trunk/src_plugins/query/net_int.c (revision 30902) +++ trunk/src_plugins/query/net_int.c (revision 30903) @@ -40,7 +40,7 @@ #define PCB dontuse TODO("find: get rid of this global state") -extern pcb_coord_t Bloat; +extern rnd_coord_t Bloat; /* evaluates to true if obj was marked on list (fa or fb) */ @@ -63,7 +63,7 @@ return 0; } -pcb_bool pcb_net_integrity(pcb_board_t *pcb, pcb_any_obj_t *from, pcb_coord_t shrink, pcb_coord_t bloat, pcb_int_broken_cb_t *cb, void *cb_data) +rnd_bool pcb_net_integrity(pcb_board_t *pcb, pcb_any_obj_t *from, rnd_coord_t shrink, rnd_coord_t bloat, pcb_int_broken_cb_t *cb, void *cb_data) { pcb_net_int_t ctx; Index: trunk/src_plugins/query/net_int.h =================================================================== --- trunk/src_plugins/query/net_int.h (revision 30902) +++ trunk/src_plugins/query/net_int.h (revision 30903) @@ -9,7 +9,7 @@ pcb_board_t *pcb; pcb_find_t fa, fb; pcb_data_t *data; - pcb_coord_t bloat, shrink; + rnd_coord_t bloat, shrink; unsigned fast:1; unsigned shrunk:1; @@ -24,7 +24,7 @@ /* Check for DRC violations on a single net starting from the pad or pin sees if the connectivity changes when everything is bloated, or shrunk. If shrink or bloat is 0, that side of the test is skipped */ -pcb_bool pcb_net_integrity(pcb_board_t *pcb, pcb_any_obj_t *from, pcb_coord_t shrink, pcb_coord_t bloat, pcb_int_broken_cb_t *cb, void *cb_data); +rnd_bool pcb_net_integrity(pcb_board_t *pcb, pcb_any_obj_t *from, rnd_coord_t shrink, rnd_coord_t bloat, pcb_int_broken_cb_t *cb, void *cb_data); /* Map the network of the from object. If it's a segment of a netlisted net, Index: trunk/src_plugins/query/query.h =================================================================== --- trunk/src_plugins/query/query.h (revision 30902) +++ trunk/src_plugins/query/query.h (revision 30903) @@ -58,7 +58,7 @@ union { pcb_any_obj_t *obj; vtp0_t lst; - pcb_coord_t crd; + rnd_coord_t crd; double dbl; long lng; const char *str; @@ -118,7 +118,7 @@ pcb_qry_node_t *next; /* sibling on this level of the tree (or NULL) */ pcb_qry_node_t *parent; union { /* field selection depends on ->type */ - pcb_coord_t crd; + rnd_coord_t crd; double dbl; const char *str; pcb_query_iter_t *iter_ctx; Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 30902) +++ trunk/src_plugins/query/query_access.c (revision 30903) @@ -466,7 +466,7 @@ case query_fields_thickness: PCB_QRY_RET_COORD(res, l->Thickness); case query_fields_clearance: PCB_QRY_RET_COORD(res, pcb_round((double)l->Clearance/2.0)); case query_fields_length: - PCB_QRY_RET_DBL(res, ((pcb_coord_t)pcb_round(sqrt(pcb_line_len2(l))))); + PCB_QRY_RET_DBL(res, ((rnd_coord_t)pcb_round(sqrt(pcb_line_len2(l))))); break; case query_fields_length2: PCB_QRY_RET_DBL(res, pcb_line_len2(l)); @@ -535,9 +535,9 @@ case query_fields_cy: case query_fields_y: PCB_QRY_RET_COORD(res, a->Y); case query_fields_thickness: PCB_QRY_RET_COORD(res, a->Thickness); - case query_fields_clearance: PCB_QRY_RET_COORD(res, (pcb_coord_t)pcb_round((double)a->Clearance/2.0)); + case query_fields_clearance: PCB_QRY_RET_COORD(res, (rnd_coord_t)pcb_round((double)a->Clearance/2.0)); case query_fields_length: - PCB_QRY_RET_COORD(res, ((pcb_coord_t)pcb_round(pcb_arc_len(a)))); + PCB_QRY_RET_COORD(res, ((rnd_coord_t)pcb_round(pcb_arc_len(a)))); break; case query_fields_length2: { @@ -661,7 +661,7 @@ switch(fh1) { case query_fields_clearance: if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, p)) - PCB_QRY_RET_COORD(res, (pcb_coord_t)pcb_round((double)p->Clearance/2.0)); + PCB_QRY_RET_COORD(res, (rnd_coord_t)pcb_round((double)p->Clearance/2.0)); else PCB_QRY_RET_INV(res); break; @@ -777,7 +777,7 @@ { pcb_subc_t *p = (pcb_subc_t *)obj; query_fields_keys_t fh1; - pcb_coord_t x, y; + rnd_coord_t x, y; double rot; int on_bottom; Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 30902) +++ trunk/src_plugins/query/query_act.c (revision 30903) @@ -159,7 +159,7 @@ int res, bufno = -1; /* empty scope means board */ if (script == NULL) { - pcb_message(PCB_MSG_ERROR, "Compilation error: no script specified.\n"); + rnd_message(PCB_MSG_ERROR, "Compilation error: no script specified.\n"); return -1; } @@ -168,7 +168,7 @@ qry_parse(&prg); if (prg == NULL) { - pcb_message(PCB_MSG_ERROR, "Compilation error.\n"); + rnd_message(PCB_MSG_ERROR, "Compilation error.\n"); return -1; } @@ -181,13 +181,13 @@ char *end; bufno = strtol(scope, &end, 10); if (*end != '\0') { - pcb_message(PCB_MSG_ERROR, "Invalid buffer number: '%s': not an integer\n", scope); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Invalid buffer number: '%d' out of range 1..%d\n", bufno+1, PCB_MAX_BUFFER); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "Invalid scope: '%s': must be board or buffer or bufferN\n", scope); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); + rnd_message(PCB_MSG_ERROR, "Invalid flag '%s'\n", cmd+8); RND_ACT_IRES(0); return 0; } Index: trunk/src_plugins/query/query_exec.c =================================================================== --- trunk/src_plugins/query/query_exec.c (revision 30902) +++ trunk/src_plugins/query/query_exec.c (revision 30903) @@ -689,7 +689,7 @@ return -1; if (farg != NULL) { - pcb_message(PCB_MSG_ERROR, "too many function arguments\n"); + rnd_message(PCB_MSG_ERROR, "too many function arguments\n"); return -1; } return fname->data.fnc(ctx, n, args, res); Index: trunk/src_plugins/query/query_y.c =================================================================== --- trunk/src_plugins/query/query_y.c (revision 30902) +++ trunk/src_plugins/query/query_y.c (revision 30903) @@ -259,7 +259,7 @@ #line 119 "query_y.y" /* yacc.c:352 */ char *s; - pcb_coord_t c; + rnd_coord_t c; double d; const pcb_unit_t *u; pcb_qry_node_t *n; Index: trunk/src_plugins/query/query_y.h =================================================================== --- trunk/src_plugins/query/query_y.h (revision 30902) +++ trunk/src_plugins/query/query_y.h (revision 30903) @@ -82,7 +82,7 @@ #line 119 "query_y.y" /* yacc.c:1921 */ char *s; - pcb_coord_t c; + rnd_coord_t c; double d; const pcb_unit_t *u; pcb_qry_node_t *n; Index: trunk/src_plugins/query/query_y.y =================================================================== --- trunk/src_plugins/query/query_y.y (revision 30902) +++ trunk/src_plugins/query/query_y.y (revision 30903) @@ -118,7 +118,7 @@ %union { char *s; - pcb_coord_t c; + rnd_coord_t c; double d; const pcb_unit_t *u; pcb_qry_node_t *n; Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 30902) +++ trunk/src_plugins/renumber/renumber.c (revision 30903) @@ -60,10 +60,10 @@ static fgw_error_t pcb_act_Renumber(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_bool changed = pcb_false; + rnd_bool changed = pcb_false; pcb_subc_t **subc_list; pcb_subc_t **locked_subc_list; - pcb_coord_t *ox_list, *oy_list; + rnd_coord_t *ox_list, *oy_list; unsigned int i, j, k, cnt, lock_cnt; unsigned int tmpi; size_t sz; @@ -79,7 +79,7 @@ char **was, **is; unsigned int c_cnt = 0, numsubc; int ok; - pcb_bool free_name = pcb_false; + rnd_bool free_name = pcb_false; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, Renumber, name = argv[1].val.str); @@ -116,7 +116,7 @@ } if ((out = pcb_fopen_askovr(&PCB->hidlib, name, "w", NULL)) == NULL) { - pcb_message(PCB_MSG_ERROR, "Could not open %s\n", name); + rnd_message(PCB_MSG_ERROR, "Could not open %s\n", name); if (free_name && name) free((char*)name); RND_ACT_IRES(1); @@ -138,8 +138,8 @@ */ numsubc = pcb_subclist_length(&PCB->Data->subc); subc_list = calloc(numsubc, sizeof(pcb_subc_t *)); - ox_list = calloc(numsubc, sizeof(pcb_coord_t)); - oy_list = calloc(numsubc, sizeof(pcb_coord_t)); + ox_list = calloc(numsubc, sizeof(rnd_coord_t)); + oy_list = calloc(numsubc, sizeof(rnd_coord_t)); locked_subc_list = calloc(numsubc, sizeof(pcb_subc_t *)); was = calloc(numsubc, sizeof(char *)); is = calloc(numsubc, sizeof(char *)); @@ -154,7 +154,7 @@ PCB_SUBC_LOOP(PCB->Data); { - pcb_coord_t ox, oy; + rnd_coord_t ox, oy; if (pcb_subc_get_origin(subc, &ox, &oy) != 0) { ox = (subc->BoundingBox.X1 + subc->BoundingBox.X2)/2; Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 30902) +++ trunk/src_plugins/report/drill.c (revision 30903) @@ -74,7 +74,7 @@ { pcb_drill_info_t *AllDrills; pcb_drill_t *Drill = NULL; - pcb_bool DrillFound = pcb_false; + rnd_bool DrillFound = pcb_false; pcb_rtree_it_t it; pcb_box_t *pb; Index: trunk/src_plugins/report/drill.h =================================================================== --- trunk/src_plugins/report/drill.h (revision 30902) +++ trunk/src_plugins/report/drill.h (revision 30903) @@ -31,7 +31,7 @@ #define PCB_DRILL_H typedef struct { /* holds drill information */ - pcb_coord_t DrillSize; /* this drill's diameter */ + rnd_coord_t DrillSize; /* this drill's diameter */ pcb_cardinal_t ElementN, /* the number of elements using this drill size */ ElementMax, /* max number of elements from malloc() */ PinCount, /* number of pins drilled this size */ Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 30902) +++ trunk/src_plugins/report/report.c (revision 30903) @@ -366,7 +366,7 @@ int type = REPORT_TYPES; char *op = NULL, *how = NULL; pcb_subc_t *subc; - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on object to report on", &x, &y, 0); rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, reportdialog, op = argv[1].val.str); @@ -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: - pcb_message(PCB_MSG_INFO, "Nothing found to report on\n"); + rnd_message(PCB_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)) - pcb_message(PCB_MSG_INFO, "--- Report ---\n%s---\n", tmp.array); + rnd_message(PCB_MSG_INFO, "--- Report ---\n%s---\n", tmp.array); else rdialog("Report", tmp.array); gds_uninit(&tmp); @@ -498,7 +498,7 @@ return 0; } -static double xy_to_net_length(pcb_coord_t x, pcb_coord_t y, int *found, gds_t *err) +static double xy_to_net_length(rnd_coord_t x, rnd_coord_t y, int *found, gds_t *err) { pcb_find_t fctx; net_length_t nt; @@ -546,8 +546,8 @@ if (term != NULL) { char buf[50]; const char *units_name = pcbhl_conf.editor.grid_unit->suffix; - pcb_coord_t length; - pcb_coord_t x = 0, y = 0; + rnd_coord_t length; + rnd_coord_t x = 0, y = 0; gds_t err; rnd_PCB_ACT_MAY_CONVARG(2, FGW_STR, Report, units_name = argv[2].val.str); @@ -559,9 +559,9 @@ pcb_snprintf(buf, sizeof(buf), "%$m*", units_name, length); if (err.used != 0) - pcb_message(PCB_MSG_INFO, "Net %s length %s, BUT BEWARE:%s\n", net->name, buf, err.array); + rnd_message(PCB_MSG_INFO, "Net %s length %s, BUT BEWARE:%s\n", net->name, buf, err.array); else - pcb_message(PCB_MSG_INFO, "Net %s length %s\n", net->name, buf); + rnd_message(PCB_MSG_INFO, "Net %s length %s\n", net->name, buf); gds_uninit(&err); } } @@ -597,9 +597,9 @@ return NULL; } -static int report_net_length_(fgw_arg_t *res, int argc, fgw_arg_t *argv, pcb_coord_t x, pcb_coord_t y) +static int report_net_length_(fgw_arg_t *res, int argc, fgw_arg_t *argv, rnd_coord_t x, rnd_coord_t y) { - pcb_coord_t length = 0; + rnd_coord_t length = 0; int found = 0, ret; gds_t err; @@ -612,17 +612,17 @@ pcb_snprintf(buf, sizeof(buf), "%$m*", pcbhl_conf.editor.grid_unit->suffix, length); if (netname) - pcb_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); + rnd_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); else - pcb_message(PCB_MSG_INFO, "Net length: %s\n", buf); + rnd_message(PCB_MSG_INFO, "Net length: %s\n", buf); if (err.used != 0) - pcb_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); + rnd_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); ret = 0; } else { - pcb_message(PCB_MSG_ERROR, "No net under cursor.\n"); + rnd_message(PCB_MSG_ERROR, "No net under cursor.\n"); ret = 1; } @@ -638,13 +638,13 @@ pcb_line_t *l; pcb_layer_t *ly; int type; - pcb_coord_t ox, oy, x, y; + rnd_coord_t ox, oy, x, y; rnd_hid_get_coords("Click on a copper line", &x, &y, 0); type = pcb_search_screen(x, y, PCB_OBJ_LINE, &r1, &r2, &r3); if (type != PCB_OBJ_LINE) { - pcb_message(PCB_MSG_ERROR, "can't find a line to split\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "not a copper line, can't split it\n"); + rnd_message(PCB_MSG_ERROR, "not a copper line, can't split it\n"); return -1; } #define MINDIST PCB_MIL_TO_COORD(40) if ((pcb_distance(l->Point1.X, l->Point1.Y, x, y) < MINDIST) || (pcb_distance(l->Point2.X, l->Point2.Y, x, y) < MINDIST)) { - pcb_message(PCB_MSG_ERROR, "Can not split near the endpoint of a line\n"); + rnd_message(PCB_MSG_ERROR, "Can not split near the endpoint of a line\n"); return -1; } #undef MINDIST2 - pcb_message(PCB_MSG_INFO, "The two arms of the net are:\n"); + rnd_message(PCB_MSG_INFO, "The two arms of the net are:\n"); pcb_r_delete_entry(ly->line_tree, (pcb_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, (pcb_box_t *)l); @@ -684,7 +684,7 @@ return 0; } else { - pcb_coord_t x, y; + rnd_coord_t x, y; rnd_hid_get_coords("Click on a network", &x, &y, 0); return report_net_length_(res, argc, argv, x, y); } @@ -694,9 +694,9 @@ { const char *netname = NULL; pcb_net_t *net; - pcb_coord_t length = 0; + rnd_coord_t length = 0; int found = 0; - pcb_coord_t x, y; + rnd_coord_t x, y; gds_t err; if (!PCB) @@ -714,13 +714,13 @@ netname = net->name; term = pcb_termlist_first(&net->conns); if (term == NULL) { - pcb_message(PCB_MSG_INFO, "Net found, but it has not terminals.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_INFO, "Net found, but its terminal %s-%s is not on the board.\n", term->refdes, term->term); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "No net named %s\n", tofind); + rnd_message(PCB_MSG_ERROR, "No net named %s\n", tofind); return 1; } @@ -738,9 +738,9 @@ if (!found) { if (netname != NULL) - pcb_message(PCB_MSG_INFO, "Net found, but no lines or arcs were flagged.\n"); + rnd_message(PCB_MSG_INFO, "Net found, but no lines or arcs were flagged.\n"); else - pcb_message(PCB_MSG_ERROR, "Net not found.\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); + rnd_message(PCB_MSG_INFO, "Net \"%s\" length: %s\n", netname, buf); else - pcb_message(PCB_MSG_INFO, "Net length: %s\n", buf); + rnd_message(PCB_MSG_INFO, "Net length: %s\n", buf); if (err.used != 0) - pcb_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); + rnd_message(PCB_MSG_INFO, "BUT BEWARE: %s\n", err.array); } gds_uninit(&err); @@ -765,7 +765,7 @@ static fgw_error_t pcb_act_Report(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *cmd, *name; - pcb_coord_t x, y; + rnd_coord_t x, y; RND_PCB_ACT_CONVARG(1, FGW_STR, Report, cmd = argv[1].val.str); Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30902) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30903) @@ -115,8 +115,8 @@ struct rubber_info { - pcb_coord_t radius; - pcb_coord_t X, Y; + rnd_coord_t radius; + rnd_coord_t X, Y; pcb_line_t *line; pcb_box_t box; pcb_layer_t *layer; @@ -128,15 +128,15 @@ static pcb_rb_line_t *pcb_rubber_band_create(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, int point_number, int delta_index); static pcb_rb_arc_t *pcb_rubber_band_create_arc(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Line, int end, int delta_index); static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, int delta_index); -static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, int *, pcb_bool); -static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, pcb_bool); +static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, int *, rnd_bool); +static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_arc_t *, rnd_bool); static void CheckPolygonForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_poly_t *); static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_point_t *); static void CheckLineForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *); -static void calculate_route_rubber_arc_point_move(pcb_rb_arc_t *arcptr, int end, pcb_coord_t dx, pcb_coord_t dy, pcb_route_t *route); +static void calculate_route_rubber_arc_point_move(pcb_rb_arc_t *arcptr, int end, rnd_coord_t dx, rnd_coord_t dy, pcb_route_t *route); -static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, pcb_bool); +static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *, pcb_line_t *, pcb_point_t *, rnd_bool); static pcb_r_dir_t rubber_callback(const pcb_box_t *b, void *cl); static pcb_r_dir_t rubber_callback_arc(const pcb_box_t *b, void *cl); @@ -148,7 +148,7 @@ struct rubber_info *i = (struct rubber_info *)cl; rubber_ctx_t *rbnd = i->rbnd; double x, y, rad, dist1, dist2; - pcb_coord_t t; + rnd_coord_t t; int n, touches1 = 0, touches2 = 0; int have_point1 = 0; int have_point2 = 0; @@ -287,9 +287,9 @@ struct rubber_info *i = (struct rubber_info *)cl; rubber_ctx_t *rbnd = i->rbnd; double x, y, rad, dist1, dist2; - pcb_coord_t t; - pcb_coord_t ex1, ey1; - pcb_coord_t ex2, ey2; + rnd_coord_t t; + rnd_coord_t ex1, ey1; + rnd_coord_t ex2, ey2; int n = 0; int have_point1 = 0; int have_point2 = 0; @@ -381,7 +381,7 @@ pcb_rubber_band_create(rbnd, NULL, (pcb_line_t *) rat, 1, i->delta_index); break; default: - pcb_message(PCB_MSG_ERROR, "hace: bad rubber-rat lookup callback\n"); + rnd_message(PCB_MSG_ERROR, "hace: bad rubber-rat lookup callback\n"); } return PCB_R_DIR_NOT_FOUND; } @@ -423,7 +423,7 @@ if (group >= 0) { pcb_cardinal_t length = board->LayerGroups.grp[group].len; pcb_cardinal_t entry; - const pcb_coord_t t = Line->Thickness / 2; + const rnd_coord_t t = Line->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; @@ -453,7 +453,7 @@ /* checks all visible arcs which belong to the same group as the passed line. * If one of the endpoints of the arc lays * inside the passed line, * the scanned arc is added to the 'rubberband' list */ -static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *LinePoint, pcb_bool Exact) +static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *LinePoint, rnd_bool Exact) { const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -464,7 +464,7 @@ if (group >= 0) { pcb_cardinal_t length = board->LayerGroups.grp[group].len; pcb_cardinal_t entry; - const pcb_coord_t t = Line->Thickness / 2; + const rnd_coord_t t = Line->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; @@ -494,7 +494,7 @@ /* checks all visible lines which belong to the same group as the passed arc. * If one of the endpoints of the line is on the selected arc end, * the scanned line is added to the 'rubberband' list */ -static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, int *end_pt, pcb_bool Exact) +static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, int *end_pt, rnd_bool Exact) { const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -505,13 +505,13 @@ if (group >= 0) { pcb_cardinal_t length = board->LayerGroups.grp[group].len; pcb_cardinal_t entry; - const pcb_coord_t t = Arc->Thickness / 2; + const rnd_coord_t t = Arc->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; int end; /* = end_pt == pcb_arc_start_ptr ? 0 : 1; */ for(end = 0; end <= 1; ++end) { - pcb_coord_t ex, ey; + rnd_coord_t ex, ey; pcb_arc_get_end(Arc, end, &ex, &ey); info.radius = Exact ? -1 : MAX(Arc->Thickness / 2, 1); @@ -541,11 +541,11 @@ /* checks all visible lines which belong to the same group as the passed arc. * If one of the endpoints of the line is on either of the selected arcs ends, * the scanned line is added to the 'rubberband' list. */ -static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, pcb_bool Exact) +static void CheckArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, rnd_bool Exact) { struct rubber_info info; int which; - pcb_coord_t t = Arc->Thickness / 2, ex, ey; + rnd_coord_t t = Arc->Thickness / 2, ex, ey; const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -610,14 +610,14 @@ pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { - pcb_coord_t thick; + rnd_coord_t thick; /* the following code just stupidly compares the endpoints of the lines */ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - pcb_bool touches1 = pcb_false; - pcb_bool touches2 = pcb_false; + rnd_bool touches1 = pcb_false; + rnd_bool touches2 = pcb_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -658,7 +658,7 @@ * the scanned line is added to the 'rubberband' list */ static void CheckPolygonForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_poly_t *Polygon) { - const pcb_bool clearpoly = PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon); + const rnd_bool clearpoly = PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon); pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); @@ -675,7 +675,7 @@ pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { - pcb_coord_t thick; + rnd_coord_t thick; /* the following code just stupidly compares the endpoints * of the lines @@ -742,14 +742,14 @@ pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { - pcb_coord_t thick; + rnd_coord_t thick; /* the following code just stupidly compares the endpoints of the lines */ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - pcb_bool touches1 = pcb_false; - pcb_bool touches2 = pcb_false; + rnd_bool touches1 = pcb_false; + rnd_bool touches2 = pcb_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -801,14 +801,14 @@ PCB_COPPER_GROUP_LOOP(PCB->Data, top); { if (layer->meta.real.vis) { - pcb_coord_t thick; + rnd_coord_t thick; /* the following code just stupidly compares the endpoints of the lines */ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - pcb_bool touches1 = pcb_false; - pcb_bool touches2 = pcb_false; + rnd_bool touches1 = pcb_false; + rnd_bool touches2 = pcb_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -1107,8 +1107,8 @@ case 1: { const int argi = (arcptr->delta_index[end] * 2) + 2; - const pcb_coord_t dx = argv[argi].d.i; - const pcb_coord_t dy = argv[argi + 1].d.i; + const rnd_coord_t dx = argv[argi].d.i; + const rnd_coord_t dy = argv[argi + 1].d.i; pcb_route_t route; pcb_route_init(&route); calculate_route_rubber_arc_point_move(arcptr, end, dx, dy, &route); @@ -1145,8 +1145,8 @@ /* this is a rat going to a polygon. do not draw for rubberband */ ; } else { - pcb_coord_t x[2]; - pcb_coord_t y[2]; + rnd_coord_t x[2]; + rnd_coord_t y[2]; int p; x[0] = ptr->Line->Point1.X; @@ -1219,8 +1219,8 @@ case 1: { const int argi = (arcptr->delta_index[end] * 2) + 2; - const pcb_coord_t dx = argv[argi].d.i; - const pcb_coord_t dy = argv[argi + 1].d.i; + const rnd_coord_t dx = argv[argi].d.i; + const rnd_coord_t dy = argv[argi + 1].d.i; pcb_route_t route; pcb_route_init(&route); calculate_route_rubber_arc_point_move(arcptr, end, dx, dy, &route); @@ -1245,7 +1245,7 @@ { rubber_ctx_t *rbnd = user_data; pcb_rb_line_t *ptr; - pcb_coord_t cx = argv[5].d.c, cy = argv[6].d.c; + rnd_coord_t cx = argv[5].d.c, cy = argv[6].d.c; int steps = argv[7].d.i; int *changed = argv[8].d.p; @@ -1321,10 +1321,10 @@ rubber_ctx_t *rbnd = user_data; pcb_line_t *line = argv[1].d.p; int *constrained = argv[2].d.p; - pcb_coord_t *dx1 = argv[3].d.p; /* in/out */ - pcb_coord_t *dy1 = argv[4].d.p; /* in/out */ - pcb_coord_t *dx2 = argv[5].d.p; /* out */ - pcb_coord_t *dy2 = argv[6].d.p; /* out */ + rnd_coord_t *dx1 = argv[3].d.p; /* in/out */ + rnd_coord_t *dy1 = argv[4].d.p; /* in/out */ + rnd_coord_t *dx2 = argv[5].d.p; /* out */ + rnd_coord_t *dy2 = argv[6].d.p; /* out */ pcb_line_t *rub1, *rub2; int rub1end, rub2end; pcb_fline_t fmain, frub1, frub2; @@ -1386,7 +1386,7 @@ } } -static void calculate_route_rubber_arc_point_move(pcb_rb_arc_t *arcptr, int end, pcb_coord_t dx, pcb_coord_t dy, pcb_route_t *route) +static void calculate_route_rubber_arc_point_move(pcb_rb_arc_t *arcptr, int end, rnd_coord_t dx, rnd_coord_t dy, pcb_route_t *route) { /* This basic implementation simply connects the arc to the moving point with a new route so that they remain connected. */ Index: trunk/src_plugins/script/c_script.c =================================================================== --- trunk/src_plugins/script/c_script.c (revision 30902) +++ trunk/src_plugins/script/c_script.c (revision 30903) @@ -54,7 +54,7 @@ if (pup_load_lib(&script_pup, library, filename) != 0) { - pcb_message(PCB_MSG_ERROR, "Can't dlopen() %s\n", filename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't find pcb_rnd_init() in %s - not a pcb-rnd c \"script\".\n", filename); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "%s pcb_rnd_init() returned error\n", filename); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/script/live_script.c (revision 30903) @@ -189,7 +189,7 @@ else if (w == lvs->wload) arg = "load"; else if (w == lvs->wsave) arg = "save"; else { - pcb_message(PCB_MSG_ERROR, "lvs_button_cb(): internal error: unhandled switch case\n"); + rnd_message(PCB_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); - pcb_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(PCB_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) { pcb_tempfile_unlink(fn); - pcb_message(PCB_MSG_ERROR, "live_script: can't open temp file for write\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "live_script: can't load/parse the script\n"); + rnd_message(PCB_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()) { - pcb_message(PCB_MSG_WARNING, "Can not undo live script modifications:\nthere was user edit after script executaion.\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "live_script: failed to open '%s' for read\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "live_script: failed to open '%s' for write\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "live_script: failed to write script source to '%s'\n", fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "live script '%s' is already open\n", name); + rnd_message(PCB_MSG_ERROR, "live script '%s' is already open\n", name); RND_ACT_IRES(1); return 0; } @@ -462,7 +462,7 @@ } if (name == NULL) { - pcb_message(PCB_MSG_ERROR, "script name (second argument) required\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "script '%s' does not exist\n", name); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/script/perma.c (revision 30903) @@ -66,13 +66,13 @@ fclose(f); if (doc == NULL) { - pcb_message(PCB_MSG_ERROR, "Failed to parse script config '%s':\n'%s'\n", path, errmsg); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Failed to load script config '%s':\nroot node is not li:pcb-rnd-perma-script-v1\n", path); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ignoring non-hash child '%s' in '%s'\n", n->name, path); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "ignoring '%s' in '%s': no path\n", n->name, path); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ignoring '%s' in '%s': invalid lang node type\n", n->name, path); + rnd_message(PCB_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) { - pcb_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(PCB_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 - pcb_message(PCB_MSG_ERROR, "failed to load script '%s' in '%s'\n", n->name, path); + rnd_message(PCB_MSG_ERROR, "failed to load script '%s' in '%s'\n", n->name, path); } - pcb_message(PCB_MSG_INFO, "Loaded %ld scripts from '%s'\n", succ, path); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/script/script.c (revision 30903) @@ -168,7 +168,7 @@ char *fn; if (script_persistency_id == NULL) { - pcb_message(PCB_MSG_ERROR, "ScriptPersistency may be called only from the init part of a script\n"); + rnd_message(PCB_MSG_ERROR, "ScriptPersistency may be called only from the init part of a script\n"); goto err; } @@ -210,7 +210,7 @@ goto succ; } - pcb_message(PCB_MSG_ERROR, "Unknown command for ScriptPersistency\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "ScriptCookie called from outside of script init, can not generate the cookie\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "Can not load script %s from file %s: ID already in use\n", id, fn); + rnd_message(PCB_MSG_ERROR, "Can not load script %s from file %s: ID already in use\n", id, fn); return -1; } if (lang == NULL) { TODO(": guess") - pcb_message(PCB_MSG_ERROR, "Can not load script %s from file %s: failed to guess language from file name\n", id, fn); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can not load script engine %s for language %s\n", name, lang); + rnd_message(PCB_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); - pcb_message(PCB_MSG_ERROR, "Failed to parse/execute %s script from file %s\n", id, fn); + rnd_message(PCB_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))) - pcb_message(PCB_MSG_INFO, "id=%s fn=%s lang=%s\n", s->id, s->fn, s->lang); + rnd_message(PCB_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) { pcb_tempfile_unlink(fn); - pcb_message(PCB_MSG_ERROR, "script oneliner: can't open temp file for write\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "script oneliner: can't load/parse the script\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/script/script_act.c (revision 30903) @@ -297,7 +297,7 @@ #define ID_VALIDATE(id, act) \ do { \ if (script_id_invalid(id)) { \ - pcb_message(PCB_MSG_ERROR, #act ": Invalid script ID '%s' (must contain only alphanumeric characters and underscores)\n", id); \ + rnd_message(PCB_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 30902) +++ trunk/src_plugins/serpentine/serpentine.c (revision 30903) @@ -56,9 +56,9 @@ double minimum_amplitude; double nx,ny; /* Normal of host line */ double lx,ly; /* Vector along the line */ - pcb_coord_t length; /* Length of serpentine section */ - pcb_coord_t section_length; /* Length of the line section that hosts the serpentine */ - pcb_coord_t total_length; /* Total length of the line including the serpentine */ + rnd_coord_t length; /* Length of serpentine section */ + rnd_coord_t section_length; /* Length of the line section that hosts the serpentine */ + rnd_coord_t total_length; /* Total length of the line including the serpentine */ } serpentine_info_t; conf_serpentine_t conf_serpentine; @@ -65,11 +65,11 @@ static const char *serpentine_cookie = "serpentine plugin"; static double -point_on_line( pcb_coord_t X, pcb_coord_t Y, - pcb_coord_t X1, pcb_coord_t Y1, - pcb_coord_t X2, pcb_coord_t Y2, - pcb_coord_t * OutX, - pcb_coord_t * OutY ) +point_on_line( rnd_coord_t X, rnd_coord_t Y, + rnd_coord_t X1, rnd_coord_t Y1, + rnd_coord_t X2, rnd_coord_t Y2, + rnd_coord_t * OutX, + rnd_coord_t * OutY ) { const double abx = (double)X2 - (double)X1; const double aby = (double)Y2 - (double)Y1; @@ -79,8 +79,8 @@ const double apab = (apx * abx) + (apy * aby); const double t = apab / ab2; - if(OutX != NULL) *OutX = X1 + (pcb_coord_t)(abx * t); - if(OutY != NULL) *OutY = Y1 + (pcb_coord_t)(aby * t); + if(OutX != NULL) *OutX = X1 + (rnd_coord_t)(abx * t); + if(OutY != NULL) *OutY = Y1 + (rnd_coord_t)(aby * t); return t; } @@ -89,12 +89,12 @@ draw_serpentine_ui(serpentine_info_t * p_info) { const double amplitude = (p_info->amplitude < p_info->minimum_amplitude ? p_info->minimum_amplitude : p_info->amplitude); - const pcb_coord_t nx = (pcb_coord_t)(p_info->nx * p_info->amplitude); - const pcb_coord_t ny = (pcb_coord_t)(p_info->ny * p_info->amplitude); - const pcb_coord_t x1 = p_info->start.X + nx; - const pcb_coord_t y1 = p_info->start.Y + ny; - const pcb_coord_t x2 = p_info->end.X + nx; - const pcb_coord_t y2 = p_info->end.Y + ny; + const rnd_coord_t nx = (rnd_coord_t)(p_info->nx * p_info->amplitude); + const rnd_coord_t ny = (rnd_coord_t)(p_info->ny * p_info->amplitude); + const rnd_coord_t x1 = p_info->start.X + nx; + const rnd_coord_t y1 = p_info->start.Y + ny; + const rnd_coord_t x2 = p_info->end.X + nx; + const rnd_coord_t y2 = p_info->end.Y + ny; pcb_render->set_color(pcb_crosshair.GC, "#808080" /*conf_core.appearance.color.attached*/ ); pcb_render->draw_line(pcb_crosshair.GC, p_info->start.X, p_info->start.Y, p_info->end.X, p_info->end.Y ); @@ -108,12 +108,12 @@ const pcb_line_t * line, const pcb_point_t * point1, const pcb_point_t * point2, - const pcb_coord_t pitch, + const rnd_coord_t pitch, serpentine_info_t * p_info ) { - pcb_coord_t sx,sy,ex,ey; + rnd_coord_t sx,sy,ex,ey; double angle_n,angle_l; - pcb_coord_t amplitude = 0; + rnd_coord_t amplitude = 0; const double radius = pitch/2; const double min_amplitude = (2.0*radius); int count = 0; @@ -149,7 +149,7 @@ * and end points so that we are always going in the correct direction */ if(t1 < t0) { - pcb_coord_t t; + rnd_coord_t t; ex = sx; ey = sy; sx += count * pitch * 2 * lnx; @@ -192,9 +192,9 @@ for(i=0;iThickness/2) ? 0.0 : amplitude - (line->Thickness/2)); - const pcb_coord_t of = (pitch * 2 * i)+pitch; - const pcb_coord_t px = start.X + (lnx * of); - const pcb_coord_t py = start.Y + (lny * of); + const rnd_coord_t of = (pitch * 2 * i)+pitch; + const rnd_coord_t px = start.X + (lnx * of); + const rnd_coord_t py = start.Y + (lny * of); /* TODO: Enforce DRC */ @@ -248,9 +248,9 @@ } if(last_amplitude > 0.0) { - const pcb_coord_t of = (pitch * 2 * count)+pitch; - const pcb_coord_t px = start.X + (lnx * of); - const pcb_coord_t py = start.Y + (lny * of); + const rnd_coord_t of = (pitch * 2 * count)+pitch; + const rnd_coord_t px = start.X + (lnx * of); + const rnd_coord_t py = start.Y + (lny * of); startpos.X = route->end_point.X; startpos.Y = route->end_point.Y; endpos.X = startpos.X - nax; @@ -320,7 +320,7 @@ pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; } else - pcb_message(PCB_MSG_WARNING, "Serpentines can be only drawn onto a line\n"); + rnd_message(PCB_MSG_WARNING, "Serpentines can be only drawn onto a line\n"); break; case PCB_CH_STATE_SECOND: @@ -398,7 +398,7 @@ } } -pcb_bool tool_serpentine_undo_act() +rnd_bool tool_serpentine_undo_act() { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 30902) +++ trunk/src_plugins/shand_cmd/command.c (revision 30903) @@ -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) { - pcb_message(PCB_MSG_INFO, + rnd_message(PCB_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 - pcb_message(PCB_MSG_ERROR, "No filename to save to yet\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/shape/shape.c (revision 30903) @@ -51,7 +51,7 @@ static pcb_layer_t pcb_shape_current_layer_; pcb_layer_t *pcb_shape_current_layer = &pcb_shape_current_layer_; -static pcb_poly_t *regpoly(pcb_layer_t *layer, int corners, pcb_coord_t rx, pcb_coord_t ry, double rot_deg, pcb_coord_t cx, pcb_coord_t cy) +static pcb_poly_t *regpoly(pcb_layer_t *layer, int corners, rnd_coord_t rx, rnd_coord_t ry, double rot_deg, rnd_coord_t cx, rnd_coord_t cy) { int n, flags = PCB_FLAG_CLEARPOLY; double cosra, sinra, a, da = 2*M_PI / (double)corners; @@ -81,7 +81,7 @@ } for(n = 0,a = 0; n < corners; n++,a+=da) { - pcb_coord_t x, y; + rnd_coord_t x, y; x = pcb_round(cos(a) * (double)rx + (double)cx); y = pcb_round(sin(a) * (double)ry + (double)cy); if (rot_deg != 0.0) @@ -94,9 +94,9 @@ return p; } -static void elarc90(pcb_poly_t *p, pcb_coord_t ccx, pcb_coord_t ccy, pcb_coord_t cx, pcb_coord_t cy, pcb_coord_t sx, pcb_coord_t sy, pcb_coord_t ex, pcb_coord_t ey, pcb_coord_t rx, pcb_coord_t ry, double sa, int segs, int need_rot, double cosra, double sinra, pcb_coord_t rotcx, pcb_coord_t rotcy, pcb_shape_corner_t style) +static void elarc90(pcb_poly_t *p, rnd_coord_t ccx, rnd_coord_t ccy, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_coord_t ex, rnd_coord_t ey, rnd_coord_t rx, rnd_coord_t ry, double sa, int segs, int need_rot, double cosra, double sinra, rnd_coord_t rotcx, rnd_coord_t rotcy, pcb_shape_corner_t style) { - pcb_coord_t lx, ly; + rnd_coord_t lx, ly; double da = (M_PI/2.0/((double)segs-1)); int n; @@ -117,7 +117,7 @@ /* add approximated ellipse points */ segs -= 2; for(n = 0,sa+=da; n < segs; n++,sa+=da) { - pcb_coord_t x, y; + rnd_coord_t x, y; x = pcb_round((double)cx + cos(sa) * (double)rx); y = pcb_round((double)cy - sin(sa) * (double)ry); if (need_rot) @@ -139,10 +139,10 @@ #define CORNER(outx, outy, rect_signx, rect_signy, rsignx, rsigny) \ outx = pcb_round((double)cx + rect_signx * (double)w/2 + rsignx*rx); \ outy = pcb_round((double)cy + rect_signy * (double)h/2 + rsigny*ry); -pcb_poly_t *pcb_genpoly_roundrect(pcb_layer_t *layer, pcb_coord_t w, pcb_coord_t h, pcb_coord_t rx, pcb_coord_t ry, double rot_deg, pcb_coord_t cx, pcb_coord_t cy, pcb_shape_corner_t corner[4], double roundres) +pcb_poly_t *pcb_genpoly_roundrect(pcb_layer_t *layer, rnd_coord_t w, rnd_coord_t h, rnd_coord_t rx, rnd_coord_t ry, double rot_deg, rnd_coord_t cx, rnd_coord_t cy, pcb_shape_corner_t corner[4], double roundres) { pcb_poly_t *p; - pcb_coord_t maxr = (w < h ? w : h) / 2, x, y, ex, ey, acx, acy, ccx, ccy; + rnd_coord_t maxr = (w < h ? w : h) / 2, x, y, ex, ey, acx, acy, ccx, ccy; int segs, need_rot, flags = PCB_FLAG_CLEARPOLY; double cosra, sinra; @@ -204,7 +204,7 @@ } #undef CORNER -void pcb_shape_roundrect(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height, double roundness) +void pcb_shape_roundrect(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height, double roundness) { pcb_pstk_poly_t *dst = &shape->data.poly; pcb_poly_t *p; @@ -211,7 +211,7 @@ pcb_layer_t *layer; static pcb_data_t data = {0}; int inited = 0, n; - pcb_coord_t rr, minor = MIN(width, height); + rnd_coord_t rr, minor = MIN(width, height); pcb_shape_corner_t corner[4] = { PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND}; @@ -260,7 +260,7 @@ return p; } -static pcb_poly_t *regpoly_place(pcb_data_t *data, pcb_layer_t *layer, int corners, pcb_coord_t rx, pcb_coord_t ry, double rot_deg, pcb_coord_t cx, pcb_coord_t cy) +static pcb_poly_t *regpoly_place(pcb_data_t *data, pcb_layer_t *layer, int corners, rnd_coord_t rx, rnd_coord_t ry, double rot_deg, rnd_coord_t cx, rnd_coord_t cy) { pcb_poly_t *p; @@ -271,7 +271,7 @@ return any_poly_place(data, layer, p); } -static pcb_poly_t *roundrect_place(pcb_data_t *data, pcb_layer_t *layer, pcb_coord_t w, pcb_coord_t h, pcb_coord_t rx, pcb_coord_t ry, double rot_deg, pcb_coord_t cx, pcb_coord_t cy, pcb_shape_corner_t corner[4], double roundres) +static pcb_poly_t *roundrect_place(pcb_data_t *data, pcb_layer_t *layer, rnd_coord_t w, rnd_coord_t h, rnd_coord_t rx, rnd_coord_t ry, double rot_deg, rnd_coord_t cx, rnd_coord_t cy, pcb_shape_corner_t corner[4], double roundres) { pcb_poly_t *p; @@ -282,7 +282,7 @@ return any_poly_place(data, layer, p); } -static pcb_line_t *circle_place(pcb_data_t *data, pcb_layer_t *layer, pcb_coord_t dia, pcb_coord_t cx, pcb_coord_t cy) +static pcb_line_t *circle_place(pcb_data_t *data, pcb_layer_t *layer, rnd_coord_t dia, rnd_coord_t cx, rnd_coord_t cy) { int flags = 0; pcb_line_t *l; @@ -309,12 +309,12 @@ return l; } -static int get_where(const char *arg, pcb_data_t **data, pcb_coord_t *x, pcb_coord_t *y, pcb_bool *have_coords) +static int get_where(const char *arg, pcb_data_t **data, rnd_coord_t *x, rnd_coord_t *y, rnd_bool *have_coords) { const char *dst; char *end; int a = 0; - pcb_bool succ; + rnd_bool succ; dst = arg; if (pcb_strncasecmp(dst, "buffer", 6) == 0) { @@ -341,7 +341,7 @@ *y = pcb_get_value(sy, NULL, NULL, &succ); free(tmp); if (!succ) { - pcb_message(PCB_MSG_ERROR, "regpoly(): invalid center coords '%s'\n", dst); + rnd_message(PCB_MSG_ERROR, "regpoly(): invalid center coords '%s'\n", dst); return -1; } } @@ -348,11 +348,11 @@ return a; } -static pcb_bool parse2coords(const char *arg, pcb_coord_t *rx, pcb_coord_t *ry) +static rnd_bool parse2coords(const char *arg, rnd_coord_t *rx, rnd_coord_t *ry) { const char *dst; char *end; - pcb_bool succ; + rnd_bool succ; if (arg == NULL) return pcb_false; @@ -381,19 +381,19 @@ { const char *args[6]; double rot = 0; - pcb_coord_t x = 0, y = 0, rx, ry = 0; - pcb_bool succ, have_coords = pcb_false; + rnd_coord_t x = 0, y = 0, rx, ry = 0; + rnd_bool succ, have_coords = pcb_false; int corners = 0, a, n; pcb_data_t *data; char *end; if (argc < 3) { - pcb_message(PCB_MSG_ERROR, "regpoly() needs at least two parameters\n"); + rnd_message(PCB_MSG_ERROR, "regpoly() needs at least two parameters\n"); RND_ACT_IRES(-1); return 0; } if (argc > 5) { - pcb_message(PCB_MSG_ERROR, "regpoly(): too many arguments\n"); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "regpoly(): invalid number of corners '%s'\n", args[a]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "regpoly(): invalid radius '%s'\n", args[a]); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "regpoly(): invalid rotation '%s'\n", args[a]); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "regpoly(): failed to create the polygon\n"); + rnd_message(PCB_MSG_ERROR, "regpoly(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; @@ -452,19 +452,19 @@ const char *args[8]; int n, a; pcb_data_t *data; - pcb_bool succ, have_coords = pcb_false; - pcb_coord_t x = 0, y = 0, w, h, rx, ry; + rnd_bool succ, have_coords = pcb_false; + rnd_coord_t x = 0, y = 0, w, h, rx, ry; double rot = 0.0, roundres = 1.0; char *end; pcb_shape_corner_t corner[4] = { PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND, PCB_CORN_ROUND}; if (argc < 2) { - pcb_message(PCB_MSG_ERROR, "roundrect() needs at least one parameters\n"); + rnd_message(PCB_MSG_ERROR, "roundrect() needs at least one parameters\n"); RND_ACT_IRES(-1); return 0; } if (argc > 8) { - pcb_message(PCB_MSG_ERROR, "roundrect(): too many arguments\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "roundrect(): invalid width or height '%s'\n", args[a]); + rnd_message(PCB_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') { - pcb_message(PCB_MSG_ERROR, "roundrect(): invalid rotation '%s'\n", args[a]); + rnd_message(PCB_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: - pcb_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(PCB_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') { - pcb_message(PCB_MSG_ERROR, "roundrect(): roundness '%s'\n", args[a]); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "roundrect(): failed to create the polygon\n"); + rnd_message(PCB_MSG_ERROR, "roundrect(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; @@ -567,16 +567,16 @@ const char *args[6]; int n, a; pcb_data_t *data; - pcb_bool succ, have_coords = pcb_false; - pcb_coord_t x = 0, y = 0, dia; + rnd_bool succ, have_coords = pcb_false; + rnd_coord_t x = 0, y = 0, dia; if (argc < 2) { - pcb_message(PCB_MSG_ERROR, "circle() needs at least one parameters (diameter)\n"); + rnd_message(PCB_MSG_ERROR, "circle() needs at least one parameters (diameter)\n"); RND_ACT_IRES(-1); return 0; } if (argc > 3) { - pcb_message(PCB_MSG_ERROR, "circle(): too many arguments\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "circle(): failed to convert dia: invalid coord (%s)\n", args[a]); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_ERROR, "circle(): invalid diameter\n"); + rnd_message(PCB_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) - pcb_message(PCB_MSG_ERROR, "circle(): failed to create the polygon\n"); + rnd_message(PCB_MSG_ERROR, "circle(): failed to create the polygon\n"); RND_ACT_IRES(0); return 0; Index: trunk/src_plugins/shape/shape.h =================================================================== --- trunk/src_plugins/shape/shape.h (revision 30902) +++ trunk/src_plugins/shape/shape.h (revision 30903) @@ -34,7 +34,7 @@ /* special layer: when used, the shape is always placed on the current layer */ extern pcb_layer_t *pcb_shape_current_layer; -void pcb_shape_dialog(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer, pcb_bool modal); +void pcb_shape_dialog(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer, rnd_bool modal); typedef enum { PCB_CORN_ROUND, @@ -43,10 +43,10 @@ } pcb_shape_corner_t; extern const char *pcb_shape_corner_name[]; -pcb_poly_t *pcb_genpoly_roundrect(pcb_layer_t *layer, pcb_coord_t w, pcb_coord_t h, pcb_coord_t rx, pcb_coord_t ry, double rot_deg, pcb_coord_t cx, pcb_coord_t cy, pcb_shape_corner_t corner[4], double roundres); +pcb_poly_t *pcb_genpoly_roundrect(pcb_layer_t *layer, rnd_coord_t w, rnd_coord_t h, rnd_coord_t rx, rnd_coord_t ry, double rot_deg, rnd_coord_t cx, rnd_coord_t cy, pcb_shape_corner_t corner[4], double roundres); /* shorthand rounded rectangle: rounding radius is roundness * smaller_size */ -void pcb_shape_roundrect(pcb_pstk_shape_t *shape, pcb_coord_t width, pcb_coord_t height, double roundness); +void pcb_shape_roundrect(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height, double roundness); #endif Index: trunk/src_plugins/shape/shape_dialog.c =================================================================== --- trunk/src_plugins/shape/shape_dialog.c (revision 30902) +++ trunk/src_plugins/shape/shape_dialog.c (revision 30903) @@ -101,10 +101,10 @@ static void shp_chg_circle(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { ctx_t *shp = caller_data; - pcb_coord_t dia = shp->dlg[shp->dia].val.crd; + rnd_coord_t dia = shp->dlg[shp->dia].val.crd; if ((dia < 1) || (dia > (PCB->hidlib.size_x + PCB->hidlib.size_y)/4)) { - pcb_message(PCB_MSG_ERROR, "Invalid diameter.\n"); + rnd_message(PCB_MSG_ERROR, "Invalid diameter.\n"); return; } @@ -137,11 +137,11 @@ shape_layer_chg(NULL, NULL, 0, NULL); } -void pcb_shape_dialog(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer, pcb_bool modal) +void pcb_shape_dialog(pcb_board_t *pcb, pcb_data_t *data, pcb_layer_t *layer, rnd_bool modal) { ctx_t *shp = calloc(sizeof(ctx_t), 1); - pcb_coord_t mm2 = PCB_MM_TO_COORD(2); - pcb_coord_t maxr = PCB_MM_TO_COORD(1000); + rnd_coord_t mm2 = PCB_MM_TO_COORD(2); + rnd_coord_t maxr = PCB_MM_TO_COORD(1000); const char *tabs[] = {"Regular polygon", "Round rectangle", "Filled circle", NULL}; pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 30902) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 30903) @@ -101,7 +101,7 @@ static void sketch_update_erbs_layer(sketch_t *sk) { pcb_layer_t *l = sk->ui_layer_erbs; - pcb_coord_t px, py, qx, qy; + rnd_coord_t px, py, qx, qy; int i; list_map0(&l->Line, pcb_line_t, pcb_line_free); @@ -295,7 +295,7 @@ } } -static pcb_bool sketch_check_path(point_t *from_p, edge_t *from_e, edge_t *to_e, point_t *to_p) +static rnd_bool sketch_check_path(point_t *from_p, edge_t *from_e, edge_t *to_e, point_t *to_p) { /* TODO */ return pcb_true; @@ -816,7 +816,7 @@ tool_skline_adjust_attached_objects(&PCB->hidlib); } -static pcb_bool attached_path_init(pcb_layer_t *layer, pcb_any_obj_t *start_term) +static rnd_bool attached_path_init(pcb_layer_t *layer, pcb_any_obj_t *start_term) { pcb_attached_line_t *start_l; pcb_net_term_t *term; @@ -854,7 +854,7 @@ wire_uninit(&attached_path.corridor); } -static pcb_bool line_intersects_edge(pcb_attached_line_t *line, edge_t *edge) +static rnd_bool line_intersects_edge(pcb_attached_line_t *line, edge_t *edge) { point_t p, q; p.pos.x = line->Point1.X; @@ -864,7 +864,7 @@ return LINES_INTERSECT(&p, &q, edge->endp[0], edge->endp[1]); } -static pcb_bool attached_path_next_point(point_t *end_p) +static rnd_bool attached_path_next_point(point_t *end_p) { int last = vtp0_len(&attached_path.lines) - 1; pcb_attached_line_t *attached_line = attached_path.lines.array[last]; @@ -967,9 +967,9 @@ #undef RETURN } -static pcb_bool attached_path_finish(pcb_any_obj_t *end_term) +static rnd_bool attached_path_finish(pcb_any_obj_t *end_term) { - pcb_bool net_valid = pcb_false; + rnd_bool net_valid = pcb_false; if (check_net) { if(end_term != attached_path.start_term) { @@ -1037,7 +1037,7 @@ pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; } else - pcb_message(PCB_MSG_WARNING, "Sketch lines can be only drawn from a terminal\n"); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_WARNING, "Cannot finish placing wire at this terminal\n"); - pcb_message(PCB_MSG_WARNING, "(the terminal does not belong to the routed net or is the starting terminal)\n"); + 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"); } break; } } if (attached_path_next_point(NULL) == pcb_false) - pcb_message(PCB_MSG_WARNING, "Cannot route the wire this way\n"); + rnd_message(PCB_MSG_WARNING, "Cannot route the wire this way\n"); break; } @@ -1088,7 +1088,7 @@ } } -pcb_bool tool_skline_undo_act(rnd_hidlib_t *hl) +rnd_bool tool_skline_undo_act(rnd_hidlib_t *hl) { /* TODO */ return pcb_false; Index: trunk/src_plugins/sketch_route/spoke.c =================================================================== --- trunk/src_plugins/sketch_route/spoke.c (revision 30902) +++ trunk/src_plugins/sketch_route/spoke.c (revision 30903) @@ -25,10 +25,10 @@ vtp0_uninit(&sp->slots); } -static void spoke_pos(spoke_t *sp, pcb_coord_t spacing, pcb_coord_t *x, pcb_coord_t *y) +static void spoke_pos(spoke_t *sp, rnd_coord_t spacing, rnd_coord_t *x, rnd_coord_t *y) { pcb_box_t *obj_bbox = &((pointdata_t *) sp->p->data)->obj->bbox_naked; - pcb_coord_t half_obj_w, half_obj_h; + rnd_coord_t half_obj_w, half_obj_h; half_obj_w = (obj_bbox->X2 - obj_bbox->X1 + 1) / 2; half_obj_h = (obj_bbox->Y2 - obj_bbox->Y1 + 1) / 2; @@ -53,11 +53,11 @@ } } -void spoke_pos_at_wire_point(spoke_t *sp, wire_point_t *wp, pcb_coord_t *x, pcb_coord_t *y) +void spoke_pos_at_wire_point(spoke_t *sp, wire_point_t *wp, rnd_coord_t *x, rnd_coord_t *y) { pointdata_t *pd = wp->p->data; wirelist_node_t *w_node = wp->wire_node; - pcb_coord_t spacing; + rnd_coord_t spacing; assert(w_node != NULL); @@ -84,9 +84,9 @@ spoke_pos(sp, spacing, x, y); } -void spoke_pos_at_slot(spoke_t *sp, int slot, pcb_coord_t *x, pcb_coord_t *y) +void spoke_pos_at_slot(spoke_t *sp, int slot, rnd_coord_t *x, rnd_coord_t *y) { - pcb_coord_t spacing = 0; + rnd_coord_t spacing = 0; int i; assert(slot < vtp0_len(&sp->slots)); @@ -101,9 +101,9 @@ spoke_pos(sp, spacing, x, y); } -void spoke_pos_at_end(spoke_t *sp, pcb_coord_t bloat, pcb_coord_t *x, pcb_coord_t *y) +void spoke_pos_at_end(spoke_t *sp, rnd_coord_t bloat, rnd_coord_t *x, rnd_coord_t *y) { - pcb_coord_t spacing = 0; + rnd_coord_t spacing = 0; int i; if (vtp0_len(&sp->slots) > 0) { Index: trunk/src_plugins/sketch_route/spoke.h =================================================================== --- trunk/src_plugins/sketch_route/spoke.h (revision 30902) +++ trunk/src_plugins/sketch_route/spoke.h (revision 30903) @@ -27,9 +27,9 @@ void spoke_init(spoke_t *sp, spoke_dir_t dir, point_t *p); void spoke_uninit(spoke_t *sp); -void spoke_pos_at_wire_point(spoke_t *sp, wire_point_t *wp, pcb_coord_t *x, pcb_coord_t *y); -void spoke_pos_at_slot(spoke_t *sp, int slot, pcb_coord_t *x, pcb_coord_t *y); -void spoke_pos_at_end(spoke_t *sp, pcb_coord_t bloat, pcb_coord_t *x, pcb_coord_t *y); +void spoke_pos_at_wire_point(spoke_t *sp, wire_point_t *wp, rnd_coord_t *x, rnd_coord_t *y); +void spoke_pos_at_slot(spoke_t *sp, int slot, rnd_coord_t *x, rnd_coord_t *y); +void spoke_pos_at_end(spoke_t *sp, rnd_coord_t bloat, rnd_coord_t *x, rnd_coord_t *y); void spoke_insert_wire_at_slot(spoke_t *sp, int slot_num, ewire_t *ew); Index: trunk/src_plugins/sketch_route/wire.h =================================================================== --- trunk/src_plugins/sketch_route/wire.h (revision 30902) +++ trunk/src_plugins/sketch_route/wire.h (revision 30903) @@ -19,8 +19,8 @@ int point_num; int point_max; wire_point_t *points; - pcb_coord_t thickness; - pcb_coord_t clearance; + rnd_coord_t thickness; + rnd_coord_t clearance; }; typedef wire_t* wire_ptr_t; Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 30902) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 30903) @@ -37,10 +37,10 @@ #include "funchash_core.h" #define GAP 10000 -static pcb_coord_t minx; -static pcb_coord_t miny; -static pcb_coord_t maxx; -static pcb_coord_t maxy; +static rnd_coord_t minx; +static rnd_coord_t miny; +static rnd_coord_t maxx; +static rnd_coord_t maxy; /* the same for subcircuits Must initialize statics above before calling for the first time. @@ -47,7 +47,7 @@ This was taken almost entirely from pcb_act_DisperseElements, with cleanup */ static void place_subc(pcb_subc_t *sc) { - pcb_coord_t dx, dy, ox = 0, oy = 0; + rnd_coord_t dx, dy, ox = 0, oy = 0; pcb_subc_get_origin(sc, &ox, &oy); @@ -85,7 +85,7 @@ /* Return true if term1,term2 would be the best order, else term2,term1, based on pad loc. */ static int padorder(pcb_subc_t *parent1, pcb_any_obj_t *term1, pcb_subc_t *parent2, pcb_any_obj_t *term2) { - pcb_coord_t x1, x2; + rnd_coord_t x1, x2; x1 = term1->BoundingBox.X1 - (parent1->BoundingBox.X1 + parent1->BoundingBox.X2) / 2; x2 = term2->BoundingBox.X1 - (parent2->BoundingBox.X1 + parent2->BoundingBox.X2) / 2; @@ -120,7 +120,7 @@ } if (nl->used == 0) { - pcb_message(PCB_MSG_ERROR, "Can't use SmartDisperse because no netlist is loaded.\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/stroke/stroke.c (revision 30903) @@ -53,8 +53,8 @@ static const char *pcb_stroke_cookie = "stroke plugin"; -static pcb_coord_t stroke_first_x, stroke_first_y, stroke_last_x, stroke_last_y; -static pcb_bool pcb_mid_stroke = pcb_false; +static rnd_coord_t stroke_first_x, stroke_first_y, stroke_last_x, stroke_last_y; +static rnd_bool pcb_mid_stroke = pcb_false; static int pcb_stroke_exec(rnd_hidlib_t *hl, const char *seq) { @@ -66,7 +66,7 @@ return 1; } if (conf_stroke.plugins.stroke.warn4unknown) - pcb_message(PCB_MSG_WARNING, "Stroke: sequence '%s' is not configured.\n", seq); + rnd_message(PCB_MSG_WARNING, "Stroke: sequence '%s' is not configured.\n", seq); return 0; } @@ -85,7 +85,7 @@ static void pcb_stroke_record(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) { - pcb_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; + rnd_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; if (!pcb_mid_stroke) return; @@ -100,7 +100,7 @@ static void pcb_stroke_start(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) { - pcb_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; + rnd_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; pcb_mid_stroke = pcb_true; stroke_first_x = SIDE_X(hidlib, ev_x); stroke_first_y = SIDE_Y(hidlib, ev_y); @@ -127,7 +127,7 @@ fgw_func_t *f = fgw_func_lookup(&rnd_fgw, "zoomto"); if (f == NULL) { - pcb_message(PCB_MSG_ERROR, "zoomto action is not available"); + rnd_message(PCB_MSG_ERROR, "zoomto action is not available"); RND_ACT_IRES(1); return 0; } Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 30902) +++ trunk/src_plugins/teardrops/teardrops.c (revision 30903) @@ -34,8 +34,8 @@ static pcb_pstk_t *pstk; static int layer; -static pcb_coord_t px, py; -static pcb_coord_t thickness; +static rnd_coord_t px, py; +static rnd_coord_t thickness; static int new_arcs = 0; Index: trunk/src_plugins/tool_std/tool_arc.c =================================================================== --- trunk/src_plugins/tool_std/tool_arc.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_arc.c (revision 30903) @@ -89,7 +89,7 @@ case PCB_CH_STATE_THIRD: { pcb_arc_t *arc; - pcb_coord_t wx, wy; + rnd_coord_t wx, wy; pcb_angle_t sa, dir; wx = hl->tool_x - pcb_crosshair.AttachedBox.Point1.X; wy = hl->tool_y - pcb_crosshair.AttachedBox.Point1.Y; @@ -171,7 +171,7 @@ } -pcb_bool pcb_tool_arc_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_arc_undo_act(rnd_hidlib_t *hl) { if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_SECOND) { pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; Index: trunk/src_plugins/tool_std/tool_arc.h =================================================================== --- trunk/src_plugins/tool_std/tool_arc.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_arc.h (revision 30903) @@ -5,4 +5,4 @@ void pcb_tool_arc_notify_mode(rnd_hidlib_t *hl); void pcb_tool_arc_adjust_attached_objects(rnd_hidlib_t *hl); void pcb_tool_arc_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_arc_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_arc_undo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_buffer.c =================================================================== --- trunk/src_plugins/tool_std/tool_buffer.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_buffer.c (revision 30903) @@ -53,7 +53,7 @@ { } -static void pcb_tool_buffer_notify_mode_(rnd_hidlib_t *hl, pcb_bool keep_ids) +static void pcb_tool_buffer_notify_mode_(rnd_hidlib_t *hl, rnd_bool keep_ids) { pcb_board_t *pcb = (pcb_board_t *)hl; Index: trunk/src_plugins/tool_std/tool_copy.c =================================================================== --- trunk/src_plugins/tool_std/tool_copy.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_copy.c (revision 30903) @@ -73,7 +73,7 @@ case PCB_CH_STATE_SECOND: if ((pcb->is_footprint) && (pcb_crosshair.AttachedObject.Type == PCB_OBJ_SUBC)) { - pcb_message(PCB_MSG_WARNING, "Can not copy subcircuit in the footprint edit mode\n"); + rnd_message(PCB_MSG_WARNING, "Can not copy subcircuit in the footprint edit mode\n"); } else { pcb_copy_obj(pcb_crosshair.AttachedObject.Type, @@ -111,7 +111,7 @@ pcb_xordraw_movecopy(); } -pcb_bool pcb_tool_copy_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_copy_undo_act(rnd_hidlib_t *hl) { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) Index: trunk/src_plugins/tool_std/tool_copy.h =================================================================== --- trunk/src_plugins/tool_std/tool_copy.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_copy.h (revision 30903) @@ -4,4 +4,4 @@ void pcb_tool_copy_notify_mode(rnd_hidlib_t *hl); void pcb_tool_copy_release_mode(rnd_hidlib_t *hl); void pcb_tool_copy_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_copy_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_copy_undo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 30903) @@ -72,7 +72,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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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; @@ -126,7 +126,7 @@ pcb_xordraw_insert_pt_obj(); } -pcb_bool pcb_tool_insert_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_insert_undo_act(rnd_hidlib_t *hl) { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) Index: trunk/src_plugins/tool_std/tool_insert.h =================================================================== --- trunk/src_plugins/tool_std/tool_insert.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_insert.h (revision 30903) @@ -4,4 +4,4 @@ void pcb_tool_insert_notify_mode(rnd_hidlib_t *hl); void pcb_tool_insert_adjust_attached_objects(rnd_hidlib_t *hl); void pcb_tool_insert_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_insert_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_insert_undo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_line.c =================================================================== --- trunk/src_plugins/tool_std/tool_line.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_line.c (revision 30903) @@ -389,7 +389,7 @@ } } -pcb_bool pcb_tool_line_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_line_undo_act(rnd_hidlib_t *hl) { pcb_board_t *pcb = (pcb_board_t *)hl; @@ -457,7 +457,7 @@ return pcb_true; } -pcb_bool pcb_tool_line_redo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_line_redo_act(rnd_hidlib_t *hl) { pcb_board_t *pcb = (pcb_board_t *)hl; Index: trunk/src_plugins/tool_std/tool_line.h =================================================================== --- trunk/src_plugins/tool_std/tool_line.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_line.h (revision 30903) @@ -5,5 +5,5 @@ void pcb_tool_line_notify_mode(rnd_hidlib_t *hl); void pcb_tool_line_adjust_attached_objects(rnd_hidlib_t *hl); void pcb_tool_line_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_line_undo_act(rnd_hidlib_t *hl); -pcb_bool pcb_tool_line_redo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_line_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_line_redo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_move.c =================================================================== --- trunk/src_plugins/tool_std/tool_move.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_move.c (revision 30903) @@ -54,7 +54,7 @@ void pcb_tool_move_notify_mode(rnd_hidlib_t *hl) { - pcb_coord_t dx, dy; + rnd_coord_t dx, dy; switch (pcb_crosshair.AttachedObject.State) { /* first notify, lookup object */ @@ -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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_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; } @@ -120,7 +120,7 @@ pcb_xordraw_movecopy(); } -pcb_bool pcb_tool_move_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_move_undo_act(rnd_hidlib_t *hl) { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) Index: trunk/src_plugins/tool_std/tool_move.h =================================================================== --- trunk/src_plugins/tool_std/tool_move.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_move.h (revision 30903) @@ -4,4 +4,4 @@ void pcb_tool_move_notify_mode(rnd_hidlib_t *hl); void pcb_tool_move_release_mode(rnd_hidlib_t *hl); void pcb_tool_move_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_move_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_move_undo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_poly.c =================================================================== --- trunk/src_plugins/tool_std/tool_poly.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_poly.c (revision 30903) @@ -131,7 +131,7 @@ } } -pcb_bool pcb_tool_poly_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_poly_undo_act(rnd_hidlib_t *hl) { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_prev_point(); @@ -140,7 +140,7 @@ return pcb_true; } -pcb_bool pcb_tool_poly_redo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_poly_redo_act(rnd_hidlib_t *hl) { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_next_point(); Index: trunk/src_plugins/tool_std/tool_poly.h =================================================================== --- trunk/src_plugins/tool_std/tool_poly.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_poly.h (revision 30903) @@ -4,5 +4,5 @@ void pcb_tool_poly_notify_mode(rnd_hidlib_t *hl); void pcb_tool_poly_adjust_attached_objects(rnd_hidlib_t *hl); void pcb_tool_poly_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_poly_undo_act(rnd_hidlib_t *hl); -pcb_bool pcb_tool_poly_redo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_poly_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_poly_redo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_polyhole.c =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_polyhole.c (revision 30903) @@ -65,12 +65,12 @@ &pcb_crosshair.AttachedObject.Ptr1, &pcb_crosshair.AttachedObject.Ptr2, &pcb_crosshair.AttachedObject.Ptr3); if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_VOID) { - pcb_message(PCB_MSG_WARNING, "The first point of a polygon hole must be on a polygon.\n"); + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, poly object is locked\n"); + rnd_message(PCB_MSG_WARNING, "Sorry, poly object is locked\n"); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.extobj_edit = NULL; break; @@ -161,7 +161,7 @@ } } -pcb_bool pcb_tool_polyhole_undo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_polyhole_undo_act(rnd_hidlib_t *hl) { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_prev_point(); @@ -170,7 +170,7 @@ return pcb_true; } -pcb_bool pcb_tool_polyhole_redo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_polyhole_redo_act(rnd_hidlib_t *hl) { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_next_point(); Index: trunk/src_plugins/tool_std/tool_polyhole.h =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_polyhole.h (revision 30903) @@ -4,5 +4,5 @@ void pcb_tool_polyhole_notify_mode(rnd_hidlib_t *hl); void pcb_tool_polyhole_adjust_attached_objects(rnd_hidlib_t *hl); void pcb_tool_polyhole_draw_attached(rnd_hidlib_t *hl); -pcb_bool pcb_tool_polyhole_undo_act(rnd_hidlib_t *hl); -pcb_bool pcb_tool_polyhole_redo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_polyhole_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_polyhole_redo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_rectangle.c =================================================================== --- trunk/src_plugins/tool_std/tool_rectangle.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_rectangle.c (revision 30903) @@ -107,7 +107,7 @@ } } -pcb_bool pcb_tool_rectangle_anydo_act(rnd_hidlib_t *hl) +rnd_bool pcb_tool_rectangle_anydo_act(rnd_hidlib_t *hl) { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedBox.State != PCB_CH_STATE_FIRST) Index: trunk/src_plugins/tool_std/tool_rectangle.h =================================================================== --- trunk/src_plugins/tool_std/tool_rectangle.h (revision 30902) +++ trunk/src_plugins/tool_std/tool_rectangle.h (revision 30903) @@ -3,4 +3,4 @@ void pcb_tool_rectangle_uninit(void); void pcb_tool_rectangle_notify_mode(rnd_hidlib_t *hl); void pcb_tool_rectangle_adjust_attached_objects(rnd_hidlib_t *hl); -pcb_bool pcb_tool_rectangle_undo_act(rnd_hidlib_t *hl); +rnd_bool pcb_tool_rectangle_undo_act(rnd_hidlib_t *hl); Index: trunk/src_plugins/tool_std/tool_remove.c =================================================================== --- trunk/src_plugins/tool_std/tool_remove.c (revision 30902) +++ trunk/src_plugins/tool_std/tool_remove.c (revision 30903) @@ -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)) { - pcb_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); + rnd_message(PCB_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); return; } if (type == PCB_OBJ_SUBC) { if(pcb->is_footprint) { - pcb_message(PCB_MSG_WARNING, "Can not remove the subcircuit being edited in the footprint edit mode\n"); + rnd_message(PCB_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 30902) +++ trunk/src_plugins/tool_std/tool_via.c (revision 30903) @@ -56,12 +56,12 @@ pcb_board_t *pcb = (pcb_board_t *)hl; if (!pcb->pstk_on) { - pcb_message(PCB_MSG_WARNING, "You must turn via visibility on before\nyou can place vias\n"); + rnd_message(PCB_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) { - pcb_message(PCB_MSG_ERROR, "Can't place via: invalid via geometry (hole too large for via size)\n"); + rnd_message(PCB_MSG_ERROR, "Can't place via: invalid via geometry (hole too large for via size)\n"); return; } @@ -85,9 +85,9 @@ } } -static void xor_draw_fake_via(pcb_coord_t x, pcb_coord_t y, pcb_coord_t dia, pcb_coord_t clearance) +static void xor_draw_fake_via(rnd_coord_t x, rnd_coord_t y, rnd_coord_t dia, rnd_coord_t clearance) { - pcb_coord_t r = (dia/2)+clearance; + rnd_coord_t r = (dia/2)+clearance; pcb_render->draw_arc(pcb_crosshair.GC, x, y, r, r, 0, 360); } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 30902) +++ trunk/src_plugins/vendordrill/vendor.c (revision 30903) @@ -58,13 +58,13 @@ static void add_to_drills(char *); static void apply_vendor_map(void); static void process_skips(lht_node_t *); -static pcb_bool rematch(const char *, const char *); +static rnd_bool rematch(const char *, const char *); static void vendor_free_all(void); -pcb_coord_t vendorDrillMap(pcb_coord_t in); +rnd_coord_t vendorDrillMap(rnd_coord_t in); /* list of vendor drills and a count of them */ -static pcb_coord_t *vendor_drills = NULL; +static rnd_coord_t *vendor_drills = NULL; static int n_vendor_drills = 0; static int cached_drill = -1; @@ -93,7 +93,7 @@ #define FREE(x) if((x) != NULL) { free (x) ; (x) = NULL; } /* load a board metadata into conf_core */ -static void load_meta_coord(const char *path, pcb_coord_t crd) +static void load_meta_coord(const char *path, rnd_coord_t crd) { char tmp[128]; pcb_sprintf(tmp, "%$mm", crd); @@ -100,7 +100,7 @@ pcb_conf_set(CFR_DESIGN, path, -1, tmp, POL_OVERWRITE); } -static pcb_bool vendorIsSubcMappable(pcb_subc_t *subc); +static rnd_bool vendorIsSubcMappable(pcb_subc_t *subc); static const char apply_vendor_syntax[] = "ApplyVendor()"; @@ -137,7 +137,7 @@ const char *sval; lht_doc_t *doc; lht_node_t *drlres; - pcb_bool free_fname = pcb_false; + rnd_bool free_fname = pcb_false; cached_drill = -1; @@ -168,7 +168,7 @@ /* load the resource file */ doc = pcb_hid_cfg_load_lht(&PCB->hidlib, fname); if (doc == NULL) { - pcb_message(PCB_MSG_ERROR, "Could not load vendor resource file \"%s\"\n", fname); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "\"%s\" is not a supported units. Defaulting to inch\n", sval); + rnd_message(PCB_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 { - pcb_message(PCB_MSG_ERROR, "\"%s\" is not a valid rounding type. Defaulting to up\n", sval); + rnd_message(PCB_MSG_ERROR, "\"%s\" is not a valid rounding type. Defaulting to up\n", sval); rounding_method = ROUND_UP; } } @@ -226,49 +226,49 @@ } } else - pcb_message(PCB_MSG_ERROR, "Broken drillmap: /drillmap should be a list\n"); + rnd_message(PCB_MSG_ERROR, "Broken drillmap: /drillmap should be a list\n"); } else - pcb_message(PCB_MSG_ERROR, "No drillmap resource found\n"); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.bloat); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum copper overlap to %ml mils\n", conf_core.design.shrink); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum copper spacing to %ml mils\n", conf_core.design.min_wid); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum silk width to %ml mils\n", conf_core.design.min_slk); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum drill diameter to %ml mils\n", conf_core.design.min_drill); + rnd_message(PCB_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)); - pcb_message(PCB_MSG_INFO, "Set DRC minimum annular ring to %ml mils\n", conf_core.design.min_ring); + rnd_message(PCB_MSG_INFO, "Set DRC minimum annular ring to %ml mils\n", conf_core.design.min_ring); } - pcb_message(PCB_MSG_INFO, "Loaded %d vendor drills from %s\n", n_vendor_drills, fname); - pcb_message(PCB_MSG_INFO, "Loaded %d RefDes skips, %d Value skips, %d Descr skips\n", n_refdes, n_value, n_descr); + 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); pcb_conf_set(CFR_DESIGN, "plugins/vendor/enable", -1, "0", POL_OVERWRITE); @@ -283,7 +283,7 @@ static int apply_vendor_pstk1(pcb_pstk_t *pstk, pcb_cardinal_t *tot) { pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pstk); - pcb_coord_t target; + rnd_coord_t target; int res = 0; if ((proto == NULL) || (proto->hdia == 0)) return 0; @@ -295,7 +295,7 @@ if (pcb_chg_obj_2nd_size(PCB_OBJ_PSTK, pstk, pstk, pstk, target, pcb_true, pcb_false)) res = 1; else { - pcb_message(PCB_MSG_WARNING, + rnd_message(PCB_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); @@ -320,7 +320,7 @@ { int i; pcb_cardinal_t changed = 0, tot = 0; - pcb_bool state; + rnd_bool state; state = conf_vendor.plugins.vendor.enable; @@ -340,13 +340,13 @@ } PCB_END_LOOP; - pcb_message(PCB_MSG_INFO, "Updated %ld drill sizes out of %ld total\n", (long)changed, (long)tot); + rnd_message(PCB_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++; pcb_conf_setf(CFR_DESIGN, "design/via_drilling_hole", -1, "%$mm", vendorDrillMap(conf_core.design.via_drilling_hole)); - pcb_message(PCB_MSG_INFO, "Adjusted active via hole size to be %ml mils\n", 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); } /* 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); - pcb_message(PCB_MSG_INFO, + rnd_message(PCB_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; - pcb_message(PCB_MSG_INFO, + rnd_message(PCB_MSG_INFO, "Increased %s routing style via diameter to %ml mils\n", PCB->RouteStyle.array[i].name, PCB->RouteStyle.array[i].Diameter); } @@ -382,7 +382,7 @@ } /* for a given drill size, find the closest vendor drill size */ -pcb_coord_t vendorDrillMap(pcb_coord_t in) +rnd_coord_t vendorDrillMap(rnd_coord_t in) { int i, min, max; @@ -405,7 +405,7 @@ /* are we larger than the largest drill? */ if (in > vendor_drills[n_vendor_drills - 1]) { - pcb_message(PCB_MSG_ERROR, "Vendor drill list does not contain a drill >= %ml mil\n" + rnd_message(PCB_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]; @@ -531,7 +531,7 @@ } } -static pcb_bool vendorIsSubcMappable(pcb_subc_t *subc) +static rnd_bool vendorIsSubcMappable(pcb_subc_t *subc) { int i; int noskip; @@ -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))) { - pcb_message(PCB_MSG_INFO, "Vendor mapping skipped because refdes = %s matches %s\n", PCB_UNKNOWN(subc->refdes), ignore_refdes[i]); + rnd_message(PCB_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))) { - pcb_message(PCB_MSG_INFO, "Vendor mapping skipped because value = %s matches %s\n", PCB_UNKNOWN(vl), ignore_value[i]); + rnd_message(PCB_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))) { - pcb_message(PCB_MSG_INFO, + rnd_message(PCB_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)) { - pcb_message(PCB_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", PCB_UNKNOWN(subc->refdes)); + rnd_message(PCB_MSG_INFO, "Vendor mapping skipped because element %s is locked\n", PCB_UNKNOWN(subc->refdes)); noskip = 0; } @@ -583,7 +583,7 @@ return pcb_false; } -static pcb_bool rematch(const char *re, const char *s) +static rnd_bool rematch(const char *re, const char *s) { int result; re_sei_t *regex; @@ -591,7 +591,7 @@ /* compile the regular expression */ regex = re_sei_comp(re); if (re_sei_errno(regex) != 0) { - pcb_message(PCB_MSG_ERROR, "regexp error: %s\n", re_error_str(re_sei_errno(regex))); + rnd_message(PCB_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 30902) +++ trunk/tests/conf/conftest.c (revision 30903) @@ -80,7 +80,7 @@ void cmd_dump(char *arg) { if (arg == NULL) { - pcb_message(PCB_MSG_ERROR, "Need an arg: native or lihata"); + rnd_message(PCB_MSG_ERROR, "Need an arg: native or lihata"); return; } if (strncmp(arg, "native", 6) == 0) { @@ -94,7 +94,7 @@ while(isspace(*arg)) arg++; role = pcb_conf_role_parse(arg); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); return; } if (pcb_conf_main_root[role] != NULL) @@ -103,7 +103,7 @@ printf("\n"); } else - pcb_message(PCB_MSG_ERROR, "Invalid dump mode: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid dump mode: '%s'", arg); } void cmd_print(char *arg) @@ -112,12 +112,12 @@ gds_t s; if (arg == NULL) { - pcb_message(PCB_MSG_ERROR, "Need an arg: a native path"); + rnd_message(PCB_MSG_ERROR, "Need an arg: a native path"); return; } node = pcb_conf_get_field(arg); if (node == NULL) { - pcb_message(PCB_MSG_ERROR, "No such path: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "No such path: '%s'", arg); return; } gds_init(&s); @@ -133,7 +133,7 @@ if (arg == NULL) { help:; - pcb_message(PCB_MSG_ERROR, "Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); + rnd_message(PCB_MSG_ERROR, "Need 2 args: role and %s", (is_text ? "lihata text" : "file name")); return; } @@ -151,7 +151,7 @@ role = pcb_conf_role_parse(arg); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); return; } printf("Result: %d\n", pcb_conf_load_as(role, fn, is_text)); @@ -165,7 +165,7 @@ { conf_policy_t np = pcb_conf_policy_parse(arg); if (np == POL_invalid) - pcb_message(PCB_MSG_ERROR, "Invalid/unknown policy: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid/unknown policy: '%s'", arg); else current_policy = np; } @@ -174,7 +174,7 @@ { conf_role_t nr = pcb_conf_role_parse(arg); if (nr == CFR_invalid) - pcb_message(PCB_MSG_ERROR, "Invalid/unknown role: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid/unknown role: '%s'", arg); else current_role = nr; } @@ -186,7 +186,7 @@ lht_node_t *first; if ((*end != '\0') || (np < 0)) { - pcb_message(PCB_MSG_ERROR, "Invalid integer prio: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid integer prio: '%s'", arg); return; } first = pcb_conf_lht_get_first(current_role, 0); @@ -209,12 +209,12 @@ lht_node_t *first; if (arg == NULL) { - pcb_message(PCB_MSG_ERROR, "need a policy", arg); + rnd_message(PCB_MSG_ERROR, "need a policy", arg); return; } np = pcb_conf_policy_parse(arg); if (np == POL_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid integer policy: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid integer policy: '%s'", arg); return; } @@ -244,7 +244,7 @@ path = arg; val = strpbrk(path, " \t="); if (val == NULL) { - pcb_message(PCB_MSG_ERROR, "set needs a value"); + rnd_message(PCB_MSG_ERROR, "set needs a value"); return; } *val = '\0'; @@ -260,7 +260,7 @@ { conf_native_t *n = pcb_conf_get_field(arg); if (n == NULL) { - pcb_message(PCB_MSG_ERROR, "unknown path"); + rnd_message(PCB_MSG_ERROR, "unknown path"); return; } pcb_conf_hid_set_cb(n, hid_id, (add ? &watch_cbs : NULL)); @@ -296,7 +296,7 @@ else { conf_role_t role = pcb_conf_role_parse(arg); if (role == CFR_invalid) { - pcb_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); + rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); return; } pcb_conf_reset(role, ""); @@ -399,7 +399,7 @@ else if (strcmp(cmd, "help") == 0) cmd_help(arg); else - pcb_message(PCB_MSG_ERROR, "unknown command '%s'", cmd); + rnd_message(PCB_MSG_ERROR, "unknown command '%s'", cmd); } conf_core_uninit_pre(); Index: trunk/tests/io_bxl/glue.c =================================================================== --- trunk/tests/io_bxl/glue.c (revision 30902) +++ trunk/tests/io_bxl/glue.c (revision 30903) @@ -1,7 +1,7 @@ #include "bxl.h" -pcb_coord_t pcb_bxl_coord_x(pcb_coord_t c) { return c; } -pcb_coord_t pcb_bxl_coord_y(pcb_coord_t c) { return -c; } +rnd_coord_t pcb_bxl_coord_x(rnd_coord_t c) { return c; } +rnd_coord_t pcb_bxl_coord_y(rnd_coord_t c) { return -c; } void pcb_bxl_pattern_begin(pcb_bxl_ctx_t *ctx, const char *name) {} void pcb_bxl_pattern_end(pcb_bxl_ctx_t *ctx) {} @@ -15,7 +15,7 @@ void pcb_bxl_set_text_str(pcb_bxl_ctx_t *ctx, char *str) { free(str); } void pcb_bxl_poly_begin(pcb_bxl_ctx_t *ctx) {} void pcb_bxl_poly_end(pcb_bxl_ctx_t *ctx) {} -void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, pcb_coord_t x, pcb_coord_t y) {} +void pcb_bxl_poly_add_vertex(pcb_bxl_ctx_t *ctx, rnd_coord_t x, rnd_coord_t y) {} void pcb_bxl_add_property(pcb_bxl_ctx_t *ctx, pcb_any_obj_t *obj, const char *keyval) {} void pcb_bxl_set_attr_val(pcb_bxl_ctx_t *ctx, char *key, char *val) { free(key); free(val); } Index: trunk/tests/librnd/glue.c =================================================================== --- trunk/tests/librnd/glue.c (revision 30902) +++ trunk/tests/librnd/glue.c (revision 30903) @@ -49,15 +49,15 @@ { } -void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot) +void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { } -void pcbhl_draw_marks(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode) +void pcbhl_draw_marks(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) { } -void pcbhl_draw_attached(rnd_hidlib_t *hidlib, pcb_bool inhibit_drawing_mode) +void pcbhl_draw_attached(rnd_hidlib_t *hidlib, rnd_bool inhibit_drawing_mode) { } Index: trunk/tests/pcb-printf/prcli.c =================================================================== --- trunk/tests/pcb-printf/prcli.c (revision 30902) +++ trunk/tests/pcb-printf/prcli.c (revision 30903) @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) { const char *fmt = argv[1]; - pcb_coord_t crd; + rnd_coord_t crd; int n; setlocale(LC_ALL, "C"); @@ -15,10 +15,10 @@ pcb_printf_slot[0] = "%mr"; for(n = 2; n < argc; n++) { - pcb_bool success; + rnd_bool success; double val = pcb_get_value_ex(argv[n], NULL, NULL, NULL, "", &success); if (!success) { - fprintf(stderr, "Unable to convert '%s' to pcb_coord_t\n", argv[n]); + fprintf(stderr, "Unable to convert '%s' to rnd_coord_t\n", argv[n]); return 1; } crd = val; Index: trunk/tests/pcb-printf/tester.c =================================================================== --- trunk/tests/pcb-printf/tester.c (revision 30902) +++ trunk/tests/pcb-printf/tester.c (revision 30903) @@ -19,7 +19,7 @@ int main() { - pcb_coord_t c[] = {0, 1, 1024, 1024*1024, 1024*1024*1024}; + rnd_coord_t c[] = {0, 1, 1024, 1024*1024, 1024*1024*1024}; char *fmt[] = { "%mI", "%mm", "%mM", "%ml", "%mL", "%ms", "%mS", "%md", "%mD", "%m3", "%mr", "%$mI", "%$mm", "%$mM", "%$ml", "%$mL", "%$ms", "%$mS", "%$md", "%$mD", "%$m3", "%$mr", Index: trunk/util/gsch2pcb-rnd/glue.c =================================================================== --- trunk/util/gsch2pcb-rnd/glue.c (revision 30902) +++ trunk/util/gsch2pcb-rnd/glue.c (revision 30903) @@ -35,6 +35,6 @@ const char *pcb_hidlib_default_embedded_menu = ""; -void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, pcb_coord_t abs_x, pcb_coord_t abs_y, int mouse_mot) { } +void pcb_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { } Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30902) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30903) @@ -184,7 +184,7 @@ else if (!strcmp(config, "elements-dir") || !strcmp(config, "d")) { static int warned = 0; if (!warned) { - pcb_message(PCB_MSG_WARNING, "WARNING: using elements-dir from %s - this overrides the normal pcb-rnd configured library search paths\n", config); + rnd_message(PCB_MSG_WARNING, "WARNING: using elements-dir from %s - this overrides the normal pcb-rnd configured library search paths\n", config); warned = 1; } pcb_conf_set(CFR_CLI, "rc/library_search_paths", -1, arg, POL_PREPEND); @@ -253,7 +253,7 @@ lihata_prj:; fclose(f); if (pcb_conf_load_as(CFR_PROJECT, path, 0) != 0) { - pcb_message(PCB_MSG_ERROR, "Failed to parse project file %s.\n", path); + rnd_message(PCB_MSG_ERROR, "Failed to parse project file %s.\n", path); exit(1); } pcb_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) { - pcb_message(PCB_MSG_ERROR, "Error: can't use unknown method '%s'; try --help\n", arg); + rnd_message(PCB_MSG_ERROR, "Error: can't use unknown method '%s'; try --help\n", arg); exit(1); } pcb_conf_set(CFR_CLI, "utils/gsch2pcb_rnd/method", -1, arg, POL_OVERWRITE); @@ -345,7 +345,7 @@ else { if (loc_str_has_suffix(argv[i], ".sch", 4) == NULL) { if (have_cli_project_file) { - pcb_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(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]); exit(1); } load_extra_project_files(); @@ -375,7 +375,7 @@ { char *path = pcb_strdup_printf("%s/gnet-%s.scm", dir, backend); if (!pcb_file_readable(path)) - pcb_message(PCB_MSG_WARNING, "WARNING: %s is not found, gnetlist will probably fail; please check your pcb-rnd installation!\n", path); + rnd_message(PCB_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 (!pcb_file_readable(LOCAL_PROJECT_FILE)) { - pcb_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(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]); exit(1); } if (pcb_conf_load_as(CFR_PROJECT, LOCAL_PROJECT_FILE, 0) != 0) { - pcb_message(PCB_MSG_ERROR, "Failed to load project file %s. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); + rnd_message(PCB_MSG_ERROR, "Failed to load project file %s. Try %s --help\n", LOCAL_PROJECT_FILE, argv[0]); exit(1); } pcb_conf_update(NULL, -1); /* because of our new project file */ @@ -445,13 +445,13 @@ } } else { - pcb_message(PCB_MSG_ERROR, "No schematics specified on the cli or in project files. Try %s --help\n", argv[0]); + rnd_message(PCB_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) { - pcb_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(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]); exit(1); } @@ -471,7 +471,7 @@ if (current_method == NULL) { want_method = want_method_default; if (!conf_g2pr.utils.gsch2pcb_rnd.quiet_mode) - pcb_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(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); } } @@ -478,7 +478,7 @@ if (current_method == NULL) { current_method = method_find(want_method); if (current_method == NULL) { - pcb_message(PCB_MSG_ERROR, "Error: can't find method %s\n", want_method); + rnd_message(PCB_MSG_ERROR, "Error: can't find method %s\n", want_method); exit(1); } }