Index: trunk/doc/developer/dad/TEMPLATE.c =================================================================== --- trunk/doc/developer/dad/TEMPLATE.c (revision 31010) +++ trunk/doc/developer/dad/TEMPLATE.c (revision 31011) @@ -83,7 +83,7 @@ /* set up the context */ foo_ctx.active = 1; - RND_DAD_NEW("EDIT_THIS_ID", foo_ctx.dlg, "EDIT THIS: title", &foo_ctx, pcb_false, foo_close_cb); + RND_DAD_NEW("EDIT_THIS_ID", foo_ctx.dlg, "EDIT THIS: title", &foo_ctx, rnd_false, foo_close_cb); } static const char pcb_acts_Foo[] = "Foo(object)\n"; <<<- edit this Index: trunk/doc/developer/dad/TEMPLATE_MODAL.c =================================================================== --- trunk/doc/developer/dad/TEMPLATE_MODAL.c (revision 31010) +++ trunk/doc/developer/dad/TEMPLATE_MODAL.c (revision 31011) @@ -64,7 +64,7 @@ /* set up the context */ ctx.attrs = dlg; - RND_DAD_NEW("EDIT_THIS_ID", dlg, "EDIT THIS: title", &ctx, pcb_true, NULL); + RND_DAD_NEW("EDIT_THIS_ID", dlg, "EDIT THIS: title", &ctx, rnd_true, NULL); RND_DAD_RUN(dlg); RND_DAD_FREE(dlg); } Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 31010) +++ trunk/src/board.c (revision 31011) @@ -88,7 +88,7 @@ rnd_conf_set(RND_CFR_INTERNAL, "design/poly_isle_area", -1, "200000000", RND_POL_OVERWRITE); - ptr->RatDraw = pcb_false; + ptr->RatDraw = rnd_false; /* NOTE: we used to set all the pcb flags on ptr here, but we don't need to do that anymore due to the new conf system */ ptr->hidlib.grid = rnd_conf.editor.grid; @@ -115,7 +115,7 @@ dpcb = -1; pcb_io_err_inhibit_inc(); - rnd_conf_list_foreach_path_first(NULL, dpcb, &conf_core.rc.default_pcb_file, pcb_load_pcb(__path__, NULL, pcb_false, 1 | 0x10 | inh)); + rnd_conf_list_foreach_path_first(NULL, dpcb, &conf_core.rc.default_pcb_file, pcb_load_pcb(__path__, NULL, rnd_false, 1 | 0x10 | inh)); pcb_io_err_inhibit_dec(); if (dpcb != 0) { /* no default PCB in file, use embedded version */ @@ -128,7 +128,7 @@ if (f != NULL) { fwrite(default_pcb_internal, strlen(default_pcb_internal), 1, f); fclose(f); - dpcb = pcb_load_pcb(efn, NULL, pcb_false, 1 | 0x10); + dpcb = pcb_load_pcb(efn, NULL, rnd_false, 1 | 0x10); if (dpcb == 0) rnd_message(RND_MSG_WARNING, "Couldn't find default.pcb - using the embedded fallback\n"); else @@ -258,7 +258,7 @@ free(PCB->hidlib.name); PCB->hidlib.name = Name; pcb_board_changed(0); - return pcb_true; + return rnd_true; } static void pcb_board_resize_(pcb_board_t *pcb, rnd_coord_t Width, rnd_coord_t Height) @@ -320,7 +320,7 @@ void pcb_board_remove(pcb_board_t *Ptr) { - pcb_undo_clear_list(pcb_true); + pcb_undo_clear_list(rnd_true); pcb_board_free(Ptr); free(Ptr); } @@ -391,7 +391,7 @@ rnd_rnd_box_t b; int chg = 0; - if (pcb_data_bbox(&b, pcb->Data, pcb_false) == NULL) + if (pcb_data_bbox(&b, pcb->Data, rnd_false) == NULL) return -1; if ((b.X2 - b.X1) > pcb->hidlib.size_x) { Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 31010) +++ trunk/src/brave.c (revision 31011) @@ -237,7 +237,7 @@ RND_DAD_END(dlg); - RND_DAD_NEW("brave", dlg, "Brave features", dlg, pcb_true, NULL); + RND_DAD_NEW("brave", dlg, "Brave features", dlg, rnd_true, NULL); brave2dlg(dlg_hid_ctx); RND_DAD_RUN(dlg); RND_DAD_FREE(dlg); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 31010) +++ trunk/src/buffer.c (revision 31011) @@ -152,13 +152,13 @@ rnd_rnd_box_t tmp, *box; int res = 0; - box = pcb_data_bbox(&tmp, Buffer->Data, pcb_false); + box = pcb_data_bbox(&tmp, Buffer->Data, rnd_false); if (box) Buffer->BoundingBox = *box; else res = -1; - box = pcb_data_bbox_naked(&tmp, Buffer->Data, pcb_false); + box = pcb_data_bbox_naked(&tmp, Buffer->Data, rnd_false); if (box) Buffer->bbox_naked = *box; else @@ -187,7 +187,7 @@ void pcb_buffer_clear(pcb_board_t *pcb, pcb_buffer_t *Buffer) { - pcb_buffer_clear_(pcb, Buffer, pcb_true); + pcb_buffer_clear_(pcb, Buffer, rnd_true); } /* add (or move) selected */ @@ -208,10 +208,10 @@ else ctx.buffer.extraflg = 0; - rnd_hid_notify_crosshair_change(hidlib, pcb_false); + rnd_hid_notify_crosshair_change(hidlib, rnd_false); ctx.buffer.src = pcb->Data; ctx.buffer.dst = Buffer->Data; - pcb_selected_operation(pcb, pcb->Data, fnc, &ctx, pcb_false, PCB_OBJ_ANY & (~PCB_OBJ_SUBC_PART), on_locked_too); + pcb_selected_operation(pcb, pcb->Data, fnc, &ctx, rnd_false, PCB_OBJ_ANY & (~PCB_OBJ_SUBC_PART), on_locked_too); /* set origin to passed or current position */ if (X || Y) { @@ -224,19 +224,19 @@ } Buffer->from_outside = 0; free(Buffer->source_path); Buffer->source_path = NULL; - rnd_hid_notify_crosshair_change(hidlib, pcb_true); + rnd_hid_notify_crosshair_change(hidlib, rnd_true); } 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); + pcb_buffer_toss_selected(&AddBufferFunctions, pcb, Buffer, X, Y, LeaveSelected, rnd_false, keep_id); } extern pcb_opfunc_t pcb_RemoveFunctions; 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); + pcb_buffer_toss_selected(&AddBufferFunctions, pcb, Buffer, X, Y, LeaveSelected, rnd_false, keep_id); + pcb_buffer_toss_selected(&pcb_RemoveFunctions, pcb, Buffer, X, Y, LeaveSelected, rnd_false, keep_id); pcb_undo_inc_serial(); } @@ -283,7 +283,7 @@ 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); + pcb_board_t *orig, *newPCB = pcb_board_new_(rnd_false); orig = PCB; PCB = newPCB; @@ -309,7 +309,7 @@ free(Buffer->source_path); Buffer->source_path = rnd_strdup(Filename); PCB = orig; pcb_layergrp_inhibit_dec(); - return pcb_true; + return rnd_true; } /* release unused memory */ @@ -321,7 +321,7 @@ pcb_layergrp_inhibit_dec(); Buffer->from_outside = 0; free(Buffer->source_path); Buffer->source_path = NULL; - return pcb_false; + return rnd_false; } void pcb_buffer_rotate90(pcb_buffer_t *Buffer, unsigned int Number) @@ -478,9 +478,9 @@ return 0; } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); pcb_buffer_rotate(PCB_PASTEBUFFER, ang); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return 0; } @@ -544,7 +544,7 @@ RND_DAD_BUTTON_CLOSES(ctx.dlg, clbtn); RND_DAD_END(ctx.dlg); - RND_DAD_NEW("buffer_scale", ctx.dlg, "Buffer scale factors", &ctx, pcb_true, NULL); + RND_DAD_NEW("buffer_scale", ctx.dlg, "Buffer scale factors", &ctx, rnd_true, NULL); res = RND_DAD_RUN(ctx.dlg); *x = ctx.dlg[ctx.wx].val.dbl; *y = ctx.dlg[ctx.wy].val.dbl; @@ -593,9 +593,9 @@ RND_ACT_IRES(0); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); pcb_buffer_scale(PCB_PASTEBUFFER, x, y, th, recurse); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return 0; } @@ -613,7 +613,7 @@ int i; for (i = 0; i < PCB_MAX_BUFFER; i++) { - pcb_buffer_clear_(pcb, pcb_buffers+i, pcb_false); + pcb_buffer_clear_(pcb, pcb_buffers+i, rnd_false); pcb_data_uninit(pcb_buffers[i].Data); free(pcb_buffers[i].Data); } @@ -638,7 +638,7 @@ Buffer->X = PCB_SWAP_X(Buffer->X); Buffer->Y = PCB_SWAP_Y(Buffer->Y); pcb_undo_freeze_add(); - pcb_data_mirror(Buffer->Data, 0, PCB_TXM_COORD, pcb_false, 0); + pcb_data_mirror(Buffer->Data, 0, PCB_TXM_COORD, rnd_false, 0); pcb_undo_unfreeze_add(); pcb_set_buffer_bbox(Buffer); } @@ -765,7 +765,7 @@ rnd_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_bool keep_id) { rnd_cardinal_t i; - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; pcb_opctx_t ctx; int num_layers; @@ -799,7 +799,7 @@ continue; } - destlayer = pcb_loose_subc_layer(PCB, destlayer, pcb_true); + destlayer = pcb_loose_subc_layer(PCB, destlayer, rnd_true); if (destlayer->meta.real.vis) { PCB_LINE_LOOP(sourcelayer); @@ -912,7 +912,7 @@ printf(" .... Leaving CopyPastebufferToLayout.\n"); #endif - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return changed; } @@ -924,7 +924,7 @@ } /* loads footprint data from file/library into buffer (as subcircuit) - * returns pcb_false on error + * returns rnd_false on error * if successful, update some other stuff and reposition the pastebuffer */ rnd_bool pcb_buffer_load_footprint(pcb_buffer_t *Buffer, const char *Name, const char *fmt) { @@ -947,12 +947,12 @@ /* the loader may have created new layers */ pcb_data_binding_update(PCB, Buffer->Data); - return pcb_true; + return rnd_true; } /* release memory which might have been acquired */ pcb_buffer_clear(PCB, Buffer); - return pcb_false; + return rnd_false; } @@ -976,7 +976,7 @@ int op, force; const char *sbufnum = "", *fmt = NULL, *forces = NULL, *name, *tmp; static char *default_file = NULL; - rnd_bool free_name = pcb_false; + rnd_bool free_name = rnd_false; static int stack[32]; static int sp = 0; int number, rv; @@ -990,7 +990,7 @@ force = (forces != NULL) && ((*forces == '1') || (*forces == 'y') || (*forces == 'Y')); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); switch (op) { /* clear contents of paste buffer */ case F_Clear: @@ -1013,7 +1013,7 @@ /* copies objects to paste buffer */ case F_AddSelected: - pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, 0, 0, pcb_false, pcb_false); + pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, 0, 0, rnd_false, rnd_false); if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { rnd_message(RND_MSG_WARNING, "Nothing buffer-movable is selected, nothing copied to the paste buffer\n"); goto error; @@ -1022,7 +1022,7 @@ /* cuts objects to paste buffer; it's different from AddSelected+RemoveSelected in extobj side effects */ case F_MoveSelected: - pcb_buffer_move_selected(PCB, PCB_PASTEBUFFER, 0, 0, pcb_false, pcb_false); + pcb_buffer_move_selected(PCB, PCB_PASTEBUFFER, 0, 0, rnd_false, rnd_false); if (pcb_data_is_empty(PCB_PASTEBUFFER->Data)) { rnd_message(RND_MSG_WARNING, "Nothing buffer-movable is selected, nothing moved to the paste buffer\n"); goto error; @@ -1056,7 +1056,7 @@ break; case F_SaveAll: - free_name = pcb_false; + free_name = rnd_false; if (argc <= 2) { name = rnd_gui->fileselect(rnd_gui, "Save Paste Buffer As ...", "Choose a file to save the contents of the\npaste buffer to.\n", @@ -1068,7 +1068,7 @@ } if (name && *name) default_file = rnd_strdup(name); - free_name = pcb_true; + free_name = rnd_true; } else name = sbufnum; @@ -1090,7 +1090,7 @@ break; case F_LoadAll: - free_name = pcb_false; + free_name = rnd_false; if (argc <= 2) { name = rnd_gui->fileselect(rnd_gui, "Load Paste Buffer ...", "Choose a file to load the contents of the\npaste buffer from.\n", @@ -1102,7 +1102,7 @@ } if (name && *name) default_file = rnd_strdup(name); - free_name = pcb_true; + free_name = rnd_true; } else name = sbufnum; @@ -1118,7 +1118,7 @@ case F_Save: name = sbufnum; rv = rnd_actionva(RND_ACT_HIDLIB, "SaveTo", "PasteBuffer", name, fmt, NULL); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return rv; case F_ToLayout: @@ -1143,14 +1143,14 @@ } else { - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_FAIL(PasteBuffer); } oldx = x; oldy = y; - if (pcb_buffer_copy_to_layout(PCB, x, y, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_buffer_copy_to_layout(PCB, x, y, rnd_false)) + pcb_board_set_changed_flag(rnd_true); } break; @@ -1166,13 +1166,13 @@ number = strtol(sbufnum, &end, 10); if (*end != 0) { rnd_message(RND_MSG_ERROR, "invalid buffer number '%s': should be an integer\n", sbufnum); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return FGW_ERR_ARG_CONV; } number--; if ((number < 0) || (number >= PCB_MAX_BUFFER)) { rnd_message(RND_MSG_ERROR, "invalid buffer number '%d': out of range 1..%d\n", number+1, PCB_MAX_BUFFER); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return FGW_ERR_ARG_CONV; } } @@ -1180,7 +1180,7 @@ number = conf_core.editor.buffer_number; res->type = FGW_STR; res->val.str = pcb_buffers[number].source_path; - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return 0; /* set number */ @@ -1194,12 +1194,12 @@ } } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_IRES(0); return 0; error:; - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_IRES(-1); return 0; } Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 31010) +++ trunk/src/change.c (revision 31011) @@ -313,11 +313,11 @@ /* ---------------------------------------------------------------------- * changes the thermals on all selected and visible padstacks. - * Returns pcb_true if anything has changed + * Returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_thermals(int types, int therm_style, unsigned long lid) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgtherm.pcb = PCB; @@ -324,7 +324,7 @@ ctx.chgtherm.style = therm_style; ctx.chgtherm.lid = lid; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeThermalFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeThermalFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -334,11 +334,11 @@ /* ---------------------------------------------------------------------- * changes the size of all selected and visible object types - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -346,7 +346,7 @@ ctx.chgsize.is_absolute = fixIt; ctx.chgsize.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeSizeFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeSizeFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -356,11 +356,11 @@ /* ---------------------------------------------------------------------- * changes the clearance size of all selected and visible objects - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_clear_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -368,7 +368,7 @@ ctx.chgsize.is_absolute = fixIt; ctx.chgsize.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeClearSizeFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeClearSizeFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -378,11 +378,11 @@ /* -------------------------------------------------------------------------- * changes the 2nd size (drilling hole) of all selected and visible objects - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_2nd_size(int types, rnd_coord_t Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -390,7 +390,7 @@ ctx.chgsize.is_absolute = fixIt; ctx.chgsize.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &Change2ndSizeFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &Change2ndSizeFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -400,11 +400,11 @@ /* -------------------------------------------------------------------------- * changes the internal/self rotation all selected and visible objects - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_rot(int types, double Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -412,7 +412,7 @@ ctx.chgsize.is_absolute = fixIt; ctx.chgsize.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeRotFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeRotFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -422,16 +422,16 @@ /* ---------------------------------------------------------------------- * changes the clearance flag (join) of all selected and visible lines - * and/or arcs. Returns pcb_true if anything has changed + * and/or arcs. Returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_join(int types) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeJoinFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeJoinFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -441,16 +441,16 @@ /* ---------------------------------------------------------------------- * changes the clearance flag (join) of all selected and visible lines - * and/or arcs. Returns pcb_true if anything has changed + * and/or arcs. Returns rnd_true if anything has changed */ rnd_bool pcb_set_selected_join(int types) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; - change = pcb_selected_operation(PCB, PCB->Data, &SetJoinFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &SetJoinFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -460,16 +460,16 @@ /* ---------------------------------------------------------------------- * changes the clearance flag (join) of all selected and visible lines - * and/or arcs. Returns pcb_true if anything has changed + * and/or arcs. Returns rnd_true if anything has changed */ rnd_bool pcb_clr_selected_join(int types) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; - change = pcb_selected_operation(PCB, PCB->Data, &ClrJoinFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ClrJoinFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -479,16 +479,16 @@ /* ---------------------------------------------------------------------- * changes the nonetlist-flag of all selected and visible subcircuits - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_nonetlist(int types) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeNonetlistFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeNonetlistFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -498,11 +498,11 @@ /* ---------------------------------------------------------------------- * changes the angle of all selected and visible object types - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_angle(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgangle.pcb = PCB; @@ -510,7 +510,7 @@ ctx.chgangle.is_absolute = fixIt; ctx.chgangle.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeAngleFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeAngleFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -520,11 +520,11 @@ /* ---------------------------------------------------------------------- * changes the radius of all selected and visible object types - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ rnd_bool pcb_chg_selected_radius(int types, int is_start, rnd_angle_t Difference, rnd_bool fixIt) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; @@ -532,7 +532,7 @@ ctx.chgsize.is_absolute = fixIt; ctx.chgsize.value = Difference; - change = pcb_selected_operation(PCB, PCB->Data, &ChangeRadiusFunctions, &ctx, pcb_false, types, pcb_false); + change = pcb_selected_operation(PCB, PCB->Data, &ChangeRadiusFunctions, &ctx, rnd_false, types, rnd_false); if (change) { pcb_draw(); pcb_undo_inc_serial(); @@ -543,7 +543,7 @@ TODO("subc: check if it is true:") /* --------------------------------------------------------------------------- * 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 + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { @@ -566,7 +566,7 @@ TODO("subc: check if it is true:") /* --------------------------------------------------------------------------- * changes the size of the passed object; element size is pin ring sizes - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_1st_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { @@ -588,7 +588,7 @@ /* --------------------------------------------------------------------------- * changes the radius of the passed object (e.g. arc width/height) - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_radius(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_x, rnd_coord_t r, rnd_bool fixIt) { @@ -610,7 +610,7 @@ /* --------------------------------------------------------------------------- * changes the angles of the passed object (e.g. arc start/ctx->chgsize.value) - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, rnd_angle_t a, rnd_bool fixIt) { @@ -633,7 +633,7 @@ /* --------------------------------------------------------------------------- * changes the clearance size of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_clear_size(int Type, void *Ptr1, void *Ptr2, void *Ptr3, rnd_coord_t Difference, rnd_bool fixIt) { @@ -655,7 +655,7 @@ /* --------------------------------------------------------------------------- * changes the thermal of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed * */ rnd_bool pcb_chg_obj_thermal(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int therm_type, unsigned long lid) @@ -677,7 +677,7 @@ /* --------------------------------------------------------------------------- * changes the 2nd size of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ 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) { @@ -700,7 +700,7 @@ /* --------------------------------------------------------------------------- * changes the internal/self rotation of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_rot(int Type, void *Ptr1, void *Ptr2, void *Ptr3, double Difference, rnd_bool fixIt, rnd_bool incundo) { @@ -743,7 +743,7 @@ /* --------------------------------------------------------------------------- * changes the clearance-flag of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { @@ -754,14 +754,14 @@ if (pcb_object_operation(&ChangeJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); pcb_undo_inc_serial(); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * sets the clearance-flag of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_set_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { @@ -772,14 +772,14 @@ if (pcb_object_operation(&SetJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); pcb_undo_inc_serial(); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * clears the clearance-flag of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_clr_obj_join(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { @@ -790,14 +790,14 @@ if (pcb_object_operation(&ClrJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); pcb_undo_inc_serial(); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * changes the square-flag of the passed object - * Returns pcb_true if anything is changed + * Returns rnd_true if anything is changed */ rnd_bool pcb_chg_obj_nonetlist(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { @@ -808,9 +808,9 @@ if (pcb_object_operation(&ChangeNonetlistFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); pcb_undo_inc_serial(); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } void *pcb_chg_obj_name_query(pcb_any_obj_t *obj) Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 31010) +++ trunk/src/change_act.c (revision 31011) @@ -115,7 +115,7 @@ { if (type != PCB_OBJ_VOID) if (pcb_chg_obj_clear_size(type, ptr1, ptr2, ptr3, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } case F_SelectedVias: @@ -122,20 +122,20 @@ case F_SelectedPads: case F_SelectedPins: if (pcb_chg_selected_clear_size(PCB_OBJ_PSTK, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedLines: if (pcb_chg_selected_clear_size(PCB_OBJ_LINE, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedArcs: if (pcb_chg_selected_clear_size(PCB_OBJ_ARC, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_clear_size(PCB_CHANGECLEARSIZE_TYPES, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } } @@ -203,7 +203,7 @@ rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); } if (set_object(type, ptr1, ptr2, ptr3)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } @@ -211,17 +211,17 @@ case F_SelectedPins: case F_SelectedPads: if (set_selected(PCB_OBJ_PSTK)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedLines: if (set_selected(PCB_OBJ_LINE)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedTexts: if (set_selected(PCB_OBJ_TEXT)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedNames: @@ -232,7 +232,7 @@ case F_Selected: case F_SelectedObjects: if (set_selected(PCB_CHANGESIZE_TYPES)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } } @@ -312,11 +312,11 @@ } if (tostyle) { if (pcb_chg_obj_1st_size(type, ptr1, ptr2, ptr3, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else { if (pcb_chg_obj_size(type, ptr1, ptr2, ptr3, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } break; } @@ -324,22 +324,22 @@ case F_SelectedPins: case F_SelectedPads: if (pcb_chg_selected_size(PCB_OBJ_PSTK, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedArcs: if (pcb_chg_selected_size(PCB_OBJ_ARC, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedLines: if (pcb_chg_selected_size(PCB_OBJ_LINE, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedTexts: if (pcb_chg_selected_size(PCB_OBJ_TEXT, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedNames: @@ -350,7 +350,7 @@ case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_size(PCB_CHANGESIZE_TYPES, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } } @@ -402,8 +402,8 @@ { if (type != PCB_OBJ_VOID) - if (pcb_chg_obj_2nd_size(type, ptr1, ptr2, ptr3, value, absolute, pcb_true)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_chg_obj_2nd_size(type, ptr1, ptr2, ptr3, value, absolute, rnd_true)) + pcb_board_set_changed_flag(rnd_true); break; } @@ -411,13 +411,13 @@ case F_SelectedVias: case F_SelectedPins: if (pcb_chg_selected_2nd_size(PCB_OBJ_PSTK, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_2nd_size(PCB_OBJ_CLASS_PIN, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } } @@ -449,7 +449,7 @@ if ((o->term != NULL) && (RND_NSTRCMP(pinnum, o->term) == 0)) { TODO(": make this undoable") rnd_attribute_put(&o->Attributes, "name", pinname); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); changed++; } } @@ -508,7 +508,7 @@ pcb_undo_save_serial(); if (pcb_chg_obj_name_query(ptr2)) { rnd_hid_redraw(PCB); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_actionva(RND_ACT_HIDLIB, "DeleteRats", "AllRats", NULL); } if (op == F_Object) { @@ -516,7 +516,7 @@ if ((subc != NULL) && subc->auto_termname_display) { pcb_undo_add_obj_to_flag(ptr2); PCB_FLAG_SET(PCB_FLAG_TERMNAME, (pcb_any_obj_t *)ptr2); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); pcb_undo_inc_serial(); pcb_draw(); } @@ -530,7 +530,7 @@ name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layout name:", RND_EMPTY(RND_ACT_HIDLIB->name), "Layout name"); /* NB: ChangeLayoutName takes ownership of the passed memory */ if (name && pcb_board_change_name(name)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; /* change the name of the active layer */ @@ -538,7 +538,7 @@ name = rnd_hid_prompt_for(RND_ACT_HIDLIB, "Enter the layer name:", RND_EMPTY(PCB_CURRLAYER(PCB_ACT_BOARD)->name), "Layer name"); /* NB: pcb_layer_rename_ takes ownership of the passed memory */ if (name && (pcb_layer_rename_(PCB_CURRLAYER(PCB_ACT_BOARD), name, 1) == 0)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); else free(name); break; @@ -576,24 +576,24 @@ rnd_hid_get_coords("Select an Object", &x, &y, 0); if ((type = pcb_search_screen(x, y, PCB_CHANGEJOIN_TYPES, &ptr1, &ptr2, &ptr3)) != PCB_OBJ_VOID) if (pcb_chg_obj_join(type, ptr1, ptr2, ptr3)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } case F_SelectedLines: if (pcb_chg_selected_join(PCB_OBJ_LINE)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedArcs: if (pcb_chg_selected_join(PCB_OBJ_ARC)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_join(PCB_CHANGEJOIN_TYPES)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; default: @@ -626,7 +626,7 @@ ptr3 = NULL; type = pcb_search_screen(x, y, PCB_CHANGENONETLIST_TYPES, &ptr1, &ptr2, &ptr3); if (pcb_chg_obj_nonetlist(type, ptr1, ptr2, ptr3)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } case F_SelectedElements: @@ -633,7 +633,7 @@ case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_nonetlist(PCB_OBJ_SUBC)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; default: @@ -851,7 +851,7 @@ rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); else { if (pcb_chg_obj_angle(type, ptr1, ptr2, ptr3, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } break; @@ -859,13 +859,13 @@ case F_SelectedArcs: if (pcb_chg_selected_angle(PCB_OBJ_ARC, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_angle(PCB_CHANGESIZE_TYPES, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } @@ -920,7 +920,7 @@ rnd_message(RND_MSG_WARNING, "Sorry, %s object is locked\n", pcb_obj_type_name(obj->type)); else { if (pcb_chg_obj_radius(type, ptr1, ptr2, ptr3, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } break; @@ -928,13 +928,13 @@ case F_SelectedArcs: if (pcb_chg_selected_radius(PCB_OBJ_ARC, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Selected: case F_SelectedObjects: if (pcb_chg_selected_radius(PCB_CHANGESIZE_TYPES, which, value, absolute)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 31010) +++ trunk/src/crosshair.c (revision 31011) @@ -97,7 +97,7 @@ if (dash_last) { pcb_draw_dashed_line(NULL, pcb_crosshair.GC, polygon->Points[i].X + dx, - polygon->Points[i].Y + dy, polygon->Points[next].X + dx, polygon->Points[next].Y + dy, 5, pcb_false); + polygon->Points[i].Y + dy, polygon->Points[next].X + dx, polygon->Points[next].Y + dy, 5, rnd_false); break; /* skip normal line draw below */ } } @@ -543,14 +543,14 @@ /* --------------------------------------------------------------------------- * notify the GUI that data relating to the mark is being changed. * - * The argument passed is pcb_false to notify "changes are about to happen", - * and pcb_true to notify "changes have finished". + * The argument passed is rnd_false to notify "changes are about to happen", + * and rnd_true to notify "changes have finished". * - * Each call with a 'pcb_false' parameter must be matched with a following one - * with a 'pcb_true' parameter. Unmatched 'pcb_true' calls are currently not permitted, + * Each call with a 'rnd_false' parameter must be matched with a following one + * with a 'rnd_true' parameter. Unmatched 'rnd_true' calls are currently not permitted, * but might be allowed in the future. * - * GUIs should not complain if they receive extra calls with 'pcb_true' as parameter. + * GUIs should not complain if they receive extra calls with 'rnd_true' as parameter. * 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. */ @@ -674,7 +674,7 @@ rnd_rnd_box_t SearchBox = rnd_point_box(X, Y); struct onpoint_search_info info; int i; - rnd_bool redraw = pcb_false; + rnd_bool redraw = rnd_false; op_swap(crosshair); @@ -706,7 +706,7 @@ PCB_FLAG_CLEAR(PCB_FLAG_ONPOINT, (pcb_any_obj_t *) op->obj.any); DrawLineOrArc(op->type, op->obj.any); - redraw = pcb_true; + redraw = rnd_true; } /* draw the new objects */ @@ -717,7 +717,7 @@ if (onpoint_find(&crosshair->old_onpoint_objs, op->obj.any) != NULL) continue; DrawLineOrArc(op->type, op->obj.any); - redraw = pcb_true; + redraw = rnd_true; } if (redraw) { @@ -770,7 +770,7 @@ snap_data->x = x; snap_data->y = y; snap_data->nearest_sq_dist = sq_dist; - snap_data->nearest_is_grid = pcb_false; + snap_data->nearest_is_grid = rnd_false; } } @@ -785,9 +785,9 @@ && pcb_crosshair.AttachedObject.Type == PCB_OBJ_LINE_POINT && pcb_crosshair.AttachedObject.Ptr1 == layer && pcb_crosshair.AttachedObject.Ptr2 != line)) - return pcb_true; + return rnd_true; else - return pcb_false; + return rnd_false; } 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) @@ -824,7 +824,7 @@ /* Move in the X direction until we hit the line */ try_x = (nearest_grid_y - line->Point1.Y) / dy * dx + line->Point1.X; try_y = nearest_grid_y; - check_snap_object(snap_data, try_x, try_y, pcb_true, (pcb_any_obj_t *)line); + check_snap_object(snap_data, try_x, try_y, rnd_true, (pcb_any_obj_t *)line); } /* Try snapping along the Y axis */ @@ -831,7 +831,7 @@ if (dx != 0.) { try_x = nearest_grid_x; try_y = (nearest_grid_x - line->Point1.X) / dx * dy + line->Point1.Y; - check_snap_object(snap_data, try_x, try_y, pcb_true, (pcb_any_obj_t *)line); + check_snap_object(snap_data, try_x, try_y, rnd_true, (pcb_any_obj_t *)line); } if (dx != dy) { /* If line not parallel with dX = dY direction.. */ @@ -845,7 +845,7 @@ try_x = nearest_grid_x + dist; try_y = nearest_grid_y + dist; - check_snap_object(snap_data, try_x, try_y, pcb_true, (pcb_any_obj_t *)line); + check_snap_object(snap_data, try_x, try_y, rnd_true, (pcb_any_obj_t *)line); } if (dx != -dy) { /* If line not parallel with dX = -dY direction.. */ @@ -859,7 +859,7 @@ try_x = nearest_grid_x + dist; try_y = nearest_grid_y - dist; - check_snap_object(snap_data, try_x, try_y, pcb_true, (pcb_any_obj_t *)line); + check_snap_object(snap_data, try_x, try_y, rnd_true, (pcb_any_obj_t *)line); } } @@ -891,7 +891,7 @@ snap_data.crosshair = &pcb_crosshair; snap_data.nearest_sq_dist = crosshair_sq_dist(&pcb_crosshair, nearest_grid_x, nearest_grid_y); - snap_data.nearest_is_grid = pcb_true; + snap_data.nearest_is_grid = rnd_true; snap_data.x = nearest_grid_x; snap_data.y = nearest_grid_y; @@ -903,7 +903,7 @@ pcb_subc_t *sc = (pcb_subc_t *) ptr1; 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); + check_snap_object(&snap_data, ox, oy, rnd_false, (pcb_any_obj_t *)sc); } /*** padstack center ***/ @@ -917,7 +917,7 @@ if (ans != PCB_OBJ_VOID) { pcb_pstk_t *ps = (pcb_pstk_t *) ptr2; - check_snap_object(&snap_data, ps->x, ps->y, pcb_true, (pcb_any_obj_t *)ps); + check_snap_object(&snap_data, ps->x, ps->y, rnd_true, (pcb_any_obj_t *)ps); hidlib->tool_snapped_obj_bbox = &ps->BoundingBox; } else @@ -932,11 +932,11 @@ /* Arc point needs special handling as it's not a real point but has to be calculated */ 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); + check_snap_object(&snap_data, ex, ey, rnd_true, (pcb_any_obj_t *)ptr2); } else if (ans != PCB_OBJ_VOID) { rnd_point_t *pnt = (rnd_point_t *) ptr3; - check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true, (pcb_any_obj_t *)ptr2); + check_snap_object(&snap_data, pnt->X, pnt->Y, rnd_true, (pcb_any_obj_t *)ptr2); } /*** polygon terminal: center ***/ @@ -951,7 +951,7 @@ 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)) - check_snap_object(&snap_data, cx, cy, pcb_true, (pcb_any_obj_t *)p); + check_snap_object(&snap_data, cx, cy, rnd_true, (pcb_any_obj_t *)p); } } @@ -974,7 +974,7 @@ if (ans != PCB_OBJ_VOID) { rnd_point_t *pnt = (rnd_point_t *) ptr3; - check_snap_object(&snap_data, pnt->X, pnt->Y, pcb_true, NULL); + check_snap_object(&snap_data, pnt->X, pnt->Y, rnd_true, NULL); } PCB->hidlib.ch_x = pcb_crosshair.X = snap_data.x; @@ -987,11 +987,11 @@ ans = pcb_search_grid_slop(pcb_crosshair.X, pcb_crosshair.Y, PCB_OBJ_LINE_POINT, &ptr1, &ptr2, &ptr3); if (ans == PCB_OBJ_VOID) { if ((rnd_gui != NULL) && (rnd_gui->point_cursor != NULL)) - rnd_gui->point_cursor(rnd_gui, pcb_false); + rnd_gui->point_cursor(rnd_gui, rnd_false); } else if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, (pcb_line_t *) ptr2)) { if ((rnd_gui != NULL) && (rnd_gui->point_cursor != NULL)) - rnd_gui->point_cursor(rnd_gui, pcb_true); + rnd_gui->point_cursor(rnd_gui, rnd_true); } } @@ -1011,7 +1011,7 @@ /* --------------------------------------------------------------------------- * move crosshair absolute - * return pcb_true if the crosshair was moved from its existing position + * return rnd_true if the crosshair was moved from its existing position */ rnd_bool pcb_crosshair_move_absolute(rnd_coord_t X, rnd_coord_t Y) { @@ -1029,13 +1029,13 @@ x = z; z = pcb_crosshair.Y; PCB->hidlib.ch_y = pcb_crosshair.Y = y; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); /* Our caller notifies when it has done */ + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); /* Our caller notifies when it has done */ /* now move forward again */ PCB->hidlib.ch_x = pcb_crosshair.X = x; PCB->hidlib.ch_y = pcb_crosshair.Y = z; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -1046,7 +1046,7 @@ rnd_coord_t save_grid = PCB->hidlib.grid; PCB->hidlib.grid = 1; if (pcb_crosshair_move_absolute(X, Y)) - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); rnd_gui->set_crosshair(rnd_gui, pcb_crosshair.X, pcb_crosshair.Y, HID_SC_WARP_POINTER); PCB->hidlib.grid = save_grid; } @@ -1073,7 +1073,7 @@ memset(&pcb_crosshair.old_onpoint_objs, 0, sizeof(vtop_t)); /* clear the mark */ - pcb_marked.status = pcb_false; + pcb_marked.status = rnd_false; /* Initialise Line Route */ pcb_route_init(&pcb_crosshair.Route); @@ -1103,20 +1103,20 @@ static int count = 0; if (Showing) { - pcb_notify_mark_change(pcb_false); + pcb_notify_mark_change(rnd_false); if (count == 0) old = pcb_marked; pcb_marked.X = X; pcb_marked.Y = Y; - pcb_marked.status = pcb_true; + pcb_marked.status = rnd_true; count++; - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); } else if (count > 0) { - pcb_notify_mark_change(pcb_false); + pcb_notify_mark_change(rnd_false); count = 0; pcb_marked = old; - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); } } @@ -1126,7 +1126,7 @@ /* update object position and cursor location */ pcb_tool_adjust_attached(&PCB->hidlib); rnd_event(&PCB->hidlib, PCB_EVENT_DRAW_CROSSHAIR_CHATT, NULL); - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } } @@ -1142,11 +1142,11 @@ buf->obj = pcb_crosshair.AttachedObject.State; buf->line = pcb_crosshair.AttachedLine.State; buf->box = pcb_crosshair.AttachedBox.State; - rnd_hid_notify_crosshair_change(hl, pcb_false); + rnd_hid_notify_crosshair_change(hl, rnd_false); pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(hl, pcb_true); + rnd_hid_notify_crosshair_change(hl, rnd_true); return buf; } @@ -1154,11 +1154,11 @@ { old_crosshair_t *buf = susp_data; - rnd_hid_notify_crosshair_change(hl, pcb_false); + rnd_hid_notify_crosshair_change(hl, rnd_false); pcb_crosshair.AttachedObject.State = buf->obj; pcb_crosshair.AttachedLine.State = buf->line; pcb_crosshair.AttachedBox.State = buf->box; - rnd_hid_notify_crosshair_change(hl, pcb_true); + rnd_hid_notify_crosshair_change(hl, rnd_true); free(buf); } @@ -1167,10 +1167,10 @@ void rnd_hidlib_crosshair_move_to(rnd_hidlib_t *hl, rnd_coord_t abs_x, rnd_coord_t abs_y, int mouse_mot) { if (!mouse_mot) { - rnd_hid_notify_crosshair_change(hl, pcb_false); + rnd_hid_notify_crosshair_change(hl, rnd_false); if (pcb_crosshair_move_absolute(abs_x, abs_y)) - rnd_hid_notify_crosshair_change(hl, pcb_true); - rnd_hid_notify_crosshair_change(hl, pcb_true); + rnd_hid_notify_crosshair_change(hl, rnd_true); + rnd_hid_notify_crosshair_change(hl, rnd_true); } else pcb_event_move_crosshair(abs_x, abs_y); Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 31010) +++ trunk/src/data.c (revision 31011) @@ -220,13 +220,13 @@ { rnd_cardinal_t i; - if (padstacklist_length(&Data->padstack) != 0) return pcb_false; - if (pcb_subclist_length(&Data->subc) != 0) return pcb_false; + if (padstacklist_length(&Data->padstack) != 0) return rnd_false; + if (pcb_subclist_length(&Data->subc) != 0) return rnd_false; for (i = 0; i < Data->LayerN; i++) if (!pcb_layer_is_pure_empty(&(Data->Layer[i]))) - return pcb_false; + return rnd_false; - return pcb_true; + return rnd_true; } rnd_rnd_box_t *pcb_data_bbox(rnd_rnd_box_t *out, pcb_data_t *Data, rnd_bool ignore_floaters) @@ -494,7 +494,7 @@ if (pcb_subc_get_origin(subc, &ox, &oy) == 0) { nx = rnd_round((double)ox * sx); ny = rnd_round((double)oy * sy); - pcb_subc_move(subc, nx - ox, ny - oy, pcb_true); + pcb_subc_move(subc, nx - ox, ny - oy, rnd_true); } } PCB_END_LOOP; @@ -529,7 +529,7 @@ if (data_bbox == NULL) { data_bbox = &tmp; - if (pcb_data_bbox(data_bbox, data, pcb_false) == NULL) + if (pcb_data_bbox(data_bbox, data, rnd_false) == NULL) return -1; } @@ -815,12 +815,12 @@ void pcb_data_clip_dirty(pcb_data_t *data, rnd_bool enable_progbar) { - pcb_data_clip_all_poly(data, enable_progbar, pcb_false); + pcb_data_clip_all_poly(data, enable_progbar, rnd_false); } void pcb_data_clip_all(pcb_data_t *data, rnd_bool enable_progbar) { - pcb_data_clip_all_poly(data, enable_progbar, pcb_true); + pcb_data_clip_all_poly(data, enable_progbar, rnd_true); } @@ -866,7 +866,7 @@ unsigned long cnt = 0; if (flag & PCB_FLAG_WARN) - conf_core.temp.rat_warn = pcb_false; + conf_core.temp.rat_warn = rnd_false; if (tmask & PCB_OBJ_PSTK) { for(n = pcb_r_first(data->padstack_tree, &it); n != NULL; n = pcb_r_next(&it)) Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 31010) +++ trunk/src/draw.c (revision 31011) @@ -60,10 +60,10 @@ rnd_rnd_box_t pcb_draw_invalidated = { RND_COORD_MAX, RND_COORD_MAX, -RND_COORD_MAX, -RND_COORD_MAX }; int pcb_draw_force_termlab = 0; -rnd_bool pcb_draw_doing_assy = pcb_false; +rnd_bool pcb_draw_doing_assy = rnd_false; static vtp0_t delayed_labels, delayed_objs, annot_objs; -rnd_bool delayed_labels_enabled = pcb_false; -rnd_bool delayed_terms_enabled = pcb_false; +rnd_bool delayed_labels_enabled = rnd_false; +rnd_bool delayed_terms_enabled = rnd_false; static void draw_everything(pcb_draw_info_t *info); static void pcb_draw_layer_grp(pcb_draw_info_t *info, int, int); @@ -106,7 +106,7 @@ rnd_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, rnd_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_dashed_line(pcb_draw_info_t *info, rnd_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, rnd_bool_t cheap) { /* TODO: we need a real geo lib... using double here is plain wrong */ double dx = x2-x1, dy = y2-y1; @@ -741,11 +741,11 @@ /* print the non-clearing polys */ if (lflg & PCB_LYT_COPPER) { - delayed_terms_enabled = pcb_true; + delayed_terms_enabled = rnd_true; rnd_hid_set_line_width(pcb_draw_out.fgGC, 1); rnd_hid_set_line_cap(pcb_draw_out.fgGC, rnd_cap_square); pcb_r_search(Layer->polygon_tree, info->drawn_area, NULL, pcb_poly_draw_term_callback, info, NULL); - delayed_terms_enabled = pcb_false; + delayed_terms_enabled = rnd_false; may_have_delayed = 1; } else { @@ -757,12 +757,12 @@ /* draw all visible layer objects (with terminal gfx on copper) */ if (lflg & PCB_LYT_COPPER) { - delayed_terms_enabled = pcb_true; + delayed_terms_enabled = rnd_true; pcb_r_search(Layer->line_tree, info->drawn_area, NULL, pcb_line_draw_term_callback, info, NULL); pcb_r_search(Layer->arc_tree, info->drawn_area, NULL, pcb_arc_draw_term_callback, info, NULL); pcb_r_search(Layer->text_tree, info->drawn_area, NULL, pcb_text_draw_term_callback, info, NULL); pcb_r_search(Layer->gfx_tree, info->drawn_area, NULL, pcb_gfx_draw_callback, info, NULL); - delayed_terms_enabled = pcb_false; + delayed_terms_enabled = rnd_false; may_have_delayed = 1; } else { @@ -1071,7 +1071,7 @@ memcpy(save, &pcb_draw_out, sizeof(pcb_output_t)); save->hid = rnd_render; - delayed_labels_enabled = pcb_true; + delayed_labels_enabled = rnd_true; vtp0_truncate(&delayed_labels, 0); vtp0_truncate(&delayed_objs, 0); @@ -1112,7 +1112,7 @@ pcb_draw_out.fgGC = NULL; - delayed_labels_enabled = pcb_false; + delayed_labels_enabled = rnd_false; vtp0_truncate(&delayed_labels, 0); vtp0_truncate(&delayed_objs, 0); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 31010) +++ trunk/src/draw.h (revision 31011) @@ -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, rnd_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_dashed_line(pcb_draw_info_t *info, rnd_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, rnd_bool_t cheap); void pcb_draw(void); Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 31010) +++ trunk/src/draw_ly_spec.c (revision 31011) @@ -343,7 +343,7 @@ if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | lyt_side, &side_group, 1) != 1) return; - pcb_draw_doing_assy = pcb_true; + pcb_draw_doing_assy = rnd_true; rnd_hid_set_draw_faded(pcb_draw_out.fgGC, 1); pcb_draw_layer_grp(info, side_group, 0); rnd_hid_set_draw_faded(pcb_draw_out.fgGC, 0); @@ -350,5 +350,5 @@ /* draw package */ pcb_draw_silk_doc(info, lyt_side, PCB_LYT_SILK, 0, 0); - pcb_draw_doing_assy = pcb_false; + pcb_draw_doing_assy = rnd_false; } Index: trunk/src/extobj_act.c =================================================================== --- trunk/src/extobj_act.c (revision 31010) +++ trunk/src/extobj_act.c (revision 31011) @@ -61,7 +61,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("extobj_select", dlg, "Select extended object", NULL, pcb_true, NULL); + RND_DAD_NEW("extobj_select", dlg, "Select extended object", NULL, rnd_true, NULL); res = RND_DAD_RUN(dlg); RND_DAD_FREE(dlg); if (res > 0) Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 31010) +++ trunk/src/file_act.c (revision 31011) @@ -76,22 +76,22 @@ case F_SubcToBuffer: case F_Subcircuit: case F_Footprint: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (pcb_buffer_load_footprint(PCB_PASTEBUFFER, name, format)) pcb_tool_select_by_name(RND_ACT_HIDLIB, "buffer"); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_LayoutToBuffer: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (pcb_buffer_load_layout(PCB, PCB_PASTEBUFFER, name, format)) pcb_tool_select_by_name(RND_ACT_HIDLIB, "buffer"); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_Layout: if (!PCB->Changed || rnd_hid_message_box(RND_ACT_HIDLIB, "warning", "File overwrite", "OK to override layout data?", "cancel", 0, "ok", 1, NULL)) - pcb_load_pcb(name, format, pcb_true, 0); + pcb_load_pcb(name, format, rnd_true, 0); break; case F_Netlist: @@ -148,7 +148,7 @@ /* PCB usgae: at the moment, while having only one global PCB, this function legitimately uses that */ - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); /* do emergency saving * clear the old struct and allocate memory for the new one */ @@ -176,7 +176,7 @@ pcb_center_display(PCB->hidlib.size_x / 2, PCB->hidlib.size_y / 2); pcb_board_changed(0); rnd_hid_redraw(PCB); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_IRES(0); return 0; } @@ -255,13 +255,13 @@ return FGW_ERR_ARGC; } if (pcb_save_pcb(RND_ACT_HIDLIB->filename, NULL) == 0) - pcb_board_set_changed_flag(pcb_false); + pcb_board_set_changed_flag(rnd_false); rnd_event(RND_ACT_HIDLIB, RND_EVENT_BOARD_FN_CHANGED, NULL); return 0; case F_LayoutAs: if (pcb_save_pcb(name, fmt) == 0) { - pcb_board_set_changed_flag(pcb_false); + pcb_board_set_changed_flag(rnd_false); free(RND_ACT_HIDLIB->filename); RND_ACT_HIDLIB->filename = rnd_strdup(name); rnd_event(RND_ACT_HIDLIB, RND_EVENT_BOARD_FN_CHANGED, NULL); Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 31010) +++ trunk/src/find.c (revision 31011) @@ -142,12 +142,12 @@ /* cheap test: they need to have valid and matching intnoconn */ if ((a->intnoconn == 0) || (a->intnoconn != b->intnoconn)) - return pcb_false; + return rnd_false; /* expensive tests: they need to be in the same subc */ pa = pcb_obj_parent_subc(a); if (pa == NULL) - return pcb_false; + return rnd_false; pb = pcb_obj_parent_subc(b); Index: trunk/src/find.h =================================================================== --- trunk/src/find.h (revision 31010) +++ trunk/src/find.h (revision 31011) @@ -105,7 +105,7 @@ rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, rnd_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); +rnd_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 */ #define PCB_FIND_IS_MARKED(ctx, obj) PCB_DFLAG_TEST(&((obj)->Flags), (ctx)->mark) Index: trunk/src/find_any_isect.c =================================================================== --- trunk/src/find_any_isect.c (revision 31010) +++ trunk/src/find_any_isect.c (revision 31011) @@ -29,11 +29,11 @@ TODO(": implement text intersections") -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; } +rnd_bool pcb_isc_text_line(const pcb_find_t *ctx, pcb_text_t *a, pcb_line_t *b) { return rnd_false; } +rnd_bool pcb_isc_text_text(const pcb_find_t *ctx, pcb_text_t *a, pcb_text_t *b) { return rnd_false; } +rnd_bool pcb_isc_text_poly(const pcb_find_t *ctx, pcb_text_t *a, pcb_poly_t *b) { return rnd_false; } +rnd_bool pcb_isc_text_arc(const pcb_find_t *ctx, pcb_text_t *a, pcb_arc_t *b) { return rnd_false; } +rnd_bool pcb_isc_text_pstk(const pcb_find_t *ctx, pcb_text_t *a, pcb_pstk_t *b) { return rnd_false; } rnd_bool pcb_intersect_obj_obj(const pcb_find_t *ctx, pcb_any_obj_t *a, pcb_any_obj_t *b) { @@ -47,10 +47,10 @@ graphics can't contribute to galvanic connections */ switch(a->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_line_line(ctx, (pcb_line_t *)a, (pcb_line_t *)b); case PCB_OBJ_TEXT: return pcb_isc_text_line(ctx, (pcb_text_t *)b, (pcb_line_t *)a); case PCB_OBJ_POLY: return pcb_isc_line_poly(ctx, (pcb_line_t *)a, (pcb_poly_t *)b); @@ -63,7 +63,7 @@ break; case PCB_OBJ_TEXT: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_text_line(ctx, (pcb_text_t *)a, (pcb_line_t *)b); case PCB_OBJ_TEXT: return pcb_isc_text_text(ctx, (pcb_text_t *)a, (pcb_text_t *)b); case PCB_OBJ_POLY: return pcb_isc_text_poly(ctx, (pcb_text_t *)a, (pcb_poly_t *)b); @@ -70,7 +70,7 @@ case PCB_OBJ_ARC: return pcb_isc_text_arc(ctx, (pcb_text_t *)a, (pcb_arc_t *)b); /* case PCB_OBJ_GFX: return pcb_isc_text_gfx(ctx, (pcb_text_t *)a, (pcb_gfx_t *)b);*/ case PCB_OBJ_PSTK: return pcb_isc_text_pstk(ctx, (pcb_text_t *)a, (pcb_pstk_t *)b); - case PCB_OBJ_RAT: return pcb_false; /* text is invisible to find for now */ + case PCB_OBJ_RAT: return rnd_false; /* text is invisible to find for now */ default:; } break; @@ -77,7 +77,7 @@ case PCB_OBJ_POLY: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_line_poly(ctx, (pcb_line_t *)b, (pcb_poly_t *)a); case PCB_OBJ_TEXT: return pcb_isc_text_poly(ctx, (pcb_text_t *)b, (pcb_poly_t *)a); case PCB_OBJ_POLY: return pcb_isc_poly_poly(ctx, (pcb_poly_t *)a, (pcb_poly_t *)b); @@ -90,7 +90,7 @@ break; case PCB_OBJ_ARC: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_line_arc(ctx, (pcb_line_t *)b, (pcb_arc_t *)a); case PCB_OBJ_TEXT: return pcb_isc_text_arc(ctx, (pcb_text_t *)b, (pcb_arc_t *)a); case PCB_OBJ_POLY: return pcb_isc_arc_poly(ctx, (pcb_arc_t *)a, (pcb_poly_t *)b); @@ -103,7 +103,7 @@ break; /* case PCB_OBJ_GFX: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_line_gfx(ctx, (pcb_line_t *)b, (pcb_gfx_t *)a); case PCB_OBJ_TEXT: return pcb_isc_text_gfx(ctx, (pcb_text_t *)b, (pcb_gfx_t *)a); case PCB_OBJ_POLY: return pcb_isc_gfx_poly(ctx, (pcb_gfx_t *)a, (pcb_poly_t *)b); @@ -116,7 +116,7 @@ break;*/ case PCB_OBJ_PSTK: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_pstk_line(ctx, (pcb_pstk_t *)a, (pcb_line_t *)b); case PCB_OBJ_TEXT: return pcb_isc_text_pstk(ctx, (pcb_text_t *)b, (pcb_pstk_t *)a); case PCB_OBJ_POLY: return pcb_isc_pstk_poly(ctx, (pcb_pstk_t *)a, (pcb_poly_t *)b); @@ -129,9 +129,9 @@ break; case PCB_OBJ_RAT: switch(b->type) { - case PCB_OBJ_VOID: return pcb_false; + case PCB_OBJ_VOID: return rnd_false; case PCB_OBJ_LINE: return pcb_isc_rat_line(ctx, (pcb_rat_t *)a, (pcb_line_t *)b); - case PCB_OBJ_TEXT: return pcb_false; /* text is invisible to find for now */ + case PCB_OBJ_TEXT: return rnd_false; /* text is invisible to find for now */ case PCB_OBJ_POLY: return pcb_isc_rat_poly(ctx, (pcb_rat_t *)a, (pcb_poly_t *)b); case PCB_OBJ_ARC: return pcb_isc_rat_arc(ctx, (pcb_rat_t *)a, (pcb_arc_t *)b); /* case PCB_OBJ_GFX: return pcb_isc_rat_gfx(ctx, (pcb_rat_t *)a, (pcb_gfx_t *)b);*/ @@ -143,7 +143,7 @@ default:; } assert(!"Don't know how to check intersection of these objet types"); - return pcb_false; + return rnd_false; } Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 31010) +++ trunk/src/find_geo.c (revision 31011) @@ -35,7 +35,7 @@ * - calculate the signed distance from the line to the center, * return false if abs(distance) > R * - get the distance from the line <--> distancevector intersection to - * (X1,Y1) in range [0,1], return pcb_true if 0 <= distance <= 1 + * (X1,Y1) in range [0,1], return rnd_true if 0 <= distance <= 1 * - depending on (r > 1.0 or r < 0.0) check the distance of X2,Y2 or X1,Y1 * to X,Y * @@ -163,7 +163,7 @@ /* too thin arc */ if (t < 0 || t1 < 0) - return pcb_false; + return rnd_false; /* try the end points first */ get_arc_ends(&box[0], Arc1); @@ -172,7 +172,7 @@ || pcb_is_point_on_arc(box[2], box[3], t, Arc2) || pcb_is_point_on_arc(box[4], box[5], t, Arc1) || pcb_is_point_on_arc(box[6], box[7], t, Arc1)) - return pcb_true; + return rnd_true; pdx = Arc2->X - Arc1->X; pdy = Arc2->Y - Arc1->Y; @@ -191,12 +191,12 @@ /* sa1 == sa2 was caught when checking endpoints */ if (sa1 > sa2) if (sa1 < sa2 + d2 || sa1 + d1 - 360 > sa2) - return pcb_true; + return rnd_true; if (sa2 > sa1) if (sa2 < sa1 + d1 || sa2 + d2 - 360 > sa1) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } r1 = Arc1->Width; r2 = Arc2->Width; @@ -212,7 +212,7 @@ if (radius_crosses_arc(Arc1->X + dx, Arc1->Y + dy, Arc1) && pcb_is_point_on_arc(Arc1->X + dx, Arc1->Y + dy, t, Arc2)) - return pcb_true; + return rnd_true; dx = -pdx * r2 / dl; dy = -pdy * r2 / dl; @@ -223,8 +223,8 @@ if (radius_crosses_arc(Arc2->X + dx, Arc2->Y + dy, Arc2) && pcb_is_point_on_arc(Arc2->X + dx, Arc2->Y + dy, t1, Arc1)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } l = dl * dl; @@ -245,18 +245,18 @@ dy = d * pdy; if (radius_crosses_arc(x + dy, y - dx, Arc1) && pcb_is_point_on_arc(x + dy, y - dx, t, Arc2)) - return pcb_true; + return rnd_true; if (radius_crosses_arc(x + dy, y - dx, Arc2) && pcb_is_point_on_arc(x + dy, y - dx, t1, Arc1)) - return pcb_true; + return rnd_true; if (radius_crosses_arc(x - dy, y + dx, Arc1) && pcb_is_point_on_arc(x - dy, y + dx, t, Arc2)) - return pcb_true; + return rnd_true; if (radius_crosses_arc(x - dy, y + dx, Arc2) && pcb_is_point_on_arc(x - dy, y + dx, t1, Arc1)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -269,14 +269,14 @@ /* either end */ if ((Point->X == Line->Point1.X && Point->Y == Line->Point1.Y) || (Point->X == Line->Point2.X && Point->Y == Line->Point2.Y)) - return pcb_true; + return rnd_true; /* middle point */ pcb_obj_center((pcb_any_obj_t *)Line, &cx, &cy); if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* Tests any end of a rat line is on the line */ @@ -285,11 +285,11 @@ rnd_layergrp_id_t gid = pcb_layer_get_group_(line->parent.layer); if ((rat->group1 == gid) && pcb_isc_ratp_line(ctx, &rat->Point1, line)) - return pcb_true; + return rnd_true; if ((rat->group2 == gid) && pcb_isc_ratp_line(ctx, &rat->Point2, line)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -302,18 +302,18 @@ /* either end */ pcb_arc_get_end(arc, 0, &cx, &cy); if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; pcb_arc_get_end(arc, 1, &cx, &cy); if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; /* middle point */ pcb_arc_middle(arc, &cx, &cy); if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* Tests any end of a rat line is on the arc */ @@ -322,11 +322,11 @@ rnd_layergrp_id_t gid = pcb_layer_get_group_(arc->parent.layer); if ((rat->group1 == gid) && pcb_isc_ratp_arc(ctx, &rat->Point1, arc)) - return pcb_true; + return rnd_true; if ((rat->group2 == gid) && pcb_isc_ratp_arc(ctx, &rat->Point2, arc)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -340,7 +340,7 @@ /* clipped out of existence... */ if (polygon->Clipped == NULL) - return pcb_false; + return rnd_false; /* special case: zero length connection */ if (donut) @@ -350,12 +350,12 @@ cx = polygon->Clipped->contours->head->point[0]; cy = polygon->Clipped->contours->head->point[1]; if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; /* middle point */ pcb_obj_center((pcb_any_obj_t *)polygon, &cx, &cy); if ((Point->X == cx) && (Point->Y == cy)) - return pcb_true; + return rnd_true; /* 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)) { @@ -368,19 +368,19 @@ /* contour of the island */ for(go = pcb_poly_vect_first(&it, &x, &y); go; go = pcb_poly_vect_next(&it, &x, &y)) if ((Point->X == x) && (Point->Y == y)) - return pcb_true; + return rnd_true; /* iterate over all holes within this island */ for(pl = pcb_poly_hole_first(&it); pl != NULL; pl = pcb_poly_hole_next(&it)) for(go = pcb_poly_vect_first(&it, &x, &y); go; go = pcb_poly_vect_next(&it, &x, &y)) if ((Point->X == x) && (Point->Y == y)) - return pcb_true; + return rnd_true; } if (!PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, polygon)) break; } - return pcb_false; + return rnd_false; } /* Tests any end of a rat line is on the poly */ @@ -390,11 +390,11 @@ int donut = PCB_FLAG_TEST(PCB_FLAG_VIA, rat); if ((rat->group1 == gid) && pcb_isc_ratp_poly(ctx, &rat->Point1, poly, donut)) - return pcb_true; + return rnd_true; if ((rat->group2 == gid) && pcb_isc_ratp_poly(ctx, &rat->Point2, poly, donut)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* Tests any end of a rat line is on the other rat */ @@ -401,14 +401,14 @@ 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; + return rnd_true; if ((r1->group2 == r2->group2) && (r1->Point2.X == r2->Point2.X) && (r1->Point2.Y == r2->Point2.Y)) - return pcb_true; + return rnd_true; if ((r1->group1 == r2->group2) && (r1->Point1.X == r2->Point2.X) && (r1->Point1.Y == r2->Point2.Y)) - return pcb_true; + return rnd_true; if ((r1->group2 == r2->group1) && (r1->Point2.X == r2->Point1.X) && (r1->Point2.Y == r2->Point1.Y)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } static void form_slanted_rectangle(rnd_point_t p[4], pcb_line_t *l) @@ -517,7 +517,7 @@ || pcb_is_point_in_line(Line2->Point2.X, Line2->Point2.Y, MAX(Line2->Thickness / 2 + Bloat, 0), (pcb_any_line_t *) Line1) || pcb_is_point_in_line(Line1->Point1.X, Line1->Point1.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_any_line_t *) Line2) || pcb_is_point_in_line(Line1->Point2.X, Line1->Point2.Y, MAX(Line1->Thickness / 2 + Bloat, 0), (pcb_any_line_t *) Line2)) - return pcb_true; + return rnd_true; /* setup some constants */ line1_dx = Line1->Point2.X - Line1->Point1.X; @@ -531,7 +531,7 @@ * endpoint check above will have caught an "intersection". */ if ((line1_dx == 0 && line1_dy == 0) || (line2_dx == 0 && line2_dy == 0)) - return pcb_false; + return rnd_false; /* set s to cross product of Line1 and the line * Line1.Point1--Line2.Point1 (as vectors) */ @@ -545,7 +545,7 @@ * check before getting here, the above pcb_is_point_in_line() checks * will have caught any intersections. */ if (r == 0.0) - return pcb_false; + return rnd_false; s /= r; r = (point1_dy * line2_dx - point1_dx * line2_dy) / r; @@ -555,8 +555,8 @@ return (s >= 0.0 && s <= 1.0); /* intersection is at least on CD */ - /* [removed this case since it always returns pcb_false --asp] */ - return pcb_false; + /* [removed this case since it always returns rnd_false --asp] */ + return rnd_false; } /*--------------------------------------------------- @@ -607,35 +607,35 @@ r2 = Radius * l - d; /* projection doesn't even intersect circle when r2 < 0 */ if (r2 < 0) - return pcb_false; + return rnd_false; /* check the ends of the line in case the projected point */ /* of intersection is beyond the line end */ if (pcb_is_point_on_arc(Line->Point1.X, Line->Point1.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) - return pcb_true; + return rnd_true; if (pcb_is_point_on_arc(Line->Point2.X, Line->Point2.Y, MAX(0.5 * Line->Thickness + Bloat, 0.0), Arc)) - return pcb_true; + return rnd_true; if (l == 0.0) - return pcb_false; + return rnd_false; r2 = sqrt(r2); Radius = -(dx * dx1 + dy * dy1); r = (Radius + r2) / l; if (r >= 0 && r <= 1 && pcb_is_point_on_arc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0) + 1, Arc)) - return pcb_true; + return rnd_true; r = (Radius - r2) / l; if (r >= 0 && r <= 1 && pcb_is_point_on_arc(Line->Point1.X + r * dx, Line->Point1.Y + r * dy, MAX(0.5 * Line->Thickness + Bloat, 0.0) + 1, Arc)) - return pcb_true; + return rnd_true; /* check arc end points */ pcb_arc_get_end(Arc, 0, &ex, &ey); if (pcb_is_point_in_line(ex, ey, Arc->Thickness * 0.5 + Bloat, (pcb_any_line_t *) Line)) - return pcb_true; + return rnd_true; pcb_arc_get_end(Arc, 1, &ex, &ey); if (pcb_is_point_in_line(ex, ey, Arc->Thickness * 0.5 + Bloat, (pcb_any_line_t *) Line)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -652,23 +652,23 @@ /* arcs with clearance never touch polys */ if (!ctx->ignore_clearance && PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon) && PCB_OBJ_HAS_CLEARANCE(Arc)) - return pcb_false; + return rnd_false; if (!Polygon->Clipped) - return pcb_false; + return rnd_false; if (box_isc_poly_any_island_bbox(ctx, Box, Polygon, !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, Polygon))) { rnd_polyarea_t *ap; if (!(ap = pcb_poly_from_pcb_arc(Arc, Arc->Thickness + Bloat))) - return pcb_false; /* error */ + return rnd_false; /* error */ return box_isc_poly_any_island_free(ap, Polygon, !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, Polygon)); } - return pcb_false; + return rnd_false; } rnd_bool pcb_isc_arc_polyarea(const pcb_find_t *ctx, pcb_arc_t *Arc, rnd_polyarea_t *pa) { rnd_rnd_box_t *Box = (rnd_rnd_box_t *) Arc; - rnd_bool res = pcb_false; + rnd_bool res = rnd_false; /* arcs with clearance never touch polys */ if ((Box->X1 <= pa->contours->xmax + Bloat) && (Box->X2 >= pa->contours->xmin - Bloat) @@ -676,7 +676,7 @@ rnd_polyarea_t *arcp; if (!(arcp = pcb_poly_from_pcb_arc(Arc, Arc->Thickness + Bloat))) - return pcb_false; /* error */ + return rnd_false; /* error */ res = pcb_polyarea_touching(arcp, pa); pcb_polyarea_free(&arcp); } @@ -699,9 +699,9 @@ /* lines with clearance never touch polygons */ if (!ctx->ignore_clearance && PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon) && PCB_OBJ_HAS_CLEARANCE(Line)) - return pcb_false; + return rnd_false; if (!Polygon->Clipped) - return pcb_false; + return rnd_false; if (PCB_FLAG_TEST(PCB_FLAG_SQUARE, Line) && (Line->Point1.X == Line->Point2.X || Line->Point1.Y == Line->Point2.Y)) { rnd_coord_t wid = (Line->Thickness + Bloat + 1) / 2; rnd_coord_t x1, x2, y1, y2; @@ -714,10 +714,10 @@ } if (box_isc_poly_any_island_bbox(ctx, Box, Polygon, !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, Polygon))) { if (!(lp = pcb_poly_from_pcb_line(Line, Line->Thickness + Bloat))) - return pcb_false; /* error */ + return rnd_false; /* error */ return box_isc_poly_any_island_free(lp, Polygon, !PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, Polygon)); } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -734,7 +734,7 @@ rnd_polyarea_t *pa1, *pa2; if (!P1->Clipped || !P2->Clipped) - return pcb_false; + return rnd_false; assert(P1->Clipped->contours); assert(P2->Clipped->contours); @@ -751,7 +751,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, P1)) break; } - return pcb_false; + return rnd_false; do_check:; @@ -767,8 +767,8 @@ } if (pcp_cnt == 1) { if (pcp_gap >= Bloat) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } /* first check un-bloated case (most common) */ @@ -776,7 +776,7 @@ for(pa1 = pcb_poly_island_first(P1, &it1); pa1 != NULL; pa1 = pcb_poly_island_next(&it1)) { for(pa2 = pcb_poly_island_first(P2, &it2); pa2 != NULL; pa2 = pcb_poly_island_next(&it2)) { if (pcb_polyarea_touching(pa1, pa2)) - return pcb_true; + return rnd_true; if (!PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, P2)) break; } @@ -810,7 +810,7 @@ line.Point2.Y = v->point[1]; pcb_line_bbox(&line); if (pcb_isc_line_poly(ctx, &line, P2)) - return pcb_true; + return rnd_true; line.Point1.X = line.Point2.X; line.Point1.Y = line.Point2.Y; } @@ -824,12 +824,12 @@ } } - return pcb_false; + return rnd_false; } /* returns whether a round-cap pcb line touches a polygon; assumes bounding boxes do touch */ -RND_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) +RND_INLINE rnd_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) { rnd_coord_t ox, oy, vx, vy; double dx, dy, h, l; @@ -842,8 +842,8 @@ return pcb_pline_overlaps_circ(pl, x1, y1, thick/2); /* long line - check ends */ - if (pcb_pline_overlaps_circ(pl, x1, y1, thick/2)) return pcb_true; - if (pcb_pline_overlaps_circ(pl, x2, y2, thick/2)) return pcb_true; + if (pcb_pline_overlaps_circ(pl, x1, y1, thick/2)) return rnd_true; + if (pcb_pline_overlaps_circ(pl, x2, y2, thick/2)) return rnd_true; dx = x2 - x1; dy = y2 - y1; @@ -855,8 +855,8 @@ vy = (double)dy / -l * ((double)Bloat/2.0); /* long line - consider edge intersection */ - if (pcb_pline_isect_line(pl, x1 + ox + vx, y1 + oy + vy, x2 + ox - vx, y2 + oy - vy, NULL, NULL)) return pcb_true; - if (pcb_pline_isect_line(pl, x1 - ox + vx, y1 - oy + vy, x2 - ox - vx, y2 - oy - vy, NULL, NULL)) return pcb_true; + if (pcb_pline_isect_line(pl, x1 + ox + vx, y1 + oy + vy, x2 + ox - vx, y2 + oy - vy, NULL, NULL)) return rnd_true; + if (pcb_pline_isect_line(pl, x1 - ox + vx, y1 - oy + vy, x2 - ox - vx, y2 - oy - vy, NULL, NULL)) return rnd_true; /* A corner case is when the polyline is fully within the line. By now we are sure there's no contour intersection, so if any of the polyline points @@ -884,7 +884,7 @@ pcb_line.Flags = shape_line.square ? pcb_flag_make(PCB_FLAG_SQUARE) : pcb_no_flags(); \ } while(0) -static pcb_bool_t pcb_isc_pstk_line_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line, pcb_pstk_shape_t *shape) +static rnd_bool_t pcb_isc_pstk_line_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line, pcb_pstk_shape_t *shape) { if (shape == NULL) goto noshape; @@ -921,14 +921,14 @@ slshape = pcb_pstk_shape_mech_or_hole_at(PCB, ps, line->parent.layer, &sltmp); if (slshape == NULL) - return pcb_false; + return rnd_false; return pcb_isc_pstk_line_shp(ctx, ps, line, slshape); } } - return pcb_false; + return rnd_false; } -pcb_bool_t pcb_isc_pstk_line(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line) +rnd_bool_t pcb_isc_pstk_line(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_line_t *line) { pcb_pstk_shape_t *shape; pcb_pstk_proto_t *proto; @@ -935,20 +935,20 @@ shape = pcb_pstk_shape_at(PCB, ps, line->parent.layer); if (pcb_isc_pstk_line_shp(ctx, ps, line, shape)) - return pcb_true; + return rnd_true; proto = pcb_pstk_get_proto(ps); if (proto->hplated) { shape = pcb_pstk_shape_mech_at(PCB, ps, line->parent.layer); if (pcb_isc_pstk_line_shp(ctx, ps, line, shape)) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } -RND_INLINE pcb_bool_t pcb_isc_pstk_arc_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_arc_t *arc, pcb_pstk_shape_t *shape) +RND_INLINE rnd_bool_t pcb_isc_pstk_arc_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_arc_t *arc, pcb_pstk_shape_t *shape) { if (shape == NULL) goto noshape; @@ -991,14 +991,14 @@ slshape = pcb_pstk_shape_mech_or_hole_at(PCB, ps, arc->parent.layer, &sltmp); if (slshape == NULL) - return pcb_false; + return rnd_false; return pcb_isc_pstk_arc_shp(ctx, ps, arc, slshape); } } - return pcb_false; + return rnd_false; } -RND_INLINE pcb_bool_t pcb_isc_pstk_arc(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_arc_t *arc) +RND_INLINE rnd_bool_t pcb_isc_pstk_arc(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_arc_t *arc) { pcb_pstk_shape_t *shape; pcb_pstk_proto_t *proto; @@ -1005,16 +1005,16 @@ shape = pcb_pstk_shape_at(PCB, ps, arc->parent.layer); if (pcb_isc_pstk_arc_shp(ctx, ps, arc, shape)) - return pcb_true; + return rnd_true; proto = pcb_pstk_get_proto(ps); if (proto->hplated) { shape = pcb_pstk_shape_mech_at(PCB, ps, arc->parent.layer); if (pcb_isc_pstk_arc_shp(ctx, ps, arc, shape)) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } @@ -1043,7 +1043,7 @@ return shp; } -RND_INLINE pcb_bool_t pcb_isc_pstk_poly_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_poly_t *poly, pcb_pstk_shape_t *shape) +RND_INLINE rnd_bool_t pcb_isc_pstk_poly_shp(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_poly_t *poly, pcb_pstk_shape_t *shape) { if (shape == NULL) goto noshape; @@ -1087,15 +1087,15 @@ slshape = pcb_pstk_shape_mech_or_hole_at(PCB, ps, poly->parent.layer, &sltmp); if (slshape == NULL) - return pcb_false; + return rnd_false; return pcb_isc_pstk_poly_shp(ctx, ps, poly, slshape); } } - return pcb_false; + return rnd_false; } -RND_INLINE pcb_bool_t pcb_isc_pstk_poly(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_poly_t *poly) +RND_INLINE rnd_bool_t pcb_isc_pstk_poly(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_poly_t *poly) { pcb_pstk_shape_t *shape; pcb_pstk_proto_t *proto; @@ -1102,20 +1102,20 @@ shape = pcb_pstk_shape_at(PCB, ps, poly->parent.layer); if (pcb_isc_pstk_poly_shp(ctx, ps, poly, shape)) - return pcb_true; + return rnd_true; proto = pcb_pstk_get_proto(ps); if (proto->hplated) { shape = pcb_pstk_shape_mech_at(PCB, ps, poly->parent.layer); if (pcb_isc_pstk_poly_shp(ctx, ps, poly, shape)) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } -RND_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) +RND_INLINE rnd_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) { rnd_coord_t px = sc->data.circ.x + c->x - p->x; rnd_coord_t py = sc->data.circ.y + c->y - p->y; @@ -1122,7 +1122,7 @@ return pcb_isc_line_polyline(ctx, sp->data.poly.pa->contours, px, py, px, py, sc->data.circ.dia); } -RND_INLINE pcb_bool_t pstk_shape_isc_circ_line(const pcb_find_t *ctx, pcb_pstk_t *l, pcb_pstk_shape_t *sl, pcb_pstk_t *c, pcb_pstk_shape_t *sc) +RND_INLINE rnd_bool_t pstk_shape_isc_circ_line(const pcb_find_t *ctx, pcb_pstk_t *l, pcb_pstk_shape_t *sl, pcb_pstk_t *c, pcb_pstk_shape_t *sc) { pcb_any_line_t tmp; tmp.Point1.X = sl->data.line.x1 + l->x; @@ -1134,7 +1134,7 @@ return pcb_is_point_in_line(sc->data.circ.x + c->x, sc->data.circ.y + c->y, sc->data.circ.dia/2, &tmp); } -RND_INLINE pcb_bool_t pcb_pstk_shape_intersect(const pcb_find_t *ctx, pcb_pstk_t *ps1, pcb_pstk_shape_t *shape1, pcb_pstk_t *ps2, pcb_pstk_shape_t *shape2) +RND_INLINE rnd_bool_t pcb_pstk_shape_intersect(const pcb_find_t *ctx, pcb_pstk_t *ps1, pcb_pstk_shape_t *shape1, pcb_pstk_t *ps2, pcb_pstk_shape_t *shape2) { if ((shape1->shape == PCB_PSSH_POLY) && (shape1->data.poly.pa == NULL)) pcb_pstk_shape_update_pa(&shape1->data.poly); @@ -1201,10 +1201,10 @@ case PCB_PSSH_HSHADOW: return 0; /* non-object won't intersect */ } - return pcb_false; + return rnd_false; } -RND_INLINE pcb_bool_t pcb_isc_pstk_pstk(const pcb_find_t *ctx, pcb_pstk_t *ps1, pcb_pstk_t *ps2) +RND_INLINE rnd_bool_t pcb_isc_pstk_pstk(const pcb_find_t *ctx, pcb_pstk_t *ps1, pcb_pstk_t *ps2) { pcb_layer_t *ly; pcb_pstk_proto_t *proto1, *proto2; @@ -1224,7 +1224,7 @@ shape1 = pcb_pstk_shape_at(PCB, ps1, ly); shape2 = pcb_pstk_shape_at(PCB, ps2, ly); - if ((shape1 != NULL) && (shape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, shape1, ps2, shape2)) return pcb_true; + if ((shape1 != NULL) && (shape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, shape1, ps2, shape2)) return rnd_true; if (proto1->hplated) slshape1 = pcb_pstk_shape_mech_or_hole_at(PCB, ps1, ly, &sltmp1); @@ -1231,15 +1231,15 @@ if (proto2->hplated) slshape2 = pcb_pstk_shape_mech_or_hole_at(PCB, ps2, ly, &sltmp2); - if ((slshape1 != NULL) && (shape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, slshape1, ps2, shape2)) return pcb_true; - if ((slshape2 != NULL) && (shape1 != NULL) && pcb_pstk_shape_intersect(ctx, ps2, slshape2, ps1, shape1)) return pcb_true; - if ((slshape1 != NULL) && (slshape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, slshape1, ps2, slshape2)) return pcb_true; + if ((slshape1 != NULL) && (shape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, slshape1, ps2, shape2)) return rnd_true; + if ((slshape2 != NULL) && (shape1 != NULL) && pcb_pstk_shape_intersect(ctx, ps2, slshape2, ps1, shape1)) return rnd_true; + if ((slshape1 != NULL) && (slshape2 != NULL) && pcb_pstk_shape_intersect(ctx, ps1, slshape1, ps2, slshape2)) return rnd_true; } - return pcb_false; + return rnd_false; } -RND_INLINE pcb_bool_t pcb_isc_pstk_rat(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_rat_t *rat) +RND_INLINE rnd_bool_t pcb_isc_pstk_rat(const pcb_find_t *ctx, pcb_pstk_t *ps, pcb_rat_t *rat) { pcb_board_t *pcb = PCB; @@ -1246,14 +1246,14 @@ if ((rat->Point1.X == ps->x) && (rat->Point1.Y == ps->y)) { pcb_layer_t *layer = pcb_get_layer(pcb->Data, pcb->LayerGroups.grp[rat->group1].lid[0]); if ((layer != NULL) && (pcb_pstk_shape_at(pcb, ps, layer) != NULL)) - return pcb_true; + return rnd_true; } if ((rat->Point2.X == ps->x) && (rat->Point2.Y == ps->y)) { pcb_layer_t *layer = pcb_get_layer(pcb->Data, pcb->LayerGroups.grp[rat->group2].lid[0]); if ((layer != NULL) && (pcb_pstk_shape_at(pcb, ps, layer) != NULL)) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 31010) +++ trunk/src/gui_act.c (revision 31011) @@ -148,7 +148,7 @@ break; case F_CycleClip: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (conf_core.editor.all_direction_lines) { rnd_conf_toggle_editor(all_direction_lines); rnd_conf_setf(RND_CFR_DESIGN,"editor/line_refraction",-1,"%d",0); @@ -157,27 +157,27 @@ rnd_conf_setf(RND_CFR_DESIGN,"editor/line_refraction",-1,"%d",(conf_core.editor.line_refraction +1) % 3); } pcb_tool_adjust_attached(RND_ACT_HIDLIB); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_CycleCrosshair: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_setf(RND_CFR_CLI, "editor/crosshair_shape_idx", 0, "%d", CrosshairShapeIncrement(rnd_conf.editor.crosshair_shape_idx)); if (rnd_ch_shape_NUM == rnd_conf.editor.crosshair_shape_idx) rnd_conf_set(RND_CFR_CLI, "editor/crosshair_shape_idx", 0, "0", RND_POL_OVERWRITE); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleRubberBandMode: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(rubber_band_mode); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleStartDirection: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(swap_start_direction); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleUniqueNames: @@ -185,21 +185,21 @@ break; case F_ToggleSnapPin: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(snap_pin); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleSnapOffGridLine: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(snap_offgrid_line); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleHighlightOnPoint: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(highlight_on_point); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleLocalRef: @@ -244,7 +244,7 @@ break; case F_ToggleAutoDRC: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); rnd_conf_toggle_editor(auto_drc); if (conf_core.editor.auto_drc && rnd_conf.editor.mode == pcb_crosshair.tool_line) { if (pcb_data_clear_flag(PCB->Data, PCB_FLAG_FOUND, 1, 1) > 0) { @@ -260,7 +260,7 @@ pcb_find_free(&fctx); } } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; case F_ToggleCheckPlanes: @@ -292,8 +292,8 @@ RND_ACT_HIDLIB->grid = 1; if (pcb_crosshair_move_absolute(pcb_crosshair.X, pcb_crosshair.Y)) - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); /* first notify was in MoveCrosshairAbs */ - rnd_hidlib_set_grid(RND_ACT_HIDLIB, oldGrid, pcb_true, pcb_crosshair.X, pcb_crosshair.Y); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); /* first notify was in MoveCrosshairAbs */ + rnd_hidlib_set_grid(RND_ACT_HIDLIB, oldGrid, rnd_true, pcb_crosshair.X, pcb_crosshair.Y); rnd_grid_inval(); } break; @@ -345,7 +345,7 @@ pcb_undo_add_obj_to_flag(ptr2); PCB_FLAG_TOGGLE(PCB_FLAG_TERMNAME, obj); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); pcb_undo_inc_serial(); pcb_draw(); } @@ -479,14 +479,14 @@ } else if (id == -2) { /* empty */ if (pcb_marked.status) { - pcb_notify_mark_change(pcb_false); - pcb_marked.status = pcb_false; + pcb_notify_mark_change(rnd_false); + pcb_marked.status = rnd_false; pcb_marked.user_placed = 0; - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); } else { - pcb_notify_mark_change(pcb_false); - pcb_marked.status = pcb_true; + pcb_notify_mark_change(rnd_false); + pcb_marked.status = rnd_true; pcb_marked.user_placed = 1; if (conf_core.editor.marker_snaps) { pcb_marked.X = pcb_crosshair.X; @@ -494,12 +494,12 @@ } else rnd_hid_get_coords("Click on new mark", &pcb_marked.X, &pcb_marked.Y, 0); - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); } } else if (id == F_Center) { - pcb_notify_mark_change(pcb_false); - pcb_marked.status = pcb_true; + pcb_notify_mark_change(rnd_false); + pcb_marked.status = rnd_true; if (conf_core.editor.marker_snaps) { pcb_marked.X = pcb_crosshair.X; pcb_marked.Y = pcb_crosshair.Y; @@ -506,7 +506,7 @@ } else rnd_hid_get_coords("Click on new mark", &pcb_marked.X, &pcb_marked.Y, 0); - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); pcb_marked.user_placed = 1; } return 0; @@ -543,8 +543,8 @@ if (number > 0 && number <= vtroutestyle_len(&PCB->RouteStyle)) { rts = &PCB->RouteStyle.array[number - 1]; pcb_board_set_line_width(rts->Thick); - pcb_board_set_via_size(rts->Diameter, pcb_true); - pcb_board_set_via_drilling_hole(rts->Hole, pcb_true); + pcb_board_set_via_size(rts->Diameter, rnd_true); + pcb_board_set_via_drilling_hole(rts->Hole, rnd_true); pcb_board_set_clearance(rts->Clearance); } else { @@ -588,22 +588,22 @@ /* set layer current and size from line or arc */ switch (type) { case PCB_OBJ_LINE: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); set_same_(((pcb_line_t *) ptr2)->Thickness, -1, -1, ((pcb_line_t *) ptr2)->Clearance / 2, NULL); layer = (pcb_layer_t *) ptr1; if (rnd_conf.editor.mode != pcb_crosshair.tool_line) pcb_tool_select_by_name(RND_ACT_HIDLIB, "line"); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); rnd_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); break; case PCB_OBJ_ARC: - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); set_same_(((pcb_arc_t *) ptr2)->Thickness, -1, -1, ((pcb_arc_t *) ptr2)->Clearance / 2, NULL); layer = (pcb_layer_t *) ptr1; if (rnd_conf.editor.mode != pcb_crosshair.tool_arc) pcb_tool_select_by_name(RND_ACT_HIDLIB, "arc"); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); rnd_event(RND_ACT_HIDLIB, PCB_EVENT_ROUTE_STYLES_CHANGED, NULL); break; @@ -616,7 +616,7 @@ return 0; } if (layer != PCB_CURRLAYER(PCB_ACT_BOARD)) { - pcb_layervis_change_group_vis(RND_ACT_HIDLIB, pcb_layer_id(PCB_ACT_BOARD->Data, layer), pcb_true, pcb_true); + pcb_layervis_change_group_vis(RND_ACT_HIDLIB, pcb_layer_id(PCB_ACT_BOARD->Data, layer), rnd_true, rnd_true); rnd_hid_redraw(PCB); } RND_ACT_IRES(0); @@ -647,7 +647,7 @@ else if (strncmp(arg, "name=", 5) == 0) { interactive = 0; ret |= pcb_layer_rename_(ly, rnd_strdup(arg+5), 1); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (strncmp(arg, "auto=", 5) == 0) { interactive = 0; @@ -655,7 +655,7 @@ ly->comb |= PCB_LYC_AUTO; else ly->comb &= ~PCB_LYC_AUTO; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (strncmp(arg, "sub=", 4) == 0) { interactive = 0; @@ -663,7 +663,7 @@ ly->comb |= PCB_LYC_SUB; else ly->comb &= ~PCB_LYC_SUB; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (strncmp(arg, "attrib", 6) == 0) { char *key, *val; @@ -686,7 +686,7 @@ else ret |= rnd_attribute_put(&ly->Attributes, key, val); free(key); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else { rnd_message(RND_MSG_ERROR, "Invalid EditLayer() command: %s\n", arg); @@ -753,7 +753,7 @@ else if (strncmp(arg, "name=", 5) == 0) { interactive = 0; ret |= pcb_layergrp_rename_(g, rnd_strdup(arg+5), 1); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (strncmp(arg, "type=", 5) == 0) { const char *sbit = arg+5; @@ -772,7 +772,7 @@ case '-': g->ltype &= ~bit; break; } interactive = 0; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (strncmp(arg, "attrib", 6) == 0) { char *key, *val; @@ -1134,13 +1134,13 @@ RND_ACT_IRES(0); if (rnd_strcasecmp(name, "all") == 0) { - pcb_bool_op_t open = PCB_BOOL_PRESERVE, vis = PCB_BOOL_PRESERVE, user = PCB_BOOL_PRESERVE; + rnd_bool_op_t open = RND_BOOL_PRESERVE, vis = RND_BOOL_PRESERVE, user = RND_BOOL_PRESERVE; const char *cmd, *suser; RND_PCB_ACT_CONVARG(2, FGW_STR, toggleview, cmd = argv[2].val.str); RND_PCB_ACT_CONVARG(3, FGW_STR, toggleview, suser = argv[3].val.str); - user = pcb_str2boolop(suser); - if (user == PCB_BOOL_INVALID) + user = rnd_str2boolop(suser); + if (user == RND_BOOL_INVALID) RND_ACT_FAIL(toggleview); if (rnd_strcasecmp(cmd, "open") == 0) open = user; Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 31010) +++ trunk/src/layer.c (revision 31011) @@ -171,10 +171,10 @@ 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; - if (layer->Arc.lst.length > 0) return pcb_false; - if (layer->Polygon.lst.length > 0) return pcb_false; - if (layer->Text.lst.length > 0) return pcb_false; + if (layer->Line.lst.length > 0) return rnd_false; + if (layer->Arc.lst.length > 0) return rnd_false; + if (layer->Polygon.lst.length > 0) return rnd_false; + if (layer->Text.lst.length > 0) return rnd_false; /* if the layer is locally empty, it might be a board layer that has objects from subcircuits so also check the rtrees */ @@ -239,7 +239,7 @@ { if ((num >= 0) && (num < pcb->Data->LayerN)) return pcb_layer_is_empty_(pcb, pcb->Data->Layer + num); - return pcb_false; + return rnd_false; } rnd_layer_id_t pcb_layer_id(const pcb_data_t *Data, const pcb_layer_t *Layer) Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 31010) +++ trunk/src/layer.h (revision 31011) @@ -211,11 +211,11 @@ slow linear search */ rnd_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) */ +/* Returns rnd_true if the given layer is empty (there are no objects on the layer) */ rnd_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *ly); rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, rnd_layer_id_t ly); -/* Returns pcb_true if the given layer is empty - non-recursive variant (doesn't deal with side effects) */ +/* Returns rnd_true if the given layer is empty - non-recursive variant (doesn't deal with side effects) */ rnd_bool pcb_layer_is_pure_empty(pcb_layer_t *layer); Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 31010) +++ trunk/src/layer_grp.c (revision 31011) @@ -50,7 +50,7 @@ rnd_event(&pcb->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); \ if ((rnd_gui != NULL) && (rnd_exporter == NULL)) \ rnd_gui->invalidate_all(rnd_gui); \ - pcb_board_set_changed_flag(pcb_true); \ + pcb_board_set_changed_flag(rnd_true); \ } \ } while(0) @@ -224,15 +224,15 @@ /* some layers are never empty */ if (g->ltype & PCB_LYT_MASK) - return pcb_false; + return rnd_false; if (!pcb_pstk_is_group_empty(pcb, num)) - return pcb_false; + return rnd_false; for (i = 0; i < g->len; i++) if (!pcb_layer_is_empty(pcb, g->lid[i])) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, rnd_layergrp_id_t num) @@ -242,8 +242,8 @@ for (i = 0; i < g->len; i++) if (!pcb_layer_is_pure_empty(pcb_get_layer(pcb->Data, g->lid[i]))) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } static void pcb_layergrp_free_fields(pcb_layergrp_t *g) Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 31010) +++ trunk/src/layer_grp.h (revision 31011) @@ -89,7 +89,7 @@ /* Returns group actually moved to (i.e. either group or previous) */ rnd_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, rnd_layer_id_t layer, rnd_layergrp_id_t group); -/* Returns pcb_true if all layers in a group are empty */ +/* Returns rnd_true if all layers in a group are empty */ rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, rnd_layergrp_id_t lgrp); rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, rnd_layergrp_id_t num); Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 31010) +++ trunk/src/layer_vis.c (revision 31011) @@ -138,15 +138,15 @@ if (grp != NULL) PCB->Data->Layer[i].meta.real.vis = !grp->init_invis; else - PCB->Data->Layer[i].meta.real.vis = pcb_true; + PCB->Data->Layer[i].meta.real.vis = rnd_true; } - PCB->InvisibleObjectsOn = pcb_true; - PCB->pstk_on = pcb_true; - PCB->SubcOn = pcb_true; - PCB->SubcPartsOn = pcb_true; - PCB->RatOn = pcb_true; - PCB->padstack_mark_on = pcb_true; - PCB->hole_on = pcb_true; + PCB->InvisibleObjectsOn = rnd_true; + PCB->pstk_on = rnd_true; + PCB->SubcOn = rnd_true; + PCB->SubcPartsOn = rnd_true; + PCB->RatOn = rnd_true; + PCB->padstack_mark_on = rnd_true; + PCB->hole_on = rnd_true; /* Bring the top copper group to the front and make it active. */ if (pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, &comp, 1) > 0) @@ -159,11 +159,11 @@ void pcb_layervis_save_stack(void) { rnd_cardinal_t i; - static rnd_bool run = pcb_false; + static rnd_bool run = rnd_false; - if (run == pcb_false) { + if (run == rnd_false) { SavedStack.cnt = 0; - run = pcb_true; + run = rnd_true; } if (SavedStack.cnt != 0) @@ -233,7 +233,7 @@ in = 0; } -void pcb_layer_vis_change_all(pcb_board_t *pcb, pcb_bool_op_t open, pcb_bool_op_t vis) +void pcb_layer_vis_change_all(pcb_board_t *pcb, rnd_bool_op_t open, rnd_bool_op_t vis) { rnd_layergrp_id_t gid; int n; @@ -241,9 +241,9 @@ for(gid = 0; gid < pcb_max_group(pcb); gid++) { pcb_layergrp_t *g = &pcb->LayerGroups.grp[gid]; - pcb_bool_op(g->open, open); + rnd_bool_op(g->open, open); - if (vis == PCB_BOOL_PRESERVE) { + if (vis == RND_BOOL_PRESERVE) { /* the group is visible exactly if if any layer is visible */ g->vis = 0; for(n = 0; n < g->len; n++) { @@ -255,10 +255,10 @@ } } else { - pcb_bool_op(g->vis, vis); + rnd_bool_op(g->vis, vis); for(n = 0; n < g->len; n++) { pcb_layer_t *l = pcb_get_layer(pcb->Data, g->lid[n]); - pcb_bool_op(l->meta.real.vis, vis); + rnd_bool_op(l->meta.real.vis, vis); } } } @@ -274,7 +274,7 @@ pcb_layergrp_t *g = &PCB->LayerGroups.grp[gid]; if ((g->ltype & PCB_LYT_MASK) || (g->ltype & PCB_LYT_PASTE)) { int n; - g->vis = pcb_false; + g->vis = rnd_false; for(n = 0; n < g->len; n++) { pcb_layer_t *l = pcb_get_layer(PCB->Data, g->lid[n]); if (l == NULL) @@ -289,7 +289,7 @@ static void layer_vis_grp_defaults(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { pcb_board_t *pcb = (pcb_board_t *)hidlib; - pcb_layer_vis_change_all(pcb, PCB_BOOL_SET, PCB_BOOL_PRESERVE); + pcb_layer_vis_change_all(pcb, RND_BOOL_SET, RND_BOOL_PRESERVE); pcb_layer_vis_historical_hides(pcb); rnd_event(hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); /* Can't send LAYERVIS_CHANGED here: it's a race condition, the layer selector could still have the old widgets */ Index: trunk/src/layer_vis.h =================================================================== --- trunk/src/layer_vis.h (revision 31010) +++ trunk/src/layer_vis.h (revision 31011) @@ -70,6 +70,6 @@ void pcb_layer_vis_uninit(void); /* Open/close, on/off all layers and groups; does NOT generate an event */ -void pcb_layer_vis_change_all(pcb_board_t *pcb, pcb_bool_op_t open, pcb_bool_op_t vis); +void pcb_layer_vis_change_all(pcb_board_t *pcb, rnd_bool_op_t open, rnd_bool_op_t vis); #endif Index: trunk/src/librnd/core/actions.c =================================================================== --- trunk/src/librnd/core/actions.c (revision 31010) +++ trunk/src/librnd/core/actions.c (revision 31011) @@ -683,7 +683,7 @@ /* no backend or forced action mode: classic pcb-rnd action parse */ if (force_action_mode || (rnd_conf.rc.cli_backend == NULL) || (*rnd_conf.rc.cli_backend == '\0')) { rnd_event(NULL, RND_EVENT_CLI_ENTER, "s", str_); - return hid_parse_actionstring(hl, str_, pcb_false); + return hid_parse_actionstring(hl, str_, rnd_false); } /* backend: let the backend action handle it */ @@ -720,7 +720,7 @@ int rnd_parse_actions(rnd_hidlib_t *hl, const char *str_) { - return hid_parse_actionstring(hl, str_, pcb_true); + return hid_parse_actionstring(hl, str_, rnd_true); } /*** custom fungw types ***/ Index: trunk/src/librnd/core/conf.h =================================================================== --- trunk/src/librnd/core/conf.h (revision 31010) +++ trunk/src/librnd/core/conf.h (revision 31011) @@ -316,7 +316,7 @@ const char **__in__ = __n__->val.string; \ if (__in__ == NULL) \ continue; \ - rnd_path_resolve(hidlib, *__in__, &__path__, 0, pcb_false); \ + rnd_path_resolve(hidlib, *__in__, &__path__, 0, rnd_false); \ res = call; \ free(__path__); \ if (res == 0) \ Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 31010) +++ trunk/src/librnd/core/conf_act.c (revision 31011) @@ -307,9 +307,9 @@ } rnd_grid_inval(); if (val[0] == '*') - rnd_hidlib_set_grid(RND_ACT_HIDLIB, rnd_round(RND_ACT_HIDLIB->grid * d), pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, rnd_round(RND_ACT_HIDLIB->grid * d), rnd_false, 0, 0); else - rnd_hidlib_set_grid(RND_ACT_HIDLIB, rnd_round(RND_ACT_HIDLIB->grid / d), pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, rnd_round(RND_ACT_HIDLIB->grid / d), rnd_false, 0, 0); return 0; } @@ -317,15 +317,15 @@ rnd_grid_inval(); if (absolute) - rnd_hidlib_set_grid(RND_ACT_HIDLIB, value, pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, value, rnd_false, 0, 0); else { /* On the way down, until the minimum unit (1) */ if ((value + RND_ACT_HIDLIB->grid) < 1) - rnd_hidlib_set_grid(RND_ACT_HIDLIB, 1, pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, 1, rnd_false, 0, 0); else if (RND_ACT_HIDLIB->grid == 1) - rnd_hidlib_set_grid(RND_ACT_HIDLIB, value, pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, value, rnd_false, 0, 0); else - rnd_hidlib_set_grid(RND_ACT_HIDLIB, value + RND_ACT_HIDLIB->grid, pcb_false, 0, 0); + rnd_hidlib_set_grid(RND_ACT_HIDLIB, value + RND_ACT_HIDLIB->grid, rnd_false, 0, 0); } return 0; } Index: trunk/src/librnd/core/grid.c =================================================================== --- trunk/src/librnd/core/grid.c (revision 31010) +++ trunk/src/librnd/core/grid.c (revision 31011) @@ -53,7 +53,7 @@ return x; } -pcb_bool_t rnd_grid_parse(rnd_grid_t *dst, const char *src) +rnd_bool_t rnd_grid_parse(rnd_grid_t *dst, const char *src) { const char *nsep; char *sep3, *sep2, *sep, *tmp, *size, *ox = NULL, *oy = NULL, *unit = NULL; @@ -129,17 +129,17 @@ dst->name = rnd_strndup(src, nsep-src-1); else dst->name = NULL; - return pcb_true; + return rnd_true; error:; free(tmp); - return pcb_false; + return rnd_false; } -pcb_bool_t rnd_grid_append_print(gds_t *dst, const rnd_grid_t *src) +rnd_bool_t rnd_grid_append_print(gds_t *dst, const rnd_grid_t *src) { if (src->size <= 0) - return pcb_false; + return rnd_false; if (src->name != NULL) { gds_append_str(dst, src->name); gds_append(dst, ':'); @@ -151,7 +151,7 @@ gds_append(dst, '!'); gds_append_str(dst, src->unit->suffix); } - return pcb_true; + return rnd_true; } char *rnd_grid_print(const rnd_grid_t *src) @@ -167,7 +167,7 @@ void rnd_grid_set(rnd_hidlib_t *hidlib, const rnd_grid_t *src) { - rnd_hidlib_set_grid(hidlib, src->size, pcb_true, src->ox, src->oy); + rnd_hidlib_set_grid(hidlib, src->size, rnd_true, src->ox, src->oy); if (src->unit != NULL) rnd_hidlib_set_unit(hidlib, src->unit); } @@ -178,7 +178,7 @@ dst->name = NULL; } -pcb_bool_t rnd_grid_list_jump(rnd_hidlib_t *hidlib, int dst) +rnd_bool_t rnd_grid_list_jump(rnd_hidlib_t *hidlib, int dst) { const rnd_conf_listitem_t *li; rnd_grid_t g; @@ -189,7 +189,7 @@ if (dst >= max) dst = max - 1; if (dst < 0) - return pcb_false; + return rnd_false; rnd_conf_setf(RND_CFR_DESIGN, "editor/grids_idx", -1, "%d", dst); @@ -196,17 +196,17 @@ li = rnd_conflist_nth((rnd_conflist_t *)&rnd_conf.editor.grids, dst); /* clamp */ if (li == NULL) - return pcb_false; + return rnd_false; if (!rnd_grid_parse(&g, li->payload)) - return pcb_false; + return rnd_false; rnd_grid_set(hidlib, &g); rnd_grid_free(&g); - return pcb_true; + return rnd_true; } -pcb_bool_t rnd_grid_list_step(rnd_hidlib_t *hidlib, int stp) +rnd_bool_t rnd_grid_list_step(rnd_hidlib_t *hidlib, int stp) { int dst = rnd_conf.editor.grids_idx; if (dst < 0) Index: trunk/src/librnd/core/grid.h =================================================================== --- trunk/src/librnd/core/grid.h (revision 31010) +++ trunk/src/librnd/core/grid.h (revision 31011) @@ -51,13 +51,13 @@ rnd_coord_t rnd_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 rnd_grid_parse(rnd_grid_t *dst, const char *src); +rnd_bool_t rnd_grid_parse(rnd_grid_t *dst, const char *src); /* Free all allocated fields of a grid struct */ void rnd_grid_free(rnd_grid_t *dst); /* Convert src into packed string format */ -pcb_bool_t rnd_grid_append_print(gds_t *dst, const rnd_grid_t *src); +rnd_bool_t rnd_grid_append_print(gds_t *dst, const rnd_grid_t *src); char *rnd_grid_print(const rnd_grid_t *src); /* Apply grid settings from src to the pcb */ @@ -64,10 +64,10 @@ void rnd_grid_set(rnd_hidlib_t *hidlib, const rnd_grid_t *src); /* Jump to grid index dst (clamped); absolute set */ -pcb_bool_t rnd_grid_list_jump(rnd_hidlib_t *hidlib, int dst); +rnd_bool_t rnd_grid_list_jump(rnd_hidlib_t *hidlib, int dst); /* Step stp steps (can be 0) on the grids list and set the resulting grid; relative set */ -pcb_bool_t rnd_grid_list_step(rnd_hidlib_t *hidlib, int stp); +rnd_bool_t rnd_grid_list_step(rnd_hidlib_t *hidlib, int stp); /* invalidate the grid index; call this when changing the grid settings */ void rnd_grid_inval(void); Index: trunk/src/librnd/core/hid.h =================================================================== --- trunk/src/librnd/core/hid.h (revision 31010) +++ trunk/src/librnd/core/hid.h (revision 31011) @@ -259,7 +259,7 @@ keyword/function version; layer is the first layer in the group. TODO: The group may be -1 until the layer rewrite is finished. If it returns false (zero), the HID does not want that layer, and none of - the drawing functions should be called. If it returns pcb_true (nonzero), + the drawing functions should be called. If it returns rnd_true (nonzero), the items in that layer [group] should be drawn using the various drawing functions. In addition to the copper layer groups, you may select virtual layers. The is_empty argument is a hint - if set, the layer is empty, if @@ -358,7 +358,7 @@ /* Causes func_ to be called when some condition occurs on the file descriptor passed. Conditions include data for reading, writing, 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 + to func. If the watch function returns rnd_true, the watch is kept, else it is removed. */ rnd_hidval_t (*watch_file)(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(rnd_hidval_t watch, int fd, unsigned int condition, rnd_hidval_t user_data), rnd_hidval_t user_data); @@ -632,14 +632,14 @@ /* Notify the GUI that data relating to the crosshair is being changed. * - * The argument passed is pcb_false to notify "changes are about to happen", - * and pcb_true to notify "changes have finished". + * The argument passed is rnd_false to notify "changes are about to happen", + * and rnd_true to notify "changes have finished". * - * Each call with a 'pcb_false' parameter must be matched with a following one - * with a 'pcb_true' parameter. Unmatched 'pcb_true' calls are currently not permitted, + * Each call with a 'rnd_false' parameter must be matched with a following one + * with a 'rnd_true' parameter. Unmatched 'rnd_true' calls are currently not permitted, * but might be allowed in the future. * - * GUIs should not complain if they receive extra calls with 'pcb_true' as parameter. + * GUIs should not complain if they receive extra calls with 'rnd_true' as parameter. * 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. */ Index: trunk/src/librnd/core/hid_cfg.c =================================================================== --- trunk/src/librnd/core/hid_cfg.c (revision 31010) +++ trunk/src/librnd/core/hid_cfg.c (revision 31011) @@ -149,7 +149,7 @@ int fn_len = strlen(fn); doc = NULL; - rnd_paths_resolve_all(hidlib, rnd_menu_file_paths, paths, fn_len+32, pcb_false); + rnd_paths_resolve_all(hidlib, rnd_menu_file_paths, paths, fn_len+32, rnd_false); for(p = paths; *p != NULL; p++) { if (doc == NULL) { char *end = *p + strlen(*p); Index: trunk/src/librnd/core/hid_dad.c =================================================================== --- trunk/src/librnd/core/hid_dad.c (revision 31010) +++ trunk/src/librnd/core/hid_dad.c (revision 31011) @@ -125,7 +125,7 @@ if ((rnd_gui == NULL) || (rnd_gui->attr_dlg_new == NULL)) return -1; - hid_ctx = rnd_gui->attr_dlg_new(rnd_gui, id, attrs, n_attrs, title, caller_data, pcb_true, NULL, defx, defy, minx, miny); + hid_ctx = rnd_gui->attr_dlg_new(rnd_gui, id, attrs, n_attrs, title, caller_data, rnd_true, NULL, defx, defy, minx, miny); if (hid_ctx_out != NULL) *hid_ctx_out = hid_ctx; rv = rnd_gui->attr_dlg_run(hid_ctx); Index: trunk/src/librnd/core/hid_dlg.c =================================================================== --- trunk/src/librnd/core/hid_dlg.c (revision 31010) +++ trunk/src/librnd/core/hid_dlg.c (revision 31011) @@ -224,7 +224,7 @@ RND_DAD_END(ctx.dlg); RND_DAD_END(ctx.dlg); - RND_DAD_NEW("progress", ctx.dlg, "pcb-rnd progress", &ctx, pcb_false, progress_close_cb); + RND_DAD_NEW("progress", ctx.dlg, "pcb-rnd progress", &ctx, rnd_false, progress_close_cb); active = 1; cancelled = 0; Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 31010) +++ trunk/src/librnd/core/hid_init.c (revision 31011) @@ -663,7 +663,7 @@ rnd_conf_update(NULL, -1); 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 */ + int res = rnd_parse_command(NULL, ga->main_action, rnd_true); /* hidlib is NULL because there is no context yet */ if ((res != 0) && (ga->main_action_hint != NULL)) rnd_message(RND_MSG_ERROR, "\nHint: %s\n", ga->main_action_hint); rnd_log_print_uninit_errs("main_action parse error"); Index: trunk/src/librnd/core/misc_util.c =================================================================== --- trunk/src/librnd/core/misc_util.c (revision 31010) +++ trunk/src/librnd/core/misc_util.c (revision 31011) @@ -77,10 +77,10 @@ start++; ulo = 1; if (absolute != NULL) - *absolute = pcb_false; + *absolute = rnd_false; } else if (absolute != NULL) - *absolute = pcb_true; + *absolute = rnd_true; ul = strspn(start, "0123456789."); if (ul > 0) @@ -106,7 +106,7 @@ if (succ) { *val_out = crd; *unit_out = u; - return pcb_true; + return rnd_true; } } } @@ -114,7 +114,7 @@ err:; *val_out = 0; *unit_out = NULL; - return pcb_false; + return rnd_false; } @@ -133,15 +133,15 @@ * value to the current one */ if (*val == '=') { - *absolute = pcb_true; + *absolute = rnd_true; sscanf(val + 1, "%lf%n", &value, &n); n++; } else { if (isdigit((int) *val)) - *absolute = pcb_true; + *absolute = rnd_true; else - *absolute = pcb_false; + *absolute = rnd_false; sscanf(val, "%lf%n", &value, &n); } if (n <= 0) Index: trunk/src/librnd/core/pcb_bool.c =================================================================== --- trunk/src/librnd/core/pcb_bool.c (revision 31010) +++ trunk/src/librnd/core/pcb_bool.c (revision 31011) @@ -28,11 +28,11 @@ #include #include -pcb_bool_op_t pcb_str2boolop(const char *s) +rnd_bool_op_t rnd_str2boolop(const char *s) { - if (rnd_strcasecmp(s, "set") == 0) return PCB_BOOL_SET; - if (rnd_strcasecmp(s, "clear") == 0) return PCB_BOOL_CLEAR; - if (rnd_strcasecmp(s, "toggle") == 0) return PCB_BOOL_TOGGLE; - if (rnd_strcasecmp(s, "preserve") == 0) return PCB_BOOL_PRESERVE; - return PCB_BOOL_INVALID; + if (rnd_strcasecmp(s, "set") == 0) return RND_BOOL_SET; + if (rnd_strcasecmp(s, "clear") == 0) return RND_BOOL_CLEAR; + if (rnd_strcasecmp(s, "toggle") == 0) return RND_BOOL_TOGGLE; + if (rnd_strcasecmp(s, "preserve") == 0) return RND_BOOL_PRESERVE; + return RND_BOOL_INVALID; } Index: trunk/src/librnd/core/pcb_bool.h =================================================================== --- trunk/src/librnd/core/pcb_bool.h (revision 31010) +++ trunk/src/librnd/core/pcb_bool.h (revision 31011) @@ -24,38 +24,38 @@ * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") */ -#ifndef PCB_BOOL_H -#define PCB_BOOL_H +#ifndef RND_BOOL_H +#define RND_BOOL_H /* Because stdbool is not c89 */ typedef int rnd_bool; -typedef enum pcb_bool_e { - pcb_false = 0, - pcb_true = 1 -} pcb_bool_t; +typedef enum rnd_bool_e { + rnd_false = 0, + rnd_true = 1 +} rnd_bool_t; /* for arguments optionally changing the value of a bool */ -typedef enum pcb_bool_op_e { - PCB_BOOL_CLEAR = 0, - PCB_BOOL_SET = 1, - PCB_BOOL_TOGGLE = -1, - PCB_BOOL_PRESERVE = -2, - PCB_BOOL_INVALID = -8 -} pcb_bool_op_t; +typedef enum rnd_bool_op_e { + RND_BOOL_CLEAR = 0, + RND_BOOL_SET = 1, + RND_BOOL_TOGGLE = -1, + RND_BOOL_PRESERVE = -2, + RND_BOOL_INVALID = -8 +} rnd_bool_op_t; -/* changes the value of rnd_bool dst as requested by pcb_bool_op_t op +/* changes the value of rnd_bool dst as requested by rnd_bool_op_t op WARNING: evaluates dst multiple times */ -#define pcb_bool_op(dst, op) \ +#define rnd_bool_op(dst, op) \ do { \ switch(op) { \ - case PCB_BOOL_CLEAR: (dst) = 0; break; \ - case PCB_BOOL_SET: (dst) = 1; break; \ - case PCB_BOOL_TOGGLE: (dst) = !(dst); break; \ - case PCB_BOOL_INVALID: \ - case PCB_BOOL_PRESERVE: break; \ + case RND_BOOL_CLEAR: (dst) = 0; break; \ + case RND_BOOL_SET: (dst) = 1; break; \ + case RND_BOOL_TOGGLE: (dst) = !(dst); break; \ + case RND_BOOL_INVALID: \ + case RND_BOOL_PRESERVE: break; \ } \ } while(0) -pcb_bool_op_t pcb_str2boolop(const char *s); +rnd_bool_op_t rnd_str2boolop(const char *s); #endif Index: trunk/src/librnd/core/tool.c =================================================================== --- trunk/src/librnd/core/tool.c (revision 31010) +++ trunk/src/librnd/core/tool.c (revision 31011) @@ -38,7 +38,7 @@ #define PCB_MAX_MODESTACK_DEPTH 16 /* maximum depth of mode stack */ -rnd_bool pcb_tool_is_saved = pcb_false; +rnd_bool pcb_tool_is_saved = rnd_false; vtp0_t 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 rnd_bool recursing = pcb_false; + static rnd_bool recursing = rnd_false; int ok = 1; if ((id < 0) || (id > vtp0_len(&pcb_tools))) @@ -139,7 +139,7 @@ if (ok == 0) id = rnd_conf.editor.mode; - recursing = pcb_true; + recursing = rnd_true; pcb_tool_prev_id = rnd_conf.editor.mode; pcb_tool_next_id = id; @@ -150,7 +150,7 @@ tool_select_lock = 0; init_current_tool(); - recursing = pcb_false; + recursing = rnd_false; if (rnd_gui != NULL) rnd_gui->set_mouse_cursor(rnd_gui, id); @@ -252,12 +252,12 @@ rnd_bool pcb_tool_undo_act(rnd_hidlib_t *hl) { - wrap_retv(undo_act, return pcb_true, (hl)); + wrap_retv(undo_act, return rnd_true, (hl)); } rnd_bool pcb_tool_redo_act(rnd_hidlib_t *hl) { - wrap_retv(redo_act, return pcb_true, (hl)); + wrap_retv(redo_act, return rnd_true, (hl)); } static void do_release(rnd_hidlib_t *hidlib) @@ -265,13 +265,13 @@ if (rnd_conf.temp.click_cmd_entry_active && (rnd_cli_mouse(hidlib, 0) == 0)) return; - hidlib->tool_grabbed.status = pcb_false; + hidlib->tool_grabbed.status = rnd_false; pcb_tool_release(hidlib); if (pcb_tool_is_saved) pcb_tool_restore(hidlib); - pcb_tool_is_saved = pcb_false; + pcb_tool_is_saved = rnd_false; rnd_event(hidlib, RND_EVENT_TOOL_RELEASE, NULL); } @@ -304,7 +304,7 @@ /* it is okay to use crosshair directly here, the mode command is called from a click when it needs coords */ hidlib->tool_x = hidlib->ch_x; hidlib->tool_y = hidlib->ch_y; - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (rnd_strcasecmp(cmd, "Cancel") == 0) { pcb_tool_select_by_id(RND_ACT_HIDLIB, rnd_conf.editor.mode); } @@ -331,7 +331,7 @@ action script, so actions after this one could do things that would be executed only after non-recognized gestures */ do_release(RND_ACT_HIDLIB); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return 1; } } @@ -353,7 +353,7 @@ if (pcb_tool_select_by_name(RND_ACT_HIDLIB, cmd) != 0) rnd_message(RND_MSG_ERROR, "No such tool: '%s'\n", cmd); } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); return 0; } Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 31010) +++ trunk/src/librnd/pcb_compat.h (revision 31011) @@ -1050,3 +1050,16 @@ #define pcb_strdup_subst_t rnd_strdup_subst_t #define pcb_subst_append rnd_subst_append #define pcb_strdup_subst rnd_strdup_subst +#define pcb_bool_e rnd_bool_e +#define pcb_bool_t rnd_bool_t +#define pcb_false rnd_false +#define pcb_true rnd_true +#define PCB_BOOL_CLEAR RND_BOOL_CLEAR +#define PCB_BOOL_SET RND_BOOL_SET +#define PCB_BOOL_TOGGLE RND_BOOL_TOGGLE +#define PCB_BOOL_PRESERVE RND_BOOL_PRESERVE +#define PCB_BOOL_INVALID RND_BOOL_INVALID +#define pcb_bool_op rnd_bool_op +#define pcb_str2boolop rnd_str2boolop +#define pcb_bool_op_t rnd_bool_op_t +#define pcb_bool_op_e rnd_bool_op_e Index: trunk/src/librnd/poly/polyarea.c =================================================================== --- trunk/src/librnd/poly/polyarea.c (revision 31010) +++ trunk/src/librnd/poly/polyarea.c (revision 31011) @@ -602,7 +602,7 @@ i->s->p->Flags.status = ISECTED; s->p->Flags.status = ISECTED; for (; cnt; cnt--) { - rnd_bool done_insert_on_i = pcb_false; + rnd_bool done_insert_on_i = rnd_false; new_node = node_add_single_point(i->v, cnt > 1 ? s2 : s1); if (new_node != NULL) { #ifdef DEBUG_INTERSECT @@ -610,7 +610,7 @@ #endif i->node_insert_list = prepend_insert_node_task(i->node_insert_list, i->s, new_node); i->s->intersected = 1; - done_insert_on_i = pcb_true; + done_insert_on_i = rnd_true; } new_node = node_add_single_point(s->v, cnt > 1 ? s2 : s1); if (new_node != NULL) { @@ -905,7 +905,7 @@ } /* cntr_in_M_pcb_polyarea_t -returns poly is inside outfst ? pcb_true : pcb_false */ +returns poly is inside outfst ? rnd_true : rnd_false */ static int cntr_in_M_pcb_polyarea_t(pcb_pline_t * poly, rnd_polyarea_t * outfst, rnd_bool test) { rnd_polyarea_t *outer = outfst; @@ -937,10 +937,10 @@ break; case 1: /* Found we are inside this piece, and not any of its holes */ rnd_heap_destroy(&heap); - return pcb_true; + return rnd_true; case 2: /* Found inside a hole in the smallest polygon so far. No need to check the other polygons */ rnd_heap_destroy(&heap); - return pcb_false; + return rnd_false; default: printf("Something strange here\n"); break; @@ -948,7 +948,7 @@ } while (1); rnd_heap_destroy(&heap); - return pcb_false; + return rnd_false; } /* cntr_in_M_pcb_polyarea_t */ #ifdef DEBUG @@ -1021,7 +1021,7 @@ print_labels(a); DEBUGP("\n\n"); #endif - return pcb_false; + return rnd_false; } /* label_contour */ static rnd_bool cntr_label_pcb_polyarea_t(pcb_pline_t * poly, rnd_polyarea_t * ppl, rnd_bool test) @@ -1028,19 +1028,19 @@ { assert(ppl != NULL && ppl->contours != NULL); if (poly->Flags.status == ISECTED) { - label_contour(poly); /* should never get here when rnd_bool is pcb_true */ + label_contour(poly); /* should never get here when rnd_bool is rnd_true */ } else if (cntr_in_M_pcb_polyarea_t(poly, ppl, test)) { if (test) - return pcb_true; + return rnd_true; poly->Flags.status = INSIDE; } else { if (test) - return pcb_false; + return rnd_false; poly->Flags.status = OUTSIDE; } - return pcb_false; + return rnd_false; } /* cntr_label_pcb_polyarea_t */ static rnd_bool M_pcb_polyarea_t_label_separated(pcb_pline_t * afst, rnd_polyarea_t * b, rnd_bool touch) @@ -1049,9 +1049,9 @@ for (curc = afst; curc != NULL; curc = curc->next) { if (cntr_label_pcb_polyarea_t(curc, b, touch) && touch) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } static rnd_bool M_pcb_polyarea_t_label(rnd_polyarea_t * afst, rnd_polyarea_t * b, rnd_bool touch) @@ -1064,11 +1064,11 @@ for (curc = a->contours; curc != NULL; curc = curc->next) if (cntr_label_pcb_polyarea_t(curc, b, touch)) { if (touch) - return pcb_true; + return rnd_true; } } while (!touch && (a = a->f) != afst); - return pcb_false; + return rnd_false; } /****************************************************************/ @@ -1302,7 +1302,7 @@ } /* Remove hole from the contour */ - remove_contour(pa_info->pa, prev, info.result, pcb_true); + remove_contour(pa_info->pa, prev, info.result, rnd_true); /* Add hole as the next on the list to be processed in this very function */ info.result->next = *src; @@ -1357,13 +1357,13 @@ { if (cur->Flags.status == INSIDE) { *initdir = BACKW; - return pcb_true; + return rnd_true; } if (cur->Flags.status == OUTSIDE) { *initdir = FORW; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } static int IsectJ_Rule(char p, pcb_vnode_t * v, DIRECTION * cdir) @@ -1382,13 +1382,13 @@ { if (v->Flags.status == INSIDE) { *cdir = BACKW; - return pcb_true; + return rnd_true; } if (v->Flags.status == OUTSIDE) { *cdir = FORW; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } static int SubJ_Rule(char p, pcb_vnode_t * v, DIRECTION * cdir) @@ -1395,11 +1395,11 @@ { if (p == 'B' && v->Flags.status == INSIDE) { *cdir = BACKW; - return pcb_true; + return rnd_true; } if (p == 'A' && v->Flags.status == OUTSIDE) { *cdir = FORW; - return pcb_true; + return rnd_true; } if (v->Flags.status == SHARED2) { if (p == 'A') @@ -1406,9 +1406,9 @@ *cdir = FORW; else *cdir = BACKW; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* return the edge that comes next. @@ -1415,7 +1415,7 @@ * if the direction is BACKW, then we return the next vertex * so that prev vertex has the flags for the edge * - * returns pcb_true if an edge is found, pcb_false otherwise + * returns rnd_true if an edge is found, rnd_false otherwise */ static int jump(pcb_vnode_t ** cur, DIRECTION * cdir, J_Rule rule) { @@ -1425,8 +1425,8 @@ if (!(*cur)->cvc_prev) { /* not a cross-vertex */ if (*cdir == FORW ? (*cur)->Flags.mark : (*cur)->prev->Flags.mark) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } #ifdef DEBUG_JUMP DEBUGP("jump entering node at %$mD\n", (*cur)->point[0], (*cur)->point[1]); @@ -1451,12 +1451,12 @@ #endif *cur = d->parent; *cdir = newone; - return pcb_true; + return rnd_true; } } } while ((d = d->prev) != start); - return pcb_false; + return rnd_false; } static int Gather(pcb_vnode_t * start, pcb_pline_t ** result, J_Rule v_rule, DIRECTION initdir) @@ -1510,7 +1510,7 @@ } if (!p) return; - pcb_poly_contour_pre(p, pcb_true); + pcb_poly_contour_pre(p, rnd_true); if (p->Count > 2) { #ifdef DEBUG_GATHER DEBUGP("adding contour with %d vertices and direction %c\n", p->Count, p->Flags.orient ? 'F' : 'B'); @@ -1574,7 +1574,7 @@ *A = tmprev->next; tmprev->next = NULL; PutContour(e, tmprev, contours, holes, owner, NULL, NULL); - return pcb_true; + return rnd_true; } break; case PCB_PBO_XOR: @@ -1585,7 +1585,7 @@ tmprev->next = NULL; pcb_poly_contour_inv(tmprev); PutContour(e, tmprev, contours, holes, owner, NULL, NULL); - return pcb_true; + return rnd_true; } /* break; *//* Fall through (I think this is correct! pcjc2) */ case PCB_PBO_UNITE: @@ -1596,12 +1596,12 @@ *A = tmprev->next; tmprev->next = NULL; PutContour(e, tmprev, contours, holes, owner, parent, parent_contour); - return pcb_true; + return rnd_true; } break; } } - return pcb_false; + return rnd_false; } /* cntr_Collect */ static void M_B_AREA_Collect(jmp_buf * e, rnd_polyarea_t * bfst, rnd_polyarea_t ** contours, pcb_pline_t ** holes, int action) @@ -1773,7 +1773,7 @@ /* Don't look at contours marked as being intersected */ if (check->Flags.status == ISECTED) return PCB_R_DIR_NOT_FOUND; - if (cntr_in_M_pcb_polyarea_t(check, info->want_inside, pcb_false)) { + if (cntr_in_M_pcb_polyarea_t(check, info->want_inside, rnd_false)) { info->result = check; longjmp(info->jb, 1); } @@ -1835,13 +1835,13 @@ && (a->contours->xmax <= box.X2) && (a->contours->ymax <= box.Y2)) && /* Then test properly */ - cntr_in_M_pcb_polyarea_t(a->contours, bpa, pcb_false)) { + cntr_in_M_pcb_polyarea_t(a->contours, bpa, rnd_false)) { /* Delete this contour, all children -> holes queue */ /* Delete the outer contour */ curc = a->contours; - remove_contour(a, NULL, curc, pcb_false); /* Rtree deleted in poly_Free below */ + remove_contour(a, NULL, curc, rnd_false); /* Rtree deleted in poly_Free below */ /* a->contours now points to the remaining holes */ pcb_poly_contour_del(&curc); @@ -1893,7 +1893,7 @@ } /* Remove hole from the contour */ - remove_contour(a, prev, info.result, pcb_true); + remove_contour(a, prev, info.result, rnd_true); pcb_poly_contour_del(&info.result); } /* End check for deleted holes */ @@ -1924,7 +1924,7 @@ next = curc->next; if (del_outside) - del_contour = curc->Flags.status != ISECTED && !cntr_in_M_pcb_polyarea_t(curc, bpa, pcb_false); + del_contour = curc->Flags.status != ISECTED && !cntr_in_M_pcb_polyarea_t(curc, bpa, rnd_false); /* Skip intersected contours */ if (curc->Flags.status == ISECTED) { @@ -2043,16 +2043,16 @@ if (!pcb_poly_valid(b)) return -1; #endif - M_pcb_polyarea_t_intersect(&e, a, b, pcb_false); + M_pcb_polyarea_t_intersect(&e, a, b, rnd_false); - if (M_pcb_polyarea_t_label(a, b, pcb_true)) - return pcb_true; - if (M_pcb_polyarea_t_label(b, a, pcb_true)) - return pcb_true; + if (M_pcb_polyarea_t_label(a, b, rnd_true)) + return rnd_true; + if (M_pcb_polyarea_t_label(b, a, rnd_true)) + return rnd_true; } else if (code == TOUCHES) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* the main clipping routines */ @@ -2111,17 +2111,17 @@ #endif /* intersect needs to make a list of the contours in a and b which are intersected */ - M_pcb_polyarea_t_intersect(&e, a, b, pcb_true); + M_pcb_polyarea_t_intersect(&e, a, b, rnd_true); /* We could speed things up a lot here if we only processed the relevant contours */ /* NB: Relevant parts of a are labeled below */ - M_pcb_polyarea_t_label(b, a, pcb_false); + M_pcb_polyarea_t_label(b, a, rnd_false); *res = a; M_pcb_polyarea_t_update_primary(&e, res, &holes, action, b); M_pcb_polyarea_separate_isected(&e, res, &holes, &a_isected); - M_pcb_polyarea_t_label_separated(a_isected, b, pcb_false); - M_pcb_polyarea_t_Collect_separated(&e, a_isected, res, &holes, action, pcb_false); + M_pcb_polyarea_t_label_separated(a_isected, b, rnd_false); + M_pcb_polyarea_t_Collect_separated(&e, a_isected, res, &holes, action, rnd_false); M_B_AREA_Collect(&e, b, res, &holes, action); pcb_polyarea_free(&b); @@ -2186,12 +2186,12 @@ if (!pcb_poly_valid(b)) return -1; #endif - M_pcb_polyarea_t_intersect(&e, a, b, pcb_true); + M_pcb_polyarea_t_intersect(&e, a, b, rnd_true); - M_pcb_polyarea_t_label(a, b, pcb_false); - M_pcb_polyarea_t_label(b, a, pcb_false); + M_pcb_polyarea_t_label(a, b, rnd_false); + M_pcb_polyarea_t_label(b, a, rnd_false); - M_pcb_polyarea_t_Collect(&e, a, aandb, &holes, PCB_PBO_ISECT, pcb_false); + M_pcb_polyarea_t_Collect(&e, a, aandb, &holes, PCB_PBO_ISECT, rnd_false); pcb_poly_insert_holes(&e, *aandb, &holes); assert(pcb_poly_valid(*aandb)); /* delete holes if any left */ @@ -2202,7 +2202,7 @@ holes = NULL; clear_marks(a); clear_marks(b); - M_pcb_polyarea_t_Collect(&e, a, aminusb, &holes, PCB_PBO_SUB, pcb_false); + M_pcb_polyarea_t_Collect(&e, a, aminusb, &holes, PCB_PBO_SUB, rnd_false); pcb_poly_insert_holes(&e, *aminusb, &holes); pcb_polyarea_free(&a); pcb_polyarea_free(&b); @@ -2261,7 +2261,7 @@ c->head->next = c->head->prev = c->head; c->xmin = c->ymin = RND_COORD_MAX; c->xmax = c->ymax = -RND_COORD_MAX-1; - c->is_round = pcb_false; + c->is_round = rnd_false; c->cx = 0; c->cy = 0; c->radius = 0; @@ -2467,7 +2467,7 @@ *dst = NULL; *dst = pcb_poly_contour_new(src->head->point); if (*dst == NULL) - return pcb_false; + return rnd_false; (*dst)->Count = src->Count; (*dst)->Flags.orient = src->Flags.orient; @@ -2477,12 +2477,12 @@ for (cur = src->head->next; cur != src->head; cur = cur->next) { if ((newnode = pcb_poly_node_create(cur->point)) == NULL) - return pcb_false; + return rnd_false; /* newnode->Flags = cur->Flags; */ pcb_poly_vertex_include((*dst)->head->prev, newnode); } (*dst)->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(*dst); - return pcb_true; + return rnd_true; } /**********************************************************************/ @@ -2494,7 +2494,7 @@ if (src != NULL) *dst = (rnd_polyarea_t *) calloc(1, sizeof(rnd_polyarea_t)); if (*dst == NULL) - return pcb_false; + return rnd_false; (*dst)->contour_tree = pcb_r_create_tree(); return pcb_polyarea_copy1(*dst, src); @@ -2509,11 +2509,11 @@ for (cur = src->contours; cur != NULL; cur = cur->next) { if (!pcb_poly_contour_copy(last, cur)) - return pcb_false; + return rnd_false; pcb_r_insert_entry(dst->contour_tree, (rnd_rnd_box_t *) * last); last = &(*last)->next; } - return pcb_true; + return rnd_true; } void pcb_polyarea_m_include(rnd_polyarea_t ** list, rnd_polyarea_t * a) @@ -2534,14 +2534,14 @@ *dst = NULL; if (src == NULL) - return pcb_false; + return rnd_false; do { if ((di = pcb_polyarea_create()) == NULL || !pcb_polyarea_copy1(di, src)) - return pcb_false; + return rnd_false; pcb_polyarea_m_include(dst, di); } while ((src = src->f) != srcfst); - return pcb_true; + return rnd_true; } rnd_bool pcb_polyarea_contour_include(rnd_polyarea_t * p, pcb_pline_t * c) @@ -2549,15 +2549,15 @@ pcb_pline_t *tmp; if ((c == NULL) || (p == NULL)) - return pcb_false; + return rnd_false; if (c->Flags.orient == PCB_PLF_DIR) { if (p->contours != NULL) - return pcb_false; + return rnd_false; p->contours = c; } else { if (p->contours == NULL) - return pcb_false; + return rnd_false; /* link at front of hole list */ tmp = p->contours->next; p->contours->next = c; @@ -2564,7 +2564,7 @@ c->next = tmp; } pcb_r_insert_entry(p->contour_tree, (rnd_rnd_box_t *) c); - return pcb_true; + return rnd_true; } typedef struct pip { @@ -2618,7 +2618,7 @@ rnd_rnd_box_t ray; if (!cntrbox_pointin(c, p)) - return pcb_false; + return rnd_false; info.f = 0; info.p[0] = ray.X1 = p[0]; info.p[1] = ray.Y1 = p[1]; @@ -2634,15 +2634,15 @@ pcb_pline_t *cur; if ((p == NULL) || (v0 == NULL) || (p->contours == NULL)) - return pcb_false; + return rnd_false; cur = p->contours; if (pcb_poly_contour_inside(cur, v0)) { for (cur = cur->next; cur != NULL; cur = cur->next) if (pcb_poly_contour_inside(cur, v0)) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } - return pcb_false; + return rnd_false; } rnd_bool poly_M_CheckInside(rnd_polyarea_t * p, pcb_vector_t v0) @@ -2650,14 +2650,14 @@ rnd_polyarea_t *cur; if ((p == NULL) || (v0 == NULL)) - return pcb_false; + return rnd_false; cur = p; do { if (pcb_polyarea_contour_inside(cur, v0)) - return pcb_true; + return rnd_true; } while ((cur = cur->f) != p); - return pcb_false; + return rnd_false; } static double dot(pcb_vector_t A, pcb_vector_t B) @@ -2877,12 +2877,12 @@ p_n = pcb_vect_det2(pdir, ndir) >= 0; if ((p_n && p_c && n_c) || ((!p_n) && (p_c || n_c))) - return pcb_true; + return rnd_true; else - return pcb_false; + return rnd_false; } /* inside_sector */ -/* returns pcb_true if bad contour */ +/* returns rnd_true if bad contour */ typedef struct { int marks, lines; #ifndef NDEBUG @@ -2926,7 +2926,7 @@ rnd_vsnprintf(res->msg, sizeof(res->msg), fmt, ap); va_end(ap); #endif - return pcb_true; + return rnd_true; } rnd_bool pcb_polyarea_contour_check_(pcb_pline_t *a, pa_chk_res_t *res) @@ -2969,7 +2969,7 @@ if ((hit1 == NULL) && (hit2 == NULL)) { /* If the intersection didn't land on an end-point of either - * line, we know the lines cross and we return pcb_true. + * line, we know the lines cross and we return rnd_true. */ PA_CHK_LINE(a1->point[0], a1->point[1], a1->next->point[0], a1->next->point[1]); PA_CHK_LINE(a2->point[0], a2->point[1], a2->next->point[0], a2->next->point[1]); @@ -3006,7 +3006,7 @@ while ((a2 = a2->next) != a->head); } while ((a1 = a1->next) != a->head); - return pcb_false; + return rnd_false; } rnd_bool pcb_polyarea_contour_check(pcb_pline_t *a) @@ -3105,7 +3105,7 @@ rnd_fprintf(stderr, "Invalid polyarea: no contours\n"); #endif #endif - return pcb_false; + return rnd_false; } if (p->contours->Flags.orient == PCB_PLF_INV) { @@ -3113,7 +3113,7 @@ rnd_fprintf(stderr, "Invalid Outer pcb_pline_t: failed orient\n"); pcb_poly_valid_report(p->contours, p->contours->head, NULL); #endif - return pcb_false; + return rnd_false; } if (pcb_polyarea_contour_check_(p->contours, &chk)) { @@ -3121,7 +3121,7 @@ rnd_fprintf(stderr, "Invalid Outer pcb_pline_t: failed contour check\n"); pcb_poly_valid_report(p->contours, p->contours->head, &chk); #endif - return pcb_false; + return rnd_false; } for (c = p->contours->next; c != NULL; c = c->next) { @@ -3130,7 +3130,7 @@ rnd_fprintf(stderr, "Invalid Inner: pcb_pline_t orient = %d\n", c->Flags.orient); pcb_poly_valid_report(c, c->head, NULL); #endif - return pcb_false; + return rnd_false; } if (pcb_polyarea_contour_check_(c, &chk)) { #ifndef NDEBUG @@ -3137,7 +3137,7 @@ rnd_fprintf(stderr, "Invalid Inner: failed contour check\n"); pcb_poly_valid_report(c, c->head, &chk); #endif - return pcb_false; + return rnd_false; } if (!pcb_poly_contour_in_contour(p->contours, c)) { #ifndef NDEBUG @@ -3144,10 +3144,10 @@ rnd_fprintf(stderr, "Invalid Inner: overlap with outer\n"); pcb_poly_valid_report(c, c->head, NULL); #endif - return pcb_false; + return rnd_false; } } - return pcb_true; + return rnd_true; } @@ -3395,9 +3395,9 @@ if (pcb_r_search(pl->tree, &lbx, NULL, pline_isect_line_cb, &ctx, NULL) == PCB_R_DIR_CANCEL) { if (cx != NULL) *cx = ctx.cx; if (cy != NULL) *cy = ctx.cy; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* @@ -3486,7 +3486,7 @@ cnt = 0; pcb_r_search(pl->tree, &bx, NULL, pline_embraces_circ_cb, &cnt, NULL); if ((cnt % 2) == 0) - return pcb_false; + return rnd_false; /* ray to the right */ bx.X1 = -RND_COORD_MAX; @@ -3494,9 +3494,9 @@ cnt = 0; pcb_r_search(pl->tree, &bx, NULL, pline_embraces_circ_cb, &cnt, NULL); if ((cnt % 2) == 0) - return pcb_false; + return rnd_false; - return pcb_true; + return rnd_true; } /* @@ -3513,13 +3513,13 @@ /* if there's no overlap in bounding boxes, don't do any expensive calc */ if (!(rnd_box_intersect(&cbx, &pbx))) - return pcb_false; + return rnd_false; if (pl->tree == NULL) pl->tree = (rnd_rtree_t *) pcb_poly_make_edge_tree(pl); if (pcb_pline_isect_circ(pl, cx, cy, r)) - return pcb_true; + return rnd_true; return pcb_pline_embraces_circ(pl, cx, cy, r); } @@ -3529,7 +3529,7 @@ * pcb_is_point_in_convex_quad() * (C) 2017 Tibor 'Igor2' Palinkas */ -pcb_bool_t pcb_is_point_in_convex_quad(pcb_vector_t p, pcb_vector_t *q) +rnd_bool_t pcb_is_point_in_convex_quad(pcb_vector_t p, pcb_vector_t *q) { return point_in_triangle(q[0], q[1], q[2], p) || point_in_triangle(q[0], q[3], q[2], p); } Index: trunk/src/librnd/poly/polygon1_gen.c =================================================================== --- trunk/src/librnd/poly/polygon1_gen.c (revision 31010) +++ trunk/src/librnd/poly/polygon1_gen.c (revision 31011) @@ -62,7 +62,7 @@ rnd_polyarea_t *pcb_poly_from_contour(pcb_pline_t * contour) { rnd_polyarea_t *p; - pcb_poly_contour_pre(contour, pcb_true); + pcb_poly_contour_pre(contour, rnd_true); assert(contour->Flags.orient == PCB_PLF_DIR); if (!(p = pcb_polyarea_create())) return NULL; @@ -74,7 +74,7 @@ rnd_polyarea_t *pcb_poly_from_contour_autoinv(pcb_pline_t *contour) { rnd_polyarea_t *p; - pcb_poly_contour_pre(contour, pcb_true); + pcb_poly_contour_pre(contour, rnd_true); if (contour->Flags.orient != PCB_PLF_DIR) pcb_poly_contour_inv(contour); if (!(p = pcb_polyarea_create())) @@ -310,7 +310,7 @@ if ((contour = pcb_poly_contour_new(v)) == NULL) return NULL; pcb_poly_frac_circle(contour, x, y, v, 1); - contour->is_round = pcb_true; + contour->is_round = rnd_true; contour->cx = x; contour->cy = y; contour->radius = radius; Index: trunk/src/librnd/poly/rtree.c =================================================================== --- trunk/src/librnd/poly/rtree.c (revision 31010) +++ trunk/src/librnd/poly/rtree.c (revision 31011) @@ -84,9 +84,9 @@ void *obj = box; /* assumes first field is the bounding box */ assert(obj != NULL); if (rnd_rtree_delete(rtree, obj, (rnd_rtree_box_t *)box) != 0) - return pcb_false; + return rnd_false; free_data(obj); - return pcb_true; + return rnd_true; } typedef struct { Index: trunk/src/librnd/poly/rtree2_compat.h =================================================================== --- trunk/src/librnd/poly/rtree2_compat.h (revision 31010) +++ trunk/src/librnd/poly/rtree2_compat.h (revision 31011) @@ -61,13 +61,13 @@ rnd_bool pcb_r_delete_entry_free_data(rnd_rtree_t *rtree, rnd_rnd_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 +/* region_in_search should return rnd_true if "what you're looking for" is * within the specified region; - * rectangle_in_region should return pcb_true if the given rectangle is + * rectangle_in_region should return rnd_true if the given rectangle is * "what you're looking for". * The search will find all rectangles matching the criteria given * by region_in_search and rectangle_in_region and return a count of - * how many things rectangle_in_region returned pcb_true for. closure is + * how many things rectangle_in_region returned rnd_true for. closure is * used to abort the search if desired from within rectangle_in_region * Look at the implementation of r_region_is_empty for how to * abort the search if that is the desired behavior. Index: trunk/src/librnd/poly/self_isc.c =================================================================== --- trunk/src/librnd/poly/self_isc.c (revision 31010) +++ trunk/src/librnd/poly/self_isc.c (revision 31011) @@ -144,7 +144,7 @@ v->Flags.in_hub = 1; if (hubs->array != NULL) { - if (hub_find(hubs, v, pcb_true) != NULL) /* already on the list (... by now) */ + if (hub_find(hubs, v, rnd_true) != NULL) /* already on the list (... by now) */ return 0; } @@ -220,11 +220,11 @@ for(vb = va->next->next; vb->next != va; vb = vb->next) { pcb_vector_t i, tmp; if (pcb_vect_inters2(va->point, va->next->point, vb->point, vb->next->point, i, tmp) > 0) - return pcb_true; + return rnd_true; } va = va->next; } while (va != pl->head); - return pcb_false; + return rnd_false; } @@ -314,7 +314,7 @@ for(n = 0; n < pls.used; n++) { pln = (pcb_pline_t *)pls.array[n]; - pcb_poly_contour_pre(pln, pcb_true); + pcb_poly_contour_pre(pln, rnd_true); if (pln->Flags.orient != pl->Flags.orient) pcb_poly_contour_inv(pln); pcb_poly_contour_pre(pln, 0); Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 31010) +++ trunk/src/main.c (revision 31011) @@ -518,7 +518,7 @@ command_line_pcb = ga.hid_argv[0]; if (command_line_pcb) { int how = conf_core.rc.silently_create_on_load ? 0x10 : 0; - if (pcb_load_pcb(command_line_pcb, NULL, pcb_true, how) != 0) { + if (pcb_load_pcb(command_line_pcb, NULL, rnd_true, how) != 0) { if (rnd_main_exporting) { rnd_message(RND_MSG_ERROR, "Can not load file '%s' (specified on command line) for exporting or printing\n", command_line_pcb); rnd_log_print_uninit_errs("Export load error"); Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 31010) +++ trunk/src/move.c (revision 31011) @@ -282,10 +282,10 @@ ctx.move.pcb = PCB; ctx.move.dst_layer = Target; - ctx.move.more_to_come = pcb_true; + ctx.move.more_to_come = rnd_true; - changed = pcb_selected_operation(PCB, PCB->Data, &MoveToLayerFunctions, &ctx, pcb_true, PCB_OBJ_ANY, pcb_false); - /* passing pcb_true to above operation causes Undoserial to auto-increment */ + changed = pcb_selected_operation(PCB, PCB->Data, &MoveToLayerFunctions, &ctx, rnd_true, PCB_OBJ_ANY, rnd_false); + /* passing rnd_true to above operation causes Undoserial to auto-increment */ return changed; } Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 31010) +++ trunk/src/netlist.c (revision 31011) @@ -263,10 +263,10 @@ switch(*netname) { case '_': break; - return pcb_false; + return rnd_false; } } - return pcb_true; + return rnd_true; } static pcb_net_t *pcb_net_alloc_(pcb_board_t *pcb, pcb_netlist_t *nl, const char *netname) @@ -501,7 +501,7 @@ htsp_uninit(&sctx->found); if (sctx->changed) { rnd_gui->invalidate_all(rnd_gui); - conf_core.temp.rat_warn = pcb_true; + conf_core.temp.rat_warn = rnd_true; } } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 31010) +++ trunk/src/obj_arc.c (revision 31011) @@ -263,7 +263,7 @@ pcb_arc_t *pcb_arc_dup(pcb_layer_t *dst, pcb_arc_t *src) { - pcb_arc_t *a = pcb_arc_new(dst, src->X, src->Y, src->Width, src->Height, src->StartAngle, src->Delta, src->Thickness, src->Clearance, src->Flags, pcb_false); + pcb_arc_t *a = pcb_arc_new(dst, src->X, src->Y, src->Width, src->Height, src->StartAngle, src->Delta, src->Thickness, src->Clearance, src->Flags, rnd_false); pcb_arc_copy_meta(a, src); return a; } @@ -270,7 +270,7 @@ 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_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, rnd_false); pcb_arc_copy_meta(a, src); return a; } @@ -443,7 +443,7 @@ layer = &ctx->buffer.dst->Layer[lid]; a = pcb_arc_new(layer, Arc->X, Arc->Y, Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta, - Arc->Thickness, Arc->Clearance, pcb_flag_mask(Arc->Flags, PCB_FLAG_FOUND | ctx->buffer.extraflg), pcb_false); + Arc->Thickness, Arc->Clearance, pcb_flag_mask(Arc->Flags, PCB_FLAG_FOUND | ctx->buffer.extraflg), rnd_false); pcb_arc_copy_meta(a, Arc); if (ctx->buffer.keep_id) pcb_obj_change_id((pcb_any_obj_t *)a, Arc->ID); @@ -614,13 +614,13 @@ pcb_arc_invalidate_erase(Arc); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Arc)) { pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_ARC, Layer, Arc, Arc, pcb_false); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_ARC, Layer, Arc, Arc, rnd_false); } pcb_undo_add_obj_to_flag(Arc); PCB_FLAG_TOGGLE(PCB_FLAG_CLEARLINE, Arc); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Arc)) { pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_ARC, Layer, Arc); - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_ARC, Layer, Arc, Arc, pcb_true); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_ARC, Layer, Arc, Arc, rnd_true); } pcb_arc_invalidate_draw(Layer, Arc); return Arc; @@ -650,7 +650,7 @@ arc = pcb_arc_new(Layer, Arc->X + ctx->copy.DeltaX, Arc->Y + ctx->copy.DeltaY, Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta, Arc->Thickness, Arc->Clearance, - pcb_flag_mask(Arc->Flags, PCB_FLAG_FOUND), pcb_true); + pcb_flag_mask(Arc->Flags, PCB_FLAG_FOUND), rnd_true); if (!arc) return arc; if (ctx->copy.keep_id) @@ -899,9 +899,9 @@ end_ang += 360.0; if ((arc->Delta < 0) || (arc->Delta > 180)) - new_arc = pcb_arc_new(Layer, arc->X, arc->Y, arc->Width, arc->Height, angle, end_ang - angle + 360.0, arc->Thickness, arc->Clearance, arc->Flags, pcb_true); + new_arc = pcb_arc_new(Layer, arc->X, arc->Y, arc->Width, arc->Height, angle, end_ang - angle + 360.0, arc->Thickness, arc->Clearance, arc->Flags, rnd_true); else - new_arc = pcb_arc_new(Layer, arc->X, arc->Y, arc->Width, arc->Height, angle, end_ang - angle, arc->Thickness, arc->Clearance, arc->Flags, pcb_true); + new_arc = pcb_arc_new(Layer, arc->X, arc->Y, arc->Width, arc->Height, angle, end_ang - angle, arc->Thickness, arc->Clearance, arc->Flags, rnd_true); if (new_arc != NULL) { pcb_arc_copy_meta(new_arc, arc); @@ -946,7 +946,7 @@ /*** draw ***/ -static void arc_label_pos(const pcb_arc_t *arc, rnd_coord_t *x0, rnd_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, rnd_bool_t *vert) { double da, ea, la; @@ -964,7 +964,7 @@ void pcb_arc_middle(const pcb_arc_t *arc, rnd_coord_t *x, rnd_coord_t *y) { - pcb_bool_t waste; + rnd_bool_t waste; arc_label_pos(arc, x, y, &waste); } @@ -1020,10 +1020,10 @@ { if (arc->term != NULL) { rnd_coord_t x0, y0; - pcb_bool_t vert; + rnd_bool_t vert; arc_label_pos(arc, &x0, &y0, &vert); - pcb_term_label_invalidate(x0, y0, 100.0, vert, pcb_true, (pcb_any_obj_t *)arc); + pcb_term_label_invalidate(x0, y0, 100.0, vert, rnd_true, (pcb_any_obj_t *)arc); } } @@ -1031,10 +1031,10 @@ { if (arc->term != NULL) { rnd_coord_t x0, y0; - pcb_bool_t vert; + rnd_bool_t vert; arc_label_pos(arc, &x0, &y0, &vert); - pcb_term_label_draw(info, x0, y0, conf_core.appearance.term_label_size, vert, pcb_true, (pcb_any_obj_t *)arc); + pcb_term_label_draw(info, x0, y0, conf_core.appearance.term_label_size, vert, rnd_true, (pcb_any_obj_t *)arc); } if (arc->noexport) { rnd_coord_t cx, cy; Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 31010) +++ trunk/src/obj_common.c (revision 31011) @@ -104,7 +104,7 @@ /* current object ID; incremented after each creation of an object */ long int ID = 1; -rnd_bool pcb_create_being_lenient = pcb_false; +rnd_bool pcb_create_being_lenient = rnd_false; void pcb_create_be_lenient(rnd_bool v) { Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 31010) +++ trunk/src/obj_common.h (revision 31011) @@ -188,8 +188,8 @@ } while(0) \ -/* pcb_true during file loads, for example to allow overlapping vias. - pcb_false otherwise, to stop the user from doing normally dangerous +/* rnd_true during file loads, for example to allow overlapping vias. + rnd_false otherwise, to stop the user from doing normally dangerous things. */ void pcb_create_be_lenient(rnd_bool); extern rnd_bool pcb_create_being_lenient; Index: trunk/src/obj_hash.h =================================================================== --- trunk/src/obj_hash.h (revision 31010) +++ trunk/src/obj_hash.h (revision 31011) @@ -90,8 +90,8 @@ { pcb_hash_tr_coords(tr1, &x1, &y1, x1, y1); pcb_hash_tr_coords(tr2, &x2, &y2, x2, y2); - if (x1 != x2) return pcb_true; - if (y1 != y2) return pcb_true; - return pcb_false; + if (x1 != x2) return rnd_true; + if (y1 != y2) return rnd_true; + return rnd_false; } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 31010) +++ trunk/src/obj_line.c (revision 31011) @@ -576,13 +576,13 @@ return NULL; pcb_line_invalidate_erase(Line); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Line)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_LINE, Layer, Line, Line, pcb_false); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_LINE, Layer, Line, Line, rnd_false); pcb_poly_restore_to_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); } pcb_undo_add_obj_to_flag(Line); PCB_FLAG_TOGGLE(PCB_FLAG_CLEARLINE, Line); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Line)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_LINE, Layer, Line, Line, pcb_true); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_LINE, Layer, Line, Line, rnd_true); pcb_poly_clear_from_poly(ctx->chgsize.pcb->Data, PCB_OBJ_LINE, Layer, Line); } pcb_line_invalidate_draw(Layer, Line); @@ -768,7 +768,7 @@ pcb_pstk_t *ps; TODO("pdstk TODO #21: do not work in comp mode, use a pstk proto - scconfig also has TODO #21, fix it there too") - if ((ps = pcb_pstk_new_compat_via(PCB->Data, -1, i->X, i->Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, 0, PCB_PSTK_COMPAT_ROUND, pcb_true)) != NULL) { + if ((ps = pcb_pstk_new_compat_via(PCB->Data, -1, i->X, i->Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, 0, PCB_PSTK_COMPAT_ROUND, rnd_true)) != NULL) { pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, ps, ps, ps); pcb_pstk_invalidate_draw(ps); } @@ -1148,7 +1148,7 @@ { if (line->term != NULL) { pcb_term_label_invalidate((line->Point1.X + line->Point2.X)/2, (line->Point1.Y + line->Point2.Y)/2, - 100.0, is_line_term_vert(line), pcb_true, (pcb_any_obj_t *)line); + 100.0, is_line_term_vert(line), rnd_true, (pcb_any_obj_t *)line); } } @@ -1156,7 +1156,7 @@ { if (line->term != NULL) pcb_term_label_draw(info, (line->Point1.X + line->Point2.X)/2, (line->Point1.Y + line->Point2.Y)/2, - conf_core.appearance.term_label_size, is_line_term_vert(line), pcb_true, (pcb_any_obj_t *)line); + conf_core.appearance.term_label_size, is_line_term_vert(line), rnd_true, (pcb_any_obj_t *)line); if (line->noexport) pcb_obj_noexport_mark(line, (line->Point1.X+line->Point2.X)/2, (line->Point1.Y+line->Point2.Y)/2); } Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 31010) +++ trunk/src/obj_line_drcenf.c (revision 31011) @@ -148,11 +148,11 @@ /* don't draw outline when ctrl key is pressed */ if (rnd_gui->control_is_pressed(rnd_gui)) { - line->draw = pcb_false; + line->draw = rnd_false; return; } else - line->draw = pcb_true; + line->draw = rnd_true; if (conf_core.editor.all_direction_lines) { line->Point2.X = pcb_crosshair.X; @@ -252,11 +252,11 @@ dx = end->X - line1.Point1.X; if (coord_abs(dx) > coord_abs(dy)) { - x_is_long = pcb_true; + x_is_long = rnd_true; length = coord_abs(dx); } else { - x_is_long = pcb_false; + x_is_long = rnd_false; length = coord_abs(dy); } @@ -264,9 +264,9 @@ comp = PCB->LayerGroups.len + 10; /* this out-of-range group might save a call */ if (pcb_layergrp_flags(PCB, group) & PCB_LYT_BOTTOM) - info.solder = pcb_true; + info.solder = rnd_true; else { - info.solder = pcb_false; + info.solder = rnd_false; pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_SILK, &comp, 1); } temp = length; @@ -291,13 +291,13 @@ f2 = 1.0; s2 = 0.5; last2 = -1; - blocker = pcb_true; + blocker = rnd_true; while (length2 != last2) { if (x_is_long) dy = SGN(dy) * length2; else dx = SGN(dx) * length2; - two_lines = pcb_true; + two_lines = rnd_true; if (coord_abs(dx) > coord_abs(dy) && x_is_long) { line1.Point2.X = line1.Point1.X + (way ? SGN(dx) * coord_abs(dy) : dx - SGN(dx) * coord_abs(dy)); line1.Point2.Y = line1.Point1.Y + (way ? dy : 0); @@ -310,13 +310,13 @@ /* we've changed which axis is long, so only do one line */ line1.Point2.X = line1.Point1.X + dx; line1.Point2.Y = line1.Point1.Y + (way ? SGN(dy) * coord_abs(dx) : 0); - two_lines = pcb_false; + two_lines = rnd_false; } else { /* we've changed which axis is long, so only do one line */ line1.Point2.Y = line1.Point1.Y + dy; line1.Point2.X = line1.Point1.X + (way ? SGN(dx) * coord_abs(dy) : 0); - two_lines = pcb_false; + two_lines = rnd_false; } line2.Point1.X = line1.Point2.X; line2.Point1.Y = line1.Point2.Y; @@ -351,7 +351,7 @@ } PCB_END_LOOP; /* no intersector! */ - blocker = pcb_false; + blocker = rnd_false; f2 += s2; len = (line2.Point2.X - line1.Point1.X); len *= len; @@ -428,9 +428,9 @@ group = pcb_layer_get_group(PCB, PCB_CURRLID(pcb)); comp = PCB->LayerGroups.len + 10; /* this out-of-range group might save a call */ if (pcb_layergrp_flags(PCB, group) & PCB_LYT_BOTTOM) - info.solder = pcb_true; + info.solder = rnd_true; else { - info.solder = pcb_false; + info.solder = rnd_false; pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_SILK, &comp, 1); } @@ -480,9 +480,9 @@ if (conf_core.editor.line_refraction != 0) { /* first try starting straight */ - r1 = pcb_drc_lines(pcb, &start, &rs, NULL, pcb_false, pcb_true); + r1 = pcb_drc_lines(pcb, &start, &rs, NULL, rnd_false, rnd_true); /* then try starting at 45 */ - r2 = pcb_drc_lines(pcb, &start, &r45, NULL, pcb_true, pcb_true); + r2 = pcb_drc_lines(pcb, &start, &r45, NULL, rnd_true, rnd_true); } else { drc_line(&rs); Index: trunk/src/obj_pinvia_therm.c =================================================================== --- trunk/src/obj_pinvia_therm.c (revision 31010) +++ trunk/src/obj_pinvia_therm.c (revision 31011) @@ -111,9 +111,9 @@ /* t is the theoretically required length, but we use twice that * to avoid discretisation errors in our circle approximation. */ - pa = pcb_pa_diag_line(cx, cy, t * 2, w, pcb_true); + pa = pcb_pa_diag_line(cx, cy, t * 2, w, rnd_true); pcb_polyarea_boolean_free(m, pa, &arc, PCB_PBO_SUB); - pa = pcb_pa_diag_line(cx, cy, t * 2, w, pcb_false); + pa = pcb_pa_diag_line(cx, cy, t * 2, w, rnd_false); } pcb_polyarea_boolean_free(arc, pa, &m, PCB_PBO_SUB); return m; Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 31010) +++ trunk/src/obj_poly.c (revision 31011) @@ -234,7 +234,7 @@ /* Is current point last in contour? If so process it. */ if (n == p->PointN - 1) { - pcb_poly_contour_pre(contour, pcb_true); + pcb_poly_contour_pre(contour, rnd_true); if (contour->Count == 0) { pcb_poly_contours_free(&contour); @@ -721,7 +721,7 @@ { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Polygon)) return NULL; - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, Polygon, Polygon, pcb_true); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, Polygon, Polygon, rnd_true); pcb_undo_add_obj_to_flag(Polygon); PCB_FLAG_TOGGLE(PCB_FLAG_CLEARPOLY, Polygon); pcb_poly_init_clip(PCB->Data, Layer, Polygon); @@ -763,7 +763,7 @@ Polygon->HoleIndex[n]++; Polygon->Points[ctx->insert.idx] = save; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); pcb_undo_add_obj_to_insert_point(PCB_OBJ_POLY_POINT, Layer, Polygon, &Polygon->Points[ctx->insert.idx]); pcb_poly_bbox(Polygon); @@ -784,13 +784,13 @@ return NULL; pcb_poly_invalidate_erase(poly); if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, poly)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, poly, poly, pcb_false); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, poly, poly, rnd_false); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_POLY, Layer, poly); } pcb_undo_add_obj_to_flag(poly); PCB_FLAG_TOGGLE(PCB_FLAG_CLEARPOLYPOLY, poly); if (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, poly)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, poly, poly, pcb_true); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_POLY, Layer, poly, poly, rnd_true); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_POLY, Layer, poly); } pcb_poly_invalidate_draw(Layer, poly); @@ -1217,7 +1217,7 @@ { if (poly->term != NULL) { pcb_term_label_invalidate((poly->BoundingBox.X1 + poly->BoundingBox.X2)/2, (poly->BoundingBox.Y1 + poly->BoundingBox.Y2)/2, - 100.0, is_poly_term_vert(poly), pcb_true, (pcb_any_obj_t *)poly); + 100.0, is_poly_term_vert(poly), rnd_true, (pcb_any_obj_t *)poly); } } @@ -1225,7 +1225,7 @@ { if (poly->term != NULL) pcb_term_label_draw(info, (poly->BoundingBox.X1 + poly->BoundingBox.X2)/2, (poly->BoundingBox.Y1 + poly->BoundingBox.Y2)/2, - conf_core.appearance.term_label_size, is_poly_term_vert(poly), pcb_true, (pcb_any_obj_t *)poly); + conf_core.appearance.term_label_size, is_poly_term_vert(poly), rnd_true, (pcb_any_obj_t *)poly); if (poly->noexport) pcb_obj_noexport_mark(poly, (poly->BoundingBox.X1 + poly->BoundingBox.X2)/2, (poly->BoundingBox.Y1 + poly->BoundingBox.Y2)/2); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 31010) +++ trunk/src/obj_pstk.c (revision 31011) @@ -213,13 +213,13 @@ void pcb_pstk_bbox(pcb_pstk_t *ps) { - pcb_pstk_bbox_(&ps->BoundingBox, ps, pcb_false); - pcb_pstk_bbox_(&ps->bbox_naked, ps, pcb_true); + pcb_pstk_bbox_(&ps->BoundingBox, ps, rnd_false); + pcb_pstk_bbox_(&ps->bbox_naked, ps, rnd_true); } void pcb_pstk_copper_bbox(rnd_rnd_box_t *dst, pcb_pstk_t *ps) { - pcb_pstk_bbox_(dst, ps, pcb_true); + pcb_pstk_bbox_(dst, ps, rnd_true); } /* hash */ @@ -782,9 +782,9 @@ proto = pcb_pstk_get_proto(ps); if ((proto != NULL) && (proto->hdia > 0)) offs = proto->hdia/2; - pcb_term_label_draw(info, ps->x + offs, ps->y, conf_core.appearance.term_label_size, vert, pcb_false, (pcb_any_obj_t *)ps); + pcb_term_label_draw(info, ps->x + offs, ps->y, conf_core.appearance.term_label_size, vert, rnd_false, (pcb_any_obj_t *)ps); #endif - pcb_term_label_draw(info, ps->x, ps->y, conf_core.appearance.term_label_size, vert, pcb_true, (pcb_any_obj_t *)ps); + pcb_term_label_draw(info, ps->x, ps->y, conf_core.appearance.term_label_size, vert, rnd_true, (pcb_any_obj_t *)ps); } static rnd_xform_t dummy_xform; @@ -1278,7 +1278,7 @@ pcb_pstk_post(ps); } -unsigned char *pcb_pstk_get_thermal(pcb_pstk_t *ps, unsigned long lid, pcb_bool_t alloc) +unsigned char *pcb_pstk_get_thermal(pcb_pstk_t *ps, unsigned long lid, rnd_bool_t alloc) { if (ps->thermals.used <= lid) { unsigned long oldu = ps->thermals.used; @@ -1517,10 +1517,10 @@ rnd_cardinal_t n; for(n = 0; n < g->len; n++) if (pcb_pstk_shape_at(pcb, padstack, &pcb->Data->Layer[g->lid[n]])) - return pcb_false; + return rnd_false; } PCB_END_LOOP; - return pcb_true; + return rnd_true; } Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 31010) +++ trunk/src/obj_pstk.h (revision 31011) @@ -109,7 +109,7 @@ void pcb_pstk_set_thermal(pcb_pstk_t *ps, unsigned long lid, unsigned char shape, int undoable); -unsigned char *pcb_pstk_get_thermal(pcb_pstk_t *ps, unsigned long lid, pcb_bool_t alloc); +unsigned char *pcb_pstk_get_thermal(pcb_pstk_t *ps, unsigned long lid, rnd_bool_t alloc); pcb_pstk_t *pcb_pstk_by_id(pcb_data_t *base, long int ID); Index: trunk/src/obj_pstk_inlines.h =================================================================== --- trunk/src/obj_pstk_inlines.h (revision 31010) +++ trunk/src/obj_pstk_inlines.h (revision 31011) @@ -182,16 +182,16 @@ /* return whether a given padstack drills a given group (does not consider plating, only drill!) */ -RND_INLINE pcb_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, const pcb_pstk_t *ps, rnd_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) +RND_INLINE rnd_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, const pcb_pstk_t *ps, rnd_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) { rnd_layergrp_id_t top, bot; pcb_bb_type_t res = pcb_pstk_bbspan(pcb, ps, &top, &bot, proto_out); switch(res) { - case PCB_BB_THRU: return pcb_true; + case PCB_BB_THRU: return rnd_true; case PCB_BB_NONE: case PCB_BB_INVALID: return 0; case PCB_BB_BB: return (grp <= bot) && (grp >= top); } - return pcb_false; + return rnd_false; } /* returns the shape the padstack has on the given layer group; Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 31010) +++ trunk/src/obj_pstk_proto.c (revision 31011) @@ -1350,7 +1350,7 @@ proto->tr.array[n].shape[d].layer_mask = mask; proto->tr.array[n].shape[d].comb = comb; if (bloat != 0) - pcb_pstk_shape_grow(proto, n, d, pcb_false, bloat, undoable); + pcb_pstk_shape_grow(proto, n, d, rnd_false, bloat, undoable); } pcb_pstk_proto_update(proto); } Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 31010) +++ trunk/src/obj_rat.c (revision 31011) @@ -133,7 +133,7 @@ rnd_bool pcb_rats_destroy(rnd_bool selected) { pcb_opctx_t ctx; - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; ctx.remove.pcb = PCB; ctx.remove.destroy_target = NULL; @@ -141,7 +141,7 @@ PCB_RAT_LOOP(PCB->Data); { if ((!selected) || PCB_FLAG_TEST(PCB_FLAG_SELECTED, line)) { - changed = pcb_true; + changed = rnd_true; pcb_ratop_remove(&ctx, line); } } @@ -160,8 +160,8 @@ if ((ly == NULL) || (ly->meta.real.grp != gid)) return 0; } - if ((line->Point1.X == x) && (line->Point1.Y == y)) return pcb_true; - if ((line->Point2.X == x) && (line->Point2.Y == y)) return pcb_true; + if ((line->Point1.X == x) && (line->Point1.Y == y)) return rnd_true; + if ((line->Point2.X == x) && (line->Point2.Y == y)) return rnd_true; return pcb_is_point_on_line(x, y, 1, line); } @@ -194,16 +194,16 @@ pcb_layergrp_t *g = pcb_get_layergrp(PCB, gid); pcb_layer_t *ly; if (g == NULL) - return pcb_false; + return rnd_false; ly = pcb_get_layer(data, g->lid[0]); if (ly != NULL) ly = pcb_layer_get_real(ly); if (ly == NULL) - return pcb_false; + return rnd_false; if ((pstk->x == x) && (pstk->y == y)) - return pcb_true; + return rnd_true; return pcb_is_point_in_pstk(x, y, 1, pstk, ly); } @@ -344,8 +344,8 @@ pcb_rat_t *rat; gdl_iterator_t it; ratlist_foreach(&data->Rat, &it, rat) { - pcb_rat_anchor_guess(rat, 0, pcb_true); - pcb_rat_anchor_guess(rat, 1, pcb_true); + pcb_rat_anchor_guess(rat, 0, rnd_true); + pcb_rat_anchor_guess(rat, 1, rnd_true); } } Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 31010) +++ trunk/src/obj_subc.c (revision 31011) @@ -247,16 +247,16 @@ if (sc->aux_layer == NULL) pcb_subc_cache_update(sc); if (sc->aux_layer == NULL) - return pcb_false; + return rnd_false; l = find_aux_line(sc->aux_layer, role); if (l == NULL) - return pcb_false; + return rnd_false; *x = l->Point1.X; *y = l->Point1.Y; - return pcb_true; + return rnd_true; } int pcb_subc_get_origin(pcb_subc_t *sc, rnd_coord_t *x, rnd_coord_t *y) @@ -664,7 +664,7 @@ vtp0_uninit(&mask_pads); vtp0_uninit(&paste_pads); - pcb_subc_create_aux(sc, buffer->X, buffer->Y, 0.0, pcb_false); + pcb_subc_create_aux(sc, buffer->X, buffer->Y, 0.0, rnd_false); /* Add refdes */ if ((conf_core.editor.subc_conv_refdes != NULL) && (*conf_core.editor.subc_conv_refdes != '\0')) { @@ -1027,13 +1027,13 @@ pcb_subc_t *pcb_subc_dup(pcb_board_t *pcb, pcb_data_t *dst, pcb_subc_t *src) { - return pcb_subc_dup_at(pcb, dst, src, 0, 0, pcb_false); + return pcb_subc_dup_at(pcb, dst, src, 0, 0, rnd_false); } void pcb_subc_bbox(pcb_subc_t *sc) { - pcb_data_bbox(&sc->BoundingBox, sc->data, pcb_true); - pcb_data_bbox_naked(&sc->bbox_naked, sc->data, pcb_true); + pcb_data_bbox(&sc->BoundingBox, sc->data, rnd_true); + pcb_data_bbox_naked(&sc->bbox_naked, sc->data, rnd_true); } @@ -1278,7 +1278,7 @@ rnd_bool pcb_selected_subc_change_side(void) { - rnd_bool change = pcb_false; + rnd_bool change = rnd_false; if (PCB->pstk_on) { PCB_SUBC_LOOP(PCB->Data); @@ -1583,7 +1583,7 @@ } if (warn) rnd_message(RND_MSG_WARNING, "There are %ld layers that got lost in the smash because they were on unbound subc layers\nThis normally happens if your subcircuits in buffer refer to layers that do not exist on your board.\n", warn); - return pcb_true; + return rnd_true; } int pcb_subc_rebind(pcb_board_t *pcb, pcb_subc_t *sc) @@ -1908,7 +1908,7 @@ pcb_data_t *data; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, subc)) - return pcb_false; + return rnd_false; pcb_data_clip_inhibit_inc(PCB->Data); @@ -1941,7 +1941,7 @@ pcb_data_clip_inhibit_dec(PCB->Data, 0); - return pcb_true; + return rnd_true; } @@ -1996,10 +1996,10 @@ } if (freq >= 0) { - pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X2, bb->Y1, freq, pcb_true); - pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X1, bb->Y2, freq, pcb_true); - pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X2, bb->Y1, freq, pcb_true); - pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X1, bb->Y2, freq, pcb_true); + pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X2, bb->Y1, freq, rnd_true); + pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X1, bb->Y1, bb->X1, bb->Y2, freq, rnd_true); + pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X2, bb->Y1, freq, rnd_true); + pcb_draw_dashed_line(info, pcb_draw_out.fgGC, bb->X2, bb->Y2, bb->X1, bb->Y2, freq, rnd_true); } return PCB_R_DIR_FOUND_CONTINUE; @@ -2173,7 +2173,7 @@ 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, rnd_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, rnd_bool_t alloc, const char *name, rnd_bool req_name_match) { int n; Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 31010) +++ trunk/src/obj_subc.h (revision 31011) @@ -84,7 +84,7 @@ if recurse is non-zero, descend in subc-in-subc */ 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 */ +/* changes the side of the board a subc is on; returns rnd_true if done */ rnd_bool pcb_subc_change_side(pcb_subc_t *subc, rnd_coord_t yoff); void pcb_subc_rotate(pcb_subc_t *subc, rnd_coord_t cx, rnd_coord_t cy, double cosa, double sina, double angle); @@ -93,7 +93,7 @@ /* High level move (op wrapper; no undo) */ 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 */ +/* changes the side of all selected and visible subcs; returns rnd_true if anything has changed */ rnd_bool pcb_selected_subc_change_side(void); /* Draw a subcircuit for a preview (silk, copper and outline only) */ @@ -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, rnd_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, rnd_bool_t alloc, const char *name, rnd_bool req_name_match); #include pcb_r_dir_t pcb_draw_subc_mark(const rnd_rnd_box_t *b, void *cl); /* low level version, does not do extobj */ @@ -179,7 +179,7 @@ /* 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, 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 +/* Look up an aux point and return rnd_true if found; when found, load x and y with the coords of the point. */ rnd_bool pcb_subc_find_aux_point(pcb_subc_t *sc, const char *role, rnd_coord_t *x, rnd_coord_t *y); Index: trunk/src/obj_subc_parent.h =================================================================== --- trunk/src/obj_subc_parent.h (revision 31010) +++ trunk/src/obj_subc_parent.h (revision 31011) @@ -84,21 +84,21 @@ return 0; } -RND_INLINE pcb_bool_t pcb_obj_is_under(pcb_any_obj_t *obj, pcb_data_t *data) +RND_INLINE rnd_bool_t pcb_obj_is_under(pcb_any_obj_t *obj, pcb_data_t *data) { for(;;) { switch(obj->parent_type) { - case PCB_PARENT_INVALID: return pcb_false; - case PCB_PARENT_BOARD: return pcb_false; - case PCB_PARENT_UI: return pcb_false; /* shouldn't happen */ - case PCB_PARENT_LAYER: if (obj->parent.layer->parent.data == data) return pcb_true; break; - case PCB_PARENT_SUBC: if (obj->parent.subc->data == data) return pcb_true; break; - case PCB_PARENT_DATA: if (obj->parent.data == data) return pcb_true; break; - case PCB_PARENT_NET: if (obj->parent.data == data) return pcb_true; break; + case PCB_PARENT_INVALID: return rnd_false; + case PCB_PARENT_BOARD: return rnd_false; + case PCB_PARENT_UI: return rnd_false; /* shouldn't happen */ + case PCB_PARENT_LAYER: if (obj->parent.layer->parent.data == data) return rnd_true; break; + case PCB_PARENT_SUBC: if (obj->parent.subc->data == data) return rnd_true; break; + case PCB_PARENT_DATA: if (obj->parent.data == data) return rnd_true; break; + case PCB_PARENT_NET: if (obj->parent.data == data) return rnd_true; break; } obj = (pcb_any_obj_t *)pcb_obj_parent_subc(obj); if (obj == NULL) - return pcb_false; + return rnd_false; } } Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 31010) +++ trunk/src/obj_text.c (revision 31011) @@ -308,7 +308,7 @@ 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; + rnd_bool first_time = rnd_true; pcb_poly_t *poly; double sc = (double)Text->Scale / 100.0; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; @@ -351,7 +351,7 @@ if (first_time) { minx = maxx = line->Point1.X; miny = maxy = line->Point1.Y; - first_time = pcb_false; + first_time = rnd_false; } minx = MIN(minx, line->Point1.X - unscaled_radius + tx); @@ -607,13 +607,13 @@ return NULL; pcb_text_invalidate_erase(Layer, Text); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Text)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_TEXT, Layer, Text, Text, pcb_false); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_TEXT, Layer, Text, Text, rnd_false); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } pcb_undo_add_obj_to_flag(Text); PCB_FLAG_TOGGLE(PCB_FLAG_CLEARLINE, Text); if (PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Text)) { - pcb_undo_add_obj_to_clear_poly(PCB_OBJ_TEXT, Layer, Text, Text, pcb_true); + pcb_undo_add_obj_to_clear_poly(PCB_OBJ_TEXT, Layer, Text, Text, rnd_true); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_TEXT, Layer, Text); } pcb_text_invalidate_draw(Layer, Text); @@ -1363,7 +1363,7 @@ { if (text->term != NULL) pcb_term_label_invalidate((text->BoundingBox.X1 + text->BoundingBox.X2)/2, (text->BoundingBox.Y1 + text->BoundingBox.Y2)/2, - 100.0, is_text_term_vert(text), pcb_true, (pcb_any_obj_t *)text); + 100.0, is_text_term_vert(text), rnd_true, (pcb_any_obj_t *)text); } void pcb_text_draw_label(pcb_draw_info_t *info, pcb_text_t *text) @@ -1370,7 +1370,7 @@ { if (text->term != NULL) pcb_term_label_draw(info, (text->BoundingBox.X1 + text->BoundingBox.X2)/2, (text->BoundingBox.Y1 + text->BoundingBox.Y2)/2, - conf_core.appearance.term_label_size, is_text_term_vert(text), pcb_true, (pcb_any_obj_t *)text); + conf_core.appearance.term_label_size, is_text_term_vert(text), rnd_true, (pcb_any_obj_t *)text); if (text->noexport) pcb_obj_noexport_mark(text, (text->BoundingBox.X1 + text->BoundingBox.X2)/2, (text->BoundingBox.Y1 + text->BoundingBox.Y2)/2); } Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 31010) +++ trunk/src/object_act.c (revision 31011) @@ -247,7 +247,7 @@ pcb_undo_inc_serial(); rnd_hid_redraw(pcb); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); return 0; } @@ -330,7 +330,7 @@ if (type == PCB_OBJ_SUBC) rnd_event(RND_ACT_HIDLIB, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_move_obj_and_rubberband(type, ptr1, ptr2, ptr3, nx->c[0], ny->c[0]); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); RND_ACT_IRES(0); return 0; @@ -378,8 +378,8 @@ ly = ptr1; if (((pcb_any_obj_t *)ptr2)->parent_type == PCB_PARENT_LAYER) ly = ((pcb_any_obj_t *)ptr2)->parent.layer; /* might be a bound layer, and ptr1 is a resolved one; we don't want undo to put the object back on the resolved layer instead of the original bound layer */ - if (pcb_move_obj_to_layer(type, ly, ptr2, ptr3, target, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_move_obj_to_layer(type, ly, ptr2, ptr3, target, rnd_false)) + pcb_board_set_changed_flag(rnd_true); } break; } @@ -387,7 +387,7 @@ case F_SelectedObjects: case F_Selected: if (pcb_move_selected_objs_to_layer(PCB_CURRLAYER(pcb))) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; } return 0; @@ -675,8 +675,8 @@ /* Place components onto center of board. */ pcb_crosshair.Y = py; /* flipping side depends on the crosshair unfortunately */ - if (pcb_buffer_copy_to_layout(pcb, px, py, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_buffer_copy_to_layout(pcb, px, py, rnd_false)) + pcb_board_set_changed_flag(rnd_true); } else if (sc && subc_differs(sc, footprint)) { #ifdef DEBUG @@ -726,7 +726,7 @@ op.move.dx = orig_cx; op.move.dy = orig_cy; op.move.dst_layer = NULL; - op.move.more_to_come = pcb_true; + op.move.more_to_come = rnd_true; pcb_subcop_move(&op, psc); */ paste_ok = 1; @@ -736,8 +736,8 @@ if (paste_ok) { if (sc != NULL) pcb_subc_remove(sc); - if (pcb_buffer_copy_to_layout(pcb, orig_cx, orig_cy, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_buffer_copy_to_layout(pcb, orig_cx, orig_cy, rnd_false)) + pcb_board_set_changed_flag(rnd_true); } } @@ -797,7 +797,7 @@ { pcb_board_t *pcb = PCB_ACT_BOARD; int op; - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, RipUp, op = fgw_keyword(&argv[1])); @@ -807,7 +807,7 @@ { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, line) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) { pcb_remove_object(PCB_OBJ_LINE, layer, line, line); - changed = pcb_true; + changed = rnd_true; } } PCB_ENDALL_LOOP; @@ -815,7 +815,7 @@ { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, arc) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, arc)) { pcb_remove_object(PCB_OBJ_ARC, layer, arc, arc); - changed = pcb_true; + changed = rnd_true; } } PCB_ENDALL_LOOP; @@ -824,7 +824,7 @@ { if (PCB_FLAG_TEST(PCB_FLAG_AUTO, padstack) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, padstack)) { pcb_remove_object(PCB_OBJ_PSTK, padstack, padstack, padstack); - changed = pcb_true; + changed = rnd_true; } } PCB_END_LOOP; @@ -831,7 +831,7 @@ if (changed) { pcb_undo_inc_serial(); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } break; case F_Selected: @@ -840,7 +840,7 @@ if (PCB_FLAGS_TEST(PCB_FLAG_AUTO | PCB_FLAG_SELECTED, line) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) { pcb_remove_object(PCB_OBJ_LINE, layer, line, line); - changed = pcb_true; + changed = rnd_true; } } PCB_ENDALL_LOOP; @@ -850,13 +850,13 @@ if (PCB_FLAGS_TEST(PCB_FLAG_AUTO | PCB_FLAG_SELECTED, padstack) && !PCB_FLAG_TEST(PCB_FLAG_LOCK, padstack)) { pcb_remove_object(PCB_OBJ_PSTK, padstack, padstack, padstack); - changed = pcb_true; + changed = rnd_true; } } PCB_END_LOOP; if (changed) { pcb_undo_inc_serial(); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } break; } Index: trunk/src/operation.c =================================================================== --- trunk/src/operation.c (revision 31010) +++ trunk/src/operation.c (revision 31011) @@ -122,11 +122,11 @@ * performs several operations on selected objects which are also visible * The lowlevel procedures are passed together with additional information * resets the selected flag if requested - * returns pcb_true if anything has changed + * returns rnd_true if anything has changed */ 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) { - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; pcb_any_obj_t *exto; if (!(pcb_brave & PCB_BRAVE_NOCLIPBATCH) && (data != NULL)) @@ -154,7 +154,7 @@ F->Line(ctx, layer, line); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)line, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_ENDALL_LOOP; } @@ -180,7 +180,7 @@ F->Arc(ctx, layer, arc); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)arc, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_ENDALL_LOOP; } @@ -206,7 +206,7 @@ F->Text(ctx, layer, text); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)text, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_ENDALL_LOOP; } @@ -232,7 +232,7 @@ F->Polygon(ctx, layer, polygon); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)polygon, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_ENDALL_LOOP; } @@ -258,7 +258,7 @@ F->Gfx(ctx, layer, gfx); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)gfx, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_ENDALL_LOOP; } @@ -282,11 +282,11 @@ F->subc(ctx, subc); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)subc, NULL); - changed = pcb_true; + changed = rnd_true; } else if ((pcb->loose_subc) || (type & PCB_OBJ_SUBC_PART) || (subc->extobj != NULL)) { if (pcb_selected_operation(pcb, subc->data, F, ctx, Reset, type, on_locked_too)) - changed = pcb_true; + changed = rnd_true; } } PCB_END_LOOP; @@ -313,7 +313,7 @@ F->padstack(ctx, padstack); if (exto != NULL) pcb_extobj_float_geo(exto); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)padstack, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_END_LOOP; } @@ -334,7 +334,7 @@ if (F->common_pre(ctx, (pcb_any_obj_t *)line, NULL) == 1) continue; F->Rat(ctx, line); if (F->common_post != NULL) F->common_post(ctx, (pcb_any_obj_t *)line, NULL); - changed = pcb_true; + changed = rnd_true; } PCB_END_LOOP; } Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 31010) +++ trunk/src/plug_io.c (revision 31011) @@ -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 rnd_bool pcb_io_incompat_lst_enable = pcb_false; +static rnd_bool pcb_io_incompat_lst_enable = rnd_false; void pcb_plug_io_err(rnd_hidlib_t *hidlib, int res, const char *what, const char *filename) { @@ -510,13 +510,13 @@ } /* load PCB: parse the file with enabled 'PCB mode' (see parser); if - successful, update some other stuff. If revert is pcb_true, we pass + successful, update some other stuff. If revert is rnd_true, we pass "revert" as a parameter to the pcb changed event. */ 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; - pcb_board_t *newPCB = pcb_board_new_(pcb_false); + pcb_board_t *newPCB = pcb_board_new_(rnd_false); pcb_board_t *oldPCB; rnd_conf_role_t settings_dest; #ifdef DEBUG @@ -526,13 +526,13 @@ start = clock(); #endif - rnd_path_resolve(&PCB->hidlib, Filename, &new_filename, 0, pcb_false); + rnd_path_resolve(&PCB->hidlib, Filename, &new_filename, 0, rnd_false); oldPCB = PCB; PCB = newPCB; /* mark the default font invalid to know if the file has one */ - newPCB->fontkit.valid = pcb_false; + newPCB->fontkit.valid = rnd_false; switch(how & 0x0F) { case 0: settings_dest = RND_CFR_DESIGN; break; @@ -563,7 +563,7 @@ if (!PCB->fontkit.valid) { if ((require_font) && (!PCB->is_footprint)) rnd_message(RND_MSG_WARNING, "File '%s' has no font information, using default font\n", new_filename); - PCB->fontkit.valid = pcb_true; + PCB->fontkit.valid = rnd_true; } /* footprint edition: let the user directly manipulate subc parts */ @@ -570,7 +570,7 @@ PCB->loose_subc = PCB->is_footprint; /* clear 'changed flag' */ - pcb_board_set_changed_flag(pcb_false); + pcb_board_set_changed_flag(rnd_false); PCB->hidlib.filename = new_filename; /* just in case a bad file saved file is loaded */ @@ -605,7 +605,7 @@ rnd_message(RND_MSG_INFO, "Loading file %s took %f seconds of CPU time\n", new_filename, elapsed); #endif - conf_core.temp.rat_warn = pcb_true; /* make sure the first click can remove warnings */ + conf_core.temp.rat_warn = rnd_true; /* make sure the first click can remove warnings */ pcb_tool_select_by_name(&PCB->hidlib, "arrow"); return 0; @@ -615,7 +615,7 @@ PCB = oldPCB; if (PCB == NULL) { /* bozo: we are trying to revert back to a non-existing pcb... create one to avoid a segfault */ - PCB = pcb_board_new_(pcb_false); + PCB = pcb_board_new_(rnd_false); if (PCB == NULL) { rnd_message(RND_MSG_ERROR, "FATAL: can't create a new empty pcb!"); exit(1); @@ -653,7 +653,7 @@ const char *save_cmd; if (RND_EMPTY_STRING_P(conf_core.rc.save_command)) - return pcb_write_pcb_file(Filename, thePcb, fmt, pcb_false, subc_only, subc_idx, askovr); + return pcb_write_pcb_file(Filename, thePcb, fmt, rnd_false, subc_only, subc_idx, askovr); save_cmd = conf_core.rc.save_command; /* setup commandline */ @@ -675,7 +675,7 @@ return (-1); } - result = pcb_write_file(fp, thePcb, NULL, NULL, fmt, pcb_false, subc_only, subc_idx); + result = pcb_write_file(fp, thePcb, NULL, NULL, fmt, rnd_false, subc_only, subc_idx); return (pcb_pclose(fp) ? (-1) : result); } @@ -692,7 +692,7 @@ if (conf_core.editor.show_solder_side) pcb_buffers_flip_side(PCB); - result = pcb_write_pipe(Filename, pcb_false, fmt, pcb_true, subc_idx, 1); + result = pcb_write_pipe(Filename, rnd_false, fmt, rnd_true, subc_idx, 1); if (conf_core.editor.show_solder_side) pcb_buffers_flip_side(PCB); return result; @@ -700,7 +700,7 @@ int pcb_save_buffer(const char *Filename, const char *fmt) { - return pcb_write_pipe(Filename, pcb_false, fmt, pcb_false, -1, 1); + return pcb_write_pipe(Filename, rnd_false, fmt, rnd_false, -1, 1); } int pcb_save_pcb(const char *file, const char *fmt) @@ -707,13 +707,13 @@ { int retcode; - pcb_io_incompat_lst_enable = pcb_true; + pcb_io_incompat_lst_enable = rnd_true; if (conf_core.editor.io_incomp_popup) pcb_view_list_free_fields(&pcb_io_incompat_lst); - retcode = pcb_write_pipe(file, pcb_true, fmt, pcb_false, -1, 0); + retcode = pcb_write_pipe(file, rnd_true, fmt, rnd_false, -1, 0); - pcb_io_incompat_lst_enable = pcb_false; + pcb_io_incompat_lst_enable = rnd_false; if (conf_core.editor.io_incomp_popup) { long int len = pcb_view_list_length(&pcb_io_incompat_lst); if (len > 0) { @@ -727,7 +727,7 @@ 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); + int res = real_load_pcb(file, fmt, rnd_false, require_font, how); if (res == 0) { rnd_file_loaded_set_at("design", "main", file, PCB->is_footprint ? "footprint" : "board"); if (PCB->is_footprint) { @@ -747,7 +747,7 @@ int pcb_revert_pcb(void) { - return real_load_pcb(PCB->hidlib.filename, NULL, pcb_true, pcb_true, 0); + return real_load_pcb(PCB->hidlib.filename, NULL, rnd_true, rnd_true, 0); } int pcb_load_buffer(rnd_hidlib_t *hidlib, pcb_buffer_t *buff, const char *fn, const char *fmt) @@ -816,17 +816,17 @@ const char *fmt = conf_core.rc.emergency_format == NULL ? DEFAULT_EMERGENCY_FMT : conf_core.rc.emergency_format; sprintf(filename, conf_core.rc.emergency_name, (long int)rnd_getpid()); rnd_message(RND_MSG_INFO, "Trying to save your layout in '%s'\n", filename); - pcb_write_pcb_file(filename, pcb_true, fmt, pcb_true, pcb_false, -1, 0); + pcb_write_pcb_file(filename, rnd_true, fmt, rnd_true, rnd_false, -1, 0); } } /* front-end for pcb_save_in_tmp() to makes sure it is only called once */ -static rnd_bool dont_save_any_more = pcb_false; +static rnd_bool dont_save_any_more = rnd_false; void pcb_emergency_save(void) { if (!dont_save_any_more) { - dont_save_any_more = pcb_true; + dont_save_any_more = rnd_true; pcb_save_in_tmp(); } } @@ -833,7 +833,7 @@ void pcb_disable_emergency_save(void) { - dont_save_any_more = pcb_true; + dont_save_any_more = rnd_true; } /*** Autosave ***/ @@ -887,7 +887,7 @@ fmt = conf_core.rc.backup_format; orig = PCB->Data->loader; - pcb_write_pcb_file(filename, pcb_true, fmt, pcb_true, pcb_false, -1, 0); + pcb_write_pcb_file(filename, rnd_true, fmt, rnd_true, rnd_false, -1, 0); PCB->Data->loader = orig; free(filename); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 31010) +++ trunk/src/polygon.c (revision 31011) @@ -230,7 +230,7 @@ pcb_vector_t v; int hole = 0; - *need_full = pcb_false; + *need_full = rnd_false; np1 = np = pcb_polyarea_create(); if (np == NULL) @@ -253,7 +253,7 @@ /* Is current point last in contour? If so process it. */ if (n == p->PointN - 1 || (hole < p->HoleIndexN && n == p->HoleIndex[hole] - 1)) { - pcb_poly_contour_pre(contour, pcb_true); + pcb_poly_contour_pre(contour, rnd_true); /* make sure it is a positive contour (outer) or negative (hole) */ if (contour->Flags.orient != (hole ? PCB_PLF_INV : PCB_PLF_DIR)) @@ -269,7 +269,7 @@ rnd_cardinal_t cnt = pcb_polyarea_split_selfint(np); rnd_message(RND_MSG_ERROR, "Had to split up self-intersecting polygon into %ld parts\n", (long)cnt); if (cnt > 1) - *need_full = pcb_true; + *need_full = rnd_true; assert(pcb_poly_valid(np)); } #else @@ -362,7 +362,7 @@ if (np == 0) return 0; - return Subtract(np, p, pcb_true); + return Subtract(np, p, rnd_true); } /* return the clearance polygon for a line */ @@ -381,7 +381,7 @@ return 0; if (!(np = line_clearance_poly(-1, NULL, line))) return -1; - return Subtract(np, p, pcb_true); + return Subtract(np, p, rnd_true); } static int SubtractArc(pcb_arc_t * arc, pcb_poly_t * p) @@ -392,7 +392,7 @@ return 0; if (!(np = pcb_poly_from_pcb_arc(arc, arc->Thickness + arc->Clearance))) return -1; - return Subtract(np, p, pcb_true); + return Subtract(np, p, rnd_true); } typedef struct { @@ -421,7 +421,7 @@ } if (np != NULL) { - Subtract(np, ctx->poly, pcb_true); + Subtract(np, ctx->poly, rnd_true); ctx->poly->NoHolesValid = 0; } } @@ -440,7 +440,7 @@ rnd_polyarea_t *np; if (!(np = RoundRect(b->X1 + conf_core.design.bloat, b->X2 - conf_core.design.bloat, b->Y1 + conf_core.design.bloat, b->Y2 - conf_core.design.bloat, conf_core.design.bloat))) return -1; - return Subtract(np, p, pcb_true); + return Subtract(np, p, rnd_true); } /* new method: detailed clearance */ @@ -465,7 +465,7 @@ { if (info->accumulate == NULL) return; - Subtract(info->accumulate, polygon, pcb_true); + Subtract(info->accumulate, polygon, rnd_true); info->accumulate = NULL; info->batch_size = 0; } @@ -652,7 +652,7 @@ if (pa == NULL) return -1; - Subtract(pa, frompoly, pcb_true); + Subtract(pa, frompoly, rnd_true); frompoly->NoHolesValid = 0; return 0; } @@ -924,7 +924,7 @@ return 1; } -static rnd_bool inhibit = pcb_false; +static rnd_bool inhibit = rnd_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) { @@ -1012,7 +1012,7 @@ /* -------------------------------------------------------------------------- * remove redundant polygon points. Any point that lies on the straight * line between the points on either side of it is redundant. - * returns pcb_true if any points are removed + * returns rnd_true if any points are removed */ rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *Layer, pcb_poly_t *Polygon) { @@ -1019,10 +1019,10 @@ rnd_point_t *p; rnd_cardinal_t n, prev, next; pcb_line_t line; - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; if (pcb_undoing()) - return pcb_false; + return rnd_false; for (n = 0; n < Polygon->PointN; n++) { prev = pcb_poly_contour_prev_point(Polygon, n); @@ -1034,7 +1034,7 @@ line.Thickness = 0; if (pcb_is_point_on_line(p->X, p->Y, 0.0, &line)) { pcb_remove_object(PCB_OBJ_POLY_POINT, Layer, Polygon, p); - changed = pcb_true; + changed = rnd_true; } } return changed; @@ -1178,7 +1178,7 @@ */ void pcb_polygon_copy_attached_to_layer(void) { - pcb_layer_t *layer = pcb_loose_subc_layer(PCB, PCB_CURRLAYER(PCB), pcb_true); + pcb_layer_t *layer = pcb_loose_subc_layer(PCB, PCB_CURRLAYER(PCB), rnd_true); pcb_poly_t *polygon; int saveID; @@ -1200,7 +1200,7 @@ pcb_poly_init_clip(PCB->Data, layer, polygon); pcb_poly_invalidate_draw(layer, polygon); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); /* reset state of attached line */ pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; @@ -1509,7 +1509,7 @@ v[0] = X; v[1] = Y; if (pcb_polyarea_contour_inside(p->Clipped, v)) - return pcb_true; + return rnd_true; if (PCB_FLAG_TEST(PCB_FLAG_FULLPOLY, p)) { pcb_poly_t tmp = *p; @@ -1517,14 +1517,14 @@ /* Check all clipped-away regions that are now drawn because of full-poly */ for (tmp.Clipped = p->Clipped->f; tmp.Clipped != p->Clipped; tmp.Clipped = tmp.Clipped->f) if (pcb_polyarea_contour_inside(tmp.Clipped, v)) - return pcb_true; + return rnd_true; } if (r < 1) - return pcb_false; + return rnd_false; if (!(c = pcb_poly_from_circle(X, Y, r))) - return pcb_false; - return pcb_poly_isects_poly(c, p, pcb_true); + return rnd_false; + return pcb_poly_isects_poly(c, p, rnd_true); } @@ -1540,8 +1540,8 @@ { rnd_polyarea_t *s; if (!(s = pcb_poly_from_rect(min(X1, X2), max(X1, X2), min(Y1, Y2), max(Y1, Y2)))) - return pcb_false; - return pcb_poly_isects_poly(s, p, pcb_true); + return rnd_false; + return pcb_poly_isects_poly(s, p, rnd_true); } void pcb_poly_no_holes_dicer(pcb_poly_t *p, const rnd_rnd_box_t *clip, void (*emit)(pcb_pline_t *, void *), void *user_data) @@ -1562,13 +1562,13 @@ rnd_bool pcb_poly_morph(pcb_layer_t *layer, pcb_poly_t *poly) { rnd_polyarea_t *p, *start; - rnd_bool many = pcb_false; + rnd_bool many = rnd_false; pcb_flag_t flags; if (!poly->Clipped || PCB_FLAG_TEST(PCB_FLAG_LOCK, poly)) - return pcb_false; + return rnd_false; if (poly->Clipped->f == poly->Clipped) - return pcb_false; + return rnd_false; pcb_poly_invalidate_erase(poly); start = p = poly->Clipped; /* This is ugly. The creation of the new polygons can cause @@ -1585,7 +1585,7 @@ poly->NoHoles = NULL; flags = poly->Flags; pcb_poly_remove(layer, poly); - inhibit = pcb_true; + inhibit = rnd_true; do { pcb_vnode_t *v; pcb_poly_t *newone; @@ -1593,8 +1593,8 @@ if (p->contours->area > conf_core.design.poly_isle_area) { newone = pcb_poly_new(layer, poly->Clearance, flags); if (!newone) - return pcb_false; - many = pcb_true; + return rnd_false; + many = rnd_true; v = p->contours->head; pcb_poly_point_new(newone, v->point[0], v->point[1]); for (v = v->next; v != p->contours->head; v = v->next) @@ -1619,7 +1619,7 @@ } } while (p != start); - inhibit = pcb_false; + inhibit = rnd_false; pcb_undo_inc_serial(); return many; } @@ -1688,12 +1688,12 @@ Polygon = pcb_poly_new(Layer, 2 * conf_core.design.clearance, Flags); pline = pa->contours; - outer = pcb_true; + outer = rnd_true; do { if (!outer) pcb_poly_hole_new(Polygon); - outer = pcb_false; + outer = rnd_false; node = pline->head; do { @@ -1716,7 +1716,7 @@ } while ((pa = pa->f) != Input); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } rnd_bool pcb_pline_is_rectangle(pcb_pline_t *pl) @@ -1735,11 +1735,11 @@ } while((n < 4) && (v != pl->head->next)); if (n != 4) - return pcb_false; + return rnd_false; if (sqr(x[0] - x[2]) + sqr(y[0] - y[2]) == sqr(x[1] - x[3]) + sqr(y[1] - y[3])) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 31010) +++ trunk/src/polygon.h (revision 31011) @@ -89,7 +89,7 @@ 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); +rnd_bool_t pcb_is_point_in_convex_quad(pcb_vector_t p, pcb_vector_t *q); 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(rnd_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); Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 31010) +++ trunk/src/polygon_act.c (revision 31011) @@ -99,7 +99,7 @@ RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, Polygon, op = fgw_keyword(&argv[1])); if ((argc > 1) && ((rnd_conf.editor.mode == pcb_crosshair.tool_poly) || (rnd_conf.editor.mode == pcb_crosshair.tool_poly_hole))) { - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); switch(op) { /* close open polygon if possible */ case F_Close: @@ -116,7 +116,7 @@ pcb_polygon_go_to_prev_point(); break; } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); } RND_ACT_IRES(0); return 0; Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 31010) +++ trunk/src/rats_act.c (revision 31011) @@ -68,12 +68,12 @@ switch (op) { case F_AllRats: if (pcb_net_add_all_rats(PCB, PCB_RATACC_PRECISE | PCB_RATACC_INFO) > 0) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedRats: case F_Selected: if (pcb_net_add_all_rats(PCB, PCB_RATACC_PRECISE | PCB_RATACC_INFO | PCB_RATACC_ONLY_SELECTED) > 0) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); break; case F_Close: small = RND_SQUARE(RND_MAX_COORD); @@ -178,13 +178,13 @@ } switch(op) { case F_AllRats: - if (pcb_rats_destroy(pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_rats_destroy(rnd_false)) + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedRats: case F_Selected: - if (pcb_rats_destroy(pcb_true)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_rats_destroy(rnd_true)) + pcb_board_set_changed_flag(rnd_true); break; default: Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 31010) +++ trunk/src/rats_patch.c (revision 31011) @@ -524,7 +524,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_SELECTED, subc) || (subc->refdes == NULL)) continue; - placed = pcb_subc_replace(PCB, subc, news, pcb_true, dumb); + placed = pcb_subc_replace(PCB, subc, news, rnd_true, dumb); if (placed != NULL) { if (!dumb) pcb_ratspatch_append_optimize(PCB, RATP_CHANGE_ATTRIB, placed->refdes, "footprint", fpname); @@ -534,7 +534,7 @@ PCB_END_LOOP; break; case F_Object: - placed = pcb_subc_replace(PCB, olds, news, pcb_true, dumb); + placed = pcb_subc_replace(PCB, olds, news, rnd_true, dumb); if (placed != NULL) { if (!dumb) pcb_ratspatch_append_optimize(PCB, RATP_CHANGE_ATTRIB, placed->refdes, "footprint", fpname); Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 31010) +++ trunk/src/remove.c (revision 31011) @@ -88,7 +88,7 @@ /* ---------------------------------------------------------------------- * removes all selected and visible objects - * returns pcb_true if any objects have been removed + * returns rnd_true if any objects have been removed */ rnd_bool pcb_remove_selected(rnd_bool locked_too) { @@ -97,12 +97,12 @@ ctx.remove.pcb = PCB; ctx.remove.destroy_target = NULL; - if (pcb_selected_operation(PCB, PCB->Data, &pcb_RemoveFunctions, &ctx, pcb_false, PCB_OBJ_ANY & (~PCB_OBJ_SUBC_PART), locked_too)) { + if (pcb_selected_operation(PCB, PCB->Data, &pcb_RemoveFunctions, &ctx, rnd_false, PCB_OBJ_ANY & (~PCB_OBJ_SUBC_PART), locked_too)) { pcb_undo_inc_serial(); pcb_draw(); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- Index: trunk/src/remove_act.c =================================================================== --- trunk/src/remove_act.c (revision 31010) +++ trunk/src/remove_act.c (revision 31011) @@ -52,7 +52,7 @@ RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, Delete, id = fgw_keyword(&argv[1])); if (id == -1) { /* no arg */ - if (pcb_remove_selected(pcb_false) == pcb_false) + if (pcb_remove_selected(rnd_false) == rnd_false) id = F_Object; } @@ -81,15 +81,15 @@ } break; case F_Selected: - pcb_remove_selected(pcb_false); + pcb_remove_selected(rnd_false); break; case F_AllRats: - if (pcb_rats_destroy(pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_rats_destroy(rnd_false)) + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedRats: - if (pcb_rats_destroy(pcb_true)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_rats_destroy(rnd_true)) + pcb_board_set_changed_flag(rnd_true); break; } @@ -101,8 +101,8 @@ static const char pcb_acth_RemoveSelected[] = "Removes any selected objects."; static fgw_error_t pcb_act_RemoveSelected(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - if (pcb_remove_selected(pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_remove_selected(rnd_false)) + pcb_board_set_changed_flag(rnd_true); RND_ACT_IRES(0); return 0; } Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 31010) +++ trunk/src/rotate.c (revision 31011) @@ -164,7 +164,7 @@ if (type == PCB_OBJ_SUBC) rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_obj_rotate90(pcb, obj, X, Y, Steps); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } @@ -184,6 +184,6 @@ if (type == PCB_OBJ_SUBC) rnd_event(&pcb->hidlib, PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", type, ptr1, ptr2, ptr3); pcb_obj_rotate(PCB, obj, X, Y, angle); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 31010) +++ trunk/src/route.c (revision 31011) @@ -338,7 +338,7 @@ /* Refraction is non-zero so add multiple lines (horizontal, vertical and/or 45 degrees). */ rnd_coord_t dx, dy; rnd_point_t target; - rnd_bool way = (conf_core.editor.line_refraction == 1 ? pcb_false : pcb_true); + rnd_bool way = (conf_core.editor.line_refraction == 1 ? rnd_false : rnd_true); /* swap the 'way' if mod1 is set (typically the shift key) */ if (mod1) @@ -434,7 +434,7 @@ return apply_to->parent.layer; } } - return pcb_loose_subc_layer(PCB, pcb_get_layer(PCB->Data, p_obj->layer), pcb_true); + return pcb_loose_subc_layer(PCB, pcb_get_layer(PCB->Data, p_obj->layer), rnd_true); } int pcb_route_apply_to_line(const pcb_route_t *p_route, pcb_layer_t *apply_to_line_layer, pcb_line_t *apply_to_line) @@ -521,7 +521,7 @@ p_obj->delta_angle, p_route->thickness, p_route->clearance, - p_route->flags, pcb_true); + p_route->flags, rnd_true); if (arc) { pcb_added_lines++; pcb_obj_add_attribs((pcb_any_obj_t *)arc, PCB->pen_attr, NULL); @@ -633,7 +633,7 @@ p_obj->delta_angle, p_route->thickness, p_route->clearance, - p_route->flags, pcb_true); + p_route->flags, rnd_true); if (arc) { pcb_added_lines++; pcb_obj_add_attribs((pcb_any_obj_t *)arc, PCB->pen_attr, NULL); Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 31010) +++ trunk/src/search.c (revision 31011) @@ -125,7 +125,7 @@ /* search only if via-layer is visible */ if (!PCB->pstk_on) - return pcb_false; + return rnd_false; info.ptr1 = (void **)ps; info.ptr2 = (void **)Dummy1; @@ -136,8 +136,8 @@ info.on_lyt = on_lyt; if (pcb_r_search(PCB->Data->padstack_tree, &SearchBox, NULL, padstack_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -179,9 +179,9 @@ *Layer = SearchLayer; if (pcb_r_search(SearchLayer->line_tree, &SearchBox, NULL, line_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } static pcb_r_dir_t rat_callback(const rnd_rnd_box_t * box, void *cl) @@ -214,8 +214,8 @@ info.req_flag = req_flag; if (pcb_r_search(PCB->Data->rat_tree, &SearchBox, NULL, rat_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -254,8 +254,8 @@ *Layer = SearchLayer; if (pcb_r_search(SearchLayer->arc_tree, &SearchBox, NULL, arc_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -292,8 +292,8 @@ *Layer = SearchLayer; if (pcb_r_search(SearchLayer->gfx_tree, &SearchBox, NULL, gfx_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } static pcb_r_dir_t text_callback(const rnd_rnd_box_t * box, void *cl) @@ -324,8 +324,8 @@ info.req_flag = req_flag; if (pcb_r_search(SearchLayer->text_tree, &SearchBox, NULL, text_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } static pcb_r_dir_t polygon_callback(const rnd_rnd_box_t * box, void *cl) @@ -360,8 +360,8 @@ info.req_flag = req_flag; if (pcb_r_search(SearchLayer->polygon_tree, &SearchBox, NULL, polygon_callback, &info, NULL) != PCB_R_DIR_NOT_FOUND) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } static pcb_r_dir_t linepoint_callback(const rnd_rnd_box_t * b, void *cl) @@ -439,8 +439,8 @@ info.req_flag = req_flag; if (pcb_r_search(SearchLayer->line_tree, &SearchBox, NULL, linepoint_callback, &info, NULL)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -458,8 +458,8 @@ info.req_flag = req_flag; if (pcb_r_search(SearchLayer->arc_tree, &SearchBox, NULL, arcpoint_callback, &info, NULL)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -501,7 +501,7 @@ ctx->least = d; *ctx->Polygon = polygon; *ctx->Point = point; - ctx->found = pcb_true; + ctx->found = rnd_true; } } PCB_END_LOOP; @@ -517,14 +517,14 @@ ctx.Type = Type; ctx.Polygon = Polygon; ctx.Point = Point; - ctx.found = pcb_false;; + ctx.found = rnd_false;; ctx.least = SearchRadius + RND_MAX_POLYGON_POINT_DISTANCE; ctx.least = ctx.least * ctx.least; pcb_r_search(SearchLayer->polygon_tree, &SearchBox, NULL, polypoint_callback, &ctx, NULL); if (ctx.found) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } @@ -579,8 +579,8 @@ info.req_flag = req_flag; if (pcb_r_search(PCB->Data->subc_tree, &SearchBox, NULL, subc_callback, &info, NULL)) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } /* find the first floater on any layer */ @@ -623,11 +623,11 @@ *out_subc = subc; *out_txt = txt; *dummy = txt; - return pcb_true; + return rnd_true; } } - return pcb_false; + return rnd_false; } /* for checking if a rat-line end is on a PV */ @@ -634,8 +634,8 @@ 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; - return pcb_false; + return rnd_true; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -720,15 +720,15 @@ const rnd_coord_t cross = ((X-X1) * ly) - ((Y-Y1) * lx); if(cross != 0) - return pcb_false; + return rnd_false; /* If the point does lie on the line then we do a simple check to see if the point is * between the end points. Use the longest side of the line to perform the check. */ if(abs(lx) > abs(ly)) - return (X >= MIN(X1,X2)) && (X <= MAX(X1,X2)) ? pcb_true : pcb_false; + return (X >= MIN(X1,X2)) && (X <= MAX(X1,X2)) ? rnd_true : rnd_false; - return (Y >= MIN(Y1,Y2)) && (Y <= MAX(Y1,Y2)) ? pcb_true : pcb_false; + return (Y >= MIN(Y1,Y2)) && (Y <= MAX(Y1,Y2)) ? rnd_true : rnd_false; } /* checks if a line crosses a rectangle or is within the rectangle */ @@ -739,7 +739,7 @@ /* first, see if point 1 is inside the rectangle */ /* in case the whole line is inside the rectangle */ if (X1 < Line->Point1.X && X2 > Line->Point1.X && Y1 < Line->Point1.Y && Y2 > Line->Point1.Y) - return pcb_true; + return rnd_true; /* construct a set of dummy lines and check each of them */ line.Thickness = 0; line.Flags = pcb_no_flags(); @@ -749,7 +749,7 @@ line.Point1.X = X1; line.Point2.X = X2; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* upper-right to lower-right corner */ line.Point1.X = X2; @@ -756,7 +756,7 @@ line.Point1.Y = Y1; line.Point2.Y = Y2; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* lower-right to lower-left corner */ line.Point1.Y = Y2; @@ -763,7 +763,7 @@ line.Point1.X = X1; line.Point2.X = X2; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* lower-left to upper-left corner */ line.Point2.X = X1; @@ -770,9 +770,9 @@ line.Point1.Y = Y1; line.Point2.Y = Y2; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /*checks if a point (of null radius) is in a slanted rectangle */ @@ -797,9 +797,9 @@ y = l->Y - p[2].Y; prod1 = (double) x *dx + (double) y *dy; if (prod0 * prod1 <= 0) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -814,9 +814,9 @@ /* first, see if point 1 is inside the rectangle */ /* in case the whole line is inside the rectangle */ if (IsPointInQuadrangle(p, &(Line->Point1))) - return pcb_true; + return rnd_true; if (IsPointInQuadrangle(p, &(Line->Point2))) - return pcb_true; + return rnd_true; /* construct a set of dummy lines and check each of them */ line.Thickness = 0; line.Flags = pcb_no_flags(); @@ -827,27 +827,27 @@ line.Point2.X = p[1].X; line.Point2.Y = p[1].Y; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* upper-right to lower-right corner */ line.Point1.X = p[2].X; line.Point1.Y = p[2].Y; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* lower-right to lower-left corner */ line.Point2.X = p[3].X; line.Point2.Y = p[3].Y; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; /* lower-left to upper-left corner */ line.Point1.X = p[0].X; line.Point1.Y = p[0].Y; if (pcb_isc_line_line(pcb_find0, &line, Line)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -864,10 +864,10 @@ box.X2 = X2; box.Y2 = Y2; pcb_arc_get_end (Arc, 0, &x, &y); if (PCB_POINT_IN_BOX(x, y, &box)) - return pcb_true; + return rnd_true; pcb_arc_get_end (Arc, 1, &x, &y); if (PCB_POINT_IN_BOX(x, y, &box)) - return pcb_true; + return rnd_true; /* construct a set of dummy lines and check each of them */ line.Thickness = 0; @@ -878,7 +878,7 @@ line.Point1.X = X1; line.Point2.X = X2; if (pcb_isc_line_arc(pcb_find0, &line, Arc)) - return pcb_true; + return rnd_true; /* upper-right to lower-right corner */ line.Point1.X = line.Point2.X = X2; @@ -885,7 +885,7 @@ line.Point1.Y = Y1; line.Point2.Y = Y2; if (pcb_isc_line_arc(pcb_find0, &line, Arc)) - return pcb_true; + return rnd_true; /* lower-right to lower-left corner */ line.Point1.Y = line.Point2.Y = Y2; @@ -892,7 +892,7 @@ line.Point1.X = X1; line.Point2.X = X2; if (pcb_isc_line_arc(pcb_find0, &line, Arc)) - return pcb_true; + return rnd_true; /* lower-left to upper-left corner */ line.Point1.X = line.Point2.X = X1; @@ -899,9 +899,9 @@ line.Point1.Y = Y1; line.Point2.Y = Y2; if (pcb_isc_line_arc(pcb_find0, &line, Arc)) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -920,10 +920,10 @@ l.Point1.X = gfx->cox[n]; l.Point1.Y = gfx->coy[n]; l.Point2.X = gfx->cox[m]; l.Point2.Y = gfx->coy[m]; if (PCB_LINE_TOUCHES_BOX(&l, b)) - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -1036,7 +1036,7 @@ else if (Y > height) range = Y - height; else - return pcb_true; + return rnd_true; } return range < Radius; @@ -1054,9 +1054,9 @@ for(n = 0; n < 4; n++) if (!PCB_POINT_IN_BOX(gfx->cox[n], gfx->coy[n], b)) - return pcb_false; + return rnd_false; - return pcb_true; + return rnd_true; } /* TODO: this code is BROKEN in the case of non-circular arcs, @@ -1102,13 +1102,13 @@ ArcX = Arc->X + Arc->Width * cos((Arc->StartAngle + 180) / RND_RAD_TO_DEG); ArcY = Arc->Y - Arc->Height * sin((Arc->StartAngle + 180) / RND_RAD_TO_DEG); if (rnd_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) - return pcb_true; + return rnd_true; ArcX = Arc->X + Arc->Width * cos((Arc->StartAngle + Arc->Delta + 180) / RND_RAD_TO_DEG); ArcY = Arc->Y - Arc->Height * sin((Arc->StartAngle + Arc->Delta + 180) / RND_RAD_TO_DEG); if (rnd_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) - return pcb_true; - return pcb_false; + return rnd_true; + return rnd_false; } if ((Arc->Width == Arc->Height) || (fabs(Arc->Width - Arc->Height) < PCB_MM_TO_COORD(0.1))) { @@ -1146,11 +1146,11 @@ c[0] = gfx->cox[1]; c[1] = gfx->coy[1]; if (rnd_point_in_triangle(a, b, c, pt)) - return pcb_true; + return rnd_true; c[0] = gfx->cox[3]; c[1] = gfx->coy[3]; if (rnd_point_in_triangle(a, b, c, pt)) - return pcb_true; + return rnd_true; /* the above triangle checks will miss points that are exactly on the triangle edges */ for(n = 0; n < 4; n++) { @@ -1158,14 +1158,14 @@ if (m == 4) m = 0; if (pcb_is_point_on_thinline(X, Y, gfx->cox[n], gfx->coy[n], gfx->cox[m], gfx->coy[m])) - return pcb_true; + return rnd_true; } if (pcb_is_point_on_thinline(X, Y, gfx->cox[0], gfx->coy[0], gfx->cox[2], gfx->coy[2])) - return pcb_true; + return rnd_true; if (pcb_is_point_on_thinline(X, Y, gfx->cox[1], gfx->coy[1], gfx->cox[3], gfx->coy[3])) - return pcb_true; + return rnd_true; - return pcb_false; + return rnd_false; } @@ -1353,7 +1353,7 @@ return PCB_OBJ_PSTK; if (!HigherAvail && (Type & PCB_OBJ_FLOATER) && (Type & PCB_OBJ_TEXT) && - SearchSubcFloaterByLocation(objst, req_flag, (pcb_subc_t **)pr1, (pcb_text_t **) pr2, pr3, pcb_false)) { + SearchSubcFloaterByLocation(objst, req_flag, (pcb_subc_t **)pr1, (pcb_text_t **) pr2, pr3, rnd_false)) { *Result1 = ((pcb_text_t *)r2)->parent.layer; *Result2 = r2; *Result3 = r3; @@ -1361,7 +1361,7 @@ } if (!HigherAvail && Type & PCB_OBJ_SUBC && PCB->SubcOn && - SearchSubcByLocation(objst, req_flag, (pcb_subc_t **) pr1, (pcb_subc_t **) pr2, (pcb_subc_t **) pr3, pcb_false)) { + SearchSubcByLocation(objst, req_flag, (pcb_subc_t **) pr1, (pcb_subc_t **) pr2, (pcb_subc_t **) pr3, rnd_false)) { rnd_rnd_box_t *box = &((pcb_subc_t *) r1)->BoundingBox; HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1); HigherAvail = PCB_OBJ_SUBC; @@ -1417,7 +1417,7 @@ return PCB_OBJ_VOID; if ((Type & PCB_OBJ_FLOATER) && (Type & PCB_OBJ_TEXT) && - SearchSubcFloaterByLocation(objst, req_flag, (pcb_subc_t **)pr1, (pcb_text_t **) pr2, pr3, pcb_true)) { + SearchSubcFloaterByLocation(objst, req_flag, (pcb_subc_t **)pr1, (pcb_text_t **) pr2, pr3, rnd_true)) { *Result1 = ((pcb_text_t *)r2)->parent.layer; *Result2 = r2; *Result3 = r3; @@ -1425,7 +1425,7 @@ } if (Type & PCB_OBJ_SUBC && PCB->SubcOn && - SearchSubcByLocation(objst, req_flag, (pcb_subc_t **) Result1, (pcb_subc_t **) Result2, (pcb_subc_t **) Result3, pcb_true)) + SearchSubcByLocation(objst, req_flag, (pcb_subc_t **) Result1, (pcb_subc_t **) Result2, (pcb_subc_t **) Result3, rnd_true)) return PCB_OBJ_SUBC; return PCB_OBJ_VOID; Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 31010) +++ trunk/src/select.c (revision 31011) @@ -69,11 +69,11 @@ pcb_layer_t *layer; int type; - rnd_bool changed = pcb_true; + rnd_bool changed = rnd_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)) - return pcb_false; + return rnd_false; switch (type) { case PCB_OBJ_PSTK: @@ -424,7 +424,7 @@ return PCB_R_DIR_NOT_FOUND; /* do not let locked object selected, but allow deselection */ - if ((PCB_FLAG_TEST(PCB_FLAG_LOCK, obj) == pcb_true) && (ctx->flag)) + if ((PCB_FLAG_TEST(PCB_FLAG_LOCK, obj) == rnd_true) && (ctx->flag)) return PCB_R_DIR_NOT_FOUND; if (!pcb_obj_near_box(obj, &ctx->box)) /* detailed box matching */ @@ -443,7 +443,7 @@ /* ---------------------------------------------------------------------- * selects/unselects all visible objects within the passed box * Flag determines if the block is to be selected or unselected - * returns pcb_true if the state of any object has changed + * returns rnd_true if the state of any object has changed */ rnd_bool pcb_select_block(pcb_board_t *pcb, rnd_rnd_box_t *Box, rnd_bool flag, rnd_bool vis_only, rnd_bool invert) { @@ -472,13 +472,13 @@ /* ---------------------------------------------------------------------- * selects/unselects all objects which were found during a connection scan * Flag determines if they are to be selected or unselected - * returns pcb_true if the state of any object has changed + * returns rnd_true if the state of any object has changed * * text objects and subcircuits cannot be selected by this routine */ static rnd_bool pcb_select_connection_(pcb_data_t *data, rnd_bool Flag) { - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; pcb_any_obj_t *o; pcb_data_it_t it; @@ -487,10 +487,10 @@ pcb_undo_add_obj_to_flag(o); PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, Flag, o); pcb_draw_obj(o); - changed = pcb_true; + changed = rnd_true; } if ((o->type == PCB_OBJ_SUBC) && (pcb_select_connection_(((pcb_subc_t *)o)->data, Flag))) - changed = pcb_true; + changed = rnd_true; } return changed; @@ -504,7 +504,7 @@ /* --------------------------------------------------------------------------- * selects objects as defined by Type by name; * it's a case insensitive match - * returns pcb_true if any object has been selected + * returns rnd_true if any object has been selected */ #define REGEXEC(arg) \ (method == PCB_SM_REGEX ? regexec_match_all(regex, (arg)) : strlst_match(pat, (arg))) Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 31010) +++ trunk/src/select_act.c (revision 31011) @@ -82,12 +82,12 @@ pcb_undo_add_obj_to_flag(obj); PCB_FLAG_SET(PCB_FLAG_SELECTED, obj); pcb_draw_invalidate(obj); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else { case F_ToggleObject: if (pcb_select_object(PCB)) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_gui->invalidate_all(rnd_gui); } } @@ -102,13 +102,13 @@ box.Y1 = MIN(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); box.X2 = MAX(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y2 = MAX(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); pcb_tool_notify_block(); - if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, pcb_true, pcb_true, pcb_false)) { - pcb_board_set_changed_flag(pcb_true); + if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, rnd_true, rnd_true, rnd_false)) { + pcb_board_set_changed_flag(rnd_true); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); rnd_gui->invalidate_all(rnd_gui); break; } @@ -122,8 +122,8 @@ box.Y1 = -RND_MAX_COORD; box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - if (pcb_select_block(PCB, &box, pcb_true, pcb_true, pcb_false)) { - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(PCB, &box, rnd_true, rnd_true, rnd_false)) { + pcb_board_set_changed_flag(rnd_true); rnd_gui->invalidate_all(rnd_gui); } break; @@ -137,8 +137,8 @@ box.Y1 = -RND_MAX_COORD; box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - if (pcb_select_block(PCB, &box, pcb_true, pcb_true, pcb_true)) { - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(PCB, &box, rnd_true, rnd_true, rnd_true)) { + pcb_board_set_changed_flag(rnd_true); rnd_gui->invalidate_all(rnd_gui); } break; @@ -146,10 +146,10 @@ /* all found connections */ case F_Connection: - if (pcb_select_connection(PCB, pcb_true)) { + if (pcb_select_connection(PCB, rnd_true)) { pcb_draw(); pcb_undo_inc_serial(); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } break; @@ -163,12 +163,12 @@ rnd_hid_get_coords("Select the Subcircuit's Origin (mark) Location", &x, &y, 0); x = rnd_grid_fit(x, RND_ACT_HIDLIB->grid, RND_ACT_HIDLIB->grid_ox); y = rnd_grid_fit(y, RND_ACT_HIDLIB->grid, RND_ACT_HIDLIB->grid_oy); - pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, x, y, pcb_true, pcb_false); + pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, x, y, rnd_true, rnd_false); pcb_undo_save_serial(); - pcb_remove_selected(pcb_false); + pcb_remove_selected(rnd_false); pcb_subc_convert_from_buffer(PCB_PASTEBUFFER); pcb_undo_restore_serial(); - pcb_buffer_copy_to_layout(PCB, x, y, pcb_false); + pcb_buffer_copy_to_layout(PCB, x, y, rnd_false); pcb_buffer_set_number(pcb_crosshair_note.Buffer); } break; @@ -203,13 +203,13 @@ box.Y1 = MIN(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); box.X2 = MAX(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y2 = MAX(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); pcb_tool_notify_block(); - if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, pcb_false, pcb_true, pcb_false)) { - pcb_board_set_changed_flag(pcb_true); + if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, rnd_false, rnd_true, rnd_false)) { + pcb_board_set_changed_flag(rnd_true); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); break; } @@ -222,17 +222,17 @@ box.Y1 = -RND_MAX_COORD; box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - if (pcb_select_block(PCB, &box, pcb_false, pcb_false, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(PCB, &box, rnd_false, rnd_false, rnd_false)) + pcb_board_set_changed_flag(rnd_true); break; } /* all found connections */ case F_Connection: - if (pcb_select_connection(PCB, pcb_false)) { + if (pcb_select_connection(PCB, rnd_false)) { pcb_draw(); pcb_undo_inc_serial(); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } break; Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 31010) +++ trunk/src/thermal.c (revision 31011) @@ -193,11 +193,11 @@ pa = pa_line_at( x1 - clrth * nx + clrth * vx - clr*vx, y1 - clrth * ny + clrth * vy - clr*vy, x2 - clrth * nx - clrth * vx + clr*vx, y2 - clrth * ny - clrth * vy + clr*vy, - clr, pcb_false); + clr, rnd_false); pb = pa_line_at( x1 + clrth * nx + clrth * vx - clr*vx, y1 + clrth * ny + clrth * vy - clr*vy, x2 + clrth * nx - clrth * vx + clr*vx, y2 + clrth * ny - clrth * vy + clr*vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); /* cross clear lines */ @@ -205,7 +205,7 @@ pb = pa_line_at( x1 - clrth * nx + clrth * vx + clr*nx, y1 - clrth * ny + clrth * vy + clr*ny, x1 + clrth * nx + clrth * vx - clr*nx, y1 + clrth * ny + clrth * vy - clr*ny, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -212,7 +212,7 @@ pb = pa_line_at( x2 - clrth * nx - clrth * vx + clr*nx, y2 - clrth * ny - clrth * vy + clr*ny, x2 + clrth * nx - clrth * vx - clr*nx, y2 + clrth * ny - clrth * vy - clr*ny, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); } else { @@ -220,11 +220,11 @@ pa = pa_line_at( x1 - clrth * nx + clrth * vx, y1 - clrth * ny + clrth * vy, mx - clrth * nx + clr * vx, my - clrth * ny + clr * vy, - clr, pcb_false); + clr, rnd_false); pb = pa_line_at( x1 + clrth * nx + clrth * vx, y1 + clrth * ny + clrth * vy, mx + clrth * nx + clr * vx, my + clrth * ny + clr * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -231,7 +231,7 @@ pb = pa_line_at( x2 - clrth * nx - clrth * vx, y2 - clrth * ny - clrth * vy, mx - clrth * nx - clr * vx, my - clrth * ny - clr * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -238,7 +238,7 @@ pb = pa_line_at( x2 + clrth * nx - clrth * vx, y2 + clrth * ny - clrth * vy, mx + clrth * nx - clr * vx, my + clrth * ny - clr * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); /* cross clear lines */ @@ -246,7 +246,7 @@ pb = pa_line_at( x1 - clrth * nx + clrth * vx, y1 - clrth * ny + clrth * vy, x1 - clr * nx + clrth * vx, y1 - clr * ny + clrth * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -253,7 +253,7 @@ pb = pa_line_at( x1 + clrth * nx + clrth * vx, y1 + clrth * ny + clrth * vy, x1 + clr * nx + clrth * vx, y1 + clr * ny + clrth * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -260,7 +260,7 @@ pb = pa_line_at( x2 - clrth * nx - clrth * vx, y2 - clrth * ny - clrth * vy, x2 - clr * nx - clrth * vx, y2 - clr * ny - clrth * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -267,7 +267,7 @@ pb = pa_line_at( x2 + clrth * nx - clrth * vx, y2 + clrth * ny - clrth * vy, x2 + clr * nx - clrth * vx, y2 + clr * ny - clrth * vy, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); } } @@ -278,11 +278,11 @@ pa = pa_line_at( x1 - clrth * nx - clr * vx * 0.75, y1 - clrth * ny - clr * vy * 0.75, x2 - clrth * nx + clr * vx * 0.75, y2 - clrth * ny + clr * vy * 0.75, - clr, pcb_false); + clr, rnd_false); pb = pa_line_at( x1 + clrth * nx - clr * vx * 0.75, y1 + clrth * ny - clr * vy * 0.75, x2 + clrth * nx + clr * vx * 0.75, y2 + clrth * ny + clr * vy * 0.75, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); /* x1;y1 cap arc */ @@ -306,11 +306,11 @@ pa = pa_line_at( x1 - clrth * nx - clr * vx * 0.00, y1 - clrth * ny - clr * vy * 0.00, mx - clrth * nx + clr * vx * 1.00, my - clrth * ny + clr * vy * 1.00, - clr, pcb_false); + clr, rnd_false); pb = pa_line_at( x1 + clrth * nx - clr * vx * 0.00, y1 + clrth * ny - clr * vy * 0.00, mx + clrth * nx + clr * vx * 1.00, my + clrth * ny + clr * vy * 1.00, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -317,7 +317,7 @@ pb = pa_line_at( mx - clrth * nx - clr * vx * 1.00, my - clrth * ny - clr * vy * 1.00, x2 - clrth * nx + clr * vx * 0.00, y2 - clrth * ny + clr * vy * 0.00, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); pa = pc; pc = NULL; @@ -324,7 +324,7 @@ pb = pa_line_at( mx + clrth * nx - clr * vx * 1.00, my + clrth * ny - clr * vy * 1.00, x2 + clrth * nx + clr * vx * 0.00, y2 + clrth * ny + clr * vy * 0.00, - clr, pcb_false); + clr, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_UNITE); /* split round cap, x1;y1 */ @@ -365,30 +365,30 @@ clrth *= 2; if (line->thermal & PCB_THERMAL_DIAGONAL) { /* x1;y1 V-shape */ - pb = pa_line_at(x1, y1, x1-nx*clrth+vx*clrth, y1-ny*clrth+vy*clrth, th, pcb_false); + pb = pa_line_at(x1, y1, x1-nx*clrth+vx*clrth, y1-ny*clrth+vy*clrth, th, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); pa = pc; pc = NULL; - pb = pa_line_at(x1, y1, x1+nx*clrth+vx*clrth, y1+ny*clrth+vy*clrth, th, pcb_false); + pb = pa_line_at(x1, y1, x1+nx*clrth+vx*clrth, y1+ny*clrth+vy*clrth, th, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); /* x2;y2 V-shape */ pa = pc; pc = NULL; - pb = pa_line_at(x2, y2, x2-nx*clrth-vx*clrth, y2-ny*clrth-vy*clrth, th, pcb_false); + pb = pa_line_at(x2, y2, x2-nx*clrth-vx*clrth, y2-ny*clrth-vy*clrth, th, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); pa = pc; pc = NULL; - pb = pa_line_at(x2, y2, x2+nx*clrth-vx*clrth, y2+ny*clrth-vy*clrth, th, pcb_false); + pb = pa_line_at(x2, y2, x2+nx*clrth-vx*clrth, y2+ny*clrth-vy*clrth, th, rnd_false); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); } else { /* perpendicular */ - pb = pa_line_at(mx-nx*clrth, my-ny*clrth, mx+nx*clrth, my+ny*clrth, th, pcb_true); + pb = pa_line_at(mx-nx*clrth, my-ny*clrth, mx+nx*clrth, my+ny*clrth, th, rnd_true); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); /* straight */ pa = pc; pc = NULL; - pb = pa_line_at(x1+vx*clrth, y1+vy*clrth, x2-vx*clrth, y2-vy*clrth, th, pcb_true); + pb = pa_line_at(x1+vx*clrth, y1+vy*clrth, x2-vx*clrth, y2-vy*clrth, th, rnd_true); pcb_polyarea_boolean_free(pa, pb, &pc, PCB_PBO_SUB); } return pc; @@ -482,7 +482,7 @@ if ((n >= CONG_MAX) || (cong[n])) { if (!is_diag) { /* have to draw a short clearance for the small segments */ - ptmp = pa_line_at(x - nx * clr/2, y - ny * clr/2, px - nx * clr/2, py - ny * clr/2, clr+4, pcb_false); + ptmp = pa_line_at(x - nx * clr/2, y - ny * clr/2, px - nx * clr/2, py - ny * clr/2, clr+4, rnd_false); pcb_polyarea_boolean(ptmp, *pres, &p, PCB_PBO_UNITE); pcb_polyarea_free(pres); @@ -496,7 +496,7 @@ /* cheat: clr-2+4 to guarantee some overlap with the poly cutout */ if (is_diag) { /* one line per edge, slightly shorter than the edge */ - ptmp = pa_line_at(x - vx * clr * fact - nx * clr/2, y - vy * clr * fact - ny * clr/2, px + vx * clr *fact - nx * clr/2, py + vy * clr * fact - ny * clr/2, clr+4, pcb_false); + ptmp = pa_line_at(x - vx * clr * fact - nx * clr/2, y - vy * clr * fact - ny * clr/2, px + vx * clr *fact - nx * clr/2, py + vy * clr * fact - ny * clr/2, clr+4, rnd_false); pcb_polyarea_boolean(ptmp, *pres, &p, PCB_PBO_UNITE); pcb_polyarea_free(pres); @@ -505,13 +505,13 @@ } else { /* two half lines per edge */ - ptmp = pa_line_at(x - nx * clr/2 , y - ny * clr/2, mx + vx * clr * fact_ortho - nx * clr/2, my + vy * clr * fact_ortho - ny * clr/2, clr+4, pcb_false); + ptmp = pa_line_at(x - nx * clr/2 , y - ny * clr/2, mx + vx * clr * fact_ortho - nx * clr/2, my + vy * clr * fact_ortho - ny * clr/2, clr+4, rnd_false); pcb_polyarea_boolean(ptmp, *pres, &p, PCB_PBO_UNITE); pcb_polyarea_free(pres); pcb_polyarea_free(&ptmp); *pres = p; - ptmp = pa_line_at(px - nx * clr/2, py - ny * clr/2, mx - vx * clr * fact_ortho - nx * clr/2, my - vy * clr * fact_ortho - ny * clr/2, clr+4, pcb_false); + ptmp = pa_line_at(px - nx * clr/2, py - ny * clr/2, mx - vx * clr * fact_ortho - nx * clr/2, my - vy * clr * fact_ortho - ny * clr/2, clr+4, rnd_false); pcb_polyarea_boolean(ptmp, *pres, &p, PCB_PBO_UNITE); pcb_polyarea_free(pres); pcb_polyarea_free(&ptmp); @@ -595,7 +595,7 @@ ny = vx2 - vx; /* line from each corner at the average angle of the two edges from the corner */ - ptmp = pa_line_at(x-nx*clr*0.2, y-ny*clr*0.2, x + nx*clr*4, y + ny*clr*4, clr/2, pcb_false); + ptmp = pa_line_at(x-nx*clr*0.2, y-ny*clr*0.2, x + nx*clr*4, y + ny*clr*4, clr/2, rnd_false); pcb_polyarea_boolean(*pres, ptmp, &p, PCB_PBO_SUB); pcb_polyarea_free(pres); pcb_polyarea_free(&ptmp); @@ -608,7 +608,7 @@ my = (y+py)/2.0; /* perpendicular line from the middle of each edge */ - ptmp = pa_line_at(mx, my, mx - nx*clr, my - ny*clr, clr/2, pcb_true); + ptmp = pa_line_at(mx, my, mx - nx*clr, my - ny*clr, clr/2, rnd_true); pcb_polyarea_boolean(*pres, ptmp, &p, PCB_PBO_SUB); pcb_polyarea_free(pres); pcb_polyarea_free(&ptmp); @@ -620,7 +620,7 @@ } /* generate round thermal around a polyarea specified by the iterator */ -static void pcb_thermal_area_pa_round(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_round(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_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(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, pcb_bool_t is_diag) +static void pcb_thermal_area_pa_sharp(rnd_polyarea_t **pres, pcb_poly_it_t *it, rnd_coord_t clr, rnd_bool_t is_diag) { pcb_pline_t *pl; Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 31010) +++ trunk/src/tool_logic.c (revision 31011) @@ -151,7 +151,7 @@ pcb_crosshair.AttachedObject.X = PlaceX - mx; pcb_crosshair.AttachedObject.Y = PlaceY - my; if ((!pcb_marked.status || conf_core.editor.local_ref) && !pcb_marked.user_placed) - pcb_crosshair_set_local_ref(PlaceX - mx, PlaceY - my, pcb_true); + pcb_crosshair_set_local_ref(PlaceX - mx, PlaceY - my, rnd_true); pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; /* get all attached objects if necessary */ @@ -166,7 +166,7 @@ void pcb_tool_notify_block(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); switch (pcb_crosshair.AttachedBox.State) { case PCB_CH_STATE_FIRST: /* setup first point */ pcb_crosshair.AttachedBox.Point1.X = pcb_crosshair.AttachedBox.Point2.X = pcb_crosshair.X; @@ -178,7 +178,7 @@ pcb_crosshair.AttachedBox.State = PCB_CH_STATE_THIRD; break; } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } /*** old helpers ***/ @@ -194,7 +194,7 @@ if (conf_core.temp.rat_warn) { if (pcb_data_clear_flag(pcb->Data, PCB_FLAG_WARN, 1, 0) > 0) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } pcb_draw(); } Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 31010) +++ trunk/src/undo.c (revision 31011) @@ -66,12 +66,12 @@ #include "obj_poly_draw.h" -static rnd_bool between_increment_and_restore = pcb_false; -static rnd_bool added_undo_between_increment_and_restore = pcb_false; +static rnd_bool between_increment_and_restore = rnd_false; +static rnd_bool added_undo_between_increment_and_restore = rnd_false; pcb_data_t *pcb_removelist = NULL; /* lists of removed objects */ -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 */ +static rnd_bool Locked = rnd_false; /* do not add entries if */ +rnd_bool pcb_undo_and_draw = rnd_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) @@ -182,8 +182,8 @@ { if (added_undo_between_increment_and_restore) rnd_message(RND_MSG_ERROR, "ERROR: Operations were added to the Undo stack with an incorrect serial number\n"); - between_increment_and_restore = pcb_false; - added_undo_between_increment_and_restore = pcb_false; + between_increment_and_restore = rnd_false; + added_undo_between_increment_and_restore = rnd_false; uundo_restore_serial(&pcb_uundo); } @@ -192,9 +192,9 @@ */ void pcb_undo_save_serial(void) { - pcb_bumped = pcb_false; - between_increment_and_restore = pcb_false; - added_undo_between_increment_and_restore = pcb_false; + pcb_bumped = rnd_false; + between_increment_and_restore = rnd_false; + added_undo_between_increment_and_restore = rnd_false; uundo_save_serial(&pcb_uundo); } @@ -208,11 +208,11 @@ if (!Locked) { /* Set the changed flag if anything was added prior to this bump */ if ((pcb_uundo.tail != NULL) && (pcb_uundo.tail->serial == pcb_uundo.serial)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); uundo_inc_serial(&pcb_uundo); - pcb_bumped = pcb_true; - between_increment_and_restore = pcb_true; + pcb_bumped = rnd_true; + between_increment_and_restore = rnd_true; } } @@ -232,7 +232,7 @@ */ void pcb_undo_lock(void) { - Locked = pcb_true; + Locked = rnd_true; } /* --------------------------------------------------------------------------- @@ -240,7 +240,7 @@ */ void pcb_undo_unlock(void) { - Locked = pcb_false; + Locked = rnd_false; } /* --------------------------------------------------------------------------- Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 31010) +++ trunk/src/undo_act.c (revision 31011) @@ -103,15 +103,15 @@ const char *function = NULL; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, Undo, function = argv[1].val.str); if (!function || !*function) { - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (pcb_tool_undo_act(RND_ACT_HIDLIB)) - if (pcb_undo(pcb_true) == 0) - pcb_board_set_changed_flag(pcb_true); + if (pcb_undo(rnd_true) == 0) + pcb_board_set_changed_flag(rnd_true); } else if (function) { - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (rnd_strcasecmp(function, "ClearList") == 0) - pcb_undo_clear_list(pcb_false); + pcb_undo_clear_list(rnd_false); else if (rnd_strcasecmp(function, "FreezeSerial") == 0) pcb_undo_freeze_serial(); else if (rnd_strcasecmp(function, "UnFreezeSerial") == 0) @@ -119,7 +119,7 @@ else if (rnd_strcasecmp(function, "IncSerial") == 0) pcb_undo_inc_serial(); } - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_IRES(0); return 0; } @@ -134,11 +134,11 @@ fgw_error_t pcb_act_Redo(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_false); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_false); if (pcb_tool_redo_act(RND_ACT_HIDLIB)) - if (pcb_redo(pcb_true)) - pcb_board_set_changed_flag(pcb_true); - rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, pcb_true); + if (pcb_redo(rnd_true)) + pcb_board_set_changed_flag(rnd_true); + rnd_hid_notify_crosshair_change(RND_ACT_HIDLIB, rnd_true); RND_ACT_IRES(0); return 0; } Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 31010) +++ trunk/src/undo_old.c (revision 31011) @@ -148,7 +148,7 @@ /* --------------------------------------------------------------------------- * recovers an object from a 90 deg 'rotate' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoRotate90(UndoListTypePtr Entry) { @@ -160,14 +160,14 @@ if (type != PCB_OBJ_VOID) { pcb_obj_rotate90(PCB, ptr2, Entry->Data.Rotate.CenterX, Entry->Data.Rotate.CenterY, (4 - Entry->Data.Rotate.Steps) & 0x03); Entry->Data.Rotate.Steps = (4 - Entry->Data.Rotate.Steps) & 0x03; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers an object from an arbitrary angle 'rotate' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoRotate(UndoListTypePtr Entry) { @@ -179,14 +179,14 @@ if (type != PCB_OBJ_VOID) { pcb_obj_rotate(PCB, ptr2, Entry->Data.Rotate.CenterX, Entry->Data.Rotate.CenterY, -(Entry->Data.Angle)); Entry->Data.Angle = -(Entry->Data.Angle); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers an object from a clear/restore poly operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoClearPoly(UndoListTypePtr Entry) { @@ -200,14 +200,14 @@ else pcb_poly_clear_from_poly(PCB->Data, type, Entry->Data.ClearPoly.Layer, ptr3); Entry->Data.ClearPoly.Clear = !Entry->Data.ClearPoly.Clear; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers an object from a 'change name' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoChangeName(UndoListTypePtr Entry) { @@ -218,9 +218,9 @@ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); if (type != PCB_OBJ_VOID) { Entry->Data.ChangeName.Name = (char *) (pcb_chg_obj_name(type, ptr1, ptr2, ptr3, Entry->Data.ChangeName.Name)); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -251,9 +251,9 @@ Entry->Data.AngleChange.angle[0] = old_sa; Entry->Data.AngleChange.angle[1] = old_da; pcb_draw_obj((pcb_any_obj_t *)a); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -282,9 +282,9 @@ Entry->Data.Move.DX = old_w; Entry->Data.Move.DY = old_h; pcb_draw_obj((pcb_any_obj_t *)a); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -308,9 +308,9 @@ Entry->Data.Size = swap; if (pcb_undo_and_draw) pcb_draw_obj((pcb_any_obj_t *)ptr2); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -337,9 +337,9 @@ pcb_poly_clear_from_poly(PCB->Data, type, ptr1, ptr2); if (pcb_undo_and_draw) pcb_draw_obj((pcb_any_obj_t *)ptr2); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -360,9 +360,9 @@ ((pcb_text_t *)ptr2)->thickness = Entry->Data.Size; Entry->Data.Size = swap; pcb_text_post((pcb_text_t *)ptr2); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- @@ -373,7 +373,7 @@ void *ptr1, *ptr2, *ptr3; int type; double swap; - rnd_bool ret = pcb_false; + rnd_bool ret = rnd_false; /* lookup entry by ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); @@ -388,7 +388,7 @@ ((pcb_pstk_t *)ptr2)->rot = Entry->Data.Size; Entry->Data.Size = swap; pcb_pstk_post(((pcb_pstk_t *)ptr2)); - ret = pcb_true; + ret = rnd_true; break; case PCB_OBJ_TEXT: @@ -397,7 +397,7 @@ ((pcb_text_t *)ptr2)->rot = Entry->Data.Size; Entry->Data.Size = swap; pcb_text_post(((pcb_text_t *)ptr2)); - ret = pcb_true; + ret = rnd_true; break; } @@ -458,16 +458,16 @@ if (pcb_undo_and_draw && must_redraw) pcb_draw_obj((pcb_any_obj_t *)ptr2); - return pcb_true; + return rnd_true; } rnd_message(RND_MSG_ERROR, "hace Internal error: Can't find ID %d type %08x\n", Entry->ID, Entry->Kind); rnd_message(RND_MSG_ERROR, "for UndoFlag Operation. Previous flags: %s\n", pcb_strflg_f2s(Entry->Data.Flags, 0, NULL, 0)); - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers a subc from an other-side operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoOtherSide(UndoListTypePtr Entry) { @@ -483,10 +483,10 @@ pcb_subc_change_side(subc, Entry->Data.Move.DY); if (pcb_undo_and_draw) DrawSubc(subc); - return pcb_true; + return rnd_true; } rnd_message(RND_MSG_ERROR, "hace Internal error: UndoOtherside on object type %x\n", type); - return pcb_false; + return rnd_false; } static void get_subc_parent_data(long subcid, rnd_layer_id_t subclayer, pcb_subc_t **subc, pcb_data_t **data, void **ptr1) @@ -505,7 +505,7 @@ /* --------------------------------------------------------------------------- * recovers an object from a 'copy' or 'create' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoCopyOrCreate(UndoListTypePtr Entry) { @@ -530,14 +530,14 @@ pcb_term_del(&subc->terminals, ((pcb_any_obj_t *)ptr2)->term, (pcb_any_obj_t *)ptr2); Entry->Type = PCB_UNDO_REMOVE; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers an object from a 'move' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoMove(UndoListTypePtr Entry) { @@ -550,14 +550,14 @@ pcb_move_obj(type, ptr1, ptr2, ptr3, -Entry->Data.Move.DX, -Entry->Data.Move.DY); Entry->Data.Move.DX *= -1; Entry->Data.Move.DY *= -1; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* ---------------------------------------------------------------------- * recovers an object from a 'remove' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoRemove(UndoListTypePtr Entry) { @@ -588,18 +588,18 @@ if (!(pcb_brave & PCB_BRAVE_NOCLIPBATCH)) pcb_data_clip_inhibit_dec(PCB->Data, 1); - return pcb_true; + return rnd_true; } if (!(pcb_brave & PCB_BRAVE_NOCLIPBATCH)) pcb_data_clip_inhibit_dec(PCB->Data, 1); - return pcb_false; + return rnd_false; } /* ---------------------------------------------------------------------- * recovers an object from a 'move to another layer' operation - * returns pcb_true if anything has been recovered + * returns rnd_true if anything has been recovered */ static rnd_bool UndoMoveToLayer(UndoListTypePtr Entry) { @@ -617,16 +617,16 @@ assert(o->parent.layer->parent_type == PCB_PARENT_DATA); data = o->parent.layer->parent.data; swap = pcb_layer_id(data, o->parent.layer); - pcb_move_obj_to_layer(type, ptr1, ptr2, ptr3, pcb_get_layer(data, Entry->Data.MoveToLayer.OriginalLayer), pcb_true); + pcb_move_obj_to_layer(type, ptr1, ptr2, ptr3, pcb_get_layer(data, Entry->Data.MoveToLayer.OriginalLayer), rnd_true); Entry->Data.MoveToLayer.OriginalLayer = swap; - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } /* --------------------------------------------------------------------------- * recovers a removed polygon point - * returns pcb_true on success + * returns rnd_true on success */ static rnd_bool UndoRemovePoint(UndoListTypePtr Entry) { @@ -647,7 +647,7 @@ pcb_insert_point_in_object(PCB_OBJ_POLY, layer, polygon, &Entry->Data.RemovedPoint.Index, Entry->Data.RemovedPoint.X, - Entry->Data.RemovedPoint.Y, pcb_true, Entry->Data.RemovedPoint.last_in_contour); + Entry->Data.RemovedPoint.Y, rnd_true, Entry->Data.RemovedPoint.last_in_contour); polygon->Points[Entry->Data.RemovedPoint.Index].ID = Entry->Data.RemovedPoint.ID; if (pcb_undo_and_draw && layer->meta.real.vis) @@ -655,17 +655,17 @@ Entry->Type = PCB_UNDO_INSERT_POINT; Entry->ID = Entry->Data.RemovedPoint.ID; Entry->Kind = PCB_OBJ_POLY_POINT; - return pcb_true; + return rnd_true; } default: - return pcb_false; + return rnd_false; } } /* --------------------------------------------------------------------------- * recovers an inserted polygon point - * returns pcb_true on success + * returns rnd_true on success */ static rnd_bool UndoInsertPoint(UndoListTypePtr Entry) { @@ -675,7 +675,7 @@ int type; rnd_cardinal_t point_idx; rnd_cardinal_t hole; - rnd_bool last_in_contour = pcb_false; + rnd_bool last_in_contour = rnd_false; assert((long int)Entry->Kind == PCB_OBJ_POLY_POINT); /* lookup entry by it's ID */ @@ -693,9 +693,9 @@ point_idx = pcb_poly_point_idx(polygon, pnt); for (hole = 0; hole < polygon->HoleIndexN; hole++) if (point_idx == polygon->HoleIndex[hole] - 1) - last_in_contour = pcb_true; + last_in_contour = rnd_true; if (point_idx == polygon->PointN - 1) - last_in_contour = pcb_true; + last_in_contour = rnd_true; Entry->Data.RemovedPoint.last_in_contour = last_in_contour; Entry->Data.RemovedPoint.X = pnt->X; @@ -708,11 +708,11 @@ pcb_destroy_object(PCB->Data, PCB_OBJ_POLY_POINT, layer, polygon, pnt); if (pcb_undo_and_draw && layer->meta.real.vis) pcb_poly_invalidate_draw(layer, polygon); - return pcb_true; + return rnd_true; } default: - return pcb_false; + return rnd_false; } } @@ -727,11 +727,11 @@ /* lookup entry by it's ID */ type = pcb_search_obj_by_id(pcb_removelist, &ptr1, &ptr2, &ptr3, Entry->Data.CopyID, Entry->Kind); if (type == PCB_OBJ_VOID) - return pcb_false; + return rnd_false; type = pcb_search_obj_by_id(PCB->Data, &ptr1b, &ptr2b, &ptr3b, Entry->ID, Entry->Kind); if (type == PCB_OBJ_VOID) - return pcb_false; + return rnd_false; obj = (pcb_any_obj_t *) ptr2; obj2 = (pcb_any_obj_t *) ptr2b; @@ -748,12 +748,12 @@ obj = (pcb_any_obj_t *) pcb_move_obj_to_buffer(PCB, PCB->Data, pcb_removelist, type, ptr1, ptr2, ptr3); if (Entry->Kind == PCB_OBJ_POLY) pcb_poly_init_clip(PCB->Data, (pcb_layer_t *) ptr1b, (pcb_poly_t *) obj); - return pcb_true; + return rnd_true; } /* --------------------------------------------------------------------------- * recovers an removed polygon point - * returns pcb_true on success + * returns rnd_true on success */ static rnd_bool UndoRemoveContour(UndoListTypePtr Entry) { @@ -763,7 +763,7 @@ /* --------------------------------------------------------------------------- * recovers an inserted polygon point - * returns pcb_true on success + * returns rnd_true on success */ static rnd_bool UndoInsertContour(UndoListTypePtr Entry) { @@ -993,7 +993,7 @@ UndoListTypePtr undo; pcb_poly_t *polygon = (pcb_poly_t *) Ptr2; rnd_cardinal_t hole; - rnd_bool last_in_contour = pcb_false; + rnd_bool last_in_contour = rnd_false; if (!Locked) { switch (Type) { @@ -1014,9 +1014,9 @@ */ for (hole = 0; hole < polygon->HoleIndexN; hole++) if (index == polygon->HoleIndex[hole] - 1) - last_in_contour = pcb_true; + last_in_contour = rnd_true; if (index == polygon->PointN - 1) - last_in_contour = pcb_true; + last_in_contour = rnd_true; undo->Data.RemovedPoint.last_in_contour = last_in_contour; } break; Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 31010) +++ trunk/src/undo_old_str.h (revision 31011) @@ -30,7 +30,7 @@ } MoveToLayer; typedef struct { /* information about poly clear/restore */ - rnd_bool Clear; /* pcb_true was clear, pcb_false was restore */ + rnd_bool Clear; /* rnd_true was clear, rnd_false was restore */ pcb_layer_t *Layer; } ClearPolyType, *ClearPolyTypePtr; Index: trunk/src_plugins/ar_cpcb/ar_cpcb.c =================================================================== --- trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 31010) +++ trunk/src_plugins/ar_cpcb/ar_cpcb.c (revision 31011) @@ -177,7 +177,7 @@ if ((lx == x) && (ly == y)) { pcb_pstk_t *ps = pcb_pstk_new_compat_via(pcb->Data, -1, x, y, conf_core.design.via_drilling_hole, via_dia, conf_core.design.clearance, - 0, PCB_PSTK_COMPAT_ROUND, pcb_true); + 0, PCB_PSTK_COMPAT_ROUND, rnd_true); } else rnd_message(RND_MSG_ERROR, "Invalid via: not vertical, in line %ld:%ld\n", (long)nl->line, (long)nl->col); Index: trunk/src_plugins/asm/asm.c =================================================================== --- trunk/src_plugins/asm/asm.c (revision 31010) +++ trunk/src_plugins/asm/asm.c (revision 31011) @@ -361,8 +361,8 @@ box.Y1 = -RND_MAX_COORD; box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - if (pcb_select_block(PCB, &box, pcb_false, pcb_false, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(PCB, &box, rnd_false, rnd_false, rnd_false)) + pcb_board_set_changed_flag(rnd_true); if (row == NULL) { goto skip; @@ -615,7 +615,7 @@ RND_DAD_END(asm_ctx.dlg); asm_ctx.active = 1; - RND_DAD_NEW("asm", asm_ctx.dlg, "Hand assembly with pcb-rnd", &asm_ctx, pcb_false, asm_close_cb); + RND_DAD_NEW("asm", asm_ctx.dlg, "Hand assembly with pcb-rnd", &asm_ctx, rnd_false, asm_close_cb); /* expand all groups by default */ for(g = (group_t **)asm_ctx.grps.array, n = 0; n < asm_ctx.grps.used; g++,n++) Index: trunk/src_plugins/autoplace/action.c =================================================================== --- trunk/src_plugins/autoplace/action.c (revision 31010) +++ trunk/src_plugins/autoplace/action.c (revision 31011) @@ -47,7 +47,7 @@ rnd_hid_busy(PCB, 1); if (rnd_hid_message_box(RND_ACT_HIDLIB, "question", "Autoplace start", "Auto-placement can NOT be undone.\nDo you want to continue anyway?", "no", 0, "yes", 1, NULL) == 1) { if (AutoPlaceSelected()) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } rnd_hid_busy(PCB, 0); RND_ACT_IRES(0); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 31010) +++ trunk/src_plugins/autoplace/autoplace.c (revision 31011) @@ -110,7 +110,7 @@ 20, /* move on when each module has been profitably moved 20 times */ 0.75, /* annealing schedule constant: 0.85 */ 40, /* halt when there are 60 times as many moves as good moves */ - pcb_false, /* don't ignore SMD/pin conflicts */ + rnd_false, /* don't ignore SMD/pin conflicts */ PCB_MIL_TO_COORD(100), /* coarse grid is 100 mils */ PCB_MIL_TO_COORD(10), /* fine grid is 10 mils */ }; @@ -347,7 +347,7 @@ miny = maxy; thegroup = obj_layergrp(obj); allpads = pstk_ispad((pcb_pstk_t *)obj); - allsameside = pcb_true; + allsameside = rnd_true; for(t = pcb_termlist_next(t); t != NULL; t = pcb_termlist_next(t)) { rnd_coord_t X, Y; @@ -358,9 +358,9 @@ RND_MAKE_MIN(miny, Y); RND_MAKE_MAX(maxy, Y); if (!pstk_ispad((pcb_pstk_t *)obj)) - allpads = pcb_false; + allpads = rnd_false; if (obj_layergrp(obj) != thegroup) - allsameside = pcb_false; + allsameside = rnd_false; } /* okay, add half-perimeter to cost! */ W += PCB_COORD_TO_MIL(maxx - minx) + PCB_COORD_TO_MIL(maxy - miny) + ((allpads && !allsameside) ? CostParameter.via_cost : 0); @@ -736,7 +736,7 @@ vtp0_t Selected; PerturbationType pt; double C00, C0, T0; - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; vtp0_init(&Selected); @@ -755,9 +755,9 @@ C00 = C0 = ComputeCost(Tx, Tx); for (i = 0; i < TRIALS; i++) { pt = createPerturbation(&Selected, PCB_INCH_TO_COORD(1)); - doPerturb(&Selected, &pt, pcb_false); + doPerturb(&Selected, &pt, rnd_false); Cs += fabs(ComputeCost(Tx, Tx) - C0); - doPerturb(&Selected, &pt, pcb_true); + doPerturb(&Selected, &pt, rnd_true); } T0 = -(Cs / TRIALS) / log(P); printf("Initial T: %f\n", T0); @@ -774,7 +774,7 @@ while (1) { double Cprime; pt = createPerturbation(&Selected, T); - doPerturb(&Selected, &pt, pcb_false); + doPerturb(&Selected, &pt, rnd_false); Cprime = ComputeCost(T0, T); if (Cprime < C0) { /* good move! */ C0 = Cprime; @@ -787,7 +787,7 @@ steps++; } else - doPerturb(&Selected, &pt, pcb_true); /* undo last change */ + doPerturb(&Selected, &pt, rnd_true); /* undo last change */ moves++; /* are we at the end of a stage? */ if (good_moves >= good_move_cutoff || moves >= move_cutoff) { @@ -810,7 +810,7 @@ done: rnd_hid_progress(0, 0, NULL); if (changed) { - pcb_rats_destroy(pcb_false); + pcb_rats_destroy(rnd_false); pcb_net_add_all_rats(PCB, PCB_RATACC_PRECISE); rnd_hid_redraw(PCB); } Index: trunk/src_plugins/autoroute/action.c =================================================================== --- trunk/src_plugins/autoroute/action.c (revision 31010) +++ trunk/src_plugins/autoroute/action.c (revision 31011) @@ -52,13 +52,13 @@ switch(op) { case F_AllRats: case F_All: - if (AutoRoute(pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (AutoRoute(rnd_false)) + pcb_board_set_changed_flag(rnd_true); break; case F_SelectedRats: case F_Selected: - if (AutoRoute(pcb_true)) - pcb_board_set_changed_flag(pcb_true); + if (AutoRoute(rnd_true)) + pcb_board_set_changed_flag(rnd_true); break; default: RND_ACT_FAIL(AutoRoute); Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 31010) +++ trunk/src_plugins/autoroute/autoroute.c (revision 31011) @@ -1121,11 +1121,11 @@ /* layer must be 1) copper and 2) on */ if ((pcb_layer_flags(PCB, lid) & PCB_LYT_COPPER) && PCB->Data->Layer[lid].meta.real.vis) { routing_layers++; - is_layer_group_active[group] = pcb_true; + is_layer_group_active[group] = rnd_true; break; } else - is_layer_group_active[group] = pcb_false; + is_layer_group_active[group] = rnd_false; } } /* if via visibility is turned off, don't use them */ @@ -1182,14 +1182,14 @@ PCB_COPPER_GROUP_LOOP(PCB->Data, i); { if (!PCB_RTREE_EMPTY(layer->line_tree) || !PCB_RTREE_EMPTY(layer->arc_tree)) - usedGroup[i] = pcb_true; + usedGroup[i] = rnd_true; else - usedGroup[i] = pcb_false; + usedGroup[i] = rnd_false; } PCB_END_LOOP; } - usedGroup[front] = pcb_true; - usedGroup[back] = pcb_true; + usedGroup[front] = rnd_true; + usedGroup[back] = rnd_true; CreateRouteData_nets(rd, layergroupboxes); @@ -1324,11 +1324,11 @@ /* if (target->type == PIN) { nextpoint->X = target->parent.pin->X; nextpoint->Y = target->parent.pin->Y; - return pcb_true; + return rnd_true; }*/ nextpoint->X = RND_BOX_CENTER_X(target->sbox); nextpoint->Y = RND_BOX_CENTER_Y(target->sbox); - return pcb_false; + return rnd_false; } /* return the *minimum cost* from a point to a route box, including possible @@ -1673,7 +1673,7 @@ assert(rnd_box_is_good(area)); assert(AutoRouteParameters.with_conflicts || (to_site_conflict == NO_CONFLICT && through_site_conflict == NO_CONFLICT)); - rb = CreateExpansionArea(area, group, parent, pcb_true, previous_edge); + rb = CreateExpansionArea(area, group, parent, rnd_true, previous_edge); rb->flags.is_via = 1; rb->came_from = RND_ANY_DIR; #if defined(ROUTE_DEBUG) && defined(DEBUG_SHOW_VIA_BOXES) @@ -1737,8 +1737,8 @@ assert(container->flags.touched == 0); assert(previous_edge->rb->group == container->group); /* use the caller's idea of what this box should be */ - rb = CreateExpansionArea(interior_edge, previous_edge->rb->group, previous_edge->rb, pcb_true, previous_edge); - path_conflicts(rb, container, pcb_true); /* crucial! */ + rb = CreateExpansionArea(interior_edge, previous_edge->rb->group, previous_edge->rb, rnd_true, previous_edge); + path_conflicts(rb, container, rnd_true); /* crucial! */ costpoint = rnd_closest_cheap_point_in_box(&previous_edge->cost_point, interior_edge); d = pcb_cost_to_point_on_layer(&costpoint, &previous_edge->cost_point, previous_edge->rb->group); d *= cost_penalty_to_box; @@ -2037,18 +2037,18 @@ case RND_NORTH: case RND_SOUTH: if (rb->sbox.X2 <= res->inflated.X1 + bloat || rb->sbox.X1 >= res->inflated.X2 - bloat) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; case RND_EAST: case RND_WEST: if (rb->sbox.Y1 >= res->inflated.Y2 - bloat || rb->sbox.Y2 <= res->inflated.Y1 + bloat) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; break; default: assert(0); } - return pcb_false; + return rnd_false; } /* main Expand routine. @@ -2392,7 +2392,7 @@ vector_append(area_vec, nrb); nrb->flags.homeless = 0; /* not homeless any more */ /* mark this one as conflicted */ - path_conflicts(nrb, blocker, pcb_true); + path_conflicts(nrb, blocker, rnd_true); /* and make an expansion edge */ nrb->cost_point = rnd_closest_cheap_point_in_box(&nrb->cost_point, &blocker->sbox); nrb->cost += @@ -2933,7 +2933,7 @@ rb->flags.is_odd = AutoRouteParameters.is_odd; rb->flags.is_bad = is_bad; rb->came_from = RND_ANY_DIR; - rb->flags.circular = pcb_true; + rb->flags.circular = rnd_true; rb->style = AutoRouteParameters.style; rb->pass = AutoRouteParameters.pass; if (first_via == NULL) { @@ -3055,7 +3055,7 @@ /* and to the via space structures */ if (AutoRouteParameters.use_vias) mtspace_add(rd->mtspace, &rb->box, rb->flags.is_odd ? ODD : EVEN, rb->style->Clearance); - usedGroup[rb->group] = pcb_true; + usedGroup[rb->group] = rnd_true; /* and queue this one */ qX1 = X1; qY1 = Y1; @@ -3076,12 +3076,12 @@ { rnd_cheap_point_t knee = start; if (end.X == start.X) { - RD_DrawLine(rd, start.X, start.Y, end.X, end.Y, halfthick, group, subnet, is_bad, pcb_false); - return pcb_false; + RD_DrawLine(rd, start.X, start.Y, end.X, end.Y, halfthick, group, subnet, is_bad, rnd_false); + return rnd_false; } else if (end.Y == start.Y) { - RD_DrawLine(rd, start.X, start.Y, end.X, end.Y, halfthick, group, subnet, is_bad, pcb_false); - return pcb_true; + RD_DrawLine(rd, start.X, start.Y, end.X, end.Y, halfthick, group, subnet, is_bad, rnd_false); + return rnd_true; } /* find where knee belongs */ if (rnd_point_in_box(box1, end.X, start.Y) @@ -3103,8 +3103,8 @@ if (1 || !AutoRouteParameters.is_smoothing) { /* draw standard manhattan paths */ - RD_DrawLine(rd, start.X, start.Y, knee.X, knee.Y, halfthick, group, subnet, is_bad, pcb_false); - RD_DrawLine(rd, knee.X, knee.Y, end.X, end.Y, halfthick, group, subnet, is_bad, pcb_false); + RD_DrawLine(rd, start.X, start.Y, knee.X, knee.Y, halfthick, group, subnet, is_bad, rnd_false); + RD_DrawLine(rd, knee.X, knee.Y, end.X, end.Y, halfthick, group, subnet, is_bad, rnd_false); } else { /* draw 45-degree path across knee */ @@ -3118,9 +3118,9 @@ kneeend.Y += (kneeend.Y > end.Y) ? -len45 : len45; else kneeend.X += (kneeend.X > end.X) ? -len45 : len45; - RD_DrawLine(rd, start.X, start.Y, kneestart.X, kneestart.Y, halfthick, group, subnet, is_bad, pcb_false); - RD_DrawLine(rd, kneestart.X, kneestart.Y, kneeend.X, kneeend.Y, halfthick, group, subnet, is_bad, pcb_true); - RD_DrawLine(rd, kneeend.X, kneeend.Y, end.X, end.Y, halfthick, group, subnet, is_bad, pcb_false); + RD_DrawLine(rd, start.X, start.Y, kneestart.X, kneestart.Y, halfthick, group, subnet, is_bad, rnd_false); + RD_DrawLine(rd, kneestart.X, kneestart.Y, kneeend.X, kneeend.Y, halfthick, group, subnet, is_bad, rnd_true); + RD_DrawLine(rd, kneeend.X, kneeend.Y, end.X, end.Y, halfthick, group, subnet, is_bad, rnd_false); } return (knee.X != end.X); } @@ -3170,7 +3170,7 @@ static void TracePath(routedata_t * rd, routebox_t * path, const routebox_t * target, routebox_t * subnet, rnd_bool is_bad) { - rnd_bool last_x = pcb_false; + rnd_bool last_x = rnd_false; rnd_coord_t halfwidth = HALF_THICK(AutoRouteParameters.style->Thick); rnd_coord_t radius = HALF_THICK(AutoRouteParameters.style->Diameter); rnd_cheap_point_t lastpoint, nextpoint; @@ -3221,7 +3221,7 @@ b = rnd_shrink_box(&b, MIN(b.X2 - b.X1, b.Y2 - b.Y1) / 5); nextpoint = rnd_closest_cheap_point_in_box(&lastpoint, &b); if (AutoRouteParameters.last_smooth) - RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, pcb_true); + RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, rnd_true); else last_x = RD_DrawManhattanLine(rd, &target->sbox, &path->sbox, lastpoint, nextpoint, halfwidth, path->group, subnet, is_bad, last_x); @@ -3265,7 +3265,7 @@ /* knee is placed in lastpath box */ /* should never cause line to leave union of lastpath/path boxes */ if (AutoRouteParameters.last_smooth) - RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, pcb_true); + RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, rnd_true); else last_x = RD_DrawManhattanLine(rd, &lastpath->sbox, &path->sbox, lastpoint, nextpoint, halfwidth, path->group, subnet, is_bad, last_x); @@ -3296,7 +3296,7 @@ add_clearance(&lastpoint, &b); #else if (AutoRouteParameters.last_smooth) - RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, pcb_true); + RD_DrawLine(rd, lastpoint.X, lastpoint.Y, nextpoint.X, nextpoint.Y, halfwidth, path->group, subnet, is_bad, rnd_true); else #endif last_x = RD_DrawManhattanLine(rd, &b, &b, nextpoint, lastpoint, halfwidth, path->group, subnet, is_bad, last_x); @@ -3314,7 +3314,7 @@ } while (!path->flags.source); /* flush the line queue */ - RD_DrawLine(rd, -1, 0, 0, 0, 0, 0, NULL, pcb_false, pcb_false); + RD_DrawLine(rd, -1, 0, 0, 0, 0, 0, NULL, rnd_false, rnd_false); if (conf_core.editor.live_routing) pcb_draw(); @@ -3524,9 +3524,9 @@ routebox_t *p; LIST_LOOP(rb, same_net, p); if (p->flags.source && p->parent.pad->ID == id) - return pcb_true; + return rnd_true; PCB_END_LOOP; - return pcb_false; + return rnd_false; } static void trace_parents(routebox_t * rb) @@ -3580,7 +3580,7 @@ return PCB_R_DIR_NOT_FOUND; else { routebox_t *dis = (routebox_t *) cl; - path_conflicts(dis, rb, pcb_false); + path_conflicts(dis, rb, rnd_false); touch_conflicts(dis->conflicts_with, 1); } return PCB_R_DIR_FOUND_CONTINUE; @@ -3672,14 +3672,14 @@ LIST_LOOP(from, same_net, p); p->flags.source = p->flags.target = p->flags.nobloat = 0; PCB_END_LOOP; - result.found_route = pcb_false; - result.net_completely_routed = pcb_true; + result.found_route = rnd_false; + result.net_completely_routed = rnd_true; result.best_route_cost = 0; result.route_had_conflicts = 0; return result; } - result.net_completely_routed = pcb_false; + result.net_completely_routed = rnd_false; /* okay, there's stuff to route */ assert(!from->flags.target); @@ -3798,7 +3798,7 @@ edge_t *ne; routebox_t *nrb; assert(pin->flags.target); - nrb = CreateExpansionArea(&b, e->rb->group, e->rb, pcb_true, e); + nrb = CreateExpansionArea(&b, e->rb->group, e->rb, rnd_true, e); nrb->flags.is_thermal = 1; /* moving through the plane is free */ e->cost_point.X = b.X1; @@ -3812,11 +3812,11 @@ if (AutoRouteParameters.use_vias && e->cost + AutoRouteParameters.ViaCost < s.best_cost) { /* we need a giant thermal */ routebox_t *nrb = CreateExpansionArea(&e->rb->sbox, e->rb->group, e->rb, - pcb_true, e); + rnd_true, e); edge_t *ne = CreateEdge2(nrb, e->expand_dir, e, NULL, e->minpcb_cost_target); nrb->flags.is_thermal = 1; - add_via_sites(&s, &vss, rd->mtspace, nrb, NO_CONFLICT, ne, targets, e->rb->style->Diameter, pcb_true); + add_via_sites(&s, &vss, rd->mtspace, nrb, NO_CONFLICT, ne, targets, e->rb->style->Diameter, rnd_true); } } goto dontexpand; /* planes only connect via thermals */ @@ -3840,7 +3840,7 @@ rnd_rnd_box_t b = shrink_routebox(e->rb); /* limit via region to that inside the plane */ rnd_clip_box(&b, &intersecting->sbox); - nrb = CreateExpansionArea(&b, e->rb->group, e->rb, pcb_true, e); + nrb = CreateExpansionArea(&b, e->rb->group, e->rb, rnd_true, e); nrb->flags.is_thermal = 1; ne = CreateEdge2(nrb, e->expand_dir, e, NULL, intersecting); best_path_candidate(&s, ne, intersecting); @@ -3990,7 +3990,7 @@ if (!rnd_box_is_good(&ans->inflated)) goto dontexpand; - nrb = CreateExpansionArea(&ans->inflated, e->rb->group, e->rb, pcb_true, e); + nrb = CreateExpansionArea(&ans->inflated, e->rb->group, e->rb, rnd_true, e); pcb_r_insert_entry(rd->layergrouptree[nrb->group], &nrb->box); vector_append(area_vec, nrb); nrb->flags.homeless = 0; /* not homeless any more */ @@ -4003,7 +4003,7 @@ /* add in possible via sites in nrb */ if (AutoRouteParameters.use_vias && !e->rb->flags.is_via && e->cost + AutoRouteParameters.ViaCost < s.best_cost) - add_via_sites(&s, &vss, rd->mtspace, nrb, NO_CONFLICT, e, targets, 0, pcb_false); + add_via_sites(&s, &vss, rd->mtspace, nrb, NO_CONFLICT, e, targets, 0, rnd_false); goto dontexpand; } dontexpand: @@ -4021,7 +4021,7 @@ #ifdef ROUTE_VERBOSE printf("%d:%d RC %.0f", ro++, seen, s.best_cost); #endif - result.found_route = pcb_true; + result.found_route = rnd_true; result.best_route_cost = s.best_cost; /* determine if the best path had conflicts */ result.route_had_conflicts = 0; @@ -4045,7 +4045,7 @@ #ifdef ROUTE_VERBOSE printf(" (too many in fact)"); #endif - result.found_route = pcb_false; + result.found_route = rnd_false; } #ifdef ROUTE_VERBOSE printf("\n"); @@ -4056,7 +4056,7 @@ printf("%d:%d NO PATH FOUND.\n", ro++, seen); #endif result.best_route_cost = s.best_cost; - result.found_route = pcb_false; + result.found_route = rnd_false; } /* now remove all expansion areas from the r-tree. */ while (!vector_is_empty(area_vec)) { @@ -4130,9 +4130,9 @@ big.Y2 = RND_MAX_COORD; for (i = 0; i < pcb_max_group(PCB); i++) { if (pcb_r_search(rd->layergrouptree[i], &big, NULL, bad_boy, NULL, NULL)) - return pcb_false; + return rnd_false; } - return pcb_true; + return rnd_true; } #endif @@ -4248,12 +4248,12 @@ if (i > 0) { /* rip up all unfixed traces in this net ? */ if (AutoRouteParameters.rip_always) - rip = pcb_true; + rip = rnd_true; else { - rip = pcb_false; + rip = rnd_false; LIST_LOOP(net, same_net, p); if (p->flags.is_bad) { - rip = pcb_true; + rip = rnd_true; break; } PCB_END_LOOP; @@ -4484,10 +4484,10 @@ /* paths go on first 'on' layer in group */ -/* returns 'pcb_true' if any paths were added. */ +/* returns 'rnd_true' if any paths were added. */ rnd_bool IronDownAllUnfixedPaths(routedata_t * rd) { - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; pcb_layer_t *layer; routebox_t *net, *p; int i; @@ -4533,7 +4533,7 @@ if (p->parent.line) { pcb_undo_add_obj_to_create(PCB_OBJ_LINE, layer, p->parent.line, p->parent.line); - changed = pcb_true; + changed = rnd_true; } } else if (p->type == VIA || p->type == VIA_SHADOW) { @@ -4553,7 +4553,7 @@ PCB_FLAG_SET(PCB_FLAG_AUTO, pp->parent.via); if (pp->parent.via) { pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, pp->parent.via, pp->parent.via, pp->parent.via); - changed = pcb_true; + changed = rnd_true; } } assert(pp->parent.via); @@ -4577,13 +4577,13 @@ /* thermals are alread a single point search, no need to shrink */ int type = FindPin(&p->box, &pin); if (pin) { - pcb_undo_add_obj_to_clear_poly(type, pin->parent.data, pin, pin, pcb_false); + pcb_undo_add_obj_to_clear_poly(type, pin->parent.data, pin, pin, rnd_false); pcb_poly_restore_to_poly(PCB->Data, PCB_OBJ_PSTK, pcb_get_layer(PCB->Data, p->layer), pin); pcb_undo_add_obj_to_flag(pin); PCB_FLAG_THERM_ASSIGN(p->layer, autoroute_therm_style, pin); - pcb_undo_add_obj_to_clear_poly(type, pin->parent.data, pin, pin, pcb_true); + pcb_undo_add_obj_to_clear_poly(type, pin->parent.data, pin, pin, rnd_true); pcb_poly_clear_from_poly(PCB->Data, PCB_OBJ_PSTK, pcb_get_layer(PCB->Data, p->layer), pin); - changed = pcb_true; + changed = rnd_true; } } } @@ -4595,7 +4595,7 @@ rnd_bool AutoRoute(rnd_bool selected) { - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; routedata_t *rd; int i; @@ -4614,15 +4614,15 @@ if (PCB->RouteStyle.array[i].Thick == 0 || PCB->RouteStyle.array[i].Diameter == 0 || PCB->RouteStyle.array[i].Hole == 0 || PCB->RouteStyle.array[i].Clearance == 0) { rnd_message(RND_MSG_ERROR, "You must define proper routing styles\n" "before auto-routing.\n"); - return pcb_false; + return rnd_false; } } if (ratlist_length(&PCB->Data->Rat) == 0) - return pcb_false; + return rnd_false; rd = CreateRouteData(); if (rd == NULL) { rnd_message(RND_MSG_ERROR, "Failed to initialize data; might be missing\n" "top or bottom copper layer.\n"); - return pcb_false; + return rnd_false; } if (1) { @@ -4660,7 +4660,7 @@ } */ /* route exactly one net, without allowing conflicts */ - InitAutoRouteParameters(0, a->style, pcb_false, pcb_true, pcb_true); + InitAutoRouteParameters(0, a->style, rnd_false, rnd_true, rnd_true); /* hace planes work better as sources than targets */ changed = RouteOne(rd, a, b, 150000).found_route || changed; goto donerouting; @@ -4708,7 +4708,7 @@ if (!a || !b) { #ifdef DEBUG_STALE_RATS pcb_undo_add_obj_to_flag(line); - PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, pcb_true, line); + PCB_FLAG_ASSIGN(PCB_FLAG_SELECTED, rnd_true, line); pcb_rat_invalidate_draw(line, 0); #endif /* DEBUG_STALE_RATS */ rnd_message(RND_MSG_ERROR, "The rats nest is stale! Aborting autoroute...\n"); @@ -4767,7 +4767,7 @@ pcb_undo_save_serial(); /* optimize rats, we've changed connectivity a lot. */ - pcb_rats_destroy(pcb_false /*all rats */ ); + pcb_rats_destroy(rnd_false /*all rats */ ); pcb_undo_restore_serial(); pcb_net_add_all_rats(PCB, PCB_RATACC_PRECISE); pcb_undo_restore_serial(); Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 31010) +++ trunk/src_plugins/autoroute/mtspace.c (revision 31011) @@ -309,8 +309,8 @@ * anything. If a region does intersect something, it is broken into * pieces that don't intersect that thing (if possible) which are * put back into the vector/heap of regions to check. - * qloop returns pcb_false when it finds the first empty region - * it returns pcb_true if it has exhausted the region vector/heap and never + * qloop returns rnd_false when it finds the first empty region + * it returns rnd_true if it has exhausted the region vector/heap and never * found an empty area. */ static void qloop(struct query_closure *qc, rnd_rtree_t * tree, heap_or_vector res, rnd_bool is_vec) @@ -449,7 +449,7 @@ */ qc.checking = work->untested; qc.touching.v = NULL; - qloop(&qc, mtspace->ftree, work->no_fix, pcb_false); + qloop(&qc, mtspace->ftree, work->no_fix, rnd_false); /* search the hi-conflict tree placing intersectors in the * hi_candidate vector (if conflicts are allowed) and * placing empty regions in the no_hi vector. @@ -456,8 +456,8 @@ */ qc.checking.v = work->no_fix.v; qc.touching.v = with_conflicts ? work->hi_candidate.v : NULL; - qc.touch_is_vec = pcb_false; - qloop(&qc, is_odd ? mtspace->otree : mtspace->etree, work->no_hi, pcb_false); + qc.touch_is_vec = rnd_false; + qloop(&qc, is_odd ? mtspace->otree : mtspace->etree, work->no_hi, rnd_false); /* search the lo-conflict tree placing intersectors in the * lo-conflict answer vector (if conflicts allowed) and * placing emptry regions in the free-space answer vector. @@ -465,10 +465,10 @@ qc.checking = work->no_hi; /* XXX lo_conflict_space_vec will be treated like a heap! */ qc.touching.v = (with_conflicts ? lo_conflict_space_vec : NULL); - qc.touch_is_vec = pcb_true; - qloop(&qc, is_odd ? mtspace->etree : mtspace->otree, temporary, pcb_true); + qc.touch_is_vec = rnd_true; + qloop(&qc, is_odd ? mtspace->etree : mtspace->otree, temporary, rnd_true); - /* qloop (&qc, is_odd ? mtspace->etree : mtspace->otree, (heap_or_vector)free_space_vec, pcb_true); */ + /* qloop (&qc, is_odd ? mtspace->etree : mtspace->otree, (heap_or_vector)free_space_vec, rnd_true); */ if (!vector_is_empty(free_space_vec)) { if (qc.desired) { if (rnd_heap_is_empty(work->untested.h)) @@ -490,10 +490,10 @@ qc.checking = work->hi_candidate; qc.touching.v = NULL; - qloop(&qc, is_odd ? mtspace->etree : mtspace->otree, temporary, pcb_true); + qloop(&qc, is_odd ? mtspace->etree : mtspace->otree, temporary, rnd_true); /* qloop (&qc, is_odd ? mtspace->etree : mtspace->otree, */ - /* (heap_or_vector)hi_conflict_space_vec, pcb_true); */ + /* (heap_or_vector)hi_conflict_space_vec, rnd_true); */ } } while (!(qc.desired ? rnd_heap_is_empty(work->untested.h) : vector_is_empty(work->untested.v))); Index: trunk/src_plugins/cam/cam_gui.c =================================================================== --- trunk/src_plugins/cam/cam_gui.c (revision 31010) +++ trunk/src_plugins/cam/cam_gui.c (revision 31011) @@ -337,7 +337,7 @@ RND_DAD_END(ctx->dlg); RND_DAD_END(ctx->dlg); - RND_DAD_NEW("cam", ctx->dlg, "CAM export", ctx, pcb_false, cam_close_cb); + RND_DAD_NEW("cam", ctx->dlg, "CAM export", ctx, rnd_false, cam_close_cb); { /* set default outfile */ rnd_hid_attr_val_t hv; Index: trunk/src_plugins/ddraft/centgeo.c =================================================================== --- trunk/src_plugins/ddraft/centgeo.c (revision 31010) +++ trunk/src_plugins/ddraft/centgeo.c (revision 31011) @@ -113,7 +113,7 @@ } /* intersection is at least on CD */ - /* [removed this case since it always returns pcb_false --asp] */ + /* [removed this case since it always returns rnd_false --asp] */ return 0; } Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 31010) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 31011) @@ -324,7 +324,7 @@ /* set up the context */ cnstgui_ctx.active = 1; - RND_DAD_NEW("constraint", cnstgui_ctx.dlg, "Drawing constraints", &cnstgui_ctx, pcb_false, cnstgui_close_cb); + RND_DAD_NEW("constraint", cnstgui_ctx.dlg, "Drawing constraints", &cnstgui_ctx, rnd_false, cnstgui_close_cb); cons_changed(); Index: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 31010) +++ trunk/src_plugins/ddraft/ddraft.c (revision 31011) @@ -513,7 +513,7 @@ NULL, NULL, NULL, /* escape */ - pcb_false + rnd_false }; Index: trunk/src_plugins/dialogs/dlg_about.c =================================================================== --- trunk/src_plugins/dialogs/dlg_about.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_about.c (revision 31011) @@ -105,7 +105,7 @@ about_ctx.active = 1; /* this is the modal version - please consider using the non-modal version */ - RND_DAD_NEW("about", about_ctx.dlg, "About pcb-rnd", &about_ctx, pcb_false, about_close_cb); + RND_DAD_NEW("about", about_ctx.dlg, "About pcb-rnd", &about_ctx, rnd_false, about_close_cb); } const char pcb_acts_About[] = "About()\n"; Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 31011) @@ -248,7 +248,7 @@ /* set up the context */ export_ctx.active = 1; - RND_DAD_NEW("export", export_ctx.dlg, title, &export_ctx, pcb_false, export_close_cb); + RND_DAD_NEW("export", export_ctx.dlg, title, &export_ctx, rnd_false, export_close_cb); } const char pcb_acts_ExportGUI[] = "ExportGUI()\n"; Index: trunk/src_plugins/dialogs/dlg_flag_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 31011) @@ -146,7 +146,7 @@ ctx.attrs = dlg; - RND_DAD_NEW("flags", dlg, "Edit flags", &ctx, pcb_true, NULL); + RND_DAD_NEW("flags", dlg, "Edit flags", &ctx, rnd_true, NULL); val.func = fe_attr_chg; rnd_gui->attr_dlg_property(dlg_hid_ctx, RND_HATP_GLOBAL_CALLBACK, &val); Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 31011) @@ -369,7 +369,7 @@ ctx.attrs = dlg; RND_DAD_DEFSIZE(dlg, 500, 500); - RND_DAD_NEW("layer_binding", dlg, "Layer bindings", &ctx, pcb_true, NULL); + RND_DAD_NEW("layer_binding", dlg, "Layer bindings", &ctx, rnd_true, NULL); val.func = lb_attr_chg; rnd_gui->attr_dlg_property(dlg_hid_ctx, RND_HATP_GLOBAL_CALLBACK, &val); lb_data2dialog(dlg_hid_ctx, &ctx); Index: trunk/src_plugins/dialogs/dlg_layer_flags.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 31011) @@ -75,13 +75,13 @@ pcb_layer_combining_t comb = 0; if (strcmp(ly->name, dlg[wname].val.str) != 0) { ar |= pcb_layer_rename_(ly, (char *)dlg[wname].val.str, 1); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } if (dlg[wsub].val.lng) comb |= PCB_LYC_SUB; if (dlg[wauto].val.lng) comb |= PCB_LYC_AUTO; if (ly->comb != comb) { ly->comb = comb; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } else @@ -168,7 +168,7 @@ if (strcmp(g->name, dlg[wname].val.str) != 0) { ar |= pcb_layergrp_rename_(g, (char *)dlg[wname].val.str, 1); dlg[wname].val.str = NULL; - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } if (dlg[wtype].val.lng != orig_type) { @@ -207,7 +207,7 @@ } if (changed) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); } } Index: trunk/src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 31011) @@ -393,7 +393,7 @@ return; from_pid = strtol(r->cell[0], NULL, 10); - to_pid = pcb_dlg_pstklib(ctx->pcb, ctx->subc_id, pcb_true, "Select a prototype to switch to"); + to_pid = pcb_dlg_pstklib(ctx->pcb, ctx->subc_id, rnd_true, "Select a prototype to switch to"); if ((to_pid == PCB_PADSTACK_INVALID) || (to_pid == from_pid)) return; @@ -432,7 +432,7 @@ box.Y1 = -RND_MAX_COORD; box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - if (pcb_select_block(PCB, &box, pcb_false, pcb_false, pcb_false)) + if (pcb_select_block(PCB, &box, rnd_false, rnd_false, rnd_false)) changed = 1; for(ps = padstacklist_first(&data->padstack); ps != NULL; ps = padstacklist_next(ps)) { @@ -444,7 +444,7 @@ } if (changed) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_gui->invalidate_all(rnd_gui); } } @@ -648,7 +648,7 @@ } else rnd_PCB_ACT_MAY_CONVARG(1, FGW_LONG, pstklib, id = argv[1].val.nat_long); - if (pcb_dlg_pstklib(PCB, id, pcb_false, NULL) == PCB_PADSTACK_INVALID) + if (pcb_dlg_pstklib(PCB, id, rnd_false, NULL) == PCB_PADSTACK_INVALID) RND_ACT_IRES(-1); else RND_ACT_IRES(0); Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 31011) @@ -381,7 +381,7 @@ library_ctx_t *ctx = prv->user_ctx; int orig_po = pcb_draw_force_termlab; if (ctx->sc != NULL) { - pcb_draw_force_termlab = pcb_false; + pcb_draw_force_termlab = rnd_false; pcb_subc_draw_preview(ctx->sc, &e->view); pcb_draw_force_termlab = orig_po; } @@ -635,7 +635,7 @@ static rnd_bool library_mouse(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { - return pcb_false; + return rnd_false; } static void pcb_dlg_library(void) @@ -709,7 +709,7 @@ /* set up the context */ library_ctx.active = 1; - RND_DAD_NEW("library", library_ctx.dlg, "pcb-rnd Footprint Library", &library_ctx, pcb_false, library_close_cb); + RND_DAD_NEW("library", library_ctx.dlg, "pcb-rnd Footprint Library", &library_ctx, rnd_false, library_close_cb); library_lib2dlg(&library_ctx); rnd_gui->attr_dlg_widget_state(library_ctx.dlg_hid_ctx, library_ctx.wedit, 0); Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 31011) @@ -609,7 +609,7 @@ } pcb_pclose(f); - RND_DAD_NEW("lib_param", library_ctx.pdlg, "pcb-rnd parametric footprint", ctx, pcb_false, library_param_close_cb); + RND_DAD_NEW("lib_param", library_ctx.pdlg, "pcb-rnd parametric footprint", ctx, rnd_false, library_param_close_cb); update_edit_button(ctx); pcb_library_param_fillin(ctx, l); Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 31011) @@ -304,7 +304,7 @@ static rnd_bool netlist_mouse(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { - return pcb_false; + return rnd_false; } static void pcb_dlg_netlist(pcb_board_t *pcb) @@ -430,7 +430,7 @@ netlist_ctx.active = 1; RND_DAD_DEFSIZE(netlist_ctx.dlg, 300, 350); - RND_DAD_NEW("netlist", netlist_ctx.dlg, "pcb-rnd netlist", &netlist_ctx, pcb_false, netlist_close_cb); + RND_DAD_NEW("netlist", netlist_ctx.dlg, "pcb-rnd netlist", &netlist_ctx, rnd_false, netlist_close_cb); { rnd_hid_attr_val_t hv; Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 31011) @@ -221,7 +221,7 @@ return; subc = pcb_obj_parent_subc((pcb_any_obj_t *)pse->ps); - proto_id = pcb_dlg_pstklib(pse->pcb, (subc == NULL ? 0 : subc->ID), pcb_true, "Select a new prototype to be used on the padstack"); + proto_id = pcb_dlg_pstklib(pse->pcb, (subc == NULL ? 0 : subc->ID), rnd_true, "Select a new prototype to be used on the padstack"); if (proto_id == PCB_PADSTACK_INVALID) return; @@ -366,7 +366,7 @@ pcb_pstkop_clip(&ctx, pse->ps); for(n = 0; n < proto->tr.used; n++) - pcb_pstk_shape_clr_grow(proto, n, sidx, pcb_true, pse->attrs[pse->proto_clr[idx]].val.crd, 1); + pcb_pstk_shape_clr_grow(proto, n, sidx, rnd_true, pse->attrs[pse->proto_clr[idx]].val.crd, 1); ctx.clip.clear = 1; ctx.clip.restore = 0; @@ -538,7 +538,7 @@ bloat *= sign; for(n = 0; n < proto->tr.used; n++) - pcb_pstk_shape_grow(proto, n, dst_idx, pcb_false, bloat, 1); + pcb_pstk_shape_grow(proto, n, dst_idx, rnd_false, bloat, 1); pcb_pstk_proto_update(proto); @@ -630,7 +630,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("padstack_shape", dlg, "Edit padstack shape", pse, pcb_true, NULL); + RND_DAD_NEW("padstack_shape", dlg, "Edit padstack shape", pse, rnd_true, NULL); pse->shape_chg = dlg; /* pse_ps2dlg(dlg_hid_ctx, pse);*/ @@ -987,7 +987,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("padstack", dlg, "Edit padstack", pse, pcb_true, NULL); + RND_DAD_NEW("padstack", dlg, "Edit padstack", pse, rnd_true, NULL); pse->attrs = dlg; pse_ps2dlg(dlg_hid_ctx, pse); if (target_tab > 0) Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 31011) @@ -65,7 +65,7 @@ if (type == PCB_OBJ_SUBC) { pcb_subc_t *sc = r2; int orig_po = pcb_draw_force_termlab; - pcb_draw_force_termlab = pcb_true; + pcb_draw_force_termlab = rnd_true; pcb_subc_draw_preview(sc, &e->view); pcb_draw_force_termlab = orig_po; } @@ -121,7 +121,7 @@ type = pcb_search_obj_by_id_(ctx->data, &r1, &r2, &r3, ctx->subc_id, PCB_OBJ_SUBC); if (type != PCB_OBJ_SUBC) - return pcb_false; + return rnd_false; ctx->tempsc = r2; b.X1 = x; @@ -132,7 +132,7 @@ ctx->tempsc = NULL; } - return pcb_false; + return rnd_false; } static void pcb_dlg_pinout(pcb_board_t *pcb, pcb_data_t *data, pcb_subc_t *sc) @@ -168,7 +168,7 @@ sprintf(title, "Subcircuit #%ld (%s) pinout", sc->ID, sc->refdes); else sprintf(title, "Subcircuit #%ld pinout", sc->ID); - RND_DAD_NEW("pinout", ctx->dlg, title, ctx, pcb_false, pinout_close_cb); + RND_DAD_NEW("pinout", ctx->dlg, title, ctx, rnd_false, pinout_close_cb); } static const char pcb_acts_Pinout[] = "Pinout()\n"; Index: trunk/src_plugins/dialogs/dlg_plugins.c =================================================================== --- trunk/src_plugins/dialogs/dlg_plugins.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_plugins.c (revision 31011) @@ -79,7 +79,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("plugins", dlg, "Manage plugins", NULL, pcb_true, NULL); + RND_DAD_NEW("plugins", dlg, "Manage plugins", NULL, rnd_true, NULL); RND_DAD_RUN(dlg); RND_DAD_FREE(dlg); Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 31011) @@ -322,7 +322,7 @@ /* set up the context */ pref_ctx.active = 1; - RND_DAD_NEW("preferences", pref_ctx.dlg, "pcb-rnd preferences", &pref_ctx, pcb_false, pref_close_cb); + RND_DAD_NEW("preferences", pref_ctx.dlg, "pcb-rnd preferences", &pref_ctx, rnd_false, pref_close_cb); RND_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, pref_ctx.wrole, lng, 2); pref_ctx.role = RND_CFR_DESIGN; Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 31011) @@ -393,7 +393,7 @@ RND_DAD_BUTTON_CLOSES(ctx->dlg, clbtn); RND_DAD_END(ctx->dlg); - RND_DAD_NEW("pref_confedit", ctx->dlg, "pcb-rnd conf item", ctx, pcb_false, pref_conf_edit_close_cb); + RND_DAD_NEW("pref_confedit", ctx->dlg, "pcb-rnd conf item", ctx, rnd_false, pref_conf_edit_close_cb); if (is_read_only(ctx)) { int n; Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 31011) @@ -114,7 +114,7 @@ rnd_conf_loop_list_str(&conf_core.rc.library_search_paths, i, s, idx) { char *tmp; cell[0] = rnd_strdup(i->payload); - rnd_path_resolve(&PCB->hidlib, cell[0], &tmp, 0, pcb_false); + rnd_path_resolve(&PCB->hidlib, cell[0], &tmp, 0, rnd_false); cell[1] = rnd_strdup(tmp == NULL ? "" : tmp); cell[2] = rnd_strdup(pref_node_src(i->prop.src)); cell[3] = NULL; @@ -262,7 +262,7 @@ cell_edit_ctx_t *ctx = caller_data; char *tmp; - rnd_path_resolve(&PCB->hidlib, ctx->dlg[ctx->wpath].val.str, &tmp, 0, pcb_true); + rnd_path_resolve(&PCB->hidlib, ctx->dlg[ctx->wpath].val.str, &tmp, 0, rnd_true); if (tmp != NULL) RND_DAD_SET_VALUE(hid_ctx, ctx->wexp, str, tmp); } @@ -295,7 +295,7 @@ RND_DAD_BUTTON_CLOSES(ctx.dlg, clbtn); RND_DAD_END(ctx.dlg); - RND_DAD_NEW("pref_lib_path", ctx.dlg, "Edit library path", &ctx, pcb_true, NULL); + RND_DAD_NEW("pref_lib_path", ctx.dlg, "Edit library path", &ctx, rnd_true, NULL); if (RND_DAD_RUN(ctx.dlg) != 0) { RND_DAD_FREE(ctx.dlg); return -1; @@ -420,7 +420,7 @@ RND_DAD_END(ctx->dlg); ctx->active = 1; - RND_DAD_NEW("pref_lib_path_help", ctx->dlg, "pcb-rnd preferences: library help", ctx, pcb_true, pref_libhelp_close_cb); + RND_DAD_NEW("pref_lib_path_help", ctx->dlg, "pcb-rnd preferences: library help", ctx, rnd_true, pref_libhelp_close_cb); RND_DAD_RUN(ctx->dlg); RND_DAD_FREE(ctx->dlg); Index: trunk/src_plugins/dialogs/dlg_search.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_search.c (revision 31011) @@ -409,7 +409,7 @@ RND_DAD_END(ctx->dlg); RND_DAD_DEFSIZE(ctx->dlg, 300, 350); - RND_DAD_NEW("search", ctx->dlg, "pcb-rnd search", ctx, pcb_false, search_close_cb); + RND_DAD_NEW("search", ctx->dlg, "pcb-rnd search", ctx, rnd_false, search_close_cb); ctx->visible[0][0] = 1; update_vis(ctx); Index: trunk/src_plugins/dialogs/dlg_search_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search_edit.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_search_edit.c (revision 31011) @@ -347,7 +347,7 @@ RND_DAD_END(ctx->dlg); RND_DAD_DEFSIZE(ctx->dlg, 450, 450); - RND_DAD_NEW("search_expr", ctx->dlg, "pcb-rnd search expression", ctx, pcb_true, NULL); + RND_DAD_NEW("search_expr", ctx->dlg, "pcb-rnd search expression", ctx, rnd_true, NULL); if (fill_in_left(ctx) != 1) { srch_expr_set_ops(ctx, op_tab, 1); /* just to get the initial tree widget width */ Index: trunk/src_plugins/dialogs/dlg_undo.c =================================================================== --- trunk/src_plugins/dialogs/dlg_undo.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_undo.c (revision 31011) @@ -50,17 +50,17 @@ static void cb_undo(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_undo(pcb_true); + pcb_undo(rnd_true); } static void cb_redo(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_redo(pcb_true); + pcb_redo(rnd_true); } static void cb_clear(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_undo_clear_list(pcb_true); + pcb_undo_clear_list(rnd_true); } @@ -144,7 +144,7 @@ undo_ctx.active = 1; RND_DAD_DEFSIZE(undo_ctx.dlg, 300, 400); - RND_DAD_NEW("undo", undo_ctx.dlg, "pcb-rnd undo list", &undo_ctx, pcb_false, undo_close_cb); + RND_DAD_NEW("undo", undo_ctx.dlg, "pcb-rnd undo list", &undo_ctx, rnd_false, undo_close_cb); undo_data2dlg(&undo_ctx); } Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 31010) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 31011) @@ -258,7 +258,7 @@ static rnd_bool view_mouse_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { - return pcb_false; /* don't redraw */ + return rnd_false; /* don't redraw */ } void view_refresh(view_ctx_t *ctx) @@ -519,7 +519,7 @@ } if (chg) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); view_preview_update(ctx); } } @@ -654,7 +654,7 @@ RND_DAD_END(ctx->dlg); RND_DAD_END(ctx->dlg); - RND_DAD_NEW(id, ctx->dlg, title, ctx, pcb_false, view_close_cb); + RND_DAD_NEW(id, ctx->dlg, title, ctx, rnd_false, view_close_cb); ctx->active = 1; } @@ -712,7 +712,7 @@ RND_DAD_END(ctx->dlg); - RND_DAD_NEW(id, ctx->dlg, title, ctx, pcb_false, view_close_cb); + RND_DAD_NEW(id, ctx->dlg, title, ctx, rnd_false, view_close_cb); ctx->active = 1; Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 31010) +++ trunk/src_plugins/djopt/djopt.c (revision 31011) @@ -2442,7 +2442,7 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, DJopt, arg = argv[1].val.str); #ifdef ENDIF - SwitchDrawingWindow(PCB->Zoom, Output.drawing_area->window, conf_core.editor.show_solder_side, pcb_false); + SwitchDrawingWindow(PCB->Zoom, Output.drawing_area->window, conf_core.editor.show_solder_side, rnd_false); #endif rnd_hid_busy(PCB, 1); Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 31010) +++ trunk/src_plugins/drc_query/dlg.c (revision 31011) @@ -315,7 +315,7 @@ free(info); RND_DAD_DEFSIZE(ctx->dlg, 200, 400); - RND_DAD_NEW("drc_query_rule_edit", ctx->dlg, "drc_query: rule editor", ctx, pcb_false, rule_edit_close_cb); + RND_DAD_NEW("drc_query_rule_edit", ctx->dlg, "drc_query: rule editor", ctx, rnd_false, rule_edit_close_cb); drc_rule_pcb2dlg(ctx); @@ -619,7 +619,7 @@ drc_rlist_ctx.active = 1; RND_DAD_DEFSIZE(drc_rlist_ctx.dlg, 550, 400); - RND_DAD_NEW("drc_query_list", drc_rlist_ctx.dlg, "drc_query: list of rules", &drc_rlist_ctx, pcb_false, drc_rlist_close_cb); + RND_DAD_NEW("drc_query_list", drc_rlist_ctx.dlg, "drc_query: list of rules", &drc_rlist_ctx, rnd_false, drc_rlist_close_cb); RND_DAD_SET_VALUE(drc_rlist_ctx.dlg_hid_ctx, wpane, dbl, 0.5); drc_rlist_pcb2dlg(); return 0; Index: trunk/src_plugins/drc_query/drc_query.c =================================================================== --- trunk/src_plugins/drc_query/drc_query.c (revision 31010) +++ trunk/src_plugins/drc_query/drc_query.c (revision 31011) @@ -262,13 +262,13 @@ if (rnd_conf_get_field(path) == NULL) { const char *sdesc; rnd_conf_native_t *nat; - pcb_bool_t *b; + rnd_bool_t *b; lht_node_t *ndesc; ndesc = lht_dom_hash_get(nd, "desc"); if ((ndesc != NULL) && (ndesc->type == LHT_TEXT)) sdesc = ndesc->data.text.value; - b = calloc(sizeof(pcb_bool_t), 1); + b = calloc(sizeof(rnd_bool_t), 1); nat = rnd_conf_reg_field_(b, 1, RND_CFN_BOOLEAN, path, rnd_strdup(sdesc), 0); if (nat == NULL) { free(b); Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 31010) +++ trunk/src_plugins/export_gerber/gerber.c (revision 31011) @@ -720,7 +720,7 @@ static void gerber_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { - rnd_bool m = pcb_false; + rnd_bool m = rnd_false; int i; int firstTime = 1; rnd_coord_t startX = 0, startY = 0; @@ -734,12 +734,12 @@ fprintf(f, "G36*\r\n"); for (i = 0; i < n_coords; i++) { if (x[i]+dx != lastX) { - m = pcb_true; + m = rnd_true; lastX = x[i]+dx; rnd_fprintf(f, "X%[4]", gerberX(PCB, lastX)); } if (y[i]+dy != lastY) { - m = pcb_true; + m = rnd_true; lastY = y[i]+dy; rnd_fprintf(f, "Y%[4]", gerberY(PCB, lastY)); } @@ -752,15 +752,15 @@ } else if (m) fprintf(f, "D01*\r\n"); - m = pcb_false; + m = rnd_false; } if (startX != lastX) { - m = pcb_true; + m = rnd_true; lastX = startX; rnd_fprintf(f, "X%[4]", gerberX(PCB, startX)); } if (startY != lastY) { - m = pcb_true; + m = rnd_true; lastY = startY; rnd_fprintf(f, "Y%[4]", gerberY(PCB, lastY)); } @@ -776,7 +776,7 @@ static void gerber_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { - rnd_bool m = pcb_false; + rnd_bool m = rnd_false; if (line_slots) { rnd_coord_t dia = gc->width/2; @@ -817,12 +817,12 @@ return; if (x1 != lastX) { - m = pcb_true; + m = rnd_true; lastX = x1; rnd_fprintf(f, "X%[4]", gerberX(PCB, lastX)); } if (y1 != lastY) { - m = pcb_true; + m = rnd_true; lastY = y1; rnd_fprintf(f, "Y%[4]", gerberY(PCB, lastY)); } @@ -854,7 +854,7 @@ static void gerber_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { - rnd_bool m = pcb_false; + rnd_bool m = rnd_false; double arcStartX, arcStopX, arcStartY, arcStopY; /* we never draw zero-width lines */ @@ -933,12 +933,12 @@ arcStopX = cx - width * cos(RND_TO_RADIANS(start_angle + delta_angle)); arcStopY = cy + height * sin(RND_TO_RADIANS(start_angle + delta_angle)); if (arcStartX != lastX) { - m = pcb_true; + m = rnd_true; lastX = arcStartX; rnd_fprintf(f, "X%[4]", gerberX(PCB, lastX)); } if (arcStartY != lastY) { - m = pcb_true; + m = rnd_true; lastY = arcStartY; rnd_fprintf(f, "Y%[4]", gerberY(PCB, lastY)); } Index: trunk/src_plugins/export_oldconn/oldconn.c =================================================================== --- trunk/src_plugins/export_oldconn/oldconn.c (revision 31010) +++ trunk/src_plugins/export_oldconn/oldconn.c (revision 31011) @@ -283,7 +283,7 @@ if (f != NULL) { pcb_lookup_unused_pins(f, 1); fclose(f); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } return 0; Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 31010) +++ trunk/src_plugins/export_openems/excitation.c (revision 31011) @@ -60,7 +60,7 @@ const char *orig = rnd_attribute_get(&PCB->Attributes, attrkey); if ((orig == NULL) || (strcmp(orig, data) != 0)) { rnd_attribute_put(&PCB->Attributes, attrkey, data); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } @@ -148,11 +148,11 @@ const rnd_unit_t *u; double d; if (!rnd_get_value_unit(s, NULL, 0, &d, &u)) - return pcb_false; + return rnd_false; if (u->family != PCB_UNIT_FREQ) - return pcb_false; + return rnd_false; *out = d; - return pcb_true; + return rnd_true; } /*** excitation "micro-plugins" ***/ @@ -381,7 +381,7 @@ const char *orig = rnd_attribute_get(&PCB->Attributes, "openems::excitation::type"); if ((orig == NULL) || (strcmp(orig, excitations[exc_ctx.selected].name) != 0)) { rnd_attribute_put(&PCB->Attributes, "openems::excitation::type", excitations[exc_ctx.selected].name); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } } @@ -442,7 +442,7 @@ /* set up the context */ exc_ctx.active = 1; - RND_DAD_NEW("openems_excitation", exc_ctx.dlg, "openems: excitation", &exc_ctx, pcb_false, exc_close_cb); + RND_DAD_NEW("openems_excitation", exc_ctx.dlg, "openems: excitation", &exc_ctx, rnd_false, exc_close_cb); load_selector(); select_update(1); Index: trunk/src_plugins/export_openscad/scad_models.c =================================================================== --- trunk/src_plugins/export_openscad/scad_models.c (revision 31010) +++ trunk/src_plugins/export_openscad/scad_models.c (revision 31011) @@ -33,7 +33,7 @@ if (!htsp_has(models, name)) { char buff[1024], *full_path; - fin = pcb_fopen_first(&PCB->hidlib, &conf_core.rc.library_search_paths, name, "r", &full_path, pcb_true); + fin = pcb_fopen_first(&PCB->hidlib, &conf_core.rc.library_search_paths, name, "r", &full_path, rnd_true); if (fin != NULL) { char *s, *safe_name = rnd_strdup(name); Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 31010) +++ trunk/src_plugins/export_png/png.c (revision 31011) @@ -488,7 +488,7 @@ static void png_foot(void) { const char *fmt; - rnd_bool format_error = pcb_false; + rnd_bool format_error = rnd_false; if (photo_mode) png_photo_foot(); @@ -497,27 +497,27 @@ fmt = filetypes[png_options[HA_filetype].lng]; if (fmt == NULL) - format_error = pcb_true; + format_error = rnd_true; else if (strcmp(fmt, FMT_gif) == 0) #ifdef RND_HAVE_GDIMAGEGIF gdImageGif(im, f); #else - format_error = pcb_true; + format_error = rnd_true; #endif else if (strcmp(fmt, FMT_jpg) == 0) #ifdef RND_HAVE_GDIMAGEJPEG gdImageJpeg(im, f, -1); #else - format_error = pcb_true; + format_error = rnd_true; #endif else if (strcmp(fmt, FMT_png) == 0) #ifdef RND_HAVE_GDIMAGEPNG gdImagePng(im, f); #else - format_error = pcb_true; + format_error = rnd_true; #endif else - format_error = pcb_true; + format_error = rnd_true; if (format_error) fprintf(stderr, "Error: Invalid graphic file format." " This is a bug. Please report it.\n"); @@ -538,7 +538,7 @@ png_options = options; if (options[HA_only_visible].lng) - bounds = pcb_data_bbox(&tmp, PCB->Data, pcb_false); + bounds = pcb_data_bbox(&tmp, PCB->Data, rnd_false); else bounds = ®ion; @@ -630,7 +630,7 @@ /* figure out width and height of the board */ if (options[HA_only_visible].lng) { - bbox = pcb_data_bbox(&tmp, PCB->Data, pcb_false); + bbox = pcb_data_bbox(&tmp, PCB->Data, rnd_false); x_shift = bbox->X1; y_shift = bbox->Y1; h = bbox->Y2 - bbox->Y1; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 31010) +++ trunk/src_plugins/export_ps/eps.c (revision 31011) @@ -230,7 +230,7 @@ region.Y2 = PCB->hidlib.size_y; if (options[HA_only_visible].lng) - bounds = pcb_data_bbox(&tmp, PCB->Data, pcb_false); + bounds = pcb_data_bbox(&tmp, PCB->Data, rnd_false); else bounds = ®ion; Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 31010) +++ trunk/src_plugins/export_stat/stat.c (revision 31011) @@ -335,7 +335,7 @@ if (pcb_has_explicit_outline(PCB)) { rnd_rnd_box_t bb; - pcb_data_bbox_naked(&bb, PCB->Data, pcb_true); + pcb_data_bbox_naked(&bb, PCB->Data, rnd_true); width = bb.X2 - bb.X1; height = bb.Y2 - bb.Y1; } Index: trunk/src_plugins/extedit/extedit.c =================================================================== --- trunk/src_plugins/extedit/extedit.c (revision 31010) +++ trunk/src_plugins/extedit/extedit.c (revision 31011) @@ -92,14 +92,14 @@ /* excess callbacks */ if (!ctx->stay) - return pcb_true; + return rnd_true; res = fread(tmp, 1, sizeof(tmp), ctx->fc); if (res <= 0) { ctx->stay = 0; - return pcb_false; /* also disables/removes the watch */ + return rnd_false; /* also disables/removes the watch */ } - return pcb_true; + return rnd_true; } /* Invoke the child process, display a "progress bar" or some other indication @@ -200,7 +200,7 @@ else if ((argc > 1) && (rnd_strcasecmp(cmd, "selected") == 0)) { pcb_buffer_set_number(bn); pcb_buffer_clear(PCB, PCB_PASTEBUFFER); - pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, pcb_crosshair.X, pcb_crosshair.Y, pcb_false, pcb_false); + pcb_buffer_add_selected(PCB, PCB_PASTEBUFFER, pcb_crosshair.X, pcb_crosshair.Y, rnd_false, rnd_false); pastex = pcb_crosshair.X; pastey = pcb_crosshair.Y; del_selected = 1; @@ -309,10 +309,10 @@ } if (del_selected) - pcb_remove_selected(pcb_true); + pcb_remove_selected(rnd_true); if (paste) { pcb_undo_save_serial(); - pcb_buffer_copy_to_layout(PCB, pastex, pastey, pcb_false); + pcb_buffer_copy_to_layout(PCB, pastex, pastey, rnd_false); pcb_undo_restore_serial(); pcb_remove_object(type, ptr1, ptr2, ptr3); pcb_undo_inc_serial(); Index: trunk/src_plugins/extedit/extedit_dad.c =================================================================== --- trunk/src_plugins/extedit/extedit_dad.c (revision 31010) +++ trunk/src_plugins/extedit/extedit_dad.c (revision 31011) @@ -42,7 +42,7 @@ RND_DAD_SET_VALUE(ee->dlg_hid_ctx, ee->wcmd, str, rnd_strdup(methods[ee->mthi].command)); /* we have only one format, so disable the combo box for selecting it */ - rnd_gui->attr_dlg_widget_state(ee->dlg_hid_ctx, ee->wfmt, pcb_false); + rnd_gui->attr_dlg_widget_state(ee->dlg_hid_ctx, ee->wfmt, rnd_false); } static void ee_chg_method(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) @@ -117,7 +117,7 @@ RND_DAD_BUTTON_CLOSES(ee.dlg, clbtn); RND_DAD_END(ee.dlg); - RND_DAD_NEW("extedit", ee.dlg, "External editor", &ee, pcb_true, NULL); + RND_DAD_NEW("extedit", ee.dlg, "External editor", &ee, rnd_true, NULL); ee_data2dialog(&ee); res = RND_DAD_RUN(ee.dlg); Index: trunk/src_plugins/exto_std/bus.c =================================================================== --- trunk/src_plugins/exto_std/bus.c (revision 31010) +++ trunk/src_plugins/exto_std/bus.c (revision 31011) @@ -390,7 +390,7 @@ /* set up the context */ bus->gui_active = 1; - RND_DAD_NEW("bus", bus->dlg, "Bus", subc, pcb_false, pcb_bus_close_cb); + RND_DAD_NEW("bus", bus->dlg, "Bus", subc, rnd_false, pcb_bus_close_cb); } static pcb_extobj_t pcb_bus = { Index: trunk/src_plugins/exto_std/dimension.c =================================================================== --- trunk/src_plugins/exto_std/dimension.c (revision 31010) +++ trunk/src_plugins/exto_std/dimension.c (revision 31011) @@ -426,7 +426,7 @@ /* set up the context */ dim->gui_active = 1; - RND_DAD_NEW("dimension", dim->dlg, "Dimension line", subc, pcb_false, pcb_dimension_close_cb); + RND_DAD_NEW("dimension", dim->dlg, "Dimension line", subc, rnd_false, pcb_dimension_close_cb); } static pcb_extobj_t pcb_dimension = { Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 31010) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 31011) @@ -282,7 +282,7 @@ TODO("pstk #21: do not work in comp mode, use a pstk proto + remove the plugin dependency when done") pcb_pstk_new_compat_via(subc->data, -1, l->Point1.X, l->Point1.Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, - 0, PCB_PSTK_COMPAT_ROUND, pcb_true); + 0, PCB_PSTK_COMPAT_ROUND, rnd_true); line_of_vias_unpack(subc); line_of_vias_gen(subc, NULL); @@ -326,7 +326,7 @@ /* set up the context */ lov->gui_active = 1; - RND_DAD_NEW("line_of_vias", lov->dlg, "Line of vias", subc, pcb_false, pcb_line_of_vias_close_cb); + RND_DAD_NEW("line_of_vias", lov->dlg, "Line of vias", subc, rnd_false, pcb_line_of_vias_close_cb); } static pcb_extobj_t pcb_line_of_vias = { Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 31010) +++ trunk/src_plugins/fontmode/fontmode.c (revision 31011) @@ -184,8 +184,8 @@ for(arc = arclist_first(&symbol->arcs); arc != NULL; arc = arclist_next(arc)) { - pcb_arc_new(lfont, arc->X + ox, arc->Y + oy, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags(), pcb_true); - newarc = pcb_arc_new(lorig, arc->X + ox, arc->Y + oy, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags(), pcb_true); + pcb_arc_new(lfont, arc->X + ox, arc->Y + oy, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags(), rnd_true); + newarc = pcb_arc_new(lorig, arc->X + ox, arc->Y + oy, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness, 0, pcb_no_flags(), rnd_true); if (newarc != NULL) { if (maxx < newarc->BoundingBox.X2 - ox) maxx = newarc->BoundingBox.X2 - ox; Index: trunk/src_plugins/fp_board/fp_board.c =================================================================== --- trunk/src_plugins/fp_board/fp_board.c (revision 31010) +++ trunk/src_plugins/fp_board/fp_board.c (revision 31011) @@ -34,7 +34,7 @@ /* load file */ memset(&buff, 0, sizeof(buff)); - if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != pcb_true) { + if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != rnd_true) { rnd_message(RND_MSG_ERROR, "Warning: failed to load %s\n", fpath); return -1; } @@ -106,7 +106,7 @@ /* load file */ memset(&buff, 0, sizeof(buff)); - if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != pcb_true) { + if (pcb_buffer_load_layout(PCB, &buff, fpath, NULL) != rnd_true) { rnd_message(RND_MSG_ERROR, "Warning: failed to load %s\n", fpath); goto err; } Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 31010) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 31011) @@ -238,7 +238,7 @@ char *working; /* String holding abs path to working dir */ sprintf(working_, "%s%c%s", toppath, RND_DIR_SEPARATOR_C, subdir); - rnd_path_resolve(&PCB->hidlib, working_, &working, 0, pcb_false); + rnd_path_resolve(&PCB->hidlib, working_, &working, 0, rnd_false); /* Return error if the root is not a directory, to give other fp_ plugins a chance */ if ((is_root) && (!pcb_is_dir(&PCB->hidlib, working))) { @@ -351,7 +351,7 @@ else strcpy(path, p); - rnd_path_resolve(&PCB->hidlib, path, &fpath, 0, pcb_false); + rnd_path_resolve(&PCB->hidlib, path, &fpath, 0, rnd_false); /* fprintf(stderr, " in '%s'\n", fpath);*/ fp_fs_list(&pcb_library, fpath, 1, fp_search_cb, &ctx, 1, 0); Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 31010) +++ trunk/src_plugins/hid_batch/batch.c (revision 31011) @@ -144,7 +144,7 @@ uninit_batch(); goto quit; } - rnd_parse_command(hid->hid_data, line, pcb_false); + rnd_parse_command(hid->hid_data, line, rnd_false); } quit:; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 31010) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 31011) @@ -1027,7 +1027,7 @@ if (rect != NULL) { priv->clip_rect = *rect; - priv->clip_rect_valid = pcb_true; + priv->clip_rect_valid = rnd_true; } else { priv->clip_rect.x = 0; @@ -1034,7 +1034,7 @@ priv->clip_rect.y = 0; priv->clip_rect.width = ghidgui->port.view.canvas_width; priv->clip_rect.height = ghidgui->port.view.canvas_height; - priv->clip_rect_valid = pcb_false; + priv->clip_rect_valid = rnd_false; } set_clip(priv, priv->bg_gc); @@ -1098,7 +1098,7 @@ if (priv->mark_invalidate_depth == 0) rnd_draw_marks(hidlib, 0); - priv->clip_rect_valid = pcb_false; + priv->clip_rect_valid = rnd_false; /* Rest the clip for bg_gc, as it is used outside this function */ gdk_gc_set_clip_mask(priv->bg_gc, NULL); @@ -1167,7 +1167,7 @@ assert(priv->attached_invalidate_depth >= 0); if (priv->attached_invalidate_depth < 0) { priv->attached_invalidate_depth = 0; - /* A mismatch of changes_complete == pcb_false and == pcb_true notifications + /* A mismatch of changes_complete == rnd_false and == rnd_true notifications is not expected to occur, but we will try to handle it gracefully. As we know the crosshair will have been shown already, we must repaint the entire view to be sure not to leave an artaefact. */ @@ -1201,7 +1201,7 @@ if (priv->mark_invalidate_depth < 0) { priv->mark_invalidate_depth = 0; - /* A mismatch of changes_complete == pcb_false and == pcb_true notifications + /* A mismatch of changes_complete == rnd_false and == rnd_true notifications is not expected to occur, but we will try to handle it gracefully. As we know the mark will have been shown already, we must repaint the entire view to be sure not to leave an artaefact. */ @@ -1386,7 +1386,7 @@ priv->base_pixel = gdk_pixmap_new(gtkc_widget_get_window(ghidgui->port.drawing_area), ghidgui->port.view.canvas_width, ghidgui->port.view.canvas_height, -1); priv->out_pixel = priv->base_pixel; - ghidgui->port.drawing_allowed = pcb_true; + ghidgui->port.drawing_allowed = rnd_true; if (!done_once) { priv->bg_gc = gdk_gc_new(priv->out_pixel); Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 31010) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 31011) @@ -154,7 +154,7 @@ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glDisable(GL_STENCIL_TEST); - priv->trans_lines = pcb_true; + priv->trans_lines = rnd_true; return 1; } @@ -671,7 +671,7 @@ pcb_gtk_port_t *p = port; render_priv_t *priv = p->render_priv; - ghidgui->port.drawing_allowed = pcb_true; + ghidgui->port.drawing_allowed = rnd_true; if (!done_once) { priv->bg_color = rnd_conf.appearance.color.background; @@ -692,7 +692,7 @@ if (!gdk_gl_drawable_gl_begin(pGlDrawable, pGlContext)) return FALSE; - port->render_priv->in_context = pcb_true; + port->render_priv->in_context = rnd_true; return TRUE; } @@ -707,7 +707,7 @@ else glFlush(); - port->render_priv->in_context = pcb_false; + port->render_priv->in_context = rnd_false; /* end drawing to current GL-context */ gdk_gl_drawable_gl_end(pGlDrawable); @@ -867,7 +867,7 @@ if (!gdk_gl_drawable_gl_begin(pGlDrawable, pGlContext)) { return FALSE; } - ghidgui->port.render_priv->in_context = pcb_true; + ghidgui->port.render_priv->in_context = rnd_true; glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -910,7 +910,7 @@ glFlush(); /* end drawing to current GL-context */ - ghidgui->port.render_priv->in_context = pcb_false; + ghidgui->port.render_priv->in_context = rnd_false; gdk_gl_drawable_gl_end(pGlDrawable); /* restore the original context and priv */ Index: trunk/src_plugins/hid_lesstif/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 31010) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 31011) @@ -60,7 +60,7 @@ stdarg(XmNmaximum, (int)PB_SCALE_UP+1); stdarg(XmNsliderSize, 1); stdarg(XmNorientation, XmHORIZONTAL); - stdarg(XmNshowArrows, pcb_false); + stdarg(XmNshowArrows, rnd_false); stdarg_do_color_str("#000099", XmNforeground); stdarg(XmNsliderVisual, XmFOREGROUND_COLOR); Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 31010) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 31011) @@ -180,12 +180,12 @@ if (pcb_ltf_wait_for_dialog_noclose(pctx.dialog)) { res = pcb_ltf_get_path(&pctx); if ((sub != NULL) && (sub->on_close != NULL)) - sub->on_close(sub, pcb_true); + sub->on_close(sub, rnd_true); } else { res = NULL; if ((sub != NULL) && (sub->on_close != NULL)) - sub->on_close(sub, pcb_false); + sub->on_close(sub, rnd_false); } if ((pcb_ltf_ok != DAD_CLOSED) && (XtIsManaged(pctx.dialog))) Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 31010) +++ trunk/src_plugins/hid_lesstif/main.c (revision 31011) @@ -141,7 +141,7 @@ board. */ static double view_zoom = PCB_MIL_TO_COORD(10); static rnd_bool autofade = 0; -static rnd_bool crosshair_on = pcb_true; +static rnd_bool crosshair_on = rnd_true; static void lesstif_reg_attrs(void); static void lesstif_begin(void); @@ -229,15 +229,15 @@ if (crosshair_on == show) return; - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_false); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_false); if (pcb_marked.status) - pcb_notify_mark_change(pcb_false); + pcb_notify_mark_change(rnd_false); crosshair_on = show; - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_true); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_true); if (pcb_marked.status) - pcb_notify_mark_change(pcb_true); + pcb_notify_mark_change(rnd_true); } /* This is the size of the current PCB work area. */ @@ -438,7 +438,7 @@ s = XmTextGetString(w); lesstif_show_crosshair(0); pcb_clihist_append(s, NULL, NULL, NULL); - rnd_parse_command(ltf_hidlib, s, pcb_false); + rnd_parse_command(ltf_hidlib, s, rnd_false); XtFree(s); XmTextSetString(w, XmStrCast("")); @@ -483,12 +483,12 @@ return; in_move_event = 1; - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_false); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_false); if (panning) Pan(2, e->x, e->y); rnd_hidcore_crosshair_move_to(ltf_hidlib, Px(e->x), Py(e->y), 1); rnd_hidlib_adjust_attached_objects(ltf_hidlib); - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_true); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_true); in_move_event = 0; } @@ -1023,7 +1023,7 @@ if (lesstif_button_event(w, e)) return; - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_false); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_false); pressed_button = e->xbutton.button; mods = ((e->xbutton.state & ShiftMask) ? RND_M_Shift : 0) + ((e->xbutton.state & ControlMask) ? RND_M_Ctrl : 0) @@ -1034,7 +1034,7 @@ #endif rnd_hid_cfg_mouse_action(ltf_hidlib, &lesstif_mouse, lesstif_mb2cfg(e->xbutton.button) | mods, cmd_is_active); - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_true); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_true); break; } @@ -1044,7 +1044,7 @@ if (e->xbutton.button != pressed_button) return; lesstif_button_event(w, e); - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_false); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_false); pressed_button = 0; mods = ((e->xbutton.state & ShiftMask) ? RND_M_Shift : 0) + ((e->xbutton.state & ControlMask) ? RND_M_Ctrl : 0) @@ -1055,7 +1055,7 @@ #endif + RND_M_Release; rnd_hid_cfg_mouse_action(ltf_hidlib, &lesstif_mouse, lesstif_mb2cfg(e->xbutton.button) | mods, cmd_is_active); - rnd_hid_notify_crosshair_change(ltf_hidlib, pcb_true); + rnd_hid_notify_crosshair_change(ltf_hidlib, rnd_true); break; } @@ -1088,7 +1088,7 @@ if (crosshair_on) rnd_draw_attached(ltf_hidlib, 1); rnd_draw_marks(ltf_hidlib, 1); - ShowCrosshair(pcb_false); + ShowCrosshair(rnd_false); need_idle_proc(); break; @@ -1096,7 +1096,7 @@ crosshair_in_window = 1; in_move_event = 1; rnd_hidcore_crosshair_move_to(ltf_hidlib, Px(e->xcrossing.x), Py(e->xcrossing.y), 1); - ShowCrosshair(pcb_true); + ShowCrosshair(rnd_true); in_move_event = 0; need_redraw = 1; need_idle_proc(); @@ -2105,7 +2105,7 @@ if (invalidate_depth < 0) { invalidate_depth = 0; - /* A mismatch of changes_complete == pcb_false and == pcb_true notifications + /* A mismatch of changes_complete == rnd_false and == rnd_true notifications * is not expected to occur, but we will try to handle it gracefully. * As we know the crosshair will have been shown already, we must * repaint the entire view to be sure not to leave an artaefact. @@ -2136,7 +2136,7 @@ if (invalidate_depth < 0) { invalidate_depth = 0; - /* A mismatch of changes_complete == pcb_false and == pcb_true notifications + /* A mismatch of changes_complete == rnd_false and == rnd_true notifications * is not expected to occur, but we will try to handle it gracefully. * As we know the mark will have been shown already, we must * repaint the entire view to be sure not to leave an artaefact. Index: trunk/src_plugins/import_hpgl/hpgl.c =================================================================== --- trunk/src_plugins/import_hpgl/hpgl.c (revision 31010) +++ trunk/src_plugins/import_hpgl/hpgl.c (revision 31011) @@ -97,7 +97,7 @@ HPGL2CRD_D(arc->r), HPGL2CRD_D(arc->r), arc->starta+180, arc->deltaa, conf_core.design.line_thickness, 2 * conf_core.design.clearance, - pcb_flag_make((conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0)), pcb_true); + pcb_flag_make((conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0)), rnd_true); return 0; } Index: trunk/src_plugins/import_mentor_sch/mentor_sch.c =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 31010) +++ trunk/src_plugins/import_mentor_sch/mentor_sch.c (revision 31011) @@ -142,7 +142,7 @@ rnd_conf_loop_list_str(&conf_mentor.plugins.import_mentor_sch.map_search_paths, item, item_str, idx) { char *p; - rnd_path_resolve(&PCB->hidlib, item_str, &p, 0, pcb_false); + rnd_path_resolve(&PCB->hidlib, item_str, &p, 0, rnd_false); if (p != NULL) { cnt += nethlp_load_part_map(&nhctx, p); free(p); Index: trunk/src_plugins/import_netlist/import_netlist.c =================================================================== --- trunk/src_plugins/import_netlist/import_netlist.c (revision 31010) +++ trunk/src_plugins/import_netlist/import_netlist.c (revision 31011) @@ -110,7 +110,7 @@ else inputline[len] = '\0'; } - continued = (inputline[len - 1] == '\\') ? pcb_true : pcb_false; + continued = (inputline[len - 1] == '\\') ? rnd_true : rnd_false; if (continued) inputline[len - 1] = '\0'; lines++; Index: trunk/src_plugins/import_sch2/import_sch_dlg.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 31010) +++ trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 31011) @@ -354,7 +354,7 @@ isch_ctx.active = 1; RND_DAD_DEFSIZE(isch_ctx.dlg, 360, 400); - RND_DAD_NEW("import_sch", isch_ctx.dlg, "Import schematics/netlist", &isch_ctx, pcb_false, isch_close_cb); + RND_DAD_NEW("import_sch", isch_ctx.dlg, "Import schematics/netlist", &isch_ctx, rnd_false, isch_close_cb); isch_pcb2dlg(); return 0; } Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 31010) +++ trunk/src_plugins/io_autotrax/read.c (revision 31011) @@ -144,7 +144,7 @@ lyt = pcb_layer_flags(st->pcb, lid); comb = 0; - return pcb_subc_get_layer(subc, lyt, comb, 1, st->pcb->Data->Layer[lid].name, pcb_true); + return pcb_subc_get_layer(subc, lyt, comb, 1, st->pcb->Data->Layer[lid].name, rnd_true); } /* autotrax_free_text/component_text */ @@ -360,13 +360,13 @@ if (segments == 10) { /* LU + RL quadrants */ start_angle = 180.0; delta = 90.0; - pcb_arc_new(&st->pcb->Data->Layer[PCB_layer], centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, pcb_true); + pcb_arc_new(&st->pcb->Data->Layer[PCB_layer], centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, rnd_true); start_angle = 0.0; } else if (segments == 5) { /* RU + LL quadrants */ start_angle = 270.0; delta = 90.0; - pcb_arc_new(&st->pcb->Data->Layer[PCB_layer], centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, pcb_true); + pcb_arc_new(&st->pcb->Data->Layer[PCB_layer], centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, rnd_true); start_angle = 90.0; } else if (segments >= 15) { /* whole circle */ @@ -426,7 +426,7 @@ if (ly == NULL) return 0; - if (pcb_arc_new(ly, centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, pcb_true) != 0) + if (pcb_arc_new(ly, centreX, centreY, width, height, start_angle, delta, Thickness, Clearance, Flags, rnd_true) != 0) return 1; return -1; } @@ -1152,7 +1152,7 @@ rnd_actionva(&Ptr->hidlib, "ElementList", "Done", NULL); } fclose(FP); - box = pcb_data_bbox(&board_size, Ptr->Data, pcb_false); + box = pcb_data_bbox(&board_size, Ptr->Data, rnd_false); if (st.ignored_keepout_element) { rnd_message(RND_MSG_ERROR, "Ignored %d keepout track(s) on auto/easytrax layer 12\n", st.ignored_keepout_element); } Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 31010) +++ trunk/src_plugins/io_bxl/read.c (revision 31011) @@ -147,7 +147,7 @@ const pcb_dflgmap_t *lm = bcl_layer_resolve_name(layer_name); pcb_layer_t *ly; - ly = pcb_subc_get_layer(ctx->subc, lm->lyt, lm->comb, 1, layer_name, pcb_true); + ly = pcb_subc_get_layer(ctx->subc, lm->lyt, lm->comb, 1, layer_name, rnd_true); htsp_set(&ctx->layer_name2ly, rnd_strdup(layer_name), ly); ctx->state.layer = ly; } Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 31010) +++ trunk/src_plugins/io_eagle/read.c (revision 31011) @@ -425,11 +425,11 @@ rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", ly->name); lyt = PCB_LYT_VIRTUAL; comb = 0; - return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, pcb_true); + return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, rnd_true); } lyt = pcb_layer_flags(st->pcb, ly->lid); comb = 0; - return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, pcb_true); + return pcb_subc_get_layer(subc, lyt, comb, 1, ly->name, rnd_true); } return NULL; } @@ -1438,7 +1438,7 @@ back = 1; } - new_subc = pcb_subc_dup_at(st->pcb, st->pcb->Data, subc, x, y, pcb_false); + new_subc = pcb_subc_dup_at(st->pcb, st->pcb->Data, subc, x, y, rnd_false); new_subc->Flags = pcb_no_flags(); new_subc->ID = pcb_create_ID_get(); Index: trunk/src_plugins/io_hyp/hyp_y.c =================================================================== --- trunk/src_plugins/io_hyp/hyp_y.c (revision 31010) +++ trunk/src_plugins/io_hyp/hyp_y.c (revision 31011) @@ -1897,13 +1897,13 @@ case 24: #line 164 "hyp_y.y" /* yacc.c:1652 */ - { h.detailed = pcb_false; } + { h.detailed = rnd_false; } #line 1902 "hyp_y.c" /* yacc.c:1652 */ break; case 25: #line 165 "hyp_y.y" /* yacc.c:1652 */ - { h.detailed = pcb_true; } + { h.detailed = rnd_true; } #line 1908 "hyp_y.c" /* yacc.c:1652 */ break; @@ -1915,25 +1915,25 @@ case 27: #line 173 "hyp_y.y" /* yacc.c:1652 */ - { h.unit_system_english = pcb_true; } + { h.unit_system_english = rnd_true; } #line 1920 "hyp_y.c" /* yacc.c:1652 */ break; case 28: #line 174 "hyp_y.y" /* yacc.c:1652 */ - { h.unit_system_english = pcb_false; } + { h.unit_system_english = rnd_false; } #line 1926 "hyp_y.c" /* yacc.c:1652 */ break; case 29: #line 177 "hyp_y.y" /* yacc.c:1652 */ - { h.metal_thickness_weight = pcb_true; } + { h.metal_thickness_weight = rnd_true; } #line 1932 "hyp_y.c" /* yacc.c:1652 */ break; case 30: #line 178 "hyp_y.y" /* yacc.c:1652 */ - { h.metal_thickness_weight = pcb_false; } + { h.metal_thickness_weight = rnd_false; } #line 1938 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2011,7 +2011,7 @@ case 66: #line 248 "hyp_y.y" /* yacc.c:1652 */ - { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } #line 2016 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2029,7 +2029,7 @@ case 79: #line 266 "hyp_y.y" /* yacc.c:1652 */ - { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } + { h.epsilon_r = yylval.floatval; h.epsilon_r_set = rnd_true; } #line 2034 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2047,73 +2047,73 @@ case 91: #line 284 "hyp_y.y" /* yacc.c:1652 */ - { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } #line 2052 "hyp_y.c" /* yacc.c:1652 */ break; case 99: #line 294 "hyp_y.y" /* yacc.c:1652 */ - { h.thickness = yylval.floatval; h.thickness_set = pcb_true; } + { h.thickness = yylval.floatval; h.thickness_set = rnd_true; } #line 2058 "hyp_y.c" /* yacc.c:1652 */ break; case 100: #line 297 "hyp_y.y" /* yacc.c:1652 */ - { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; } + { h.plating_thickness = yylval.floatval; h.plating_thickness_set = rnd_true; } #line 2064 "hyp_y.c" /* yacc.c:1652 */ break; case 101: #line 300 "hyp_y.y" /* yacc.c:1652 */ - { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } #line 2070 "hyp_y.c" /* yacc.c:1652 */ break; case 102: #line 303 "hyp_y.y" /* yacc.c:1652 */ - { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; } + { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = rnd_true; } #line 2076 "hyp_y.c" /* yacc.c:1652 */ break; case 103: #line 306 "hyp_y.y" /* yacc.c:1652 */ - { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } + { h.epsilon_r = yylval.floatval; h.epsilon_r_set = rnd_true; } #line 2082 "hyp_y.c" /* yacc.c:1652 */ break; case 104: #line 309 "hyp_y.y" /* yacc.c:1652 */ - { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; } + { h.loss_tangent = yylval.floatval; h.loss_tangent_set = rnd_true; } #line 2088 "hyp_y.c" /* yacc.c:1652 */ break; case 105: #line 312 "hyp_y.y" /* yacc.c:1652 */ - { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } + { h.layer_name = yylval.strval; h.layer_name_set = rnd_true; } #line 2094 "hyp_y.c" /* yacc.c:1652 */ break; case 106: #line 315 "hyp_y.y" /* yacc.c:1652 */ - { h.material_name = yylval.strval; h.material_name_set = pcb_true; } + { h.material_name = yylval.strval; h.material_name_set = rnd_true; } #line 2100 "hyp_y.c" /* yacc.c:1652 */ break; case 107: #line 318 "hyp_y.y" /* yacc.c:1652 */ - { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; } + { h.plane_separation = yylval.floatval; h.plane_separation_set = rnd_true; } #line 2106 "hyp_y.c" /* yacc.c:1652 */ break; case 108: #line 321 "hyp_y.y" /* yacc.c:1652 */ - { h.conformal = yylval.boolval; h.conformal_set = pcb_true; } + { h.conformal = yylval.boolval; h.conformal_set = rnd_true; } #line 2112 "hyp_y.c" /* yacc.c:1652 */ break; case 109: #line 324 "hyp_y.y" /* yacc.c:1652 */ - { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; } + { h.prepreg = yylval.boolval; h.prepreg_set = rnd_true; } #line 2118 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2143,25 +2143,25 @@ case 125: #line 356 "hyp_y.y" /* yacc.c:1652 */ - { h.name = yylval.strval; h.name_set = pcb_true; } + { h.name = yylval.strval; h.name_set = rnd_true; } #line 2148 "hyp_y.c" /* yacc.c:1652 */ break; case 128: #line 364 "hyp_y.y" /* yacc.c:1652 */ - { h.value_float = yylval.floatval; h.value_float_set = pcb_true; } + { h.value_float = yylval.floatval; h.value_float_set = rnd_true; } #line 2154 "hyp_y.c" /* yacc.c:1652 */ break; case 129: #line 367 "hyp_y.y" /* yacc.c:1652 */ - { h.value_string = yylval.strval; h.value_string_set = pcb_true; } + { h.value_string = yylval.strval; h.value_string_set = rnd_true; } #line 2160 "hyp_y.c" /* yacc.c:1652 */ break; case 130: #line 370 "hyp_y.y" /* yacc.c:1652 */ - { h.package = yylval.strval; h.package_set = pcb_true; } + { h.package = yylval.strval; h.package_set = rnd_true; } #line 2166 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2191,7 +2191,7 @@ case 139: #line 394 "hyp_y.y" /* yacc.c:1652 */ - { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } + { h.padstack_name = yylval.strval; h.padstack_name_set = rnd_true; } #line 2196 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2203,13 +2203,13 @@ case 141: #line 397 "hyp_y.y" /* yacc.c:1652 */ - { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } + { h.drill_size = yylval.floatval; h.drill_size_set = rnd_true; } #line 2208 "hyp_y.c" /* yacc.c:1652 */ break; case 147: #line 406 "hyp_y.y" /* yacc.c:1652 */ - { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } + { h.layer_name = yylval.strval; h.layer_name_set = rnd_true; } #line 2214 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2251,13 +2251,13 @@ case 157: #line 419 "hyp_y.y" /* yacc.c:1652 */ - { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; } + { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = rnd_true; } #line 2256 "hyp_y.c" /* yacc.c:1652 */ break; case 158: #line 420 "hyp_y.y" /* yacc.c:1652 */ - { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; } + { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = rnd_true; } #line 2262 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2287,7 +2287,7 @@ case 163: #line 425 "hyp_y.y" /* yacc.c:1652 */ - { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; } + { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = rnd_true; } #line 2292 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2335,13 +2335,13 @@ case 194: #line 479 "hyp_y.y" /* yacc.c:1652 */ - { h.width = yylval.floatval; h.width_set = pcb_true; } + { h.width = yylval.floatval; h.width_set = rnd_true; } #line 2340 "hyp_y.c" /* yacc.c:1652 */ break; case 195: #line 482 "hyp_y.y" /* yacc.c:1652 */ - { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; } + { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = rnd_true; } #line 2346 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2359,97 +2359,97 @@ case 201: #line 496 "hyp_y.y" /* yacc.c:1652 */ - { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } + { h.drill_size = yylval.floatval; h.drill_size_set = rnd_true; } #line 2364 "hyp_y.c" /* yacc.c:1652 */ break; case 204: #line 499 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } + { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = rnd_true; } #line 2370 "hyp_y.c" /* yacc.c:1652 */ break; case 205: #line 500 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } + { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = rnd_true; } #line 2376 "hyp_y.c" /* yacc.c:1652 */ break; case 206: #line 501 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } + { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = rnd_true; } #line 2382 "hyp_y.c" /* yacc.c:1652 */ break; case 207: #line 502 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } + { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = rnd_true; } #line 2388 "hyp_y.c" /* yacc.c:1652 */ break; case 208: #line 503 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; } + { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = rnd_true; } #line 2394 "hyp_y.c" /* yacc.c:1652 */ break; case 209: #line 504 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; } + { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = rnd_true; } #line 2400 "hyp_y.c" /* yacc.c:1652 */ break; case 210: #line 505 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; } + { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = rnd_true; } #line 2406 "hyp_y.c" /* yacc.c:1652 */ break; case 211: #line 506 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; } + { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = rnd_true; } #line 2412 "hyp_y.c" /* yacc.c:1652 */ break; case 212: #line 507 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; } + { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = rnd_true; } #line 2418 "hyp_y.c" /* yacc.c:1652 */ break; case 213: #line 508 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; } + { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = rnd_true; } #line 2424 "hyp_y.c" /* yacc.c:1652 */ break; case 214: #line 509 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; } + { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = rnd_true; } #line 2430 "hyp_y.c" /* yacc.c:1652 */ break; case 215: #line 510 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; } + { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = rnd_true; } #line 2436 "hyp_y.c" /* yacc.c:1652 */ break; case 216: #line 514 "hyp_y.y" /* yacc.c:1652 */ - { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } + { h.padstack_name = yylval.strval; h.padstack_name_set = rnd_true; } #line 2442 "hyp_y.c" /* yacc.c:1652 */ break; case 217: #line 517 "hyp_y.y" /* yacc.c:1652 */ - { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; } + { h.layer1_name = yylval.strval; h.layer1_name_set = rnd_true; } #line 2448 "hyp_y.c" /* yacc.c:1652 */ break; case 218: #line 520 "hyp_y.y" /* yacc.c:1652 */ - { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; } + { h.layer2_name = yylval.strval; h.layer2_name_set = rnd_true; } #line 2454 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2467,31 +2467,31 @@ case 225: #line 536 "hyp_y.y" /* yacc.c:1652 */ - { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; } + { h.pin_reference = yylval.strval; h.pin_reference_set = rnd_true; } #line 2472 "hyp_y.c" /* yacc.c:1652 */ break; case 226: #line 539 "hyp_y.y" /* yacc.c:1652 */ - { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; } + { h.pin_function = PIN_SIM_OUT; h.pin_function_set = rnd_true; } #line 2478 "hyp_y.c" /* yacc.c:1652 */ break; case 227: #line 540 "hyp_y.y" /* yacc.c:1652 */ - { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; } + { h.pin_function = PIN_SIM_IN; h.pin_function_set = rnd_true; } #line 2484 "hyp_y.c" /* yacc.c:1652 */ break; case 228: #line 541 "hyp_y.y" /* yacc.c:1652 */ - { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; } + { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = rnd_true; } #line 2490 "hyp_y.c" /* yacc.c:1652 */ break; case 229: #line 542 "hyp_y.y" /* yacc.c:1652 */ - { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); } + { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = rnd_true; hyyerror("warning: SIM_BOTH assumed"); } #line 2496 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2509,25 +2509,25 @@ case 235: #line 555 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } + { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = rnd_true; } #line 2514 "hyp_y.c" /* yacc.c:1652 */ break; case 236: #line 556 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } + { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = rnd_true; } #line 2520 "hyp_y.c" /* yacc.c:1652 */ break; case 237: #line 557 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } + { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = rnd_true; } #line 2526 "hyp_y.c" /* yacc.c:1652 */ break; case 238: #line 558 "hyp_y.y" /* yacc.c:1652 */ - { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } + { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = rnd_true; } #line 2532 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2545,7 +2545,7 @@ case 243: #line 570 "hyp_y.y" /* yacc.c:1652 */ - { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; } + { h.zlayer_name = yylval.strval; h.zlayer_name_set = rnd_true; } #line 2550 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2563,7 +2563,7 @@ case 247: #line 577 "hyp_y.y" /* yacc.c:1652 */ - { h.impedance = yylval.floatval; h.impedance_set = pcb_true; } + { h.impedance = yylval.floatval; h.impedance_set = rnd_true; } #line 2568 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2575,7 +2575,7 @@ case 250: #line 582 "hyp_y.y" /* yacc.c:1652 */ - { h.resistance = yylval.floatval; h.resistance_set = pcb_true;} + { h.resistance = yylval.floatval; h.resistance_set = rnd_true;} #line 2580 "hyp_y.c" /* yacc.c:1652 */ break; @@ -2599,25 +2599,25 @@ case 262: #line 604 "hyp_y.y" /* yacc.c:1652 */ - { h.id = yylval.intval; h.id_set = pcb_true; } + { h.id = yylval.intval; h.id_set = rnd_true; } #line 2604 "hyp_y.c" /* yacc.c:1652 */ break; case 263: #line 608 "hyp_y.y" /* yacc.c:1652 */ - { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; } + { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = rnd_true; } #line 2610 "hyp_y.c" /* yacc.c:1652 */ break; case 264: #line 609 "hyp_y.y" /* yacc.c:1652 */ - { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; } + { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = rnd_true; } #line 2616 "hyp_y.c" /* yacc.c:1652 */ break; case 265: #line 610 "hyp_y.y" /* yacc.c:1652 */ - { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; } + { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = rnd_true; } #line 2622 "hyp_y.c" /* yacc.c:1652 */ break; @@ -3076,13 +3076,13 @@ static void new_record() { h.vers = 0; - h.detailed = pcb_false; - h.unit_system_english = pcb_false; - h.metal_thickness_weight = pcb_false; + h.detailed = rnd_false; + h.unit_system_english = rnd_false; + h.metal_thickness_weight = rnd_false; h.default_plane_separation = 0; - h.use_die_for_metal = pcb_false; + h.use_die_for_metal = rnd_false; h.bulk_resistivity = 0; - h.conformal = pcb_false; + h.conformal = rnd_false; h.epsilon_r = 0; h.layer_name = NULL; h.loss_tangent = 0; @@ -3089,31 +3089,31 @@ h.material_name = NULL; h.plane_separation = 0; h.plating_thickness = 0; - h.prepreg = pcb_false; + h.prepreg = rnd_false; h.temperature_coefficient = 0; h.thickness = 0; - h.bulk_resistivity_set = pcb_false; - h.conformal_set = pcb_false; - h.epsilon_r_set = pcb_false; - h.layer_name_set = pcb_false; - h.loss_tangent_set = pcb_false; - h.material_name_set = pcb_false; - h.plane_separation_set = pcb_false; - h.plating_thickness_set = pcb_false; - h.prepreg_set = pcb_false; - h.temperature_coefficient_set = pcb_false; - h.thickness_set = pcb_false; + h.bulk_resistivity_set = rnd_false; + h.conformal_set = rnd_false; + h.epsilon_r_set = rnd_false; + h.layer_name_set = rnd_false; + h.loss_tangent_set = rnd_false; + h.material_name_set = rnd_false; + h.plane_separation_set = rnd_false; + h.plating_thickness_set = rnd_false; + h.prepreg_set = rnd_false; + h.temperature_coefficient_set = rnd_false; + h.thickness_set = rnd_false; h.device_type = NULL; h.ref = NULL; h.value_float = 0; h.value_string = NULL; h.package = NULL; - h.name_set = pcb_false; - h.value_float_set = pcb_false; - h.value_string_set = pcb_false; - h.package_set = pcb_false; - h.voltage_specified = pcb_false; - h.conversion = pcb_false; + h.name_set = rnd_false; + h.value_float_set = rnd_false; + h.value_string_set = rnd_false; + h.package_set = rnd_false; + h.voltage_specified = rnd_false; + h.conversion = rnd_false; h.padstack_name = NULL; h.drill_size = 0; h.pad_shape = 0; @@ -3125,57 +3125,57 @@ h.thermal_clear_sy = 0; h.thermal_clear_angle = 0; h.pad_type = PAD_TYPE_METAL; - h.padstack_name_set = pcb_false; - h.drill_size_set = pcb_false; - h.pad_type_set = pcb_false; + h.padstack_name_set = rnd_false; + h.drill_size_set = rnd_false; + h.pad_type_set = rnd_false; h.width = 0; h.left_plane_separation = 0; - h.width_set = pcb_false; - h.left_plane_separation_set = pcb_false; + h.width_set = rnd_false; + h.left_plane_separation_set = rnd_false; h.layer1_name = NULL; - h.layer1_name_set = pcb_false; + h.layer1_name_set = rnd_false; h.layer2_name = NULL; - h.layer2_name_set = pcb_false; + h.layer2_name_set = rnd_false; h.via_pad_shape = NULL; - h.via_pad_shape_set = pcb_false; + h.via_pad_shape_set = rnd_false; h.via_pad_sx = 0; - h.via_pad_sx_set = pcb_false; + h.via_pad_sx_set = rnd_false; h.via_pad_sy = 0; - h.via_pad_sy_set = pcb_false; + h.via_pad_sy_set = rnd_false; h.via_pad_angle = 0; - h.via_pad_angle_set = pcb_false; + h.via_pad_angle_set = rnd_false; h.via_pad1_shape = NULL; - h.via_pad1_shape_set = pcb_false; + h.via_pad1_shape_set = rnd_false; h.via_pad1_sx = 0; - h.via_pad1_sx_set = pcb_false; + h.via_pad1_sx_set = rnd_false; h.via_pad1_sy = 0; - h.via_pad1_sy_set = pcb_false; + h.via_pad1_sy_set = rnd_false; h.via_pad1_angle = 0; - h.via_pad1_angle_set = pcb_false; + h.via_pad1_angle_set = rnd_false; h.via_pad2_shape = NULL; - h.via_pad2_shape_set = pcb_false; + h.via_pad2_shape_set = rnd_false; h.via_pad2_sx = 0; - h.via_pad2_sx_set = pcb_false; + h.via_pad2_sx_set = rnd_false; h.via_pad2_sy = 0; - h.via_pad2_sy_set = pcb_false; + h.via_pad2_sy_set = rnd_false; h.via_pad2_angle = 0; - h.via_pad2_angle_set = pcb_false; + h.via_pad2_angle_set = rnd_false; h.pin_reference = NULL; - h.pin_reference_set = pcb_false; + h.pin_reference_set = rnd_false; h.pin_function = PIN_SIM_BOTH; - h.pin_function_set = pcb_false; + h.pin_function_set = rnd_false; h.zlayer_name = NULL; - h.zlayer_name_set = pcb_false; + h.zlayer_name_set = rnd_false; h.length = 0; h.impedance = 0; - h.impedance_set = pcb_false; + h.impedance_set = rnd_false; h.delay = 0; h.resistance = 0; - h.resistance_set = pcb_false; + h.resistance_set = rnd_false; h.id = -1; - h.id_set = pcb_false; + h.id_set = rnd_false; h.polygon_type = POLYGON_TYPE_PLANE; - h.polygon_type_set = pcb_false; + h.polygon_type_set = rnd_false; h.net_class_name = NULL; h.net_name = NULL; h.key = NULL; Index: trunk/src_plugins/io_hyp/hyp_y.y =================================================================== --- trunk/src_plugins/io_hyp/hyp_y.y (revision 31010) +++ trunk/src_plugins/io_hyp/hyp_y.y (revision 31011) @@ -161,8 +161,8 @@ : '{' H_DATA_MODE '=' mode '}' { if (exec_data_mode(&h)) YYERROR; }; mode - : H_SIMPLIFIED { h.detailed = pcb_false; } - | H_DETAILED { h.detailed = pcb_true; } ; + : H_SIMPLIFIED { h.detailed = rnd_false; } + | H_DETAILED { h.detailed = rnd_true; } ; /* units */ @@ -170,12 +170,12 @@ : '{' H_UNITS '=' unit_system metal_thickness_unit '}' { if (exec_units(&h)) YYERROR; } ; unit_system - : H_ENGLISH { h.unit_system_english = pcb_true; } - | H_METRIC { h.unit_system_english = pcb_false; }; + : H_ENGLISH { h.unit_system_english = rnd_true; } + | H_METRIC { h.unit_system_english = rnd_false; }; metal_thickness_unit - : H_WEIGHT { h.metal_thickness_weight = pcb_true; } - | H_LENGTH { h.metal_thickness_weight = pcb_false; } ; + : H_WEIGHT { h.metal_thickness_weight = rnd_true; } + | H_LENGTH { h.metal_thickness_weight = rnd_false; } ; /* plane_sep */ plane_sep @@ -245,7 +245,7 @@ signal_param : thickness | plating_thickness - | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } | bulk_resistivity | temperature_coefficient | epsilon_r @@ -263,7 +263,7 @@ dielectric_param : thickness - | H_C '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } + | H_C '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = rnd_true; } | epsilon_r | loss_tangent | conformal @@ -281,7 +281,7 @@ plane_param : thickness - | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } | bulk_resistivity | temperature_coefficient | epsilon_r @@ -291,37 +291,37 @@ | plane_separation ; thickness - : H_T '=' H_FLOAT { h.thickness = yylval.floatval; h.thickness_set = pcb_true; } + : H_T '=' H_FLOAT { h.thickness = yylval.floatval; h.thickness_set = rnd_true; } plating_thickness - : H_P '=' H_FLOAT { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; } + : H_P '=' H_FLOAT { h.plating_thickness = yylval.floatval; h.plating_thickness_set = rnd_true; } bulk_resistivity - : H_BR '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } + : H_BR '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = rnd_true; } temperature_coefficient - : H_TC '=' H_FLOAT { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; } + : H_TC '=' H_FLOAT { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = rnd_true; } epsilon_r - : H_ER '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } + : H_ER '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = rnd_true; } loss_tangent - : H_LT '=' H_FLOAT { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; } + : H_LT '=' H_FLOAT { h.loss_tangent = yylval.floatval; h.loss_tangent_set = rnd_true; } layer_name - : H_L '=' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } + : H_L '=' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = rnd_true; } material_name - : H_M '=' H_STRING { h.material_name = yylval.strval; h.material_name_set = pcb_true; } + : H_M '=' H_STRING { h.material_name = yylval.strval; h.material_name_set = rnd_true; } plane_separation - : H_PS '=' H_FLOAT { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; } + : H_PS '=' H_FLOAT { h.plane_separation = yylval.floatval; h.plane_separation_set = rnd_true; } conformal - : H_CO_QM '=' H_BOOL { h.conformal = yylval.boolval; h.conformal_set = pcb_true; } + : H_CO_QM '=' H_BOOL { h.conformal = yylval.boolval; h.conformal_set = rnd_true; } prepreg - : H_PR_QM '=' H_BOOL { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; } + : H_PR_QM '=' H_BOOL { h.prepreg = yylval.boolval; h.prepreg_set = rnd_true; } /* devices */ @@ -353,7 +353,7 @@ ; name - : H_NAME '=' H_STRING { h.name = yylval.strval; h.name_set = pcb_true; } ; + : H_NAME '=' H_STRING { h.name = yylval.strval; h.name_set = rnd_true; } ; value : value_float @@ -361,13 +361,13 @@ ; value_float - : H_VAL '=' H_FLOAT { h.value_float = yylval.floatval; h.value_float_set = pcb_true; } ; + : H_VAL '=' H_FLOAT { h.value_float = yylval.floatval; h.value_float_set = rnd_true; } ; value_string - : H_VAL '=' H_STRING { h.value_string = yylval.strval; h.value_string_set = pcb_true; } ; + : H_VAL '=' H_STRING { h.value_string = yylval.strval; h.value_string_set = rnd_true; } ; package - : H_PKG '=' H_STRING { h.package = yylval.strval; h.package_set = pcb_true; } ; + : H_PKG '=' H_STRING { h.package = yylval.strval; h.package_set = rnd_true; } ; /* supplies */ @@ -391,10 +391,10 @@ /* padstack */ padstack - : '{' H_PADSTACK { new_record(); } '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } drill_size '}' { if (exec_pstk_end(&h)) YYERROR; } ; + : '{' H_PADSTACK { new_record(); } '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = rnd_true; } drill_size '}' { if (exec_pstk_end(&h)) YYERROR; } ; drill_size - : ',' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } padstack_list + : ',' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = rnd_true; } padstack_list | ',' padstack_list ; | padstack_list ; @@ -403,7 +403,7 @@ | padstack_def ; padstack_def - : '(' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } ',' pad_shape pad_coord pad_type { if (exec_pstk_element(&h)) YYERROR; new_record(); } + : '(' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = rnd_true; } ',' pad_shape pad_coord pad_type { if (exec_pstk_element(&h)) YYERROR; new_record(); } | '(' error ')' ; pad_shape @@ -416,13 +416,13 @@ pad_type : ')' - | ',' H_M ')' { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; } - | ',' H_A ')' { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; } + | ',' H_M ')' { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = rnd_true; } + | ',' H_A ')' { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = rnd_true; } | ',' H_FLOAT { h.thermal_clear_shape = yylval.floatval; } ',' H_FLOAT { h.thermal_clear_sx = yylval.floatval; } ',' H_FLOAT { h.thermal_clear_sy = yylval.floatval; } ',' H_FLOAT { h.thermal_clear_angle = yylval.floatval; } - ',' H_T ')' { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; } + ',' H_T ')' { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = rnd_true; } ; /* net */ @@ -476,10 +476,10 @@ ; width - : H_W '=' H_FLOAT { h.width = yylval.floatval; h.width_set = pcb_true; } ; + : H_W '=' H_FLOAT { h.width = yylval.floatval; h.width_set = rnd_true; } ; left_plane_separation - : H_LPS '=' H_FLOAT { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; } ; + : H_LPS '=' H_FLOAT { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = rnd_true; } ; via : '(' H_VIA { new_record(); } coord_point via_param_list ')' { if (exec_via(&h)) YYERROR; } ; @@ -493,31 +493,31 @@ via_param : padstack_name /* parameters below are for deprecated v1.0 via format */ - | H_D '=' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } + | H_D '=' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = rnd_true; } | layer1_name | layer2_name - | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } - | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } - | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } - | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } - | H_S1 '=' H_STRING { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; } - | H_S1X '=' H_FLOAT { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; } - | H_S1Y '=' H_FLOAT { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; } - | H_A1 '=' H_FLOAT { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; } - | H_S2 '=' H_STRING { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; } - | H_S2X '=' H_FLOAT { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; } - | H_S2Y '=' H_FLOAT { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; } - | H_A2 '=' H_FLOAT { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; } + | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = rnd_true; } + | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = rnd_true; } + | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = rnd_true; } + | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = rnd_true; } + | H_S1 '=' H_STRING { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = rnd_true; } + | H_S1X '=' H_FLOAT { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = rnd_true; } + | H_S1Y '=' H_FLOAT { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = rnd_true; } + | H_A1 '=' H_FLOAT { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = rnd_true; } + | H_S2 '=' H_STRING { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = rnd_true; } + | H_S2X '=' H_FLOAT { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = rnd_true; } + | H_S2Y '=' H_FLOAT { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = rnd_true; } + | H_A2 '=' H_FLOAT { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = rnd_true; } ; padstack_name - : H_P '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } ; + : H_P '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = rnd_true; } ; layer1_name - : H_L1 '=' H_STRING { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; } ; + : H_L1 '=' H_STRING { h.layer1_name = yylval.strval; h.layer1_name_set = rnd_true; } ; layer2_name - : H_L2 '=' H_STRING { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; } ; + : H_L2 '=' H_STRING { h.layer2_name = yylval.strval; h.layer2_name_set = rnd_true; } ; pin : '(' H_PIN { new_record(); } coord_point pin_reference pin_param { if (exec_pin(&h)) YYERROR; } ; @@ -533,13 +533,13 @@ ; pin_reference - : H_R '=' H_STRING { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; } ; + : H_R '=' H_STRING { h.pin_reference = yylval.strval; h.pin_reference_set = rnd_true; } ; pin_function - : H_F '=' H_SIM_OUT { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; } - | H_F '=' H_SIM_IN { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; } - | H_F '=' H_SIM_BOTH { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; } - | H_F '=' H_STRING { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); } + : H_F '=' H_SIM_OUT { h.pin_function = PIN_SIM_OUT; h.pin_function_set = rnd_true; } + | H_F '=' H_SIM_IN { h.pin_function = PIN_SIM_IN; h.pin_function_set = rnd_true; } + | H_F '=' H_SIM_BOTH { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = rnd_true; } + | H_F '=' H_STRING { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = rnd_true; hyyerror("warning: SIM_BOTH assumed"); } ; pad /* deprecated hyperlynx v1.x only */ @@ -552,10 +552,10 @@ pad_param : layer_name - | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } - | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } - | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } - | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } + | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = rnd_true; } + | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = rnd_true; } + | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = rnd_true; } + | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = rnd_true; } ; useg @@ -567,7 +567,7 @@ ; useg_stackup - : H_ZL '=' H_STRING { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; } + : H_ZL '=' H_STRING { h.zlayer_name = yylval.strval; h.zlayer_name_set = rnd_true; } H_ZW '=' H_FLOAT { h.width = yylval.floatval; } H_ZLEN '=' H_FLOAT { h.length = yylval.floatval; } ')' @@ -574,12 +574,12 @@ ; useg_impedance - : H_Z '=' H_FLOAT { h.impedance = yylval.floatval; h.impedance_set = pcb_true; } + : H_Z '=' H_FLOAT { h.impedance = yylval.floatval; h.impedance_set = rnd_true; } H_D '=' H_FLOAT { h.delay = yylval.floatval; } useg_resistance; useg_resistance - : H_R '=' H_FLOAT { h.resistance = yylval.floatval; h.resistance_set = pcb_true;} + : H_R '=' H_FLOAT { h.resistance = yylval.floatval; h.resistance_set = rnd_true;} ')' | ')' ; @@ -601,13 +601,13 @@ ; polygon_id - : H_ID '=' H_POSINT { h.id = yylval.intval; h.id_set = pcb_true; } /* polygon id is a non-negative integer */ + : H_ID '=' H_POSINT { h.id = yylval.intval; h.id_set = rnd_true; } /* polygon id is a non-negative integer */ ; polygon_type - : H_T '=' H_POUR { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; } - | H_T '=' H_PLANE { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; } - | H_T '=' H_COPPER { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; } + : H_T '=' H_POUR { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = rnd_true; } + | H_T '=' H_PLANE { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = rnd_true; } + | H_T '=' H_COPPER { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = rnd_true; } ; polyvoid @@ -723,13 +723,13 @@ static void new_record() { h.vers = 0; - h.detailed = pcb_false; - h.unit_system_english = pcb_false; - h.metal_thickness_weight = pcb_false; + h.detailed = rnd_false; + h.unit_system_english = rnd_false; + h.metal_thickness_weight = rnd_false; h.default_plane_separation = 0; - h.use_die_for_metal = pcb_false; + h.use_die_for_metal = rnd_false; h.bulk_resistivity = 0; - h.conformal = pcb_false; + h.conformal = rnd_false; h.epsilon_r = 0; h.layer_name = NULL; h.loss_tangent = 0; @@ -736,31 +736,31 @@ h.material_name = NULL; h.plane_separation = 0; h.plating_thickness = 0; - h.prepreg = pcb_false; + h.prepreg = rnd_false; h.temperature_coefficient = 0; h.thickness = 0; - h.bulk_resistivity_set = pcb_false; - h.conformal_set = pcb_false; - h.epsilon_r_set = pcb_false; - h.layer_name_set = pcb_false; - h.loss_tangent_set = pcb_false; - h.material_name_set = pcb_false; - h.plane_separation_set = pcb_false; - h.plating_thickness_set = pcb_false; - h.prepreg_set = pcb_false; - h.temperature_coefficient_set = pcb_false; - h.thickness_set = pcb_false; + h.bulk_resistivity_set = rnd_false; + h.conformal_set = rnd_false; + h.epsilon_r_set = rnd_false; + h.layer_name_set = rnd_false; + h.loss_tangent_set = rnd_false; + h.material_name_set = rnd_false; + h.plane_separation_set = rnd_false; + h.plating_thickness_set = rnd_false; + h.prepreg_set = rnd_false; + h.temperature_coefficient_set = rnd_false; + h.thickness_set = rnd_false; h.device_type = NULL; h.ref = NULL; h.value_float = 0; h.value_string = NULL; h.package = NULL; - h.name_set = pcb_false; - h.value_float_set = pcb_false; - h.value_string_set = pcb_false; - h.package_set = pcb_false; - h.voltage_specified = pcb_false; - h.conversion = pcb_false; + h.name_set = rnd_false; + h.value_float_set = rnd_false; + h.value_string_set = rnd_false; + h.package_set = rnd_false; + h.voltage_specified = rnd_false; + h.conversion = rnd_false; h.padstack_name = NULL; h.drill_size = 0; h.pad_shape = 0; @@ -772,57 +772,57 @@ h.thermal_clear_sy = 0; h.thermal_clear_angle = 0; h.pad_type = PAD_TYPE_METAL; - h.padstack_name_set = pcb_false; - h.drill_size_set = pcb_false; - h.pad_type_set = pcb_false; + h.padstack_name_set = rnd_false; + h.drill_size_set = rnd_false; + h.pad_type_set = rnd_false; h.width = 0; h.left_plane_separation = 0; - h.width_set = pcb_false; - h.left_plane_separation_set = pcb_false; + h.width_set = rnd_false; + h.left_plane_separation_set = rnd_false; h.layer1_name = NULL; - h.layer1_name_set = pcb_false; + h.layer1_name_set = rnd_false; h.layer2_name = NULL; - h.layer2_name_set = pcb_false; + h.layer2_name_set = rnd_false; h.via_pad_shape = NULL; - h.via_pad_shape_set = pcb_false; + h.via_pad_shape_set = rnd_false; h.via_pad_sx = 0; - h.via_pad_sx_set = pcb_false; + h.via_pad_sx_set = rnd_false; h.via_pad_sy = 0; - h.via_pad_sy_set = pcb_false; + h.via_pad_sy_set = rnd_false; h.via_pad_angle = 0; - h.via_pad_angle_set = pcb_false; + h.via_pad_angle_set = rnd_false; h.via_pad1_shape = NULL; - h.via_pad1_shape_set = pcb_false; + h.via_pad1_shape_set = rnd_false; h.via_pad1_sx = 0; - h.via_pad1_sx_set = pcb_false; + h.via_pad1_sx_set = rnd_false; h.via_pad1_sy = 0; - h.via_pad1_sy_set = pcb_false; + h.via_pad1_sy_set = rnd_false; h.via_pad1_angle = 0; - h.via_pad1_angle_set = pcb_false; + h.via_pad1_angle_set = rnd_false; h.via_pad2_shape = NULL; - h.via_pad2_shape_set = pcb_false; + h.via_pad2_shape_set = rnd_false; h.via_pad2_sx = 0; - h.via_pad2_sx_set = pcb_false; + h.via_pad2_sx_set = rnd_false; h.via_pad2_sy = 0; - h.via_pad2_sy_set = pcb_false; + h.via_pad2_sy_set = rnd_false; h.via_pad2_angle = 0; - h.via_pad2_angle_set = pcb_false; + h.via_pad2_angle_set = rnd_false; h.pin_reference = NULL; - h.pin_reference_set = pcb_false; + h.pin_reference_set = rnd_false; h.pin_function = PIN_SIM_BOTH; - h.pin_function_set = pcb_false; + h.pin_function_set = rnd_false; h.zlayer_name = NULL; - h.zlayer_name_set = pcb_false; + h.zlayer_name_set = rnd_false; h.length = 0; h.impedance = 0; - h.impedance_set = pcb_false; + h.impedance_set = rnd_false; h.delay = 0; h.resistance = 0; - h.resistance_set = pcb_false; + h.resistance_set = rnd_false; h.id = -1; - h.id_set = pcb_false; + h.id_set = rnd_false; h.polygon_type = POLYGON_TYPE_PLANE; - h.polygon_type_set = pcb_false; + h.polygon_type_set = rnd_false; h.net_class_name = NULL; h.net_name = NULL; h.key = NULL; Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 31010) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 31011) @@ -74,7 +74,7 @@ { const char *fname = NULL; int debug = 0; - pcb_bool_t retval; + rnd_bool_t retval; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, LoadhypFrom, fname = argv[1].val.str); Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 31010) +++ trunk/src_plugins/io_hyp/parser.c (revision 31011) @@ -68,8 +68,8 @@ 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 */ + rnd_bool_t is_arc; /* arc or line */ + rnd_bool_t used; /* already included in outline */ struct outline_s *next; } outline_t; @@ -81,7 +81,7 @@ void hyp_draw_polygons(); /* add all hyperlynx polygons to pcb */ static void hyp_subcs_fin(void); void hyp_resize_board(); /* resize board to fit outline */ -pcb_bool_t hyp_is_bottom_layer(char *); /* true if bottom layer */ +rnd_bool_t hyp_is_bottom_layer(char *); /* true if bottom layer */ /* layer creation */ int layer_count; @@ -184,8 +184,8 @@ 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 */ + rnd_bool_t is_first; /* true if first vertex of contour */ + rnd_bool_t is_arc; /* true if arc */ struct hyp_vertex_s *next; } hyp_vertex_t; @@ -193,7 +193,7 @@ typedef struct hyp_polygon_s { int hyp_poly_id; /* hyperlynx polygon/polyline id */ polygon_type_enum hyp_poly_type; /* pour, copper, ... */ - pcb_bool_t is_polygon; /* true if polygon, false if polyline */ + rnd_bool_t is_polygon; /* true if polygon, false if polyline */ char *layer_name; /* layer of polygon */ rnd_coord_t line_width; /* line width of edge */ rnd_coord_t clearance; /* clearance with other copper */ @@ -258,7 +258,7 @@ unit = 1; metal_thickness_unit = 1; - use_die_for_metal = pcb_false; + use_die_for_metal = rnd_false; inches = 0.0254; /* inches to m */ copper_imperial_weight = 1.341; /* metal thickness in ounces/ft2. 1 oz/ft2 copper = 1.341 mil */ @@ -276,7 +276,7 @@ /* clear layer info */ for (n = 1; n < PCB_MAX_LAYER; n++) { - layer_is_plane[n] = pcb_false; /* signal layer */ + layer_is_plane[n] = rnd_false; /* signal layer */ layer_clearance[n] = -1; /* no separation between fill copper and signals on layer */ } layer_count = 0; @@ -494,7 +494,7 @@ * add segment to board outline */ -void hyp_perimeter_segment_add(outline_t * s, pcb_bool_t forward) +void hyp_perimeter_segment_add(outline_t * s, rnd_bool_t forward) { rnd_layer_id_t outline_id; pcb_layer_t *outline_layer; @@ -512,7 +512,7 @@ } /* mark segment as used, so we don't use it twice */ - s->used = pcb_true; + s->used = rnd_true; /* debugging */ if (hyp_debug) { @@ -525,7 +525,7 @@ if (s->is_arc) { /* counterclockwise arc from (x1, y1) to (x2, y2) */ - hyp_arc_new(outline_layer, s->x1, s->y1, s->x2, s->y2, s->xc, s->yc, s->r, s->r, pcb_false, 1, 0, pcb_no_flags()); + hyp_arc_new(outline_layer, s->x1, s->y1, s->x2, s->y2, s->xc, s->yc, s->r, s->r, rnd_false, 1, 0, pcb_no_flags()); } else /* line from (x1, y1) to (x2, y2) */ @@ -538,16 +538,16 @@ * 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(rnd_coord_t begin_x, rnd_coord_t begin_y, rnd_coord_t end_x, rnd_coord_t end_y, outline_t * s) +rnd_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; + rnd_bool_t connected; connected = (begin_x == end_x) && (begin_y == end_y); /* trivial case */ if (!connected) { /* recursive descent */ - s->used = pcb_true; + s->used = rnd_true; for (i = outline_head; i != NULL; i = i->next) { if (i->used) @@ -565,7 +565,7 @@ } } - s->used = pcb_false; + s->used = rnd_false; } return connected; @@ -670,14 +670,14 @@ void hyp_perimeter() { - pcb_bool_t warn_not_closed; - pcb_bool_t segment_found; - pcb_bool_t polygon_closed; + rnd_bool_t warn_not_closed; + rnd_bool_t segment_found; + rnd_bool_t polygon_closed; rnd_coord_t begin_x, begin_y, last_x, last_y; outline_t *i; outline_t *j; - warn_not_closed = pcb_false; + warn_not_closed = rnd_false; /* iterate over perimeter segments and adjust origin */ for (i = outline_head; i != NULL; i = i->next) { @@ -693,11 +693,11 @@ } /* iterate over perimeter polygons */ - while (pcb_true) { + while (rnd_true) { /* find first free segment */ for (i = outline_head; i != NULL; i = i->next) - if (i->used == pcb_false) + if (i->used == rnd_false) break; /* exit if no segments found */ @@ -713,10 +713,10 @@ last_y = i->y2; /* add segment */ - hyp_perimeter_segment_add(i, pcb_true); + hyp_perimeter_segment_add(i, rnd_true); /* add polygon segments until the polygon is closed */ - polygon_closed = pcb_false; + polygon_closed = rnd_false; while (!polygon_closed) { #undef XXX @@ -729,7 +729,7 @@ #endif /* find segment to add to current polygon */ - segment_found = pcb_false; + segment_found = rnd_false; /* XXX prefer closed polygon over open polyline */ @@ -741,8 +741,8 @@ if (!hyp_segment_connected(i->x2, i->y2, begin_x, begin_y, i)) continue; /* first point of segment is last point of current edge: add segment to edge */ - segment_found = pcb_true; - hyp_perimeter_segment_add(i, pcb_true); + segment_found = rnd_true; + hyp_perimeter_segment_add(i, rnd_true); last_x = i->x2; last_y = i->y2; } @@ -750,9 +750,9 @@ if (!hyp_segment_connected(i->x1, i->y1, begin_x, begin_y, i)) continue; /* last point of segment is last point of current edge: add segment to edge back to front */ - segment_found = pcb_true; + segment_found = rnd_true; /* add segment back to front */ - hyp_perimeter_segment_add(i, pcb_false); + hyp_perimeter_segment_add(i, rnd_false); last_x = i->x1; last_y = i->y1; } @@ -770,7 +770,7 @@ else { if (hyp_debug) rnd_message(RND_MSG_DEBUG, "outline: open\n"); - warn_not_closed = pcb_true; + warn_not_closed = rnd_true; } } @@ -934,7 +934,7 @@ * True if solder side */ -pcb_bool_t hyp_is_bottom_layer(char *layer_name) +rnd_bool_t hyp_is_bottom_layer(char *layer_name) { return ((layer_name != NULL) && (pcb_layer_flags(PCB, pcb_layer_by_name(PCB->Data, layer_name)) & PCB_LYT_BOTTOM)); } @@ -941,11 +941,11 @@ /* * Draw arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r. - * Direction of arc is clockwise or counter-clockwise, depending upon value of pcb_bool_t Clockwise. + * Direction of arc is clockwise or counter-clockwise, depending upon value of rnd_bool_t Clockwise. */ 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 YC, rnd_coord_t Width, rnd_coord_t Height, rnd_bool_t Clockwise, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags) { rnd_angle_t start_angle; @@ -974,7 +974,7 @@ delta = end_angle - start_angle; - new_arc = pcb_arc_new(Layer, XC, YC, Width, Height, start_angle, delta, Thickness, Clearance, Flags, pcb_true); + new_arc = pcb_arc_new(Layer, XC, YC, Width, Height, start_angle, delta, Thickness, Clearance, Flags, rnd_true); return new_arc; } @@ -984,7 +984,7 @@ * Arc may be clockwise or counterclockwise. Note pcb-rnd y-axis points downward. */ 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) + rnd_coord_t yc, rnd_coord_t r, rnd_bool_t clockwise) { 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. */ @@ -1113,7 +1113,7 @@ } else { /* draw clockwise arc from (x1, y2) to (x2, y2) */ - hyp_arc_new(layer, vrtx->x1, vrtx->y1, vrtx->x2, vrtx->y2, vrtx->xc, vrtx->yc, vrtx->r, vrtx->r, pcb_false, + hyp_arc_new(layer, vrtx->x1, vrtx->y1, vrtx->x2, vrtx->y2, vrtx->xc, vrtx->yc, vrtx->r, vrtx->r, rnd_false, polyline->line_width, polyline->clearance, pcb_no_flags()); /* move on */ if ((xpos == vrtx->x1) && (ypos == vrtx->y1)) { @@ -1136,7 +1136,7 @@ void hyp_draw_polygon(hyp_polygon_t * polygon) { pcb_layer_t *layer; - pcb_bool_t outer_contour; + rnd_bool_t outer_contour; hyp_vertex_t *vrtx; rnd_polyarea_t *polyarea = NULL; @@ -1154,7 +1154,7 @@ layer = pcb_get_layer(PCB->Data, hyp_create_layer(polygon->layer_name)); - outer_contour = pcb_true; + outer_contour = rnd_true; for (vrtx = polygon->vertex; vrtx != NULL; vrtx = vrtx->next) { pcb_vector_t v; @@ -1163,7 +1163,7 @@ if ((vrtx->is_first) || (vrtx->next == NULL)) { if (contour != NULL) { /* add contour to polyarea */ - pcb_poly_contour_pre(contour, pcb_false); + pcb_poly_contour_pre(contour, rnd_false); /* check contour valid */ if (pcb_polyarea_contour_check(contour) && hyp_debug) @@ -1177,7 +1177,7 @@ pcb_polyarea_contour_include(polyarea, contour); /* first contour is outer contour, remainder are holes */ - outer_contour = pcb_false; + outer_contour = rnd_false; } /* create new contour */ contour = pcb_poly_contour_new(v); @@ -1190,7 +1190,7 @@ pcb_poly_vertex_include(contour->head->prev, pcb_poly_node_create(v)); else /* arc. pcb polyarea contains line segments, not arc segments. convert arc segment to line segments. */ - hyp_arc2contour(contour, vrtx->x1, vrtx->y1, vrtx->x2, vrtx->y2, vrtx->xc, vrtx->yc, vrtx->r, pcb_false); + hyp_arc2contour(contour, vrtx->x1, vrtx->y1, vrtx->x2, vrtx->y2, vrtx->xc, vrtx->yc, vrtx->r, rnd_false); } } @@ -1394,8 +1394,8 @@ peri_seg->xc = 0; peri_seg->yc = 0; peri_seg->r = 0; - peri_seg->is_arc = pcb_false; - peri_seg->used = pcb_false; + peri_seg->is_arc = rnd_false; + peri_seg->used = rnd_false; peri_seg->next = NULL; if (hyp_debug) @@ -1440,8 +1440,8 @@ peri_arc->xc = xy2coord(h->xc); peri_arc->yc = xy2coord(h->yc); peri_arc->r = xy2coord(h->r); - peri_arc->is_arc = pcb_true; - peri_arc->used = pcb_false; + peri_arc->is_arc = rnd_true; + peri_arc->used = rnd_false; peri_arc->next = NULL; if (hyp_debug) @@ -1527,7 +1527,7 @@ if (hyp_debug) rnd_message(RND_MSG_DEBUG, "options: use_die_for_metal = %f\n", h->use_die_for_metal); if (h->use_die_for_metal) - use_die_for_metal = pcb_true; + use_die_for_metal = rnd_true; return 0; } @@ -1545,7 +1545,7 @@ signal_layer_id = hyp_create_layer(h->layer_name); - layer_is_plane[signal_layer_id] = pcb_false; + layer_is_plane[signal_layer_id] = rnd_false; if (h->plane_separation_set) layer_clearance[signal_layer_id] = xy2coord(h->plane_separation); @@ -1584,7 +1584,7 @@ plane_layer_id = hyp_create_layer(h->layer_name); - layer_is_plane[plane_layer_id] = pcb_true; + layer_is_plane[plane_layer_id] = rnd_true; if (h->plane_separation_set) layer_clearance[plane_layer_id] = xy2coord(h->plane_separation); @@ -2018,7 +2018,7 @@ } hyp_arc_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), - y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), pcb_true, xy2coord(h->width), hyp_clearance(h), pcb_no_flags()); + y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), rnd_true, xy2coord(h->width), hyp_clearance(h), pcb_no_flags()); return 0; } @@ -2341,12 +2341,12 @@ if (!h->layer_name_set) { hyp_error("expected polygon layer L = "); - return pcb_true; + return rnd_true; } if (!h->id_set) { hyp_error("expected polygon id ID = "); - return pcb_true; + return rnd_true; } /* make sure layer exists */ @@ -2369,8 +2369,8 @@ new_vertex->xc = 0; new_vertex->yc = 0; new_vertex->r = 0; - new_vertex->is_arc = pcb_false; - new_vertex->is_first = pcb_true; + new_vertex->is_arc = rnd_false; + new_vertex->is_first = rnd_true; new_vertex->next = NULL; /* create new polygon */ @@ -2377,7 +2377,7 @@ new_poly = malloc(sizeof(hyp_polygon_t)); new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */ new_poly->hyp_poly_type = h->polygon_type; - new_poly->is_polygon = pcb_true; + new_poly->is_polygon = rnd_true; new_poly->layer_name = h->layer_name; new_poly->line_width = xy2coord(h->width); new_poly->clearance = hyp_clearance(h); @@ -2424,7 +2424,7 @@ if (!h->id_set) { hyp_error("expected polygon id ID = "); - return pcb_true; + return rnd_true; } /* look up polygon with this id */ @@ -2454,8 +2454,8 @@ new_vertex->xc = 0; new_vertex->yc = 0; new_vertex->r = 0; - new_vertex->is_arc = pcb_false; - new_vertex->is_first = pcb_true; + new_vertex->is_arc = rnd_false; + new_vertex->is_first = rnd_true; new_vertex->next = NULL; /* bookkeeping */ @@ -2520,17 +2520,17 @@ if (!h->layer_name_set) { hyp_error("expected polygon layer L = "); - return pcb_true; + return rnd_true; } if (!h->width_set) { hyp_error("expected polygon width W = "); - return pcb_true; + return rnd_true; } if (!h->id_set) { hyp_error("expected polygon id ID = "); - return pcb_true; + return rnd_true; } /* make sure layer exists */ @@ -2553,8 +2553,8 @@ new_vertex->xc = 0; new_vertex->yc = 0; new_vertex->r = 0; - new_vertex->is_arc = pcb_false; - new_vertex->is_first = pcb_true; + new_vertex->is_arc = rnd_false; + new_vertex->is_first = rnd_true; new_vertex->next = NULL; /* create new polyline */ @@ -2561,7 +2561,7 @@ new_poly = malloc(sizeof(hyp_polygon_t)); new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */ new_poly->hyp_poly_type = h->polygon_type; - new_poly->is_polygon = pcb_false; + new_poly->is_polygon = rnd_false; new_poly->layer_name = h->layer_name; new_poly->line_width = xy2coord(h->width); new_poly->clearance = hyp_clearance(h); @@ -2614,8 +2614,8 @@ new_vertex->xc = 0; new_vertex->yc = 0; new_vertex->r = 0; - new_vertex->is_arc = pcb_false; - new_vertex->is_first = pcb_false; + new_vertex->is_arc = rnd_false; + new_vertex->is_first = rnd_false; new_vertex->next = NULL; /* bookkeeping */ @@ -2652,8 +2652,8 @@ new_vertex->xc = x2coord(h->xc); new_vertex->yc = y2coord(h->yc); new_vertex->r = xy2coord(h->r); - new_vertex->is_arc = pcb_true; - new_vertex->is_first = pcb_false; + new_vertex->is_arc = rnd_true; + new_vertex->is_first = rnd_false; new_vertex->next = NULL; /* bookkeeping */ Index: trunk/src_plugins/io_hyp/parser.h =================================================================== --- trunk/src_plugins/io_hyp/parser.h (revision 31010) +++ trunk/src_plugins/io_hyp/parser.h (revision 31011) @@ -243,7 +243,7 @@ /* create arc, hyperlynx-style */ 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 YC, rnd_coord_t Width, rnd_coord_t Height, rnd_bool_t Clockwise, rnd_coord_t Thickness, rnd_coord_t Clearance, pcb_flag_t Flags); #endif Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 31010) +++ trunk/src_plugins/io_kicad/read.c (revision 31011) @@ -506,7 +506,7 @@ rnd_message(RND_MSG_ERROR, "\tfp_* layer '%s' not found for module object, using unbound subc layer instead.\n", layer_name); lyt = PCB_LYT_VIRTUAL; comb = 0; - return pcb_subc_get_layer(subc, lyt, comb, 1, lnm, pcb_true); + return pcb_subc_get_layer(subc, lyt, comb, 1, lnm, rnd_true); } } else { @@ -529,7 +529,7 @@ comb = 0; if (lyt & PCB_LYT_MASK) comb |= PCB_LYC_SUB; - return pcb_subc_get_layer(subc, lyt, comb, 1, lnm, pcb_true); + return pcb_subc_get_layer(subc, lyt, comb, 1, lnm, rnd_true); } #define SEEN_NO_DUP(bucket, bit) \ @@ -1280,7 +1280,7 @@ cy += sy; } } - arc = pcb_arc_new(ly, cx, cy, width, height, start_angle, delta, thickness, clearance, flg, pcb_true); + arc = pcb_arc_new(ly, cx, cy, width, height, start_angle, delta, thickness, clearance, flg, rnd_true); if (st->primitive_term != NULL) rnd_attribute_put(&arc->Attributes, "term", st->primitive_term); } @@ -1369,7 +1369,7 @@ if ((blind_cnt != 0) && (blind_cnt != 2)) return kicad_error(subtree, "Contradiction in blind via parameters: the \"blind\" node must present and the via needs to end on an inner layer"); - ps = pcb_pstk_new_compat_via(st->pcb->Data, -1, x, y, drill, thickness, clearance, mask, PCB_PSTK_COMPAT_ROUND, pcb_true); + ps = pcb_pstk_new_compat_via(st->pcb->Data, -1, x, y, drill, thickness, clearance, mask, PCB_PSTK_COMPAT_ROUND, rnd_true); if (ps == NULL) return kicad_error(subtree, "failed to create via-padstack"); @@ -1750,7 +1750,7 @@ if (LYSHS(side, COPPER)) {sh[len].layer_mask = side | PCB_LYT_COPPER; pcb_shape_rect_trdelta(&sh[len++], padXsize, padYsize, dx, dy);} if (len == 0) goto no_layer; sh[len++].layer_mask = 0; - return pcb_pstk_new_from_shape(subc->data, X, Y, 0, pcb_false, clearance, sh); + return pcb_pstk_new_from_shape(subc->data, X, Y, 0, rnd_false, clearance, sh); } else if ((strcmp(pad_shape, "oval") == 0) || (strcmp(pad_shape, "circle") == 0)) { pcb_pstk_shape_t sh[4]; @@ -1760,7 +1760,7 @@ if (LYSHS(side, COPPER)) {sh[len].layer_mask = side | PCB_LYT_COPPER; pcb_shape_oval(&sh[len++], padXsize, padYsize);} if (len == 0) goto no_layer; sh[len++].layer_mask = 0; - return pcb_pstk_new_from_shape(subc->data, X, Y, 0, pcb_false, clearance, sh); + return pcb_pstk_new_from_shape(subc->data, X, Y, 0, rnd_false, clearance, sh); } else if (strcmp(pad_shape, "roundrect") == 0) { pcb_pstk_shape_t sh[4]; @@ -1776,7 +1776,7 @@ if (LYSHS(side, COPPER)) {sh[len].layer_mask = side | PCB_LYT_COPPER; pcb_shape_roundrect(&sh[len++], padXsize, padYsize, shape_arg);} if (len == 0) goto no_layer; sh[len++].layer_mask = 0; - return pcb_pstk_new_from_shape(subc->data, X, Y, 0, pcb_false, clearance, sh); + return pcb_pstk_new_from_shape(subc->data, X, Y, 0, rnd_false, clearance, sh); } kicad_error(subtree, "unsupported pad shape '%s'.", pad_shape); @@ -2063,7 +2063,7 @@ pcb_layer_combining_t comb = 0; if ((*typ) & (PCB_LYT_PASTE | PCB_LYT_MASK | PCB_LYT_SILK)) comb |= PCB_LYC_AUTO; if ((*typ) & (PCB_LYT_MASK)) comb |= PCB_LYC_SUB; - st->primitive_ly = pcb_subc_get_layer(subc, loc | *typ, comb, 1, "pad", pcb_false); + st->primitive_ly = pcb_subc_get_layer(subc, loc | *typ, comb, 1, "pad", rnd_false); if (st->primitive_ly != NULL) { res = kicad_parse_primitives_(st, primitives); if (!warned && ((*typ) & PCB_LYT_INTERN)) { @@ -2789,7 +2789,7 @@ /* enable fallback to the default font picked up when creating the based PCB (loading the default PCB), because we won't get a font from KiCad. */ - st.pcb->fontkit.valid = pcb_true; + st.pcb->fontkit.valid = rnd_true; return readres; } Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 31010) +++ trunk/src_plugins/io_kicad/write.c (revision 31011) @@ -693,11 +693,11 @@ kly.lyt = pcb_layer_flags_(ly); if (data->parent_type != PCB_PARENT_SUBC) { kly.type = ctx->layer[klayer].is_sig ? KLYT_COPPER : KLYT_GR; - kly.skip_term = pcb_false; + kly.skip_term = rnd_false; } else { kly.type = KLYT_FP; - kly.skip_term = pcb_true; + kly.skip_term = rnd_true; } kicad_print_layer(ctx, ly, &kly, ind, dx, dy); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 31010) +++ trunk/src_plugins/io_lihata/read.c (revision 31011) @@ -1265,7 +1265,7 @@ { pcb_layer_type_t silk_side = onsld ? PCB_LYT_BOTTOM : PCB_LYT_TOP; const char *name = onsld ? "bottom-silk" : "top-silk"; - silk = pcb_subc_get_layer(subc, PCB_LYT_SILK | silk_side, /*PCB_LYC_AUTO*/0, pcb_true, name, pcb_false); + silk = pcb_subc_get_layer(subc, PCB_LYT_SILK | silk_side, /*PCB_LYC_AUTO*/0, rnd_true, name, rnd_false); } lst = lht_dom_hash_get(obj, "objects"); @@ -1345,8 +1345,8 @@ for(n = 0; n < sc->data->LayerN; n++) sc->data->Layer[n].is_bound = 1; - pcb_data_bbox(&sc->BoundingBox, sc->data, pcb_true); - pcb_data_bbox_naked(&sc->bbox_naked, sc->data, pcb_true); + pcb_data_bbox(&sc->BoundingBox, sc->data, rnd_true); + pcb_data_bbox_naked(&sc->bbox_naked, sc->data, rnd_true); if (!dt->subc_tree) dt->subc_tree = pcb_r_create_tree(); @@ -2278,11 +2278,11 @@ sub = lht_dom_hash_get(nd, "data"); if (sub == NULL) { - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return iolht_error(nd, "Lihata board without data\n"); } if (parse_data(pcb, pcb->Data, sub, NULL) == NULL) { - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return -1; } @@ -2291,19 +2291,19 @@ sub = lht_dom_hash_get(nd, "styles"); if ((sub != NULL) && (parse_styles(pcb->Data, &pcb->RouteStyle, sub) != 0)) { - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return -1; } sub = lht_dom_hash_get(nd, "netlists"); if ((sub != NULL) && (parse_netlists(pcb, sub) != 0)) { - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return -1; } post_ids_assign(&post_ids); if (post_thermal_assign(pcb, &post_thermal_old, &post_thermal_heavy) != 0) { - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); return -1; } @@ -2334,7 +2334,7 @@ parse_meta(pcb, sub); } - pcb_data_clip_inhibit_dec(pcb->Data, pcb_true); + pcb_data_clip_inhibit_dec(pcb->Data, rnd_true); pcb->Data->loader = loader; /* set this manually so the version is remembered */ return 0; Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 31010) +++ trunk/src_plugins/io_lihata/write.c (revision 31011) @@ -663,7 +663,7 @@ for(ps = padstacklist_first(&subc->data->padstack); ps != NULL; ps = padstacklist_next(ps)) { lht_node_t *nps; - nps = build_pstk_pinvia(subc->data, ps, pcb_false, -ox, -oy); + nps = build_pstk_pinvia(subc->data, ps, rnd_false, -ox, -oy); if (nps == NULL) nps = build_pstk_pad(subc->data, ps, -ox, -oy); if (nps != NULL) @@ -1106,7 +1106,7 @@ } else { for(ps = padstacklist_first(&data->padstack); ps != NULL; ps = padstacklist_next(ps)) { - lht_node_t *p = build_pstk_pinvia(data, ps, pcb_true, 0, 0); + lht_node_t *p = build_pstk_pinvia(data, ps, rnd_true, 0, 0); if (p != NULL) lht_dom_list_append(grp, p); } @@ -1355,7 +1355,7 @@ pn = lht_dom_node_alloc(LHT_LIST, "netlist_patch"); ctx.patch = pn; - pcb_rats_patch_export(pcb, pat, pcb_false, build_net_patch_cb, &ctx); + pcb_rats_patch_export(pcb, pat, rnd_false, build_net_patch_cb, &ctx); if (pn->data.list.first == NULL) { lht_dom_node_free(pn); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 31010) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 31011) @@ -266,11 +266,11 @@ *y = yy; *r = rr; - if (suc1 == pcb_false) + if (suc1 == rnd_false) hkp_error(NULL, "parse_xyr error parsing %s.\n", s); - if (suc2 == pcb_false) + if (suc2 == rnd_false) hkp_error(NULL, "parse_xyr error parsing %s.\n", sy); - if (suc3 == pcb_false) + if (suc3 == rnd_false) hkp_error(NULL, "parse_xyr error parsing %s.\n", sr); return !(suc1 && suc2 && suc3); } Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 31010) +++ trunk/src_plugins/io_pcb/file.c (revision 31011) @@ -782,7 +782,7 @@ pcb_layer_group_setup_default(yyPCB); PCB = yyPCB; pcb_layer_group_setup_silks(yyPCB); - pcb_data_bbox(&dbb, yyPCB->Data, pcb_false); + pcb_data_bbox(&dbb, yyPCB->Data, rnd_false); pcb_data_normalize_(yyPCB->Data, &dbb); PCB = pcb_save; yyPCB->hidlib.size_x = dbb.X2*2; @@ -1080,7 +1080,7 @@ { pcb_layer_type_t side = yysubc_bottom ? PCB_LYT_BOTTOM : PCB_LYT_TOP; const char *name = yysubc_bottom ? "bottom-silk" : "top-silk"; - return pcb_subc_get_layer(subc, PCB_LYT_SILK | side, /*PCB_LYC_AUTO*/0, pcb_true, name, pcb_false); + return pcb_subc_get_layer(subc, PCB_LYT_SILK | side, /*PCB_LYC_AUTO*/0, rnd_true, name, rnd_false); } 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) @@ -1093,7 +1093,7 @@ rnd_coord_t Width, rnd_coord_t Height, rnd_angle_t angle, rnd_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); + return pcb_arc_new(ly, X, Y, Width, Height, angle, delta, Thickness, 0, pcb_no_flags(), rnd_true); } 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) @@ -1193,7 +1193,7 @@ void pcb_tmp_data_save(void) { char *fn = rnd_build_fn(&PCB->hidlib, conf_core.rc.emergency_name); - pcb_write_pcb_file(fn, pcb_true, NULL, pcb_true, pcb_false, -1, 0); + pcb_write_pcb_file(fn, rnd_true, NULL, rnd_true, rnd_false, -1, 0); if (TMPFilename != NULL) free(TMPFilename); TMPFilename = fn; Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 31010) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 31011) @@ -2600,7 +2600,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static rnd_bool firsttime = pcb_true; + static rnd_bool firsttime = rnd_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -2653,7 +2653,7 @@ /* reset parser if not called the first time */ if (!firsttime) yyrestart(yyin); - firsttime = pcb_false; + firsttime = rnd_false; #endif /* init linenumber and filename for yyerror() */ @@ -2666,7 +2666,7 @@ * on termination. */ - pcb_create_be_lenient(pcb_true); + pcb_create_be_lenient(rnd_true); #if !defined(RND_HAS_ATEXIT) if (PCB && PCB->Data) @@ -2679,7 +2679,7 @@ /* clean up parse buffer */ yy_delete_buffer(YY_CURRENT_BUFFER); - pcb_create_be_lenient(pcb_false); + pcb_create_be_lenient(rnd_false); if (Pipe != NULL) return returncode; @@ -2708,7 +2708,7 @@ yyData = Ptr; pcb_data_set_layer_parents(Ptr); yyFont = pcb_font(PCB, 0, 1); - yyFontReset = pcb_false; + yyFontReset = rnd_false; yyFontkitValid = NULL; yysubc = NULL; yyElemFixLayers = 1; @@ -2758,7 +2758,7 @@ yyPCB = Ptr; yyData = NULL; yyFont = NULL; - yyFontReset = pcb_true; + yyFontReset = rnd_true; yyFontkitValid = NULL; yysubc = NULL; yy_settings_dest = settings_dest; @@ -2867,7 +2867,7 @@ yyFont = Ptr; yyFontkitValid = &valid; yysubc = NULL; - yyFontReset = pcb_false; + yyFontReset = rnd_false; yy_settings_dest = RND_CFR_invalid; fcmd = conf_core.rc.font_command; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 31010) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 31011) @@ -217,7 +217,7 @@ char *tmps; size_t l; #ifdef FLEX_SCANNER - static rnd_bool firsttime = pcb_true; + static rnd_bool firsttime = rnd_true; #endif pcb_io_pcb_usty_seen = 0; if (Pipe == NULL) { @@ -270,7 +270,7 @@ /* reset parser if not called the first time */ if (!firsttime) yyrestart(yyin); - firsttime = pcb_false; + firsttime = rnd_false; #endif /* init linenumber and filename for yyerror() */ @@ -283,7 +283,7 @@ * on termination. */ - pcb_create_be_lenient(pcb_true); + pcb_create_be_lenient(rnd_true); #if !defined(RND_HAS_ATEXIT) if (PCB && PCB->Data) @@ -296,7 +296,7 @@ /* clean up parse buffer */ yy_delete_buffer(YY_CURRENT_BUFFER); - pcb_create_be_lenient(pcb_false); + pcb_create_be_lenient(rnd_false); if (Pipe != NULL) return returncode; @@ -325,7 +325,7 @@ yyData = Ptr; pcb_data_set_layer_parents(Ptr); yyFont = pcb_font(PCB, 0, 1); - yyFontReset = pcb_false; + yyFontReset = rnd_false; yyFontkitValid = NULL; yysubc = NULL; yyElemFixLayers = 1; @@ -375,7 +375,7 @@ yyPCB = Ptr; yyData = NULL; yyFont = NULL; - yyFontReset = pcb_true; + yyFontReset = rnd_true; yyFontkitValid = NULL; yysubc = NULL; yy_settings_dest = settings_dest; @@ -484,7 +484,7 @@ yyFont = Ptr; yyFontkitValid = &valid; yysubc = NULL; - yyFontReset = pcb_false; + yyFontReset = rnd_false; yy_settings_dest = RND_CFR_invalid; fcmd = conf_core.rc.font_command; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 31010) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 31011) @@ -1825,7 +1825,7 @@ YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) - LayerFlag[i] = pcb_false; + LayerFlag[i] = rnd_false; yyFont = &yyPCB->fontkit.dflt; yyFontkitValid = &yyPCB->fontkit.valid; yyData = yyPCB->Data; @@ -1846,7 +1846,7 @@ rnd_conf_set(yy_settings_dest, "design/groups", -1, layer_group_string, RND_POL_OVERWRITE); pcb_board_new_postproc(yyPCB, 0); if (layer_group_string == NULL) { - if (pcb_layer_improvise(yyPCB, pcb_true) != 0) { + if (pcb_layer_improvise(yyPCB, rnd_true) != 0) { rnd_message(RND_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } @@ -1859,7 +1859,7 @@ YYABORT; } else { - if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { + if (pcb_layer_improvise(yyPCB, rnd_false) != 0) { rnd_message(RND_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } @@ -1889,8 +1889,8 @@ case 9: #line 232 "parse_y.y" /* yacc.c:1652 */ - { LayerFlag[0] = pcb_true; - LayerFlag[1] = pcb_true; + { LayerFlag[0] = rnd_true; + LayerFlag[1] = rnd_true; if (yyElemFixLayers) { yyData->LayerN = 2; free((char *)yyData->Layer[0].name); @@ -1925,7 +1925,7 @@ YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) - LayerFlag[i] = pcb_false; + LayerFlag[i] = rnd_false; yyData->LayerN = 0; } #line 1932 "parse_y.c" /* yacc.c:1652 */ @@ -1944,7 +1944,7 @@ pcb_font_free (yyFont); yyFont->id = 0; } - *yyFontkitValid = pcb_false; + *yyFontkitValid = rnd_false; } #line 1950 "parse_y.c" /* yacc.c:1652 */ break; @@ -1952,7 +1952,7 @@ case 15: #line 293 "parse_y.y" /* yacc.c:1652 */ { - *yyFontkitValid = pcb_true; + *yyFontkitValid = rnd_true; pcb_font_set_info(yyFont); } #line 1959 "parse_y.c" /* yacc.c:1652 */ @@ -2284,7 +2284,7 @@ if (Layer->name != NULL) free((char*)Layer->name); Layer->name = (yyvsp[-3].string); /* shouldn't this be strdup()'ed ? */ - LayerFlag[(yyvsp[-4].integer)-1] = pcb_true; + LayerFlag[(yyvsp[-4].integer)-1] = rnd_true; if (yyData->LayerN < (yyvsp[-4].integer)) yyData->LayerN = (yyvsp[-4].integer); if ((yyvsp[-2].string) != NULL) @@ -2341,7 +2341,7 @@ #line 687 "parse_y.y" /* yacc.c:1652 */ { pcb_arc_new(Layer, NU ((yyvsp[-9].measure)), NU ((yyvsp[-8].measure)), NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), - NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-1].flagtype), pcb_true); + NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-1].flagtype), rnd_true); } #line 2347 "parse_y.c" /* yacc.c:1652 */ break; @@ -2350,7 +2350,7 @@ #line 696 "parse_y.y" /* yacc.c:1652 */ { pcb_arc_new(Layer, OU ((yyvsp[-9].measure)), OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), - OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), pcb_flag_old((yyvsp[-1].integer)), pcb_true); + OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), pcb_flag_old((yyvsp[-1].integer)), rnd_true); } #line 2356 "parse_y.c" /* yacc.c:1652 */ break; @@ -2359,7 +2359,7 @@ #line 705 "parse_y.y" /* yacc.c:1652 */ { pcb_arc_new(Layer, OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-6].measure)), IV ((yyvsp[-3].measure)), (yyvsp[-2].number), - OU ((yyvsp[-4].measure)), 200*PCB_GROUNDPLANEFRAME, pcb_flag_old((yyvsp[-1].integer)), pcb_true); + OU ((yyvsp[-4].measure)), 200*PCB_GROUNDPLANEFRAME, pcb_flag_old((yyvsp[-1].integer)), rnd_true); } #line 2365 "parse_y.c" /* yacc.c:1652 */ break; @@ -2429,7 +2429,7 @@ #line 771 "parse_y.y" /* yacc.c:1652 */ { rnd_cardinal_t contour, contour_start, contour_end; - rnd_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = rnd_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -2439,7 +2439,7 @@ Polygon->PointN : Polygon->HoleIndex[contour]; if (contour_end - contour_start < 3) - bad_contour_found = pcb_true; + bad_contour_found = rnd_true; } if (bad_contour_found) @@ -2489,7 +2489,7 @@ #line 847 "parse_y.y" /* yacc.c:1652 */ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_no_flags(), - (yyvsp[-6].string), (yyvsp[-5].string), NULL, OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].integer), 100, pcb_no_flags(), pcb_false); + (yyvsp[-6].string), (yyvsp[-5].string), NULL, OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].integer), 100, pcb_no_flags(), rnd_false); free ((yyvsp[-6].string)); free ((yyvsp[-5].string)); pin_num = 1; @@ -2509,7 +2509,7 @@ #line 865 "parse_y.y" /* yacc.c:1652 */ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old((yyvsp[-9].integer)), - (yyvsp[-8].string), (yyvsp[-7].string), NULL, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), IV ((yyvsp[-4].measure)), IV ((yyvsp[-3].measure)), pcb_flag_old((yyvsp[-2].integer)), pcb_false); + (yyvsp[-8].string), (yyvsp[-7].string), NULL, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), IV ((yyvsp[-4].measure)), IV ((yyvsp[-3].measure)), pcb_flag_old((yyvsp[-2].integer)), rnd_false); free ((yyvsp[-8].string)); free ((yyvsp[-7].string)); pin_num = 1; @@ -2529,7 +2529,7 @@ #line 883 "parse_y.y" /* yacc.c:1652 */ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old((yyvsp[-10].integer)), - (yyvsp[-9].string), (yyvsp[-8].string), (yyvsp[-7].string), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), IV ((yyvsp[-4].measure)), IV ((yyvsp[-3].measure)), pcb_flag_old((yyvsp[-2].integer)), pcb_false); + (yyvsp[-9].string), (yyvsp[-8].string), (yyvsp[-7].string), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), IV ((yyvsp[-4].measure)), IV ((yyvsp[-3].measure)), pcb_flag_old((yyvsp[-2].integer)), rnd_false); free ((yyvsp[-9].string)); free ((yyvsp[-8].string)); free ((yyvsp[-7].string)); @@ -2551,7 +2551,7 @@ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old((yyvsp[-12].integer)), (yyvsp[-11].string), (yyvsp[-10].string), (yyvsp[-9].string), OU ((yyvsp[-8].measure)) + OU ((yyvsp[-6].measure)), OU ((yyvsp[-7].measure)) + OU ((yyvsp[-5].measure)), - (yyvsp[-4].number), (yyvsp[-3].number), pcb_flag_old((yyvsp[-2].integer)), pcb_false); + (yyvsp[-4].number), (yyvsp[-3].number), pcb_flag_old((yyvsp[-2].integer)), rnd_false); yysubc_ox = OU ((yyvsp[-8].measure)); yysubc_oy = OU ((yyvsp[-7].measure)); free ((yyvsp[-11].string)); @@ -2574,7 +2574,7 @@ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, (yyvsp[-12].flagtype), (yyvsp[-11].string), (yyvsp[-10].string), (yyvsp[-9].string), NU ((yyvsp[-8].measure)) + NU ((yyvsp[-6].measure)), NU ((yyvsp[-7].measure)) + NU ((yyvsp[-5].measure)), - (yyvsp[-4].number), (yyvsp[-3].number), (yyvsp[-2].flagtype), pcb_false); + (yyvsp[-4].number), (yyvsp[-3].number), (yyvsp[-2].flagtype), rnd_false); yysubc_ox = NU ((yyvsp[-8].measure)); yysubc_oy = NU ((yyvsp[-7].measure)); free ((yyvsp[-11].string)); @@ -2845,7 +2845,7 @@ yyerror("symbol ID used twice"); YYABORT; } - Symbol->Valid = pcb_true; + Symbol->Valid = rnd_true; Symbol->Delta = NU ((yyvsp[-2].measure)); } #line 2852 "parse_y.c" /* yacc.c:1652 */ @@ -2865,7 +2865,7 @@ yyerror("symbol ID used twice"); YYABORT; } - Symbol->Valid = pcb_true; + Symbol->Valid = rnd_true; Symbol->Delta = OU ((yyvsp[-2].measure)); } #line 2872 "parse_y.c" /* yacc.c:1652 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 31010) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 31011) @@ -164,7 +164,7 @@ YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) - LayerFlag[i] = pcb_false; + LayerFlag[i] = rnd_false; yyFont = &yyPCB->fontkit.dflt; yyFontkitValid = &yyPCB->fontkit.valid; yyData = yyPCB->Data; @@ -194,7 +194,7 @@ rnd_conf_set(yy_settings_dest, "design/groups", -1, layer_group_string, RND_POL_OVERWRITE); pcb_board_new_postproc(yyPCB, 0); if (layer_group_string == NULL) { - if (pcb_layer_improvise(yyPCB, pcb_true) != 0) { + if (pcb_layer_improvise(yyPCB, rnd_true) != 0) { rnd_message(RND_MSG_ERROR, "missing layer-group string, failed to improvise the groups\n"); YYABORT; } @@ -207,7 +207,7 @@ YYABORT; } else { - if (pcb_layer_improvise(yyPCB, pcb_false) != 0) { + if (pcb_layer_improvise(yyPCB, rnd_false) != 0) { rnd_message(RND_MSG_ERROR, "failed to extend-improvise the groups\n"); YYABORT; } @@ -229,8 +229,8 @@ | { PreLoadElementPCB (); layer_group_string = NULL; } element - { LayerFlag[0] = pcb_true; - LayerFlag[1] = pcb_true; + { LayerFlag[0] = rnd_true; + LayerFlag[1] = rnd_true; if (yyElemFixLayers) { yyData->LayerN = 2; free((char *)yyData->Layer[0].name); @@ -263,7 +263,7 @@ YYABORT; } for (i = 0; i < PCB_MAX_LAYER + 2; i++) - LayerFlag[i] = pcb_false; + LayerFlag[i] = rnd_false; yyData->LayerN = 0; } pcbdata @@ -287,11 +287,11 @@ pcb_font_free (yyFont); yyFont->id = 0; } - *yyFontkitValid = pcb_false; + *yyFontkitValid = rnd_false; } symbols { - *yyFontkitValid = pcb_true; + *yyFontkitValid = rnd_true; pcb_font_set_info(yyFont); } ; @@ -614,7 +614,7 @@ if (Layer->name != NULL) free((char*)Layer->name); Layer->name = $4; /* shouldn't this be strdup()'ed ? */ - LayerFlag[$3-1] = pcb_true; + LayerFlag[$3-1] = rnd_true; if (yyData->LayerN < $3) yyData->LayerN = $3; if ($5 != NULL) @@ -686,7 +686,7 @@ : T_ARC '[' measure measure measure measure measure measure number number flags ']' { pcb_arc_new(Layer, NU ($3), NU ($4), NU ($5), NU ($6), $9, $10, - NU ($7), NU ($8), $11, pcb_true); + NU ($7), NU ($8), $11, rnd_true); } ; @@ -695,7 +695,7 @@ : T_ARC '(' measure measure measure measure measure measure number number INTEGER ')' { pcb_arc_new(Layer, OU ($3), OU ($4), OU ($5), OU ($6), $9, $10, - OU ($7), OU ($8), pcb_flag_old($11), pcb_true); + OU ($7), OU ($8), pcb_flag_old($11), rnd_true); } ; @@ -704,7 +704,7 @@ : T_ARC '(' measure measure measure measure measure measure number INTEGER ')' { pcb_arc_new(Layer, OU ($3), OU ($4), OU ($5), OU ($5), IV ($8), $9, - OU ($7), 200*PCB_GROUNDPLANEFRAME, pcb_flag_old($10), pcb_true); + OU ($7), 200*PCB_GROUNDPLANEFRAME, pcb_flag_old($10), rnd_true); } ; @@ -770,7 +770,7 @@ polygonholes ')' { rnd_cardinal_t contour, contour_start, contour_end; - rnd_bool bad_contour_found = pcb_false; + rnd_bool bad_contour_found = rnd_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) { @@ -780,7 +780,7 @@ Polygon->PointN : Polygon->HoleIndex[contour]; if (contour_end - contour_start < 3) - bad_contour_found = pcb_true; + bad_contour_found = rnd_true; } if (bad_contour_found) @@ -846,7 +846,7 @@ : T_ELEMENT '(' STRING STRING measure measure INTEGER ')' '(' { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_no_flags(), - $3, $4, NULL, OU ($5), OU ($6), $7, 100, pcb_no_flags(), pcb_false); + $3, $4, NULL, OU ($5), OU ($6), $7, 100, pcb_no_flags(), rnd_false); free ($3); free ($4); pin_num = 1; @@ -864,7 +864,7 @@ : T_ELEMENT '(' INTEGER STRING STRING measure measure measure measure INTEGER ')' '(' { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old($3), - $4, $5, NULL, OU ($6), OU ($7), IV ($8), IV ($9), pcb_flag_old($10), pcb_false); + $4, $5, NULL, OU ($6), OU ($7), IV ($8), IV ($9), pcb_flag_old($10), rnd_false); free ($4); free ($5); pin_num = 1; @@ -882,7 +882,7 @@ : T_ELEMENT '(' INTEGER STRING STRING STRING measure measure measure measure INTEGER ')' '(' { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old($3), - $4, $5, $6, OU ($7), OU ($8), IV ($9), IV ($10), pcb_flag_old($11), pcb_false); + $4, $5, $6, OU ($7), OU ($8), IV ($9), IV ($10), pcb_flag_old($11), rnd_false); free ($4); free ($5); free ($6); @@ -903,7 +903,7 @@ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, pcb_flag_old($3), $4, $5, $6, OU ($7) + OU ($9), OU ($8) + OU ($10), - $11, $12, pcb_flag_old($13), pcb_false); + $11, $12, pcb_flag_old($13), rnd_false); yysubc_ox = OU ($7); yysubc_oy = OU ($8); free ($4); @@ -925,7 +925,7 @@ { yysubc = io_pcb_element_new(yyData, yysubc, yyFont, $3, $4, $5, $6, NU ($7) + NU ($9), NU ($8) + NU ($10), - $11, $12, $13, pcb_false); + $11, $12, $13, rnd_false); yysubc_ox = NU ($7); yysubc_oy = NU ($8); free ($4); @@ -1174,7 +1174,7 @@ yyerror("symbol ID used twice"); YYABORT; } - Symbol->Valid = pcb_true; + Symbol->Valid = rnd_true; Symbol->Delta = NU ($4); } | T_SYMBOL '(' symbolid measure ')' '(' @@ -1190,7 +1190,7 @@ yyerror("symbol ID used twice"); YYABORT; } - Symbol->Valid = pcb_true; + Symbol->Valid = rnd_true; Symbol->Delta = OU ($4); } ; Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 31010) +++ trunk/src_plugins/io_tedax/footprint.c (revision 31011) @@ -448,12 +448,12 @@ if (strcmp(lloc, "all") == 0) { sprintf(name, "top_%s", ltyp); - layers[0] = pcb_subc_get_layer(subc, lyt | PCB_LYT_TOP, -1, pcb_true, name, pcb_false); + layers[0] = pcb_subc_get_layer(subc, lyt | PCB_LYT_TOP, -1, rnd_true, name, rnd_false); sprintf(name, "bottom_%s", ltyp); - layers[1] = pcb_subc_get_layer(subc, lyt | PCB_LYT_BOTTOM, -1, pcb_true, name, pcb_false); + layers[1] = pcb_subc_get_layer(subc, lyt | PCB_LYT_BOTTOM, -1, rnd_true, name, rnd_false); if (lyt == PCB_LYT_COPPER) { sprintf(name, "intern_%s", ltyp); - layers[2] = pcb_subc_get_layer(subc, lyt | PCB_LYT_INTERN, -1, pcb_true, name, pcb_false); + layers[2] = pcb_subc_get_layer(subc, lyt | PCB_LYT_INTERN, -1, rnd_true, name, rnd_false); } return layers; } @@ -467,7 +467,7 @@ } sprintf(name, "%s_%s", lloc, ltyp); - layers[0] = pcb_subc_get_layer(subc, lyt, -1, pcb_true, name, pcb_false); + layers[0] = pcb_subc_get_layer(subc, lyt, -1, rnd_true, name, rnd_false); return layers; } @@ -548,7 +548,7 @@ load_val(w, argv[9], "invalid arc width"); for(; *ly != NULL; ly++) { - a = pcb_arc_new(*ly, cx, cy, r, r, sa, da, w, clr, pcb_flag_make(PCB_FLAG_CLEARLINE), pcb_true); + a = pcb_arc_new(*ly, cx, cy, r, r, sa, da, w, clr, pcb_flag_make(PCB_FLAG_CLEARLINE), rnd_true); load_term(a, argv[3], "invalid term ID for arc: '%s', skipping footprint\n"); } } @@ -591,14 +591,14 @@ into one or more padstacks */ for (ei = htip_first(&terms); ei; ei = htip_next(&terms, ei)) { term = ei->value; - pcb_pstk_vect2pstk(subc->data, &term->objs, pcb_true); + pcb_pstk_vect2pstk(subc->data, &term->objs, rnd_true); term_destroy(term); } htip_uninit(&terms); rnd_attribute_put(&subc->Attributes, "refdes", "X1"); - pcb_subc_add_refdes_text(subc, 0, 0, 0, 100, pcb_false); - pcb_subc_create_aux(subc, 0, 0, 0.0, pcb_false); + pcb_subc_add_refdes_text(subc, 0, 0, 0, 100, rnd_false); + pcb_subc_create_aux(subc, 0, 0, 0.0, rnd_false); return res; } Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 31010) +++ trunk/src_plugins/jostle/jostle.c (revision 31011) @@ -502,7 +502,7 @@ pcb_polyarea_boolean_free(info.brush, expand, &info.brush, PCB_PBO_UNITE); } } while (found); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); pcb_undo_inc_serial(); RND_ACT_IRES(0); Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 31010) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 31011) @@ -345,55 +345,55 @@ proto = pcb_pstk_get_proto_(ps->parent.data, ps->proto); if ((proto == NULL) || (proto->tr.used < 1)) - return pcb_false; + return rnd_false; tshp = &proto->tr.array[0]; if ((tshp->len != 3) && (tshp->len != 5)) - return pcb_false; /* allow only 3 coppers + optionally 2 masks */ + return rnd_false; /* allow only 3 coppers + optionally 2 masks */ for(n = 0; n < tshp->len; n++) { if (tshp->shape[n].shape != tshp->shape[0].shape) - return pcb_false; /* all shapes must be the same */ + return rnd_false; /* all shapes must be the same */ if ((tshp->shape[n].layer_mask & PCB_LYT_ANYWHERE) == 0) - return pcb_false; + return rnd_false; if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { coppern = n; continue; } if (tshp->shape[n].layer_mask & PCB_LYT_INTERN) - return pcb_false; /* accept only copper as intern */ + return rnd_false; /* accept only copper as intern */ if (tshp->shape[n].layer_mask & PCB_LYT_MASK) { maskn = n; continue; } - return pcb_false; /* refuse anything else */ + return rnd_false; /* refuse anything else */ } /* we must have copper shapes */ if (coppern < 0) - return pcb_false; + return rnd_false; if (tshp->shape[0].shape == PCB_PSSH_POLY) for(n = 1; n < tshp->len; n++) if (tshp->shape[n].data.poly.len != tshp->shape[0].data.poly.len) - return pcb_false; /* all polygons must have the same number of corners */ + return rnd_false; /* all polygons must have the same number of corners */ for(n = 0; n < tshp->len; n++) { old_shape[n] = get_old_shape(&old_dia[n], &tshp->shape[n]); if (old_shape[n] == PCB_PSTK_COMPAT_INVALID) - return pcb_false; + return rnd_false; if (old_shape[n] != old_shape[0]) - return pcb_false; + return rnd_false; } /* all copper sizes must be the same, all mask sizes must be the same */ for(n = 0; n < tshp->len; n++) { if ((tshp->shape[n].layer_mask & PCB_LYT_COPPER) && (RND_ABS(old_dia[n] - old_dia[coppern]) > 10)) - return pcb_false; + return rnd_false; if (maskn >= 0) if ((tshp->shape[n].layer_mask & PCB_LYT_MASK) && (RND_ABS(old_dia[n] - old_dia[maskn]) > 10)) - return pcb_false; + return rnd_false; } /* all went fine, collect and return data */ @@ -410,7 +410,7 @@ if (*pad_dia < *drill_dia) *clearance -= (*drill_dia - *pad_dia)/2; - return pcb_true; + return rnd_true; } /* emulate the old 'square flag' pad */ @@ -535,29 +535,29 @@ proto = pcb_pstk_get_proto_(ps->parent.data, ps->proto); if ((proto == NULL) || (proto->tr.used < 1)) - return pcb_false; + return rnd_false; tshp = &proto->tr.array[0]; if ((tshp->len < 2) || (tshp->len > 3)) - return pcb_false; /* allow at most a copper, a mask and a paste */ + return rnd_false; /* allow at most a copper, a mask and a paste */ /* determine whether we are on top or bottom */ side = tshp->shape[0].layer_mask & (PCB_LYT_TOP | PCB_LYT_BOTTOM); if ((side == 0) || (side == (PCB_LYT_TOP | PCB_LYT_BOTTOM))) - return pcb_false; + return rnd_false; for(n = 0; n < tshp->len; n++) { if (tshp->shape[n].shape != tshp->shape[0].shape) - return pcb_false; /* all shapes must be the same */ + return rnd_false; /* all shapes must be the same */ if ((tshp->shape[n].layer_mask & PCB_LYT_ANYWHERE) != side) - return pcb_false; /* all shapes must be the same side */ + return rnd_false; /* all shapes must be the same side */ if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { coppern = n; continue; } if (tshp->shape[n].layer_mask & PCB_LYT_INTERN) - return pcb_false; /* accept only copper as intern */ + return rnd_false; /* accept only copper as intern */ if (tshp->shape[n].layer_mask & PCB_LYT_MASK) { maskn = n; continue; @@ -566,12 +566,12 @@ pasten = n; continue; } - return pcb_false; /* refuse anything else */ + return rnd_false; /* refuse anything else */ } /* require copper and mask shapes */ if ((coppern < 0) || (maskn < 0)) - return pcb_false; + return rnd_false; /* if the shape is poly, convert to line to make the rest of the code simpler */ if (tshp->shape[0].shape == PCB_PSSH_POLY) { @@ -584,13 +584,13 @@ continue; if (tshp->shape[n].data.poly.len != 4) - return pcb_false; + return rnd_false; stepd = ps->rot / 90.0; step = stepd; step2 = (double)step * 90.0; if (fabs(ps->rot - step2) > 0.01) - return pcb_false; + return rnd_false; x1 = tshp->shape[n].data.poly.x[0]; x2 = tshp->shape[n].data.poly.x[2]; @@ -624,32 +624,32 @@ for(n = 1; n < tshp->len; n++) { switch(tshp->shape[0].shape) { case PCB_PSSH_HSHADOW: - return pcb_false; + return rnd_false; case PCB_PSSH_LINE: if (tshp->shape[0].data.line.x1 != tshp->shape[n].data.line.x1) - return pcb_false; + return rnd_false; if (tshp->shape[0].data.line.y1 != tshp->shape[n].data.line.y1) - return pcb_false; + return rnd_false; if (tshp->shape[0].data.line.x2 != tshp->shape[n].data.line.x2) - return pcb_false; + return rnd_false; if (tshp->shape[0].data.line.y2 != tshp->shape[n].data.line.y2) - return pcb_false; + return rnd_false; break; case PCB_PSSH_CIRC: if (tshp->shape[0].data.circ.x != tshp->shape[n].data.circ.x) - return pcb_false; + return rnd_false; if (tshp->shape[0].data.circ.y != tshp->shape[n].data.circ.y) - return pcb_false; + return rnd_false; break; case PCB_PSSH_POLY: if (lx1[0] != lx1[n]) - return pcb_false; + return rnd_false; if (ly1[0] != ly1[n]) - return pcb_false; + return rnd_false; if (lx2[0] != lx2[n]) - return pcb_false; + return rnd_false; if (ly2[0] != ly2[n]) - return pcb_false; + return rnd_false; break; } } @@ -688,7 +688,7 @@ *clearance = (ps->Clearance > 0 ? ps->Clearance : tshp->shape[0].clearance) * 2; *nopaste = pasten < 0; - return pcb_true; + return rnd_true; } pcb_flag_t pcb_pstk_compat_pinvia_flag(pcb_pstk_t *ps, pcb_pstk_compshape_t cshape, pcb_pstk_compat_t compat) Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 31010) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 31011) @@ -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, rnd_coord_t cx, rnd_coord_t cy, int plated, pcb_any_obj_t *extrao) +static int vect2pstk_conv_cand(pcb_data_t *data, vtp0_t *objs, rnd_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; @@ -117,7 +117,7 @@ return res; } -int pcb_pstk_vect2pstk_thr(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet) +int pcb_pstk_vect2pstk_thr(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet) { int l, n, plated, done = 0, ci; pcb_pstk_proto_t *p; @@ -203,7 +203,7 @@ return done; } -int pcb_pstk_vect2pstk_smd(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet) +int pcb_pstk_vect2pstk_smd(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet) { int l, n, done = 0, ci; rnd_coord_t cx, cy; @@ -271,7 +271,7 @@ return done; } -int pcb_pstk_vect2pstk(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet) +int pcb_pstk_vect2pstk(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet) { int t = pcb_pstk_vect2pstk_thr(data, objs, quiet); int s = pcb_pstk_vect2pstk_smd(data, objs, quiet); Index: trunk/src_plugins/lib_compat_help/pstk_help.h =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.h (revision 31010) +++ trunk/src_plugins/lib_compat_help/pstk_help.h (revision 31011) @@ -16,11 +16,11 @@ placed back in objs. Quiet controls log messages. Return the number of padstacks created. Return -1 on error. WARNING: O(n^2) loops, assuming there are only a dozen of objects passed. */ -int pcb_pstk_vect2pstk_thr(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet); /* thru-hole pins only */ -int pcb_pstk_vect2pstk_smd(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet); /* smd pads only */ +int pcb_pstk_vect2pstk_thr(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet); /* thru-hole pins only */ +int pcb_pstk_vect2pstk_smd(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet); /* smd pads only */ /* Same as above, but convert both; returns -1 only if both failed */ -int pcb_pstk_vect2pstk(pcb_data_t *data, vtp0_t *objs, pcb_bool_t quiet); +int pcb_pstk_vect2pstk(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet); /*** shape generators ***/ void pcb_shape_rect(pcb_pstk_shape_t *shape, rnd_coord_t width, rnd_coord_t height); Index: trunk/src_plugins/lib_compat_help/subc_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/subc_help.c (revision 31010) +++ trunk/src_plugins/lib_compat_help/subc_help.c (revision 31011) @@ -29,7 +29,7 @@ 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); + pcb_layer_t *ly = pcb_subc_get_layer(sc, side | PCB_LYT_SILK, 0, rnd_true, "top-silk", rnd_false); if (ly != NULL) return pcb_text_new(ly, pcb_font(PCB, 0, 0), x, y, 90.0 * direction, scale, 0, pattern, pcb_flag_make(PCB_FLAG_DYNTEXT | PCB_FLAG_FLOATER | (bottom ? PCB_FLAG_ONSOLDER : 0))); return 0; Index: trunk/src_plugins/lib_gtk_common/bu_command.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_command.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/bu_command.c (revision 31011) @@ -238,7 +238,7 @@ command = ghid_command_entry_get(ctx, rnd_cli_prompt(":"), (gchar *)""); if (command != NULL) { /* copy new command line to save buffer */ - rnd_parse_command(hl, command, pcb_false); + rnd_parse_command(hl, command, rnd_false); g_free(command); } } Index: trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 31011) @@ -69,7 +69,7 @@ rnd_hid_preview_t *prv = draw_data; if (prv->user_mouse_cb != NULL) return prv->user_mouse_cb(prv->attrib, prv, kind, x, y); - return pcb_false; + return rnd_false; } void ghid_preview_zoomto(rnd_hid_attribute_t *attrib, void *hid_ctx, const rnd_rnd_box_t *view) Index: trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 31011) @@ -234,7 +234,7 @@ GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; - rnd_bool key_handled, arrow_key, enter_key, force_activate = pcb_false; + rnd_bool key_handled, arrow_key, enter_key, force_activate = rnd_false; GtkClipboard *clipboard; guint default_mod_mask = gtk_accelerator_get_default_mod_mask(); @@ -306,7 +306,7 @@ } else { /* automatic decision: only leaf nodes activate */ if (gdl_first(&r->children) == NULL) - force_activate = pcb_true; + force_activate = rnd_true; } } } Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 31011) @@ -224,11 +224,11 @@ update_history(hi, path); if ((pctx.active) && (sub != NULL) && (sub->on_close != NULL)) - sub->on_close(sub, pcb_true); + sub->on_close(sub, rnd_true); } else { if ((pctx.active) && (sub != NULL) && (sub->on_close != NULL)) - sub->on_close(sub, pcb_false); + sub->on_close(sub, rnd_false); } if (pctx.active) { Index: trunk/src_plugins/lib_gtk_common/in_mouse.c =================================================================== --- trunk/src_plugins/lib_gtk_common/in_mouse.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/in_mouse.c (revision 31011) @@ -170,7 +170,7 @@ ask for coord if the scrollwheel triggered the event, it may cause strange GUI lockups when done outside of the drawing area */ if ((getting_loc) || (ghid_wheel_zoom)) - return pcb_false; + return rnd_false; getting_loc = 1; rnd_actionva(ctx->hidlib, "StatusSetText", message, NULL); Index: trunk/src_plugins/lib_gtk_common/ui_zoompan.c =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 31010) +++ trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 31011) @@ -94,7 +94,7 @@ *event_x = DRAW_X(v, pcb_x); *event_y = DRAW_Y(v, pcb_y); - return pcb_true; + return rnd_true; } 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) @@ -102,7 +102,7 @@ *pcb_x = rnd_round(EVENT_TO_PCB_X(v, event_x)); *pcb_y = rnd_round(EVENT_TO_PCB_Y(v, event_y)); - return pcb_true; + return rnd_true; } void pcb_gtk_zoom_post(pcb_gtk_view_t *v) Index: trunk/src_plugins/lib_hid_common/clip.h =================================================================== --- trunk/src_plugins/lib_hid_common/clip.h (revision 31010) +++ trunk/src_plugins/lib_hid_common/clip.h (revision 31011) @@ -33,7 +33,7 @@ #include -/* Clip X,Y to the given bounding box, plus a margin. Returns pcb_true if +/* Clip X,Y to the given bounding box, plus a margin. Returns rnd_true if there is something left to be drawn. */ RND_INLINE rnd_bool pcb_line_clip(double minx, double miny, double maxx, double maxy, double *x1, double *y1, double *x2, double *y2, double margin) { @@ -47,7 +47,7 @@ /* clip first point on left side */ if (*x1 < minx) { if (*x2 < minx) - return pcb_false; + return rnd_false; d = *x2 - *x1; r = (minx - *x1) / d; *x1 = minx; @@ -63,7 +63,7 @@ /* clip first point on right side */ if (*x1 > maxx) { if (*x2 > maxx) - return pcb_false; + return rnd_false; d = *x2 - *x1; r = (maxx - *x1) / d; *x1 = maxx; @@ -80,7 +80,7 @@ /* clip first point on top */ if (*y1 < miny) { if (*y2 < miny) - return pcb_false; + return rnd_false; d = *y2 - *y1; r = (miny - *y1) / d; *y1 = miny; @@ -96,7 +96,7 @@ /* clip first point on bottom */ if (*y1 > maxy) { if (*y2 > maxy) - return pcb_false; + return rnd_false; d = *y2 - *y1; r = (maxy - *y1) / d; *y1 = maxy; @@ -109,7 +109,7 @@ *y2 = maxy; *x2 += r * (*x1 - *x2); } - return pcb_true; + return rnd_true; } #endif Index: trunk/src_plugins/lib_hid_common/dlg_comm_m.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 31010) +++ trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 31011) @@ -71,7 +71,7 @@ title = rnd_concat(rnd_app_package, " user input", NULL); ft = 1; } - RND_DAD_NEW("prompt_for", dlg, title, NULL, pcb_true, NULL); + RND_DAD_NEW("prompt_for", dlg, title, NULL, rnd_true, NULL); if (ft) free(title); @@ -194,7 +194,7 @@ RND_DAD_END(ctx.dlg); RND_DAD_END(ctx.dlg); - RND_DAD_NEW("fallback_color_pick", ctx.dlg, "Change color", &ctx, pcb_true, NULL); + RND_DAD_NEW("fallback_color_pick", ctx.dlg, "Change color", &ctx, rnd_true, NULL); val.lng = ctx.clr.r; Index: trunk/src_plugins/lib_hid_common/dlg_log.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_log.c (revision 31010) +++ trunk/src_plugins/lib_hid_common/dlg_log.c (revision 31011) @@ -169,7 +169,7 @@ ctx->last_added = -1; RND_DAD_DEFSIZE(ctx->dlg, 200, 300); title = rnd_concat(rnd_app_package, " message log", NULL); - RND_DAD_NEW("log", ctx->dlg, title, ctx, pcb_false, log_close_cb); + RND_DAD_NEW("log", ctx->dlg, title, ctx, rnd_false, log_close_cb); free(title); { Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 31010) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 31011) @@ -111,7 +111,7 @@ } else { /* slower but more generic way */ - return rnd_parse_command(hidlib, name, pcb_true); + return rnd_parse_command(hidlib, name, rnd_true); } } else { Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 31010) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 31011) @@ -50,7 +50,7 @@ } static rnd_composite_op_t composite_op = RND_HID_COMP_RESET; -static rnd_bool direct_mode = pcb_true; +static rnd_bool direct_mode = rnd_true; static int comp_stencil_bit = 0; static GLfloat *grid_points = NULL; @@ -142,7 +142,7 @@ void hidgl_set_drawing_mode(rnd_hid_t *hid, rnd_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { - rnd_bool xor_mode = (composite_op == RND_HID_COMP_POSITIVE_XOR ? pcb_true : pcb_false); + rnd_bool xor_mode = (composite_op == RND_HID_COMP_POSITIVE_XOR ? rnd_true : rnd_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 Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 31010) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 31011) @@ -88,7 +88,7 @@ { rnd_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); rnd_layergrp_id_t comp_group = -1, solder_group = -1; - rnd_bool comp_on = pcb_false, solder_on = pcb_false; + rnd_bool comp_on = rnd_false, solder_on = rnd_false; rnd_rnd_box_t vb; rnd_coord_t x, y; double xcent, ycent, xoffs, yoffs; Index: trunk/src_plugins/lib_hid_pcbui/layersel.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 31010) +++ trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 31011) @@ -248,7 +248,7 @@ ls->lock_vis--; } -static void lys_update_vis(ls_layer_t *lys, pcb_bool_t vis) +static void lys_update_vis(ls_layer_t *lys, rnd_bool_t vis) { rnd_gui->attr_dlg_widget_hide(lys->ls->sub.dlg_hid_ctx, lys->wvis_on_open, !vis); rnd_gui->attr_dlg_widget_hide(lys->ls->sub.dlg_hid_ctx, lys->wvis_on_closed, !vis); Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 31010) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 31011) @@ -187,7 +187,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("route_style_attr", dlg, "Edit route style attribute", NULL, pcb_true, NULL); + RND_DAD_NEW("route_style_attr", dlg, "Edit route style attribute", NULL, rnd_true, NULL); res = RND_DAD_RUN(dlg); if (res == 0) { *key = rnd_strdup(dlg[wkey].val.str); @@ -322,7 +322,7 @@ /* set up the context */ rstdlg_ctx.active = 1; - RND_DAD_NEW("route_style", rstdlg_ctx.dlg, "Edit route style", &rstdlg_ctx, pcb_false, rstdlg_close_cb); + RND_DAD_NEW("route_style", rstdlg_ctx.dlg, "Edit route style", &rstdlg_ctx, rnd_false, rstdlg_close_cb); rstdlg_pcb2dlg(rst_idx); return 0; Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31010) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 31011) @@ -108,10 +108,10 @@ do { n = v->next; if ((v->point[0] != n->point[0]) && (v->point[1] != n->point[1])) - return pcb_false; + return rnd_false; } while((v = v->next) != src->head); - return pcb_true; + return rnd_true; } @@ -118,9 +118,9 @@ 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 */ + return rnd_false; /* more than one islands */ if (p->Clipped->contours->next != NULL) - return pcb_false; /* has holes */ + return rnd_false; /* has holes */ return pcb_pline_is_rectangle(p->Clipped->contours); } @@ -411,7 +411,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("poly_hatch", dlg, "Polygon hatch", NULL, pcb_true, NULL); + RND_DAD_NEW("poly_hatch", dlg, "Polygon hatch", NULL, rnd_true, NULL); if (RND_DAD_RUN(dlg) != 0) { /* cancel */ RND_DAD_FREE(dlg); Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 31010) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 31011) @@ -239,7 +239,7 @@ pcb_poly_init_clip(pcb->Data, layer, poly); pcb_poly_invalidate_draw(layer, poly); TODO(": use pcb_board_set_changed_flag(), but decouple that from PCB") - pcb->Changed = pcb_true; + pcb->Changed = rnd_true; } return poly; Index: trunk/src_plugins/order/order_dlg.c =================================================================== --- trunk/src_plugins/order/order_dlg.c (revision 31010) +++ trunk/src_plugins/order/order_dlg.c (revision 31011) @@ -53,7 +53,7 @@ /* set up the context */ order_ctx.active = 1; - RND_DAD_NEW("order", order_ctx.dlg, "Order PCB", &order_ctx, pcb_false, order_close_cb); + RND_DAD_NEW("order", order_ctx.dlg, "Order PCB", &order_ctx, rnd_false, order_close_cb); return 0; } Index: trunk/src_plugins/order_pcbway/pcbway.c =================================================================== --- trunk/src_plugins/order_pcbway/pcbway.c (revision 31010) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 31011) @@ -440,7 +440,7 @@ RND_DAD_BUTTON_CLOSES(dlg, clbtn); RND_DAD_END(dlg); - RND_DAD_NEW("pcbway_quote", dlg, "PCBWay: quote", NULL, pcb_true, NULL); + RND_DAD_NEW("pcbway_quote", dlg, "PCBWay: quote", NULL, rnd_true, NULL); RND_DAD_RUN(dlg); RND_DAD_FREE(dlg); Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 31010) +++ trunk/src_plugins/polycombine/polycombine.c (revision 31011) @@ -39,7 +39,7 @@ pcb_vector_t v; int hole = 0; - *forward = pcb_true; + *forward = rnd_true; if ((np = pcb_polyarea_create()) == NULL) return NULL; @@ -61,7 +61,7 @@ /* Is current point last in contour? If so process it. */ if (n == p->PointN - 1 || (hole < p->HoleIndexN && n == p->HoleIndex[hole] - 1)) { - pcb_poly_contour_pre(contour, pcb_true); + pcb_poly_contour_pre(contour, rnd_true); /* Log the direction in which the outer contour was specified */ if (hole == 0) @@ -136,7 +136,7 @@ /* bool to_insert_isects_cur_node; Intersection */ rnd_bool to_insert_contains_cur_node; /* Containment */ rnd_bool cur_node_contains_to_insert; /* Containment */ - rnd_bool placed_to_insert = pcb_false; + rnd_bool placed_to_insert = rnd_false; poly_tree *return_root = start_point; @@ -179,7 +179,7 @@ to_insert->prev->next = to_insert; if (to_insert->next) to_insert->next->prev = to_insert; - placed_to_insert = pcb_true; + placed_to_insert = rnd_true; if (cur_node == start_point) return_root = to_insert; Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 31010) +++ trunk/src_plugins/propedit/propdlg.c (revision 31011) @@ -218,7 +218,7 @@ static rnd_bool prop_prv_mouse_cb(rnd_hid_attribute_t *attrib, rnd_hid_preview_t *prv, rnd_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { - return pcb_false; /* don't redraw */ + return rnd_false; /* don't redraw */ } static void prop_valedit_update(propdlg_t *ctx, pcb_props_t *p, pcb_propval_t *pv) @@ -640,7 +640,7 @@ RND_DAD_END(ctx->dlg); RND_DAD_END(ctx->dlg); - RND_DAD_NEW("propedit", ctx->dlg, "Property editor", ctx, pcb_false, propdlgclose_cb); + RND_DAD_NEW("propedit", ctx->dlg, "Property editor", ctx, rnd_false, propdlgclose_cb); prop_refresh(ctx); gdl_append(&propdlgs, ctx, link); Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 31010) +++ trunk/src_plugins/propedit/propsel.c (revision 31011) @@ -650,10 +650,10 @@ } if (st->d_valid && (strcmp(pn, "rotation") == 0) && - pcb_chg_obj_rot(PCB_OBJ_TEXT, text->parent.layer, text, text, st->d, st->d_absolute, pcb_true)) DONE; + pcb_chg_obj_rot(PCB_OBJ_TEXT, text->parent.layer, text, text, st->d, st->d_absolute, rnd_true)) DONE; if (st->c_valid && (strcmp(pn, "thickness") == 0) && - pcb_chg_obj_2nd_size(PCB_OBJ_TEXT, text->parent.layer, text, text, st->c, st->c_absolute, pcb_true)) DONE; + pcb_chg_obj_2nd_size(PCB_OBJ_TEXT, text->parent.layer, text, text, st->c, st->c_absolute, rnd_true)) DONE; memset(&op, 0, sizeof(op)); op.move.pcb = st->pcb; @@ -877,7 +877,7 @@ if (ctx->board) set_board(sctx, ctx->pcb); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); pcb_undo_inc_serial(); return sctx->set_cnt; } @@ -994,7 +994,7 @@ if (ctx->board) del_cnt += del_board(&ctx, ctx->pcb, key); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); return del_cnt; } Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 31010) +++ trunk/src_plugins/puller/puller.c (revision 31011) @@ -214,7 +214,7 @@ return a * d - b * c; } -/* The lines are x1y1-x2y2 and x3y3-x4y4. Returns pcb_true if they +/* The lines are x1y1-x2y2 and x3y3-x4y4. Returns rnd_true if they intersect. */ static int intersection_of_lines(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int *xr, int *yr) { @@ -1459,9 +1459,9 @@ #if TRACE1 rnd_printf("create_arc at %#mD r %#mS sa %d delta %d\n", x, y, r, sa, da); #endif - arc = pcb_arc_new(PCB_CURRLAYER(PCB), x, y, r, r, sa, da, sample->Thickness, sample->Clearance, sample->Flags, pcb_true); + arc = pcb_arc_new(PCB_CURRLAYER(PCB), x, y, r, r, sa, da, sample->Thickness, sample->Clearance, sample->Flags, rnd_true); if (arc == 0) { - arc = pcb_arc_new(PCB_CURRLAYER(PCB), x, y, r, r, sa, da * 2, sample->Thickness, sample->Clearance, sample->Flags, pcb_true); + arc = pcb_arc_new(PCB_CURRLAYER(PCB), x, y, r, r, sa, da * 2, sample->Thickness, sample->Clearance, sample->Flags, rnd_true); } pcb_undo_add_obj_to_create(PCB_OBJ_ARC, PCB_CURRLAYER(PCB), arc, arc); Index: trunk/src_plugins/query/net_int.c =================================================================== --- trunk/src_plugins/query/net_int.c (revision 31010) +++ trunk/src_plugins/query/net_int.c (revision 31011) @@ -106,7 +106,7 @@ pcb_find_free(&ctx.fb); } - return pcb_false; + return rnd_false; } Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 31010) +++ trunk/src_plugins/query/query_act.c (revision 31011) @@ -275,7 +275,7 @@ if (pcb_qry_run_script(NULL, PCB_ACT_BOARD, arg, scope, flagop_cb, &sel) < 0) printf("Failed to run the query\n"); if (sel.cnt > 0) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); if (RND_HAVE_GUI_ATTR_DLG) rnd_hid_redraw(PCB); } @@ -303,7 +303,7 @@ if (pcb_qry_run_script(NULL, PCB_ACT_BOARD, arg, scope, flagop_cb, &sel) < 0) printf("Failed to run the query\n"); if (sel.cnt > 0) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); if (RND_HAVE_GUI_ATTR_DLG) rnd_hid_redraw(PCB); } Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 31010) +++ trunk/src_plugins/renumber/renumber.c (revision 31011) @@ -60,7 +60,7 @@ static fgw_error_t pcb_act_Renumber(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - rnd_bool changed = pcb_false; + rnd_bool changed = rnd_false; pcb_subc_t **subc_list; pcb_subc_t **locked_subc_list; rnd_coord_t *ox_list, *oy_list; @@ -79,7 +79,7 @@ char **was, **is; unsigned int c_cnt = 0, numsubc; int ok; - rnd_bool free_name = pcb_false; + rnd_bool free_name = rnd_false; rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, Renumber, name = argv[1].val.str); @@ -93,7 +93,7 @@ "This file may be used to back annotate the\n" "change to the schematics.\n", default_file, ".eco", NULL, "eco", 0, NULL); - free_name = pcb_true; + free_name = rnd_true; } if (default_file) { @@ -281,7 +281,7 @@ pcb_undo_add_obj_to_change_name(PCB_OBJ_SUBC, NULL, NULL, subc_list[i], (char *)or_empty(subc_list[i]->refdes)); pcb_chg_obj_name(PCB_OBJ_SUBC, subc_list[i], NULL, NULL, tmps); - changed = pcb_true; + changed = rnd_true; /* we don't free tmps in this case because it is used */ } @@ -331,7 +331,7 @@ pcb_netlist_changed(0); pcb_undo_inc_serial(); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } free(locked_subc_list); Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 31010) +++ trunk/src_plugins/report/drill.c (revision 31011) @@ -74,7 +74,7 @@ { pcb_drill_info_t *AllDrills; pcb_drill_t *Drill = NULL; - rnd_bool DrillFound = pcb_false; + rnd_bool DrillFound = rnd_false; rnd_rtree_it_t it; rnd_rnd_box_t *pb; @@ -86,7 +86,7 @@ if (proto->hdia <= 0) continue; if (!DrillFound) { - DrillFound = pcb_true; + DrillFound = rnd_true; Drill = drill_info_alloc(AllDrills); Drill->DrillSize = proto->hdia; drill_fill(Drill, (pcb_any_obj_t *)ps, !proto->hplated); Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 31010) +++ trunk/src_plugins/report/report.c (revision 31011) @@ -100,7 +100,7 @@ RND_DAD_BUTTON_CLOSES(ctx->dlg, clbtn); RND_DAD_END(ctx->dlg); - RND_DAD_NEW("report", ctx->dlg, name, ctx, pcb_false, rdialog_close_cb); + RND_DAD_NEW("report", ctx->dlg, name, ctx, rnd_false, rdialog_close_cb); } Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 31010) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 31011) @@ -616,8 +616,8 @@ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - rnd_bool touches1 = pcb_false; - rnd_bool touches2 = pcb_false; + rnd_bool touches1 = rnd_false; + rnd_bool touches2 = rnd_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -748,8 +748,8 @@ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - rnd_bool touches1 = pcb_false; - rnd_bool touches2 = pcb_false; + rnd_bool touches1 = rnd_false; + rnd_bool touches2 = rnd_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -807,8 +807,8 @@ PCB_LINE_LOOP(layer); { pcb_rb_line_t *have_line = NULL; - rnd_bool touches1 = pcb_false; - rnd_bool touches2 = pcb_false; + rnd_bool touches1 = rnd_false; + rnd_bool touches2 = rnd_false; int l; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, line)) @@ -902,8 +902,8 @@ CheckLinePointForRubberbandConnection(rbnd, layer, line, &line->Point1, 0); CheckLinePointForRubberbandConnection(rbnd, layer, line, &line->Point2, 1); if (conf_rbo.plugins.rubberband_orig.enable_rubberband_arcs != 0) { - CheckLinePointForRubberbandArcConnection(rbnd, layer, line, &line->Point1, pcb_true); - CheckLinePointForRubberbandArcConnection(rbnd, layer, line, &line->Point2, pcb_true); + CheckLinePointForRubberbandArcConnection(rbnd, layer, line, &line->Point1, rnd_true); + CheckLinePointForRubberbandArcConnection(rbnd, layer, line, &line->Point2, rnd_true); } break; } @@ -911,15 +911,15 @@ case PCB_OBJ_LINE_POINT: CheckLinePointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (rnd_point_t *) Ptr3, 0); if (conf_rbo.plugins.rubberband_orig.enable_rubberband_arcs != 0) - CheckLinePointForRubberbandArcConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (rnd_point_t *) Ptr3, pcb_true); + CheckLinePointForRubberbandArcConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_line_t *) Ptr2, (rnd_point_t *) Ptr3, rnd_true); break; case PCB_OBJ_ARC_POINT: - CheckArcPointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, (int *)Ptr3, pcb_true); + CheckArcPointForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, (int *)Ptr3, rnd_true); break; case PCB_OBJ_ARC: - CheckArcForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, pcb_true); + CheckArcForRubberbandConnection(rbnd, (pcb_layer_t *) Ptr1, (pcb_arc_t *) Ptr2, rnd_true); break; case PCB_OBJ_POLY: Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 31010) +++ trunk/src_plugins/script/live_script.c (revision 31011) @@ -260,7 +260,7 @@ RND_DAD_DEFSIZE(lvs->dlg, 300, 500); title = rnd_concat("Live Scripting: ", name, NULL); - RND_DAD_NEW("live_script", lvs->dlg, title, lvs, pcb_false, lvs_close_cb); + RND_DAD_NEW("live_script", lvs->dlg, title, lvs, rnd_false, lvs_close_cb); free(title); rnd_gui->attr_dlg_widget_state(lvs->dlg_hid_ctx, lvs->wstop, 0); return lvs; Index: trunk/src_plugins/script/script_act.c =================================================================== --- trunk/src_plugins/script/script_act.c (revision 31010) +++ trunk/src_plugins/script/script_act.c (revision 31011) @@ -280,7 +280,7 @@ /* set up the context */ script_dlg.active = 1; - RND_DAD_NEW("scripts", script_dlg.dlg, "pcb-rnd Scripts", &script_dlg, pcb_false, script_dlg_close_cb); + RND_DAD_NEW("scripts", script_dlg.dlg, "pcb-rnd Scripts", &script_dlg, rnd_false, script_dlg_close_cb); script_dlg_s2d(&script_dlg); } Index: trunk/src_plugins/serpentine/serpentine.c =================================================================== --- trunk/src_plugins/serpentine/serpentine.c (revision 31010) +++ trunk/src_plugins/serpentine/serpentine.c (revision 31011) @@ -285,16 +285,16 @@ static void tool_serpentine_init(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } static void tool_serpentine_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } static void tool_serpentine_notify_mode(rnd_hidlib_t *hl) @@ -402,8 +402,8 @@ { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } static pcb_tool_t tool_serpentine = { @@ -419,7 +419,7 @@ NULL, NULL, /* escape */ - pcb_false + rnd_false }; Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 31010) +++ trunk/src_plugins/shand_cmd/command.c (revision 31011) @@ -78,7 +78,7 @@ rnd_PCB_ACT_MAY_CONVARG(2, FGW_STR, LoadLayout, format = argv[2].val.str); if (!PCB->Changed || (rnd_hid_message_box(RND_ACT_HIDLIB, "warning", "Load data lose", "OK to override layout data?", "cancel", 0, "ok", 1, NULL) == 1)) - pcb_load_pcb(filename, format, pcb_true, 0); + pcb_load_pcb(filename, format, rnd_true, 0); RND_ACT_IRES(0); return 0; @@ -167,7 +167,7 @@ if (filename == NULL) { if (PCB->hidlib.filename) { if (pcb_save_pcb(PCB->hidlib.filename, NULL) == 0) - pcb_board_set_changed_flag(pcb_false); + pcb_board_set_changed_flag(rnd_false); } else rnd_message(RND_MSG_ERROR, "No filename to save to yet\n"); @@ -174,7 +174,7 @@ } else { if (pcb_save_pcb(filename, NULL) == 0) { - pcb_board_set_changed_flag(pcb_false); + pcb_board_set_changed_flag(rnd_false); free(PCB->hidlib.filename); PCB->hidlib.filename = rnd_strdup(filename); rnd_event(&PCB->hidlib, RND_EVENT_BOARD_FN_CHANGED, NULL); Index: trunk/src_plugins/shape/shape.c =================================================================== --- trunk/src_plugins/shape/shape.c (revision 31010) +++ trunk/src_plugins/shape/shape.c (revision 31011) @@ -329,7 +329,7 @@ if (end != NULL) { char *sx, *sy, *tmp; int offs = end - dst; - *have_coords = pcb_true; + *have_coords = rnd_true; a = 1; tmp = rnd_strdup(dst); @@ -355,7 +355,7 @@ rnd_bool succ; if (arg == NULL) - return pcb_false; + return rnd_false; dst = arg; end = strchr(dst, ';'); @@ -382,7 +382,7 @@ const char *args[6]; double rot = 0; rnd_coord_t x = 0, y = 0, rx, ry = 0; - rnd_bool succ, have_coords = pcb_false; + rnd_bool succ, have_coords = rnd_false; int corners = 0, a, n; pcb_data_t *data; char *end; @@ -452,7 +452,7 @@ const char *args[8]; int n, a; pcb_data_t *data; - rnd_bool succ, have_coords = pcb_false; + rnd_bool succ, have_coords = rnd_false; rnd_coord_t x = 0, y = 0, w, h, rx, ry; double rot = 0.0, roundres = 1.0; char *end; @@ -567,7 +567,7 @@ const char *args[6]; int n, a; pcb_data_t *data; - rnd_bool succ, have_coords = pcb_false; + rnd_bool succ, have_coords = rnd_false; rnd_coord_t x = 0, y = 0, dia; if (argc < 2) { Index: trunk/src_plugins/shape/shape_dialog.c =================================================================== --- trunk/src_plugins/shape/shape_dialog.c (revision 31010) +++ trunk/src_plugins/shape/shape_dialog.c (revision 31011) @@ -49,11 +49,11 @@ /* elliptical logics */ if (!shp->dlg[shp->pell].val.lng) { - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->pry, pcb_false); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->pry, rnd_false); RND_DAD_SET_VALUE(hid_ctx, shp->pry, crd, shp->dlg[shp->prx].val.crd); } else - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->pry, pcb_true); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->pry, rnd_true); del_obj(shp); shp->obj = (pcb_any_obj_t *)regpoly_place( @@ -71,19 +71,19 @@ /* elliptical logics */ if (!shp->dlg[shp->rell].val.lng) { - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->ry, pcb_false); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->ry, rnd_false); RND_DAD_SET_VALUE(hid_ctx, shp->ry, crd, shp->dlg[shp->rx].val.crd); } else - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->ry, pcb_true); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->ry, rnd_true); /* rectangular logics */ if (!shp->dlg[shp->rrect].val.lng) { - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->h, pcb_false); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->h, rnd_false); RND_DAD_SET_VALUE(hid_ctx, shp->h, crd, shp->dlg[shp->w].val.crd); } else - rnd_gui->attr_dlg_widget_state(hid_ctx, shp->h, pcb_true); + rnd_gui->attr_dlg_widget_state(hid_ctx, shp->h, rnd_true); for(n = 0; n < 4; n++) corner[n] = shp->dlg[shp->corner[n]].val.lng; @@ -399,7 +399,7 @@ static const char pcb_acth_shape[] = "Interactive shape generator."; fgw_error_t pcb_act_shape(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_shape_dialog(PCB, PCB_PASTEBUFFER->Data, pcb_shape_current_layer, pcb_false); + pcb_shape_dialog(PCB, PCB_PASTEBUFFER->Data, pcb_shape_current_layer, rnd_false); RND_ACT_IRES(0); return 0; } Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 31010) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 31011) @@ -77,8 +77,8 @@ } sketch_t; static htip_t sketches; -static pcb_bool_t show_spokes = pcb_true; /* TODO: make this a config node */ -static pcb_bool_t check_net = pcb_false; /* TODO: make this a config node */ +static rnd_bool_t show_spokes = rnd_true; /* TODO: make this a config node */ +static rnd_bool_t check_net = rnd_false; /* TODO: make this a config node */ static point_t *sketch_get_point_at_terminal(sketch_t *sk, pcb_any_obj_t *term) @@ -298,7 +298,7 @@ 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; + return rnd_true; } #ifdef SK_DEBUG @@ -719,7 +719,7 @@ rnd_snprintf(name, sizeof(name), "%s: CDT", layer->name); sk->ui_layer_cdt = pcb_uilayer_alloc(pcb_sketch_route_cookie, name, &layer->meta.real.color); - sk->ui_layer_cdt->meta.real.vis = pcb_false; + sk->ui_layer_cdt->meta.real.vis = rnd_false; sketch_update_cdt_layer(sk); rnd_snprintf(name, sizeof(name), "%s: ERBS", layer->name); @@ -827,7 +827,7 @@ attached_path.start_term = start_term; attached_path.net = term != NULL ? term->parent.net : NULL; if (check_net && attached_path.net == NULL) - return pcb_false; + return rnd_false; vtp0_init(&attached_path.lines); start_l = attached_path_new_line(); @@ -840,7 +840,7 @@ wire_init(&attached_path.corridor); wire_push_point(&attached_path.corridor, attached_path.start_p, SIDE_TERM); - return pcb_true; + return rnd_true; } static void attached_path_uninit() @@ -885,8 +885,8 @@ for (i = 0; i < 3; i++) if (t->e[i]->endp[0] != attached_path.start_p && t->e[i]->endp[1] != attached_path.start_p && t->e[i] != entrance_e && line_intersects_edge(attached_line, t->e[i])) { - if (sketch_check_path(attached_path.start_p, NULL, t->e[i], NULL) == pcb_false) - RETURN(pcb_false); + if (sketch_check_path(attached_path.start_p, NULL, t->e[i], NULL) == rnd_false) + RETURN(rnd_false); attached_path.current_t = t->adj_t[i]; wire_push_point(&corridor_ops, t->p[i], SIDE_RIGHT); wire_push_point(&corridor_ops, t->p[(i+1)%3], SIDE_LEFT); @@ -904,8 +904,8 @@ entrance_e = t->e[i]; attached_path.current_t = t->adj_t[i]; if (t->e[i] != last_entrance_e) { /* going forward */ - if (sketch_check_path(NULL, attached_path.visited_edges->item, t->e[i], NULL) == pcb_false) - RETURN(pcb_false); + if (sketch_check_path(NULL, attached_path.visited_edges->item, t->e[i], NULL) == rnd_false) + RETURN(rnd_false); wire_push_point(&corridor_ops, t->p[t->e[(i+2)%3] == last_entrance_e ? (i+1)%3 : i], t->e[(i+1)%3] == last_entrance_e ? SIDE_RIGHT : SIDE_LEFT); @@ -931,11 +931,11 @@ if (end_p != NULL) { /* connecting to the last point? */ if (attached_path.visited_edges == NULL) { - if (sketch_check_path(attached_path.start_p, NULL, NULL, end_p) == pcb_false) - RETURN(pcb_false); + if (sketch_check_path(attached_path.start_p, NULL, NULL, end_p) == rnd_false) + RETURN(rnd_false); } - else if (sketch_check_path(NULL, attached_path.visited_edges->item, NULL, end_p) == pcb_false) - RETURN(pcb_false); + else if (sketch_check_path(NULL, attached_path.visited_edges->item, NULL, end_p) == rnd_false) + RETURN(rnd_false); wire_push_point(&corridor_ops, end_p, SIDE_TERM); } @@ -963,22 +963,22 @@ } attached_path_next_line(); - return pcb_true; + return rnd_true; #undef RETURN } static rnd_bool attached_path_finish(pcb_any_obj_t *end_term) { - rnd_bool net_valid = pcb_false; + rnd_bool net_valid = rnd_false; if (check_net) { if(end_term != attached_path.start_term) { if (pcb_net_term_get_by_obj(attached_path.net, end_term) != NULL) - net_valid = pcb_true; + net_valid = rnd_true; } } else - net_valid = pcb_true; + net_valid = rnd_true; if (net_valid) { point_t *end_p; @@ -985,8 +985,8 @@ wire_t *path, *new_wire; end_p = sketch_get_point_at_terminal(attached_path.sketch, end_term); - if (attached_path_next_point(end_p) == pcb_false) - return pcb_false; + if (attached_path_next_point(end_p) == rnd_false) + return rnd_false; path = sketch_find_shortest_path(&attached_path.corridor); path->thickness = conf_core.design.line_thickness; @@ -996,10 +996,10 @@ sketch_update_cdt_layer(attached_path.sketch); sketch_update_erbs_layer(attached_path.sketch); wire_uninit(path); - return pcb_true; + return rnd_true; } - return pcb_false; + return rnd_false; } static void tool_skline_init(void) @@ -1010,11 +1010,11 @@ static void tool_skline_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); attached_path_uninit(); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } static void tool_skline_notify_mode(rnd_hidlib_t *hl) @@ -1049,7 +1049,7 @@ if (term_obj->term != NULL && ((type == PCB_OBJ_PSTK && pcb_pstk_shape_at(PCB, (pcb_pstk_t *) term_obj, PCB_CURRLAYER(PCB)) != NULL) || type != PCB_OBJ_PSTK)) { - if (attached_path_finish(term_obj) == pcb_true) { + if (attached_path_finish(term_obj) == rnd_true) { attached_path_uninit(); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; @@ -1060,7 +1060,7 @@ break; } } - if (attached_path_next_point(NULL) == pcb_false) + if (attached_path_next_point(NULL) == rnd_false) rnd_message(RND_MSG_WARNING, "Cannot route the wire this way\n"); break; @@ -1091,7 +1091,7 @@ rnd_bool tool_skline_undo_act(rnd_hidlib_t *hl) { /* TODO */ - return pcb_false; + return rnd_false; } /* XPM */ @@ -1135,7 +1135,7 @@ NULL, NULL, /* escape */ - pcb_false + rnd_false }; Index: trunk/src_plugins/stroke/stroke.c =================================================================== --- trunk/src_plugins/stroke/stroke.c (revision 31010) +++ trunk/src_plugins/stroke/stroke.c (revision 31011) @@ -54,7 +54,7 @@ static const char *pcb_stroke_cookie = "stroke plugin"; 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 rnd_bool pcb_mid_stroke = rnd_false; static int pcb_stroke_exec(rnd_hidlib_t *hl, const char *seq) { @@ -78,7 +78,7 @@ if (!pcb_mid_stroke) return; - pcb_mid_stroke = pcb_false; + pcb_mid_stroke = rnd_false; if (stroke_trans(msg)) *handled = pcb_stroke_exec(hidlib, msg); } @@ -101,7 +101,7 @@ static void pcb_stroke_start(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { rnd_coord_t ev_x = argv[1].d.c, ev_y = argv[2].d.c; - pcb_mid_stroke = pcb_true; + pcb_mid_stroke = rnd_true; stroke_first_x = SIDE_X(hidlib, ev_x); stroke_first_y = SIDE_Y(hidlib, ev_y); } Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 31010) +++ trunk/src_plugins/teardrops/teardrops.c (revision 31011) @@ -152,7 +152,7 @@ ay = ly + dx * adist; arc = pcb_arc_new(lay, (int) ax, (int) ay, (int) radius, - (int) radius, (int) theta + 90 + aoffset, delta - aoffset, l->Thickness, l->Clearance, l->Flags, pcb_true); + (int) radius, (int) theta + 90 + aoffset, delta - aoffset, l->Thickness, l->Clearance, l->Flags, rnd_true); if (arc) pcb_undo_add_obj_to_create(PCB_OBJ_ARC, lay, arc, arc); @@ -160,7 +160,7 @@ ay = ly - dx * (x + t); arc = pcb_arc_new(lay, (int) ax, (int) ay, (int) radius, - (int) radius, (int) theta - 90 - aoffset, -delta + aoffset, l->Thickness, l->Clearance, l->Flags, pcb_true); + (int) radius, (int) theta - 90 - aoffset, -delta + aoffset, l->Thickness, l->Clearance, l->Flags, rnd_true); if (arc) pcb_undo_add_obj_to_create(PCB_OBJ_ARC, lay, arc, arc); Index: trunk/src_plugins/tool_std/tool_arc.c =================================================================== --- trunk/src_plugins/tool_std/tool_arc.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_arc.c (revision 31011) @@ -51,7 +51,7 @@ void pcb_tool_arc_init(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); if (pcb_tool_prev_id == pcb_crosshair.tool_line && pcb_crosshair.AttachedLine.State != PCB_CH_STATE_FIRST) { pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; pcb_crosshair.AttachedBox.State = PCB_CH_STATE_SECOND; @@ -59,19 +59,19 @@ pcb_crosshair.AttachedBox.Point1.Y = pcb_crosshair.AttachedBox.Point2.Y = pcb_crosshair.AttachedLine.Point1.Y; pcb_tool_adjust_attached(NULL); } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } void pcb_tool_arc_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_added_lines = 0; if (pcb_tool_next_id != pcb_crosshair.tool_line) { pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; if (!pcb_marked.user_placed) - pcb_crosshair_set_local_ref(0, 0, pcb_false); + pcb_crosshair_set_local_ref(0, 0, rnd_false); } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } void pcb_tool_arc_notify_mode(rnd_hidlib_t *hl) @@ -105,7 +105,7 @@ dir = (RND_SGNZ(wx) == RND_SGNZ(wy)) ? -90 : 90; wy = wx; } - if (coord_abs(wy) > 0 && (arc = pcb_arc_new(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), pcb_true), + if (coord_abs(wy) > 0 && (arc = pcb_arc_new(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), rnd_true), pcb_crosshair.AttachedBox.Point2.X, pcb_crosshair.AttachedBox.Point2.Y, coord_abs(wy), @@ -114,7 +114,7 @@ dir, conf_core.design.line_thickness, 2 * conf_core.design.clearance, - pcb_flag_make(conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0), pcb_true))) { + pcb_flag_make(conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0), rnd_true))) { pcb_obj_add_attribs((pcb_any_obj_t *)arc, pcb->pen_attr, NULL); pcb_arc_get_end(arc, 1, &pcb_crosshair.AttachedBox.Point2.X, &pcb_crosshair.AttachedBox.Point2.Y); pcb_crosshair.AttachedBox.Point1.X = pcb_crosshair.AttachedBox.Point2.X; @@ -175,8 +175,8 @@ { if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_SECOND) { pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); - return pcb_false; + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); + return rnd_false; } if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD) { void *ptr1, *ptr2, *ptr3; @@ -190,7 +190,7 @@ if (--pcb_added_lines == 0) pcb_crosshair.AttachedBox.State = PCB_CH_STATE_SECOND; } - return pcb_true; + return rnd_true; } void pcb_tool_arc_escape(rnd_hidlib_t *hl) Index: trunk/src_plugins/tool_std/tool_arrow.c =================================================================== --- trunk/src_plugins/tool_std/tool_arrow.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_arrow.c (revision 31011) @@ -52,11 +52,11 @@ void pcb_tool_arrow_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } /* Called some time after the click if there was a release but no second click @@ -68,26 +68,26 @@ pcb_board_t *pcb = hv.ptr; if (hl->tool_click) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); - hl->tool_click = pcb_false; + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); + hl->tool_click = rnd_false; if (pcb_crosshair_note.Moving && !rnd_gui->shift_is_pressed(rnd_gui)) { - hl->tool_grabbed.status = pcb_true; + hl->tool_grabbed.status = rnd_true; pcb_crosshair_note.Buffer = conf_core.editor.buffer_number; pcb_buffer_set_number(PCB_MAX_BUFFER - 1); pcb_buffer_clear(pcb, PCB_PASTEBUFFER); - pcb_buffer_add_selected(pcb, PCB_PASTEBUFFER, hl->tool_x, hl->tool_y, pcb_true, pcb_true); + pcb_buffer_add_selected(pcb, PCB_PASTEBUFFER, hl->tool_x, hl->tool_y, rnd_true, rnd_true); pcb_undo_save_serial(); - pcb_remove_selected(pcb_false); + pcb_remove_selected(rnd_false); pcb_tool_save(hl); - pcb_tool_is_saved = pcb_true; + pcb_tool_is_saved = rnd_true; pcb_tool_select_by_name(hl, "buffer"); } else if (hl->tool_hit && !rnd_gui->shift_is_pressed(rnd_gui)) { rnd_rnd_box_t box; - hl->tool_grabbed.status = pcb_true; + hl->tool_grabbed.status = rnd_true; pcb_tool_save(hl); - pcb_tool_is_saved = pcb_true; + pcb_tool_is_saved = rnd_true; pcb_tool_select_by_name(hl, rnd_gui->control_is_pressed(rnd_gui)? "copy" : "move"); pcb_crosshair.AttachedObject.Ptr1 = pcb_crosshair_note.ptr1; pcb_crosshair.AttachedObject.Ptr2 = pcb_crosshair_note.ptr2; @@ -106,13 +106,13 @@ box.Y2 = hl->tool_y - PCB_SLOP * rnd_pixel_slop; pcb_crosshair.drags = pcb_list_block(pcb, &box, &pcb_crosshair.drags_len); pcb_crosshair.drags_current = 0; - pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, pcb_true); + pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, rnd_true); } else { rnd_rnd_box_t box; hl->tool_hit = 0; - pcb_crosshair_note.Moving = pcb_false; + pcb_crosshair_note.Moving = rnd_false; pcb_undo_save_serial(); box.X1 = -RND_MAX_COORD; box.Y1 = -RND_MAX_COORD; @@ -119,13 +119,13 @@ box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; /* unselect first if shift key not down */ - if (!rnd_gui->shift_is_pressed(rnd_gui) && pcb_select_block(pcb, &box, pcb_false, pcb_false, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (!rnd_gui->shift_is_pressed(rnd_gui) && pcb_select_block(pcb, &box, rnd_false, rnd_false, rnd_false)) + pcb_board_set_changed_flag(rnd_true); pcb_tool_notify_block(); pcb_crosshair.AttachedBox.Point1.X = hl->tool_x; pcb_crosshair.AttachedBox.Point1.Y = hl->tool_y; } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } if (pcb_crosshair.extobj_edit != NULL) { @@ -141,7 +141,7 @@ int test; rnd_hidval_t hv; - hl->tool_click = pcb_true; + hl->tool_click = rnd_true; /* do something after click time */ hv.ptr = hl; rnd_gui->add_timer(rnd_gui, click_timer_cb, conf_core.editor.click_time, hv); @@ -167,7 +167,7 @@ pcb_crosshair.AttachedObject.ty = hl->tool_y; } if (!pcb_crosshair_note.Moving && (type & (PCB_SELECT_TYPES | PCB_LOOSE_SUBC(PCB))) && PCB_FLAG_TEST(PCB_FLAG_SELECTED, (pcb_any_obj_t *) ptr2)) { - pcb_crosshair_note.Moving = pcb_true; + pcb_crosshair_note.Moving = rnd_true; /* remember where the user clicked to start this op */ pcb_crosshair.AttachedObject.tx = pcb_crosshair.AttachedObject.X = hl->tool_x; pcb_crosshair.AttachedObject.ty = pcb_crosshair.AttachedObject.Y = hl->tool_y; @@ -190,12 +190,12 @@ box.X2 = RND_MAX_COORD; box.Y2 = RND_MAX_COORD; - hl->tool_click = pcb_false; /* inhibit timer action */ + hl->tool_click = rnd_false; /* inhibit timer action */ pcb_undo_save_serial(); /* unselect first if shift key not down */ if (!rnd_gui->shift_is_pressed(rnd_gui)) { - if (pcb_select_block(pcb, &box, pcb_false, pcb_false, pcb_false)) - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(pcb, &box, rnd_false, rnd_false, rnd_false)) + pcb_board_set_changed_flag(rnd_true); if (pcb_crosshair_note.Moving) { pcb_crosshair_note.Moving = 0; hl->tool_hit = 0; @@ -206,7 +206,7 @@ gets the same SN. */ pcb_undo_restore_serial(); if (pcb_select_object(PCB)) - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); else pcb_undo_inc_serial(); /* We didn't select anything new, so, the deselection should get its own SN. */ hl->tool_hit = 0; @@ -219,8 +219,8 @@ box.Y2 = pcb_crosshair.AttachedBox.Point2.Y; pcb_undo_restore_serial(); - if (pcb_select_block(pcb, &box, pcb_true, pcb_true, pcb_false)) { - pcb_board_set_changed_flag(pcb_true); + if (pcb_select_block(pcb, &box, rnd_true, rnd_true, rnd_false)) { + pcb_board_set_changed_flag(rnd_true); pcb_undo_inc_serial(); } else if (pcb_bumped) Index: trunk/src_plugins/tool_std/tool_buffer.c =================================================================== --- trunk/src_plugins/tool_std/tool_buffer.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_buffer.c (revision 31011) @@ -63,7 +63,7 @@ } if (pcb_buffer_copy_to_layout(pcb, pcb_crosshair.AttachedObject.tx, pcb_crosshair.AttachedObject.ty, keep_ids)) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_gui->invalidate_all(rnd_gui); } } @@ -70,7 +70,7 @@ void pcb_tool_buffer_notify_mode(rnd_hidlib_t *hl) { - pcb_tool_buffer_notify_mode_(hl, pcb_false); + pcb_tool_buffer_notify_mode_(hl, rnd_false); } void pcb_tool_buffer_release_mode(rnd_hidlib_t *hl) @@ -79,10 +79,10 @@ if (pcb_crosshair_note.Moving) { pcb_undo_restore_serial(); - pcb_tool_buffer_notify_mode_(hl, pcb_true); + pcb_tool_buffer_notify_mode_(hl, rnd_true); pcb_buffer_clear(pcb, PCB_PASTEBUFFER); pcb_buffer_set_number(pcb_crosshair_note.Buffer); - pcb_crosshair_note.Moving = pcb_false; + pcb_crosshair_note.Moving = rnd_false; hl->tool_hit = 0; } } Index: trunk/src_plugins/tool_std/tool_copy.c =================================================================== --- trunk/src_plugins/tool_std/tool_copy.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_copy.c (revision 31011) @@ -43,10 +43,10 @@ void pcb_tool_copy_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); pcb_crosshair.extobj_edit = NULL; } @@ -64,7 +64,7 @@ pcb_search_screen(hl->tool_x, hl->tool_y, types, &pcb_crosshair.AttachedObject.Ptr1, &pcb_crosshair.AttachedObject.Ptr2, &pcb_crosshair.AttachedObject.Ptr3); if (pcb_crosshair.AttachedObject.Type != PCB_OBJ_VOID) { - pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, pcb_false); + pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, rnd_false); } break; } @@ -81,7 +81,7 @@ pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3, pcb_crosshair.AttachedObject.tx - pcb_crosshair.AttachedObject.X, pcb_crosshair.AttachedObject.ty - pcb_crosshair.AttachedObject.Y); pcb_subc_as_board_update(PCB); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } /* reset identifiers */ @@ -115,8 +115,8 @@ { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } pcb_tool_t pcb_tool_copy = { Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 31011) @@ -54,11 +54,11 @@ void pcb_tool_insert_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; pcb_crosshair.extobj_edit = NULL; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } void pcb_tool_insert_notify_mode(rnd_hidlib_t *hl) @@ -90,16 +90,16 @@ } if (!(pcb_brave & PCB_BRAVE_OLDINSERT)) { InsertedPoint = *pcb_adjust_insert_point(); - pcb_crosshair_set_local_ref(InsertedPoint.X, InsertedPoint.Y, pcb_true); + pcb_crosshair_set_local_ref(InsertedPoint.X, InsertedPoint.Y, rnd_true); if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_POLY) pcb_insert_point_in_object(PCB_OBJ_POLY, pcb_crosshair.AttachedObject.Ptr1, fake.poly, - &polyIndex, InsertedPoint.X, InsertedPoint.Y, pcb_false, pcb_false); + &polyIndex, InsertedPoint.X, InsertedPoint.Y, rnd_false, rnd_false); else pcb_insert_point_in_object(pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, - pcb_crosshair.AttachedObject.Ptr2, &polyIndex, InsertedPoint.X, InsertedPoint.Y, pcb_false, pcb_false); - pcb_board_set_changed_flag(pcb_true); + pcb_crosshair.AttachedObject.Ptr2, &polyIndex, InsertedPoint.X, InsertedPoint.Y, rnd_false, rnd_false); + pcb_board_set_changed_flag(rnd_true); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; @@ -118,12 +118,12 @@ if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_POLY) pcb_insert_point_in_object(PCB_OBJ_POLY, pcb_crosshair.AttachedObject.Ptr1, fake.poly, - &polyIndex, InsertedPoint.X, InsertedPoint.Y, pcb_false, pcb_false); + &polyIndex, InsertedPoint.X, InsertedPoint.Y, rnd_false, rnd_false); else pcb_insert_point_in_object(pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, - pcb_crosshair.AttachedObject.Ptr2, &polyIndex, InsertedPoint.X, InsertedPoint.Y, pcb_false, pcb_false); - pcb_board_set_changed_flag(pcb_true); + pcb_crosshair.AttachedObject.Ptr2, &polyIndex, InsertedPoint.X, InsertedPoint.Y, rnd_false, rnd_false); + pcb_board_set_changed_flag(rnd_true); /* reset identifiers */ pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; @@ -150,8 +150,8 @@ { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } /* XPM */ Index: trunk/src_plugins/tool_std/tool_line.c =================================================================== --- trunk/src_plugins/tool_std/tool_line.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_line.c (revision 31011) @@ -64,7 +64,7 @@ void pcb_tool_line_init(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); if (pcb_tool_prev_id == pcb_crosshair.tool_arc && pcb_crosshair.AttachedBox.State != PCB_CH_STATE_FIRST) { pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; pcb_crosshair.AttachedLine.State = PCB_CH_STATE_SECOND; @@ -80,20 +80,20 @@ } } } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } void pcb_tool_line_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_added_lines = 0; pcb_route_reset(&pcb_crosshair.Route); if (pcb_tool_next_id != pcb_crosshair.tool_arc) { pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; if (!pcb_marked.user_placed) - pcb_crosshair_set_local_ref(0, 0, pcb_false); + pcb_crosshair_set_local_ref(0, 0, rnd_false); } - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } /* creates points of a line (when clicked) */ @@ -104,7 +104,7 @@ pcb_board_t *pcb = (pcb_board_t *)hl; if ((!pcb_marked.status || conf_core.editor.local_ref) && !pcb_marked.user_placed) - pcb_crosshair_set_local_ref(pcb_crosshair.X, pcb_crosshair.Y, pcb_true); + pcb_crosshair_set_local_ref(pcb_crosshair.X, pcb_crosshair.Y, rnd_true); switch (pcb_crosshair.AttachedLine.State) { case PCB_CH_STATE_FIRST: /* first point */ TODO("subc: this should work on heavy terminals too!") @@ -198,7 +198,7 @@ pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, - 0, PCB_PSTK_COMPAT_ROUND, pcb_true)) != NULL)) { + 0, PCB_PSTK_COMPAT_ROUND, rnd_true)) != NULL)) { pcb_obj_add_attribs((pcb_any_obj_t *)ps, pcb->pen_attr, NULL); pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, ps, ps, ps); } @@ -220,7 +220,7 @@ /* set the mark to the new starting point so ortho works as expected and we can draw a perpendicular line from here */ hl->tool_grabbed.X = pcb_crosshair.Route.end_point.X; hl->tool_grabbed.Y = pcb_crosshair.Route.end_point.Y; - hl->tool_grabbed.status = pcb_true; + hl->tool_grabbed.status = rnd_true; } if (ps) @@ -258,7 +258,7 @@ if ((pcb_crosshair.AttachedLine.Point1.X != pcb_crosshair.AttachedLine.Point2.X || pcb_crosshair.AttachedLine.Point1.Y != pcb_crosshair.AttachedLine.Point2.Y) && (line = - pcb_line_new_merge(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), pcb_true), + pcb_line_new_merge(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), rnd_true), pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, pcb_crosshair.AttachedLine.Point2.X, @@ -290,7 +290,7 @@ pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, - 0, PCB_PSTK_COMPAT_ROUND, pcb_true)) != NULL)) { + 0, PCB_PSTK_COMPAT_ROUND, rnd_true)) != NULL)) { pcb_obj_add_attribs((pcb_any_obj_t *)ps, pcb->pen_attr, NULL); pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, ps, ps, ps); pcb_pstk_invalidate_draw(ps); @@ -304,7 +304,7 @@ } if (conf_core.editor.line_refraction && (hl->tool_x != pcb_crosshair.AttachedLine.Point2.X || hl->tool_y != pcb_crosshair.AttachedLine.Point2.Y) && (line = - pcb_line_new_merge(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), pcb_true), + pcb_line_new_merge(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), rnd_true), pcb_crosshair.AttachedLine.Point2.X, pcb_crosshair.AttachedLine.Point2.Y, hl->tool_x, hl->tool_y, @@ -342,10 +342,10 @@ { /* don't draw outline when ctrl key is pressed */ if (rnd_gui->control_is_pressed(rnd_gui)) { - pcb_crosshair.AttachedLine.draw = pcb_false; + pcb_crosshair.AttachedLine.draw = rnd_false; } else { - pcb_crosshair.AttachedLine.draw = pcb_true; + pcb_crosshair.AttachedLine.draw = rnd_true; pcb_line_adjust_attached(); } } @@ -395,12 +395,12 @@ if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_SECOND) { if (conf_core.editor.auto_drc) - pcb_undo(pcb_true); /* undo the connection find */ + pcb_undo(rnd_true); /* undo the connection find */ pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; pcb_route_reset(&pcb_crosshair.Route); if (!pcb_marked.user_placed) - pcb_crosshair_set_local_ref(0, 0, pcb_false); - return pcb_false; + pcb_crosshair_set_local_ref(0, 0, rnd_false); + return rnd_false; } if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_THIRD) { int type; @@ -415,14 +415,14 @@ /* save both ends of line */ pcb_crosshair.AttachedLine.Point2.X = ptr2->Point1.X; pcb_crosshair.AttachedLine.Point2.Y = ptr2->Point1.Y; - if ((type = pcb_undo(pcb_true)) == 0) - pcb_board_set_changed_flag(pcb_true); + if ((type = pcb_undo(rnd_true)) == 0) + pcb_board_set_changed_flag(rnd_true); /* check that the undo was of the right type */ if ((type & PCB_UNDO_CREATE) == 0) { /* wrong undo type, restore anchor points */ pcb_crosshair.AttachedLine.Point2.X = pcb_crosshair.AttachedLine.Point1.X; pcb_crosshair.AttachedLine.Point2.Y = pcb_crosshair.AttachedLine.Point1.Y; - return pcb_false; + return rnd_false; } /* move to new anchor */ pcb_crosshair.AttachedLine.Point1.X = pcb_crosshair.AttachedLine.Point2.X; @@ -452,9 +452,9 @@ ptr2 = (pcb_line_t *) ptrtmp; last_layer = (pcb_layer_t *) ptr1; } - return pcb_false; + return rnd_false; } - return pcb_true; + return rnd_true; } rnd_bool pcb_tool_line_redo_act(rnd_hidlib_t *hl) @@ -462,9 +462,9 @@ pcb_board_t *pcb = (pcb_board_t *)hl; if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_SECOND) - return pcb_false; - if (pcb_redo(pcb_true)) { - pcb_board_set_changed_flag(pcb_true); + return rnd_false; + if (pcb_redo(rnd_true)) { + pcb_board_set_changed_flag(rnd_true); if (pcb_crosshair.AttachedLine.State != PCB_CH_STATE_FIRST) { pcb_line_t *line = linelist_last(&PCB_CURRLAYER(pcb)->Line); pcb_crosshair.AttachedLine.Point1.X = pcb_crosshair.AttachedLine.Point2.X = line->Point2.X; @@ -472,7 +472,7 @@ pcb_added_lines++; } } - return pcb_false; + return rnd_false; } void pcb_tool_line_escape(rnd_hidlib_t *hl) Index: trunk/src_plugins/tool_std/tool_move.c =================================================================== --- trunk/src_plugins/tool_std/tool_move.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_move.c (revision 31011) @@ -45,10 +45,10 @@ void pcb_tool_move_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedObject.Type = PCB_OBJ_VOID; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); pcb_crosshair.extobj_edit = NULL; } @@ -73,7 +73,7 @@ pcb_crosshair.extobj_edit = NULL; } else - pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, pcb_true); + pcb_tool_attach_for_copy(hl, hl->tool_x, hl->tool_y, rnd_true); } break; } @@ -86,9 +86,9 @@ pcb_any_obj_t *newo = pcb_move_obj_and_rubberband(pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3, dx, dy); pcb_extobj_float_geo(newo); if (!pcb_marked.user_placed) - pcb_crosshair_set_local_ref(0, 0, pcb_false); + pcb_crosshair_set_local_ref(0, 0, rnd_false); pcb_subc_as_board_update(PCB); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } else if (pcb_crosshair.extobj_edit != NULL) pcb_extobj_float_geo(pcb_crosshair.extobj_edit); @@ -124,8 +124,8 @@ { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedObject.State != PCB_CH_STATE_FIRST) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } pcb_tool_t pcb_tool_move = { Index: trunk/src_plugins/tool_std/tool_poly.c =================================================================== --- trunk/src_plugins/tool_std/tool_poly.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_poly.c (revision 31011) @@ -44,10 +44,10 @@ void pcb_tool_poly_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedPolygon.PointN = 0; pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } TODO("remove this when pcb_tool_poly_notify_mode() loses PCB") @@ -94,7 +94,7 @@ /* set the mark to the new starting point so ortho works */ hl->tool_grabbed.X = hl->tool_x; hl->tool_grabbed.Y = hl->tool_y; - hl->tool_grabbed.status = pcb_true; + hl->tool_grabbed.status = rnd_true; } } @@ -103,11 +103,11 @@ pcb_attached_line_t *line = &pcb_crosshair.AttachedLine; if (rnd_gui->control_is_pressed(rnd_gui)) { - line->draw = pcb_false; + line->draw = rnd_false; return; } else - line->draw = pcb_true; + line->draw = rnd_true; if (conf_core.editor.all_direction_lines) { line->Point2.X = pcb_crosshair.X; line->Point2.Y = pcb_crosshair.Y; @@ -135,9 +135,9 @@ { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_prev_point(); - return pcb_false; + return rnd_false; } - return pcb_true; + return rnd_true; } rnd_bool pcb_tool_poly_redo_act(rnd_hidlib_t *hl) @@ -144,10 +144,10 @@ { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_next_point(); - return pcb_false; + return rnd_false; } else - return pcb_true; + return rnd_true; } void pcb_tool_poly_escape(rnd_hidlib_t *hl) Index: trunk/src_plugins/tool_std/tool_polyhole.c =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_polyhole.c (revision 31011) @@ -45,10 +45,10 @@ void pcb_tool_polyhole_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedPolygon.PointN = 0; pcb_crosshair.AttachedLine.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } TODO("remove this when pcb_tool_polyhole_notify_mode() loses PCB") @@ -96,7 +96,7 @@ /* set the mark to the new starting point so ortho works */ hl->tool_grabbed.X = hl->tool_x; hl->tool_grabbed.Y = hl->tool_y; - hl->tool_grabbed.status = pcb_true; + hl->tool_grabbed.status = rnd_true; } /* check if this is the last point of a polygon */ @@ -133,11 +133,11 @@ pcb_attached_line_t *line = &pcb_crosshair.AttachedLine; if (rnd_gui->control_is_pressed(rnd_gui)) { - line->draw = pcb_false; + line->draw = rnd_false; return; } else - line->draw = pcb_true; + line->draw = rnd_true; if (conf_core.editor.all_direction_lines) { line->Point2.X = pcb_crosshair.X; line->Point2.Y = pcb_crosshair.Y; @@ -165,9 +165,9 @@ { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_prev_point(); - return pcb_false; + return rnd_false; } - return pcb_true; + return rnd_true; } rnd_bool pcb_tool_polyhole_redo_act(rnd_hidlib_t *hl) @@ -174,10 +174,10 @@ { if (pcb_crosshair.AttachedPolygon.PointN) { pcb_polygon_go_to_next_point(); - return pcb_false; + return rnd_false; } else - return pcb_true; + return rnd_true; } void pcb_tool_polyhole_escape(rnd_hidlib_t *hl) Index: trunk/src_plugins/tool_std/tool_rectangle.c =================================================================== --- trunk/src_plugins/tool_std/tool_rectangle.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_rectangle.c (revision 31011) @@ -48,9 +48,9 @@ void pcb_tool_rectangle_uninit(void) { - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_false); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_false); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; - rnd_hid_notify_crosshair_change(&PCB->hidlib, pcb_true); + rnd_hid_notify_crosshair_change(&PCB->hidlib, rnd_true); } void pcb_tool_rectangle_notify_mode(rnd_hidlib_t *hl) @@ -67,7 +67,7 @@ pcb_crosshair.AttachedBox.Point1.X != pcb_crosshair.AttachedBox.Point2.X && pcb_crosshair.AttachedBox.Point1.Y != pcb_crosshair.AttachedBox.Point2.Y) { pcb_poly_t *polygon; - pcb_layer_t *layer = pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), pcb_true); + pcb_layer_t *layer = pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), rnd_true); int flags = PCB_FLAG_CLEARPOLY; if (conf_core.editor.full_poly) @@ -111,8 +111,8 @@ { /* don't allow undo in the middle of an operation */ if (pcb_crosshair.AttachedBox.State != PCB_CH_STATE_FIRST) - return pcb_false; - return pcb_true; + return rnd_false; + return rnd_true; } void pcb_tool_rectangle_escape(rnd_hidlib_t *hl) Index: trunk/src_plugins/tool_std/tool_remove.c =================================================================== --- trunk/src_plugins/tool_std/tool_remove.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_remove.c (revision 31011) @@ -81,7 +81,7 @@ pcb_remove_object(type, ptr1, ptr2, ptr3); pcb_undo_inc_serial(); pcb_subc_as_board_update(PCB); - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); } } Index: trunk/src_plugins/tool_std/tool_text.c =================================================================== --- trunk/src_plugins/tool_std/tool_text.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_text.c (revision 31011) @@ -57,7 +57,7 @@ if (pcb_layer_flags(pcb, PCB_CURRLID(pcb)) & PCB_LYT_BOTTOM) flag |= PCB_FLAG_ONSOLDER; - if ((text = pcb_text_new(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), pcb_true), pcb_font(pcb, conf_core.design.text_font_id, 1), hl->tool_x, + if ((text = pcb_text_new(pcb_loose_subc_layer(pcb, PCB_CURRLAYER(pcb), rnd_true), pcb_font(pcb, conf_core.design.text_font_id, 1), hl->tool_x, hl->tool_y, 0, conf_core.design.text_scale, conf_core.design.text_thickness, string, pcb_flag_make(flag))) != NULL) { pcb_undo_add_obj_to_create(PCB_OBJ_TEXT, PCB_CURRLAYER(pcb), text, text); pcb_undo_inc_serial(); Index: trunk/src_plugins/tool_std/tool_via.c =================================================================== --- trunk/src_plugins/tool_std/tool_via.c (revision 31010) +++ trunk/src_plugins/tool_std/tool_via.c (revision 31011) @@ -69,7 +69,7 @@ { pcb_pstk_t *ps = pcb_pstk_new_compat_via(pcb->Data, -1, hl->tool_x, hl->tool_y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, - 0, PCB_PSTK_COMPAT_ROUND, pcb_true); + 0, PCB_PSTK_COMPAT_ROUND, rnd_true); if (ps == NULL) return; Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 31010) +++ trunk/src_plugins/vendordrill/vendor.c (revision 31011) @@ -137,7 +137,7 @@ const char *sval; lht_doc_t *doc; lht_node_t *drlres; - rnd_bool free_fname = pcb_false; + rnd_bool free_fname = rnd_false; cached_drill = -1; @@ -154,7 +154,7 @@ return 0; } - free_fname = pcb_true; + free_fname = rnd_true; free(default_file); default_file = NULL; @@ -292,7 +292,7 @@ target = vendorDrillMap(proto->hdia); if (proto->hdia != target) { - if (pcb_chg_obj_2nd_size(PCB_OBJ_PSTK, pstk, pstk, pstk, target, pcb_true, pcb_false)) + if (pcb_chg_obj_2nd_size(PCB_OBJ_PSTK, pstk, pstk, pstk, target, rnd_true, rnd_false)) res = 1; else { rnd_message(RND_MSG_WARNING, @@ -371,7 +371,7 @@ * file, redraw things, and make sure we can undo. */ if (changed) { - pcb_board_set_changed_flag(pcb_true); + pcb_board_set_changed_flag(rnd_true); rnd_hid_redraw(PCB); pcb_undo_inc_serial(); } @@ -537,7 +537,7 @@ int noskip; if (!conf_vendor.plugins.vendor.enable) - return pcb_false; + return rnd_false; TODO(": these 3 loops should be wrapped in a single loop that iterates over attribute keys") noskip = 1; @@ -578,9 +578,9 @@ } if (noskip) - return pcb_true; + return rnd_true; else - return pcb_false; + return rnd_false; } static rnd_bool rematch(const char *re, const char *s) @@ -593,7 +593,7 @@ if (re_sei_errno(regex) != 0) { rnd_message(RND_MSG_ERROR, "regexp error: %s\n", re_error_str(re_sei_errno(regex))); re_sei_free(regex); - return pcb_false; + return rnd_false; } result = re_sei_exec(regex, s); @@ -600,9 +600,9 @@ re_sei_free(regex); if (result != 0) - return pcb_true; + return rnd_true; else - return pcb_false; + return rnd_false; } static const char *vendor_cookie = "vendor drill mapping";