Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 30912) +++ trunk/src/buffer.c (revision 30913) @@ -247,7 +247,7 @@ { const char *name, *refdes = NULL, *value = NULL; pcb_subc_t *s; - pcb_cardinal_t len; + rnd_cardinal_t len; RND_PCB_ACT_CONVARG(1, FGW_STR, LoadFootprint, name = argv[1].val.str); @@ -764,7 +764,7 @@ rnd_bool pcb_buffer_copy_to_layout(pcb_board_t *pcb, rnd_coord_t X, rnd_coord_t Y, rnd_bool keep_id) { - pcb_cardinal_t i; + rnd_cardinal_t i; rnd_bool changed = pcb_false; pcb_opctx_t ctx; int num_layers; Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 30912) +++ trunk/src/change_act.c (revision 30913) @@ -432,7 +432,7 @@ /* DOC: changepinname.html */ static fgw_error_t pcb_act_ChangePinName(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_cardinal_t changed = 0; + rnd_cardinal_t changed = 0; const char *refdes, *pinnum, *pinname; RND_PCB_ACT_CONVARG(1, FGW_STR, ChangePinName, refdes = argv[1].val.str); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 30912) +++ trunk/src/crosshair.c (revision 30913) @@ -86,9 +86,9 @@ */ void pcb_xordraw_poly(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, int dash_last) { - pcb_cardinal_t i; + rnd_cardinal_t i; for (i = 0; i < polygon->PointN; i++) { - pcb_cardinal_t next = pcb_poly_contour_next_point(polygon, i); + rnd_cardinal_t next = pcb_poly_contour_next_point(polygon, i); if (next == 0) { /* last line: sometimes the implicit closing line */ if (i == 1) /* corner case: don't draw two lines on top of each other - with XOR it looks bad */ @@ -115,9 +115,9 @@ */ void pcb_xordraw_poly_subc(pcb_poly_t *polygon, rnd_coord_t dx, rnd_coord_t dy, rnd_coord_t w, rnd_coord_t h, int mirr) { - pcb_cardinal_t i; + rnd_cardinal_t i; for (i = 0; i < polygon->PointN; i++) { - pcb_cardinal_t next = pcb_poly_contour_next_point(polygon, i); + rnd_cardinal_t next = pcb_poly_contour_next_point(polygon, i); if (next == 0) { /* last line: sometimes the implicit closing line */ if (i == 1) /* corner case: don't draw two lines on top of each other - with XOR it looks bad */ @@ -170,7 +170,7 @@ */ void pcb_xordraw_buffer(pcb_buffer_t *Buffer) { - pcb_cardinal_t i; + rnd_cardinal_t i; rnd_coord_t x, y; /* set offset */ @@ -446,7 +446,7 @@ { pcb_poly_t *polygon; pcb_point_t *point; - pcb_cardinal_t point_idx, prev, next; + rnd_cardinal_t point_idx, prev, next; polygon = (pcb_poly_t *) pcb_crosshair.AttachedObject.Ptr2; point = (pcb_point_t *) pcb_crosshair.AttachedObject.Ptr3; @@ -756,7 +756,7 @@ if ((snapo != NULL) && (pcbhl_conf.editor.mode == pcb_crosshair.tool_move) && (pcb_crosshair.AttachedObject.Type == PCB_OBJ_SUBC)) { pcb_any_obj_t *parent = (pcb_any_obj_t *)pcb_obj_parent_subc(snapo); int n; - pcb_cardinal_t parent_id = snapo->ID; + rnd_cardinal_t parent_id = snapo->ID; if (parent != NULL) parent_id = parent->ID; for(n = 0; n < pcb_crosshair.drags_len; n++) { Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 30912) +++ trunk/src/crosshair.h (revision 30913) @@ -80,7 +80,7 @@ } pcb_crosshair_t; typedef struct { - pcb_cardinal_t Buffer; /* buffer number */ + rnd_cardinal_t Buffer; /* buffer number */ rnd_bool Moving; /* true if clicked on an object of PCB_SELECT_TYPES */ void *ptr1, *ptr2, *ptr3; } pcb_crosshair_note_t; Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30912) +++ trunk/src/data.c (revision 30913) @@ -218,7 +218,7 @@ rnd_bool pcb_data_is_empty(pcb_data_t *Data) { - pcb_cardinal_t i; + rnd_cardinal_t i; if (padstacklist_length(&Data->padstack) != 0) return pcb_false; if (pcb_subclist_length(&Data->subc) != 0) return pcb_false; @@ -744,7 +744,7 @@ pcb_data_t *data; time_t nextt; int inited, force_all; - pcb_cardinal_t at, total; + rnd_cardinal_t at, total; } data_clip_all_t; static void data_clip_all_cb(void *ctx_) Index: trunk/src/data_it.h =================================================================== --- trunk/src/data_it.h (revision 30912) +++ trunk/src/data_it.h (revision 30913) @@ -40,7 +40,7 @@ /* current state */ pcb_objtype_t remaining; pcb_objtype_t type; - pcb_cardinal_t ln; + rnd_cardinal_t ln; pcb_any_obj_t *last; } pcb_data_it_t; Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 30912) +++ trunk/src/draw.c (revision 30913) @@ -149,7 +149,7 @@ /* * initiate the actual redrawing of the updated area */ -pcb_cardinal_t pcb_draw_inhibit = 0; +rnd_cardinal_t pcb_draw_inhibit = 0; void pcb_draw(void) { if (pcb_draw_inhibit) @@ -356,7 +356,7 @@ backsilk_gid = ((!info->xform->show_solder_side) ? pcb_layergrp_get_bottom_silk() : pcb_layergrp_get_top_silk()); backsilk_grp = pcb_get_layergrp(PCB, backsilk_gid); if (backsilk_grp != NULL) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < backsilk_grp->len; n++) { pcb_layer_t *ly = pcb_get_layer(PCB->Data, backsilk_grp->lid[n]); if (ly != NULL) { @@ -538,7 +538,7 @@ finish:; if (backsilk_grp != NULL) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < backsilk_grp->len; n++) { pcb_layer_t *ly = pcb_get_layer(PCB->Data, backsilk_grp->lid[n]); if (ly != NULL) @@ -924,7 +924,7 @@ int i; pcb_layer_id_t layernum; pcb_layer_t *Layer; - pcb_cardinal_t n_entries = PCB->LayerGroups.grp[group].len; + rnd_cardinal_t n_entries = PCB->LayerGroups.grp[group].len; pcb_layer_id_t *layers = PCB->LayerGroups.grp[group].lid; pcb_layergrp_t *grp = pcb_get_layergrp(PCB, group); unsigned int gflg = grp->ltype; Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 30912) +++ trunk/src/draw.h (revision 30913) @@ -82,7 +82,7 @@ lot of other functions that would call pcb_draw() a lot in turn may increase this value before the calls, then decrease it at the end and call pcb_draw(). This makes sure the whole block is redrawn only once at the end. */ -extern pcb_cardinal_t pcb_draw_inhibit; +extern rnd_cardinal_t pcb_draw_inhibit; #define pcb_draw_inhibit_inc() pcb_draw_inhibit++ #define pcb_draw_inhibit_dec() \ Index: trunk/src/extobj.c =================================================================== --- trunk/src/extobj.c (revision 30912) +++ trunk/src/extobj.c (revision 30913) @@ -195,7 +195,7 @@ return pcb_extobj_conv_obj_using(pcb, eo, dst, src, remove, NULL); } -pcb_cardinal_t pcb_extobj_sync_floater_flags(pcb_board_t *pcb, const pcb_any_obj_t *flt, int undoable, int draw) +rnd_cardinal_t pcb_extobj_sync_floater_flags(pcb_board_t *pcb, const pcb_any_obj_t *flt, int undoable, int draw) { pcb_subc_t *subc; pcb_extobj_t *eo; @@ -202,7 +202,7 @@ pcb_data_it_t it; pcb_any_obj_t *o; int sel; - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, flt)) return 0; Index: trunk/src/extobj.h =================================================================== --- trunk/src/extobj.h (revision 30912) +++ trunk/src/extobj.h (revision 30913) @@ -100,7 +100,7 @@ /* Call this after selection changes on a floater - this makes sure all floaters are selected or unselected at once; returns the number of objects changed */ -pcb_cardinal_t pcb_extobj_sync_floater_flags(pcb_board_t *pcb, const pcb_any_obj_t *flt, int undoable, int draw); +rnd_cardinal_t pcb_extobj_sync_floater_flags(pcb_board_t *pcb, const pcb_any_obj_t *flt, int undoable, int draw); int pcb_extobj_lookup_idx(const char *name); Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 30912) +++ trunk/src/find_geo.c (revision 30913) @@ -176,7 +176,7 @@ pdx = Arc2->X - Arc1->X; pdy = Arc2->Y - Arc1->Y; - dl = pcb_distance(Arc1->X, Arc1->Y, Arc2->X, Arc2->Y); + dl = rnd_distance(Arc1->X, Arc1->Y, Arc2->X, Arc2->Y); /* concentric arcs, simpler intersection conditions */ if (dl < 0.5) { if ((Arc1->Width - t >= Arc2->Width - t2 && Arc1->Width - t <= Arc2->Width + t2) @@ -422,7 +422,7 @@ else { rnd_coord_t dX = l->Point2.X - l->Point1.X; rnd_coord_t dY = l->Point2.Y - l->Point1.Y; - double r = pcb_distance(l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y); + double r = rnd_distance(l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y); dwx = l->Thickness / 2.0 / r * dX; dwy = l->Thickness / 2.0 / r * dY; } Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 30912) +++ trunk/src/font.c (revision 30913) @@ -118,7 +118,7 @@ is at the zero position. The y coordinates are moved so that min(y) = 0 */ void pcb_font_set_info(pcb_font_t *Ptr) { - pcb_cardinal_t i, j; + rnd_cardinal_t i, j; pcb_symbol_t *symbol; pcb_line_t *line; pcb_arc_t *arc; Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 30912) +++ trunk/src/font.h (revision 30913) @@ -44,8 +44,8 @@ typedef struct symbol_s { /* a single symbol */ pcb_line_t *Line; rnd_bool Valid; - pcb_cardinal_t LineN; /* number of lines */ - pcb_cardinal_t LineMax; /* lines allocated */ + rnd_cardinal_t LineN; /* number of lines */ + rnd_cardinal_t LineMax; /* lines allocated */ rnd_coord_t Width, Height, Delta; /* size of cell, distance to next symbol */ polylist_t polys; /* simple (non-clipped) polygons */ arclist_t arcs; Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 30912) +++ trunk/src/insert.c (revision 30913) @@ -59,7 +59,7 @@ 0 /* extobj_inhibit_regen */ }; -void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t *Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last) +void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, rnd_cardinal_t *Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last) { void *ptr; pcb_opctx_t ctx; @@ -91,8 +91,8 @@ if (pcb_gui->shift_is_pressed(pcb_gui)) { pcb_attached_line_t myline; /* only force 45 degree for nearest point */ - if (pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point1.X, line->Point1.Y) < - pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point2.X, line->Point2.Y)) + if (rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point1.X, line->Point1.Y) < + rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point2.X, line->Point2.Y)) myline.Point1 = myline.Point2 = line->Point1; else myline.Point1 = myline.Point2 = line->Point2; Index: trunk/src/insert.h =================================================================== --- trunk/src/insert.h (revision 30912) +++ trunk/src/insert.h (revision 30913) @@ -35,7 +35,7 @@ #define PCB_INSERT_TYPES (PCB_OBJ_POLY | PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_RAT) -void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t * Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last); +void *pcb_insert_point_in_object(int Type, void *Ptr1, void *Ptr2, rnd_cardinal_t * Ptr3, rnd_coord_t DX, rnd_coord_t DY, rnd_bool Force, rnd_bool insert_last); /* adjusts the insert point to make 45 degree lines as necessary */ pcb_point_t *pcb_adjust_insert_point(void); Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 30912) +++ trunk/src/intersect.c (revision 30913) @@ -166,7 +166,7 @@ */ double pcb_intersect_box_box(rnd_box_list_t *boxlist) { - pcb_cardinal_t i; + rnd_cardinal_t i; double area = 0.0; /* first get the aggregate area. */ for (i = 0; i < boxlist->BoxN; i++) @@ -182,7 +182,7 @@ double pcb_union_box_box(rnd_box_list_t *boxlist) { rnd_box_t **rectLeft, **rectRight; - pcb_cardinal_t i, j; + rnd_cardinal_t i, j; LocationList yCoords; SegmentTree segtree; rnd_coord_t lastX; Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 30912) +++ trunk/src/layer.h (revision 30913) @@ -190,7 +190,7 @@ #define LAYER_LOOP(data, ml) \ do { \ - pcb_cardinal_t n; \ + rnd_cardinal_t n; \ for (n = 0; n < ml; n++) { \ pcb_layer_t *layer = (&data->Layer[(n)]); Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 30912) +++ trunk/src/layer_grp.h (revision 30913) @@ -39,7 +39,7 @@ struct pcb_layergrp_s { PCB_ANY_OBJ_FIELDS; - pcb_cardinal_t len; /* number of layer IDs in use */ + rnd_cardinal_t len; /* number of layer IDs in use */ pcb_layer_id_t lid[PCB_MAX_LAYER]; /* lid=layer ID */ char *name; /* name of the physical layer (independent of the name of the layer groups) */ @@ -61,7 +61,7 @@ /* layer stack: an ordered list of layer groups (physical layers). */ struct pcb_layer_stack_s { - pcb_cardinal_t len; + rnd_cardinal_t len; pcb_layergrp_t grp[PCB_MAX_LAYERGRP]; struct { /* cache copper groups from top to bottom for fast padstack ("bbvia") lookup */ int copper_len, copper_alloced; @@ -212,7 +212,7 @@ int pcb_layer_parse_group_string(pcb_board_t *pcb, const char *s, int LayerN, int oldfmt); #define PCB_COPPER_GROUP_LOOP(data, group) do { \ - pcb_cardinal_t entry; \ + rnd_cardinal_t entry; \ pcb_board_t *cgl__pcb = pcb_data_get_top(data); \ if (cgl__pcb == NULL) \ cgl__pcb = PCB; \ Index: trunk/src/layer_it.h =================================================================== --- trunk/src/layer_it.h (revision 30912) +++ trunk/src/layer_it.h (revision 30913) @@ -46,7 +46,7 @@ struct pcb_layer_it_s { pcb_layer_stack_t *stack; pcb_layergrp_id_t gid; - pcb_cardinal_t lidx; + rnd_cardinal_t lidx; unsigned int mask; unsigned int exact:1; unsigned int global:1; Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30912) +++ trunk/src/layer_vis.c (revision 30913) @@ -127,7 +127,7 @@ void pcb_layervis_reset_stack(rnd_hidlib_t *hl) { pcb_layer_id_t comp; - pcb_cardinal_t i; + rnd_cardinal_t i; assert(PCB->Data->LayerN <= PCB_MAX_LAYER); for (i = 0; i < pcb_max_layer(PCB); i++) { @@ -158,7 +158,7 @@ */ void pcb_layervis_save_stack(void) { - pcb_cardinal_t i; + rnd_cardinal_t i; static rnd_bool run = pcb_false; if (run == pcb_false) { @@ -186,7 +186,7 @@ */ void pcb_layervis_restore_stack(void) { - pcb_cardinal_t i; + rnd_cardinal_t i; if (SavedStack.cnt == 0) { rnd_message(PCB_MSG_ERROR, "pcb_layervis_restore_stack() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); Index: trunk/src/librnd/core/box.h =================================================================== --- trunk/src/librnd/core/box.h (revision 30912) +++ trunk/src/librnd/core/box.h (revision 30913) @@ -48,8 +48,8 @@ #include struct rnd_box_list_s { - pcb_cardinal_t BoxN; /* the number of boxes contained */ - pcb_cardinal_t BoxMax; /* max boxes from malloc */ + rnd_cardinal_t BoxN; /* the number of boxes contained */ + rnd_cardinal_t BoxMax; /* max boxes from malloc */ rnd_box_t *Box; }; @@ -235,7 +235,7 @@ PCB_INLINE double rnd_dist2_to_box(const rnd_cheap_point_t * p, const rnd_box_t * b) { rnd_cheap_point_t r = rnd_closest_cheap_point_in_box(p, b); - return pcb_distance(r.X, r.Y, p->X, p->Y); + return rnd_distance(r.X, r.Y, p->X, p->Y); } Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30912) +++ trunk/src/librnd/core/global_typedefs.h (revision 30913) @@ -51,7 +51,7 @@ typedef struct pcb_hid_cfg_s pcb_hid_cfg_t; -typedef unsigned int pcb_cardinal_t; +typedef unsigned int rnd_cardinal_t; typedef struct pcb_color_s pcb_color_t; typedef struct pcb_clrcache_s pcb_clrcache_t; typedef struct pcb_pixmap_s pcb_pixmap_t; Index: trunk/src/librnd/core/misc_util.c =================================================================== --- trunk/src/librnd/core/misc_util.c (revision 30912) +++ trunk/src/librnd/core/misc_util.c (revision 30913) @@ -40,10 +40,10 @@ #include #include -/* pcb_distance() should be used so that there is only one +/* rnd_distance() should be used so that there is only one * place to deal with overflow/precision errors */ -double pcb_distance(double x1, double y1, double x2, double y2) +double rnd_distance(double x1, double y1, double x2, double y2) { double delta_x = (x2 - x1); double delta_y = (y2 - y1); Index: trunk/src/librnd/core/misc_util.h =================================================================== --- trunk/src/librnd/core/misc_util.h (revision 30912) +++ trunk/src/librnd/core/misc_util.h (revision 30913) @@ -34,7 +34,7 @@ #include #include -double pcb_distance(double x1, double y1, double x2, double y2); +double rnd_distance(double x1, double y1, double x2, double y2); double pcb_distance2(double x1, double y1, double x2, double y2); /* distance square */ enum pcb_unit_flags_e { PCB_UNIT_PERCENT = 1 }; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30912) +++ trunk/src/librnd/pcb_compat.h (revision 30913) @@ -118,3 +118,5 @@ #define pcb_direction_t rnd_direction_t #define pcb_cheap_point_s rnd_cheap_point_s #define pcb_cheap_point_t rnd_cheap_point_t +#define pcb_distance rnd_distance +#define pcb_cardinal_t rnd_cardinal_t Index: trunk/src/librnd/poly/rtree.c =================================================================== --- trunk/src/librnd/poly/rtree.c (revision 30912) +++ trunk/src/librnd/poly/rtree.c (revision 30913) @@ -60,9 +60,9 @@ pcb_rtree_insert(rtree, (void *)which, (pcb_rtree_box_t *)which); /* assumes first field is the bounding box */ } -void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], pcb_cardinal_t len) +void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len) { - pcb_cardinal_t n; + rnd_cardinal_t n; if (len == 0) return; Index: trunk/src/librnd/poly/rtree2_compat.h =================================================================== --- trunk/src/librnd/poly/rtree2_compat.h (revision 30912) +++ trunk/src/librnd/poly/rtree2_compat.h (revision 30913) @@ -55,7 +55,7 @@ void pcb_r_free_tree_data(pcb_rtree_t *rtree, void (*free)(void *ptr)); void pcb_r_insert_entry(pcb_rtree_t *rtree, const rnd_box_t *which); -void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], pcb_cardinal_t len); +void pcb_r_insert_array(pcb_rtree_t *rtree, const rnd_box_t *boxlist[], rnd_cardinal_t len); rnd_bool pcb_r_delete_entry(pcb_rtree_t *rtree, const rnd_box_t *which); rnd_bool pcb_r_delete_entry_free_data(pcb_rtree_t *rtree, rnd_box_t *box, void (*free_data)(void *d)); Index: trunk/src/librnd/poly/self_isc.c =================================================================== --- trunk/src/librnd/poly/self_isc.c (revision 30912) +++ trunk/src/librnd/poly/self_isc.c (revision 30913) @@ -155,7 +155,7 @@ return 1; } -static int pline_split_off_loop_new(pcb_pline_t *pl, vtp0_t *out, vhub_t *h, pcb_vnode_t *start, pcb_cardinal_t cnt) +static int pline_split_off_loop_new(pcb_pline_t *pl, vtp0_t *out, vhub_t *h, pcb_vnode_t *start, rnd_cardinal_t cnt) { pcb_pline_t *newpl = NULL; pcb_vnode_t *v, *next, *tmp; @@ -180,7 +180,7 @@ static int pline_split_off_loop(pcb_pline_t *pl, vtp0_t *hubs, vtp0_t *out, vhub_t *h, pcb_vnode_t *start) { pcb_vnode_t *v; - pcb_cardinal_t cnt; + rnd_cardinal_t cnt; for(v = start->next, cnt = 0;; v = v->next) { if (v->Flags.in_hub) { @@ -292,10 +292,10 @@ vtp0_uninit(&hubs); } -pcb_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa) +rnd_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa) { pcb_pline_t *pl, *next, *pln, *prev = NULL; - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; for(pl = pa->contours; pl != NULL; pl = next) { next = pl->next; Index: trunk/src/librnd/poly/self_isc.h =================================================================== --- trunk/src/librnd/poly/self_isc.h (revision 30912) +++ trunk/src/librnd/poly/self_isc.h (revision 30913) @@ -37,7 +37,7 @@ void pcb_pline_split_selfint(const pcb_pline_t *pl, vtp0_t *out); -pcb_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa); +rnd_cardinal_t pcb_polyarea_split_selfint(pcb_polyarea_t *pa); Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 30912) +++ trunk/src/netlist.c (revision 30913) @@ -457,7 +457,7 @@ /* crawl from a single terminal; "first" sould be a pointer to an int initialized to 0. Returns number of objects found. */ -static pcb_cardinal_t pcb_net_term_crawl(const pcb_board_t *pcb, pcb_net_term_t *term, pcb_find_t *fctx, int *first, pcb_cardinal_t *missing) +static rnd_cardinal_t pcb_net_term_crawl(const pcb_board_t *pcb, pcb_net_term_t *term, pcb_find_t *fctx, int *first, rnd_cardinal_t *missing) { pcb_any_obj_t *o; @@ -591,11 +591,11 @@ return 0; } -pcb_cardinal_t pcb_net_crawl_flag(pcb_board_t *pcb, pcb_net_t *net, unsigned long setf, unsigned long clrf) +rnd_cardinal_t pcb_net_crawl_flag(pcb_board_t *pcb, pcb_net_t *net, unsigned long setf, unsigned long clrf) { pcb_find_t fctx; pcb_net_term_t *t; - pcb_cardinal_t res = 0, n; + rnd_cardinal_t res = 0, n; pcb_short_ctx_t sctx; int first = 0; @@ -703,11 +703,11 @@ #include "netlist_geo.c" -pcb_cardinal_t pcb_net_map_subnets(pcb_short_ctx_t *sctx, pcb_rat_accuracy_t acc, vtp0_t *subnets) +rnd_cardinal_t pcb_net_map_subnets(pcb_short_ctx_t *sctx, pcb_rat_accuracy_t acc, vtp0_t *subnets) { pcb_find_t fctx; pcb_net_term_t *t; - pcb_cardinal_t drawn = 0, r, n, s1, s2, su, sd; + rnd_cardinal_t drawn = 0, r, n, s1, s2, su, sd; pcb_subnet_dist_t *connmx; char *done; int left, first = 0; @@ -806,7 +806,7 @@ void pcb_net_reset_subnets(vtp0_t *subnets) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < vtp0_len(subnets); n++) vtp0_uninit(subnets->array[n]); subnets->used = 0; @@ -819,9 +819,9 @@ } -pcb_cardinal_t pcb_net_add_rats(const pcb_board_t *pcb, pcb_net_t *net, pcb_rat_accuracy_t acc) +rnd_cardinal_t pcb_net_add_rats(const pcb_board_t *pcb, pcb_net_t *net, pcb_rat_accuracy_t acc) { - pcb_cardinal_t res; + rnd_cardinal_t res; pcb_short_ctx_t sctx; vtp0_t subnets; @@ -834,10 +834,10 @@ } -pcb_cardinal_t pcb_net_add_all_rats(const pcb_board_t *pcb, pcb_rat_accuracy_t acc) +rnd_cardinal_t pcb_net_add_all_rats(const pcb_board_t *pcb, pcb_rat_accuracy_t acc) { htsp_entry_t *e; - pcb_cardinal_t drawn = 0; + rnd_cardinal_t drawn = 0; pcb_short_ctx_t sctx; vtp0_t subnets; @@ -1094,11 +1094,11 @@ } -pcb_cardinal_t pcb_net_ripup(pcb_board_t *pcb, pcb_net_t *net) +rnd_cardinal_t pcb_net_ripup(pcb_board_t *pcb, pcb_net_t *net) { pcb_find_t fctx; pcb_net_term_t *t; - pcb_cardinal_t res, n; + rnd_cardinal_t res, n; pcb_any_obj_t *o, *lasto; pcb_data_it_t it; int first = 0; Index: trunk/src/netlist.h =================================================================== --- trunk/src/netlist.h (revision 30912) +++ trunk/src/netlist.h (revision 30913) @@ -74,7 +74,7 @@ PCB_ANY_OBJ_FIELDS; int parent_nl_idx; /* netlist index within the parent board */ char *name; - pcb_cardinal_t export_tmp; /* filled in and used by export code; valid only until the end of exporting */ + rnd_cardinal_t export_tmp; /* filled in and used by export code; valid only until the end of exporting */ unsigned inhibit_rats:1; pcb_termlist_t conns; }; @@ -112,7 +112,7 @@ /* Crawl a net and clear&set flags on each object belonging to the net and. Return the number of objects found */ -pcb_cardinal_t pcb_net_crawl_flag(pcb_board_t *pcb, pcb_net_t *net, unsigned long setf, unsigned long clrf); +rnd_cardinal_t pcb_net_crawl_flag(pcb_board_t *pcb, pcb_net_t *net, unsigned long setf, unsigned long clrf); /* Slow, linear search for a terminal, by pinname ("refdes-pinnumber") or @@ -128,8 +128,8 @@ pcb_net_t **pcb_netlist_sort(pcb_netlist_t *nl); /* Create missing rat lines */ -pcb_cardinal_t pcb_net_add_rats(const pcb_board_t *pcb, pcb_net_t *net, pcb_rat_accuracy_t acc); -pcb_cardinal_t pcb_net_add_all_rats(const pcb_board_t *pcb, pcb_rat_accuracy_t acc); +rnd_cardinal_t pcb_net_add_rats(const pcb_board_t *pcb, pcb_net_t *net, pcb_rat_accuracy_t acc); +rnd_cardinal_t pcb_net_add_all_rats(const pcb_board_t *pcb, pcb_rat_accuracy_t acc); /* Create a new network or a new net connection by drawing a rat line between two terminals */ pcb_rat_t *pcb_net_create_by_rat_coords(pcb_board_t *pcb, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool interactive); @@ -136,7 +136,7 @@ /* Undoably remove all non-subc-part copper objects that are connected to net. Return the number of removals. */ -pcb_cardinal_t pcb_net_ripup(pcb_board_t *pcb, pcb_net_t *net); +rnd_cardinal_t pcb_net_ripup(pcb_board_t *pcb, pcb_net_t *net); void pcb_netlist_changed(int force_unfreeze); @@ -148,7 +148,7 @@ const pcb_board_t *pcb; pcb_net_t *current_net; htsp_t found; - pcb_cardinal_t changed, missing, num_shorts; + rnd_cardinal_t changed, missing, num_shorts; int cancel_advanced; /* do not do any time consuming advanced operations (such as mincut) in the event handler because the user already clicked cancel */ } pcb_short_ctx_t; @@ -158,7 +158,7 @@ /* Search and collect all subnets of a net, adding rat lines in between them. Caller provided subnets is a vector of vtp0_t items that each contain (pcb_any_obj_t *) pointers to subnet objects */ -pcb_cardinal_t pcb_net_map_subnets(pcb_short_ctx_t *sctx, pcb_rat_accuracy_t acc, vtp0_t *subnets); +rnd_cardinal_t pcb_net_map_subnets(pcb_short_ctx_t *sctx, pcb_rat_accuracy_t acc, vtp0_t *subnets); void pcb_net_reset_subnets(vtp0_t *subnets); /* clear the subnet list to zero items, but don't free the array ("malloc cache") */ void pcb_net_free_subnets(vtp0_t *subnets); /* same as reset but also free the array */ Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 30912) +++ trunk/src/obj_arc.h (revision 30913) @@ -119,7 +119,7 @@ linelist_foreach(&(element)->Arc, &__it__, arc) { #define PCB_ARC_ALL_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -126,7 +126,7 @@ PCB_ARC_LOOP(layer) #define PCB_ARC_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -134,7 +134,7 @@ PCB_ARC_LOOP(layer) #define PCB_ARC_SILK_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -142,7 +142,7 @@ PCB_ARC_LOOP(layer) #define PCB_ARC_VISIBLE_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ Index: trunk/src/obj_gfx.h =================================================================== --- trunk/src/obj_gfx.h (revision 30912) +++ trunk/src/obj_gfx.h (revision 30913) @@ -95,7 +95,7 @@ linelist_foreach(&(element)->Gfx, &__it__, gfx) { #define PCB_GFX_ALL_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -102,7 +102,7 @@ PCB_GFX_LOOP(layer) #define PCB_GFX_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l =0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -110,7 +110,7 @@ PCB_GFX_LOOP(layer) #define PCB_GFX_SILK_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -118,7 +118,7 @@ PCB_GFX_LOOP(layer) #define PCB_GFX_VISIBLE_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 30912) +++ trunk/src/obj_line.h (revision 30913) @@ -135,7 +135,7 @@ linelist_foreach(&(layer)->Line, &__it__, line) { #define PCB_LINE_ALL_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -142,7 +142,7 @@ PCB_LINE_LOOP(layer) #define PCB_LINE_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -150,7 +150,7 @@ PCB_LINE_LOOP(layer) #define PCB_LINE_SILK_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -158,7 +158,7 @@ PCB_LINE_LOOP(layer) #define PCB_LINE_VISIBLE_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ Index: trunk/src/obj_pinvia_therm.c =================================================================== --- trunk/src/obj_pinvia_therm.c (revision 30912) +++ trunk/src/obj_pinvia_therm.c (revision 30913) @@ -81,7 +81,7 @@ * Usually this is 4 disjoint regions. * */ -pcb_polyarea_t *ThermPoly_(pcb_board_t *pcb, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, pcb_cardinal_t style) +pcb_polyarea_t *ThermPoly_(pcb_board_t *pcb, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style) { pcb_arc_t a; pcb_polyarea_t *pa, *arc; Index: trunk/src/obj_pinvia_therm.h =================================================================== --- trunk/src/obj_pinvia_therm.h (revision 30912) +++ trunk/src/obj_pinvia_therm.h (revision 30913) @@ -34,6 +34,6 @@ #include #include "config.h" -pcb_polyarea_t *ThermPoly_(pcb_board_t *p, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, pcb_cardinal_t style); +pcb_polyarea_t *ThermPoly_(pcb_board_t *p, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t thickness, rnd_coord_t clearance, rnd_cardinal_t style); #endif Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30912) +++ trunk/src/obj_poly.c (revision 30913) @@ -131,14 +131,14 @@ } /* gets the next slot for a point in a polygon struct, allocates memory if necessary */ -pcb_cardinal_t *pcb_poly_holeidx_new(pcb_poly_t *Polygon) +rnd_cardinal_t *pcb_poly_holeidx_new(pcb_poly_t *Polygon) { - pcb_cardinal_t *holeindex = Polygon->HoleIndex; + rnd_cardinal_t *holeindex = Polygon->HoleIndex; /* realloc new memory if necessary and clear it */ if (Polygon->HoleIndexN >= Polygon->HoleIndexMax) { Polygon->HoleIndexMax += STEP_POLYGONHOLEINDEX; - holeindex = (pcb_cardinal_t *) realloc(holeindex, Polygon->HoleIndexMax * sizeof(int)); + holeindex = (rnd_cardinal_t *) realloc(holeindex, Polygon->HoleIndexMax * sizeof(int)); Polygon->HoleIndex = holeindex; memset(holeindex + Polygon->HoleIndexN, 0, STEP_POLYGONHOLEINDEX * sizeof(int)); } @@ -208,7 +208,7 @@ { pcb_pline_t *contour = NULL; pcb_polyarea_t *np1 = NULL, *np = NULL; - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_vector_t v; int res = 1; @@ -405,7 +405,7 @@ if (pcb_neqs(p1->term, p2->term)) return 0; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p1) && !PCB_FLAG_TEST(PCB_FLAG_FLOATER, p2)) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < p1->PointN; n++) { rnd_coord_t x1, y1, x2, y2; pcb_hash_tr_coords(tr1, &x1, &y1, p1->Points[n].X, p1->Points[n].Y); @@ -419,7 +419,7 @@ unsigned int pcb_poly_hash(const pcb_host_trans_t *tr, const pcb_poly_t *p) { unsigned int crd = 0; - pcb_cardinal_t n; + rnd_cardinal_t n; if (!PCB_FLAG_TEST(PCB_FLAG_FLOATER, p)) for(n = 0; n < p->PointN; n++) { @@ -552,7 +552,7 @@ /* creates a new hole in a polygon */ pcb_poly_t *pcb_poly_hole_new(pcb_poly_t * Polygon) { - pcb_cardinal_t *holeindex = pcb_poly_holeidx_new(Polygon); + rnd_cardinal_t *holeindex = pcb_poly_holeidx_new(Polygon); *holeindex = Polygon->PointN; return Polygon; } @@ -560,8 +560,8 @@ /* copies data from one polygon to another; 'Dest' has to exist */ pcb_poly_t *pcb_poly_copy(pcb_poly_t *Dest, pcb_poly_t *Src, rnd_coord_t dx, rnd_coord_t dy) { - pcb_cardinal_t hole = 0; - pcb_cardinal_t n; + rnd_cardinal_t hole = 0; + rnd_cardinal_t n; for (n = 0; n < Src->PointN; n++) { if (hole < Src->HoleIndexN && n == Src->HoleIndex[hole]) { @@ -576,7 +576,7 @@ return Dest; } -static double poly_area(pcb_point_t *points, pcb_cardinal_t n_points) +static double poly_area(pcb_point_t *points, rnd_cardinal_t n_points) { double area = 0; int n; @@ -732,7 +732,7 @@ void *pcb_polyop_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { pcb_point_t save; - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_line_t line; pcb_poly_pprestore(Polygon); @@ -916,10 +916,10 @@ /* removes a polygon-point from a polygon and destroys the data */ void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point) { - pcb_cardinal_t point_idx; - pcb_cardinal_t i; - pcb_cardinal_t contour; - pcb_cardinal_t contour_start, contour_end, contour_points; + rnd_cardinal_t point_idx; + rnd_cardinal_t i; + rnd_cardinal_t contour; + rnd_cardinal_t contour_start, contour_end, contour_points; pcb_poly_pprestore(Polygon); point_idx = pcb_poly_point_idx(Polygon, Point); @@ -976,10 +976,10 @@ /* Removes a contour from a polygon. If removing the outer contour, it removes the whole polygon. */ -void *pcb_polyop_remove_counter(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_cardinal_t contour) +void *pcb_polyop_remove_counter(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_cardinal_t contour) { - pcb_cardinal_t contour_start, contour_end, contour_points; - pcb_cardinal_t i; + rnd_cardinal_t contour_start, contour_end, contour_points; + rnd_cardinal_t i; if (contour == 0) return pcb_poly_remove(Layer, Polygon); @@ -1019,10 +1019,10 @@ /* removes a polygon-point from a polygon */ void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point) { - pcb_cardinal_t point_idx; - pcb_cardinal_t i; - pcb_cardinal_t contour; - pcb_cardinal_t contour_start, contour_end, contour_points; + rnd_cardinal_t point_idx; + rnd_cardinal_t i; + rnd_cardinal_t contour; + rnd_cardinal_t contour_start, contour_end, contour_points; pcb_poly_pprestore(Polygon); @@ -1232,7 +1232,7 @@ void pcb_poly_draw_annotation(pcb_draw_info_t *info, pcb_poly_t *poly) { - pcb_cardinal_t n, np; + rnd_cardinal_t n, np; if (!conf_core.editor.as_drawn_poly) return; Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 30912) +++ trunk/src/obj_poly.h (revision 30913) @@ -39,15 +39,15 @@ struct pcb_poly_s { /* holds information about a polygon */ PCB_ANY_PRIMITIVE_FIELDS; rnd_coord_t Clearance; - pcb_cardinal_t PointN; /* number of points in polygon */ - pcb_cardinal_t PointMax; /* max number from malloc() */ + rnd_cardinal_t PointN; /* number of points in polygon */ + rnd_cardinal_t PointMax; /* max number from malloc() */ pcb_polyarea_t *Clipped; /* the clipped region of this polygon */ pcb_pline_t *NoHoles; /* the polygon broken into hole-less regions */ int NoHolesValid; /* Is the NoHoles polygon up to date? */ pcb_point_t *Points; /* data */ - pcb_cardinal_t *HoleIndex; /* Index of hole data within the Points array */ - pcb_cardinal_t HoleIndexN; /* number of holes in polygon */ - pcb_cardinal_t HoleIndexMax; /* max number from malloc() */ + rnd_cardinal_t *HoleIndex; /* Index of hole data within the Points array */ + rnd_cardinal_t HoleIndexN; /* number of holes in polygon */ + rnd_cardinal_t HoleIndexMax; /* max number from malloc() */ unsigned clip_dirty:1; /* 1 if polygon should be reclipped after clipping inhibit is over */ gdl_elem_t link; /* a poly is in a list of a layer */ }; @@ -58,7 +58,7 @@ pcb_poly_t *pcb_poly_alloc_id(pcb_layer_t *layer, long int id); void pcb_poly_free(pcb_poly_t * data); pcb_point_t *pcb_poly_point_alloc(pcb_poly_t *Polygon); -pcb_cardinal_t *pcb_poly_holeidx_new(pcb_poly_t *Polygon); +rnd_cardinal_t *pcb_poly_holeidx_new(pcb_poly_t *Polygon); void pcb_poly_free_fields(pcb_poly_t * polygon); void pcb_poly_reg(pcb_layer_t *layer, pcb_poly_t *poly); @@ -265,7 +265,7 @@ linelist_foreach(&(layer)->Polygon, &__it__, polygon) { #define PCB_POLY_POINT_LOOP(polygon) do { \ - pcb_cardinal_t n; \ + rnd_cardinal_t n; \ pcb_point_t *point; \ for (n = (polygon)->PointN-1; n != -1; n--) \ { \ @@ -272,7 +272,7 @@ point = &(polygon)->Points[n] #define PCB_POLY_ALL_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN) ; l++, layer++) \ { \ @@ -279,7 +279,7 @@ PCB_POLY_LOOP(layer) #define PCB_POLY_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -287,7 +287,7 @@ PCB_POLY_LOOP(layer) #define PCB_POLY_SILK_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -295,7 +295,7 @@ PCB_POLY_LOOP(layer) #define PCB_POLY_VISIBLE_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ Index: trunk/src/obj_poly_op.h =================================================================== --- trunk/src/obj_poly_op.h (revision 30912) +++ trunk/src/obj_poly_op.h (revision 30913) @@ -44,7 +44,7 @@ void *pcb_polyop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_destroy_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point); void *pcb_polyop_remove(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); -void *pcb_polyop_remove_counter(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_cardinal_t contour); +void *pcb_polyop_remove_counter(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, rnd_cardinal_t contour); void *pcb_polyop_remove_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon, pcb_point_t *Point); void *pcb_polyop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); void *pcb_polyop_rotate90(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30912) +++ trunk/src/obj_pstk.c (revision 30913) @@ -113,7 +113,7 @@ free(ps); } -pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror) +pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, rnd_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror) { pcb_pstk_t *ps; @@ -140,7 +140,7 @@ return ps; } -pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags) +pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, rnd_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags) { return pcb_pstk_new_tr(data, id, proto, x, y, clearance, Flags, 0, 0, 0); } @@ -1364,7 +1364,7 @@ long int parent_ID; /* -1 for pcb, positive for a subc */ long int ID; /* ID of the padstack */ - pcb_cardinal_t proto; + rnd_cardinal_t proto; rnd_coord_t clearance; double rot; int xmirror, smirror; @@ -1416,7 +1416,7 @@ if (ps->parent.data->padstack_tree != NULL) pcb_r_delete_entry(ps->parent.data->padstack_tree, (rnd_box_t *)ps); - swap(ps->proto, u->proto, pcb_cardinal_t); + swap(ps->proto, u->proto, rnd_cardinal_t); swap(ps->Clearance, u->clearance, rnd_coord_t); swap(ps->rot, u->rot, double); swap(ps->xmirror, u->xmirror, int); @@ -1449,7 +1449,7 @@ undo_change_instance_print }; -int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror) +int pcb_pstk_change_instance(pcb_pstk_t *ps, rnd_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror) { padstack_change_instance_t *u; long int parent_ID; @@ -1513,7 +1513,7 @@ pcb_layergrp_t *g = &pcb->LayerGroups.grp[gid]; PCB_PADSTACK_LOOP(pcb->Data); { - pcb_cardinal_t n; + 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; Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 30912) +++ trunk/src/obj_pstk.h (revision 30913) @@ -36,7 +36,7 @@ #define thermal thermal_dont_use PCB_ANY_PRIMITIVE_FIELDS; #undef thermal - pcb_cardinal_t proto; /* reference to a pcb_pstk_proto_t within pcb_data_t */ + rnd_cardinal_t proto; /* reference to a pcb_pstk_proto_t within pcb_data_t */ int protoi; /* index of the transformed proto; -1 means invalid; local cache, not saved */ rnd_coord_t x, y; rnd_coord_t Clearance; @@ -56,7 +56,7 @@ #define PCB_PADSTACK_MAX_SHAPES 31 -#define PCB_PADSTACK_INVALID ((pcb_cardinal_t)(-1)) +#define PCB_PADSTACK_INVALID ((rnd_cardinal_t)(-1)) #include "layer.h" #include "obj_common.h" @@ -90,8 +90,8 @@ pcb_pstk_t *pcb_pstk_alloc(pcb_data_t *data); pcb_pstk_t *pcb_pstk_alloc_id(pcb_data_t *data, long int id); void pcb_pstk_free(pcb_pstk_t *ps); -pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags); -pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, pcb_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror); +pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, long int id, rnd_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags); +pcb_pstk_t *pcb_pstk_new_tr(pcb_data_t *data, long int id, rnd_cardinal_t proto, rnd_coord_t x, rnd_coord_t y, rnd_coord_t clearance, pcb_flag_t Flags, double rot, int xmirror, int smirror); void pcb_pstk_add(pcb_data_t *data, pcb_pstk_t *ps); void pcb_pstk_bbox(pcb_pstk_t *ps); void pcb_pstk_copper_bbox(rnd_box_t *dst, pcb_pstk_t *ps); @@ -114,7 +114,7 @@ pcb_pstk_t *pcb_pstk_by_id(pcb_data_t *base, long int ID); /* Undoably change the instance parameters of a padstack ref */ -int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror); +int pcb_pstk_change_instance(pcb_pstk_t *ps, rnd_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror); /* Return whether a group is empty (free of padstack shapes) */ rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid); @@ -133,8 +133,8 @@ /* Convert selection or current buffer to padstack; returns PCB_PADSTACK_INVALID on error; looks for existing matching protos to avoid adding redundant entries */ -pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy); -pcb_cardinal_t pcb_pstk_conv_buffer(int quiet); +rnd_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy); +rnd_cardinal_t pcb_pstk_conv_buffer(int quiet); /* Low level converter: take an array of (pcb_any_obj_t *) objs and convert them into shapes of the dst proto. Does not remove input objects. */ @@ -176,8 +176,8 @@ ID, else dup it and insert it. The forcedup variant always dups. WARNING: make sure pcb_pstk_proto_update() was called on proto some point in time before this call, esle the hash is invalid. */ -pcb_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable); -pcb_cardinal_t pcb_pstk_proto_insert_forcedup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable); +rnd_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable); +rnd_cardinal_t pcb_pstk_proto_insert_forcedup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable); /* Change the non-NULL hole properties of a padstack proto; undoable. Returns 0 on success. */ @@ -251,13 +251,13 @@ /* Insert a proto in data and return the proto-id. If the proto is already in data, the fields of the caller's version are free'd, else they are copied into data. In any case, the caller should not free proto. */ -pcb_cardinal_t pcb_pstk_proto_insert_or_free(pcb_data_t *data, pcb_pstk_proto_t *proto, int quiet, int undoable); +rnd_cardinal_t pcb_pstk_proto_insert_or_free(pcb_data_t *data, pcb_pstk_proto_t *proto, int quiet, int undoable); /* Update caches and hash - must be called after any change to the prototype */ void pcb_pstk_proto_update(pcb_pstk_proto_t *dst); /* Overwrite all fields of a proto in-place; returns the id or INVALID on error */ -pcb_cardinal_t pcb_pstk_proto_replace(pcb_data_t *data, pcb_cardinal_t proto_id, const pcb_pstk_proto_t *src); +rnd_cardinal_t pcb_pstk_proto_replace(pcb_data_t *data, rnd_cardinal_t proto_id, const pcb_pstk_proto_t *src); /* Cycle through all (first level) padstacks of data and count how many times each prototype is referenced by them. The result is returned as an array @@ -264,10 +264,10 @@ of counts per prototype ID; the array is as large as data's prototype array. len_out is always filled with the length of the array. If the length is 0, NULL is returned. The caller needs to call free() on the returned array. */ -pcb_cardinal_t *pcb_pstk_proto_used_all(pcb_data_t *data, pcb_cardinal_t *len_out); +rnd_cardinal_t *pcb_pstk_proto_used_all(pcb_data_t *data, rnd_cardinal_t *len_out); /* Remove a prototype: free all fields and mark it unused */ -void pcb_pstk_proto_del(pcb_data_t *data, pcb_cardinal_t proto_id); +void pcb_pstk_proto_del(pcb_data_t *data, rnd_cardinal_t proto_id); /* allocate a new shape in proto:tr_idx and return the shape index - clal this for all transformed shapes! */ Index: trunk/src/obj_pstk_act.c =================================================================== --- trunk/src/obj_pstk_act.c (revision 30912) +++ trunk/src/obj_pstk_act.c (revision 30913) @@ -43,7 +43,7 @@ { int op; rnd_coord_t x, y; - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_proto_t tmp, *p; RND_PCB_ACT_CONVARG(1, FGW_KEYWORD, padstackconvert, op = fgw_keyword(&argv[1])); @@ -134,7 +134,7 @@ break; case F_Selected: { - pcb_cardinal_t n; + rnd_cardinal_t n; int ret = 0; vtp0_t objs; pcb_any_obj_t **o; @@ -167,7 +167,7 @@ fgw_error_t pcb_act_padstackplace(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *pids = NULL; - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_t *ps; rnd_coord_t x, y; Index: trunk/src/obj_pstk_inlines.h =================================================================== --- trunk/src/obj_pstk_inlines.h (revision 30912) +++ trunk/src/obj_pstk_inlines.h (revision 30913) @@ -42,7 +42,7 @@ } pcb_bb_type_t; /* Returns the ID of a proto within its parent's cache */ -PCB_INLINE pcb_cardinal_t pcb_pstk_get_proto_id(const pcb_pstk_proto_t *proto) +PCB_INLINE rnd_cardinal_t pcb_pstk_get_proto_id(const pcb_pstk_proto_t *proto) { pcb_data_t *data = proto->parent; if ((proto >= data->ps_protos.array) && (proto < data->ps_protos.array + data->ps_protos.used)) @@ -52,7 +52,7 @@ } /* return the padstack prototype for a padstack reference - returns NULL if not found */ -PCB_INLINE pcb_pstk_proto_t *pcb_pstk_get_proto_(const pcb_data_t *data, pcb_cardinal_t proto) +PCB_INLINE pcb_pstk_proto_t *pcb_pstk_get_proto_(const pcb_data_t *data, rnd_cardinal_t proto) { if (proto >= data->ps_protos.used) return NULL; @@ -69,7 +69,7 @@ /* return the padstack transformed shape. Returns NULL if the proto or the tshape is not. */ -PCB_INLINE pcb_pstk_tshape_t *pcb_pstk_get_tshape_(const pcb_data_t *data, pcb_cardinal_t proto, int protoi) +PCB_INLINE pcb_pstk_tshape_t *pcb_pstk_get_tshape_(const pcb_data_t *data, rnd_cardinal_t proto, int protoi) { pcb_pstk_proto_t *pr = pcb_pstk_get_proto_(data, proto); if (protoi < 0) Index: trunk/src/obj_pstk_op.c =================================================================== --- trunk/src/obj_pstk_op.c (revision 30912) +++ trunk/src/obj_pstk_op.c (revision 30913) @@ -30,7 +30,7 @@ void *pcb_pstkop_add_to_buffer(pcb_opctx_t *ctx, pcb_pstk_t *ps) { pcb_pstk_t *p; - pcb_cardinal_t npid; + rnd_cardinal_t npid; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if (proto == NULL) return NULL; @@ -44,7 +44,7 @@ /* Move between board and buffer */ void *pcb_pstkop_move_buffer(pcb_opctx_t *ctx, pcb_pstk_t *ps) { - pcb_cardinal_t npid; + rnd_cardinal_t npid; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if (proto == NULL) return NULL; @@ -74,7 +74,7 @@ { pcb_pstk_t *nps; pcb_data_t *data = ctx->copy.pcb->Data; - pcb_cardinal_t npid; + rnd_cardinal_t npid; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if (proto == NULL) @@ -249,7 +249,7 @@ void *pcb_pstkop_change_size(pcb_opctx_t *ctx, pcb_pstk_t *ps) { pcb_pstk_proto_t proto; - pcb_cardinal_t nproto; + rnd_cardinal_t nproto; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, ps)) return NULL; @@ -297,7 +297,7 @@ void *pcb_pstkop_change_2nd_size(pcb_opctx_t *ctx, pcb_pstk_t *ps) { pcb_pstk_proto_t proto; - pcb_cardinal_t nproto; + rnd_cardinal_t nproto; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, ps)) return NULL; Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 30912) +++ trunk/src/obj_pstk_proto.c (revision 30913) @@ -269,7 +269,7 @@ break; case PCB_OBJ_POLY: { - pcb_cardinal_t p, len, maxlen = (1L << ((sizeof(int)*8)-1)); + rnd_cardinal_t p, len, maxlen = (1L << ((sizeof(int)*8)-1)); pcb_poly_t *poly = *(pcb_poly_t **)o; len = poly->PointN; @@ -667,9 +667,9 @@ /* Matches proto against all protos in data's cache; returns PCB_PADSTACK_INVALID (and loads first_free_out) if not found */ -static pcb_cardinal_t pcb_pstk_proto_insert_try(pcb_data_t *data, const pcb_pstk_proto_t *proto, pcb_cardinal_t *first_free_out) +static rnd_cardinal_t pcb_pstk_proto_insert_try(pcb_data_t *data, const pcb_pstk_proto_t *proto, rnd_cardinal_t *first_free_out) { - pcb_cardinal_t n, first_free = PCB_PADSTACK_INVALID; + rnd_cardinal_t n, first_free = PCB_PADSTACK_INVALID; /* look for the first existing padstack that matches */ for(n = 0; n < pcb_vtpadstack_proto_len(&data->ps_protos); n++) { @@ -735,9 +735,9 @@ -pcb_cardinal_t pcb_pstk_proto_insert_or_free(pcb_data_t *data, pcb_pstk_proto_t *proto, int quiet, int undoable) +rnd_cardinal_t pcb_pstk_proto_insert_or_free(pcb_data_t *data, pcb_pstk_proto_t *proto, int quiet, int undoable) { - pcb_cardinal_t id, n, first_free; + rnd_cardinal_t id, n, first_free; n = pcb_pstk_proto_insert_try(data, proto, &first_free); if (n != PCB_PADSTACK_INVALID) { @@ -773,9 +773,9 @@ return id; } -static pcb_cardinal_t pcb_pstk_proto_insert_dup_(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int forcedup, int undoable) +static rnd_cardinal_t pcb_pstk_proto_insert_dup_(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int forcedup, int undoable) { - pcb_cardinal_t id, n, first_free = PCB_PADSTACK_INVALID; + rnd_cardinal_t id, n, first_free = PCB_PADSTACK_INVALID; n = pcb_pstk_proto_insert_try(data, proto, &first_free); if ((n != PCB_PADSTACK_INVALID) && (!forcedup)) @@ -809,18 +809,18 @@ return id; } -pcb_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable) +rnd_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable) { return pcb_pstk_proto_insert_dup_(data, proto, quiet, 0, undoable); } -pcb_cardinal_t pcb_pstk_proto_insert_forcedup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable) +rnd_cardinal_t pcb_pstk_proto_insert_forcedup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet, int undoable) { return pcb_pstk_proto_insert_dup_(data, proto, quiet, 1, undoable); } -pcb_cardinal_t pcb_pstk_proto_replace(pcb_data_t *data, pcb_cardinal_t proto_id, const pcb_pstk_proto_t *src) +rnd_cardinal_t pcb_pstk_proto_replace(pcb_data_t *data, rnd_cardinal_t proto_id, const pcb_pstk_proto_t *src) { pcb_pstk_proto_t *dst; if ((proto_id < 0) || (proto_id >= pcb_vtpadstack_proto_len(&data->ps_protos))) @@ -837,7 +837,7 @@ } -pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy) +rnd_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, rnd_coord_t ox, rnd_coord_t oy) { pcb_pstk_proto_t proto; @@ -847,7 +847,7 @@ return pcb_pstk_proto_insert_or_free(pcb->Data, &proto, quiet, 1); } -pcb_cardinal_t pcb_pstk_conv_buffer(int quiet) +rnd_cardinal_t pcb_pstk_conv_buffer(int quiet) { pcb_pstk_proto_t proto; @@ -892,7 +892,7 @@ typedef struct { long int parent_ID; /* -1 for pcb, positive for a subc */ - pcb_cardinal_t proto; + rnd_cardinal_t proto; int hplated; rnd_coord_t hdia; @@ -978,7 +978,7 @@ typedef struct { long int parent_ID; /* -1 for pcb, positive for a subc */ - pcb_cardinal_t proto; + rnd_cardinal_t proto; char *name; } padstack_proto_change_name_t; @@ -1429,7 +1429,7 @@ pcb_pstk_proto_del_shape_idx(proto, idx); } -void pcb_pstk_proto_del(pcb_data_t *data, pcb_cardinal_t proto_id) +void pcb_pstk_proto_del(pcb_data_t *data, rnd_cardinal_t proto_id) { pcb_pstk_proto_t *proto = pcb_vtpadstack_proto_get(&data->ps_protos, proto_id, 0); if (proto == NULL) @@ -1437,9 +1437,9 @@ pcb_pstk_proto_free_fields(proto); } -pcb_cardinal_t *pcb_pstk_proto_used_all(pcb_data_t *data, pcb_cardinal_t *len_out) +rnd_cardinal_t *pcb_pstk_proto_used_all(pcb_data_t *data, rnd_cardinal_t *len_out) { - pcb_cardinal_t len, *res; + rnd_cardinal_t len, *res; pcb_pstk_t *ps; len = data->ps_protos.used; @@ -1448,7 +1448,7 @@ return NULL; } - res = calloc(sizeof(pcb_cardinal_t), len); + res = calloc(sizeof(rnd_cardinal_t), len); for(ps = padstacklist_first(&data->padstack); ps != NULL; ps = padstacklist_next(ps)) { if ((ps->proto >= 0) && (ps->proto < len)) res[ps->proto]++; @@ -1461,7 +1461,7 @@ for(n = 0; n < pcb->RouteStyle.used; n++) { if (pcb->RouteStyle.array[n].via_proto_set) { - pcb_cardinal_t pid = pcb->RouteStyle.array[n].via_proto; + rnd_cardinal_t pid = pcb->RouteStyle.array[n].via_proto; if ((pid >= 0) && (pid < len)) res[pid]++; } Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 30912) +++ trunk/src/obj_subc.c (revision 30913) @@ -976,7 +976,7 @@ gdl_iterator_t it; padstacklist_foreach(&src->data->padstack, &it, ps) { - pcb_cardinal_t pid = pcb_pstk_proto_insert_dup(sc->data, pcb_pstk_get_proto(ps), 1, undoable_psproto); + rnd_cardinal_t pid = pcb_pstk_proto_insert_dup(sc->data, pcb_pstk_get_proto(ps), 1, undoable_psproto); nps = pcb_pstk_new_tr(sc->data, -1, pid, ps->x+dx, ps->y+dy, ps->Clearance, ps->Flags, ps->rot, ps->xmirror, ps->smirror); pcb_pstk_copy_meta(nps, ps); MAYBE_KEEP_ID(nps, ps); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30912) +++ trunk/src/obj_text.c (revision 30913) @@ -1170,7 +1170,7 @@ PCB_INLINE void pcb_text_draw_string_(pcb_draw_info_t *info, pcb_font_t *font, const unsigned char *string, rnd_coord_t x0, rnd_coord_t y0, int scale, double rotdeg, int mirror, rnd_coord_t thickness, rnd_coord_t min_line_width, int xordraw, rnd_coord_t xordx, rnd_coord_t xordy, pcb_text_tiny_t tiny, pcb_draw_text_cb cb, void *cb_ctx) { rnd_coord_t x = 0; - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; double sc = (double)scale / 100.0; Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 30912) +++ trunk/src/obj_text.h (revision 30913) @@ -125,7 +125,7 @@ textlist_foreach(&(layer)->Text, &__it__, text) { #define PCB_TEXT_ALL_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -132,7 +132,7 @@ PCB_TEXT_LOOP(layer) #define PCB_TEXT_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -140,7 +140,7 @@ PCB_TEXT_LOOP(layer) #define PCB_SILK_COPPER_LOOP(top) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ for (l = 0; l < ((top)->LayerN > 0 ? (top)->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ @@ -148,7 +148,7 @@ PCB_TEXT_LOOP(layer) #define PCB_TEXT_VISIBLE_LOOP(board) do { \ - pcb_cardinal_t l; \ + rnd_cardinal_t l; \ pcb_layer_t *layer = (board)->Data->Layer; \ for (l = 0; l < ((board)->Data->LayerN > 0 ? (board)->Data->LayerN : PCB->Data->LayerN); l++, layer++) \ { \ Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 30912) +++ trunk/src/operation.h (revision 30913) @@ -82,7 +82,7 @@ typedef struct { pcb_board_t *pcb; rnd_coord_t x, y; - pcb_cardinal_t idx; /* poly point idx */ + rnd_cardinal_t idx; /* poly point idx */ rnd_bool last; rnd_bool forcible; } pcb_opctx_insert_t; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30912) +++ trunk/src/plug_io.c (revision 30913) @@ -980,7 +980,7 @@ } -pcb_cardinal_t pcb_io_incompat_save(pcb_data_t *data, pcb_any_obj_t *obj, const char *type, const char *title, const char *description) +rnd_cardinal_t pcb_io_incompat_save(pcb_data_t *data, pcb_any_obj_t *obj, const char *type, const char *title, const char *description) { if ((pcb_io_incompat_lst_enable) && (conf_core.editor.io_incomp_popup)) { Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 30912) +++ trunk/src/plug_io.h (revision 30913) @@ -226,7 +226,7 @@ used for navigating the user to the problem). Desc should be a short description (must not be NULL), details should go in hint (can be NULL). Returns a report ID. */ -pcb_cardinal_t pcb_io_incompat_save(pcb_data_t *data, pcb_any_obj_t *obj, const char *type, const char *title, const char *description); +rnd_cardinal_t pcb_io_incompat_save(pcb_data_t *data, pcb_any_obj_t *obj, const char *type, const char *title, const char *description); void pcb_io_uninit(void); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30912) +++ trunk/src/polygon.c (revision 30913) @@ -101,7 +101,7 @@ pcb_event_unbind_allcookie(polygon_cookie); } -pcb_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point) +rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point) { assert(point >= polygon->Points); assert(point <= polygon->Points + polygon->PointN); @@ -109,10 +109,10 @@ } /* Find contour number: 0 for outer, 1 for first hole etc.. */ -pcb_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, pcb_cardinal_t point) +rnd_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, rnd_cardinal_t point) { - pcb_cardinal_t i; - pcb_cardinal_t contour = 0; + rnd_cardinal_t i; + rnd_cardinal_t contour = 0; for (i = 0; i < polygon->HoleIndexN; i++) if (point >= polygon->HoleIndex[i]) @@ -120,11 +120,11 @@ return contour; } -pcb_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, pcb_cardinal_t point) +rnd_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, rnd_cardinal_t point) { - pcb_cardinal_t contour; - pcb_cardinal_t this_contour_start; - pcb_cardinal_t next_contour_start; + rnd_cardinal_t contour; + rnd_cardinal_t this_contour_start; + rnd_cardinal_t next_contour_start; contour = pcb_poly_contour_point(polygon, point); @@ -138,11 +138,11 @@ return point; } -pcb_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, pcb_cardinal_t point) +rnd_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, rnd_cardinal_t point) { - pcb_cardinal_t contour; - pcb_cardinal_t prev_contour_end; - pcb_cardinal_t this_contour_end; + rnd_cardinal_t contour; + rnd_cardinal_t prev_contour_end; + rnd_cardinal_t this_contour_end; contour = pcb_poly_contour_point(polygon, point); @@ -226,7 +226,7 @@ { pcb_pline_t *contour = NULL; pcb_polyarea_t *np1 = NULL, *np = NULL; - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_vector_t v; int hole = 0; @@ -266,7 +266,7 @@ TODO("multiple plines within the returned polyarea np does not really work\n"); #if 0 if (!pcb_poly_valid(np)) { - pcb_cardinal_t cnt = pcb_polyarea_split_selfint(np); + rnd_cardinal_t cnt = pcb_polyarea_split_selfint(np); rnd_message(PCB_MSG_ERROR, "Had to split up self-intersecting polygon into %ld parts\n", (long)cnt); if (cnt > 1) *need_full = pcb_true; @@ -366,7 +366,7 @@ } /* return the clearance polygon for a line */ -static pcb_polyarea_t *line_clearance_poly(pcb_cardinal_t layernum, pcb_board_t *pcb, pcb_line_t *line) +static pcb_polyarea_t *line_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_line_t *line) { if (line->thermal & PCB_THERMAL_ON) return pcb_thermal_area_line(pcb, line, layernum); @@ -576,7 +576,7 @@ rnd_coord_t x, y, px, py, x0, y0; pcb_pline_t *pl; int go; - pcb_cardinal_t cnt; + rnd_cardinal_t cnt; if (*dst != NULL) pa_append(it->pa); @@ -633,7 +633,7 @@ } /* return the clearance polygon for a line */ -static pcb_polyarea_t *poly_clearance_poly(pcb_cardinal_t layernum, pcb_board_t *pcb, pcb_poly_t *subpoly) +static pcb_polyarea_t *poly_clearance_poly(rnd_cardinal_t layernum, pcb_board_t *pcb, pcb_poly_t *subpoly) { if (subpoly->thermal & PCB_THERMAL_ON) return pcb_thermal_area_poly(pcb, subpoly, layernum); @@ -752,9 +752,9 @@ return PCB_R_DIR_FOUND_CONTINUE; } -static pcb_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const rnd_box_t *here, rnd_coord_t expand, int noop) +static rnd_cardinal_t clearPoly(pcb_data_t *Data, pcb_layer_t *Layer, pcb_poly_t *polygon, const rnd_box_t *here, rnd_coord_t expand, int noop) { - pcb_cardinal_t r = 0; + rnd_cardinal_t r = 0; int seen; rnd_box_t region; struct cpInfo info; @@ -992,9 +992,9 @@ return pcb_poly_init_clip_prog(Data, layer, p, NULL, NULL, 1); } -pcb_cardinal_t pcb_poly_num_clears(pcb_data_t *data, pcb_layer_t *layer, pcb_poly_t *polygon) +rnd_cardinal_t pcb_poly_num_clears(pcb_data_t *data, pcb_layer_t *layer, pcb_poly_t *polygon) { - pcb_cardinal_t res; + rnd_cardinal_t res; void (*old_cb)(void *ctx); if (layer->is_bound) @@ -1017,7 +1017,7 @@ rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *Layer, pcb_poly_t *Polygon) { pcb_point_t *p; - pcb_cardinal_t n, prev, next; + rnd_cardinal_t n, prev, next; pcb_line_t line; rnd_bool changed = pcb_false; @@ -1045,11 +1045,11 @@ * point of the segment with the lowest distance to the passed * coordinates */ -pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) +rnd_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *Polygon, rnd_coord_t X, rnd_coord_t Y) { double mindistance = (double) PCB_MAX_COORD * PCB_MAX_COORD; pcb_point_t *ptr1, *ptr2; - pcb_cardinal_t n, result = 0; + rnd_cardinal_t n, result = 0; /* we calculate the distance to each segment and choose the * shortest distance. If the closest approach between the @@ -1107,7 +1107,7 @@ default: { pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN - 2; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN - 2; pcb_crosshair.AttachedPolygon.PointN--; pcb_crosshair.AttachedLine.Point1.X = points[n].X; @@ -1124,7 +1124,7 @@ { if ((pcb_crosshair.AttachedPolygon.PointN > 0) && (pcb_crosshair.AttachedPolygon.PointN < pcb_crosshair.AttachedPolygon_pts)) { pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; pcb_crosshair.AttachedPolygon.PointN++; pcb_crosshair.AttachedLine.Point1.X = points[n].X; @@ -1137,7 +1137,7 @@ */ void pcb_polygon_close_poly(void) { - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* check number of points */ if (n >= 3) { @@ -1215,7 +1215,7 @@ */ void pcb_polygon_close_hole(void) { - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* check number of points */ if (n >= 3) { @@ -1648,7 +1648,7 @@ void debug_polygon(pcb_poly_t * p) { - pcb_cardinal_t i; + rnd_cardinal_t i; pcb_polyarea_t *pa; fprintf(stderr, "POLYGON %p %d pts\n", (void *)p, p->PointN); for (i = 0; i < p->PointN; i++) Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 30912) +++ trunk/src/polygon.h (revision 30913) @@ -45,11 +45,11 @@ void pcb_polygon_init(void); void pcb_polygon_uninit(void); -pcb_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point); -pcb_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, pcb_cardinal_t point); -pcb_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, pcb_cardinal_t point); -pcb_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, pcb_cardinal_t point); -pcb_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *, rnd_coord_t, rnd_coord_t); +rnd_cardinal_t pcb_poly_point_idx(pcb_poly_t *polygon, pcb_point_t *point); +rnd_cardinal_t pcb_poly_contour_point(pcb_poly_t *polygon, rnd_cardinal_t point); +rnd_cardinal_t pcb_poly_contour_prev_point(pcb_poly_t *polygon, rnd_cardinal_t point); +rnd_cardinal_t pcb_poly_contour_next_point(pcb_poly_t *polygon, rnd_cardinal_t point); +rnd_cardinal_t pcb_poly_get_lowest_distance_point(pcb_poly_t *, rnd_coord_t, rnd_coord_t); rnd_bool pcb_poly_remove_excess_points(pcb_layer_t *, pcb_poly_t *); void pcb_polygon_go_to_prev_point(void); /* undo */ void pcb_polygon_go_to_next_point(void); /* redo */ @@ -84,7 +84,7 @@ /* Return the number of subtractions that have to be executed by a pcb_poly_init_clip() on the given polygon */ -pcb_cardinal_t pcb_poly_num_clears(pcb_data_t *data, pcb_layer_t *layer, pcb_poly_t *polygon); +rnd_cardinal_t pcb_poly_num_clears(pcb_data_t *data, pcb_layer_t *layer, pcb_poly_t *polygon); rnd_bool pcb_poly_is_point_in_p(rnd_coord_t, rnd_coord_t, rnd_coord_t, pcb_poly_t *); Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30912) +++ trunk/src/search.c (revision 30913) @@ -192,7 +192,7 @@ TEST_OBJST(i->objst, i->req_flag, l, line, line); if (PCB_FLAG_TEST(PCB_FLAG_VIA, line) ? - (pcb_distance(line->Point1.X, line->Point1.Y, PosX, PosY) <= + (rnd_distance(line->Point1.X, line->Point1.Y, PosX, PosY) <= line->Thickness * 2 + SearchRadius) : pcb_is_point_on_line(PosX, PosY, SearchRadius, line)) { *i->ptr1 = *i->ptr2 = *i->ptr3 = line; return PCB_R_DIR_CANCEL; @@ -374,7 +374,7 @@ TEST_OBJST(i->objst, i->req_flag, l, line, line); /* some stupid code to check both points */ - d = pcb_distance(PosX, PosY, line->Point1.X, line->Point1.Y); + d = rnd_distance(PosX, PosY, line->Point1.X, line->Point1.Y); if (d < i->least) { i->least = d; *i->Line = line; @@ -382,7 +382,7 @@ ret_val = PCB_R_DIR_FOUND_CONTINUE; } - d = pcb_distance(PosX, PosY, line->Point2.X, line->Point2.Y); + d = rnd_distance(PosX, PosY, line->Point2.X, line->Point2.Y); if (d < i->least) { i->least = d; *i->Line = line; @@ -406,7 +406,7 @@ pcb_arc_get_end(arc, 0, &ab.X1, &ab.Y1); pcb_arc_get_end(arc, 1, &ab.X2, &ab.Y2); - d = pcb_distance(PosX, PosY, ab.X1, ab.Y1); + d = rnd_distance(PosX, PosY, ab.X1, ab.Y1); if (d < i->least) { i->least = d; *i->Arc = arc; @@ -414,7 +414,7 @@ ret_val = PCB_R_DIR_FOUND_CONTINUE; } - d = pcb_distance(PosX, PosY, ab.X2, ab.Y2); + d = rnd_distance(PosX, PosY, ab.X2, ab.Y2); if (d < i->least) { i->least = d; *i->Arc = arc; @@ -951,7 +951,7 @@ /* so, pad.Point1.X = pad.Point1.Y = 0; */ /* rotate round (0, 0) so that Point2 coordinates be (r, 0) */ - r = pcb_distance(0, 0, pad.Point2.X, pad.Point2.Y); + r = rnd_distance(0, 0, pad.Point2.X, pad.Point2.Y); if (r < .1) { Cos = 1; Sin = 0; @@ -978,13 +978,13 @@ if (Y <= t2) range = -X; else - return Radius > pcb_distance(0, t2, X, Y); + return Radius > rnd_distance(0, t2, X, Y); } else if (X >= r) { if (Y <= t2) range = X - r; else - return Radius > pcb_distance(r, t2, X, Y); + return Radius > rnd_distance(r, t2, X, Y); } else range = Y - t2; @@ -992,9 +992,9 @@ else { /*Rounded pad: even more simple */ if (X <= 0) - return (Radius + t2) > pcb_distance(0, 0, X, Y); + return (Radius + t2) > rnd_distance(0, 0, X, Y); else if (X >= r) - return (Radius + t2) > pcb_distance(r, 0, X, Y); + return (Radius + t2) > rnd_distance(r, 0, X, Y); else range = Y - t2; } @@ -1016,17 +1016,17 @@ if (X <= 0) { if (Y < 0) - return Radius > pcb_distance(0, 0, X, Y); + return Radius > rnd_distance(0, 0, X, Y); else if (Y > height) - return Radius > pcb_distance(0, height, X, Y); + return Radius > rnd_distance(0, height, X, Y); else range = -X; } else if (X >= width) { if (Y < 0) - return Radius > pcb_distance(width, 0, X, Y); + return Radius > rnd_distance(width, 0, X, Y); else if (Y > height) - return Radius > pcb_distance(width, height, X, Y); + return Radius > rnd_distance(width, height, X, Y); else range = X - width; } @@ -1066,7 +1066,7 @@ rnd_bool pcb_is_point_on_arc(rnd_coord_t X, rnd_coord_t Y, rnd_coord_t Radius, pcb_arc_t *Arc) { /* Calculate angle of point from arc center */ - double p_dist = pcb_distance(X, Y, Arc->X, Arc->Y); + double p_dist = rnd_distance(X, Y, Arc->X, Arc->Y); double p_cos = (X - Arc->X) / p_dist; pcb_angle_t p_ang = acos(p_cos) * PCB_RAD_TO_DEG; pcb_angle_t ang1, ang2; @@ -1101,12 +1101,12 @@ rnd_coord_t ArcX, ArcY; ArcX = Arc->X + Arc->Width * cos((Arc->StartAngle + 180) / PCB_RAD_TO_DEG); ArcY = Arc->Y - Arc->Height * sin((Arc->StartAngle + 180) / PCB_RAD_TO_DEG); - if (pcb_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) + if (rnd_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) return pcb_true; ArcX = Arc->X + Arc->Width * cos((Arc->StartAngle + Arc->Delta + 180) / PCB_RAD_TO_DEG); ArcY = Arc->Y - Arc->Height * sin((Arc->StartAngle + Arc->Delta + 180) / PCB_RAD_TO_DEG); - if (pcb_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) + if (rnd_distance(X, Y, ArcX, ArcY) < Radius + Arc->Thickness / 2) return pcb_true; return pcb_false; } @@ -1113,7 +1113,7 @@ if ((Arc->Width == Arc->Height) || (fabs(Arc->Width - Arc->Height) < PCB_MM_TO_COORD(0.1))) { /* Simple circular case: if point is inside the arc range, just compare it to the arc */ - return fabs(pcb_distance(X, Y, Arc->X, Arc->Y) - Arc->Width) < Radius + Arc->Thickness / 2; + return fabs(rnd_distance(X, Y, Arc->X, Arc->Y) - Arc->Width) < Radius + Arc->Thickness / 2; } else { /* elliptical case: guess where the arc would be in that point, by angle */ @@ -1128,7 +1128,7 @@ ax = Arc->X + cos(ang) * Arc->Width; ay = Arc->Y - sin(ang) * Arc->Height; - d = fabs(pcb_distance(X, Y, ax, ay)); + d = fabs(rnd_distance(X, Y, ax, ay)); return d < Arc->Thickness / 2; } @@ -1257,7 +1257,7 @@ static int pcb_search_obj_by_loc_group(unsigned long Type, void **Result1, void **Result2, void **Result3, unsigned long req_flag, const pcb_layergrp_t *grp, int HigherAvail, double HigherBound, int objst) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < grp->len; n++) { int found; pcb_layer_t *oldly, *layer = pcb_get_layer(PCB->Data, grp->lid[n]); Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 30912) +++ trunk/src/thermal.c (revision 30913) @@ -36,7 +36,7 @@ #include "polygon.h" #include "funchash_core.h" -pcb_cardinal_t pcb_themal_style_new2old(unsigned char t) +rnd_cardinal_t pcb_themal_style_new2old(unsigned char t) { switch(t) { case 0: return 0; @@ -49,7 +49,7 @@ return 0; } -unsigned char pcb_themal_style_old2new(pcb_cardinal_t t) +unsigned char pcb_themal_style_old2new(rnd_cardinal_t t) { switch(t) { case 0: return 0; Index: trunk/src/thermal.h =================================================================== --- trunk/src/thermal.h (revision 30912) +++ trunk/src/thermal.h (revision 30913) @@ -59,8 +59,8 @@ pcb_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid); pcb_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid); -unsigned char pcb_themal_style_old2new(pcb_cardinal_t t); -pcb_cardinal_t pcb_themal_style_new2old(unsigned char t); +unsigned char pcb_themal_style_old2new(rnd_cardinal_t t); +rnd_cardinal_t pcb_themal_style_new2old(unsigned char t); #endif Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 30912) +++ trunk/src/undo_old.c (revision 30913) @@ -673,8 +673,8 @@ pcb_poly_t *polygon; pcb_point_t *pnt; int type; - pcb_cardinal_t point_idx; - pcb_cardinal_t hole; + rnd_cardinal_t point_idx; + rnd_cardinal_t hole; rnd_bool last_in_contour = pcb_false; assert((long int)Entry->Kind == PCB_OBJ_POLY_POINT); @@ -988,11 +988,11 @@ /* --------------------------------------------------------------------------- * adds an object to the list of removed polygon/... points */ -void pcb_undo_add_obj_to_remove_point(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t index) +void pcb_undo_add_obj_to_remove_point(int Type, void *Ptr1, void *Ptr2, rnd_cardinal_t index) { UndoListTypePtr undo; pcb_poly_t *polygon = (pcb_poly_t *) Ptr2; - pcb_cardinal_t hole; + rnd_cardinal_t hole; rnd_bool last_in_contour = pcb_false; if (!Locked) { Index: trunk/src/undo_old.h =================================================================== --- trunk/src/undo_old.h (revision 30912) +++ trunk/src/undo_old.h (revision 30913) @@ -34,7 +34,7 @@ #include "global_typedefs.h" void pcb_undo_move_obj_to_remove(int, void *, void *, void *); -void pcb_undo_add_obj_to_remove_point(int, void *, void *, pcb_cardinal_t); +void pcb_undo_add_obj_to_remove_point(int, void *, void *, rnd_cardinal_t); void pcb_undo_add_obj_to_insert_point(int, void *, void *, void *); void pcb_undo_add_obj_to_remove_contour(int, pcb_layer_t *, pcb_poly_t *); void pcb_undo_add_obj_to_insert_contour(int, pcb_layer_t *, pcb_poly_t *); Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 30912) +++ trunk/src/undo_old_str.h (revision 30913) @@ -16,17 +16,17 @@ typedef struct { /* information about removed polygon points */ rnd_coord_t X, Y; /* data */ int ID; - pcb_cardinal_t Index; /* index in a polygons array of points */ + rnd_cardinal_t Index; /* index in a polygons array of points */ rnd_bool last_in_contour; /* Whether the point was the last in its contour */ } RemovedPointType, *RemovedPointTypePtr; typedef struct { /* information about rotation */ rnd_coord_t CenterX, CenterY; /* center of rotation */ - pcb_cardinal_t Steps; /* number of steps */ + rnd_cardinal_t Steps; /* number of steps */ } RotateType, *RotateTypePtr; typedef struct { /* information about moves between layers */ - pcb_cardinal_t OriginalLayer; /* the index of the original layer */ + rnd_cardinal_t OriginalLayer; /* the index of the original layer */ } MoveToLayer; typedef struct { /* information about poly clear/restore */ Index: trunk/src/vtroutestyle.h =================================================================== --- trunk/src/vtroutestyle.h (revision 30912) +++ trunk/src/vtroutestyle.h (revision 30913) @@ -13,7 +13,7 @@ rnd_coord_t textt; /* text thickness */ rnd_coord_t texts; /* text scale */ rnd_coord_t Clearance; /* min. separation from other nets */ - pcb_cardinal_t via_proto; /* via padstack prototype ID */ + rnd_cardinal_t via_proto; /* via padstack prototype ID */ int via_proto_set; /* 1 if via_proto is set/valid, 0 for old file formats */ rnd_coord_t Diameter, Hole; /* OBSOLETE: via diameter and drill hole; kept for compatibility with old file formats (lihata board v1..v4) */ char name[32]; /* fixed length name to save malloc/free */ Index: trunk/src_plugins/acompnet/meshgraph.c =================================================================== --- trunk/src_plugins/acompnet/meshgraph.c (revision 30912) +++ trunk/src_plugins/acompnet/meshgraph.c (revision 30913) @@ -75,12 +75,12 @@ pcb_trace("size=%d\n", route.size); - return curr->gscore + pcb_distance(curr->bbox.X1, curr->bbox.Y1, next->bbox.X1, next->bbox.Y1) * (next->iscore + 1.0); + return curr->gscore + rnd_distance(curr->bbox.X1, curr->bbox.Y1, next->bbox.X1, next->bbox.Y1) * (next->iscore + 1.0); } static double msgr_heurist(pcb_meshnode_t *curr, pcb_meshnode_t *end) { - return pcb_distance(curr->bbox.X1, curr->bbox.Y1, end->bbox.X1, end->bbox.Y1); + return rnd_distance(curr->bbox.X1, curr->bbox.Y1, end->bbox.X1, end->bbox.Y1); } int pcb_msgr_astar(pcb_meshgraph_t *gr, long int startid, long int endid) Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 30912) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30913) @@ -202,7 +202,7 @@ /* makes a line on the solder layer surrounding all boxes in blist */ static void showboxes(rnd_box_list_t *blist) { - pcb_cardinal_t i; + rnd_cardinal_t i; pcb_layer_t *SLayer = &(PCB->Data->Layer[pcb_solder_silk_layer]); for (i = 0; i < blist->BoxN; i++) { pcb_line_new(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y1, 1, 1, 0); @@ -316,10 +316,10 @@ double delta3 = 0; /* out of bounds penalty */ double delta4 = 0; /* alignment bonus */ double delta5 = 0; /* total area penalty */ - pcb_cardinal_t i; + rnd_cardinal_t i; rnd_coord_t minx, maxx, miny, maxy; rnd_bool allpads, allsameside; - pcb_cardinal_t thegroup; + rnd_cardinal_t thegroup; rnd_box_list_t bounds = { 0, 0, NULL }; /* save bounding rectangles here */ rnd_box_list_t solderside = { 0, 0, NULL }; /* solder side component bounds */ rnd_box_list_t componentside = { 0, 0, NULL }; /* component side bounds */ @@ -685,7 +685,7 @@ pcb_subc_rotate90(subc, bbcx, bbcy, b); } else { - pcb_cardinal_t n; + rnd_cardinal_t n; rnd_coord_t y = bb->Y1; pcb_subc_change_side(subc, (bb->Y1+bb->Y2)/2); /* mirroring moves the subc. move it back. */ Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 30912) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30913) @@ -386,7 +386,7 @@ } routeone_state_t; -static routebox_t *CreateExpansionArea(const rnd_box_t * area, pcb_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * edge); static pcb_cost_t edge_cost(const edge_t * e, const pcb_cost_t too_big); @@ -397,7 +397,7 @@ static void add_or_destroy_edge(routeone_state_t *s, edge_t * e); static void -RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad); +RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, rnd_cardinal_t group, rnd_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad); static void ResetSubnet(routebox_t * net); #ifdef ROUTE_DEBUG static int showboxen = -2; @@ -717,7 +717,7 @@ static routebox_t *AddIrregularObstacle(vtp0_t layergroupboxes[], rnd_coord_t X1, rnd_coord_t Y1, - rnd_coord_t X2, rnd_coord_t Y2, pcb_cardinal_t layergroup, void *parent, pcb_route_style_t * style) + rnd_coord_t X2, rnd_coord_t Y2, rnd_cardinal_t layergroup, void *parent, pcb_route_style_t * style) { routebox_t **rbpp; rnd_coord_t keep = style->Clearance; @@ -741,7 +741,7 @@ return *rbpp; } -static routebox_t *AddPolygon(vtp0_t layergroupboxes[], pcb_cardinal_t layer, pcb_poly_t *polygon, pcb_route_style_t * style) +static routebox_t *AddPolygon(vtp0_t layergroupboxes[], rnd_cardinal_t layer, pcb_poly_t *polygon, pcb_route_style_t * style) { int is_not_rectangle = 1; pcb_layergrp_id_t layergroup = pcb_layer_get_group(PCB, layer); @@ -772,7 +772,7 @@ return rb; } -static void AddText(vtp0_t layergroupboxes[], pcb_cardinal_t layergroup, pcb_text_t *text, pcb_route_style_t * style) +static void AddText(vtp0_t layergroupboxes[], rnd_cardinal_t layergroup, pcb_text_t *text, pcb_route_style_t * style) { AddIrregularObstacle(layergroupboxes, text->BoundingBox.X1, text->BoundingBox.Y1, @@ -779,7 +779,7 @@ text->BoundingBox.X2, text->BoundingBox.Y2, layergroup, text, style); } -static routebox_t *AddArc(vtp0_t layergroupboxes[], pcb_cardinal_t layergroup, pcb_arc_t *arc, pcb_route_style_t * style) +static routebox_t *AddArc(vtp0_t layergroupboxes[], rnd_cardinal_t layergroup, pcb_arc_t *arc, pcb_route_style_t * style) { return AddIrregularObstacle(layergroupboxes, arc->BoundingBox.X1, arc->BoundingBox.Y1, @@ -810,7 +810,7 @@ return PCB_R_DIR_NOT_FOUND; } -static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t layergroup) +static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, rnd_cardinal_t layergroup) { struct rb_info info; info.winner = NULL; @@ -1278,7 +1278,7 @@ PCB_END_LOOP; } -static inline pcb_cost_t pcb_cost_to_point_on_layer(const rnd_cheap_point_t * p1, const rnd_cheap_point_t * p2, pcb_cardinal_t point_layer) +static inline pcb_cost_t pcb_cost_to_point_on_layer(const rnd_cheap_point_t * p1, const rnd_cheap_point_t * p2, rnd_cardinal_t point_layer) { pcb_cost_t x_dist = p1->X - p2->X, y_dist = p1->Y - p2->Y, r; x_dist *= x_cost[point_layer]; @@ -1290,7 +1290,7 @@ return r; } -static pcb_cost_t pcb_cost_to_point(const rnd_cheap_point_t * p1, pcb_cardinal_t point_layer1, const rnd_cheap_point_t * p2, pcb_cardinal_t point_layer2) +static pcb_cost_t pcb_cost_to_point(const rnd_cheap_point_t * p1, rnd_cardinal_t point_layer1, const rnd_cheap_point_t * p2, rnd_cardinal_t point_layer2) { pcb_cost_t r = pcb_cost_to_point_on_layer(p1, p2, point_layer1); /* apply via cost penalty if layers differ */ @@ -1302,7 +1302,7 @@ /* return the minimum *cost* from a point to a box on any layer. * It's safe to return a smaller than minimum cost */ -static pcb_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, pcb_cardinal_t point_layer, const rnd_box_t * b) +static pcb_cost_t pcb_cost_to_layerless_box(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const rnd_box_t * b) { rnd_cheap_point_t p2 = rnd_closest_cheap_point_in_box(p, b); register pcb_cost_t c1, c2; @@ -1335,7 +1335,7 @@ * via costs if the route box is on a different layer. * assume routbox is bloated unless it is an expansion area */ -static pcb_cost_t pcb_cost_to_routebox(const rnd_cheap_point_t * p, pcb_cardinal_t point_layer, const routebox_t * rb) +static pcb_cost_t pcb_cost_to_routebox(const rnd_cheap_point_t * p, rnd_cardinal_t point_layer, const routebox_t * rb) { register pcb_cost_t trial = 0; rnd_cheap_point_t p2 = closest_point_in_routebox(p, rb); @@ -1536,7 +1536,7 @@ * a target (any target) */ struct minpcb_cost_target_closure { const rnd_cheap_point_t *CostPoint; - pcb_cardinal_t CostPointLayer; + rnd_cardinal_t CostPointLayer; routebox_t *nearest; pcb_cost_t nearest_cost; }; @@ -1573,7 +1573,7 @@ /* target_guess is our guess at what the nearest target is, or NULL if we * just plum don't have a clue. */ static routebox_t *minpcb_cost_target_to_point(const rnd_cheap_point_t * CostPoint, - pcb_cardinal_t CostPointLayer, pcb_rtree_t * targets, routebox_t * target_guess) + rnd_cardinal_t CostPointLayer, pcb_rtree_t * targets, routebox_t * target_guess) { struct minpcb_cost_target_closure mtc; assert(target_guess == NULL || target_guess->flags.target); /* this is a target, right? */ @@ -1657,7 +1657,7 @@ } /* create via edge, using previous edge to fill in defaults. */ -static edge_t *CreateViaEdge(const rnd_box_t * area, pcb_cardinal_t group, +static edge_t *CreateViaEdge(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, edge_t * previous_edge, conflict_t to_site_conflict, conflict_t through_site_conflict, pcb_rtree_t * targets) { @@ -1867,7 +1867,7 @@ * immediately preceding expansion area, for backtracing. 'lastarea' is * the last expansion area created, we string these together in a loop * so we can remove them all easily at the end. */ -static routebox_t *CreateExpansionArea(const rnd_box_t * area, pcb_cardinal_t group, +static routebox_t *CreateExpansionArea(const rnd_box_t * area, rnd_cardinal_t group, routebox_t * parent, rnd_bool relax_edge_requirements, edge_t * src_edge) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); @@ -2883,7 +2883,7 @@ * Route-tracing code: once we've got a path of expansion boxes, trace * a line through them to actually create the connection. */ -static void RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad) +static void RD_DrawThermal(routedata_t * rd, rnd_coord_t X, rnd_coord_t Y, rnd_cardinal_t group, rnd_cardinal_t layer, routebox_t * subnet, rnd_bool is_bad) { routebox_t *rb; rb = (routebox_t *) malloc(sizeof(*rb)); @@ -2962,7 +2962,7 @@ static void RD_DrawLine(routedata_t * rd, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, - rnd_coord_t Y2, rnd_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool is_45) + rnd_coord_t Y2, rnd_coord_t halfthick, rnd_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool is_45) { /* we hold the line in a queue to concatenate segments that * ajoin one another. That reduces the number of things in @@ -2971,7 +2971,7 @@ */ static rnd_coord_t qX1 = -1, qY1, qX2, qY2; static rnd_coord_t qhthick; - static pcb_cardinal_t qgroup; + static rnd_cardinal_t qgroup; static rnd_bool qis_45, qis_bad; static routebox_t *qsn; @@ -3072,7 +3072,7 @@ RD_DrawManhattanLine(routedata_t * rd, const rnd_box_t * box1, const rnd_box_t * box2, rnd_cheap_point_t start, rnd_cheap_point_t end, - rnd_coord_t halfthick, pcb_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool last_was_x) + rnd_coord_t halfthick, rnd_cardinal_t group, routebox_t * subnet, rnd_bool is_bad, rnd_bool last_was_x) { rnd_cheap_point_t knee = start; if (end.X == start.X) { Index: trunk/src_plugins/ddraft/centgeo.c =================================================================== --- trunk/src_plugins/ddraft/centgeo.c (revision 30912) +++ trunk/src_plugins/ddraft/centgeo.c (revision 30913) @@ -361,7 +361,7 @@ pdx = Arc2->X - Arc1->X; pdy = Arc2->Y - Arc1->Y; - dl = pcb_distance(Arc1->X, Arc1->Y, Arc2->X, Arc2->Y); + dl = rnd_distance(Arc1->X, Arc1->Y, Arc2->X, Arc2->Y); /* the original code used to do angle checks for concentric case here but those cases are already handled by the above endpoint checks. */ Index: trunk/src_plugins/ddraft/cli.c =================================================================== --- trunk/src_plugins/ddraft/cli.c (revision 30912) +++ trunk/src_plugins/ddraft/cli.c (revision 30913) @@ -98,7 +98,7 @@ rnd_coord_t x, y, dist; pcb_angle_t angle, offs; - pcb_cardinal_t id; + rnd_cardinal_t id; }; static const cli_ntype_t find_type(const char *type, int typelen) Index: trunk/src_plugins/ddraft/cli_line.c =================================================================== --- trunk/src_plugins/ddraft/cli_line.c (revision 30912) +++ trunk/src_plugins/ddraft/cli_line.c (revision 30913) @@ -175,7 +175,7 @@ return 0; } replace=1; - pcb_snprintf(buff, sizeof(buff), "~%.08$$mm", pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, ox, oy)); + pcb_snprintf(buff, sizeof(buff), "~%.08$$mm", rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, ox, oy)); break; case_object: ; { Index: trunk/src_plugins/ddraft/constraint.c =================================================================== --- trunk/src_plugins/ddraft/constraint.c (revision 30912) +++ trunk/src_plugins/ddraft/constraint.c (revision 30913) @@ -83,7 +83,7 @@ double len, best_diff, diff, target_len; int n, best; - len = pcb_distance(x1, y1, x2, y2); + len = rnd_distance(x1, y1, x2, y2); if (lengthlen > 0) { /* find the best matching constraint length */ Index: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 30912) +++ trunk/src_plugins/ddraft/ddraft.c (revision 30913) @@ -421,7 +421,7 @@ return 0; } - d = pcb_distance(arc->X, arc->Y, line->point1.X, line->point1.Y); + d = rnd_distance(arc->X, arc->Y, line->point1.X, line->point1.Y); r = arc->Width; if (d <= r) { Index: trunk/src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30912) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30913) @@ -52,13 +52,13 @@ int wlist, wprev, wgrid; int wlayerv[pcb_proto_num_layers], wlayerc[pcb_proto_num_layers]; /* layer visibility/current */ long subc_id; - pcb_cardinal_t proto_id; - pcb_cardinal_t *stat; /* temporary usage stat */ + rnd_cardinal_t proto_id; + rnd_cardinal_t *stat; /* temporary usage stat */ rnd_box_t drawbox; rnd_bool modal; } pstk_lib_ctx_t; -static pcb_cardinal_t pstklib_last_proto_id; /* set on close to preserve the id after free'ing the context; useful only for modal windows because of blocking calls */ +static rnd_cardinal_t pstklib_last_proto_id; /* set on close to preserve the id after free'ing the context; useful only for modal windows because of blocking calls */ static pcb_data_t *get_data(pstk_lib_ctx_t *ctx, long id, pcb_subc_t **sc_out) { @@ -140,7 +140,7 @@ free(ctx); } -static void pstklib_setps(pcb_pstk_t *ps, pcb_data_t *data, pcb_cardinal_t proto_id) +static void pstklib_setps(pcb_pstk_t *ps, pcb_data_t *data, rnd_cardinal_t proto_id) { memset(ps, 0, sizeof(pcb_pstk_t)); ps->parent_type = PCB_PARENT_DATA; @@ -297,7 +297,7 @@ pstklib_force_redraw(pse->user_data, pse->ps); } -static void pstklib_proto_edit_common(pstk_lib_ctx_t *ctx, pcb_data_t *data, pcb_cardinal_t proto_id, int tab) +static void pstklib_proto_edit_common(pstk_lib_ctx_t *ctx, pcb_data_t *data, rnd_cardinal_t proto_id, int tab) { pcb_pstk_t ps; pse_t pse; @@ -381,7 +381,7 @@ pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); pcb_hid_attribute_t *attr; pcb_hid_row_t *r; - pcb_cardinal_t from_pid, to_pid; + rnd_cardinal_t from_pid, to_pid; pcb_pstk_t *ps; if (data == NULL) @@ -451,7 +451,7 @@ static void pstklib_count_uses(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { - pcb_cardinal_t len; + rnd_cardinal_t len; pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); @@ -466,7 +466,7 @@ static void pstklib_del_unused(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { - pcb_cardinal_t len, n; + rnd_cardinal_t len, n; pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); @@ -483,7 +483,7 @@ ctx->stat = NULL; } -pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint) +rnd_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint) { static const char *hdr[] = {"ID", "name", "used", NULL}; pcb_subc_t *sc; Index: trunk/src_plugins/dialogs/dlg_lib_pstk.h =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.h (revision 30912) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.h (revision 30913) @@ -2,7 +2,7 @@ is 0). If modal, returns the selected prototype or PCB_PADSTACK_INVALID when nothing is selected or the operation cancelled. In non-modal mode return 0 on success and PCB_PADSTACK_INVALID on error. */ -pcb_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint); +rnd_cardinal_t pcb_dlg_pstklib(pcb_board_t *pcb, long subc_id, rnd_bool modal, const char *hint); extern const char pcb_acts_pstklib[]; extern const char pcb_acth_pstklib[]; Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 30912) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 30913) @@ -213,7 +213,7 @@ static void pse_chg_protoid(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { pse_t *pse = caller_data; - pcb_cardinal_t proto_id; + rnd_cardinal_t proto_id; pcb_subc_t *subc; static int lock = 0; @@ -238,7 +238,7 @@ static void pse_chg_protodup(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) { pse_t *pse = caller_data; - pcb_cardinal_t proto_id; + rnd_cardinal_t proto_id; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); assert(pse->ps->parent_type == PCB_PARENT_DATA); @@ -703,7 +703,7 @@ rnd_coord_t size = pse->attrs[pse->gen_size].val.crd; pcb_layer_type_t lyt = sides_lyt[sides]; pcb_pstk_tshape_t *ts; - pcb_cardinal_t pid; + rnd_cardinal_t pid; memset(&proto, 0, sizeof(proto)); Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 30912) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30913) @@ -484,7 +484,7 @@ for (group = 0; group < pcb_max_group(PCB); group++) { pcb_layergrp_t *g = &PCB->LayerGroups.grp[group]; - pcb_cardinal_t n; + rnd_cardinal_t n; if (!(g->ltype & PCB_LYT_COPPER)) continue; for(n = 0; n < g->len; n++) { Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30912) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30913) @@ -50,9 +50,9 @@ }; -static pcb_cardinal_t drill_print_objs(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, int slots, rnd_coord_t *excellon_last_tool_dia) +static rnd_cardinal_t drill_print_objs(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, int slots, rnd_coord_t *excellon_last_tool_dia) { - pcb_cardinal_t i, cnt = 0; + rnd_cardinal_t i, cnt = 0; int first = 1; for (i = 0; i < ctx->obj.used; i++) { @@ -91,10 +91,10 @@ return cnt; } -static pcb_cardinal_t drill_print_holes(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, const char *coord_fmt_hdr) +static rnd_cardinal_t drill_print_holes(pcb_board_t *pcb, FILE *f, pcb_drill_ctx_t *ctx, int force_g85, const char *coord_fmt_hdr) { aperture_t *search; - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; rnd_coord_t excellon_last_tool_dia = 0; /* We omit the ,TZ here because we are not omitting trailing zeros. Our format is Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 30912) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30913) @@ -510,7 +510,7 @@ static void openems_write_mesh_lines(wctx_t *ctx, pcb_mesh_lines_t *l) { - pcb_cardinal_t n; + rnd_cardinal_t n; for(n = 0; n < vtc0_len(&l->result); n++) pcb_fprintf(ctx->f, "%s%mm", (n == 0 ? "" : " "), l->result.array[n]); } Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30912) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30913) @@ -500,7 +500,7 @@ TRX(x1); TRY(y1); TRX(x2); TRY(y2); - length = pcb_distance(x1, y1, x2, y2); + length = rnd_distance(x1, y1, x2, y2); angle = atan2((double)y2-y1, (double)x2-x1); if (gc->cap == pcb_cap_square) Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 30912) +++ trunk/src_plugins/export_stat/stat.c (revision 30913) @@ -137,7 +137,7 @@ char buff[1024]; layer_stat_t ls, *lgs, lgss[PCB_MAX_LAYERGRP]; int nl, phg, hp, hup, group_not_empty[PCB_MAX_LAYERGRP]; - pcb_cardinal_t num_etop = 0, num_ebottom = 0, num_esmd = 0, num_epads = 0, num_epins = 0, num_terms = 0, num_slots = 0; + rnd_cardinal_t num_etop = 0, num_ebottom = 0, num_esmd = 0, num_epads = 0, num_epins = 0, num_terms = 0, num_slots = 0; rnd_coord_t width, height; pcb_cam_t cam; @@ -269,7 +269,7 @@ fprintf(f, " li:netlist {\n"); for(nl = 0; nl < PCB_NUM_NETLISTS; nl++) { htsp_entry_t *e; - pcb_cardinal_t terms = 0, best_terms = 0; + rnd_cardinal_t terms = 0, best_terms = 0; fprintf(f, " ha:%s {\n", pcb_netlist_names[nl]); for(e = htsp_first(&PCB->netlist[nl]); e != NULL; e = htsp_next(&PCB->netlist[nl], e)) { @@ -289,7 +289,7 @@ PCB_SUBC_LOOP(PCB->Data) { int bott; - pcb_cardinal_t slot = 0, hole = 0, all = 0; + rnd_cardinal_t slot = 0, hole = 0, all = 0; pcb_any_obj_t *o; pcb_data_it_t it; htsi_t t; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30912) +++ trunk/src_plugins/export_xy/xy.c (revision 30913) @@ -171,7 +171,7 @@ rnd_coord_t pad_w, pad_h; rnd_coord_t prpad_cx, prpad_cy; rnd_coord_t prpad_w, prpad_h; - pcb_cardinal_t count; + rnd_cardinal_t count; rnd_coord_t ox, oy; int origin_score; char *origin_tmp; Index: trunk/src_plugins/exto_std/cord.c =================================================================== --- trunk/src_plugins/exto_std/cord.c (revision 30912) +++ trunk/src_plugins/exto_std/cord.c (revision 30913) @@ -244,7 +244,7 @@ pcb_trace("cord chg_attr\n"); } -static pcb_cardinal_t endpt_pstk_proto(pcb_data_t *data, pcb_layer_type_t lyt) +static rnd_cardinal_t endpt_pstk_proto(pcb_data_t *data, pcb_layer_type_t lyt) { pcb_pstk_proto_t proto; pcb_pstk_shape_t shape; @@ -273,7 +273,7 @@ return pcb_pstk_proto_insert_dup(data, &proto, 1, 0); } -static pcb_pstk_t *endpt_pstk(pcb_subc_t *subc, const char *ptidx, pcb_cardinal_t pid, rnd_coord_t x, rnd_coord_t y, rnd_coord_t ox, rnd_coord_t oy, const char *term, const char *grp, int floater) +static pcb_pstk_t *endpt_pstk(pcb_subc_t *subc, const char *ptidx, rnd_cardinal_t pid, rnd_coord_t x, rnd_coord_t y, rnd_coord_t ox, rnd_coord_t oy, const char *term, const char *grp, int floater) { pcb_pstk_t *ps; rnd_coord_t dx = ox-x, dy = oy-y, cpx = x+dx/4, cpy = y+dy/4, cpr = PCB_MM_TO_COORD(0.5); Index: trunk/src_plugins/exto_std/line_of_vias.c =================================================================== --- trunk/src_plugins/exto_std/line_of_vias.c (revision 30912) +++ trunk/src_plugins/exto_std/line_of_vias.c (revision 30913) @@ -76,7 +76,7 @@ #define line_geo_calc(line) \ do { \ - len = pcb_distance(line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); \ + len = rnd_distance(line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); \ dx = (double)(line->Point2.X - line->Point1.X) / len; \ dy = (double)(line->Point2.Y - line->Point1.Y) / len; \ } while(0) @@ -108,7 +108,7 @@ if ((pcb != NULL) && (pcb->Data->padstack_tree != NULL)) { for(cl = pcb_rtree_first(&it, pcb->Data->padstack_tree, &qbox); cl != NULL; cl = pcb_rtree_next(&it)) { - if (pcb_distance(rx, ry, cl->x, cl->y) < too_close) { + if (rnd_distance(rx, ry, cl->x, cl->y) < too_close) { skip = 1; break; } Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 30912) +++ trunk/src_plugins/io_autotrax/write.c (revision 30913) @@ -244,7 +244,7 @@ } /* writes generic autotrax track descriptor line for components and layouts */ -static int wrax_line(wctx_t *ctx, pcb_line_t *line, pcb_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) +static int wrax_line(wctx_t *ctx, pcb_line_t *line, rnd_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) { int user_routed = 1; pcb_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", line->Point1.X+dx, PCB->hidlib.size_y - (line->Point1.Y+dy), line->Point2.X+dx, PCB->hidlib.size_y - (line->Point2.Y+dy), line->Thickness, layer, user_routed); @@ -252,7 +252,7 @@ } /* writes autotrax track descriptor for a pair of polyline vertices */ -static int wrax_pline_segment(wctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t Thickness, pcb_cardinal_t layer) +static int wrax_pline_segment(wctx_t *ctx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t Thickness, rnd_cardinal_t layer) { int user_routed = 1; pcb_fprintf(ctx->f, "FT\r\n%.0ml %.0ml %.0ml %.0ml %.0ml %d %d\r\n", x1, PCB->hidlib.size_y - y1, x2, PCB->hidlib.size_y - y2, Thickness, layer, user_routed); @@ -261,7 +261,7 @@ typedef struct { wctx_t *wctx; - pcb_cardinal_t layer; + rnd_cardinal_t layer; rnd_coord_t dx, dy; rnd_coord_t thickness; } autotrax_hatch_ctx_t; @@ -277,7 +277,7 @@ } /* generates autotrax tracks to cross hatch a complex polygon being exported */ -static void autotrax_cpoly_hatch_lines(wctx_t *ctx, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t period, rnd_coord_t thickness, pcb_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) +static void autotrax_cpoly_hatch_lines(wctx_t *ctx, const pcb_poly_t *src, pcb_cpoly_hatchdir_t dir, rnd_coord_t period, rnd_coord_t thickness, rnd_cardinal_t layer, rnd_coord_t dx, rnd_coord_t dy) { autotrax_hatch_ctx_t hctx; @@ -373,11 +373,11 @@ } -static int wrax_lines(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) +static int wrax_lines(wctx_t *ctx, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { gdl_iterator_t it; pcb_line_t *line; - pcb_cardinal_t current_layer = number; + rnd_cardinal_t current_layer = number; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer) || (layer->name && *layer->name)) { @@ -397,11 +397,11 @@ } /* writes autotrax arcs for layouts */ -static int wrax_arcs(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) +static int wrax_arcs(wctx_t *ctx, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { gdl_iterator_t it; pcb_arc_t *arc; - pcb_cardinal_t current_layer = number; + rnd_cardinal_t current_layer = number; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer)) { /*|| (layer->name && *layer->name)) { */ @@ -421,7 +421,7 @@ } /* writes generic autotrax text descriptor line layouts onl, since no text in .fp */ -static int wrax_text(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) +static int wrax_text(wctx_t *ctx, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { pcb_font_t *myfont = pcb_font(PCB, 0, 1); rnd_coord_t mHeight = myfont->MaxHeight; /* autotrax needs the width of the widest letter */ @@ -433,7 +433,7 @@ gdl_iterator_t it; pcb_text_t *text; - pcb_cardinal_t current_layer = number; + rnd_cardinal_t current_layer = number; int index = 0; @@ -544,12 +544,12 @@ } /* writes polygon data in autotrax fill (rectangle) format for use in a layout .PCB file */ -static int wrax_polygons(wctx_t *ctx, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) +static int wrax_polygons(wctx_t *ctx, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t dx, rnd_coord_t dy, rnd_bool in_subc) { int i; gdl_iterator_t it; pcb_poly_t *polygon; - pcb_cardinal_t current_layer = number; + rnd_cardinal_t current_layer = number; pcb_poly_it_t poly_it; pcb_polyarea_t *pa; Index: trunk/src_plugins/io_bxl/read.c =================================================================== --- trunk/src_plugins/io_bxl/read.c (revision 30912) +++ trunk/src_plugins/io_bxl/read.c (revision 30913) @@ -257,7 +257,7 @@ void pcb_bxl_padstack_end(pcb_bxl_ctx_t *ctx) { - pcb_cardinal_t i; + rnd_cardinal_t i; ctx->state.proto.hdia = ctx->state.hole; ctx->state.proto.hplated = ctx->state.plated; Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30912) +++ trunk/src_plugins/io_dsn/read.c (revision 30913) @@ -57,7 +57,7 @@ htsp_t name2layer; htsp_t protos; /* padstack prototypes - allocated for the hash, copied on placement */ htsp_t subcs; /* subc images - allocated for the hash, copied on placement */ - pcb_cardinal_t testpoint; + rnd_cardinal_t testpoint; unsigned has_pcb_boundary:1; unsigned has_testpoint:1; } dsn_read_t; @@ -843,7 +843,7 @@ for(ncoord = pn->children->next; ncoord != NULL; ncoord = ncoord->next->next) { rnd_coord_t crd[2]; - pcb_cardinal_t pid; + rnd_cardinal_t pid; DSN_LOAD_COORDS_FMT(crd, ncoord, "XY", goto err_coord); pid = pcb_pstk_proto_insert_dup(subc->data, proto, 1, 0); @@ -862,7 +862,7 @@ const char *term, *psname = STRE(pn->children); pcb_pstk_proto_t *proto; pcb_pstk_t *ps; - pcb_cardinal_t pid; + rnd_cardinal_t pid; rnd_coord_t crd[2] = {0, 0}; double rotang = 0.0; @@ -1394,7 +1394,7 @@ { pcb_pstk_proto_t *proto; const char *pname; - pcb_cardinal_t pid; + rnd_cardinal_t pid; rnd_coord_t crd[2] = {0, 0}; if ((vnd->children == NULL) || (vnd->children->str == NULL)) { Index: trunk/src_plugins/io_eagle/eagle_bin.c =================================================================== --- trunk/src_plugins/io_eagle/eagle_bin.c (revision 30912) +++ trunk/src_plugins/io_eagle/eagle_bin.c (revision 30913) @@ -1477,7 +1477,7 @@ cy = c; cx = (long)((y3-cy)*(y2-y1)/(double)((x2-x1)) + x3); } - radius = (long)pcb_distance((double)cx, (double)cy, (double)x2, (double)y2); + radius = (long)rnd_distance((double)cx, (double)cy, (double)x2, (double)y2); sprintf(itoa_buffer, "%ld", radius); egb_node_prop_set(elem, "radius", itoa_buffer); sprintf(itoa_buffer, "%ld", cx); @@ -1612,7 +1612,7 @@ } else if (!(x1_ok && x2_ok && y1_ok && y2_ok)) { rnd_message(PCB_MSG_ERROR, "x1/2 or y1/2 not set in binary arc\n"); } - radius = (long)(pcb_distance((double)cx, (double)cy, (double)x2, (double)y2)); + radius = (long)(rnd_distance((double)cx, (double)cy, (double)x2, (double)y2)); sprintf(itoa_buffer, "%ld", radius); egb_node_prop_set(elem, "radius", itoa_buffer); Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30912) +++ trunk/src_plugins/io_eagle/read.c (revision 30913) @@ -1681,7 +1681,7 @@ linelist_foreach(&(ly)->Polygon, &itp, poly) { if (PCB_FLAG_TEST(PCB_FLAG_FOUND, poly)) continue; if (pcb_polyarea_touching(hole->Clipped, poly->Clipped)) { - pcb_cardinal_t n; + rnd_cardinal_t n; poly->clip_dirty = 1; /* add hole points to the permanent list */ pcb_poly_hole_new(poly); Index: trunk/src_plugins/io_hyp/write.c =================================================================== --- trunk/src_plugins/io_hyp/write.c (revision 30912) +++ trunk/src_plugins/io_hyp/write.c (revision 30913) @@ -47,7 +47,7 @@ const char *ln_top, *ln_bottom; /* "layer name" for top and bottom groups */ char *elem_name; size_t elem_name_len; - pcb_cardinal_t poly_id; + rnd_cardinal_t poly_id; htpi_t pstk_cache; htpp_t grp_names; long pstk_cache_next; @@ -476,7 +476,7 @@ { gdl_iterator_t it; pcb_subc_t *subc; - pcb_cardinal_t n, end; + rnd_cardinal_t n, end; /* print the protos */ end = pcb_vtpadstack_proto_len(&data->ps_protos); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30912) +++ trunk/src_plugins/io_kicad/read.c (revision 30913) @@ -1251,7 +1251,7 @@ pcb_angle_t start_angle; rnd_coord_t width, height; - width = height = pcb_distance(cx, cy, endx, endy); /* calculate radius of arc */ + width = height = rnd_distance(cx, cy, endx, endy); /* calculate radius of arc */ deltax = endx - cx; deltay = endy - cy; if (width < 1) { /* degenerate case */ @@ -1376,7 +1376,7 @@ if (blind_cnt == 2) { /* change the prototype of the padstack to be blind or buried */ const pcb_pstk_proto_t *orig_proto; pcb_pstk_proto_t *new_proto; - pcb_cardinal_t new_pid; + rnd_cardinal_t new_pid; int ot1, ot2, ob1, ob2, err; pcb_layergrp_id_t gtop = pcb_layergrp_get_top_copper(); pcb_layergrp_id_t gbot = pcb_layergrp_get_bottom_copper(); Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 30912) +++ trunk/src_plugins/io_kicad/write.c (revision 30913) @@ -706,7 +706,7 @@ kicad_print_pstks(ctx, data, ind, dx, dy); } -static int kicad_print_subc(wctx_t *ctx, pcb_subc_t *subc, pcb_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, unm_t *group1) +static int kicad_print_subc(wctx_t *ctx, pcb_subc_t *subc, rnd_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, unm_t *group1) { rnd_coord_t xPos, yPos, sox, soy; int on_bottom; @@ -804,7 +804,7 @@ } -static int kicad_print_subcs(wctx_t *ctx, pcb_data_t *Data, pcb_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, long subc_idx) +static int kicad_print_subcs(wctx_t *ctx, pcb_data_t *Data, rnd_cardinal_t ind, rnd_coord_t dx, rnd_coord_t dy, long subc_idx) { gdl_iterator_t sit; pcb_subc_t *subc; @@ -837,7 +837,7 @@ return 0; } -static int write_kicad_layout_via_drill_size(FILE *FP, pcb_cardinal_t indentation) +static int write_kicad_layout_via_drill_size(FILE *FP, rnd_cardinal_t indentation) { TODO(": do not hardwire the drill size here - does kicad support only one size, or what?") fprintf(FP, "%*s", indentation, ""); @@ -878,9 +878,9 @@ } -static int write_kicad_equipotential_netlists(FILE *FP, pcb_board_t *Layout, pcb_cardinal_t indentation) +static int write_kicad_equipotential_netlists(FILE *FP, pcb_board_t *Layout, rnd_cardinal_t indentation) { - pcb_cardinal_t netNumber = 0; + rnd_cardinal_t netNumber = 0; htsp_entry_t *e; /* first we write a default netlist for the 0 net, which is for unconnected pads in pcbnew */ Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 30912) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 30913) @@ -111,11 +111,11 @@ return 0; } -static int write_kicad_legacy_layout_tracks(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) +static int write_kicad_legacy_layout_tracks(FILE *FP, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t it; pcb_line_t *line; - pcb_cardinal_t currentLayer = number; + rnd_cardinal_t currentLayer = number; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer) || (layer->name && *layer->name)) { @@ -140,12 +140,12 @@ } } -static int write_kicad_legacy_layout_arcs(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) +static int write_kicad_legacy_layout_arcs(FILE *FP, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { gdl_iterator_t it; pcb_arc_t *arc; pcb_arc_t localArc; /* for converting ellipses to circular arcs */ - pcb_cardinal_t currentLayer = number; + rnd_cardinal_t currentLayer = number; rnd_coord_t radius, xStart, yStart, xEnd, yEnd; int copperStartX; /* used for mapping geda copper arcs onto kicad copper lines */ int copperStartY; /* used for mapping geda copper arcs onto kicad copper lines */ @@ -200,7 +200,7 @@ } } -static int write_kicad_legacy_layout_text(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) +static int write_kicad_legacy_layout_text(FILE *FP, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { pcb_font_t *myfont = pcb_font(PCB, 0, 1); rnd_coord_t mWidth = myfont->MaxWidth; /* kicad needs the width of the widest letter */ @@ -220,7 +220,7 @@ gdl_iterator_t it; pcb_text_t *text; - pcb_cardinal_t currentLayer = number; + rnd_cardinal_t currentLayer = number; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer) || (layer->name && *layer->name)) { @@ -318,7 +318,7 @@ static int write_kicad_legacy_equipotential_netlists(FILE *FP, pcb_board_t *Layout) { htsp_entry_t *e; - pcb_cardinal_t netNumber = 0; + rnd_cardinal_t netNumber = 0; /* first we write a default netlist for the 0 net, which is for unconnected pads in pcbnew */ fputs("$EQUIPOT\n", FP); @@ -619,12 +619,12 @@ return 0; } -static int write_kicad_legacy_layout_polygons(FILE *FP, pcb_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) +static int write_kicad_legacy_layout_polygons(FILE *FP, rnd_cardinal_t number, pcb_layer_t *layer, rnd_coord_t xOffset, rnd_coord_t yOffset) { int i, j; gdl_iterator_t it; pcb_poly_t *polygon; - pcb_cardinal_t currentLayer = number; + rnd_cardinal_t currentLayer = number; /* write information about non empty layers */ if (!pcb_layer_is_empty_(PCB, layer) || (layer->name && *layer->name)) { @@ -705,7 +705,7 @@ int io_kicad_legacy_write_pcb(pcb_plug_io_t *ctx, FILE *FP, const char *old_filename, const char *new_filename, rnd_bool emergency) { - pcb_cardinal_t i; + rnd_cardinal_t i; int kicadLayerCount = 0; int physicalLayerCount = 0; int layer = 0; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 30912) +++ trunk/src_plugins/io_lihata/read.c (revision 30913) @@ -710,7 +710,7 @@ { pcb_poly_t *poly; lht_node_t *geo; - pcb_cardinal_t n = 0, c; + rnd_cardinal_t n = 0, c; unsigned char intconn = 0; int err = 0; long int id; @@ -747,13 +747,13 @@ poly->Points = malloc(sizeof(pcb_point_t) * poly->PointMax); poly->HoleIndexMax = poly->HoleIndexN = c-1; if (poly->HoleIndexN > 0) - poly->HoleIndex = malloc(sizeof(pcb_cardinal_t) * poly->HoleIndexMax); + poly->HoleIndex = malloc(sizeof(rnd_cardinal_t) * poly->HoleIndexMax); else poly->HoleIndex = NULL; /* convert points and build hole index */ for(c = 0, cnt = lht_dom_first(&it, geo); cnt != NULL; c++, cnt = lht_dom_next(&it)) { - pcb_cardinal_t r; + rnd_cardinal_t r; if (cnt->type != LHT_TABLE) continue; if (c > 0) @@ -1630,7 +1630,7 @@ static int parse_data_pstk_shape_poly(pcb_board_t *pcb, pcb_pstk_shape_t *dst, lht_node_t *nshape, pcb_data_t *subc_parent) { lht_node_t *n; - pcb_cardinal_t i; + rnd_cardinal_t i; dst->shape = PCB_PSSH_POLY; dst->data.poly.x = NULL; /* if we return before the allocation... */ @@ -1796,7 +1796,7 @@ static int parse_data_pstk_protos(pcb_board_t *pcb, pcb_data_t *dst, lht_node_t *pp, pcb_data_t *subc_parent) { - pcb_cardinal_t pid, len; + rnd_cardinal_t pid, len; lht_node_t *pr; int res = 0; Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 30912) +++ trunk/src_plugins/io_lihata/write.c (revision 30913) @@ -493,7 +493,7 @@ { char buff[128]; lht_node_t *obj, *tbl, *geo; - pcb_cardinal_t n, hole = 0; + rnd_cardinal_t n, hole = 0; sprintf(buff, "polygon.%ld", poly->ID); obj = lht_dom_node_alloc(LHT_HASH, buff); @@ -715,7 +715,7 @@ static lht_node_t *build_pstk_protos(pcb_data_t *data, pcb_vtpadstack_proto_t *pp) { lht_node_t *lst, *nproto, *nmask, *nshape, *nshapelst, *ncomb, *nshapeo; - pcb_cardinal_t n, sn, pn; + rnd_cardinal_t n, sn, pn; pcb_pstk_tshape_t *ts; char tmp[64]; pcb_layer_type_t lyt_permit = PCB_LYT_ANYWHERE | PCB_LYT_COPPER | PCB_LYT_SILK | PCB_LYT_MASK | PCB_LYT_PASTE; Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30912) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30913) @@ -687,7 +687,7 @@ rnd_coord_t vx, vy; node_t *tmp; hkp_pstk_t *hps; - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_t *ps; tmp = find_nth(nv->first_child, "XY", 0); Index: trunk/src_plugins/io_mentor_cell/read_pstk.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30912) +++ trunk/src_plugins/io_mentor_cell/read_pstk.c (revision 30913) @@ -348,7 +348,7 @@ node_t *tmp; rnd_coord_t px, py; hkp_pstk_t *hpstk; - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_t *ps; double rot = 0; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30912) +++ trunk/src_plugins/io_pcb/file.c (revision 30913) @@ -90,7 +90,7 @@ static void WritePCBFontData(FILE *); static void WriteViaData(FILE *, pcb_data_t *); static void WritePCBRatData(FILE *); -static void WriteLayerData(FILE *, pcb_cardinal_t, pcb_layer_t *); +static void WriteLayerData(FILE *, rnd_cardinal_t, pcb_layer_t *); #define IGNORE_FLAGS (PCB_FLAG_FLOATER | PCB_FLAG_DRC_INTCONN | PCB_FLAG_CLEARPOLYPOLY | PCB_FLAG_DYNTEXT) @@ -321,7 +321,7 @@ /* writes font data of non empty symbols */ static void WritePCBFontData(FILE * FP) { - pcb_cardinal_t i, j; + rnd_cardinal_t i, j; pcb_line_t *line; pcb_font_t *font; @@ -597,7 +597,7 @@ return name; } -static void WriteLayerData(FILE * FP, pcb_cardinal_t Number, pcb_layer_t *layer) +static void WriteLayerData(FILE * FP, rnd_cardinal_t Number, pcb_layer_t *layer) { gdl_iterator_t it; pcb_line_t *line; @@ -633,7 +633,7 @@ } textlist_foreach(&layer->Polygon, &it, polygon) { int p, i = 0; - pcb_cardinal_t hole = 0; + rnd_cardinal_t hole = 0; fprintf(FP, "\tPolygon(%s)\n\t(", F2S(polygon, PCB_OBJ_POLY)); for (p = 0; p < polygon->PointN; p++) { pcb_point_t *point = &polygon->Points[p]; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 30912) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 30913) @@ -2428,7 +2428,7 @@ case 102: #line 771 "parse_y.y" /* yacc.c:1652 */ { - pcb_cardinal_t contour, contour_start, contour_end; + rnd_cardinal_t contour, contour_start, contour_end; rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 30912) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 30913) @@ -769,7 +769,7 @@ polygonpoints polygonholes ')' { - pcb_cardinal_t contour, contour_start, contour_end; + rnd_cardinal_t contour, contour_start, contour_end; rnd_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) Index: trunk/src_plugins/io_tedax/tnetlist.c =================================================================== --- trunk/src_plugins/io_tedax/tnetlist.c (revision 30912) +++ trunk/src_plugins/io_tedax/tnetlist.c (revision 30913) @@ -170,7 +170,7 @@ int tedax_net_fsave(pcb_board_t *pcb, const char *netlistid, FILE *f) { - pcb_cardinal_t n; + rnd_cardinal_t n; htsp_entry_t *e; pcb_netlist_t *nl = &pcb->netlist[PCB_NETLIST_EDITED]; Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 30912) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 30913) @@ -117,7 +117,7 @@ { pcb_pstk_proto_t proto; pcb_pstk_shape_t shape[5]; /* max number of shapes: 3 coppers, 2 masks */ - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_shape_t copper_master, mask_master; pcb_pstk_tshape_t tshp; int n; @@ -478,7 +478,7 @@ pcb_layer_type_t side; pcb_pstk_proto_t proto; pcb_pstk_shape_t shape[3]; /* max number of shapes: 1 copper, 1 mask, 1 paste */ - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_tshape_t tshp; int n; rnd_coord_t cx, cy; Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30912) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 30913) @@ -37,7 +37,7 @@ pcb_pstk_t *pcb_pstk_new_hole(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated) { pcb_pstk_proto_t proto; - pcb_cardinal_t pid; + rnd_cardinal_t pid; memset(&proto, 0, sizeof(proto)); proto.hdia = drill_dia; @@ -89,7 +89,7 @@ memset(&proto, 0, sizeof(proto)); if (pcb_pstk_proto_conv(data, &proto, quiet, &tmp, cx, cy) == 0) { - pcb_cardinal_t pid; + rnd_cardinal_t pid; if (plated != -1) proto.hplated = plated; pid = pcb_pstk_proto_insert_or_free(data, &proto, quiet, 0); @@ -286,7 +286,7 @@ pcb_pstk_t *pcb_pstk_new_from_shape(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_coord_t drill_dia, rnd_bool plated, rnd_coord_t glob_clearance, pcb_pstk_shape_t *shape) { pcb_pstk_proto_t proto; - pcb_cardinal_t pid; + rnd_cardinal_t pid; pcb_pstk_tshape_t tshp; pcb_pstk_shape_t *s; Index: trunk/src_plugins/lib_hid_pcbui/layersel.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30912) +++ trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30913) @@ -603,7 +603,7 @@ static void layersel_create_grp(layersel_ctx_t *ls, pcb_board_t *pcb, pcb_layergrp_t *g, ls_group_t *lgs, int is_open) { - pcb_cardinal_t n; + rnd_cardinal_t n; const char *gname = g->name == NULL ? "" : g->name; if (is_open) @@ -647,7 +647,7 @@ { pcb_layergrp_id_t gid; pcb_layergrp_t *g; - pcb_cardinal_t created = 0; + rnd_cardinal_t created = 0; for(gid = 0, g = pcb->LayerGroups.grp; gid < pcb->LayerGroups.len; gid++,g++) { ls_group_t *lgs; @@ -668,7 +668,7 @@ { pcb_layergrp_id_t gid; pcb_layergrp_t *g; - pcb_cardinal_t created = 0; + rnd_cardinal_t created = 0; for(gid = 0, g = pcb->LayerGroups.grp; gid < pcb->LayerGroups.len; gid++,g++) { ls_group_t *lgs; @@ -782,7 +782,7 @@ ls_layer_t **lys = (ls_layer_t **)ls->real_layer.array; ls_group_t **lgs = (ls_group_t **)ls->group.array; const pcb_menu_layers_t *ml; - pcb_cardinal_t n; + rnd_cardinal_t n; if (lys == NULL) return; Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30912) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30913) @@ -198,7 +198,7 @@ if (pcb_marked.status) { rnd_coord_t dx = pcb_crosshair.X - pcb_marked.X; rnd_coord_t dy = pcb_crosshair.Y - pcb_marked.Y; - rnd_coord_t r = pcb_distance(pcb_crosshair.X, pcb_crosshair.Y, pcb_marked.X, pcb_marked.Y); + rnd_coord_t r = rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, pcb_marked.X, pcb_marked.Y); double a = atan2(dy, dx) * PCB_RAD_TO_DEG; s1 = status.buf.array; Index: trunk/src_plugins/lib_hid_pcbui/util.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.c (revision 30912) +++ trunk/src_plugins/lib_hid_pcbui/util.c (revision 30913) @@ -30,11 +30,11 @@ #include "data_it.h" #include "flag.h" -static pcb_cardinal_t pcb_get_bbox_by_flag(rnd_box_t *dst, const pcb_data_t *data, pcb_flag_values_t flg) +static rnd_cardinal_t pcb_get_bbox_by_flag(rnd_box_t *dst, const pcb_data_t *data, pcb_flag_values_t flg) { pcb_any_obj_t *o; pcb_data_it_t it; - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; dst->X1 = dst->Y1 = PCB_MAX_COORD; dst->X2 = dst->Y2 = -PCB_MAX_COORD; @@ -48,12 +48,12 @@ return cnt; } -pcb_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data) +rnd_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data) { return pcb_get_bbox_by_flag(dst, data, PCB_FLAG_SELECTED); } -pcb_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data) +rnd_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data) { return pcb_get_bbox_by_flag(dst, data, PCB_FLAG_FOUND); } Index: trunk/src_plugins/lib_hid_pcbui/util.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/util.h (revision 30912) +++ trunk/src_plugins/lib_hid_pcbui/util.h (revision 30913) @@ -2,6 +2,6 @@ /* calculate the bounding box of all selections/founds in data, return the number of selected objects. When returns 0, the dst box is infinitely large. */ -pcb_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data); -pcb_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data); +rnd_cardinal_t pcb_get_selection_bbox(rnd_box_t *dst, const pcb_data_t *data); +rnd_cardinal_t pcb_get_found_bbox(rnd_box_t *dst, const pcb_data_t *data); Index: trunk/src_plugins/lib_netmap/netmap.h =================================================================== --- trunk/src_plugins/lib_netmap/netmap.h (revision 30912) +++ trunk/src_plugins/lib_netmap/netmap.h (revision 30913) @@ -44,7 +44,7 @@ typedef struct pcb_netmap_s { htpp_t o2n; /* of (pcb_lib_menu_t *); tells the net for an object */ htpp_t n2o; /* of (dyn_obj_t *); tells the object list for a net */ - pcb_cardinal_t anon_cnt; + rnd_cardinal_t anon_cnt; pcb_board_t *pcb; pcb_net_t *curr_net; dyn_net_t *dyn_nets; Index: trunk/src_plugins/lib_polyhelp/polyhelp.c =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30912) +++ trunk/src_plugins/lib_polyhelp/polyhelp.c (revision 30913) @@ -73,9 +73,9 @@ } #endif -pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) +rnd_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; vtp0_t tracks; long i; @@ -124,9 +124,9 @@ return pcb_pline_is_rectangle(p->Clipped->contours); } -pcb_cardinal_t pcb_cpoly_num_corners(const pcb_poly_t *src) +rnd_cardinal_t pcb_cpoly_num_corners(const pcb_poly_t *src) { - pcb_cardinal_t res = 0; + rnd_cardinal_t res = 0; pcb_poly_it_t it; pcb_polyarea_t *pa; @@ -202,7 +202,7 @@ pcb_poly_it_t it; pcb_polyarea_t *pa; pcb_cpoly_edgetree_t *res; - pcb_cardinal_t alloced = pcb_cpoly_num_corners(src) * sizeof(pcb_cpoly_edge_t); + rnd_cardinal_t alloced = pcb_cpoly_num_corners(src) * sizeof(pcb_cpoly_edge_t); res = malloc(sizeof(pcb_cpoly_edgetree_t) + alloced); Index: trunk/src_plugins/lib_polyhelp/polyhelp.h =================================================================== --- trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30912) +++ trunk/src_plugins/lib_polyhelp/polyhelp.h (revision 30913) @@ -32,7 +32,7 @@ /* Add lines on dst tracing pline from the inner side (no line will extend outside of the original pline, except when the original polygon has a hair narrower than thickness). Returns number of lines created */ -pcb_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); +rnd_cardinal_t pcb_pline_to_lines(pcb_layer_t *dst, const pcb_pline_t *src, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); /* Returns whether the clipped polygon is a simple rectangle (single island, no-hole rectangle). */ @@ -51,7 +51,7 @@ typedef struct { pcb_rtree_t *edge_tree; rnd_box_t bbox; - pcb_cardinal_t used, alloced; + rnd_cardinal_t used, alloced; pcb_cpoly_edge_t edges[1]; } pcb_cpoly_edgetree_t; Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30912) +++ trunk/src_plugins/millpath/toolpath.c (revision 30913) @@ -305,12 +305,12 @@ } } -static pcb_cardinal_t trace_contour(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, rnd_coord_t extra_offs) +static rnd_cardinal_t trace_contour(pcb_board_t *pcb, pcb_tlp_session_t *result, int tool_idx, rnd_coord_t extra_offs) { pcb_poly_it_t it; pcb_polyarea_t *pa; rnd_coord_t tool_dia = result->tools->dia[tool_idx]; - pcb_cardinal_t cnt = 0; + rnd_cardinal_t cnt = 0; for(pa = pcb_poly_island_first(result->fill, &it); pa != NULL; pa = pcb_poly_island_next(&it)) { pcb_pline_t *pl = pcb_poly_contour(&it); Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30912) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30913) @@ -77,7 +77,7 @@ static void dump_lib_dir(int level, pcb_fplibrary_t *l) { - pcb_cardinal_t n; + rnd_cardinal_t n; ind(level); printf("%s/\n", l->name); Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 30912) +++ trunk/src_plugins/polycombine/polycombine.c (revision 30913) @@ -35,7 +35,7 @@ { pcb_pline_t *contour = NULL; pcb_polyarea_t *np = NULL; - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_vector_t v; int hole = 0; Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 30912) +++ trunk/src_plugins/polystitch/polystitch.c (revision 30913) @@ -92,7 +92,7 @@ if (inner_poly) { outer_poly = find_enclosing_poly(inner_poly); if (outer_poly) { - pcb_cardinal_t n, end; + rnd_cardinal_t n, end; /* figure how many contour points the inner poly has (holes are going to be ignored) */ if (inner_poly->HoleIndexN > 0) Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 30912) +++ trunk/src_plugins/propedit/propsel.c (revision 30913) @@ -693,7 +693,7 @@ { const char *pn = st->name + 11; int i; - pcb_cardinal_t ca; + rnd_cardinal_t ca; pcb_pstk_proto_t *proto; if (st->is_attr) { Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 30912) +++ trunk/src_plugins/puller/puller.c (revision 30913) @@ -107,7 +107,7 @@ static int within(int x1, int y1, int x2, int y2, int r) { - return pcb_distance(x1, y1, x2, y2) <= r / 2; + return rnd_distance(x1, y1, x2, y2) <= r / 2; } static int arc_endpoint_is(pcb_arc_t *a, int angle, int x, int y) @@ -139,7 +139,7 @@ #if TRACE1 pcb_printf(" - arc endpoint %#mD\n", ax, ay); #endif - arc_dist = pcb_distance(ax, ay, x, y); + arc_dist = rnd_distance(ax, ay, x, y); if (arc_exact) return arc_dist < 2; return arc_dist < a->Thickness / 2; @@ -232,7 +232,7 @@ /* distance between a line and a point */ static double dist_lp(int x1, int y1, int x2, int y2, int px, int py) { - double den = pcb_distance(x1, y1, x2, y2); + double den = rnd_distance(x1, y1, x2, y2); double rv = (fabs(((double) x2 - x1) * ((double) y1 - py) - ((double) x1 - px) * ((double) y2 - y1)) / den); @@ -256,8 +256,8 @@ #if TRACE1 pcb_printf("line %#mD .. %#mD\n", l->Point1.X, l->Point1.Y, l->Point2.X, l->Point2.Y); #endif - d1 = pcb_distance(l->Point1.X, l->Point1.Y, x, y); - d2 = pcb_distance(l->Point2.X, l->Point2.Y, x, y); + d1 = rnd_distance(l->Point1.X, l->Point1.Y, x, y); + d2 = rnd_distance(l->Point2.X, l->Point2.Y, x, y); if ((d1 < 2 || d2 < 2) && !line_exact) { line_exact = 1; the_line = 0; @@ -403,7 +403,7 @@ arc_angle = the_arc->StartAngle + the_arc->Delta - 90; base_angle = r2d(atan2(ey - cy, cx - ex)); - tangent = r2d(acos(the_arc->Width / pcb_distance(cx, cy, ex, ey))); + tangent = r2d(acos(the_arc->Width / rnd_distance(cx, cy, ex, ey))); #if TRACE1 line_angle = r2d(atan2(ey - y, x - ex)); @@ -1135,7 +1135,7 @@ r = t + thickness; /* See if the point is inside our start arc. */ - d = pcb_distance(scx, scy, x, y); + d = rnd_distance(scx, scy, x, y); #if TRACE1 pcb_printf("%f = dist #mD to %#mD\n", d, scx, scy, x, y); pcb_printf("sr %#mS r %f d %f\n", sr, r, d); @@ -1233,9 +1233,9 @@ printf("%f * %f < %f * %f ?\n", a, se_sign, best_angle, se_sign); #endif if (a * se_sign == best_angle * se_sign) { - double old_d = pcb_distance(start_line->Point1.X, start_line->Point1.Y, + double old_d = rnd_distance(start_line->Point1.X, start_line->Point1.Y, fx, fy); - double new_d = pcb_distance(start_line->Point1.X, start_line->Point1.Y, + double new_d = rnd_distance(start_line->Point1.X, start_line->Point1.Y, x, y); if (new_d > old_d) { best_angle = a; @@ -1729,7 +1729,7 @@ abort(); } - end_dist = pcb_distance(end_line->Point1.X, end_line->Point1.Y, end_line->Point2.X, end_line->Point2.Y); + end_dist = rnd_distance(end_line->Point1.X, end_line->Point1.Y, end_line->Point2.X, end_line->Point2.Y); start_pinpad = start_extra->start.pin; end_pinpad = start_extra->end.pin; @@ -1845,7 +1845,7 @@ pcb_printf("obstacle at %#mD angle %d = arc starts at %#mD\n", fx, fy, (int) r2d(oa), (int) ox, (int) oy); #endif - if (pcb_distance(ox, oy, end_line->Point2.X, end_line->Point2.Y) + if (rnd_distance(ox, oy, end_line->Point2.X, end_line->Point2.Y) < fr * SIN1D) { /* Pretend it doesn't exist. */ fx = ex; Index: trunk/src_plugins/query/fnc.c =================================================================== --- trunk/src_plugins/query/fnc.c (revision 30912) +++ trunk/src_plugins/query/fnc.c (revision 30913) @@ -57,7 +57,7 @@ static int fnc_distance(pcb_qry_exec_t *ectx, int argc, pcb_qry_val_t *argv, pcb_qry_val_t *res) { if ((argc == 4) && (argv[0].type == PCBQ_VT_COORD) && (argv[1].type == PCBQ_VT_COORD) && (argv[2].type == PCBQ_VT_COORD) && (argv[3].type == PCBQ_VT_COORD)) - PCB_QRY_RET_DBL(res, pcb_distance(argv[0].data.crd, argv[1].data.crd, argv[2].data.crd, argv[3].data.crd)); + PCB_QRY_RET_DBL(res, rnd_distance(argv[0].data.crd, argv[1].data.crd, argv[2].data.crd, argv[3].data.crd)); PCB_QRY_RET_INV(res); } Index: trunk/src_plugins/query/query.c =================================================================== --- trunk/src_plugins/query/query.c (revision 30912) +++ trunk/src_plugins/query/query.c (revision 30913) @@ -325,7 +325,7 @@ if (it->vn != NULL) return; it->vects = calloc(sizeof(vtp0_t *), it->num_vars); - it->idx = calloc(sizeof(pcb_cardinal_t), it->num_vars); + it->idx = calloc(sizeof(rnd_cardinal_t), it->num_vars); it->lst = calloc(sizeof(pcb_qry_val_t), it->num_vars); it->vn = malloc(sizeof(char *) * it->num_vars); Index: trunk/src_plugins/query/query.h =================================================================== --- trunk/src_plugins/query/query.h (revision 30912) +++ trunk/src_plugins/query/query.h (revision 30913) @@ -158,7 +158,7 @@ /* iterator state for each variable - point into the correspoinding lst[] */ vtp0_t **vects; - pcb_cardinal_t *idx; + rnd_cardinal_t *idx; pcb_any_obj_t *last_obj; /* last object retrieved by the expression */ }; Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 30912) +++ trunk/src_plugins/query/query_act.c (revision 30913) @@ -103,7 +103,7 @@ } typedef struct { - pcb_cardinal_t cnt; + rnd_cardinal_t cnt; pcb_change_flag_t how; pcb_flag_values_t what; } flagop_t; Index: trunk/src_plugins/report/drill.c =================================================================== --- trunk/src_plugins/report/drill.c (revision 30912) +++ trunk/src_plugins/report/drill.c (revision 30913) @@ -41,7 +41,7 @@ static void drill_fill(pcb_drill_t * Drill, pcb_any_obj_t *hole, int unplated) { - pcb_cardinal_t n; + rnd_cardinal_t n; pcb_any_obj_t **pnew; pcb_any_obj_t **hnew; Index: trunk/src_plugins/report/drill.h =================================================================== --- trunk/src_plugins/report/drill.h (revision 30912) +++ trunk/src_plugins/report/drill.h (revision 30913) @@ -32,7 +32,7 @@ typedef struct { /* holds drill information */ rnd_coord_t DrillSize; /* this drill's diameter */ - pcb_cardinal_t ElementN, /* the number of elements using this drill size */ + rnd_cardinal_t ElementN, /* the number of elements using this drill size */ ElementMax, /* max number of elements from malloc() */ PinCount, /* number of pins drilled this size */ ViaCount, /* number of vias drilled this size */ @@ -44,7 +44,7 @@ } pcb_drill_t; typedef struct { /* holds a range of Drill Infos */ - pcb_cardinal_t DrillN, /* number of drill sizes */ + rnd_cardinal_t DrillN, /* number of drill sizes */ DrillMax; /* max number from malloc() */ pcb_drill_t *Drill; /* plated holes */ } pcb_drill_info_t; @@ -57,7 +57,7 @@ pcb_any_obj_t **drill_element_alloc(pcb_drill_t *); #define DRILL_LOOP(top) do { \ - pcb_cardinal_t n; \ + rnd_cardinal_t n; \ pcb_drill_t *drill; \ for (n = 0; (top)->DrillN > 0 && n < (top)->DrillN; n++) \ { \ Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 30912) +++ trunk/src_plugins/report/report.c (revision 30913) @@ -107,7 +107,7 @@ static int report_drills(fgw_arg_t *res, int argc, fgw_arg_t *argv) { pcb_drill_info_t *AllDrills; - pcb_cardinal_t n; + rnd_cardinal_t n; char *stringlist, *thestring; int total_drills = 0; @@ -449,7 +449,7 @@ pcb_board_t *pcb; double length; pcb_net_t *net; - pcb_cardinal_t terms, badterms, badobjs; + rnd_cardinal_t terms, badterms, badobjs; } net_length_t; static int net_length_cb(pcb_find_t *fctx, pcb_any_obj_t *o, pcb_any_obj_t *arrived_from, pcb_found_conn_type_t ctype) @@ -514,7 +514,7 @@ pcb_find_free(&fctx); if (nt.net != NULL) { - pcb_cardinal_t explen = pcb_termlist_length(&nt.net->conns); + rnd_cardinal_t explen = pcb_termlist_length(&nt.net->conns); if (explen != nt.terms) pcb_append_printf(err, "\nonly %ld terminals of the %ld on the network are connected!", (long)nt.terms, (long)explen); if (nt.badterms != 0) @@ -656,7 +656,7 @@ } #define MINDIST PCB_MIL_TO_COORD(40) - if ((pcb_distance(l->Point1.X, l->Point1.Y, x, y) < MINDIST) || (pcb_distance(l->Point2.X, l->Point2.Y, x, y) < MINDIST)) { + if ((rnd_distance(l->Point1.X, l->Point1.Y, x, y) < MINDIST) || (rnd_distance(l->Point2.X, l->Point2.Y, x, y) < MINDIST)) { rnd_message(PCB_MSG_ERROR, "Can not split near the endpoint of a line\n"); return -1; } Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30912) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30913) @@ -421,8 +421,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const rnd_coord_t t = Line->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; @@ -462,8 +462,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const rnd_coord_t t = Line->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; @@ -503,8 +503,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const rnd_coord_t t = Arc->Thickness / 2; const int comb = Layer->comb & PCB_LYC_SUB; struct rubber_info info; @@ -553,8 +553,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const int comb = Layer->comb & PCB_LYC_SUB; for(which = 0; which <= 1; ++which) { @@ -601,8 +601,8 @@ group = pcb_layer_get_group_(Layer); if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { @@ -666,8 +666,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { @@ -733,8 +733,8 @@ board = PCB; if (group >= 0) { - pcb_cardinal_t length = board->LayerGroups.grp[group].len; - pcb_cardinal_t entry; + rnd_cardinal_t length = board->LayerGroups.grp[group].len; + rnd_cardinal_t entry; const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { @@ -1133,7 +1133,7 @@ { rubber_ctx_t *rbnd = user_data; pcb_rb_line_t *ptr; - pcb_cardinal_t i; + rnd_cardinal_t i; int direct = argv[1].d.i; /* draw the attached rubberband lines too */ Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 30912) +++ trunk/src_plugins/teardrops/teardrops.c (revision 30913) @@ -69,7 +69,7 @@ x2 = l->Point2.X; y2 = l->Point2.Y; } - else if (pcb_distance(l->Point2.X, l->Point2.Y, px, py) < MAX_DISTANCE2) { + else if (rnd_distance(l->Point2.X, l->Point2.Y, px, py) < MAX_DISTANCE2) { x1 = l->Point2.X; y1 = l->Point2.Y; x2 = l->Point1.X; Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 30912) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 30913) @@ -48,7 +48,7 @@ } fake; static pcb_point_t InsertedPoint; -static pcb_cardinal_t polyIndex = 0; +static rnd_cardinal_t polyIndex = 0; void pcb_tool_insert_uninit(void) Index: trunk/src_plugins/tool_std/tool_poly.c =================================================================== --- trunk/src_plugins/tool_std/tool_poly.c (revision 30912) +++ trunk/src_plugins/tool_std/tool_poly.c (revision 30913) @@ -56,7 +56,7 @@ void pcb_tool_poly_notify_mode(rnd_hidlib_t *hl) { pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* do update of position */ if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_FIRST) { Index: trunk/src_plugins/tool_std/tool_polyhole.c =================================================================== --- trunk/src_plugins/tool_std/tool_polyhole.c (revision 30912) +++ trunk/src_plugins/tool_std/tool_polyhole.c (revision 30913) @@ -83,7 +83,7 @@ case PCB_CH_STATE_SECOND: { pcb_point_t *points = pcb_crosshair.AttachedPolygon.Points; - pcb_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; + rnd_cardinal_t n = pcb_crosshair.AttachedPolygon.PointN; /* do update of position */ if (pcb_crosshair.AttachedLine.State == PCB_CH_STATE_FIRST) { Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 30912) +++ trunk/src_plugins/vendordrill/vendor.c (revision 30913) @@ -280,7 +280,7 @@ return 0; } -static int apply_vendor_pstk1(pcb_pstk_t *pstk, pcb_cardinal_t *tot) +static int apply_vendor_pstk1(pcb_pstk_t *pstk, rnd_cardinal_t *tot) { pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pstk); rnd_coord_t target; @@ -304,11 +304,11 @@ return res; } -static pcb_cardinal_t apply_vendor_pstk(pcb_data_t *data, pcb_cardinal_t *tot) +static rnd_cardinal_t apply_vendor_pstk(pcb_data_t *data, rnd_cardinal_t *tot) { gdl_iterator_t it; pcb_pstk_t *pstk; - pcb_cardinal_t changed = 0; + rnd_cardinal_t changed = 0; padstacklist_foreach(&data->padstack, &it, pstk) if (apply_vendor_pstk1(pstk, tot)) @@ -319,7 +319,7 @@ static void apply_vendor_map(void) { int i; - pcb_cardinal_t changed = 0, tot = 0; + rnd_cardinal_t changed = 0, tot = 0; rnd_bool state; state = conf_vendor.plugins.vendor.enable; @@ -643,7 +643,7 @@ static void vendor_new_pstk(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]) { pcb_pstk_t *ps; - pcb_cardinal_t dummy; + rnd_cardinal_t dummy; if ((argc < 2) || (argv[1].type != PCB_EVARG_PTR)) return;