0. For the upcoming release ===============================================================================
+ BUG: mincut memory over-allocation: bug_files/mincut.lht [report: James]
	+ if a short consists of terminals only, do not even start the algo, just mark the terminals
	+ after that if there are too many shorted networks left, revert to the dump algorithm
+ feature: an action for switching layer to current side; see also ML/1955 [report: James]
+ BUG: padstack clearance can not be set to zero in the padstackeditor: tab 1, set to 0, tab 2, change some other value, close dialog -> 0 is forgotten (probably it generally won't accept 0) ML/1954 [report: Casey]
+ BUG: crosshair vs. grid - one pixel off, see ML 1801 [report: pstuge]
+ BUG: gtk: keyboard handling in top window; ML 1811 [report: pstuge]
+ BUG: press {t t} (or any other invalid key seq) while the mouse cursor is not in the drawing area but over the top window: crosshair is drawn (it shouldn't appear until the mosue cursor enters the drawing area) [report: pstuge]
+ BUG: lesstif: when gtk is not compiled in, there are tons of warnigns see bug_files/lesstif_menu.txt [report: rqsall]
	+> long term: need per plugin menus and/or implement local grid in lesstif
	+> suppressed the error message for now, the menu gets disabled anyway
- BUG:  gtk: 'tab' drifts cursor when used repeatedly, video repro: http://scififaster.net/wantitthatway_pcb-rnd.ogg [report: Miloh]
+ feature: fp_wget cache dir configurable [report: agaran]
+ BUG: Locked objects can be moved when selected. [Report: Ade]
	+> solution: locked objects are not removed on buffer/move operations (but they are still copied)
+ BUG: property editor window too tall: add scroll ML/2047 [report: gpaubert]
+ BUG: unwanted file format change. Reprod: new board; place a rectangle; save as pcb/mainline; place a 1206 from the lib; {f s} -> saved as lihata v5 [report: Richard]

2. For later releases ===============================================================================
- FEATURE: Scale() buffer objects (with an option to affect coords only) [report: celem]
- FEATURE: rendering transformations (to be used with cam, for Bdale's stencil use case)
- CLEANUP: move import_sch to import_sch_old and start a new, generic plugin
- FEATURE: relay events to multi-actions so that scripts can bind to events by defining actions
- CLEANUP: Remove separate command entry window from gtk
- FEATURE: padstack bbox:
	- per layer: keep a bbox per transformed shape per prototype, then getting the bbox of a padstack ref on a specific layer is looking up the shape, then 4 integer additions [report: Wojciech]
	- when calculating overall padstack bbox, ignore layers that are not present? but then a layer change would require a recalc (but this is true for subcs too!) [report: Wojciech]
- XOR rendering upgrade:
		- experiment with 'emboss' kind of drawing instead of xor so rendering can stay 'direct'
		- if worked: allow padstack xor draw to draw all shapes on all layers
- FEATURE: introduce new layer types:
	- doc
	- keepout
	- decide where to store global layers
- CLEANUP: rewrite the preview API:
	- instead of various hardwired methods (board, virtual layer, pinout), core should support callbacks
	- there should be a view context in core associated with this, that contains flips so the view can be decoupled from board flip config (library preview)
	- ... but there also should be an option for going with board flip (drc view)
- FEATURE: fungw: DAD dialog: mini parser from text
- CLEANUP: remove mnemonic from the menu system
	- check the central code and struct fields
	- remove "m=" fields from the menu lihata files
- CAM:
	- CLEANUP: move the hackish gerber layer suffix functions into CAM configs
	- CLEANUP: split gerber and drill file generation (make gerber depend on drill, for backward compatibility)
	- FEATURE: export_gerber: add a true gerber drill output
	- FEATURE: make the drill exporter sort drills by attributes, an user configured table telling which drill (by attribute) ends up in which file
	- FEATURE: invent a generic API for both the drill attrib config table
	- CLEANUP: remove the gerber->drill dep and ask users to use the CAM instead
	- CLEANUP: unify how output files are accessed/checked: confirmation on overwrite
- opengl:
	- BUG: heavy swapd +/- crash with radeon AMD GL driver, fixed by exporting LIBGL_ALWAYS_SOFTWARE=t GALLIUM_DRIVER=llvmpipe [report: erich] 
	- BUG: --gui gtk2_gl pcb-rnd library preview pane is black (  doWindows(library) ) [report: Miloh] 
- FEATURE: draw on move: 'Crosshair shows DRC clearance' should show the clearance also when moving a ... (not only when placing it) [report: wojciechk8]
	- need to precalculate and cache clearance shape in crosshair (polyarea!) because recalculating these for padstacks would be expensive (also rewrite lines and arcs)
	- padstack
	- clearing polygon
	- text
- BUG: undo operation while drawing a multiple segment line doesn't change segment attached to the crosshair [report:wojciechk8]
	- tool_line.c depends on pcb_undo()'s return value; can be fixed only when the old undo system is removed
- FEATURE: route style upgrade to prototypes:
	- BUG: set same {e s s} doesn't work on padstacks [report: Igor2]
- BUG: Rubberband move line endpoints ignores connected arc endpoints. [Fixing:Ade]
- BUG: gtk2_gl: RTT/arc_sizes.lht - elliptical arc corner case render bug [report: Wed]
- CLEANUP: DRC rewrite: extend the DRC window to be a generic location list (or rather rewrite with DAD!)
	- buttons to select one or all items or all items including locked
	- io infra for save incompatibility note with DRC list
	- import sch. shouldn't select elements to be removed but put them on a drc list
	- display number of items at top of drc window
	- export to file 
	- BUG: DRC hilight: for each drc error, have two groups of objects with different color highlight. SetThing assumes there will be only 1 object; this was broken in the original design [report: Igor2]
- find.c rewrite:
	- CLEANUP: a new "report(NetLength)" should not care about netlists but depend on find.c only
	- CLEANUP: netlist rewrite
		- when no netlist is loaded, new rats can't be drawn [report: agaran]
- FEATURE: lesstif does not allow "save as" in non alien format [report: erich]
- SUBC: element removal:
	- BUG? check if drc outline is drawn on padstacks XorDraw*DRC in draw.c in the old code [report: igor2]
	- FEATURE: "thermal recipe" so a padstack thermal can be put in a subc and it is change with the layer binding [report: jg]
	- CLEANUP: convert pcblib to subcircuits:
		- revise the value attribute - should be empty by default
		- remove old install elements
		- dir rename trunk/pcblib/tru-hole should handle make correctly and not walk on existing web services or user installs
- CLEANUP: When a subc or padstack is renamed or removed (PCB_EVENT_RUBBER_REMOVE_SUBC & PCB_EVENT_RUBBER_RENAME), any connected rats are removed by the rubberband plugin. Remove this feature from the rubberband plugin and add an alternative method of updating rats. [report: Ade]
- FEATURE: key rewrite: (base key swap bug (q<->a, y<->z))
	- for <char> (punctuation): learn key for non-US users
	- lesstif code upgrade for the new API
	- menu file fixup on punctuation in lesstif
- FEATURE: extedit: when editing subc with pcb, save configuration and load it in the external pcb-rnd so that grid sizes and other settings are preserved [report: jg]
- CLEANUP: propedit revamp:
	- move the property editor out from gtk, using the DAD, into propedit
	- test under lesstif
	- remove Attribute()
- CLEANUP: retire the nelma plugin - nelma is unfinished and not maintained
- FEATURE: subc/term: new terminal attribute: "pretend not connected to the same subc copper" (agaran's coil example)
- FEATURE: HID: option for using a fixed background color for the preview widget renders; using the user configured one goes wrong when it's set to dark [report: Alain]
- FEATURE: fontsel: ttf import?
- FEATURE: library window: allow long tags and long location text to split
- FEATURE: undo on new layer from right-click menu in gtk layersel doesn't work
- FEATUER: gtk layersel: consider to provide a config setting for making open-group-name horizontal [report: istankovic]
- layer rewrite:
	- BUG: catch the layer change signal from polygons and reclip; Evan's test case:
	  draw a line on a layer and a poly on another and change whether they are in
	  the same layer group
	- FEATURE: do not require top and bottom silk (also grep for TODO #tbs)
- GTK Preferences->User PoV->Layers : Hit 'v' to "zoom fit" the preview [report: Alain]
		- CLEANUP: allow GTK to handle keys in preview
		- CLEANUP: use the zoompan engine for the zooming. Modifiy API if necessary
- CLEANUP: resources:
- conf:
	- FEATURE: preferences dialog, config pov: change prio
	- (BUG: gtk preferences: check what takes 131 megs of VIRT ram (on top); destroy the dialog structures when closed)
	- (BUG: gtk preferences: poly isle area widget missing from the sizes tab)
	- CLEANUP: fp_fs_search: kill anything that gets ':' separated string as path list, get a config list instead
	- switch the lesstif HID over from attribs to conf
- CLEANUP: Mark
	- see pool node mark_cleanup
	- mark bug - ortho shouldn't use it, it should use last point (crosshair.X2); make sure nothing else abuses it [James]
- unravel the undo code
	- FEATURE: grid size change should be undoable? [report:Evan]
	- FEATURE: maybe other conf settings too?
- CLEANUP: pcb_act_Attributes -> remove; this should be handled by the property editor when lesstif already supports it.
- CLEANUP: layer group rewrite: remove PCB_MAX_LAYERGRP and PCB_MAX_LAYER and make them dynamic
- FEATURE: io_pcb: new, optional "layer tag" field in mainline's file format
- CLEANUP: fp_board: extend the API so that the element can be presented without saving to a file
- FEATURE: layer binding dialog: manual layer binding (reuse csect?)
- res/menu:
	- FEATURE: load/swap menus (TODO#1)
	- CLEANUP: search for vendor in the hid plugins, there should be no trace of it (vendor should register its in submenus with anchors)
	- CLEANUP: re-add dynamic menus after a gui change:
		- either remember dynamic menus in a separate list so they can be rebuilt
		- or provide hooks and let plugins deal with it
	- FEATURE: fungw: auto-remove menus by cookie (TODO#2)
	- FEATURE: load new res on the fly (replace the menu system):
		- low level reload code (re-add the dynamic menus too!)
		- action to reload if file name is known
		- gui load dialog with tags listed
- CLENAUP: decide about exporter policy:
	- png exports selection (even in not-as-shown), others don't
	- extend png hid attribs with a flag for this, maybe do the same for others
	- document the decision in "hacking"
- CLEANUP: reduce
		- export_bom: rewrite the string list code using htsp and/or lists
		- hash in hid_attrib.c?
		- nelma and gcode both invent .png name locally
		- get rid of gcode/lists.h,  and vector.[ch] (autorouter)
		- vendordrill
			- search for /units, replace it with pcb-printf something
			- add round down
			- replace ignore_refdes, ignore_value and ignore_descr with genvector
- FEATURE: project specific menus from extra lihata files - maybe from project.lht
- vendor drill plugin:
	- CLEANUP: check if we want to keep vendor name
	- FEATURE: vendor: be able to load multiple vendor files (project spec for skips, central for vendor) [report: celem]
- BUG: Lihata persistent save:
	- flag compatibility: save unknown, string-flags as loaded by io_pcb
	- ind: FONTS: second font indents incorrectly
	- ind: indentation bug in inline struct therm: closing } is preceded by indentation whitespace for some reason
	- keep numeric format: test all
	- keep unknown subtrees
	- doc/user/02_model/src/obj_arc.lht: Open/Save : Font section is embedded. Once manually removed, the file shows many diffs w.r.t original. Lihata V1 file. [report: Alain]
	- BUG: lhtpers indentation: bug_files/lhtpers_ins/; breakpoint in pers_table.c:34 and debug why the newline is getting in [report: Igor2]
- query & advanced search
	- FEATURE: search expr wizard should pick up the expression from the button when clicked
	- CLEANUP: make a run on a large board, speed test, with -O0 and -O3:
		- iteration speed (a simple @)
		- eval speed (a simple @ with a lot of constants in an expr)
		- geo speed
		- regex and string cmp match speed vs. select by name
- feature plugins:
	- FEATURE: autocrop doesnt undo (new layout, add some -maskmanaul content, autocrop(), & undo: gui view shifts, board size unchanged [report: Miloh]
	- BUG: distalign pcb_crosshair option doesn't work as a reference point  [report:Miloh]
	- BUG: can't undo after boardflip(), (ERROR: Attempt to pcb_undo() with Serial == 0) [report:Miloh]
- FEATURE: padstack edit swap shapes - low level for a "solder mask defined pad" [report: ehennes]
- BUG: rewrite layer undo; take it out from old_undo; layer del breaks on undo: can't save where it was added before. Consider the whole layer move and -1 business obsolete and rather add a separate insert and remove call?
	- BUG: add new layer in main window, pcb-rnd issues pcb_warning yet action is placed on undo stack [report: Miloh]
- BUG: gtk: preferences/user POV/sizes is not in sync with preferences/config POV/ [report: Alain]
	- rewrite using DAD
	- in sizes, add an apply button so the new settings can be applied from the non-modal preferences without closing
	- react on conf change events, refresh the fields
- FEATURE: lihata v6:
	- new doc layer types
	- remove pcb_board_t Zoom/x/y
	- remove via geometry from route style
	- remove real layer visible flag (UI is always reset)
	- add text object line width factor
- CLEANUP: parent subc update:
	- inhibit mechanism to speed things up:
		- under inhibit, pcb_subc_part_changed(ps) should mark subcircuits dirty
		- when inhibit drops to zero, revisit all subcircuits that are dirty
		- get a common inhibit function for batch processing that turn on draw, poly clip and pcb_subc_part_changed inhibit
- export_dsn:
	- missing global padstack (via) export:
		- FEATURE: need to think over and check the spec for how to do this with no-hole padstacks
		- RTT tests: thermal_layer.dsn, comp1.dsn, padstack.dsn
	- BUG: elem_pads_ds: do not export line shape in padstacks as polygons, that kills round cap lines
- feautres/cleanup: hid:
		- FEATURE: holes should be drawn below silk and mask (maybe this could be a config setting)
- BUG: I/O bugs:
	- kicad:
		- BUG:  segfault when loading kicad_pcb in work/alien_formats/A20*.kicad_pcb gdb at http://scififaster.net/kicad_pcb_gdb.txt - see bug_files/A20-minimal.kicad_pcb [report: miloh flag: erichvk_]
	- eagle:
		- BUG: eagle binary library load fails with assert when pad dimension == 0, drill != zero. Bug arises from uninitiliased st.ms_width minimum feature width DRC value. This does not manifest in XML load as it initiliased to default value of 10mil before the DRC block is read, and updated if specified in the DRC block. There is no DRC block in an eagle binary library, so a decision has to be made wrt to where a default minimum feature size is to be referred to, so that the pad/hole reading code can apply it when pad dimension is not specified at line 824 in read.c. If dimension is not present, but drill is, read.c correctly applies the DRC derived rv_pad_top at line 818 dia = eagle_get_attrc(st, subtree, "diameter", drill * (1.0+st->rv_pad_top*2.0)); Planned changes to rectangle parsing to geenrate copper rectangles, not four lines, will alter +/- eliminate the need for the rectangle read routine to have ms_width available pre DRC read. See bug_files/e-motoren.lbr. [report: Erich]
		- BUG: text rotations not quite right in eagle binary format layouts. See bug_files/tvbgone3-brd-in-eagle.png. Seems 180 and 270ccw rotation are rendered as upright an 90ccw rotation. Hmm. [erich]
		- BUG: valgrind shows memory leaks relating to binary load. See bug_files/e-motoren.lbr [report: erich]
		- BUG: on loading bug_files/diode.lbr, pcb-rnd's clipping polygon out of existence routine seems to go into a non terminating loop [report: erich]
		- layers for top and bottom soldermask, if not present in loaded eagle file, i.e. tvbgone3.brd, do not export on creating gerbers, and cannot be added easily to layout via layer prefs, since ability to add a soldermask group is lacking [erich].
		- eagle XML import fails on polygon import reported by miloh, test file alien_formats/eagle/OSHW_XML_examples/eagle_polygon_crash.brd [report: erich], due to input file containing an invalid polygon: a self intersecting poly in line 156 - consider handling "width"?
		- eagle rectangle parsing should generate a rectangular feature, not a four line rectangular outline [erich]
		- eagle XML wire elements need to have "curve" attribute processed, if present. i.e. arcs. Can see translate2geda for hints [report: erich]
		- eagle binary format appended text block needs to be parsed and the text strings allocated to ASCII-127 references in preceding text blocks [erich] 
		- eagle binary format v3 and libraries do not have a DRC block specifying restring or minimum feature widths. Binary loader should add a DRC block in these cases to the tree with the minimum settings needed for padstacks and features to load sensibly. [erich].
		- bin: padstack clearances for element pins will rely on connectivity to other polygons layer by layer defined in the netlist 
		- bin: need to refine naming of library (.lbr) elements in loaded .lbr files; any text names in the binary tree, if starting with ASCII 127, sequentially reference strings in the text block which comes immediately after the board/design tree. In later eagle binary versions, the text block seems to become a node of the tree, but a node of arbitrary length, not 24 bytes, with length of block still encoded in first few bytes. 
		- bin: need to add support for non top silk (tPlace), tDocu and top copper text in read.c
		- bin: layouts, once loaded, have issue where deselection of elements only deselects element pins/pads. click-drag of element or saving the layout to .lht and reloading fixes the deselection issue. Example FTSH.... library file for a header exhibits this behaviour.

3. Long term ===============================================================================
- BUG: draw a large padstack poly (as a subc term); put some vias (padtsacks) on top of it; with gdk and gl, after the 6th via some via rings will disappear [report: James]
	-> reason: order of padstack shape rendering is random
	-> we should probably render large objects first then smaller ones

Lesstif:
	- the notebook widget is not portable; detect it from scconfig and provide some hackish alternative if not found [report: rqsall]

GTK2:
	- next_gui: keep them open, hide

FEATURES
- BUILD: menuconfig and a config file for scconfig
- menu item for export of multiple selected layout elements to discrete .fp files

4. Low prio ===============================================================================
- BUG: 1. place 0603; 2. select; 3. cut to buffer; 4. undo -> 0603 put back but selection is lost; reason: the flag is removed in the buffer, but not in an undoable way as we don't have undo on buffer [report: igor2, miloh]
- BUG?: Far-side silk text can be selected and moved when the mouse is over front-side subcircuit. (but this is what we had with elements too! -> rewrite search.c to be a 'script' config) bug_files/farsilk.lht [report: Ade]
- BUG: RTT/arc_sizes.lht - unable to move arcs which have different width and height [report: Ade] - rewrite pcb_is_point_on_arc() elliptical case at the bottom
- BUG: main.c: SIGPIPE - detect it (needed for popen)
- FEATURE: padstack label smarter print: in case of full overlap of a bottom and top "pad", arrange other-side labels to avoid overlaps [report: al3x]
- FEATURE: advanced grid settings: make it possible to edit the lists in preferences
- improve locking:
	- FEATURE: consider a move-only lock?
	- BUG: when thermal and some other operations are applied on a locked element, indicate it
- BUG: Erich's gtk lag report: press 's' a lot then move the mouse - 's' ends up in the new loc!
- BUG: the TAB bug: (over ssh -X) press tab for a good 15 seconds; release; it won't work again for a fraction of a second
- BUG: rubberband_orig: draw a 90 deg arc, a 45 deg line that ends in the endpoints of the arc; enable rubber band, move the arc: only one endpoint of the line is moved [fixing:Ade]
- BUG: draw overlapping lines, a short fully under a long; click on the short, it gets selected but it's not visible because the long hides it [report:Evan]
- FEATURE: "save as" dialog: there should be an "auto" or "guess by extension" option in the save dialog format
- CLEANUP: insert drag&drop strangeness (mainline too):
	insert should just insert a new point and stop there, not starting a drag&drop
	move; the new point should be marked somehow (e.g. green-find one half of the
	object, like arc split does) lines can be inserted mostly only in all-dir-line
	which is strange
- FEATURE: missing rotate polygon (mainline too)
- BUG: zoom in too deep onto board edge and the implicit outline rectangle behaves strangely [report:Evan]
- FEATURE: scconfig: check if it picks up settings from env vars (for a gentoo build)
- CLEANUP: replace mkdtemp() with something safer
- FEATURE: display net names on pins, vias (and maybe tracks?) when zoomed in enough
- FEATURE: DRC should warn for thin poly hair
- FEATURE: new examples
	- blinking led with parametric footprints
	- example of nonetlist: 1206 jumpers and logos
- CLEANUP: In-line help needs update/re-structuration <lib_gtk_common/dlg_command.c>
- CLEANUP: rethink/rewrite the action/change infrastructure - too many void *ptr1
  pointers, too many code duplication
- BUG: double sided board, poly on both layers; grab existing lines on one layer and
  move then around. If all layers are visible, redraw of the far side layer
  is slow and causes flickering elements from that layer until the front is
  redrawn. Maybe we should have less flushes?
- CLEANUP: win32 port {large}
	- clean up central Makefile.in rules:
		- remove cat, sed, grep where possible, use scconfig instead
- BUG: arc bug: draw an arc with one end out of the drawing area; it will be jumpy and can not be placed properly
	-> AttachForCopy() calls SetCrosshairRange() that then sets crosshair max* which
	limits the arc to move freely. Problem: this is not arc-specific, this happens with any buffer copy! going for no-design-limit is probably better
- FEATURE: while drawing a line, the temporary outline should reflect the layer color
- FEATURE: push&shove
	- keep 45-deg knee when grabbing a point for drag&drop in non-all-dir
- CLEANUP: unify gui invocation options: pcb-rnd --help gtk_[gdk|gl] and pcb-rnd --help lesstif both show and use different input methods [report:miloh]
- FEATURE: consider a simple all in one function to create a default layer stackup for static/predictable layer formats being imported, to simplify importer coding
- FEATURE: trace length calculator:
	- click a line or arc or via
	- start a search in two directions mapping lines, arcs and vias connected (green-highlight them, marking them found)
	- stop at the first junction (anywhere where more than 2 objects are connected)
	- stop at polygons
	- display the number of vias and net trace length along the found objects
- BUG: miter bug;  miter crosses SMT pads under certain conditions [report: celem/miloh] 
- BUG: redrawbug1: grap c1, the diagonal trace gets drawn over U1's silk [report:Evan]
	-> it's redrawn because of the overlapping bounding box with C1, while U1 has no overlap; it would be too expensive to calculate what else to redraw
- CLEANUP: core lib splitup:
	- gsch2pcb: generalize plugin/buildin loading for external tools, check if gsch2pcb can work from plugins
