Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 21409) +++ trunk/src/board.c (revision 21410) @@ -181,7 +181,7 @@ int nunplated; } HoleCountStruct; -#warning padstack TODO: move this to obj_pstk.c after pinvia removal +TODO("padstack: move this to obj_pstk.c after pinvia removal") #include "obj_pstk_inlines.h" static pcb_r_dir_t hole_counting_callback(const pcb_box_t * b, void *cl) { Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 21409) +++ trunk/src/buffer.c (revision 21410) @@ -539,7 +539,7 @@ /* swap layer groups when balanced */ sgroup = pcb_layer_get_group(pcb, SLayer); cgroup = pcb_layer_get_group(pcb, CLayer); -#warning layer TODO: revise this code for the generic physical layer support; move this code to layer*.c +TODO("layer: revise this code for the generic physical layer support; move this code to layer*.c") if (pcb->LayerGroups.grp[cgroup].len == pcb->LayerGroups.grp[sgroup].len) { for (j = k = 0; j < pcb->LayerGroups.grp[sgroup].len; j++) { pcb_layer_id_t cnumber = pcb->LayerGroups.grp[cgroup].lid[k]; @@ -676,7 +676,7 @@ /* set up a dummy board to work around that pcb_pstkop_copy() requires a pcb_board_t instead of a pcb_data_t */ -#warning subc TODO: fix this after the element removal +TODO("subc: fix this after the element removal") if (pcb->is_footprint) { pcb_subc_t *sc = pcb_subclist_first(&pcb->Data->subc); if (sc != NULL) { Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 21409) +++ trunk/src/change.c (revision 21410) @@ -477,7 +477,7 @@ return change; } -#warning subc TODO: check if it is true: +TODO("subc: check if it is true:") /* --------------------------------------------------------------------------- * changes the size of the passed object; subc size is silk size (TODO: check if it is true) * Returns pcb_true if anything is changed @@ -500,7 +500,7 @@ return change; } -#warning subc TODO: check if it is true: +TODO("subc: check if it is true:") /* --------------------------------------------------------------------------- * changes the size of the passed object; element size is pin ring sizes * Returns pcb_true if anything is changed Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 21409) +++ trunk/src/change_act.c (revision 21410) @@ -444,7 +444,7 @@ for(o = pcb_data_first(&it, subc->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) { if ((o->term != NULL) && (PCB_NSTRCMP(pinnum, o->term) == 0)) { -#warning TODO: make this undoable +TODO(": make this undoable") pcb_attribute_put(&o->Attributes, "name", pinname); pcb_board_set_changed_flag(pcb_true); changed++; Index: trunk/src/conf.c =================================================================== --- trunk/src/conf.c (revision 21409) +++ trunk/src/conf.c (revision 21410) @@ -820,7 +820,7 @@ pcb_hid_cfg_error(n, "Attempt to initialize a scalar with a list - this node should be a text node\n"); break; case LHT_SYMLINK: -#warning TODO +TODO("TODO") break; case LHT_INVALID_TYPE: case LHT_TABLE: @@ -1802,7 +1802,7 @@ } if (f != NULL) { -#warning CONF TODO: a project file needs to be loaded, merged, then written (to preserve non-config nodes) +TODO("CONF: a project file needs to be loaded, merged, then written (to preserve non-config nodes)") lht_dom_export(r->doc->root, f, ""); fail = 0; conf_lht_dirty[role] = 0; Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 21409) +++ trunk/src/draw.c (revision 21410) @@ -98,7 +98,7 @@ } -#warning cleanup TODO: this should be cached +TODO("cleanup: this should be cached") void pcb_lighten_color(const char *orig, char buf[8], double factor) { unsigned int r, g, b; Index: trunk/src/find_any_isect.c =================================================================== --- trunk/src/find_any_isect.c (revision 21409) +++ trunk/src/find_any_isect.c (revision 21410) @@ -28,7 +28,7 @@ */ -#warning TODO: implement text intersections +TODO(": implement text intersections") pcb_bool pcb_intersect_text_line(pcb_text_t *a, pcb_line_t *b) { return pcb_false; } pcb_bool pcb_intersect_text_text(pcb_text_t *a, pcb_text_t *b) { return pcb_false; } pcb_bool pcb_intersect_text_poly(pcb_text_t *a, pcb_poly_t *b) { return pcb_false; } Index: trunk/src/find_clear.c =================================================================== --- trunk/src/find_clear.c (revision 21409) +++ trunk/src/find_clear.c (revision 21410) @@ -29,7 +29,7 @@ */ /* Resets all used flags of pins and vias. */ -#warning TODO: this file could be removed if ipcd356 used the operation API +TODO(": this file could be removed if ipcd356 used the operation API") pcb_bool pcb_clear_flag_on_pins_vias_pads(pcb_bool AndDraw, int flag) { pcb_bool change = pcb_false; Index: trunk/src/find_drc.c =================================================================== --- trunk/src/find_drc.c (revision 21409) +++ trunk/src/find_drc.c (revision 21410) @@ -357,7 +357,7 @@ { pcb_view_t *violation; -#warning DRC TODO: need to check text and polygons too! +TODO("DRC: need to check text and polygons too!") TheFlag = PCB_FLAG_SELECTED; PCB_LINE_SILK_LOOP(PCB->Data); { Index: trunk/src/find_intconn.c =================================================================== --- trunk/src/find_intconn.c (revision 21409) +++ trunk/src/find_intconn.c (revision 21410) @@ -69,7 +69,7 @@ } PCB_ENDALL_LOOP; -#warning subc TODO +TODO("subc TODO") #if 0 no find through text yet PCB_TEXT_COPPER_LOOP(s->data); Index: trunk/src/hid_cfg_input.c =================================================================== --- trunk/src/hid_cfg_input.c (revision 21409) +++ trunk/src/hid_cfg_input.c (revision 21410) @@ -199,7 +199,7 @@ int pcb_hid_cfg_keys_uninit(pcb_hid_cfg_keys_t *km) { -#warning TODO: recursive free of nodes +TODO(": recursive free of nodes") htpp_uninit(&km->keys); return 0; } @@ -373,7 +373,7 @@ s = pcb_hid_cfg_keys_add_under(km, lasts, mods[n], key_raws[n], key_trs[n], terminal, &errmsg); if (s == NULL) { pcb_message(PCB_MSG_ERROR, "Failed to add hotkey binding: %s: %s\n", keydesc, errmsg); -#warning TODO: free stuff? +TODO(": free stuff?") return -1; } if (terminal) Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 21409) +++ trunk/src/layer.c (revision 21410) @@ -705,7 +705,7 @@ pcb_layergrp_t *g; int grp_idx, remaining; -#warning layer TODO remove objects, free fields layer_free(&pcb->Data->Layer[old_index]); +TODO("layer TODO remove objects, free fields layer_free(&pcb->Data->Layer[old_index]);") /* remove the current lid from its group */ g = pcb_get_layergrp(pcb, pcb->Data->Layer[old_index].meta.real.grp); @@ -1075,7 +1075,7 @@ if (xform != NULL) *xform = NULL; -#warning layer TODO: need to pass the flags of the group, not the flags of the layer once we have a group for each layer +TODO("layer: need to pass the flags of the group, not the flags of the layer once we have a group for each layer") if (pcb_gui->set_layer_group != NULL) { pcb_layergrp_id_t grp; pcb_layer_id_t lid = v->new_id; Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 21409) +++ trunk/src/obj_arc.c (revision 21410) @@ -230,7 +230,7 @@ for(o = pcb_rtree_first(&it, Layer->arc_tree, (pcb_rtree_box_t *)&b); o != NULL; o = pcb_rtree_next(&it)) { pcb_arc_t *arc = (pcb_arc_t *)o; -#warning TODO: this does not catch all cases; there are more ways two arcs can be the same because of the angles +TODO(": this does not catch all cases; there are more ways two arcs can be the same because of the angles") if (arc->X == X1 && arc->Y == Y1 && arc->Width == width && pcb_normalize_angle(arc->StartAngle) == pcb_normalize_angle(sa) && arc->Delta == dir) return NULL; /* prevent stacked arcs */ } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 21409) +++ trunk/src/obj_line.c (revision 21410) @@ -55,7 +55,7 @@ #include "obj_rat_draw.h" #include "obj_pstk_draw.h" -#warning padstack TODO: remove this when via is removed and the padstack is created from style directly +TODO("padstack: remove this when via is removed and the padstack is created from style directly") #include "src_plugins/lib_compat_help/pstk_compat.h" @@ -246,7 +246,7 @@ Line->Clearance = Clearance; Line->Point1.X = X1; Line->Point1.Y = Y1; -#warning ID TODO: register points too +TODO("ID: register points too") Line->Point1.ID = pcb_create_ID_get(); Line->Point2.X = X2; Line->Point2.Y = Y2; @@ -343,7 +343,7 @@ { pcb_coord_t dx = line->Point1.X - line->Point2.X; pcb_coord_t dy = line->Point1.Y - line->Point2.Y; -#warning TODO: use the distance func instead +TODO(": use the distance func instead") return pcb_round(sqrt((double)dx*(double)dx + (double)dy*(double)dy)); } @@ -680,7 +680,7 @@ struct via_info *i = (struct via_info *) cl; pcb_pstk_t *ps; -#warning pdstk TODO #21: do not work in comp mode, use a pstk proto - scconfig also has TODO #21, fix it there too +TODO("pdstk TODO #21: do not work in comp mode, use a pstk proto - scconfig also has TODO #21, fix it there too") if ((ps = pcb_pstk_new_compat_via(PCB->Data, -1, i->X, i->Y, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance, 0, PCB_PSTK_COMPAT_ROUND, pcb_true)) != NULL) { pcb_undo_add_obj_to_create(PCB_OBJ_PSTK, ps, ps, ps); pcb_pstk_invalidate_draw(ps); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 21409) +++ trunk/src/obj_poly.c (revision 21410) @@ -408,7 +408,7 @@ /* copy values */ point->X = X; point->Y = Y; -#warning ID TODO: register points too +TODO("ID: register points too") point->ID = pcb_create_ID_get(); return point; } @@ -1172,7 +1172,7 @@ x = (n->prev->point[0] + n->point[0] + n->next->point[0]) / 3; y = (n->prev->point[1] + n->point[1] + n->next->point[1]) / 3; -#warning subc TODO: check if x;y is within the poly, but use a cheaper method than the official +TODO("subc: check if x;y is within the poly, but use a cheaper method than the official") r = PCB_DRAW_TERM_GFX_WIDTH; pcb_hid_set_line_width(pcb_draw_out.fgGC, r); pcb_hid_set_line_cap(pcb_draw_out.fgGC, pcb_cap_square); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 21409) +++ trunk/src/obj_pstk.c (revision 21410) @@ -221,7 +221,7 @@ /* hash */ int pcb_pstk_eq(const pcb_host_trans_t *tr1, const pcb_pstk_t *p1, const pcb_host_trans_t *tr2, const pcb_pstk_t *p2) { -#warning padstack TODO: should compare shape by shape: a 180 deg rotated or mirrored rectangle is still just the same rectangle! +TODO("padstack: should compare shape by shape: a 180 deg rotated or mirrored rectangle is still just the same rectangle!") if (pcb_field_neq(p1, p2, smirror) || pcb_field_neq(p1, p2, xmirror)) return 0; if (pcb_field_neq(p1, p2, rot)) return 0; @@ -1123,7 +1123,7 @@ } } -#warning slot TODO: check if slot breaks other shapes +TODO("slot: check if slot breaks other shapes") if ((proto->hdia > 0) && (proto->hdia < conf_core.design.min_drill)) *err_minhole = proto->hdia; Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 21409) +++ trunk/src/obj_pstk_proto.c (revision 21410) @@ -950,7 +950,7 @@ pcb_coord_t cx, cy; int n; -#warning padstack TODO: undo +TODO("padstack: undo") switch(shp->shape) { case PCB_PSSH_LINE: @@ -975,7 +975,7 @@ pcb_pstk_poly_center(&shp->data.poly, &cx, &cy); pcb_polyarea_free(&shp->data.poly.pa); if (is_absolute) { -#warning TODO +TODO("TODO") } else { pcb_polo_t *p, p_st[32]; @@ -1010,7 +1010,7 @@ pcb_coord_t cx, cy; int n; -#warning padstack TODO: undo +TODO("padstack: undo") switch(shp->shape) { case PCB_PSSH_LINE: @@ -1046,7 +1046,7 @@ void pcb_pstk_shape_clr_grow(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val) { -#warning padstack TODO: undo +TODO("padstack: undo") if (is_absolute) shp->clearance = val; else Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 21409) +++ trunk/src/obj_subc.c (revision 21410) @@ -623,7 +623,7 @@ arclist_foreach(&ly->Arc, &it, arc) { if(arc->Width != arc->Height) { -#warning TODO: The wireframe arc drawing code cannot draw ellipses yet so draw the elliptical arc with a thin line +TODO(": The wireframe arc drawing code cannot draw ellipses yet so draw the elliptical arc with a thin line ") double sa = mirr ? PCB_SWAP_ANGLE(arc->StartAngle) : arc->StartAngle; double da = mirr ? PCB_SWAP_DELTA(arc->Delta) : arc->Delta; pcb_gui->draw_arc(pcb_crosshair.GC, DX + PCB_CSWAP_X(arc->X, w, mirr), DY + PCB_CSWAP_Y(arc->Y, h, mirr), arc->Width, arc->Height, sa, da); @@ -1018,7 +1018,7 @@ /* move-to-the-other-side is not undoable: it's part of the placement */ pcb_undo_inc_serial(); last = pcb_undo_serial(); -#warning subc TODO: should not depend on crosshair, because of automatic/scripted placement; test case 1: load subc footprint in buffer, swap side to bottom, place; test case 2: bug_files/cmd_element, execute the cmd while being on the bottom side, without crosshair set subcircuits catapult to negative y +TODO("subc: should not depend on crosshair, because of automatic/scripted placement; test case 1: load subc footprint in buffer, swap side to bottom, place; test case 2: bug_files/cmd_element, execute the cmd while being on the bottom side, without crosshair set subcircuits catapult to negative y") pcb_subc_change_side(sc, 2 * pcb_crosshair.Y - PCB->MaxHeight); pcb_undo_truncate_from(last); @@ -1388,7 +1388,7 @@ if (pcb->Data->padstack_tree == NULL) pcb->Data->padstack_tree = pcb_r_create_tree(); subc->data->padstack_tree = pcb->Data->padstack_tree; -#warning subc TODO: subc-in-subc: bind subc rtree +TODO("subc: subc-in-subc: bind subc rtree") } void *pcb_subcop_change_size(pcb_opctx_t *ctx, pcb_subc_t *sc) @@ -1417,7 +1417,7 @@ void *pcb_subcop_change_nonetlist(pcb_opctx_t *ctx, pcb_subc_t *sc) { -#warning subc TODO: add undo +TODO("subc: add undo") if (PCB_FLAG_TEST(PCB_FLAG_LOCK, sc)) return NULL; PCB_FLAG_TOGGLE(PCB_FLAG_NONETLIST, sc); @@ -1473,7 +1473,7 @@ pcb_subc_flags = pcb_obj_valid_flags(PCB_OBJ_SUBC); if (ctx->chgflag.flag == PCB_FLAG_FLOATER) { -#warning subc TODO: subc-in-subc: can a whole subc be a floater? - add undo! +TODO("subc: subc-in-subc: can a whole subc be a floater? - add undo!") PCB_FLAG_CHANGE(ctx->chgflag.how, ctx->chgflag.flag, sc); return sc; } @@ -1729,7 +1729,7 @@ pcb_subc_t *pcb_subc_by_refdes(pcb_data_t *base, const char *name) { -#warning subc TODO: hierarchy +TODO("subc: hierarchy") PCB_SUBC_LOOP(base); { if ((subc->refdes != NULL) && (PCB_NSTRCMP(subc->refdes, name) == 0)) @@ -1748,7 +1748,7 @@ the subc is being rotated. The solution will be the ID hash. */ -#warning subc TODO: hierarchy +TODO("subc: hierarchy") PCB_SUBC_LOOP(base); { if (subc->ID == ID) Index: trunk/src/obj_term.c =================================================================== --- trunk/src/obj_term.c (revision 21409) +++ trunk/src/obj_term.c (revision 21410) @@ -172,7 +172,7 @@ char str[1]; /* must be the last item, spans longer than 1 */ } term_rename_t; -#warning TODO: get rid of the two parallel type systems +TODO(": get rid of the two parallel type systems") extern unsigned long pcb_obj_type2oldtype(pcb_objtype_t type); static int undo_term_rename_swap(void *udata) Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 21409) +++ trunk/src/polygon.c (revision 21410) @@ -362,7 +362,7 @@ pcb_poly_square_pin_factors(style, xm, ym); -#warning TODO: rewrite this to use the same table as the square/oct pin draw function +TODO(": rewrite this to use the same table as the square/oct pin draw function") /* point 7 */ v[0] = x + ROUND(radius * 0.5) * xm[7]; v[1] = y + ROUND(radius * PCB_TAN_22_5_DEGREE_2) * ym[7]; @@ -1790,7 +1790,7 @@ if (!PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, (pcb_line_t *) ptr2)) return 0; /* non-copper (e.g. silk, outline) doesn't plow */ -#warning TODO: use pcb_layer_flags_ here - but what PCB? +TODO(": use pcb_layer_flags_ here - but what PCB?") if (!(pcb_layer_flags(PCB, pcb_layer_id(Data, (pcb_layer_t *) ptr1) & PCB_LYT_COPPER))) return 0; doit:; @@ -1885,7 +1885,7 @@ return pcb_poly_isects_poly(s, p, pcb_true); } -#warning TODO: this should be in polygon1.c +TODO(": this should be in polygon1.c") /* NB: This function will free the passed pcb_polyarea_t. * It must only be passed a single pcb_polyarea_t (pa->f == pa->b == pa) */ Index: trunk/src/polygon1.c =================================================================== --- trunk/src/polygon1.c (revision 21409) +++ trunk/src/polygon1.c (revision 21410) @@ -2920,7 +2920,7 @@ return PA_CHK_ERROR(res, "icnt > 1 (%d) at %mm;%mm or %mm;%mm", icnt, a1->point[0], a1->point[1], a2->point[0], a2->point[1]); } -#warning TODO: ugly workaround: test where exactly the intersection happens and tune the endpoint of the line +TODO(": ugly workaround: test where exactly the intersection happens and tune the endpoint of the line") /* EPSILON^2 for endpoint matching; the bool algebra code is not perfect and causes tiny self intersections at the end of sharp spikes. Accept at most 10 nanometer of such intersection */ Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 21409) +++ trunk/src/rats.c (revision 21410) @@ -128,7 +128,7 @@ pcb_obj_center(obj, &conn->X, &conn->Y); if (obj->type == PCB_OBJ_PSTK) conn->group = rat_padstack_side((pcb_pstk_t *)obj); -#warning subc TODO: heavy terminals: calculate side +TODO("subc: heavy terminals: calculate side") return pcb_true; } @@ -176,13 +176,13 @@ return ""; } -#warning padstack TODO: remove this bloat +TODO("padstack: remove this bloat") static const char *get_termid(pcb_any_obj_t *obj) { return obj->term; } -#warning padstack TODO: consider using some data.h call instead of this local implementation +TODO("padstack: consider using some data.h call instead of this local implementation") static void clear_drc_flag(int clear_ratconn) { pcb_rtree_it_t it; @@ -463,7 +463,7 @@ } } PCB_ENDALL_LOOP; -#warning term TODO: and what about arcs and text? +TODO("term: and what about arcs and text?") /* add polygons so the auto-router can see them as targets */ PCB_POLY_COPPER_LOOP(data); { Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 21409) +++ trunk/src/search.c (revision 21410) @@ -1037,7 +1037,7 @@ double ang, dx, dy; pcb_coord_t ax, ay, d; -#warning TODO: elliptical arc: rewrite this, as it does not work properly on extreme cases +TODO(": elliptical arc: rewrite this, as it does not work properly on extreme cases") dy = (double)(Y - Arc->Y) / (double)Arc->Height; dx = (double)(X - Arc->X) / (double)Arc->Width; ang = -atan2(dy, dx); @@ -1428,7 +1428,7 @@ PCB_END_LOOP; } -#warning subc TODO: once elements are gone, rewrite these to search the rtree instead of recursion +TODO("subc: once elements are gone, rewrite these to search the rtree instead of recursion") PCB_SUBC_LOOP(Base); { int res; Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 21409) +++ trunk/src/select.c (revision 21410) @@ -193,7 +193,7 @@ * returns a list of object IDs matched the search and loads len with the * length of the list. Returns NULL on no match. */ -#warning cleanup TODO: should be rewritten with generic ops and rtree +TODO("cleanup: should be rewritten with generic ops and rtree") static long int *ListBlock_(pcb_board_t *pcb, pcb_box_t *Box, pcb_bool Flag, int *len) { int changed = 0; Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 21409) +++ trunk/src/thermal.c (revision 21410) @@ -157,7 +157,7 @@ if ((line->Point1.X == line->Point2.X) && (line->Point1.Y == line->Point2.Y)) { /* conrer case zero-long line is a circle: do the same as for vias */ -#warning thermal TODO +TODO("thermal TODO") abort(); } Index: trunk/src/tool.c =================================================================== --- trunk/src/tool.c (revision 21409) +++ trunk/src/tool.c (revision 21410) @@ -347,7 +347,7 @@ return pcb_false; } -#warning tool TODO: move this out to a tool plugin +TODO("tool: move this out to a tool plugin") #include "tool_arc.h" #include "tool_arrow.h" Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 21409) +++ trunk/src/undo_old.c (revision 21410) @@ -993,7 +993,7 @@ if (subc != NULL) r->p_subc_id = subc->ID; break; -#warning subc TODO: floater subc in subc should remember its subc parent too +TODO("subc: floater subc in subc should remember its subc parent too") default: break; } Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 21409) +++ trunk/src/undo_old_str.h (revision 21410) @@ -1,4 +1,4 @@ -#warning cleanup TODO: move this back to undo_old.c +TODO("cleanup: move this back to undo_old.c") typedef struct { /* information about a change command */ char *Name; Index: trunk/src/vtonpoint.c =================================================================== --- trunk/src/vtonpoint.c (revision 21409) +++ trunk/src/vtonpoint.c (revision 21410) @@ -1,6 +1,8 @@ #define GVT_DONT_UNDEF -#warning cleanup TODO: this should be replaced with pcb_obj_t +#include "config.h" +TODO("cleanup: this should be replaced with pcb_obj_t") + #include "vtonpoint.h" #include Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 21409) +++ trunk/src_plugins/autoplace/autoplace.c (revision 21410) @@ -130,7 +130,7 @@ pcb_any_obj_t *other; /* for exchange */ } PerturbationType; -#warning cleanup TODO: remove this and use genvect +TODO("cleanup: remove this and use genvect") #define STEP_POINT 100 /* get next slot for a box, allocates memory if necessary */ @@ -406,7 +406,7 @@ int onbtm = 0; pcb_subc_get_side(subc, &onbtm); -#warning subc TODO: this ignores the possibility of other-side pads; need to do this on a per object basis +TODO("subc: this ignores the possibility of other-side pads; need to do this on a per object basis") if (onbtm) { thisside = &solderside; otherside = &componentside; @@ -423,7 +423,7 @@ if (o->term == NULL) continue; /* we are interested in terminals only */ -#warning subc TODO: look up clearance +TODO("subc: look up clearance") clearance = 0; EXPANDRECTXY(box, o->BoundingBox.X1 - clearance, o->BoundingBox.Y1 - clearance, @@ -470,7 +470,7 @@ vtp0_t seboxes, ceboxes; struct ebox { pcb_box_t box; -#warning subc TODO: when elements are removed, turn this into pcb_subc_t * and remove the fields below +TODO("subc: when elements are removed, turn this into pcb_subc_t * and remove the fields below") pcb_any_obj_t *comp; const char *refdes; int rot90; Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 21409) +++ trunk/src_plugins/autoroute/autoroute.c (revision 21410) @@ -91,7 +91,7 @@ #include "obj_pstk_draw.h" #include "obj_pstk_inlines.h" -#warning padstack TODO: when style contains proto, remove this +TODO("padstack: when style contains proto, remove this") #include "src_plugins/lib_compat_help/pstk_compat.h" #define autoroute_therm_style 4 @@ -626,7 +626,7 @@ /*Y2 */ term->BoundingBox.Y2 - clr, style->Clearance); /* kludge for non-manhattan pads (which are not allowed at present) */ -#warning term TODO: +TODO("term:") /* if (pad->Point1.X != pad->Point2.X && pad->Point1.Y != pad->Point2.Y) (*rbpp)->flags.nonstraight = 1; @@ -2880,7 +2880,7 @@ pcb_pstk_t *live_via = NULL; if (conf_core.editor.live_routing) { -#warning padstack TODO: when style contains proto, remove this +TODO("padstack: when style contains proto, remove this") live_via = pcb_pstk_new_compat_via(PCB->Data, -1, X, Y, AutoRouteParameters.style->Hole, radius * 2, 2 * AutoRouteParameters.style->Clearance, 0, PCB_PSTK_COMPAT_ROUND, 1); if (live_via != NULL) pcb_pstk_invalidate_draw(live_via); @@ -4512,7 +4512,7 @@ if (pp->parent.via == NULL) { assert(labs((b.X1 + radius) - (b.X2 - radius)) < 2); assert(labs((b.Y1 + radius) - (b.Y2 - radius)) < 2); -#warning padstack TODO: when style contains proto, remove this +TODO("padstack: when style contains proto, remove this") pp->parent.via = pcb_pstk_new_compat_via(PCB->Data, -1, b.X1 + radius, b.Y1 + radius, pp->style->Hole, pp->style->Diameter, 2 * pp->style->Clearance, 0, PCB_PSTK_COMPAT_ROUND, 1); Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 21409) +++ trunk/src_plugins/boardflip/boardflip.c (revision 21410) @@ -141,7 +141,7 @@ { pcb_flip_data(subc->data, flip_x, flip_y, xo, yo, et_swap_sides); if (et_swap_sides) { -#warning subc TODO: layer mirror, also test one-sided padstack +TODO("subc: layer mirror, also test one-sided padstack") } } PCB_END_LOOP; Index: trunk/src_plugins/diag/integrity.c =================================================================== --- trunk/src_plugins/diag/integrity.c (revision 21409) +++ trunk/src_plugins/diag/integrity.c (revision 21410) @@ -294,7 +294,7 @@ if (id_chk_cnt != 0) pcb_message(PCB_MSG_ERROR, CHK "id hash contains %ld excess IDs in %s\n", id_chk_cnt, whose); -#warning subc TODO: check buffers: parents +TODO("subc: check buffers: parents") } static void chk_layergrps(pcb_board_t *pcb) Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 21409) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 21410) @@ -257,7 +257,7 @@ ctx.data = ctx.subc->data; } else if (op == F_Selected) { -#warning subc TODO +TODO("subc TODO") pcb_message(PCB_MSG_ERROR, "TODO\n"); return 1; } Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 21409) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 21410) @@ -104,7 +104,7 @@ } } -#warning TODO: move this to liblihata +TODO(": move this to liblihata") static void lht_clean_list(lht_node_t * lst) { lht_node_t *n; Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 21409) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 21410) @@ -478,8 +478,8 @@ color = COLOR_MISC; stepf = 3; } -#warning layer TODO: handle multiple outline layers else if (g->ltype & PCB_LYT_BOUNDARY) { +TODO("layer: handle multiple outline layers") outline_gid = gid; continue; } Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 21409) +++ trunk/src_plugins/export_bboard/bboard.c (revision 21410) @@ -396,7 +396,7 @@ *s2 = 0; offset_in_model = bboard_parse_offset(s2 + 1, &ox, &oy); } -#warning subc TODO: rewrite +TODO("subc: rewrite") #if 0 if (!PCB_EMPTY_STRING_P(PCB_ELEM_NAME_VALUE(element))) { fname = bboard_get_model_filename(s, PCB_ELEM_NAME_VALUE(element), pcb_true); @@ -416,7 +416,7 @@ s = pcb_attribute_get(&(subc->Attributes), "Footprint::File"); if (s) { -#warning subc TODO: rewrite +TODO("subc: rewrite") #if 0 if (!PCB_EMPTY_STRING_P(PCB_ELEM_NAME_VALUE(element))) { fname = bboard_get_model_filename(s, PCB_ELEM_NAME_VALUE(element), pcb_true); @@ -429,7 +429,7 @@ } } if (!fname) { -#warning subc TODO: rewrite +TODO("subc: rewrite") #if 0 s = PCB_ELEM_NAME_DESCRIPTION(element); if (!PCB_EMPTY_STRING_P(PCB_ELEM_NAME_DESCRIPTION(element))) { @@ -532,7 +532,7 @@ bboard_init_board_cairo(PCB->MaxWidth, PCB->MaxHeight, bboard_bgcolor, options[HA_antialias].int_value); -#warning subc TODO: rewrite +TODO("subc: rewrite") #if 0 /* write out components on solder side */ PCB_ELEMENT_LOOP(PCB->Data); @@ -576,7 +576,7 @@ PCB_END_LOOP; PCB_ARC_LOOP(&(PCB->Data->Layer[i])); { -#warning TODO: remove x1;y1;x2;y2 +TODO(": remove x1;y1;x2;y2") bboard_draw_arc_cairo(/*arc->Point1.X, arc->Point1.Y, arc->Point2.X, arc->Point2.Y,*/ arc->X, arc->Y, arc->Width, arc->Height, arc->StartAngle, arc->Delta, arc->Thickness); Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 21409) +++ trunk/src_plugins/export_dsn/dsn.c (revision 21410) @@ -131,7 +131,7 @@ if (!(g->ltype & PCB_LYT_COPPER)) continue; -#warning TODO: revise this; use attributes instead +TODO(": revise this; use attributes instead") /* see if group has same name as a net and make it a power layer */ /* loop thru all nets */ for(ni = 0; ni < PCB->NetlistLib[PCB_NETLIST_EDITED].MenuN; ni++) { @@ -193,7 +193,7 @@ } PCB_END_LOOP; -#warning padstack TODO: check if real shapes are exported +TODO("padstack: check if real shapes are exported") PCB_PADSTACK_LOOP(PCB->Data); { /* add mounting holes */ pcb_fprintf(fp, " (component %d\n", padstack->ID); @@ -245,7 +245,7 @@ ltmp.Thickness = lin->thickness; pcb_sqline_to_rect(<mp, x, y); -#warning padstack TODO: this ignores round cap +TODO("padstack: this ignores round cap") fld = 0; for(n = 0; n < 4; n++) { @@ -266,7 +266,7 @@ pcb_snprintf(tmp, sizeof(tmp), " (circle \"%d__%s\"", GRP_NAME(grp)); gds_append_str(term_shapes, tmp); -#warning padstack TODO: this ignores circle center offset +TODO("padstack: this ignores circle center offset") pcb_snprintf(tmp, sizeof(tmp), " %.6mm)\n", circ->dia); gds_append_str(term_shapes, tmp); Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 21409) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 21410) @@ -219,7 +219,7 @@ PCB_END_LOOP; PCB_ARC_LOOP(ly) { -#warning TODO: fprintf() some curve using arc->* +TODO(": fprintf() some curve using arc->*") ; } PCB_END_LOOP; @@ -271,7 +271,7 @@ y0 -= sy; break; }*/ -#warning textrot TODO: can we exprot rotation with %f? +TODO("textrot: can we exprot rotation with %f?") fprintf(f, "TY %ld %ld %ld %ld %d 1 %d * ", /* 1 = bold */ crd(x0), crd(y0), crd(glyphy), crd(glyphx), (int)pcb_round(text->rot), fidoly); @@ -322,8 +322,8 @@ pcb_subc_get_rotation(subc, &rot); pcb_subc_get_side(subc, &on_bottom); -#warning TODO: figure how to store rotation -#warning TODO: figure how to store side +TODO(": figure how to store rotation") +TODO(": figure how to store side") fprintf(f, "MC %ld %ld %d 0 %s\n", crd(x), crd(y), 0, fp); } else Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 21409) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 21410) @@ -373,7 +373,7 @@ ipcd356_write_head(&ctx); PCB_SUBC_LOOP(pcb->Data); { -#warning subc TODO: subc-in-subc +TODO("subc: subc-in-subc") PCB_PADSTACK_LOOP(subc->data); { ipcd356_write_pstk(&ctx, subc, padstack); } PCB_END_LOOP; Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 21409) +++ trunk/src_plugins/export_openems/export_openems.c (revision 21410) @@ -176,7 +176,7 @@ openems_attribute_list[HA_def_copper_thick].default_val.coord_value = mesh->def_copper_thick; } -#warning TODO: when export dialogs change into DAD, this hack to convert the strings to allocated ones will not be needed anymore +TODO(": when export dialogs change into DAD, this hack to convert the strings to allocated ones will not be needed anymore") openems_attribute_list[HA_f_max].default_val.str_value = pcb_strdup(openems_attribute_list[HA_f_max].default_val.str_value); openems_attribute_list[HA_excite].default_val.str_value = pcb_strdup(openems_attribute_list[HA_excite].default_val.str_value); openems_attribute_list[HA_def_copper_cond].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_copper_cond].default_val.str_value); @@ -240,9 +240,9 @@ { int opt; -#warning TODO: this needs layer group attributes in core (planned for lihata v5) +TODO(": this needs layer group attributes in core (planned for lihata v5)") #if 0 -#warning TODO: try openems::attr first - make a new core call for prefixed get, this will be a real common pattern +TODO(": try openems::attr first - make a new core call for prefixed get, this will be a real common pattern") const char *val = pcb_attribute_get(&grp->Attributes, attr); if (val != NULL) { @@ -498,7 +498,7 @@ if (gid2 < 0) break; -#warning TODO: check if there is copper object on hid2 at x;y +TODO(": check if there is copper object on hid2 at x;y") if (pcb_attribute_get(&o->Attributes, "openems::vport-reverse") == NULL) openems_vport_write(ctx, (pcb_any_obj_t *)ps, ps->x, ps->y, gid1, gid2, port_name); Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 21409) +++ trunk/src_plugins/export_openems/mesh.c (revision 21410) @@ -57,7 +57,7 @@ # define mesh_trace pcb_trace #endif -#warning reorder to avoid fwd decl +TODO("reorder to avoid fwd decl") static void mesh_auto_add_smooth(vtc0_t *v, pcb_coord_t c1, pcb_coord_t c2, pcb_coord_t d1, pcb_coord_t d, pcb_coord_t d2); static void mesh_add_edge(pcb_mesh_t *mesh, pcb_mesh_dir_t dir, pcb_coord_t crd) @@ -138,7 +138,7 @@ } } -#warning TODO: text and padstacks +TODO(": text and padstacks") polylist_foreach(&mesh->layer->Polygon, &it, poly) { pcb_poly_it_t it; @@ -236,7 +236,7 @@ c = bsearch(&ctx, mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(pcb_coord_t), cmp_maybe_add); if (c == NULL) { -#warning TODO: optimization: run a second bsearch and insert instead of this; testing: 45 deg line (won't have axis aligned edge for the 2/3 1/3 rule) +TODO(": optimization: run a second bsearch and insert instead of this; testing: 45 deg line (won't have axis aligned edge for the 2/3 1/3 rule)") vtc0_append(&mesh->line[dir].edge, at); qsort(mesh->line[dir].edge.array, vtc0_len(&mesh->line[dir].edge), sizeof(pcb_coord_t), cmp_coord); } Index: trunk/src_plugins/export_openscad/scad_draw.c =================================================================== --- trunk/src_plugins/export_openscad/scad_draw.c (revision 21409) +++ trunk/src_plugins/export_openscad/scad_draw.c (revision 21410) @@ -118,8 +118,8 @@ return; } -#warning padstack TODO: this ignores bbvias -#warning slot TODO: this ignores slots +TODO("padstack: this ignores bbvias") +TODO("slot: this ignores slots") if (proto->hdia > 0) { pcb_fprintf(f, " translate([%mm,%mm,0])\n", TRX_(ps->x), TRY_(ps->y)); pcb_fprintf(f, " cylinder(r=%mm, h=4, center=true, $fn=30);\n", proto->hdia/2); Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 21409) +++ trunk/src_plugins/export_test/export_test.c (revision 21410) @@ -80,7 +80,7 @@ if (!export_test_filename) export_test_filename = "pcb-out.export_test"; else { -#warning TODO: set some FILE *fp to stdout +TODO(": set some FILE *fp to stdout") } Printexport_test(); Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 21409) +++ trunk/src_plugins/export_xy/xy.c (revision 21410) @@ -234,7 +234,7 @@ if (!(pcb_layer_flags_(ly) & PCB_LYT_COPPER)) continue; } -#warning TODO: we should have the copper bbox only, but this bbox includes the clearance! +TODO(": we should have the copper bbox only, but this bbox includes the clearance!") pcb_box_bump_box(&box, &o->BoundingBox); } } @@ -279,7 +279,7 @@ /* heavy terminal */ if (o->type == PCB_OBJ_SUBC) { -#warning subc TODO: subc-in-subc +TODO("subc: subc-in-subc") assert(!"no subc-in-subc support yet"); continue; } @@ -690,7 +690,7 @@ ctx.subc = subc; ctx.front = !bott; -#warning padstack TODO: do not depend on this, just use the normal bbox and rotate that back +TODO("padstack: do not depend on this, just use the normal bbox and rotate that back") calc_pad_bbox(&ctx, 0, &ctx.pad_w, &ctx.pad_h, &ctx.pad_cx, &ctx.pad_cy); calc_pad_bbox(&ctx, 1, &ctx.prpad_w, &ctx.prpad_h, &ctx.pad_cx, &ctx.pad_cy); xy_translate(&ctx, &ctx.pad_cx, &ctx.pad_cy); Index: trunk/src_plugins/extedit/extedit.c =================================================================== --- trunk/src_plugins/extedit/extedit.c (revision 21409) +++ trunk/src_plugins/extedit/extedit.c (revision 21410) @@ -187,7 +187,7 @@ type = pcb_search_screen(x, y, EXTEDIT_TYPES, &ptr1, &ptr2, &ptr3); } else if ((argc > 1) && (pcb_strcasecmp(cmd, "selected") == 0)) { -#warning TODO +TODO("TODO") pcb_message(PCB_MSG_ERROR, "\"Selected\" not supported yet\n"); PCB_ACT_IRES(1); return 0; Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 21409) +++ trunk/src_plugins/fontmode/fontmode.c (revision 21410) @@ -115,7 +115,7 @@ if (pcb_actionl("New", "Font", 0)) return 1; -#warning TODO do we need to change design.bloat here? +TODO("TODO do we need to change design.bloat here?") conf_set(CFR_DESIGN, "editor/grid_unit", -1, "mil", POL_OVERWRITE); conf_set_design("design/bloat", "%s", "1"); conf_set_design("design/shrink", "%s", "1"); Index: trunk/src_plugins/fp_board/fp_board.c =================================================================== --- trunk/src_plugins/fp_board/fp_board.c (revision 21409) +++ trunk/src_plugins/fp_board/fp_board.c (revision 21410) @@ -119,7 +119,7 @@ if (id == req_id) { /* if (strcmp(element->Name[PCB_ELEMNAME_IDX_DESCRIPTION].TextString, l->name)) */ -#warning TODO: extend the API: +TODO(": extend the API:") /* This is not pretty: we are saving the element to a file so we can return a FILE *. Later on we should just return the footprint. */ memset(&op, 0, sizeof(op)); @@ -145,7 +145,7 @@ static void fp_board_fclose(pcb_plug_fp_t *ctx, FILE * f, pcb_fp_fopen_ctx_t *fctx) { fclose(f); -#warning TODO: remove file +TODO(": remove file") } Index: trunk/src_plugins/fp_fs/fp_fs.c =================================================================== --- trunk/src_plugins/fp_fs/fp_fs.c (revision 21409) +++ trunk/src_plugins/fp_fs/fp_fs.c (revision 21410) @@ -170,7 +170,7 @@ * may exist in a library tree to provide an html browsable * index of the library. */ -#warning fp TODO: make this a configurable list +TODO("fp: make this a configurable list") l = strlen(subdirentry->d_name); if (!stat(subdirentry->d_name, &buffer) && subdirentry->d_name[0] != '.' @@ -345,7 +345,7 @@ return NULL; } -#warning subc TODO: should be handled in io_* +TODO("subc: should be handled in io_*") /* Decide about the type of a footprint file: - it is a file element if the first non-comment is "Element(" or "Element[" - else it is a parametric element (footprint generator) if it contains @@ -370,7 +370,7 @@ int Talloced = 0, Tused = 0; pcb_fptype_t ret = PCB_FP_INVALID; -#warning fp TODO: rather call plug_io if it is not parametric +TODO("fp: rather call plug_io if it is not parametric") if (tags != NULL) *tags = NULL; @@ -395,8 +395,8 @@ state = ST_COMMENT; break; } -#warning fp TODO: rather call plug_io if it is not parametric else if ((first_element) && (c == 'l')) { +TODO("fp: rather call plug_io if it is not parametric") char s[23]; /* li:pcb-rnd-subcircuit */ fgets(s, 21, f); Index: trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c =================================================================== --- trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 21409) +++ trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 21410) @@ -146,7 +146,7 @@ cairo_move_to(cr, x1, y1); cairo_line_to(cr, x2, y2); if (fill) -#warning gtk3 TODO: What means "fill a line" ? cairo_fill is not appropriate if path is only a line. +TODO("gtk3: What means "fill a line" ? cairo_fill is not appropriate if path is only a line.") cairo_fill(cr); else cairo_stroke(cr); @@ -264,7 +264,7 @@ end_subcomposite(); } -#warning TODO: misleading comment or broken code +TODO(": misleading comment or broken code") /* Do not clean up internal structures, as they will be used probably elsewhere. */ static void ghid_cairo_destroy_gc(pcb_hid_gc_t gc) { @@ -284,7 +284,7 @@ return rv; } -#warning gtk3 TODO: check if clipping is not necessary +TODO("gtk3: check if clipping is not necessary") //static void set_clip(render_priv_t * priv, cairo_t * cr) //{ // if (cr == NULL) @@ -491,7 +491,7 @@ //} cairo_save(cr); -#warning gtk3 TODO: deal with gc +TODO("gtk3: deal with gc") cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); cairo_set_line_width(cr, 1.0); gdk_cairo_set_source_rgba(cr, &priv->grid_color); @@ -912,7 +912,7 @@ angle1 *= (M_PI / 180.0); angle2 *= (M_PI / 180.0); cairo_save(priv->cr); -#warning gtk3 TODO: this will draw an arc of a circle, not an ellipse! Explore matrix transformation here. +TODO("gtk3: this will draw an arc of a circle, not an ellipse! Explore matrix transformation here.") cairo_arc(priv->cr, pcb_round(Vxd(cx)), pcb_round(Vyd(cy)), Vzd(radius), angle1, angle2); cairo_stroke(priv->cr); cairo_restore(priv->cr); @@ -1367,7 +1367,7 @@ if (gport->view.crosshair_x < 0 || !ghidgui->topwin.active || !gport->view.has_entered) return; -#warning gtk3 TODO: when CrossColor changed from config +TODO("gtk3: when CrossColor changed from config") map_color_string(conf_core.appearance.color.cross, &priv->crosshair_color); //cr = priv->cr_drawing_area; cr = priv->cr; @@ -1380,7 +1380,7 @@ // gdk_gc_set_function(xor_gc, GDK_XOR); // gdk_gc_set_clip_origin(xor_gc, 0, 0); // set_clip(priv, xor_gc); -#warning gtk3 TODO:FIXME: when CrossColor changed from config +TODO("gtk3:FIXME: when CrossColor changed from config") // map_color_string(conf_core.appearance.color.cross, &cross_color); //} x = Vx(gport->view.crosshair_x); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 21409) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 21410) @@ -1385,7 +1385,7 @@ void lesstif_update_layer_groups() { -#warning layer TODO: call a redraw on the edit group +TODO("layer: call a redraw on the edit group") } /* ------------------------------------------------------------ */ Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 21409) +++ trunk/src_plugins/hid_lesstif/main.c (revision 21410) @@ -219,7 +219,6 @@ @end ftable %end-doc */ -#warning TODO#1: this should be generic and not depend on the HID /* {"pcb-menu", "Location of pcb-menu.res file", PCB_HATT_STRING, 0, 0, {0, PCBSHAREDIR "/pcb-menu.res", 0}, 0, &lesstif_pcbmenu_path} @@ -227,6 +226,8 @@ */ }; +TODO("menu: pcb-menu should be generic and not depend on the HID") + PCB_REGISTER_ATTRIBUTES(lesstif_attribute_list, lesstif_cookie) static int lesstif_direct = 0; @@ -521,7 +522,7 @@ return 0; } -#warning TODO: ui_zoomplan.c does the same, maybe make the code common? +TODO(": ui_zoomplan.c does the same, maybe make the code common?") static fgw_error_t pcb_act_SwapSides(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *op = NULL, *b = ""; @@ -1611,7 +1612,7 @@ int lesstif_key_name(unsigned short int key_raw, char *out, int out_len) { -#warning TODO#3: do not ingore key_tr (either of them is 0) +TODO("TODO#3: do not ingore key_tr (either of them is 0)") char *name = XKeysymToString(key_raw); if (name == NULL) return -1; @@ -2667,7 +2668,7 @@ } } -#warning TODO: remove this, update-on should handle all cases +TODO(": remove this, update-on should handle all cases") lesstif_update_widget_flags(NULL); show_crosshair(1); @@ -3084,7 +3085,7 @@ XDrawArc(display, pixmap, my_gc, cx, cy, width * 2, height * 2, (start_angle + 180) * 64, delta_angle * 64); if (use_mask() && !conf_core.editor.thin_draw) XDrawArc(display, mask_bitmap, mask_gc, cx, cy, width * 2, height * 2, (start_angle + 180) * 64, delta_angle * 64); -#warning TODO: make this #if a flag and add it in the gtk hid as well +TODO(": make this #if a flag and add it in the gtk hid as well") #if 0 /* Enable this if you want to see the center and radii of drawn arcs, for debugging. */ Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 21409) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 21410) @@ -272,7 +272,7 @@ } /* printf("KEY lookup: mod=%x sym=%x/%d\n", mods, sym, slen); */ -#warning TODO#3: pass on raw and translated keys +TODO("TODO#3: pass on raw and translated keys") slen = pcb_hid_cfg_keys_input(&lesstif_keymap, mods, sym, sym); if (slen <= 0) return 1; @@ -416,7 +416,7 @@ stdarg(XmNacceleratorText, as); } -#warning TODO: remove this call +TODO(": remove this call") note_accelerator(node); } @@ -509,7 +509,7 @@ static void add_res2menu_text_special(Widget menu, lht_node_t *node, XtCallbackProc callback) { -#warning TODO: make this a flag hash, also in the gtk hid +TODO(": make this a flag hash, also in the gtk hid") Widget btn = NULL; stdarg_n = 0; if (*node->data.text.value == '@') { Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 21409) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 21410) @@ -208,7 +208,7 @@ } *pname++ = 0; -#warning subc TODO +TODO("subc TODO") #if 0 PCB_ELEMENT_LOOP(PCB->Data); { Index: trunk/src_plugins/hid_remote/proto.c =================================================================== --- trunk/src_plugins/hid_remote/proto.c (revision 21409) +++ trunk/src_plugins/hid_remote/proto.c (revision 21410) @@ -335,7 +335,7 @@ if ((wait_for != NULL) && (strcmp(wait_for, pctx.pcmd) == 0)) return pctx.targ; if (cache_msgs) { -#warning TODO +TODO("TODO") } else proto_exec_cmd(pctx.pcmd, pctx.targ); Index: trunk/src_plugins/hid_remote/proto_lowsend.h =================================================================== --- trunk/src_plugins/hid_remote/proto_lowsend.h (revision 21409) +++ trunk/src_plugins/hid_remote/proto_lowsend.h (revision 21410) @@ -81,7 +81,7 @@ return 0; } -#warning TODO: this is unsafe, s can have % +TODO(": this is unsafe, s can have %") static int sends(proto_ctx_t *ctx, const char *s) { if (s == NULL) Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 21409) +++ trunk/src_plugins/hid_remote/remote.c (revision 21410) @@ -66,7 +66,7 @@ used = pcb_layer_list_any(PCB, PCB_LYT_ANYTHING | PCB_LYT_ANYWHERE | PCB_LYT_VIRTUAL, arr, sizeof(arr)/sizeof(arr[0])); -#warning layer TODO: remove this temporary hack for virtual layers +TODO("layer: remove this temporary hack for virtual layers") for(n = 0; n < used; n++) { const char *name; pcb_layer_id_t layer_id = arr[n]; @@ -99,7 +99,7 @@ ctx.view.X2 = PCB->MaxWidth; ctx.view.Y2 = PCB->MaxHeight; -#warning TODO: wait for a connection? +TODO(": wait for a connection?") remote_proto_send_ver(); remote_proto_send_unit(); remote_proto_send_brddim(PCB->MaxWidth, PCB->MaxHeight); @@ -145,7 +145,7 @@ if (group >= 0) proto_send_set_layer_group(group, purpose, is_empty); else { -#warning layer TODO: remove this temporary hack for virtual layers +TODO("layer: remove this temporary hack for virtual layers") proto_send_set_layer_group(layer, purpose, is_empty); } Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 21409) +++ trunk/src_plugins/io_autotrax/read.c (revision 21410) @@ -221,12 +221,12 @@ if (lyt & PCB_LYT_BOTTOM) Flags = pcb_flag_make(PCB_FLAG_ONSOLDER); else Flags = pcb_flag_make(0); -#warning textrot TODO: is there a real rotation angle available? +TODO("textrot: is there a real rotation angle available?") if (pcb_text_new(ly, pcb_font(st->pcb, 0, 1), X, Y, 90.0*direction, scaling, 0, t, Flags) != 0) return 1; return -1; -#warning TODO: do not use strlen() for this, decide where to move this code +TODO(": do not use strlen() for this, decide where to move this code") /* if (strlen(t) == 0) { pcb_message(PCB_MSG_ERROR, "Empty free string not placed on layout, %s:%d\n", st->Filename, st->lineno); @@ -548,7 +548,7 @@ } /* now find name as string on next line and copy it */ -#warning TODO: can not exit above if we need to read this line +TODO(": can not exit above if we need to read this line") if (fgetline(line, sizeof(line), FP, st->lineno) == NULL) { pcb_message(PCB_MSG_ERROR, "Error parsing pad text field line, %s:%d\n", st->Filename, st->lineno); return -1; @@ -649,7 +649,7 @@ break; case 2: /* rect */ case 4: /* round-rect - for now */ -#warning TODO: generate round-rect +TODO(": generate round-rect") for(n = 0; n < 7; n++) { pcb_coord_t clr = (sh[n].layer_mask & PCB_LYT_MASK) ? Clearance : 0; if (sh[n].layer_mask == 0) break; @@ -657,7 +657,7 @@ } break; case 3: /* octa */ -#warning TODO: generate octa +TODO(": generate octa") default: pcb_message(PCB_MSG_ERROR, "Unsupported FP shape: %d, %s:%d.\n", Shape, st->Filename, st->lineno); return 0; @@ -700,7 +700,7 @@ valid &= success; Y2 = pcb_get_value_ex(argv[3], NULL, NULL, NULL, "mil", &success); valid &= success; -#warning TODO: do not use get_value_ex for plain integers (revise the whole file for this) +TODO(": do not use get_value_ex for plain integers (revise the whole file for this)") autotrax_layer = pcb_get_value_ex(argv[4], NULL, NULL, NULL, NULL, &success); valid &= (success && (autotrax_layer > 0) && (autotrax_layer < 14)); qparse_free(argc, &argv); @@ -717,7 +717,7 @@ return -1; } -#warning TODO: figure if autotrax really converts layer 1 and 6 polygons to pads +TODO(": figure if autotrax really converts layer 1 and 6 polygons to pads") if ((subc == NULL) || ((autotrax_layer != 1) && (autotrax_layer != 6))) { ly = autotrax_get_layer(st, subc, autotrax_layer, "polygon"); if (ly == NULL) @@ -1001,7 +1001,7 @@ valid &= success; module_Y = pcb_get_value_ex(argv[1], NULL, NULL, NULL, "mil", &success); valid &= success; -#warning TODO: load placement status and apply PCB_FLAG_LOCK if needed +TODO(": load placement status and apply PCB_FLAG_LOCK if needed") qparse_free(argc, &argv); } else { @@ -1037,13 +1037,13 @@ } else { pcb_message(PCB_MSG_ERROR, "Empty module/COMP found, not added to layout, %s:%d\n", st->Filename, st->lineno); -#warning TODO safely free new_module +TODO("TODO safely free new_module") return 0; } } } else if (length >= 2) { -#warning TODO: this does not handle return -1 +TODO(": this does not handle return -1") if (strncmp(s, "CT", 2) == 0) { nonempty |= rdax_track(st, FP, new_module); } Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 21409) +++ trunk/src_plugins/io_autotrax/write.c (revision 21410) @@ -188,7 +188,7 @@ h = y2 - y1; drill_dia = 0; -#warning TODO: need to figure which side the padstack is on! +TODO(": need to figure which side the padstack is on!") alayer = 1; } else { @@ -216,8 +216,8 @@ else fputs("FP ", ctx->f); -#warning TODO: figure which is the gnd and which is the power plane -#warning TODO: add checks for thermals: only gnd/pwr can have them, warn for others +TODO(": figure which is the gnd and which is the power plane") +TODO(": add checks for thermals: only gnd/pwr can have them, warn for others") pcb_fprintf(ctx->f, "%.0ml %.0ml %.0ml %.0ml %d %.0ml 1 %d\r\n", x+dx, PCB->MaxHeight - (y+dy), w, h, @@ -300,7 +300,7 @@ arc_start -= arc_delta; } -#warning TODO arc segments less than 90 degrees do not convert well. +TODO("TODO arc segments less than 90 degrees do not convert well.") while(arc_start < 0) arc_start += 360; @@ -436,7 +436,7 @@ int index = 0; -#warning TODO: why do we hardwire this here? +TODO(": why do we hardwire this here?") default_stroke_thickness = 200000; /* write information about non empty layers */ @@ -446,7 +446,7 @@ int direction; if (pcb_text_old_direction(&direction, text->rot) != 0) { -#warning TODO: indicate save incompatibility +TODO(": indicate save incompatibility") } if (current_layer < 9) { /* copper or silk layer text */ @@ -499,11 +499,11 @@ pcb_box_t *box = &subc->BoundingBox; pcb_coord_t xPos, yPos, yPos2, yPos3; -#warning TODO: do not hardcode things like this, especially when actual data is available +TODO(": do not hardcode things like this, especially when actual data is available") pcb_coord_t text_offset = PCB_MIL_TO_COORD(400); /* this gives good placement of refdes relative to element */ -#warning TODO: rename these variables to something more expressive -#warning TODO: instead of hardwiring coords, just read existing dyntex coords +TODO(": rename these variables to something more expressive") +TODO(": instead of hardwiring coords, just read existing dyntex coords") xPos = (box->X1 + box->X2) / 2; yPos = PCB->MaxHeight - (box->Y1 - text_offset); yPos2 = yPos - PCB_MIL_TO_COORD(200); @@ -511,7 +511,7 @@ pcb_subc_get_side(subc, &on_bottom); -#warning TODO: do not hardwire these layers, even if the autotrax format hardwires them - look them up from the static table, let the hardwiring happen only at one place +TODO(": do not hardwire these layers, even if the autotrax format hardwires them - look them up from the static table, let the hardwiring happen only at one place") if (on_bottom) silk_layer = 8; else @@ -563,7 +563,7 @@ if (pcb_cpoly_is_simple_rect(polygon)) { pcb_trace(" simple rectangular polyogon\n"); -#warning TODO: why do we recalculate the bounding box here? +TODO(": why do we recalculate the bounding box here?") minx = maxx = polygon->Points[0].X; miny = maxy = polygon->Points[0].Y; @@ -592,7 +592,7 @@ pcb_coord_t Thickness; Thickness = PCB_MIL_TO_COORD(10); autotrax_cpoly_hatch_lines(ctx, polygon, PCB_CPOLY_HATCH_HORIZONTAL | PCB_CPOLY_HATCH_VERTICAL, Thickness * 3, Thickness, current_layer, dx, dy); -#warning TODO: do we really need to reimplement this, can not cpoly_hatch_lines handle it? +TODO(": do we really need to reimplement this, can not cpoly_hatch_lines handle it?") for(pa = pcb_poly_island_first(polygon, &poly_it); pa != NULL; pa = pcb_poly_island_next(&poly_it)) { /* now generate cross hatch lines for polygon island export */ pcb_pline_t *pl, *track; @@ -667,7 +667,7 @@ wctx.f = FP; wctx.pcb = PCB; -#warning TODO: this is a bug - exporting to a file shall not change the content we are exporting +TODO(": this is a bug - exporting to a file shall not change the content we are exporting") if (pcb_board_normalize(PCB) < 0) { pcb_message(PCB_MSG_ERROR, "Unable to normalise layout prior to attempting export.\n"); return -1; Index: trunk/src_plugins/io_eagle/eagle_bin.c =================================================================== --- trunk/src_plugins/io_eagle/eagle_bin.c (revision 21409) +++ trunk/src_plugins/io_eagle/eagle_bin.c (revision 21410) @@ -1069,7 +1069,7 @@ deg = strtol(rot, &end, 10); /*printf("Calculated deg == %ld pre bin_rot2degree conversion\n", deg);*/ if (*end != '\0') { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") printf("unexpected binary field 'rot' value suffix\n"); return -1; } @@ -1116,7 +1116,7 @@ text_remaining = egb_ctx->free_text_len = (int)load_long(block, 4, 2); text_remaining += 4; /* there seems to be a 4 byte checksum or something at the end */ -#warning TODO instead of skipping the text, we need to load it completely with drc_ctx->free_text pointing to it +TODO("TODO instead of skipping the text, we need to load it completely with drc_ctx->free_text pointing to it") while (text_remaining > 400) { if (fread(free_text, 1, 400, f) != 400) { pcb_message(PCB_MSG_ERROR, "Short attempted free text block read. Truncated file?\n"); @@ -1147,7 +1147,7 @@ drc_ctx->rvPadBottom = 0.25; if (fread(block, 1, 4, f) != 4) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: short attempted DRC preamble read; preamble not found. Truncated file?\n"); return -1; } @@ -1157,7 +1157,7 @@ && load_long(block, 1, 1) == 0x04 && load_long(block, 2, 1) == 0x00 && load_long(block, 3, 1) == 0x20)) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: start of DRC preamble not found where it was expected.\n"); pcb_trace("E: drc byte 0 : %d\n", (int)load_long(block, 0, 1) ); pcb_trace("E: drc byte 1 : %d\n", (int)load_long(block, 1, 1) ); @@ -1168,13 +1168,13 @@ while (!DRC_preamble_end_found) { if (fread(&c, 1, 1, f) != 1) { /* the text preamble is not necessarily n * 4 bytes */ -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } else { if (c == '\0') { /* so we step through, looking for each 0x00 */ if (fread(block, 1, 4, f) != 4) { /* the text preamble seems to n * 24 bytes */ -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: short attempted DRC preamble read. Truncated file?\n"); return -1; } @@ -1189,7 +1189,7 @@ } if (fread(DRC_block, 1, DRC_length_used, f) != DRC_length_used) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: short DRC value block read. DRC section incomplete. Truncated file?\n"); return -1; } @@ -1277,7 +1277,7 @@ /* load the current block */ if (fread(block, 1, 24, f) != 24) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: short read\n"); return -1; } @@ -1308,7 +1308,7 @@ goto found; } -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("E: unknown block ID 0x%02x%02x at offset %ld\n", block[0], block[1], ftell(f)); return -1; @@ -1478,7 +1478,7 @@ egb_node_prop_set(elem, "StartAngle", "180"); egb_node_prop_set(elem, "Delta", "90"); } else { -#warning TODO need negative flags checked for c, x1, x2, y1, y2 > ~=838mm +TODO("TODO need negative flags checked for c, x1, x2, y1, y2 > ~=838mm") delta_x = (double)(x1 - cx); delta_y = (double)(y1 - cy); theta_1 = PCB_RAD_TO_DEG*atan2(-delta_y, delta_x); @@ -1508,7 +1508,7 @@ sprintf(itoa_buffer, "%ld", (long)(delta_theta)); egb_node_prop_set(elem, "Delta", itoa_buffer); } -#warning TODO still need to fine tune non-trivial non 90 degree arcs start and delta for 0x81, 0x00 +TODO("TODO still need to fine tune non-trivial non 90 degree arcs start and delta for 0x81, 0x00") } else if ((linetype > 0 && linetype != 0x81) || arctype > 0) { int x1_ok, x2_ok, y1_ok, y2_ok, cxy_ok; x1_ok = x2_ok = y1_ok = y2_ok = cxy_ok = 0; @@ -1764,7 +1764,7 @@ } break; case 129: -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("Process linetype 129\n"); break; } @@ -1930,7 +1930,7 @@ long half_diameter = 0; long half_size = 0; char tmp[32]; -#warning TODO padstacks - need to convert obround pins to appropriate padstack types +TODO("TODO padstacks - need to convert obround pins to appropriate padstack types") if (root != NULL && (root->id == PCB_EGKW_SECT_PAD || root->id == PCB_EGKW_SECT_HOLE || root->id == PCB_EGKW_SECT_VIA || root->id == PCB_EGKW_SECT_TEXT)) { @@ -2029,8 +2029,8 @@ return 0; } -#warning TODO netlist - this code flattens the signals so the XML parser finds everything, but connectivity info for nested nets is not preserved in the process # -#warning TODO netlist labels - eagle bin often has invalid net labels, i.e.'-', '+' so may need to filter# +TODO("TODO netlist - this code flattens the signals so the XML parser finds everything, but connectivity info for nested nets is not preserved in the process #") +TODO("TODO netlist labels - eagle bin often has invalid net labels, i.e.'-', '+' so may need to filter#") /* take any sub level signal /signals/signal1/signal2 and move it up a level to /signals/signal2 */ static int postproc_signal(void *ctx, egb_ctx_t *egb_ctx) { @@ -2166,7 +2166,7 @@ eagle_bin_ctx.board = find_node(eagle_bin_ctx.drawing->first_child, PCB_EGKW_SECT_BOARD); if (eagle_bin_ctx.board == NULL) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("No board node found, this may be a library file.\n"); } else { /* the following code relies on the board node being present, i.e. a layout */ @@ -2174,7 +2174,7 @@ eagle_bin_ctx.drc = egb_node_append(eagle_bin_ctx.board, egb_node_alloc(PCB_EGKW_SECT_DRC, "designrules")); eagle_bin_ctx.libraries = find_node_name(eagle_bin_ctx.board->first_child, "libraries"); if (eagle_bin_ctx.libraries == NULL) { /* layouts have a libraries node it seems */ -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("Eagle binary layout is missing a board/libraries node.\n"); return -1; } @@ -2233,7 +2233,7 @@ res = read_block(numblocks, 1, ctx, f, fn, *root); if (res < 0) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("Problem with remaining blocks... is this a library file?\n"); return res; } @@ -2243,7 +2243,7 @@ read_notes(ctx, f, fn, &eagle_bin_ctx); /* read_drc will determine sane defaults if no DRC block found */ if (read_drc(ctx, f, fn, &eagle_bin_ctx) != 0) { -#warning TODO: convert this to proper error reporting +TODO(": convert this to proper error reporting") pcb_trace("No DRC section found, either a v3 binary file or a binary library file.\n"); } /* we now use the eagle_bin_ctx results for post_proc */ Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 21409) +++ trunk/src_plugins/io_eagle/read.c (revision 21410) @@ -306,7 +306,7 @@ ly->visible = eagle_get_attrl(st, n, "visible", -1); ly->active = eagle_get_attrl(st, n, "active", -1); ly->lid = -1; -#warning TODO we are reading uint as signed int when getting layer, and ignoring half of them +TODO("TODO we are reading uint as signed int when getting layer, and ignoring half of them") id = eagle_get_attrl(st, n, "number", -1); if (id >= 0) { htip_set(&st->layers, id, ly); /* all listed layers get a hash */ @@ -377,7 +377,7 @@ /* if more than 51 or 52 are considered useful, we could relax the test here: */ if ((ly == NULL) || (ly->lid < 0)) { -#warning TODO: move this out to a separate function +TODO(": move this out to a separate function") if (id == 51 || id == 52) { /* create docu on the first reference */ pcb_layer_type_t typ; @@ -530,8 +530,8 @@ pcb_message(PCB_MSG_ERROR, "Failed to allocate text layer 'ly' via eagle_layer_get(st, ln)\n"); return 0; } -#warning TODO text - need better filtering/exclusion of unsupported text layers +/- correct flags -#warning TODO: remove this hack - if there is a bug, fix it, do not work it around like this +TODO("TODO text - need better filtering/exclusion of unsupported text layers +/- correct flags") +TODO(": remove this hack - if there is a bug, fix it, do not work it around like this") if (ln == 51) { ln = 21; /* we seem to trigger a segfault if we create text with ln = 51 */ pcb_message(PCB_MSG_WARNING, "Moved text on tDocu layer: 51 to top silk\n", ln); @@ -548,7 +548,7 @@ return 0; } -#warning TODO: need to convert +TODO(": need to convert") if (text_val == NULL) { text_val = (const char *)GET_TEXT(CHILDREN(subtree)); } @@ -577,7 +577,7 @@ } } -#warning textrot TODO: check if we can just use the angle +TODO("textrot: check if we can just use the angle") pcb_text_new(ly, pcb_font(st->pcb, 0, 1), X, Y, 90.0*text_direction, text_scaling, 0, text_val, text_flags); return 0; } @@ -642,7 +642,7 @@ return 0; } -#warning TODO: rewrite this with only one lin +TODO(": rewrite this with only one lin") lin1 = pcb_line_alloc(ly); lin2 = pcb_line_alloc(ly); lin3 = pcb_line_alloc(ly); @@ -700,7 +700,7 @@ long lt = eagle_get_attrl(st, subtree, "linetype", -1); /* present if bin file */ double curve = eagle_get_attrd(st, subtree, "curve", 0); /*present if a wire "arc" */ -#warning TODO: need to process curve value if present to draw an arc, not a line +TODO(": need to process curve value if present to draw an arc, not a line") if (curve) { pcb_message(PCB_MSG_ERROR, "Curved wire not yet handled in eagle_read_wire()\n"); } @@ -753,9 +753,9 @@ static pcb_pstk_t *eagle_create_pstk(read_state_t *st, pcb_data_t *data, pcb_coord_t x, pcb_coord_t y, eagle_pstk_shape_t shape, pcb_coord_t dx, pcb_coord_t dy, pcb_coord_t clr, pcb_coord_t drill_dia, int roundness, int rot, int onbottom, pcb_bool plated) { pcb_pstk_shape_t shapes[8]; -#warning TODO need to establish how mask clearance is defined and done in eagle +TODO("TODO need to establish how mask clearance is defined and done in eagle") pcb_coord_t mask_gap = clr; -#warning TODO need to establish how paste clearance, if any, is defined and done in eagle +TODO("TODO need to establish how paste clearance, if any, is defined and done in eagle") pcb_coord_t paste_gap = 0; switch (shape) { case EAGLE_PSH_SQUARE: @@ -783,7 +783,7 @@ shapes[7].layer_mask = 0; break; case EAGLE_PSH_OCTAGON: -#warning TODO need octagon shape generation function/API accessible from read.c padstack creation function +TODO("TODO need octagon shape generation function/API accessible from read.c padstack creation function") case EAGLE_PSH_ROUND: assert(dx == dy); case EAGLE_PSH_LONG: @@ -812,7 +812,7 @@ break; case EAGLE_PSH_SMD: { -#warning TODO need to implement SMD roundness +TODO("TODO need to implement SMD roundness ") pcb_layer_type_t side = onbottom ? PCB_LYT_BOTTOM : PCB_LYT_TOP; shapes[0].layer_mask = side | PCB_LYT_MASK; shapes[0].comb = PCB_LYC_SUB | PCB_LYC_AUTO; @@ -827,7 +827,7 @@ } break; case EAGLE_PSH_OFFSET: -#warning TODO need OFFSET shape generation function, once OFFSET object understood +TODO("TODO need OFFSET shape generation function, once OFFSET object understood") return NULL; } return pcb_pstk_new_from_shape(data, x, y, drill_dia, plated, clr, shapes); @@ -855,12 +855,12 @@ rot = eagle_rot2degrees(eagle_get_attrs(st, subtree, "rot", 0)); roundness = eagle_get_attrl(st, subtree, "roundness", 0); -#warning TODO need to load thermals flags to set clearance; may in fact be more contactref related. +TODO("TODO need to load thermals flags to set clearance; may in fact be more contactref related.") -#warning TODO: this should be coming from the eagle file +TODO(": this should be coming from the eagle file") clr = conf_core.design.clearance; -#warning TODO padstacks - consider roundrect, oval etc shapes when padstacks available +TODO("TODO padstacks - consider roundrect, oval etc shapes when padstacks available") #if 0 if (roundness >= 65) /* round smd pads found in fiducials, some discretes, it seems */ PCB_FLAG_CLEAR(PCB_FLAG_SQUARE, pad); @@ -879,7 +879,7 @@ pcb_pstk_shape_rot(&sh[2], sina, cosa, rot); } -#warning TODO: call eagle_create_pstk() instead +TODO(": call eagle_create_pstk() instead") ps = pcb_pstk_new_from_shape(subc->data, x, y, 0, 0, clr, sh); if (ps == NULL) @@ -922,11 +922,11 @@ if ((dia - drill) / 2.0 < st->ms_width) dia = drill + 2*st->ms_width; -#warning padstack TODO: process the extent attribute for bbvia -#warning padstack TODO: revise this for numeric values ? +TODO("padstack: process the extent attribute for bbvia") +TODO("padstack: revise this for numeric values ?") /* shape = {square, round, octagon, long, offset} binary */ -#warning TODO: call eagle_create_pstk() instead +TODO(": call eagle_create_pstk() instead") if (shape != NULL) { if ((strcmp(shape, "octagon") == 0) || (strcmp(shape, "2") == 0)) cshp = PCB_PSTK_COMPAT_OCTAGON; @@ -1011,7 +1011,7 @@ return 0; } -#warning TODO: eliminate this fwd declaration by reorder +TODO(": eliminate this fwd declaration by reorder") static int eagle_read_poly(read_state_t *st, trnode_t *subtree, void *obj, int type); static int eagle_read_pkg(read_state_t *st, trnode_t *subtree, pcb_subc_t *subc) @@ -1063,13 +1063,13 @@ pcb_attribute_put(&subc->Attributes, "footprint", eagle_get_attrs(st, n, "package", NULL)); pcb_subc_bbox(subc); -#warning subc TODO: revise this: are we loading an instance here? do we need to place it? do not even bump if not! +TODO("subc: revise this: are we loading an instance here? do we need to place it? do not even bump if not!") if (st->pcb->Data->subc_tree == NULL) st->pcb->Data->subc_tree = pcb_r_create_tree(); pcb_r_insert_entry(st->pcb->Data->subc_tree, (pcb_box_t *)subc); pcb_subc_rebind(st->pcb, subc); -#warning TODO: revise rotation and flip +TODO(": revise rotation and flip") #if 0 if ((moduleRotation == 90) || (moduleRotation == 180) || (moduleRotation == 270)) { /* lossles module rotation for round steps */ @@ -1228,7 +1228,7 @@ size_bump(st, x, y); break; } -#warning TODO can remove the following if dealt with in post processor for binary tree +TODO("TODO can remove the following if dealt with in post processor for binary tree") } else if (STRCMP(NODENAME(n), "wire") == 0) { /* binary format vertices it seems */ pcb_coord_t x, y; x = eagle_get_attrc(st, n, "linetype_0_x1", 0); @@ -1297,7 +1297,7 @@ if (!add_text) return; -#warning TODO: text objects should be already created in the library; we should probably set the attributes here only +TODO(": text objects should be already created in the library; we should probably set the attributes here only") #if 0 y += EAGLE_TEXT_SIZE_100; @@ -1393,7 +1393,7 @@ pcb_subc_bbox(new_subc); pcb_subc_rebind(st->pcb, new_subc); -#warning subc TODO: why not use the arbtirary angle rot? +TODO("subc: why not use the arbtirary angle rot?") if (rot != NULL) { char *end; double ang = strtod(rot+1, &end); @@ -1445,7 +1445,7 @@ {NULL, NULL} }; -#warning TODO: test (should process these probably no-net-no-signal objects) +TODO(": test (should process these probably no-net-no-signal objects)") return eagle_foreach_dispatch(st, CHILDREN(subtree), disp, NULL, ON_BOARD); } @@ -1605,7 +1605,7 @@ static int post_process_thermals(read_state_t *st) { -#warning TODO: process thermals +TODO(": process thermals") PCB_PADSTACK_LOOP(st->pcb->Data); { } Index: trunk/src_plugins/io_eagle/trparse_bin.c =================================================================== --- trunk/src_plugins/io_eagle/trparse_bin.c (revision 21409) +++ trunk/src_plugins/io_eagle/trparse_bin.c (revision 21410) @@ -108,13 +108,13 @@ static const char *eagle_bin_text(trparse_t *pst, trnode_t *node) { /*egb_node_t *nd = (egb_node_t *)node;*/ -#warning TODO +TODO("TODO") return NULL; } static int eagle_bin_is_text(trparse_t *pst, trnode_t *node) { -#warning TODO +TODO("TODO") return 0; } Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 21409) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 21410) @@ -86,7 +86,7 @@ return 0; } -#warning TODO: rewrite this - this is very unpcb-rnd +TODO(": rewrite this - this is very unpcb-rnd") #if 0 int i = 0; /* @@ -182,7 +182,7 @@ io_hyp.description = "hyperlynx"; io_hyp.save_preference_prio = 30; io_hyp.default_extension = ".hyp"; -#warning TODO: look these up +TODO(": look these up") io_hyp.fp_extension = ".hyp_mod"; io_hyp.mime_type = "application/x-hyp-pcb"; Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 21409) +++ trunk/src_plugins/io_hyp/parser.c (revision 21410) @@ -369,7 +369,7 @@ /* * find padstack by name */ -#warning TODO: use a hash instead +TODO(": use a hash instead") padstack_t *hyp_pstk_by_name(char *padstack_name) { padstack_t *i; @@ -417,7 +417,7 @@ /* * find hyperlynx device by name */ -#warning TODO: convert this into a hash +TODO(": convert this into a hash") device_t *hyp_device_by_name(char *device_name) { device_t *i; @@ -1828,7 +1828,7 @@ mdef = strcmp(i->layer_name, "MDEF") == 0; top_or_bottom = 0; -#warning TODO: check if mask/paste layers can be acquired explicitly as non-metal layers +TODO(": check if mask/paste layers can be acquired explicitly as non-metal layers") if (mdef || (strcmp(i->layer_name, ln_top) == 0)) { if (!have_top) { hyp_pstk_add_shp(sh, &sh_used, sh_max, i, PCB_LYT_TOP | PCB_LYT_COPPER, 0, 0); Index: trunk/src_plugins/io_hyp/write.c =================================================================== --- trunk/src_plugins/io_hyp/write.c (revision 21409) +++ trunk/src_plugins/io_hyp/write.c (revision 21410) @@ -181,10 +181,10 @@ { pcb_coord_t sx, sy, minx, miny, maxx, maxy; int shnum = 0, n; -#warning TODO: this ignores rotation +TODO(": this ignores rotation") switch(shp->shape) { case PCB_PSSH_HSHADOW: -#warning hshadow TODO +TODO("hshadow TODO") break; case PCB_PSSH_CIRC: sx = sy = shp->data.circ.dia; @@ -191,7 +191,7 @@ shnum = 0; break; case PCB_PSSH_POLY: -#warning TODO: check if it is a rectangle +TODO(": check if it is a rectangle") minx = maxx = shp->data.poly.x[0]; miny = maxy = shp->data.poly.y[0]; for(n = 1; n < shp->data.poly.len; n++) { @@ -401,7 +401,7 @@ if (l == NULL) continue; -#warning layer TODO: refuse negative layers and warn for objects other than line/arc +TODO("layer: refuse negative layers and warn for objects other than line/arc") linelist_foreach(&l->Line, &it, line) { write_pr_line(wr, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 21409) +++ trunk/src_plugins/io_kicad/read.c (revision 21410) @@ -185,7 +185,7 @@ /* kicad_pcb/parse_page */ static int kicad_parse_page_size(read_state_t *st, gsxl_node_t *subtree) { -#warning TODO: size can be determined by kicad_pcb/general/area - when that is present, prefer that over the page size (see via1.kicad_pcb) +TODO(": size can be determined by kicad_pcb/general/area - when that is present, prefer that over the page size (see via1.kicad_pcb)") if (subtree != NULL && subtree->str != NULL) { if (strcmp("A4", subtree->str) == 0) { st->pcb->MaxWidth = PCB_MM_TO_COORD(297.0); @@ -331,7 +331,7 @@ } } else if (n->str != NULL && strcmp("hide", n->str) == 0) { -#warning TODO +TODO("TODO") } else if (n->str != NULL && strcmp("effects", n->str) == 0) { for(m = n->children; m != NULL; m = m->next) { @@ -394,7 +394,7 @@ } required = BV(0) | BV(1) | BV(2) | BV(3); if ((tally & required) == required) { /* has location, layer, size and stroke thickness at a minimum */ -#warning TODO: this will never be NULL; what are we trying to check here? +TODO(": this will never be NULL; what are we trying to check here?") if (&st->pcb->fontkit.dflt == NULL) { pcb_font_create_default(st->pcb); } @@ -440,7 +440,7 @@ } } -#warning textrot TODO: check if we can just use the rotation angle +TODO("textrot: check if we can just use the rotation angle") pcb_text_new(&st->pcb->Data->Layer[PCBLayer], pcb_font(st->pcb, 0, 1), X, Y, 90.0*direction, scaling, 0, text, Flags); return 0; /* create new font */ } @@ -920,8 +920,8 @@ if (subtree->str != NULL) { for(n = subtree; n != NULL; n = n->next) { -#warning TODO: it is enough to test n->str == NULL only once, and do a "continue" -#warning TODO: none of the kicad_errors() here should refer to subtree - they should use n or even n->children +TODO(": it is enough to test n->str == NULL only once, and do a "continue"") +TODO(": none of the kicad_errors() here should refer to subtree - they should use n or even n->children") if (n->str != NULL && strcmp("start", n->str) == 0) { SEEN_NO_DUP(tally, 0); if (n->children != NULL && n->children->str != NULL) { @@ -1022,7 +1022,7 @@ } } else if (n->str != NULL && strcmp("status", n->str) == 0) { -#warning TODO: process this +TODO(": process this") } else return kicad_error(n, "unexpected empty/NULL segment argument node: '%s'", n->str); @@ -1041,7 +1041,7 @@ { pcb_layer_id_t id = -1; pcb_layergrp_id_t gid = -1; -#warning TODO: we should not depend on layer IDs other than 0 +TODO(": we should not depend on layer IDs other than 0") switch (lnum) { case 0: case 15: @@ -1069,7 +1069,7 @@ } else if ((lname[1] == '.') && ((lname[0] == 'F') || (lname[0] == 'B'))) { /* F. or B. layers */ -#warning TODO: update this: we have explicit silk, paste and mask now +TODO(": update this: we have explicit silk, paste and mask now") if (strcmp(lname + 2, "SilkS") == 0) return 0; /* silk layers are implicit */ #if 0 @@ -1196,7 +1196,7 @@ res |= kicad_reg_layer(st, "Top", PCB_LYT_COPPER | PCB_LYT_TOP, NULL); res |= kicad_reg_layer(st, "Bottom", PCB_LYT_COPPER | PCB_LYT_BOTTOM, NULL); -#warning layer TODO: +TODO("layer:") /* We don't have custom mask layers yet res |= kicad_reg_layer(st, "F.Mask", PCB_LYT_MASK | PCB_LYT_TOP, NULL); @@ -1355,7 +1355,7 @@ if (pinName != NULL) pcb_attribute_put(&ps->Attributes, "term", pinName); -#warning TODO: pad rotation? +TODO(": pad rotation?") #if 0 /* the rotation value describes rotation to the pad versus the original pad orientation, _NOT_ rotation @@ -1450,7 +1450,7 @@ pcb_layer_t *subc_layer; pcb_layer_type_t smd_side; -#warning TODO: this should be coming from the s-expr file preferences part +TODO(": this should be coming from the s-expr file preferences part") Clearance = PCB_MM_TO_COORD(0.250); /* start with something bland here */ if (st->pcb == NULL) { @@ -1746,7 +1746,7 @@ } required = BV(0) | BV(1) | BV(4) | BV(7) | BV(8); if ((tally & required) == required) { /* has location, layer, size and stroke thickness at a minimum */ -#warning TODO: this will never be NULL; what are we trying to check here? +TODO(": this will never be NULL; what are we trying to check here?") if (&st->pcb->fontkit.dflt == NULL) { pcb_font_create_default(st->pcb); } @@ -1910,7 +1910,7 @@ } } else if (m->str != NULL && strcmp("layers", m->str) == 0) { -#warning TODO: rather pass this subtree directly to the shape generator code so it does not need to guess the layers +TODO(": rather pass this subtree directly to the shape generator code so it does not need to guess the layers") if (SMD) { /* skip testing for pins */ SEEN_NO_DUP(featureTally, 2); smd_side = 0; @@ -2254,8 +2254,8 @@ return kicad_error(subtree, "unexpected fp_arc end Y null node."); } } -#warning TODO: this is just code duplication of fp_line code else if (l->str != NULL && strcmp("layer", l->str) == 0) { +TODO("this is just code duplication of fp_line code") SEEN_NO_DUP(featureTally, 6); if (l->children != NULL && l->children->str != NULL) { SEEN_NO_DUP(featureTally, 7); @@ -2359,7 +2359,7 @@ if (subc != NULL) { if (moduleEmpty) { /* should try and use module empty function here */ -#warning TODO: why do we try to do this? an error is an error +TODO(": why do we try to do this? an error is an error") Thickness = PCB_MM_TO_COORD(0.200); } @@ -2693,7 +2693,7 @@ pcb_message(PCB_MSG_WARNING, "Had to make changes to the coords so that the design fits the board.\n"); pcb_layer_colors_from_conf(Ptr, 1); -#warning TODO: free the layer hash +TODO(": free the layer hash") return readres; } Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 21409) +++ trunk/src_plugins/io_kicad/write.c (revision 21410) @@ -265,7 +265,7 @@ localArc.Height = radius; } -#warning TODO: what do we need this for? +TODO(": what do we need this for?") #if 0 /* Return the x;y coordinate of the endpoint of an arc; if which is 0, return the endpoint that corresponds to StartAngle, else return the end angle's. */ @@ -288,7 +288,7 @@ switch(kly->type) { case KLYT_COPPER: -#warning TODO: this should be a proper line approximation using a helper (to be written) +TODO(": this should be a proper line approximation using a helper (to be written)") pcb_fprintf(ctx->f, "(segment (start %.3mm %.3mm) (end %.3mm %.3mm) (layer %s) (width %.3mm))\n", copperStartX, copperStartY, xEnd, yEnd, kly->name, arc->Thickness); /* neglect (net ___ ) for now */ pcb_io_incompat_save(ctx->pcb->Data, (pcb_any_obj_t *)arc, "copper-arc", "Kicad does not support copper arcs; using line approximation", NULL); break; @@ -338,7 +338,7 @@ halfStringHeight = -halfStringHeight; } -#warning textrot TODO: use the degrees instead of 90 deg steps +TODO("textrot: use the degrees instead of 90 deg steps") pcb_text_old_direction(&direction, text->rot); if (direction == 3) { /*vertical down */ if (kly->lyt & PCB_LYT_BOTTOM) { /* back copper or silk */ @@ -412,14 +412,14 @@ int i, j; if (polygon->HoleIndexN != 0) { -#warning TODO: does kicad suppor holes? of so, use them; else (and only else) there is a polygon.h call that can split up a holed poly into a set of hole-free polygons +TODO(": does kicad suppor holes? of so, use them; else (and only else) there is a polygon.h call that can split up a holed poly into a set of hole-free polygons") pcb_io_incompat_save(ctx->pcb->Data, (pcb_any_obj_t *)polygon, "poly-hole", "can't export polygon with holes", NULL); return; } /* preliminaries for zone settings */ -#warning TODO: never hardwire tstamp -#warning TODO: do not hardwire thicknesses and gaps and hatch values! +TODO(": never hardwire tstamp") +TODO(": do not hardwire thicknesses and gaps and hatch values!") fprintf(ctx->f, "%*s(zone (net 0) (net_name \"\") (layer %s) (tstamp 478E3FC8) (hatch edge 0.508)\n", ind, "", kly->name); fprintf(ctx->f, "%*s(connect_pads no (clearance 0.508))\n", ind + 2, ""); fprintf(ctx->f, "%*s(min_thickness 0.4826)\n", ind + 2, ""); @@ -511,7 +511,7 @@ if (is_subc) { if (pcb_pstk_export_compat_via(ps, &x, &y, &drill_dia, &pad_dia, &clearance, &mask, &cshape, &plated)) { fprintf(ctx->f, "%*s", ind, ""); -#warning TODO: handle all cshapes (throw warnings) +TODO(": handle all cshapes (throw warnings)") pcb_fprintf(ctx->f, "(pad %s thru_hole %s (at %.3mm %.3mm %f) (size %.3mm %.3mm) (drill %.3mm) (layers %s %s))\n", ps->term, ((cshape == PCB_PSTK_COMPAT_SQUARE) ? "rect" : "oval"), x + dx, y + dy, psrot, @@ -566,7 +566,7 @@ shape_str = "oval"; break; case PCB_PSSH_HSHADOW: -#warning hshadow TODO +TODO("hshadow TODO") break; } } @@ -601,7 +601,7 @@ pcb_io_incompat_save(Data, (pcb_any_obj_t *)ps, "padstack-shape", "Can not convert padstack to via", "only round vias are supported"); continue; } -#warning TODO: set klayer_from and klayer_to using bb span of ps +TODO(": set klayer_from and klayer_to using bb span of ps") fprintf(ctx->f, "%*s", ind, ""); pcb_fprintf(ctx->f, "(via (at %.3mm %.3mm) (size %.3mm) (layers %s %s))\n", @@ -641,7 +641,7 @@ continue; } -#warning TODO: this should be a safe lookup, merged with kicad_sexpr_layer_to_text() +TODO(": this should be a safe lookup, merged with kicad_sexpr_layer_to_text()") kly.name = kicad_sexpr_layer_to_text(ctx, klayer); kly.ly = ly; kly.lyt = pcb_layer_flags_(ly); @@ -669,7 +669,7 @@ const char *currentElementRef; const char *currentElementVal; -#warning TODO: revise this for subc +TODO(": revise this for subc") /* elementlist_dedup_initializer(ededup);*/ /* Now initialize the group with defaults */ @@ -679,12 +679,12 @@ pcb_coord_t xPos, yPos, sox, soy; int on_bottom; -#warning TODO: get this from data table (see also #1) +TODO(": get this from data table (see also #1)") int silkLayer = 21; /* hard coded default, 20 is bottom silk */ int copperLayer = 15; /* hard coded default, 0 is bottom copper */ /* elementlist_dedup_skip(ededup, element); */ -#warning TODO: why? +TODO(": why?") /* let's not skip duplicate elements for layout export */ if (pcb_subc_get_origin(subc, &sox, &soy) != 0) { @@ -704,8 +704,8 @@ copperLayer = 0; } -#warning TODO: we should probably do unm_name() on the refdes, not on footprint-name? -#warning TODO: the unique name makes no sense if we override it with unknown - if the unique name is NULL, it is more likely a save-incompatibility error +TODO(": we should probably do unm_name() on the refdes, not on footprint-name?") +TODO(": the unique name makes no sense if we override it with unknown - if the unique name is NULL, it is more likely a save-incompatibility error") currentElementName = unm_name(&group1, pcb_attribute_get(&subc->Attributes, "footprint"), subc); if (currentElementName == NULL) { currentElementName = "unknown"; @@ -719,7 +719,7 @@ currentElementVal = "unknown"; } -#warning TODO: why the heck do we hardwire timestamps?!!?!?! +TODO(": why the heck do we hardwire timestamps?!!?!?!") fprintf(ctx->f, "%*s", ind, ""); pcb_fprintf(ctx->f, "(module %[4] (layer %s) (tedit 4E4C0E65) (tstamp 5127A136)\n", currentElementName, kicad_sexpr_layer_to_text(ctx, copperLayer)); fprintf(ctx->f, "%*s", ind + 2, ""); @@ -730,21 +730,21 @@ fprintf(ctx->f, "%*s", ind + 2, ""); -#warning TODO: do not hardwire these coords, look up the first silk dyntext coords instead +TODO(": do not hardwire these coords, look up the first silk dyntext coords instead") pcb_fprintf(ctx->f, "(fp_text reference %[4] (at 0.0 -2.56) ", currentElementRef); pcb_fprintf(ctx->f, "(layer %s)\n", kicad_sexpr_layer_to_text(ctx, silkLayer)); -#warning TODO: do not hardwire font sizes here, look up the first silk dyntext sizes instead +TODO(": do not hardwire font sizes here, look up the first silk dyntext sizes instead") fprintf(ctx->f, "%*s", ind + 4, ""); fprintf(ctx->f, "(effects (font (size 1.397 1.27) (thickness 0.2032)))\n"); fprintf(ctx->f, "%*s)\n", ind + 2, ""); -#warning TODO: do not hardwire these coords, look up the first silk dyntext coords instead +TODO(": do not hardwire these coords, look up the first silk dyntext coords instead") fprintf(ctx->f, "%*s", ind + 2, ""); pcb_fprintf(ctx->f, "(fp_text value %[4] (at 0.0 -1.27) ", currentElementVal); pcb_fprintf(ctx->f, "(layer %s)\n", kicad_sexpr_layer_to_text(ctx, silkLayer)); -#warning TODO: do not hardwire font sizes here, look up the first silk dyntext sizes instead +TODO(": do not hardwire font sizes here, look up the first silk dyntext sizes instead") fprintf(ctx->f, "%*s", ind + 4, ""); fprintf(ctx->f, "(effects (font (size 1.397 1.27) (thickness 0.2032)))\n"); fprintf(ctx->f, "%*s)\n", ind + 2, ""); @@ -751,9 +751,9 @@ kicad_print_data(ctx, subc->data, ind+2, -sox, -soy); -#warning TODO: export padstacks -#warning TODO: warn for vias -#warning TODO: warn for heavy terminals +TODO(": export padstacks") +TODO(": warn for vias") +TODO(": warn for heavy terminals") fprintf(ctx->f, "%*s)\n\n", ind, ""); /* finish off module */ } @@ -760,7 +760,7 @@ /* Release unique name utility memory */ unm_uninit(&group1); -#warning TODO: revise this for subc +TODO(": revise this for subc") /* free the state used for deduplication */ /* elementlist_dedup_free(ededup);*/ @@ -769,7 +769,7 @@ static int write_kicad_layout_via_drill_size(FILE *FP, pcb_cardinal_t indentation) { -#warning TODO: do not hardwire the drill size here - does kicad support only one size, or what? +TODO(": do not hardwire the drill size here - does kicad support only one size, or what?") fprintf(FP, "%*s", indentation, ""); pcb_fprintf(FP, "(via_drill 0.635)\n"); /* mm format, default for now, ~= 0.635mm */ return 0; @@ -785,7 +785,7 @@ return -1; } -#warning TODO: make this initialization a common function with write_kicad_layout() +TODO(": make this initialization a common function with write_kicad_layout()") pcb_printf_slot[4] = "%{\\()\t\r\n \"}mq"; wctx.f = FP; @@ -832,7 +832,7 @@ int sheetWidth = A4WidthMil; int paperSize = 4; /* default paper size is A4 */ -#warning TODO: rewrite this: rather have a table and a loop that hardwired calculations in code +TODO(": rewrite this: rather have a table and a loop that hardwired calculations in code") /* we sort out the needed kicad sheet size here, using A4, A3, A2, A1 or A0 size as needed */ if (PCB_COORD_TO_MIL(PCB->MaxWidth) > A4WidthMil || PCB_COORD_TO_MIL(PCB->MaxHeight) > A4HeightMil) { sheetHeight = A4WidthMil; /* 11.7" */ Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 21409) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 21410) @@ -67,7 +67,7 @@ if (pcb_data_is_empty(subc->data)) continue; -#warning TODO: need a subc dedup +TODO(": need a subc dedup") /* elementlist_dedup_skip(ededup, element);*/ fprintf(FP, "%s\n", unm_name(&group1, or_empty(pcb_attribute_get(&subc->Attributes, "footprint")), subc)); @@ -97,8 +97,8 @@ pcb_fprintf(FP, "Po 3 %.0mk %.0mk %.0mk %.0mk %.0mk\n", /* testing kicad printf */ x + xOffset, y + yOffset, x + xOffset, y + yOffset, pad_dia); -#warning TODO: check if drill_dia can be applied -#warning TODO: bbvia +TODO(": check if drill_dia can be applied") +TODO(": bbvia") pcb_fprintf(FP, "De 15 1 0 0 0\n"); /* this is equivalent to 0F, via from 15 -> 0 */ } } @@ -108,7 +108,7 @@ /* generates a default via drill size for the layout */ static int write_kicad_legacy_layout_via_drill_size(FILE *FP) { -#warning TODO: do not hardwire this +TODO(": do not hardwire this") pcb_fprintf(FP, "ViaDrill 250\n"); /* decimil format, default for now, ~= 0.635mm */ return 0; } @@ -247,8 +247,8 @@ halfStringHeight = -halfStringHeight; } -#warning code duplication with io_kicad - clean that up after fixing textrot! -#warning textrot TODO: use the angle, not n*90 deg +TODO("code duplication with io_kicad - clean that up after fixing textrot!") +TODO("textrot: use the angle, not n*90 deg") pcb_text_old_direction(&direction, text->rot); if (direction == 3) { /*vertical down */ if (currentLayer == 0 || currentLayer == 20) { /* back copper or silk */ @@ -388,17 +388,17 @@ } fprintf(FP, "$MODULE %s\n", uname); -#warning TODO: do not hardwire time stamps +TODO(": do not hardwire time stamps") pcb_fprintf(FP, "Po %.0mk %.0mk 0 %d 51534DFF 00000000 ~~\n", ox, oy, copperLayer); fprintf(FP, "Li %s\n", uname); /* This needs to be unique */ fprintf(FP, "Cd %s\n", uname); fputs("Sc 0\n", FP); fputs("AR\n", FP); -#warning TODO: is this the origin point? if so, it should be sox and soy +TODO(": is this the origin point? if so, it should be sox and soy") fputs("Op 0 0 0\n", FP); -#warning TODO: do not hardwire coords -#warning TODO: figure how to turn off displaying these +TODO(": do not hardwire coords") +TODO(": figure how to turn off displaying these") fprintf(FP, "T0 0 -4000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "refdes"))); fprintf(FP, "T1 0 -5000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "value"))); fprintf(FP, "T2 0 -6000 600 600 0 120 N V %d N \"%s\"\n", silkLayer, or_empty(pcb_attribute_get(&subc->Attributes, "footprint"))); @@ -453,7 +453,7 @@ fputs("$PAD\n", FP); /* start pad descriptor for an smd pad */ -#warning TODO: remove this code dup with io_kicad +TODO(": remove this code dup with io_kicad") for(n = 0; n < tshp->len; n++) { if (tshp->shape[n].layer_mask & PCB_LYT_COPPER) { int i; @@ -502,7 +502,7 @@ shape_chr = 'C'; break; case PCB_PSSH_HSHADOW: -#warning hshadow TODO +TODO("hshadow TODO") shape_chr = 'C'; cx = 0; cy = 0; @@ -607,7 +607,7 @@ subclist_foreach(&Data->subc, &sit, subc) { const char *uname = unm_name(&group1, or_empty(pcb_attribute_get(&subc->Attributes, "footprint")), subc); -#warning TODO: what did we need this for? +TODO(": what did we need this for?") /* elementlist_dedup_skip(ededup, element); /* skip duplicate elements */ io_kicad_legacy_write_subc(FP, PCB, subc, xOffset, yOffset, uname); } @@ -666,7 +666,7 @@ return -1; } -#warning TODO: no hardwiring of dates +TODO(": no hardwiring of dates") fputs("PCBNEW-LibModule-V1 jan 01 jan 2016 00:00:01 CET\n", FP); fputs("$INDEX\n", FP); io_kicad_legacy_write_subc_index(FP, buff->Data); @@ -719,7 +719,7 @@ fputs("$SHEETDESCR\n", FP); -#warning TODO: se this from io_kicad, do not duplicate the code here +TODO(": se this from io_kicad, do not duplicate the code here") /* we sort out the needed kicad sheet size here, using A4, A3, A2, A1 or A0 size as needed */ if (PCB_COORD_TO_MIL(PCB->MaxWidth) > A4WidthMil || PCB_COORD_TO_MIL(PCB->MaxHeight) > A4HeightMil) { sheetHeight = A4WidthMil; /* 11.7" */ Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 21409) +++ trunk/src_plugins/io_lihata/read.c (revision 21410) @@ -61,7 +61,7 @@ #include "../src_plugins/lib_compat_help/pstk_compat.h" #include "../src_plugins/lib_compat_help/elem_rot.h" -#warning cleanup TODO: put these in a gloal load-context-struct +TODO("cleanup: put these in a gloal load-context-struct") vtp0_t post_ids, post_thermal_old, post_thermal_heavy; static int rdver; unsigned long warned, old_model_warned; @@ -843,7 +843,7 @@ text->rot = 0; } -#warning TODO: get the font +TODO(": get the font") if (ly != NULL) pcb_add_text_on_layer(ly, text, pcb_font(PCB, text->fid, 1)); @@ -1283,7 +1283,7 @@ else return iolht_error(obj, "invalid element: objects is not a list\n"); -#warning subc TODO: TextFlags +TODO("subc: TextFlags") txt = pcb_subc_add_refdes_text(subc, tx, ty, tdir, tscale, onsld); pcb_subc_xy_rot_pnp(subc, ox, oy, onsld); @@ -1684,7 +1684,7 @@ if ((nlyt != NULL) && (nlyt->type == LHT_HASH)) res = parse_layer_type(&dst->layer_mask, &prp, nlyt, "padstack shape"); -#warning layer TODO: shape v6 and support for prp +TODO("layer: shape v6 and support for prp") if (res != 0) return iolht_error(nlyt != NULL ? nlyt : nshape, "Failed to parse pad stack shape (layer mask)\n"); @@ -1994,7 +1994,7 @@ f = &fk->dflt; } -#warning TODO: check return val +TODO(": check return val") parse_font(f, n); } Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 21409) +++ trunk/src_plugins/io_lihata/write.c (revision 21410) @@ -1662,7 +1662,7 @@ /* bump version if features require */ sc = pcb_subclist_first(&data->subc); -#warning subc TODO: for subc-in-subc this should be recursive +TODO("subc: for subc-in-subc this should be recursive") if (padstacklist_first(&sc->data->padstack) != NULL) { if (wrver < 4) { pcb_message(PCB_MSG_WARNING, "Had to bump lihata subc version to 4 because the subcircuit contains padstacks.\n"); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 21409) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 21410) @@ -136,7 +136,7 @@ hs++; w = pcb_get_value(curr, ctx->unit, NULL, NULL); h = pcb_get_value(hs, ctx->unit, NULL, NULL); -#warning padstack TODO: rewrite +TODO("padstack: rewrite") #if 0 pcb_element_pad_new_rect(elem, px+w/2, py+h/2, px-w/2, py-h/2, cl, ms, name, name, flags); #endif @@ -162,7 +162,7 @@ } } -#warning padstack TODO: rewrite +TODO("padstack: rewrite") #if 0 if (hole > 0) { pcb_element_pin_new(elem, px, py, thickness, cl, ms, hole, name, name, flags); @@ -214,7 +214,7 @@ parse_xy(ctx, tmp->argv[1], &px, &py); for(n = 2; n < tmp->argc; n++) { parse_xy(ctx, tmp->argv[n], &x, &y); -#warning subc TODO: rewrite this for subcircuits +TODO("subc: rewrite this for subcircuits") #if 0 pcb_element_line_new(elem, px, py, x, y, th); #endif @@ -253,7 +253,7 @@ } } -#warning subc TODO: rewrite for subc +TODO("subc: rewrite for subc") #if 0 elem = pcb_element_new(ctx->pcb->Data, NULL, pcb_font(ctx->pcb, 0, 1), flags, desc, refdes, value, tx, ty, dir, 100, flags, 0); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 21409) +++ trunk/src_plugins/io_pcb/file.c (revision 21410) @@ -174,7 +174,7 @@ char *cp = buf; char sep = 0; int group, entry; -#warning layer TODO: revise this loop to save only what the original code saved +TODO("layer: revise this loop to save only what the original code saved") for (group = 0; group < pcb_max_group(PCB); group++) if (PCB->LayerGroups.grp[group].len) { unsigned int gflg = pcb_layergrp_flags(PCB, group); @@ -437,7 +437,7 @@ rx = trefdes->X - ox; ry = trefdes->Y - oy; if (!pcb_text_old_direction(&rdir, trefdes->rot)) { -#warning textrot TODO: incompatibility warning +TODO("textrot: incompatibility warning") } rscale = trefdes->Scale; } @@ -585,7 +585,7 @@ textlist_foreach(&layer->Text, &it, text) { int dir; if (!pcb_text_old_direction(&dir, text->rot)) { -#warning textrot TODO: incompatibility warning +TODO("textrot: incompatibility warning") } pcb_fprintf(FP, "\tText[%[0] %[0] %d %d ", text->X, text->Y, dir, text->Scale); pcb_print_quoted_string(FP, (char *) PCB_EMPTY(text->TextString)); @@ -1007,7 +1007,7 @@ if (Value != NULL) pcb_attribute_put(&sc->Attributes, "value", Value); -#warning subc TODO: TextFlags +TODO("subc: TextFlags") if (!(Flags.f & PCB_FLAG_HIDENAME)) txt = pcb_subc_add_refdes_text(sc, TextX, TextY, Direction, TextScale, yysubc_bottom); Index: trunk/src_plugins/lib_compat_help/layer_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/layer_compat.c (revision 21409) +++ trunk/src_plugins/lib_compat_help/layer_compat.c (revision 21410) @@ -35,7 +35,7 @@ #include "board.h" #include "data.h" -#warning padstack TODO: rewrite this for padstack, if needed +TODO("padstack: rewrite this for padstack, if needed") #if 0 static void swap_one_thermal(int lid1, int lid2, pcb_pin_t * pin) { @@ -61,7 +61,7 @@ pcb_layer_move_(&pcb->Data->Layer[lid1], &l2tmp); pcb_layer_move_(&pcb->Data->Layer[lid2], &l1tmp); -#warning padstack TODO: rewrite this for padstack, if needed +TODO("padstack: rewrite this for padstack, if needed") #if 0 PCB_VIA_LOOP(pcb->Data); { Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 21409) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 21410) @@ -34,7 +34,7 @@ #include "find.h" -#warning TODO: remove this once the operations are free of ptrs +TODO(": remove this once the operations are free of ptrs") extern unsigned long pcb_obj_type2oldtype(pcb_objtype_t type); Index: trunk/src_plugins/lib_gtk_common/act_fileio.c =================================================================== --- trunk/src_plugins/lib_gtk_common/act_fileio.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/act_fileio.c (revision 21410) @@ -108,7 +108,7 @@ return 0; } -#warning TODO: this should be more or less common with lesstif +TODO(": this should be more or less common with lesstif") const char pcb_gtk_acts_save[] = "Save()\n" "Save(Layout|LayoutAs)\n" "Save(AllConnections|AllUnusedPins|ElementConnections)\n" "Save(PasteBuffer)"; const char pcb_gtk_acth_save[] = "Save layout and/or element data to a user-selected file."; /* DOC: save.html */ Index: trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 21410) @@ -114,7 +114,7 @@ p->mouse_cb = ghid_preview_mouse; /* p->overlay_draw_cb = pcb_stub_draw_csect_overlay;*/ -#warning TODO make these configurable: +TODO("TODO make these configurable:") p->x_min = 0; p->y_min = 0; p->x_max = PCB_MM_TO_COORD(100); Index: trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 21410) @@ -370,7 +370,7 @@ const char *s = val->str_value; if ((s == NULL) || (*s == '\0')) { -#warning DAD TODO: remove cursor - is it possible with gtk? +TODO("DAD: remove cursor - is it possible with gtk?") return 0; } Index: trunk/src_plugins/lib_gtk_common/dlg_library.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_library.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_library.c (revision 21410) @@ -788,7 +788,7 @@ return vbox; } -#warning TODO: figure how this can be passed to the constructor without a global var +TODO(": figure how this can be passed to the constructor without a global var") static pcb_gtk_common_t *lwcom; static void pinout_expose(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) Index: trunk/src_plugins/lib_gtk_common/dlg_netlist.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_netlist.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_netlist.c (revision 21410) @@ -482,7 +482,7 @@ pcb_actionl("netlist", "find", name, NULL); } -#warning padstack TODO: this seems to be duplicate in lesstif +TODO("padstack: this seems to be duplicate in lesstif") static void netlist_rip_up_cb(GtkWidget * widget, gpointer data) { Index: trunk/src_plugins/lib_gtk_common/dlg_route_style.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_route_style.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_route_style.c (revision 21410) @@ -236,7 +236,7 @@ dialog->inhibit_style_change = 1; pcb_gtk_route_style_empty(dialog->rss); -#warning TODO: some of these should be in core +TODO(": some of these should be in core") pcb_gtk_route_style_copy(dialog->rss->selected); vtroutestyle_remove(&PCB->RouteStyle, dialog->rss->selected, 1); Index: trunk/src_plugins/lib_gtk_common/dlg_topwin.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 21410) @@ -204,7 +204,7 @@ if (!tw->active) return; -#warning TODO: use some gds here to speed things up +TODO(": use some gds here to speed things up") pcb_gtk_g_strdup(&(tw->name_label_string), name); if (!tw->name_label_string || !*tw->name_label_string) @@ -234,7 +234,7 @@ /* Called when user clicks OK on route style dialog */ void pcb_gtk_tw_route_styles_edited_cb(pcb_gtk_topwin_t *tw) { -#warning TODO: generate a route styles changed event +TODO(": generate a route styles changed event") } /* Index: trunk/src_plugins/lib_gtk_common/ui_zoompan.c =================================================================== --- trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/ui_zoompan.c (revision 21410) @@ -74,7 +74,7 @@ /* Don't pan so far the board is completely off the screen */ v->x0 = MAX(-v->width, v->x0); v->y0 = MAX(-v->height, v->y0); -#warning TODO: #gtkzoom: do not use PCB sizes here, as we may be in a preview +TODO(": #gtkzoom: do not use PCB sizes here, as we may be in a preview") v->x0 = MIN(v->x0, PCB->MaxWidth); v->y0 = MIN(v->y0, PCB->MaxHeight); @@ -158,7 +158,7 @@ ghid_zoom_view_abs(v, center_x, center_y, v->coord_per_px * factor); } -#warning TODO: remove this and make the side-correct version the default (rename that to this short name); check when looking from the bottom: library window, drc window +TODO(": remove this and make the side-correct version the default (rename that to this short name); check when looking from the bottom: library window, drc window") void pcb_gtk_zoom_view_win(pcb_gtk_view_t *v, pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2) { double xf, yf; Index: trunk/src_plugins/lib_gtk_common/wt_preview.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/wt_preview.c (revision 21410) @@ -458,7 +458,7 @@ prv->init_drawing_widget(GTK_WIDGET(prv), prv->gport); -#warning TODO: maybe expose these through the object API so the caller can set it up? +TODO(": maybe expose these through the object API so the caller can set it up?") memset(&prv->view, 0, sizeof(prv->view)); prv->view.width = PCB_MM_TO_COORD(110); prv->view.height = PCB_MM_TO_COORD(110); Index: trunk/src_plugins/lib_gtk_common/wt_route_style.c =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_route_style.c (revision 21409) +++ trunk/src_plugins/lib_gtk_common/wt_route_style.c (revision 21410) @@ -48,7 +48,7 @@ guint pcb_gtk_route_style_signals_id[STYLE_LAST_SIGNAL] = { 0 }; -#warning TODO: this should be in core +TODO(": this should be in core") void pcb_gtk_route_style_copy(int idx) { pcb_route_style_t *drst; Index: trunk/src_plugins/lib_gtk_config/gtk_conf_list.c =================================================================== --- trunk/src_plugins/lib_gtk_config/gtk_conf_list.c (revision 21409) +++ trunk/src_plugins/lib_gtk_config/gtk_conf_list.c (revision 21410) @@ -113,7 +113,7 @@ gtk_list_store_insert_before(cl->l, &iter, sibl); rebuild(cl); -#warning TODO: insert new item at idx +TODO(": insert new item at idx") nd = NULL; fill_misc_cols(cl, idx, &iter, nd); @@ -129,7 +129,7 @@ gtk_list_store_remove(cl->l, &iter); rebuild(cl); -#warning TODO: remove list item idx +TODO(": remove list item idx") /* set cursor to where the user may expect it */ max = gtk_tree_model_iter_n_children(gtk_tree_view_get_model(GTK_TREE_VIEW(cl->t)), NULL) - 1; @@ -160,7 +160,7 @@ fn = cl->file_chooser_postproc(fno); gtk_list_store_set(cl->l, &iter, cl->col_data, fn, -1); -#warning TODO: replace list item idx +TODO(": replace list item idx") rebuild(cl); g_free(fno); } @@ -176,7 +176,7 @@ cl->editing = 0; gtk_list_store_set(cl->l, &iter, cl->col_data, new_text, -1); -#warning TODO: replace list item idx +TODO(": replace list item idx") rebuild(cl); } Index: trunk/src_plugins/lib_gtk_config/gui-config.c =================================================================== --- trunk/src_plugins/lib_gtk_config/gui-config.c (revision 21409) +++ trunk/src_plugins/lib_gtk_config/gui-config.c (revision 21410) @@ -241,7 +241,7 @@ void ghid_config_init(void) { hid_gtk_wgeo_old = hid_gtk_wgeo = conf_hid_gtk.plugins.hid_gtk.window_geometry; -#warning CONF TODO: inject the internal part here? +TODO("CONF: inject the internal part here?") } typedef struct { @@ -803,7 +803,7 @@ return NULL; } -#warning TODO: leak: this is never free()d +TODO(": leak: this is never free()d") lht_doc_t *config_library_lst_doc; lht_node_t *config_library_lst; @@ -1034,7 +1034,7 @@ /* Construct a layer group string. Follow logic in WritePCBDataHeader(), | but use g_string functions. */ -#warning layer TODO: kill this func, have a centralized C89 implementation and use g_strdup for glib +TODO("layer: kill this func, have a centralized C89 implementation and use g_strdup for glib") static gchar *make_layer_group_string(pcb_layer_stack_t * lg) { GString *string; @@ -1200,7 +1200,7 @@ gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); if ((ci == NULL) || (idx > 0)) { -#warning LEAK: this is never free()d +TODO("LEAK: this is never free()d") ci = malloc(sizeof(cfg_color_idx_t)); ci->cfg = cfg; ci->idx = idx; @@ -2105,7 +2105,7 @@ config_page_update_auto(nat); if (update_clr) { -#warning TODO: conf hooks should solve these +TODO(": conf hooks should solve these") com->set_special_colors(nat); com->layer_buttons_update(); com->invalidate_all(); Index: trunk/src_plugins/lib_gtk_hid/glue_conf.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_conf.c (revision 21409) +++ trunk/src_plugins/lib_gtk_hid/glue_conf.c (revision 21410) @@ -127,7 +127,7 @@ init_conf_watch(&cbs_rst[0], "design/line_thickness", ghid_confchg_rst); init_conf_watch(&cbs_rst[1], "design/clearance", ghid_confchg_rst); -#warning padstack TODO: remove some paths when route style has proto +TODO("padstack: remove some paths when route style has proto") init_conf_watch(&cbs_rst[2], "design/via_thickness", ghid_confchg_rst); init_conf_watch(&cbs_rst[3], "design/via_drilling_hole", ghid_confchg_rst); Index: trunk/src_plugins/lib_gtk_hid/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 21409) +++ trunk/src_plugins/lib_gtk_hid/glue_hid.c (revision 21410) @@ -165,7 +165,7 @@ gport->drawing_area = ghidgui->topwin.drawing_area; gport->mouse.top_window = ghidgui->common.top_window; -#warning TODO: move this to render init +TODO(": move this to render init") /* Mouse and key events will need to be intercepted when PCB needs a | location from the user. */ Index: trunk/src_plugins/lib_hid_common/lib_hid_common.c =================================================================== --- trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 21409) +++ trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 21410) @@ -62,7 +62,7 @@ int pplg_init_lib_hid_common(void) { -#warning padstack TODO: remove some paths when route style has proto +TODO("padstack: remove some paths when route style has proto") const char **rp, *rpaths[] = {"design/line_thickness", "design/via_thickness", "design/via_drilling_hole", "design/clearance", NULL}; static conf_hid_callbacks_t ccb, rcb[sizeof(rpaths)/sizeof(rpaths[0])]; conf_native_t *nat; Index: trunk/src_plugins/lib_netmap/netmap.c =================================================================== --- trunk/src_plugins/lib_netmap/netmap.c (revision 21409) +++ trunk/src_plugins/lib_netmap/netmap.c (revision 21410) @@ -106,7 +106,7 @@ PCB_PADSTACK_LOOP(subc->data) { list_pstk_cb(ctx, pcb, padstack); } PCB_END_LOOP; -#warning subc TODO: heavy terminals - test on io_hyp +TODO("subc: heavy terminals - test on io_hyp") return 0; } Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 21409) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 21410) @@ -222,7 +222,7 @@ } break; case PCB_OBJ_ARC: -#warning TODO: fix this with a real approx +TODO(": fix this with a real approx") pcb_arc_get_end(a, end[0], &x, &y); pcb_poly_point_new(poly, x, y); pcb_arc_middle(a, &x, &y); @@ -238,7 +238,7 @@ pcb_add_poly_on_layer(layer, poly); pcb_poly_init_clip(pcb->Data, layer, poly); pcb_poly_invalidate_draw(layer, poly); -#warning TODO: use pcb_board_set_changed_flag(), but decouple that from PCB +TODO(": use pcb_board_set_changed_flag(), but decouple that from PCB") pcb->Changed = pcb_true; } Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 21409) +++ trunk/src_plugins/millpath/toolpath.c (revision 21410) @@ -81,12 +81,12 @@ } pcb_r_end(&it); -#warning TODO: centerline +TODO(": centerline") for(text = (pcb_text_t *)pcb_r_first(layer->text_tree, &it); text != NULL; text = (pcb_text_t *)pcb_r_next(&it)) pcb_poly_sub_obj(pcb->Data, layer, result->fill, PCB_OBJ_ARC, text); pcb_r_end(&it); -#warning TODO: subs poly: not supported by core +TODO(": subs poly: not supported by core") } @@ -105,7 +105,7 @@ pcb_pstk_t *ps, ps_tmp; pcb_rtree_it_t it; -#warning TODO: thermals: find out if any of our layers has thermal for the pin and if so, use that layer +TODO(": thermals: find out if any of our layers has thermal for the pin and if so, use that layer") for(ps = (pcb_pstk_t *)pcb_r_first(pcb->Data->padstack_tree, &it); ps != NULL; ps = (pcb_pstk_t *)pcb_r_next(&it)) { memcpy(&ps_tmp, ps, sizeof(ps_tmp)); ps_tmp.Clearance = 1; Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 21409) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 21410) @@ -80,7 +80,7 @@ pcb_any_obj_t *curr = current_obj, *from = from_obj; short_conn_t *s; -#warning find.c TODO: will not be needed after the big rewrite +TODO("find.c: will not be needed after the big rewrite") if (from_type == PCB_OBJ_RAT) /* rat line is often rat point and has no ID */ from = NULL; Index: trunk/src_plugins/propedit/props.c =================================================================== --- trunk/src_plugins/propedit/props.c (revision 21409) +++ trunk/src_plugins/propedit/props.c (revision 21410) @@ -79,7 +79,7 @@ void pcb_props_uninit(htsp_t *props) { -#warning TODO +TODO("TODO") } /* Retrieve values for a prop */ Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 21409) +++ trunk/src_plugins/puller/puller.c (revision 21410) @@ -1416,7 +1416,7 @@ gp_point(ps->x + shape->data.circ.x, ps->y + shape->data.circ.y, shape->data.circ.dia/2, 0); break; case PCB_PSSH_POLY: -#warning TODO: we lump poly padstacks in with square; safe, but not optimal; rather use the real shape +TODO(": we lump poly padstacks in with square; safe, but not optimal; rather use the real shape") case PCB_PSSH_LINE: gp_point(ps->BoundingBox.X1, ps->BoundingBox.Y1, 0, 0); gp_point(ps->BoundingBox.X1, ps->BoundingBox.Y2, 0, 0); Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 21409) +++ trunk/src_plugins/query/query_access.c (revision 21410) @@ -119,7 +119,7 @@ void pcb_qry_list_all(pcb_qry_val_t *lst, pcb_objtype_t mask) { assert(lst->type == PCBQ_VT_LST); -#warning TODO: rather do rtree search here to avoid recursion +TODO(": rather do rtree search here to avoid recursion") pcb_loop_all(PCB, &lst->data.lst, (mask & PCB_OBJ_LAYER) ? list_layer_cb : NULL, (mask & PCB_OBJ_LINE) ? list_line_cb : NULL, @@ -393,7 +393,7 @@ static double pcb_arc_len(pcb_arc_t *a) { -#warning TODO: this breaks for elliptics; see http://tutorial.math.lamar.edu/Classes/CalcII/ArcLength.aspx +TODO(": this breaks for elliptics; see http://tutorial.math.lamar.edu/Classes/CalcII/ArcLength.aspx") double r = (a->Width + a->Height)/2; return r * M_PI / 180.0 * a->Delta; } @@ -537,7 +537,7 @@ fld2str_req(s1, fld, 0); fld2str_opt(s2, fld, 1);*/ -#warning TODO +TODO("TODO") PCB_QRY_RET_INV(res); } @@ -650,7 +650,7 @@ fld2str_req(s1, fld, 0); fld2str_opt(s2, fld, 1);*/ -#warning TODO +TODO("TODO") PCB_QRY_RET_INV(res); } @@ -763,7 +763,7 @@ case PCB_OBJ_NET: return field_net(obj, fld, res); case PCB_OBJ_LAYER: return field_layer(obj, fld, res); -#warning layer TODO +TODO("layer TODO") case PCB_OBJ_LAYERGRP: default:; } Index: trunk/src_plugins/query/query_exec.c =================================================================== --- trunk/src_plugins/query/query_exec.c (revision 21409) +++ trunk/src_plugins/query/query_exec.c (revision 21410) @@ -46,7 +46,7 @@ void pcb_qry_uninit(pcb_qry_exec_t *ctx) { pcb_qry_list_free(&ctx->all); -#warning TODO: free the iterator +TODO(": free the iterator") } int pcb_qry_run(pcb_qry_node_t *prg, void (*cb)(void *user_ctx, pcb_qry_val_t *res, pcb_any_obj_t *current), void *user_ctx) Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 21409) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 21410) @@ -1338,12 +1338,12 @@ static void rbe_rotate(void *user_data, int argc, pcb_event_arg_t argv[]) { -#warning TODO +TODO("TODO") } static void rbe_rename(void *user_data, int argc, pcb_event_arg_t argv[]) { -#warning TODO: rewrite this for subc - also move it out from rubberband, it has nothing to do with the feature - should be some generic rat line invalidation mechanism +TODO(": rewrite this for subc - also move it out from rubberband, it has nothing to do with the feature - should be some generic rat line invalidation mechanism") #if 0 rubber_ctx_t *rbnd = user_data; int type = argv[1].d.i; Index: trunk/src_plugins/script/script.c =================================================================== --- trunk/src_plugins/script/script.c (revision 21409) +++ trunk/src_plugins/script/script.c (revision 21410) @@ -250,7 +250,7 @@ } if (lang == NULL) { -#warning TODO: guess +TODO(": guess") pcb_message(PCB_MSG_ERROR, "Can not load script %s from file %s: failed to guess language from file name\n", id, fn); return -1; } Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 21409) +++ trunk/src_plugins/vendordrill/vendor.c (revision 21410) @@ -541,7 +541,7 @@ if (!conf_vendor.plugins.vendor.enable) return pcb_false; -#warning TODO: these 3 loops should be wrapped in a single loop that iterates over attribute keys +TODO(": these 3 loops should be wrapped in a single loop that iterates over attribute keys") noskip = 1; for (i = 0; i < n_refdes; i++) { if ((PCB_NSTRCMP(PCB_UNKNOWN(subc->refdes), ignore_refdes[i]) == 0)