Index: trunk/src/box.h =================================================================== --- trunk/src/box.h (revision 13036) +++ trunk/src/box.h (revision 13037) @@ -115,27 +115,27 @@ /* note that boxes are closed on top and left and open on bottom and right. */ /* this means that top-left corner is in box, *but bottom-right corner is * not*. */ -static inline PCB_FUNC_UNUSED pcb_bool pcb_point_in_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE pcb_bool pcb_point_in_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X < box->X2) && (Y < box->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool pcb_point_in_closed_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE pcb_bool pcb_point_in_closed_box(const pcb_box_t * box, pcb_coord_t X, pcb_coord_t Y) { return (X >= box->X1) && (Y >= box->Y1) && (X <= box->X2) && (Y <= box->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool pcb_box_is_good(const pcb_box_t * b) +PCB_INLINE pcb_bool pcb_box_is_good(const pcb_box_t * b) { return (b->X1 < b->X2) && (b->Y1 < b->Y2); } -static inline PCB_FUNC_UNUSED pcb_bool pcb_box_intersect(const pcb_box_t * a, const pcb_box_t * b) +PCB_INLINE pcb_bool pcb_box_intersect(const pcb_box_t * a, const pcb_box_t * b) { return (a->X1 < b->X2) && (b->X1 < a->X2) && (a->Y1 < b->Y2) && (b->Y1 < a->Y2); } -static inline PCB_FUNC_UNUSED pcb_cheap_point_t pcb_closest_pcb_point_in_box(const pcb_cheap_point_t * from, const pcb_box_t * box) +PCB_INLINE pcb_cheap_point_t pcb_closest_pcb_point_in_box(const pcb_cheap_point_t * from, const pcb_box_t * box) { pcb_cheap_point_t r; assert(box->X1 < box->X2 && box->Y1 < box->Y2); @@ -145,12 +145,12 @@ return r; } -static inline PCB_FUNC_UNUSED pcb_bool pcb_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) +PCB_INLINE pcb_bool pcb_box_in_box(const pcb_box_t * outer, const pcb_box_t * inner) { return (outer->X1 <= inner->X1) && (inner->X2 <= outer->X2) && (outer->Y1 <= inner->Y1) && (inner->Y2 <= outer->Y2); } -static inline PCB_FUNC_UNUSED pcb_box_t pcb_clip_box(const pcb_box_t * box, const pcb_box_t * clipbox) +PCB_INLINE pcb_box_t pcb_clip_box(const pcb_box_t * box, const pcb_box_t * clipbox) { pcb_box_t r; assert(pcb_box_intersect(box, clipbox)); @@ -162,7 +162,7 @@ return r; } -static inline PCB_FUNC_UNUSED pcb_box_t pcb_shrink_box(const pcb_box_t * box, pcb_coord_t amount) +PCB_INLINE pcb_box_t pcb_shrink_box(const pcb_box_t * box, pcb_coord_t amount) { pcb_box_t r = *box; r.X1 += amount; @@ -172,13 +172,13 @@ return r; } -static inline PCB_FUNC_UNUSED pcb_box_t pcb_bloat_box(const pcb_box_t * box, pcb_coord_t amount) +PCB_INLINE pcb_box_t pcb_bloat_box(const pcb_box_t * box, pcb_coord_t amount) { return pcb_shrink_box(box, -amount); } /* construct a minimum box that touches the input box at the center */ -static inline PCB_FUNC_UNUSED pcb_box_t pcb_box_center(const pcb_box_t * box) +PCB_INLINE pcb_box_t pcb_box_center(const pcb_box_t * box) { pcb_box_t r; r.X1 = box->X1 + (box->X2 - box->X1) / 2; @@ -189,7 +189,7 @@ } /* construct a minimum box that touches the input box at the corner */ -static inline PCB_FUNC_UNUSED pcb_box_t pcb_box_corner(const pcb_box_t * box) +PCB_INLINE pcb_box_t pcb_box_corner(const pcb_box_t * box) { pcb_box_t r; r.X1 = box->X1; @@ -200,7 +200,7 @@ } /* construct a box that holds a single point */ -static inline PCB_FUNC_UNUSED pcb_box_t pcb_point_box(pcb_coord_t X, pcb_coord_t Y) +PCB_INLINE pcb_box_t pcb_point_box(pcb_coord_t X, pcb_coord_t Y) { pcb_box_t r; r.X1 = X; @@ -211,7 +211,7 @@ } /* close a bounding box by pushing its upper right corner */ -static inline PCB_FUNC_UNUSED void pcb_close_box(pcb_box_t * r) +PCB_INLINE void pcb_close_box(pcb_box_t * r) { r->X2++; r->Y2++; @@ -220,7 +220,7 @@ /* return the square of the minimum distance from a point to some point * inside a box. The box is half-closed! That is, the top-left corner * is considered in the box, but the bottom-right corner is not. */ -static inline PCB_FUNC_UNUSED double pcb_dist2_to_box(const pcb_cheap_point_t * p, const pcb_box_t * b) +PCB_INLINE double pcb_dist2_to_box(const pcb_cheap_point_t * p, const pcb_box_t * b) { pcb_cheap_point_t r = pcb_closest_pcb_point_in_box(p, b); return pcb_distance(r.X, r.Y, p->X, p->Y); @@ -228,7 +228,7 @@ /* Modify dst to include src */ -static inline PCB_FUNC_UNUSED void pcb_box_bump_box(pcb_box_t *dst, pcb_box_t *src) +PCB_INLINE void pcb_box_bump_box(pcb_box_t *dst, pcb_box_t *src) { if (src->X1 < dst->X1) dst->X1 = src->X1; if (src->Y1 < dst->Y1) dst->Y1 = src->Y1; @@ -237,7 +237,7 @@ } /* Modify dst to include src */ -static inline PCB_FUNC_UNUSED void pcb_box_bump_point(pcb_box_t *dst, pcb_coord_t x, pcb_coord_t y) +PCB_INLINE void pcb_box_bump_point(pcb_box_t *dst, pcb_coord_t x, pcb_coord_t y) { if (x < dst->X1) dst->X1 = x; if (y < dst->Y1) dst->Y1 = y; Index: trunk/src/draw_wireframe.h =================================================================== --- trunk/src/draw_wireframe.h (revision 13036) +++ trunk/src/draw_wireframe.h (revision 13037) @@ -32,7 +32,7 @@ /*----------------------------------------------------------- * Draws the outline of an arc */ -static inline PCB_FUNC_UNUSED void pcb_draw_wireframe_arc(pcb_hid_gc_t gc, pcb_arc_t *arc) +PCB_INLINE void pcb_draw_wireframe_arc(pcb_hid_gc_t gc, pcb_arc_t *arc) { pcb_coord_t wid = arc->Thickness / 2; pcb_coord_t x1, y1, x2, y2; @@ -51,7 +51,7 @@ /*----------------------------------------------------------- * Draws the outline of a line */ -static inline PCB_FUNC_UNUSED void pcb_draw_wireframe_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick, int square) +PCB_INLINE void pcb_draw_wireframe_line(pcb_hid_gc_t gc, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick, int square) { if((x1 != x2) || (y1 != y2)) { double dx = x2 - x1; Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 13036) +++ trunk/src/find_geo.c (revision 13037) @@ -776,7 +776,7 @@ /* returns whether a round-cap pcb line touches a polygon; assumes bounding boxes do touch */ -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_intersect_line_polyline(pcb_pline_t *pl, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick) +PCB_INLINE pcb_bool_t pcb_intersect_line_polyline(pcb_pline_t *pl, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t thick) { pcb_coord_t ox, oy; double dx, dy, h; @@ -825,7 +825,7 @@ pcb_line.Flags = shape_line.square ? pcb_flag_make(PCB_FLAG_SQUARE) : pcb_no_flags(); \ } while(0) -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_pstk_intersect_line(pcb_pstk_t *ps, pcb_line_t *line) +PCB_INLINE pcb_bool_t pcb_pstk_intersect_line(pcb_pstk_t *ps, pcb_line_t *line) { pcb_pstk_shape_t *shape = pcb_pstk_shape_at(PCB, ps, line->parent.layer); if (shape == NULL) return pcb_false; @@ -855,7 +855,7 @@ } -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_pstk_intersect_arc(pcb_pstk_t *ps, pcb_arc_t *arc) +PCB_INLINE pcb_bool_t pcb_pstk_intersect_arc(pcb_pstk_t *ps, pcb_arc_t *arc) { pcb_pstk_shape_t *shape = pcb_pstk_shape_at(PCB, ps, arc->parent.layer); if (shape == NULL) return pcb_false; @@ -892,7 +892,7 @@ return pcb_false; } -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_pstk_intersect_poly(pcb_pstk_t *ps, pcb_poly_t *poly) +PCB_INLINE pcb_bool_t pcb_pstk_intersect_poly(pcb_pstk_t *ps, pcb_poly_t *poly) { pcb_pstk_shape_t *shape = pcb_pstk_shape_at(PCB, ps, poly->parent.layer); if (shape == NULL) return pcb_false; @@ -942,7 +942,7 @@ } -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_pstk_intersect_rat(pcb_pstk_t *ps, pcb_rat_t *rat) +PCB_INLINE pcb_bool_t pcb_pstk_intersect_rat(pcb_pstk_t *ps, pcb_rat_t *rat) { return ((rat->Point1.X == ps->x) && (rat->Point1.Y == ps->y)) || ((rat->Point2.X == ps->x) && (rat->Point2.Y == ps->y)); } Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 13036) +++ trunk/src/layer.h (revision 13037) @@ -273,7 +273,7 @@ /* Return the real layer, resolving layer bindings. Returns NULL on error (e.g. binding loop) */ -static inline PCB_FUNC_UNUSED pcb_layer_t *pcb_layer_get_real(pcb_layer_t *layer) +PCB_INLINE pcb_layer_t *pcb_layer_get_real(pcb_layer_t *layer) { int rec = 0; Index: trunk/src/layer_it.h =================================================================== --- trunk/src/layer_it.h (revision 13036) +++ trunk/src/layer_it.h (revision 13037) @@ -34,11 +34,11 @@ typedef struct pcb_layer_it_s pcb_layer_it_t; /* Start an iteration matching exact flags or any of the flags; returns -1 if over */ -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask); -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask); +PCB_INLINE pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask); +PCB_INLINE pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask); /* next iteration; returns -1 if over */ -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it); +PCB_INLINE pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it); /*************** inline implementation *************************/ @@ -51,7 +51,7 @@ unsigned int global:1; }; -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it) +PCB_INLINE pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it) { if (it->global) { /* over all layers, random order, without any checks - go the cheap way, bypassing groups */ @@ -86,7 +86,7 @@ } } -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask) +PCB_INLINE pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask) { it->stack = stack; it->mask = exact_mask; @@ -97,7 +97,7 @@ return pcb_layer_next(it); } -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask) +PCB_INLINE pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask) { it->stack = stack; it->mask = any_mask; @@ -108,7 +108,7 @@ return pcb_layer_next(it); } -static inline PCB_FUNC_UNUSED pcb_layer_id_t pcb_layer_first_all(pcb_layer_stack_t *stack, pcb_layer_it_t *it) +PCB_INLINE pcb_layer_id_t pcb_layer_first_all(pcb_layer_stack_t *stack, pcb_layer_it_t *it) { it->stack = stack; it->lidx = 0; Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 13036) +++ trunk/src/obj_common.h (revision 13037) @@ -155,7 +155,7 @@ /*** Functions and macros used for hashing ***/ /* compare two strings and return 0 if they are equal. NULL == NULL means equal. */ -static inline PCB_FUNC_UNUSED int pcb_neqs(const char *s1, const char *s2) +PCB_INLINE int pcb_neqs(const char *s1, const char *s2) { if ((s1 == NULL) && (s2 == NULL)) return 0; if ((s1 == NULL) || (s2 == NULL)) return 1; @@ -162,7 +162,7 @@ return strcmp(s1, s2) != 0; } -static inline PCB_FUNC_UNUSED unsigned pcb_hash_coord(pcb_coord_t c) +PCB_INLINE unsigned pcb_hash_coord(pcb_coord_t c) { return murmurhash(&(c), sizeof(pcb_coord_t)); } Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 13036) +++ trunk/src/obj_poly.h (revision 13037) @@ -104,7 +104,7 @@ } pcb_poly_it_t; /* Set the iterator to the first island of the polygon; returns NULL if no contour available */ -static inline PCB_FUNC_UNUSED pcb_polyarea_t *pcb_poly_island_first(const pcb_poly_t *p, pcb_poly_it_t *it) +PCB_INLINE pcb_polyarea_t *pcb_poly_island_first(const pcb_poly_t *p, pcb_poly_it_t *it) { it->p = p; it->pa = p->Clipped; @@ -114,7 +114,7 @@ } /* Set the iterator to the next island of the polygon; returns NULL if no more */ -static inline PCB_FUNC_UNUSED pcb_polyarea_t *pcb_poly_island_next(pcb_poly_it_t *it) +PCB_INLINE pcb_polyarea_t *pcb_poly_island_next(pcb_poly_it_t *it) { if (it->pa->f == it->p->Clipped) return NULL; @@ -125,7 +125,7 @@ } /* Set the iterator to trace the outer contour of the current island */ -static inline PCB_FUNC_UNUSED pcb_pline_t *pcb_poly_contour(pcb_poly_it_t *it) +PCB_INLINE pcb_pline_t *pcb_poly_contour(pcb_poly_it_t *it) { it->v = NULL; return it->cntr = it->pa->contours; @@ -132,7 +132,7 @@ } /* Set the iterator to trace the first hole of the current island; returns NULL if there are no holes */ -static inline PCB_FUNC_UNUSED pcb_pline_t *pcb_poly_hole_first(pcb_poly_it_t *it) +PCB_INLINE pcb_pline_t *pcb_poly_hole_first(pcb_poly_it_t *it) { it->v = NULL; return it->cntr = it->pa->contours->next; @@ -139,7 +139,7 @@ } /* Set the iterator to trace the next hole of the current island; returns NULL if there are were more holes */ -static inline PCB_FUNC_UNUSED pcb_pline_t *pcb_poly_hole_next(pcb_poly_it_t *it) +PCB_INLINE pcb_pline_t *pcb_poly_hole_next(pcb_poly_it_t *it) { it->v = NULL; return it->cntr = it->cntr->next; @@ -147,7 +147,7 @@ /* Set the iterator to the first point of the last selected contour or hole; read the coords into x,y; returns 1 on success, 0 if there are no points */ -static inline PCB_FUNC_UNUSED int pcb_poly_vect_first(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE int pcb_poly_vect_first(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) { it->v = it->cntr->head.next; if (it->v == NULL) @@ -160,7 +160,7 @@ /* Set the iterator to the next point of the last selected contour or hole; read the coords into x,y; returns 1 on success, 0 if there are were more points */ -static inline PCB_FUNC_UNUSED int pcb_poly_vect_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE int pcb_poly_vect_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) { it->v = it->v->next; if (it->v == it->cntr->head.next) @@ -171,7 +171,7 @@ } /* read the previous contour/hole coords into x,y, without bumping the iterator */ -static inline PCB_FUNC_UNUSED void pcb_poly_vect_peek_prev(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE void pcb_poly_vect_peek_prev(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) { *x = it->v->prev->point[0]; *y = it->v->prev->point[1]; @@ -178,7 +178,7 @@ } /* read the next contour/hole coords into x,y, without bumping the iterator */ -static inline PCB_FUNC_UNUSED void pcb_poly_vect_peek_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) +PCB_INLINE void pcb_poly_vect_peek_next(pcb_poly_it_t *it, pcb_coord_t *x, pcb_coord_t *y) { *x = it->v->next->point[0]; *y = it->v->next->point[1]; @@ -185,7 +185,7 @@ } /* Set the iterator to a polyarea*/ -static inline PCB_FUNC_UNUSED pcb_polyarea_t *pcb_poly_iterate_polyarea(pcb_polyarea_t *pa, pcb_poly_it_t *it) +PCB_INLINE pcb_polyarea_t *pcb_poly_iterate_polyarea(pcb_polyarea_t *pa, pcb_poly_it_t *it) { it->p = NULL; it->pa = pa; Index: trunk/src/obj_pstk_inlines.h =================================================================== --- trunk/src/obj_pstk_inlines.h (revision 13036) +++ trunk/src/obj_pstk_inlines.h (revision 13037) @@ -38,7 +38,7 @@ } pcb_bb_type_t; /* Returns the ID of a proto within its parent's cache */ -static inline PCB_FUNC_UNUSED pcb_cardinal_t pcb_pstk_get_proto_id(pcb_pstk_proto_t *proto) +PCB_INLINE pcb_cardinal_t pcb_pstk_get_proto_id(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)) @@ -48,7 +48,7 @@ } /* return the padstack prototype for a padstack reference - returns NULL if not found */ -static inline PCB_FUNC_UNUSED 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, pcb_cardinal_t proto) { if (proto >= data->ps_protos.used) return NULL; @@ -58,7 +58,7 @@ } /* return the padstack prototype for a padstack reference - returns NULL if not found */ -static inline PCB_FUNC_UNUSED pcb_pstk_proto_t *pcb_pstk_get_proto(pcb_pstk_t *ps) +PCB_INLINE pcb_pstk_proto_t *pcb_pstk_get_proto(pcb_pstk_t *ps) { return pcb_pstk_get_proto_(ps->parent.data, ps->proto); } @@ -65,7 +65,7 @@ /* return the padstack transformed shape. Returns NULL if the proto or the tshape is not. */ -static inline PCB_FUNC_UNUSED 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, pcb_cardinal_t proto, int protoi) { pcb_pstk_proto_t *pr = pcb_pstk_get_proto_(data, proto); if (protoi < 0) @@ -78,7 +78,7 @@ } /* return the padstack prototype for a padstack reference - returns NULL if not found */ -static inline PCB_FUNC_UNUSED pcb_pstk_tshape_t *pcb_pstk_get_tshape(pcb_pstk_t *ps) +PCB_INLINE pcb_pstk_tshape_t *pcb_pstk_get_tshape(pcb_pstk_t *ps) { if (ps->protoi < 0) { /* need to update this */ pcb_pstk_proto_t *pr = pcb_pstk_get_proto_(ps->parent.data, ps->proto); @@ -91,7 +91,7 @@ /* return the type of drill and optionally fill in group IDs of drill ends ; if proto_out is not NULL, also load it with the proto */ -static inline PCB_FUNC_UNUSED pcb_bb_type_t pcb_pstk_bbspan(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t *top, pcb_layergrp_id_t *bottom, pcb_pstk_proto_t **proto_out) +PCB_INLINE pcb_bb_type_t pcb_pstk_bbspan(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t *top, pcb_layergrp_id_t *bottom, pcb_pstk_proto_t **proto_out) { pcb_bb_type_t res; int topi, boti; @@ -164,7 +164,7 @@ /* return whether a given padstack drills a given group (does not consider plating, only drill!) */ -static inline PCB_FUNC_UNUSED pcb_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) +PCB_INLINE pcb_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) { pcb_layergrp_id_t top, bot; pcb_bb_type_t res = pcb_pstk_bbspan(pcb, ps, &top, &bot, proto_out); @@ -179,7 +179,7 @@ /* returns the shape the padstack has on the given layer group; WARNING: does not respect the NOSHAPE thermal, should NOT be called directly; use pcb_pstk_shape_*() instead. */ -static inline PCB_FUNC_UNUSED pcb_pstk_shape_t *pcb_pstk_shape(pcb_pstk_t *ps, pcb_layer_type_t lyt, pcb_layer_combining_t comb) +PCB_INLINE pcb_pstk_shape_t *pcb_pstk_shape(pcb_pstk_t *ps, pcb_layer_type_t lyt, pcb_layer_combining_t comb) { int n; pcb_pstk_tshape_t *ts = pcb_pstk_get_tshape(ps); @@ -194,7 +194,7 @@ return 0; } -static inline PCB_FUNC_UNUSED pcb_pstk_shape_t *pcb_pstk_shape_at(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer) +PCB_INLINE pcb_pstk_shape_t *pcb_pstk_shape_at(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_t *layer) { unsigned int lyt = pcb_layer_flags_(layer); pcb_layer_combining_t comb = layer->comb; @@ -227,7 +227,7 @@ return pcb_pstk_shape(ps, lyt, comb); } -static inline PCB_FUNC_UNUSED pcb_pstk_shape_t *pcb_pstk_shape_gid(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t gid, pcb_layer_combining_t comb, pcb_layergrp_t **grp_out) +PCB_INLINE pcb_pstk_shape_t *pcb_pstk_shape_gid(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t gid, pcb_layer_combining_t comb, pcb_layergrp_t **grp_out) { pcb_layergrp_t *grp = pcb_get_layergrp(pcb, gid); Index: trunk/src/obj_subc_parent.h =================================================================== --- trunk/src/obj_subc_parent.h (revision 13036) +++ trunk/src/obj_subc_parent.h (revision 13037) @@ -28,7 +28,7 @@ #include "layer.h" /* Returns the subc a global (on-data) object is part of (or NULL if not part of any subc) */ -static inline PCB_FUNC_UNUSED pcb_subc_t *pcb_gobj_parent_subc(pcb_parenttype_t pt, pcb_parent_t *p) +PCB_INLINE pcb_subc_t *pcb_gobj_parent_subc(pcb_parenttype_t pt, pcb_parent_t *p) { if (pt != PCB_PARENT_DATA) return NULL; @@ -42,7 +42,7 @@ } /* Returns the subc a layer object is part of (or NULL if not part of any subc) */ -static inline PCB_FUNC_UNUSED pcb_subc_t *pcb_lobj_parent_subc(pcb_parenttype_t pt, pcb_parent_t *p) +PCB_INLINE pcb_subc_t *pcb_lobj_parent_subc(pcb_parenttype_t pt, pcb_parent_t *p) { if (pt != PCB_PARENT_LAYER) return NULL; @@ -59,7 +59,7 @@ } /* Returns the subc an object is part of (or NULL if not part of any subc) */ -static inline PCB_FUNC_UNUSED pcb_subc_t *pcb_obj_parent_subc(pcb_any_obj_t *obj) +PCB_INLINE pcb_subc_t *pcb_obj_parent_subc(pcb_any_obj_t *obj) { switch(obj->type) { case PCB_OBJ_VIA: Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 13036) +++ trunk/src/rotate.h (revision 13037) @@ -58,7 +58,7 @@ void pcb_screen_obj_rotate90(pcb_coord_t, pcb_coord_t, unsigned); void pcb_point_rotate90(pcb_point_t *Point, pcb_coord_t X, pcb_coord_t Y, unsigned Number); -static inline PCB_FUNC_UNUSED void pcb_rotate(pcb_coord_t * x, pcb_coord_t * y, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina) +PCB_INLINE void pcb_rotate(pcb_coord_t * x, pcb_coord_t * y, pcb_coord_t cx, pcb_coord_t cy, double cosa, double sina) { double nx, ny; pcb_coord_t px = *x - cx; Index: trunk/src_plugins/export_gcode/auxiliary.h =================================================================== --- trunk/src_plugins/export_gcode/auxiliary.h (revision 13036) +++ trunk/src_plugins/export_gcode/auxiliary.h (revision 13037) @@ -24,7 +24,7 @@ typedef potrace_dpoint_t dpoint_t; /* convert point_t to dpoint_t */ -static inline PCB_FUNC_UNUSED dpoint_t dpoint(point_t p) +PCB_INLINE dpoint_t dpoint(point_t p) { dpoint_t res; res.x = p.x; @@ -33,7 +33,7 @@ } /* range over the straight line segment [a,b] when lambda ranges over [0,1] */ -static inline PCB_FUNC_UNUSED dpoint_t interval(double lambda, dpoint_t a, dpoint_t b) +PCB_INLINE dpoint_t interval(double lambda, dpoint_t a, dpoint_t b) { dpoint_t res; @@ -53,12 +53,12 @@ /* integer arithmetic */ -static inline PCB_FUNC_UNUSED int mod(int a, int n) +PCB_INLINE int mod(int a, int n) { return a >= n ? a % n : a >= 0 ? a : n - 1 - (-1 - a) % n; } -static inline PCB_FUNC_UNUSED int floordiv(int a, int n) +PCB_INLINE int floordiv(int a, int n) { return a >= 0 ? a / n : -1 - (-1 - a) / n; } Index: trunk/src_plugins/export_gcode/bitmap.h =================================================================== --- trunk/src_plugins/export_gcode/bitmap.h (revision 13036) +++ trunk/src_plugins/export_gcode/bitmap.h (revision 13037) @@ -46,7 +46,7 @@ #define BM_PUT(bm, x, y, b) (bm_safe(bm, x, y) ? BM_UPUT(bm, x, y, b) : 0) /* free the given bitmap. Leaves errno untouched. */ -static inline PCB_FUNC_UNUSED void bm_free(potrace_bitmap_t * bm) +PCB_INLINE void bm_free(potrace_bitmap_t * bm) { if (bm) { free(bm->map); @@ -55,7 +55,7 @@ } /* return new un-initialized bitmap. NULL with errno on error */ -static inline PCB_FUNC_UNUSED potrace_bitmap_t *bm_new(int w, int h) +PCB_INLINE potrace_bitmap_t *bm_new(int w, int h) { potrace_bitmap_t *bm; int dy = (w + BM_WORDBITS - 1) / BM_WORDBITS; @@ -76,13 +76,13 @@ } /* clear the given bitmap. Set all bits to c. */ -static inline PCB_FUNC_UNUSED void bm_clear(potrace_bitmap_t * bm, int c) +PCB_INLINE void bm_clear(potrace_bitmap_t * bm, int c) { memset(bm->map, c ? -1 : 0, bm->dy * bm->h * BM_WORDSIZE); } /* duplicate the given bitmap. Return NULL on error with errno set. */ -static inline PCB_FUNC_UNUSED potrace_bitmap_t *bm_dup(const potrace_bitmap_t * bm) +PCB_INLINE potrace_bitmap_t *bm_dup(const potrace_bitmap_t * bm) { potrace_bitmap_t *bm1 = bm_new(bm->w, bm->h); if (!bm1) { @@ -93,7 +93,7 @@ } /* invert the given bitmap. */ -static inline PCB_FUNC_UNUSED void bm_invert(potrace_bitmap_t * bm) +PCB_INLINE void bm_invert(potrace_bitmap_t * bm) { int i; for (i = 0; i < bm->dy * bm->h; i++) { Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 13036) +++ trunk/src_plugins/io_lihata/read.c (revision 13037) @@ -1803,6 +1803,7 @@ lht_doc_t *doc = NULL; pcb_fp_fopen_ctx_t st; FILE *f; + pcb_subc_t *sc; f = pcb_fp_fopen(pcb_fp_default_search_path(), name, &st); @@ -1830,7 +1831,9 @@ return -1; } - res = parse_subc(NULL, Ptr, doc->root->data.list.first, NULL); + res = parse_subc(NULL, Ptr, doc->root->data.list.first, &sc); + if (res == 0) + pcb_data_clip_polys(sc->data); lht_dom_uninit(doc); return res; Index: trunk/src_plugins/mincut/pcb-mincut/graph.h =================================================================== --- trunk/src_plugins/mincut/pcb-mincut/graph.h (revision 13036) +++ trunk/src_plugins/mincut/pcb-mincut/graph.h (revision 13037) @@ -38,7 +38,7 @@ void gr_free(gr_t *g); -static inline PCB_FUNC_UNUSED void gr_bound_chk(gr_t *g, int n1, int n2) +PCB_INLINE void gr_bound_chk(gr_t *g, int n1, int n2) { assert((n1 >= 0) && (n1 < g->n)); assert((n2 >= 0) && (n2 < g->n)); @@ -45,13 +45,13 @@ } /* return number of edges between nodes n1 and n2 - without checks */ -static inline PCB_FUNC_UNUSED int gr_get_(gr_t *g, int n1, int n2) +PCB_INLINE int gr_get_(gr_t *g, int n1, int n2) { return g->adj[n1 * g->n + n2]; } /* return number of edges between nodes n1 and n2 - with checks */ -static inline PCB_FUNC_UNUSED int gr_get(gr_t *g, int n1, int n2) +PCB_INLINE int gr_get(gr_t *g, int n1, int n2) { gr_bound_chk(g, n1, n2); return gr_get_(g, n1, n2); @@ -58,7 +58,7 @@ } /* return old number of edges between nodes n1 and n2 and change it to newnum - no check*/ -static inline PCB_FUNC_UNUSED int gr_set_(gr_t *g, int n1, int n2, int newnum) +PCB_INLINE int gr_set_(gr_t *g, int n1, int n2, int newnum) { int old; old = g->adj[n1 * g->n + n2]; @@ -68,7 +68,7 @@ } /* return old number of edges between nodes n1 and n2 and increase it by newnum - no check*/ -static inline PCB_FUNC_UNUSED int gr_add_(gr_t *g, int n1, int n2, int newnum) +PCB_INLINE int gr_add_(gr_t *g, int n1, int n2, int newnum) { int old; old = g->adj[n1 * g->n + n2]; @@ -78,7 +78,7 @@ } /* return old number of edges between nodes n1 and n2 and change it to newnum - check*/ -static inline PCB_FUNC_UNUSED int gr_set(gr_t *g, int n1, int n2, int newnum) +PCB_INLINE int gr_set(gr_t *g, int n1, int n2, int newnum) { gr_bound_chk(g, n1, n2); return gr_set_(g, n1, n2, newnum);